%%
%% This is file `glossaries-extra.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% glossaries-extra.dtx  (with options: `glossaries-extra.sty,package')
%% 
%%  glossaries-extra.dtx
%%  Copyright 2022 Nicola Talbot
%% 
%%  This work may be distributed and/or modified under the
%%  conditions of the LaTeX Project Public License, either version 1.3
%%  of this license or (at your option) any later version.
%%  The latest version of this license is in
%%    http://www.latex-project.org/lppl.txt
%%  and version 1.3 or later is part of all distributions of LaTeX
%%  version 2005/12/01 or later.
%% 
%%  This work has the LPPL maintenance status `maintained'.
%% 
%%  The Current Maintainer of this work is Nicola Talbot.
%% 
%%  This work consists of the files glossaries-extra.dtx and glossaries-extra.ins and the derived files glossaries-extra.sty, glossaries-extra-abbrstyles.def, glossaries-extra-bib2gls.sty, glossaries-extra-stylemods.sty, glossary-bookindex.sty, glossary-longextra.sty, glossary-topic.sty, glossary-table.sty, example-glossaries-xr.tex, example-glossaries-acronym-desc.bib, example-glossaries-acronym.bib, example-glossaries-acronyms-lang.bib, example-glossaries-brief.bib, example-glossaries-childmultipar.bib, example-glossaries-childnoname.bib, example-glossaries-cite.bib, example-glossaries-images.bib, example-glossaries-long.bib, example-glossaries-longchild.bib, example-glossaries-multipar.bib, example-glossaries-parent.bib, example-glossaries-symbolnames.bib, example-glossaries-symbols.bib, example-glossaries-url.bib, example-glossaries-user.bib, example-glossaries-xr.bib, glossaries-extra-2021-11-22.sty, glossaries-extra-bib2gls-2021-11-22.sty, glossaries-extra-stylemods-2021-11-22.sty, glossary-bookindex-2021-11-22.sty, glossary-longextra-2021-11-22.sty, glossary-topic-2021-11-22.sty.
%% 
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
\NeedsTeXFormat{LaTeX2e}
\DeclareRelease{v1.48}{2021-11-22}{glossaries-extra-2021-11-22.sty}
\DeclareCurrentRelease{v1.50}{2022-11-08}
\ProvidesPackage{glossaries-extra}[2022/11/08 v1.50 (NLCT)]
\RequirePackage{xkeyval}
\RequirePackage{etoolbox}
\@ifpackageloaded{glossaries}
{%
   \newcommand{\glsxtr@dooption}[1]{\setupglossaries{#1}}%
   \let\@glsxtr@declareoption\@gls@declareoption
}
{%
   \newcommand{\glsxtr@dooption}[1]{%
     \PassOptionsToPackage{#1}{glossaries}%
   }%
   \PassOptionsToPackage{toc}{glossaries}
   \PassOptionsToPackage{nopostdot}{glossaries}
   \PassOptionsToPackage{noredefwarn}{glossaries}
   \@ifpackageloaded{polyglossia}%
   {}%
   {%
     \@ifpackageloaded{babel}%
     {\PassOptionsToPackage{translate=babel}{glossaries}}%
     {}%
   }%
   \newcommand*{\@glsxtr@declareoption}[2]{%
     \DeclareOptionX{#1}{#2}%
     \DeclareOption{#1}{#2}%
   }
}
\newcommand*{\glsxtrundefaction}[2]{%
  \@glsxtrundeftag\PackageError{glossaries-extra}{#1}{#2}%
}
\newcommand*{\glsxtr@warnonexistsordo}[1]{}
\newcommand*{\glsxtrundeftag}{??}
\newcommand*{\@glsxtrundeftag}{}
\newcommand*{\@glsxtr@warn@undefaction}[2]{%
  \@glsxtrundeftag\GlossariesExtraWarning{#1}%
}
\newcommand*{\@glsxtr@err@undefaction}[2]{%
  \@glsxtrundeftag\PackageError{glossaries-extra}{#1}{#2}%
}
\newcommand*{\@glsxtr@warn@onexistsordo}[1]{%
  \GlossariesExtraWarning{\string#1\space hasn't been defined, so
  some errors won't be converted to warnings.
  (This most likely means your version of
  glossaries.sty is below version 4.19.)}%
}

\newcommand*{\@glsxtr@redef@forglsentries}{}
\newcommand*{\@glsxtr@do@redef@forglsentries}{%
  \renewcommand*{\forglsentries}[3][\glsdefaulttype]{%
    \protected@edef\@@glo@list{\csname glolist@##1\endcsname}%
    \ifdefstring{\@@glo@list}{,}%
    {%
      \GlossariesExtraWarning{No entries defined in glossary `##1'}%
    }%
    {%
      \@for##2:=\@@glo@list\do
      {%
        \ifdefempty{##2}{}{##3}%
      }%
    }%
  }%
}%
\define@choicekey{glossaries-extra.sty}{undefaction}%
 [\glsxtr@undefaction@val\glsxtr@undefaction@nr]%
 {warn,error}%
 {%
   \ifcase\glsxtr@undefaction@nr\relax
     \let\glsxtrundefaction\@glsxtr@warn@undefaction
     \let\glsxtr@warnonexistsordo\@glsxtr@warn@onexistsordo
     \let\@glsxtr@redef@forglsentries\@glsxtr@do@redef@forglsentries
   \or
     \let\glsxtrundefaction\@glsxtr@err@undefaction
     \let\glsxtr@warnonexistsordo\@gobble
     \let\@glsxtr@redef@forglsentries\relax
   \fi
 }
\newcommand*{\@glsxtr@record}[3]{}
\newcommand*{\glsxtr@recordsee}[2]{}
\newcommand*{\@glsxtr@defaultnumberformat}{glsnumberformat}%
\newcommand*{\GlsXtrSetDefaultNumberFormat}[1]{%
  \renewcommand*{\@glsxtr@defaultnumberformat}{#1}%
}%
\newcommand*{\@glsxtr@do@record@wrglossary}[1]{%
 \begingroup
   \ifKV@glslink@noindex
   \else
     \protected@edef\@gls@label{\glsdetoklabel{#1}}%
     \let\glslabel\@gls@label
     \glswriteentry{#1}%
     {%
       \ifdefempty{\@glsxtr@thevalue}%
       {%
         \ifx\@glsxtr@org@theHvalue\@glsxtr@theHvalue
         \else
           \let\theHglsentrycounter\@glsxtr@theHvalue
         \fi
         \glsxtr@saveentrycounter
         \let\@@do@@wrglossary\@glsxtr@dorecord
       }%
       {%
         \let\theglsentrycounter\@glsxtr@thevalue
         \let\theHglsentrycounter\@glsxtr@theHvalue
         \let\@@do@@wrglossary\@glsxtr@dorecordnodefer
       }%
       \ifx\@glsxtr@record@setting\@glsxtr@record@setting@alsoindex
         \glsxtr@@do@wrglossary{#1}%
       \else
         \@@glsxtrwrglossmark
         \glsxtr@inc@wrglossaryctr{#1}%
         \@@do@@wrglossary
       \fi
     }%
   \fi
 \endgroup
}
\newcommand*{\glsxtr@do@alsoindex@wrglossary}[1]{%
  \glsxtr@@do@wrglossary{#1}%
  \@glsxtr@do@record@wrglossary{#1}%
}
\newcommand*{\@@glsxtr@record}[3]{%
 \protected@edef\@gls@label{\glsdetoklabel{#2}}%
 \let\glslabel\@gls@label
 \ifglsentryexists{#2}{}%
 {%
   \@@glsxtrwrglossmark
   \begingroup
     \let\@glsnumberformat\@glsxtr@defaultnumberformat
     \def\@glsxtr@thevalue{}%
     \def\@glsxtr@theHvalue{\@glsxtr@thevalue}%
     \let\@glsxtr@org@theHvalue\@glsxtr@theHvalue
     \let\@gls@counter\glscounter
     \if@glsxtr@equations
       \@glsxtr@use@equation@counter
     \fi
     \@gls@setdefault@glslink@opts
     \csuse{@glsxtr@#3@prekeys}%
     \setkeys{#3}{#1}%
     \glsxtr@do@autoadd{#3}%
     \csuse{@glsxtr@#3@postkeys}%
     \glsxtr@inc@wrglossaryctr{#2}%
     \ifKV@glslink@noindex
     \else
       \glswriteentry{#2}%
       {%
         \ifdefempty{\@glsxtr@thevalue}%
         {%
           \ifx\@glsxtr@org@theHvalue\@glsxtr@theHvalue
           \else
             \let\theHglsentrycounter\@glsxtr@theHvalue
           \fi
           \glsxtr@saveentrycounter
           \let\@@do@@wrglossary\@glsxtr@dorecord
         }%
         {%
           \let\theglsentrycounter\@glsxtr@thevalue
           \let\theHglsentrycounter\@glsxtr@theHvalue
           \let\@@do@@wrglossary\@glsxtr@dorecordnodefer
         }%
         \ifx\@glsxtr@record@setting\@glsxtr@record@setting@alsoindex
           \glsxtr@@do@wrglossary{#2}%
         \else
           \@@do@@wrglossary
         \fi
       }%
     \fi
   \endgroup
 }%
}
\newcommand{\@glsxtr@glslink@prekeys}{\glslinkpresetkeys}
\newcommand{\@glsxtr@glslink@postkeys}{\glslinkpostsetkeys}
\newcommand{\@glsxtr@glossadd@prekeys}{\glsaddpresetkeys}
\newcommand{\@glsxtr@glossadd@postkeys}{\glsaddpostsetkeys}
\newcommand*\@glsxtr@dorecord{%
 \@@glsxtr@dorecord\@gls@label\glsxtr@record\@glsxtr@do@nameref@record
}

\newcommand*\@@glsxtr@dorecord[3]{%
   \global\let\@glsrecordlocref\theglsentrycounter
   \let\@glsxtr@orgprefix\@glo@counterprefix
   \ifx\theglsentrycounter\theHglsentrycounter
     \def\@glo@counterprefix{}%
   \else
     \protected@edef\@glsxtr@theentrycounter{\theglsentrycounter}%
     \protected@edef\@glsxtr@theHentrycounter{\theHglsentrycounter}%
     \@onelevel@sanitize\@glsxtr@theentrycounter
     \@onelevel@sanitize\@glsxtr@theHentrycounter
     \@xp@gls@getcounterprefix
       {\@glsxtr@theentrycounter}{\@glsxtr@theHentrycounter}%
   \fi
   \ifx\@glsxtr@record@setting\@glsxtr@record@setting@nameref
     #3%
      {#1}{\@glo@counterprefix}{\@gls@counter}{\@glsnumberformat}%
      {\@glsrecordlocref}%
   \else
     \@bibgls@write@aux{}{\string#2%
        {#1}{\@glo@counterprefix}{\@gls@counter}{\@glsnumberformat}%
        {\@glsrecordlocref}}%
   \fi
   \@glsxtr@counterrecordhook
   \let\@glo@counterprefix\@glsxtr@orgprefix
}
\newcommand*\@glsxtr@dorecordnodefer{%
   \ifx\theglsentrycounter\theHglsentrycounter
     \ifx\@glsxtr@record@setting\@glsxtr@record@setting@nameref
       \@glsxtr@do@nameref@record
          {\@gls@label}{}{\@gls@counter}{\@glsnumberformat}%
          {\theglsentrycounter}%
     \else
       \@bibgls@write@aux{}{\string\glsxtr@record
          {\@gls@label}{}{\@gls@counter}{\@glsnumberformat}%
          {\theglsentrycounter}}%
     \fi
   \else
     \@xp@gls@getcounterprefix{\theglsentrycounter}{\theHglsentrycounter}%
     \ifx\@glsxtr@record@setting\@glsxtr@record@setting@nameref
       \@glsxtr@do@nameref@record
          {\@gls@label}{\@glo@counterprefix}{\@gls@counter}%
          {\@glsnumberformat}{\theglsentrycounter}%
     \else
       \@bibgls@write@aux{}{\string\glsxtr@record
         {\@gls@label}{\@glo@counterprefix}{\@gls@counter}{\@glsnumberformat}%
         {\theglsentrycounter}}%
     \fi
   \fi
   \@glsxtr@counterrecordhook
}
\newcommand{\@glsxtr@ifnum@mmode}[2]{%
 \ifmmode
   \ifst@rred
    #2%
   \else
     \if@display #1\else #2\fi
   \fi
 \else
   #2%
 \fi
}
\newcommand*{\@glsxtr@do@nameref@record}[5]{%
  \gls@ifnotmeasuring
  {%
    \@bibgls@write@aux{}{\string\glsxtr@record@nameref
     {#1}{#2}{#3}{#4}{#5}%
     {\csuse{@currentlabelname}}{\csuse{@currentHref}}%
     {\theHglsentrycounter}}%
  }%
}
\newcommand*{\@@glsxtr@recordcounter}{%
  \@glsxtr@noop@recordcounter
}
\newcommand*{\@glsxtr@noop@recordcounter}[1]{%
  \PackageError{glossaries-extra}{\string\GlsXtrRecordCounter\space
   requires record=only or record=hybrid package option}{}%
}
\newcommand*{\@glsxtr@op@recordcounter}[1]{%
  \protected@eappto\@glsxtr@counterrecordhook{\noexpand\@glsxtr@docounterrecord{#1}}%
}
\newcommand*{\@glsxtr@recordsee}[2]{%
 \@@glsxtrwrglossmark
 \def\@gls@xref{#2}%
 \@onelevel@sanitize\@gls@xref
 \@bibgls@write@aux{}{\string\glsxtr@recordsee{#1}{\@gls@xref}}%
}
\newcommand{\printunsrtglossaryunit}{%
  \print@noop@unsrtglossaryunit
}
\newcommand*{\glsxtr@setup@record}{\let\@@do@wrglossary\glsxtr@@do@wrglossary}
\newcommand*{\glsxtr@indexonly@saveentrycounter}{%
 \ifKV@glslink@noindex
 \else
   \glsxtr@saveentrycounter
 \fi
}
\newcommand*{\glsxtr@addloclistfield}{%
 \key@ifundefined{glossentry}{loclist}%
 {%
   \define@key{glossentry}{loclist}{\def\@glo@loclist{##1}}%
   \appto\@gls@keymap{,{loclist}{loclist}}%
   \appto\@newglossaryentryprehook{\def\@glo@loclist{}}%
   \appto\@newglossaryentryposthook{%
     \gls@assign@field{}{\@glo@label}{loclist}{\@glo@loclist}%
   }%
   \glssetnoexpandfield{loclist}%
 }%
 {}%
 \key@ifundefined{glossentry}{location}%
 {%
   \define@key{glossentry}{location}{\def\@glo@location{##1}}%
   \appto\@gls@keymap{,{location}{location}}%
   \appto\@newglossaryentryprehook{\def\@glo@location{}}%
   \appto\@newglossaryentryposthook{%
     \gls@assign@field{}{\@glo@label}{location}{\@glo@location}%
   }%
   \glssetnoexpandfield{location}%
 }%
 {}%
 \key@ifundefined{glossentry}{group}%
 {%
   \define@key{glossentry}{group}{\def\@glo@group{##1}}%
   \appto\@gls@keymap{,{group}{group}}%
   \appto\@newglossaryentryprehook{\def\@glo@group{}}%
   \appto\@newglossaryentryposthook{%
     \gls@assign@field{}{\@glo@label}{group}{\@glo@group}%
   }%
   \glssetnoexpandfield{group}%
 }%
 {}%
}
\newcommand*{\@glsxtr@record@setting}{off}
\newcommand*{\@glsxtr@record@setting@alsoindex}{alsoindex}
\newcommand*{\@glsxtr@record@setting@only}{only}
\newcommand*{\@glsxtr@record@setting@nameref}{nameref}
\newcommand*{\@glsxtr@if@record@only}[2]{%
 \ifx\@glsxtr@record@setting\@glsxtr@record@setting@only
  #1%
 \else
  \ifx\@glsxtr@record@setting\@glsxtr@record@setting@nameref
    #1%
  \else
    #2%
  \fi
 \fi
}
\newcommand*{\@glsxtr@record@setting@off}{off}
\newcommand\@glsxtr@warn@hybrid@noprintgloss{%
  \ifdefstring{\@glo@types}{,}%
  {%
    \GlossariesExtraWarningNoLine{No glossaries have been defined}%
  }%
  {%
    \GlossariesExtraWarningNoLine{No \string\printglossary\space
      or \string\printglossaries\space
      found. ^^JYou have requested the hybrid setting
      record=\@glsxtr@record@setting\space which requires a
      combination of bib2gls (to fetch entries) and makeindex/xindy
      (to sort and collate the entries). If you only want to use
      bib2gls then change the option to record=only or record=nameref}%
  }%
}
\newcommand*{\@glsxtr@record@only@setup}{%
 \def\glsxtr@setup@record{%
   \@glsxtr@autoseeindexfalse
   \let\@do@seeglossary\@glsxtr@recordsee
   \let\@glsxtr@record\@@glsxtr@record
   \let\@@do@wrglossary\@glsxtr@do@record@wrglossary
   \let\@gls@saveentrycounter\relax
   \let\glsxtrundefaction\@glsxtr@warn@undefaction
   \let\glsxtr@warnonexistsordo\@glsxtr@warn@onexistsordo
   \glsxtr@addloclistfield
   \renewcommand*{\@glsxtr@autoindexcrossrefs}{}%
   \let\@@glsxtr@recordcounter\@glsxtr@op@recordcounter
   \def\printunsrtglossaryunit{\print@op@unsrtglossaryunit}%
   \def\glsxtrsetaliasnoindex{}%
   \ifdef\@gls@setupsort@none{\@gls@setupsort@none}{}%
   \def\glsxtrNoGlossaryWarning{\@glsxtr@record@noglossarywarning}%
   \RequirePackage{glossaries-extra-bib2gls}%
 }%
}
\define@choicekey{glossaries-extra.sty}{record}
 [\@glsxtr@record@setting\glsxtr@record@nr]%
 {off,only,alsoindex,nameref,hybrid}%
 [only]%
 {%
   \ifcase\glsxtr@record@nr\relax
     \def\glsxtr@setup@record{%
       \renewcommand*{\@do@seeglossary}{\@glsxtr@doseeglossary}%
       \renewcommand*{\@glsxtr@record}[3]{}%
       \let\@@do@wrglossary\glsxtr@@do@wrglossary
       \let\@gls@saveentrycounter\glsxtr@indexonly@saveentrycounter
       \let\glsxtrundefaction\@glsxtr@err@undefaction
       \let\glsxtr@warnonexistsordo\@gobble
       \let\@@glsxtr@recordcounter\@glsxtr@noop@recordcounter
       \def\printunsrtglossaryunit{\print@noop@unsrtglossaryunit}%
       \undef\glsxtrsetaliasnoindex
     }%
   \or
     \@glsxtr@record@only@setup
   \or
     \def\glsxtr@setup@record{%
       \renewcommand*{\@glsxtr@record@setting@alsoindex}{alsoindex}%
       \renewcommand*{\@do@seeglossary}{\@glsxtr@dosee@alsoindex@glossary}%
       \let\@glsxtr@record\@@glsxtr@record
       \let\@@do@wrglossary\glsxtr@do@alsoindex@wrglossary
       \let\@gls@saveentrycounter\glsxtr@indexonly@saveentrycounter
       \let\glsxtrundefaction\@glsxtr@warn@undefaction
       \let\glsxtr@warnonexistsordo\@glsxtr@warn@onexistsordo
       \glsxtr@addloclistfield
       \let\@@glsxtr@recordcounter\@glsxtr@op@recordcounter
       \def\printunsrtglossaryunit{\print@op@unsrtglossaryunit}%
       \undef\glsxtrsetaliasnoindex
     }%
   \or
     \@glsxtr@record@only@setup
     \ifundef\hyperlink
     {\GlossariesExtraWarning{You have requested record=nameref but
      the document doesn't support hyperlinks}}%
     {}%
   \or
     \def\glsxtr@setup@record{%
       \renewcommand*{\@glsxtr@record@setting@alsoindex}{hybrid}%
       \renewcommand*{\@do@seeglossary}{\@glsxtr@dosee@alsoindex@glossary}%
       \let\@glsxtr@record\@@glsxtr@record
       \let\@@do@wrglossary\glsxtr@do@alsoindex@wrglossary
       \let\@gls@saveentrycounter\glsxtr@indexonly@saveentrycounter
       \let\glsxtrundefaction\@glsxtr@warn@undefaction
       \let\glsxtr@warnonexistsordo\@glsxtr@warn@onexistsordo
       \glsxtr@addloclistfield
       \let\@@glsxtr@recordcounter\@glsxtr@op@recordcounter
       \def\printunsrtglossaryunit{\print@op@unsrtglossaryunit}%
       \undef\glsxtrsetaliasnoindex
     }%
   \fi
 }
\define@key{glossaries-extra.sty}{bibglsaux}{%
  \glsxtrsetbibglsaux{#1}%
}
\newcommand{\glsxtrsetbibglsaux}[1]{%
 \renewcommand{\@glsxtr@setup@bibglsaux}{\@@glsxtr@setup@bibglsaux{#1}}%
}
\newcommand{\@glsxtr@setup@bibglsaux}{%
 \renewcommand{\glsxtrsetbibglsaux}[1]{%
   \@@glsxtr@setup@bibglsaux{##1}%
 }%
}
\AtBeginDocument{\@glsxtr@setup@bibglsaux}
\newcommand{\@@glsxtr@setup@bibglsaux}[1]{%
  \ifstrempty{#1}%
  {\renewcommand{\@bibgls@write@aux}{\protected@write\@auxout}}%
  {\@set@bibgls@write@aux{#1.aux}}%
}
\newcommand{\@bibgls@write@aux}{\protected@write\@auxout}
\newcommand{\@set@bibgls@write@aux}[1]{%
  \protected@write\@auxout{}%
   {\string\providecommand{\string\@bibgls@input}[1]{}}%
  \protected@write\@auxout{}{\string\@bibgls@input{#1}}%
  \global\newwrite\@bibgls@auxout
  \openout\@bibgls@auxout=#1
  \AtEndDocument{\closeout\@bibgls@auxout}%
  \gdef\@bibgls@write@aux{\protected@write\@bibgls@auxout}%
  \gdef\@set@bibgls@write@aux##1{\GlossariesExtraWarning{repeated
    invocation of bibglsaux option ignored}}%
}
\newcommand*{\@glsxtr@docdefval}{0}
\newcommand*{\if@glsxtrdocdef}{\ifnum\@glsxtr@docdefval>0 }
\newcommand*{\@glsxtrdocdeftrue}{\def\@glsxtr@docdefval{1}}
\newcommand*{\@glsxtrdocdeffalse}{\def\@glsxtr@docdefval{0}}
\define@choicekey{glossaries-extra.sty}{docdef}
 [\@glsxtr@docdefsetting\@glsxtr@docdefval]%
 {false,true,restricted,atom}[true]%
{%
  \ifnum\@glsxtr@docdefval>1\relax
    \renewcommand*{\@glsdoifexistsorwarn}{\glsdoifexists}%
  \else
    \renewcommand*{\@glsdoifexistsorwarn}{\glsdoifexistsorwarn}%
  \fi
}
\newcommand*{\if@glsxtrdocdefrestricted}{\ifnum\@glsxtr@docdefval>1 }
\newcommand*{\@glsdoifexistsorwarn}{\glsdoifexistsorwarn}
\define@boolkey{glossaries-extra.sty}[@glsxtr]{indexcrossrefs}[true]{%
 \if@glsxtrindexcrossrefs
 \else
  \renewcommand*{\@glsxtr@autoindexcrossrefs}{}%
 \fi
}
\@glsxtrindexcrossrefsfalse
\newcommand*{\@glsxtr@autoindexcrossrefs}{\@glsxtrindexcrossrefstrue}
\define@boolkey{glossaries-extra.sty}[@glsxtr@]{autoseeindex}[true]{%
}
\@glsxtr@autoseeindextrue
\define@boolkey{glossaries-extra.sty}[@glsxtr@]{equations}[true]{%
}
\@glsxtr@equationsfalse
\let\glsxtr@float\@float
\let\glsxtr@dblfloat\@dblfloat
\define@boolkey{glossaries-extra.sty}[@glsxtr@]{floats}[true]{%
  \if@glsxtr@floats
   \renewcommand*{\@float}[1]{\renewcommand{\glscounter}{##1}\glsxtr@float{##1}}%
   \renewcommand*{\@dblfloat}[1]{\renewcommand{\glscounter}{##1}\glsxtr@dblfloat{##1}}%
  \else
   \let\@float\glsxtr@float
   \let\@dblfloat\glsxtr@dblfloat
  \fi
}
\@glsxtr@floatsfalse
\newcommand*{\GlossariesExtraWarning}[1]{\PackageWarning{glossaries-extra}{#1}}
\newcommand*{\GlossariesExtraWarningNoLine}[1]{%
 \PackageWarningNoLine{glossaries-extra}{#1}}
\@glsxtr@declareoption{nowarn}{%
  \let\GlossariesExtraWarning\@gobble
  \let\GlossariesExtraWarningNoLine\@gobble
  \glsxtr@dooption{nowarn}%
}
\newcommand*{\@glsxtr@defpostpunc}{}
\@glsxtr@declareoption{postdot}{%
  \glsxtr@dooption{nopostdot=false}%
  \renewcommand*{\@glsxtr@defpostpunc}{%
    \renewcommand*{\glspostdescription}{%
      \ifglsnopostdot\else.\spacefactor\sfcode`\. \fi}%
  }%
}

\define@choicekey{glossaries-extra.sty}{nopostdot}{true,false}[true]{%
  \glsxtr@dooption{nopostdot=#1}%
  \renewcommand*{\@glsxtr@defpostpunc}{%
    \renewcommand*{\glspostdescription}{%
      \ifglsnopostdot\else.\spacefactor\sfcode`\. \fi}%
  }%
}
\define@key{glossaries-extra.sty}{postpunc}{%
  \glsxtr@dooption{nopostdot=false}%
  \ifstrequal{#1}{dot}%
  {%
    \renewcommand*{\@glsxtr@defpostpunc}{%
      \renewcommand*{\glspostdescription}{.\spacefactor\sfcode`\. }%
    }%
  }%
  {%
    \ifstrequal{#1}{comma}%
    {%
      \renewcommand*{\@glsxtr@defpostpunc}{%
        \renewcommand*{\glspostdescription}{,}%
      }%
    }%
    {%
      \ifstrequal{#1}{none}%
      {%
        \glsxtr@dooption{nopostdot=true}%
        \renewcommand*{\@glsxtr@defpostpunc}{%
          \renewcommand*{\glspostdescription}{}%
        }%
      }%
      {%
        \renewcommand*{\@glsxtr@defpostpunc}{%
          \renewcommand*{\glspostdescription}{#1}%
        }%
      }%
    }%
  }%
}
\newcommand*{\glsxtrabbrvtype}{\glsdefaulttype}
\newcommand*{\@glsxtr@abbreviationsdef}{}
\@ifpackageloaded{babel}%
{\providecommand{\abbreviationsname}{\acronymname}}%
{\providecommand{\abbreviationsname}{Abbreviations}}%
\newcommand*{\@glsxtr@doabbreviationsdef}{%
  \newglossary[glg-abr]{abbreviations}{gls-abr}{glo-abr}{\abbreviationsname}%
  \renewcommand*{\glsxtrabbrvtype}{abbreviations}%
  \newcommand*{\printabbreviations}[1][]{%
    \printglossary[type=\glsxtrabbrvtype,##1]%
  }%
  \disable@keys{glossaries-extra.sty}{abbreviations}%
  \ifglsacronym
  \else
    \renewcommand*{\acronymtype}{\glsxtrabbrvtype}%
  \fi
}%
\@glsxtr@declareoption{abbreviations}{%
  \let\@glsxtr@abbreviationsdef\@glsxtr@doabbreviationsdef
}
\newcommand{\shortcut@gls}{\cgls}
\newcommand{\shortcut@glspl}{\cglspl}
\newcommand{\shortcut@Gls}{\cGls}
\newcommand{\shortcut@Glspl}{\cGlspl}
\newcommand{\shortcut@GLS}{\cGLS}
\newcommand{\shortcut@GLSpl}{\cGLSpl}
\newcommand*{\GlsXtrDefineAbbreviationShortcuts}{%
  \newcommand*{\ab}{\shortcut@gls}%
  \newcommand*{\abp}{\shortcut@glspl}%
  \newcommand*{\as}{\glsxtrshort}%
  \newcommand*{\asp}{\glsxtrshortpl}%
  \newcommand*{\al}{\glsxtrlong}%
  \newcommand*{\alp}{\glsxtrlongpl}%
  \newcommand*{\af}{\glsxtrfull}%
  \newcommand*{\afp}{\glsxtrfullpl}%
  \newcommand*{\Ab}{\shortcut@Gls}%
  \newcommand*{\Abp}{\shortcut@Glspl}%
  \newcommand*{\As}{\Glsxtrshort}%
  \newcommand*{\Asp}{\Glsxtrshortpl}%
  \newcommand*{\Al}{\Glsxtrlong}%
  \newcommand*{\Alp}{\Glsxtrlongpl}%
  \newcommand*{\Af}{\Glsxtrfull}%
  \newcommand*{\Afp}{\Glsxtrfullpl}%
  \newcommand*{\AB}{\shortcut@GLS}%
  \newcommand*{\ABP}{\shortcut@GLSpl}%
  \newcommand*{\AS}{\GLSxtrshort}%
  \newcommand*{\ASP}{\GLSxtrshortpl}%
  \newcommand*{\AL}{\GLSxtrlong}%
  \newcommand*{\ALP}{\GLSxtrlongpl}%
  \newcommand*{\AF}{\GLSxtrfull}%
  \newcommand*{\AFP}{\GLSxtrfullpl}%
  \glsmfuaddmap{\ab}{\Ab}%
  \glsmfublocker{\AB}%
  \glsmfuaddmap{\abp}{\Abp}%
  \glsmfublocker{\ABP}%
  \glsmfuaddmap{\as}{\As}%
  \glsmfublocker{\AS}%
  \glsmfuaddmap{\asp}{\Asp}%
  \glsmfublocker{\ASP}%
  \glsmfuaddmap{\al}{\Al}%
  \glsmfublocker{\AL}%
  \glsmfuaddmap{\alp}{\Alp}%
  \glsmfublocker{\ALP}%
  \glsmfuaddmap{\af}{\Af}%
  \glsmfublocker{\AF}%
  \glsmfuaddmap{\afp}{\Afp}%
  \glsmfublocker{\AFP}%
  \providecommand*{\newabbr}{\newabbreviation}%
  \let\GlsXtrDefineAbbreviationShortcuts\relax
}
\newcommand*{\GlsXtrDefineAcShortcuts}{%
  \newcommand*{\ac}{\shortcut@gls}%
  \newcommand*{\acp}{\shortcut@glspl}%
  \newcommand*{\acs}{\glsxtrshort}%
  \newcommand*{\acsp}{\glsxtrshortpl}%
  \newcommand*{\acl}{\glsxtrlong}%
  \newcommand*{\aclp}{\glsxtrlongpl}%
  \newcommand*{\acf}{\glsxtrfull}%
  \newcommand*{\acfp}{\glsxtrfullpl}%
  \newcommand*{\Ac}{\shortcut@Gls}%
  \newcommand*{\Acp}{\shortcut@Glspl}%
  \newcommand*{\Acs}{\Glsxtrshort}%
  \newcommand*{\Acsp}{\Glsxtrshortpl}%
  \newcommand*{\Acl}{\Glsxtrlong}%
  \newcommand*{\Aclp}{\Glsxtrlongpl}%
  \newcommand*{\Acf}{\Glsxtrfull}%
  \newcommand*{\Acfp}{\Glsxtrfullpl}%
  \newcommand*{\AC}{\shortcut@GLS}%
  \newcommand*{\ACP}{\shortcut@GLSpl}%
  \newcommand*{\ACS}{\GLSxtrshort}%
  \newcommand*{\ACSP}{\GLSxtrshortpl}%
  \newcommand*{\ACL}{\GLSxtrlong}%
  \newcommand*{\ACLP}{\GLSxtrlongpl}%
  \newcommand*{\ACF}{\GLSxtrfull}%
  \newcommand*{\ACFP}{\GLSxtrfullpl}%
  \glsmfuaddmap{\ac}{\Ac}%
  \glsmfublocker{\AC}%
  \glsmfuaddmap{\acp}{\Acp}%
  \glsmfublocker{\ACP}%
  \glsmfuaddmap{\acs}{\Acs}%
  \glsmfublocker{\ACS}%
  \glsmfuaddmap{\acsp}{\Acsp}%
  \glsmfublocker{\ACSP}%
  \glsmfuaddmap{\acl}{\Acl}%
  \glsmfublocker{\ACL}%
  \glsmfuaddmap{\aclp}{\Aclp}%
  \glsmfublocker{\ACLP}%
  \glsmfuaddmap{\acf}{\Acf}%
  \glsmfublocker{\ACF}%
  \glsmfuaddmap{\acfp}{\Acfp}%
  \glsmfublocker{\ACFP}%
  \providecommand*{\newabbr}{\newabbreviation}%
  \let\GlsXtrDefineAcShortcuts\relax
}
\newcommand*{\GlsXtrDefineOtherShortcuts}{%
  \newcommand*{\newentry}{\newglossaryentry}%
  \ifdef\printsymbols
  {%
    \newcommand*{\newsym}{\glsxtrnewsymbol}%
  }{}%
  \ifdef\printnumbers
  {%
    \newcommand*{\newnum}{\glsxtrnewnumber}%
  }{}%
  \let\GlsXtrDefineOtherShortcuts\relax
}
\newcommand*{\@glsxtr@setupshortcuts}{}
\newcommand*{\@glsxtr@shortcutsval}{\ifglsacrshortcuts acro\else none\fi}%
\define@choicekey{glossaries-extra.sty}{shortcuts}%
 [\@glsxtr@shortcutsval\@glsxtr@shortcutsnr]%
 {acronyms,acro,abbreviations,abbr,other,all,true,ac,acother,abother,none,false}[true]{%
   \ifcase\@glsxtr@shortcutsnr\relax % acronyms
     \renewcommand*{\@glsxtr@setupshortcuts}{%
       \glsacrshortcutstrue
       \DefineAcronymSynonyms
     }%
   \or % acro
     \renewcommand*{\@glsxtr@setupshortcuts}{%
       \glsacrshortcutstrue
       \DefineAcronymSynonyms
     }%
   \or % abbreviations
     \renewcommand*{\@glsxtr@setupshortcuts}{%
       \GlsXtrDefineAbbreviationShortcuts
     }%
   \or % abbr
     \renewcommand*{\@glsxtr@setupshortcuts}{%
       \GlsXtrDefineAbbreviationShortcuts
     }%
   \or % other
     \renewcommand*{\@glsxtr@setupshortcuts}{%
       \GlsXtrDefineOtherShortcuts
     }%
   \or % all
     \renewcommand*{\@glsxtr@setupshortcuts}{%
       \glsacrshortcutstrue
       \GlsXtrDefineAcShortcuts
       \GlsXtrDefineAbbreviationShortcuts
       \GlsXtrDefineOtherShortcuts
     }%
   \or % true
     \renewcommand*{\@glsxtr@setupshortcuts}{%
       \glsacrshortcutstrue
       \GlsXtrDefineAcShortcuts
       \GlsXtrDefineAbbreviationShortcuts
       \GlsXtrDefineOtherShortcuts
     }%
   \or % ac
     \renewcommand*{\@glsxtr@setupshortcuts}{%
       \glsacrshortcutstrue
       \GlsXtrDefineAcShortcuts
     }%
   \or % acother
     \renewcommand*{\@glsxtr@setupshortcuts}{%
       \glsacrshortcutstrue
       \GlsXtrDefineAcShortcuts
       \GlsXtrDefineOtherShortcuts
     }%
   \or % abother
     \renewcommand*{\@glsxtr@setupshortcuts}{%
       \glsacrshortcutstrue
       \GlsXtrDefineAbbreviationShortcuts
       \GlsXtrDefineOtherShortcuts
     }%
   \else % none, false
     \renewcommand*{\@glsxtr@setupshortcuts}{}%
   \fi
 }
\newcommand*{\@glsxtr@doaccsupp}{}
\@glsxtr@declareoption{accsupp}{%
 \renewcommand*{\@glsxtr@doaccsupp}{\RequirePackage{glossaries-accsupp}}}
\newcommand*{\@glsxtr@doloadprefix}{}
\@glsxtr@declareoption{prefix}{%
 \renewcommand*{\@glsxtr@doloadprefix}{\RequirePackage{glossaries-prefix}}}
\newcommand{\glsxtrNoGlossaryWarning}[1]{%
  \GlossariesExtraWarning{Glossary `#1' is missing}%
  \@glsxtr@defaultnoglossarywarning{#1}%
}
\define@choicekey{glossaries-extra.sty}{nomissingglstext}
 [\@glsxtr@nomissingglstextval\@glsxtr@nomissingglstextnr]%
 {true,false}[true]{%
   \ifcase\@glsxtr@nomissingglstextnr\relax % true
     \renewcommand{\glsxtrNoGlossaryWarning}[1]{\null}%
   \else % false
     \renewcommand{\glsxtrNoGlossaryWarning}[1]{%
       \@glsxtr@defaultnoglossarywarning{#1}%
     }%
   \fi
 }
\newcommand*{\@glsxtr@redefstyles}{}
\define@key{glossaries-extra.sty}{stylemods}[default]{%
  \ifstrequal{#1}{default}%
  {%
    \renewcommand*{\@glsxtr@redefstyles}{%
      \RequirePackage{glossaries-extra-stylemods}}%
  }%
  {%
    \ifstrequal{#1}{all}%
    {%
      \renewcommand*{\@glsxtr@redefstyles}{%
        \PassOptionsToPackage{all}{glossaries-extra-stylemods}%
        \RequirePackage{glossaries-extra-stylemods}%
      }%
    }%
    {%
      \renewcommand*{\@glsxtr@redefstyles}{}%
      \@for\@glsxtr@tmp:=#1\do{%
        \IfFileExists{glossary-\@glsxtr@tmp.sty}%
        {%
          \eappto\@glsxtr@redefstyles{%
            \noexpand\RequirePackage{glossary-\@glsxtr@tmp}}%
        }%
        {%
           \PackageError{glossaries-extra}%
             {Glossaries style package `glossary-\@glsxtr@tmp.sty'
              doesn't exist (did you mean to use the `style' key?)}%
             {The list of values (#1) in the `stylemods' key should
              match the glossary-xxx.sty files provided with
              glossaries.sty}%
        }%
      }%
      \appto\@glsxtr@redefstyles{\RequirePackage{glossaries-extra-stylemods}}%
   }
  }%
}
\newcommand*{\@glsxtr@do@style}{}
\define@key{glossaries-extra.sty}{style}{%
 \renewcommand*{\@glsxtr@do@style}{%
   \setkeys{glossaries.sty}{style={#1}}%
   \setglossarystyle{#1}%
 }%
}
\newcommand*{\glsxtr@inc@wrglossaryctr}[1]{}
\newcommand*{\GlsXtrInternalLocationHyperlink}[3]{%
  \glsxtrhyperlink{#1#2#3}{#3}%
}
\newcommand*{\@glsxtr@wrglossary@locationhyperlink}[3]{%
  \pageref{wrglossary.#3}%
}
\@glsxtr@declareoption{indexcounter}{%
  \glsxtr@dooption{counter=wrglossary}%
  \ifundef\c@wrglossary
  {%
    \newcounter{wrglossary}%
    \renewcommand{\thewrglossary}{\arabic{wrglossary}}%
  }%
  {}%
  \renewcommand*{\glsxtr@inc@wrglossaryctr}[1]{%
    \ifdefstring\@gls@counter{wrglossary}%
    {%
      \refstepcounter{wrglossary}%
      \label{wrglossary.\thewrglossary}%
      \@@glsxtrwrglosscountermark{\thewrglossary}%
    }%
    {}%
  }%
  \renewcommand*{\GlsXtrInternalLocationHyperlink}[3]{%
    \ifdefstring\glsentrycounter{wrglossary}%
    {%
      \@glsxtr@wrglossary@locationhyperlink{##1}{##2}{##3}%
    }%
    {\glsxtrhyperlink{##1##2##3}{##3}}%
  }%
}
\newcommand*{\@glsxtrwrglossmark}{}
\newcommand*{\@@glsxtrwrglossmark}{}
\AtBeginDocument{\renewcommand*{\@@glsxtrwrglossmark}{\@glsxtrwrglossmark}}
\newcommand*{\glsxtrwrglossmark}{\ensuremath{\cdot}}
\newcommand*{\@glsxtrwrglosscountermark}[1]{}
\newcommand*{\@@glsxtrwrglosscountermark}[1]{}
\AtBeginDocument{\renewcommand*{\@@glsxtrwrglosscountermark}{\@glsxtrwrglosscountermark}}
\newcommand*{\glsxtrwrglosscountermark}[1]{\glsshowtargetfonttext{[#1]}}
\newcommand\@glsxtr@doshowtarget[2]{#2}
\newcommand*{\glsxtrundefdebug}[1]{}
\newcommand*{\@glsxtrundefdebug}[1]{%
 \if@gls@debug \glsshowtargetfonttext{[#1]}\fi
}
\define@choicekey{glossaries-extra.sty}{debug}
 [\@glsxtr@debugval\@glsxtr@debugnr]%
 {true,false,showtargets,showwrgloss,all,showaccsupp}[true]{%
   \ifcase\@glsxtr@debugnr\relax % true
    \glsxtr@dooption{debug=true}%
    \renewcommand*{\@glsxtrwrglossmark}{}%
    \renewcommand*{\@glsxtrwrglosscountermark}[1]{}%
   \or % false
    \glsxtr@dooption{debug=false}%
    \renewcommand*{\@glsxtrwrglossmark}{}%
    \renewcommand*{\@glsxtrwrglosscountermark}[1]{}%
    \let\@glsxtr@doshowtarget\@secondoftwo
   \or % showtargets
    \glsxtr@dooption{debug=showtargets}%
    \def\@glsxtr@doshowtarget{\@glsxtrshowtargetleft}%
   \or % showwrgloss
    \glsxtr@dooption{debug=true}%
    \renewcommand*{\@glsxtrwrglossmark}{\glsxtrwrglossmark}%
    \renewcommand*{\@glsxtrwrglosscountermark}{\glsxtrwrglosscountermark}%
   \or % all
    \glsxtr@dooption{debug=true,debug=showaccsupp}%
    % debug=showwrgloss:
    \renewcommand*{\@glsxtrwrglossmark}{\glsxtrwrglossmark}%
    \renewcommand*{\@glsxtrwrglosscountermark}{\glsxtrwrglosscountermark}%
    % debug=showtargets:
    \def\@glsxtr@doshowtarget{\@glsxtrshowtargetleft}%
   \or % showaccsupp
    \glsxtr@dooption{debug=showaccsupp}%
   \fi
 }
\newcommand*{\glsxtrshowtargetouter}{\glsshowtargetouter}
\newcommand*{\glsxtrshowtargetinner}[1]{\glsshowtargetinner{#1}}
\newcommand{\@glsxtrshowtargetleft}[2]{\@glsshowtarget{#1}#2\@glsxtrshowtargetmark}%
\newcommand{\@glsxtrshowtargetright}[2]{\@glsxtrshowtargetmark#2\@glsshowtarget{#1}}%
\newcommand{\@glsxtrshowtargetmark}{}%
\define@choicekey{glossaries-extra.sty}{showtargets}
 [\@glsxtr@showtargetsval\@glsxtr@showtargetsnr]%
 {left,right,innerleft,innerright,annoteleft,annoteright}%
 {%
   \glsxtr@dooption{debug=showtargets}%
   \ifcase\@glsxtr@showtargetsnr\relax
     \def\@glsxtr@doshowtarget{\@glsxtrshowtargetleft}%
     \def\glsxtrshowtargetouter{\glsshowtargetouter}%
     \def\glsxtrshowtargetinner{\glsshowtargetinner}%
     \let\@glsxtrshowtargetmark\empty
   \or
     \def\@glsxtr@doshowtarget{\@glsxtrshowtargetright}%
     \def\glsxtrshowtargetouter{\glsshowtargetouter}%
     \def\glsxtrshowtargetinner{\glsshowtargetinner}%
     \let\@glsxtrshowtargetmark\empty
   \or
     \def\@glsxtr@doshowtarget{\@glsxtrshowtargetleft}%
     \def\glsxtrshowtargetouter{\glsxtrshowtargetinner}%
     \def\glsxtrshowtargetinner{\glsshowtargetinnersymleft}%
     \let\@glsxtrshowtargetmark\empty
   \or
     \def\@glsxtr@doshowtarget{\@glsxtrshowtargetright}%
     \def\glsxtrshowtargetouter{\glsxtrshowtargetinner}%
     \def\glsxtrshowtargetinner{\glsshowtargetinnersymright}%
     \let\@glsxtrshowtargetmark\empty
   \or
     \def\@glsxtr@doshowtarget{\@glsxtrshowtargetleft}%
     \def\glsxtrshowtargetouter{\glsxtrshowtargetinner}%
     \def\glsxtrshowtargetinner{\glsshowtargetinnersymleft}%
     \def\@glsxtrshowtargetmark{\@glsshowtargetmarkfmt\glsxtrshowtargetsymbolright}%
   \or
     \def\@glsxtr@doshowtarget{\@glsxtrshowtargetright}%
     \def\glsxtrshowtargetouter{\glsxtrshowtargetinner}%
     \def\glsxtrshowtargetinner{\glsshowtargetinnersymright}%
     \def\@glsxtrshowtargetmark{\@glsshowtargetmarkfmt\glsxtrshowtargetsymbolleft}%
   \fi
 }
\newcommand*{\glsxtr@processunknownoptions}{}
\@ifpackageloaded{glossaries}
{%
  \DeclareOptionX*{%
   \edef\glsxtr@processunknownoptions{%
    \noexpand\setupglossaries{\expandonce\CurrentOption}}}
}
{%
  \DeclareOptionX*{%
   \expandafter\glsxtr@dooption\expandafter{\CurrentOption}}
}
\ProcessOptionsX
\RequirePackage{glossaries}
\glsxtr@processunknownoptions
\@glsxtr@doaccsupp
\@glsxtr@doloadprefix
\@glsxtr@defpostpunc
\let\@glsxtr@org@indexingsetting\glsindexingsetting
\providecommand{\glsindexingsetting}{\ifglsxindy xindy\else makeindex\fi}
\ifx\@glsxtr@org@indexingsetting\glsindexingsetting
  \renewcommand{\glsindexingsetting}{%
   \@glsxtr@if@record@only{bib2gls}{\ifglsxindy xindy\else makeindex\fi}%
  }
\else
 \@glsxtr@if@record@only{\renewcommand{\glsindexingsetting}{bib2gls}}{}%
\fi
\providecommand{\glssentencecase}[1]{\makefirstuc{#1}}
\providecommand{\glslowercase}[1]{\MakeTextLowercase{#1}}
\providecommand{\glsuppercase}[1]{\mfirstucMakeUppercase{#1}}
\providecommand{\@Glsentryfield}[2]{%
  \glstexorpdfstring{\@Gls@entry@field{#1}{#2}}%
  {\MFUsentencecase{\@gls@entry@field{#1}{#2}}}%
}
\ifdef\glstexorpdfstring
{}
{
  \ifdef\texorpdfstring
  {\newcommand{\glstexorpdfstring}{\texorpdfstring}}
  {\newcommand{\glstexorpdfstring}[2]{#1}}
}
\let\@glsxtr@org@MakeUppercase\MakeUppercase
\providecommand{\glsmeasurewidth}[2]{%
  \settowidth{#1}{#2}%
}
\ExplSyntaxOn
\ifdef\MFUsentencecase
{%
  \providecommand{\glsmfuexcl}[1]{\MFUexcl{#1}}
  \providecommand{\glsmfublocker}[1]{\MFUblocker{#1}}
  \providecommand{\glsmfuaddmap}[2]{\MFUaddmap{#1}{#2}}
  \newcommand{\@glsxtr@saveMakeUppercase}{}
  \newcommand{\@glsxtr@restoreMakeUppercase}{}
  \newcommand{\@glsxtr@assignMakeUppercase}{}
}
{
  \providecommand{\MFUsentencecase}[1]{\text_titlecase_first:n{#1}}
  \providecommand{\glsmfuexcl}[1]{
    \tl_if_in:NnF \l_text_case_exclude_arg_tl {#1}
     {
       \tl_put_right:Nn \l_text_case_exclude_arg_tl {#1}
     }
  }
  \providecommand{\glsmfublocker}[1]{\glsmfuexcl{#1}}
  \providecommand{\glsmfuaddmap}[2]{\glsmfuexcl{#1}\glsmfublocker{#2}}
  \newcommand{\@glsxtr@saveMakeUppercase}{%
    \let\@glsxtr@org@MakeUppercase\MakeUppercase
  }
  \newcommand{\@glsxtr@restoreMakeUppercase}{%
    \let\MakeUppercase\@glsxtr@org@MakeUppercase
  }
  \newcommand{\@glsxtr@assignMakeUppercase}{%
    \let\MakeUppercase\MakeTextUppercase
  }
}
\ExplSyntaxOff
\def\glsdoshowtarget{\@glsxtr@doshowtarget}
\newcommand{\glsxtrshowtargetsymbolright}{%
 \ifmmode \mbox{\tiny$\triangleleft$}\else {\tiny$\triangleleft$}\fi
}
\newcommand{\glsxtrshowtargetsymbolleft}{%
 \ifmmode \mbox{\tiny$\triangleright$}\else {\tiny$\triangleright$}\fi
}
\providecommand*{\glsshowtargetinner}[1]{\glsshowtargetfonttext{[#1]}}
\providecommand*{\glsshowtargetfont}{\ttfamily\footnotesize}
\providecommand*{\glsshowtargetfonttext}[1]{%
 \ifmmode \nfss@text{\glsshowtargetfont #1}\else {\glsshowtargetfont #1}\fi
}
\newcommand*{\glsshowtargetinnersymleft}[1]{%
 \glsshowtargetinner{#1}\allowbreak\glsxtrshowtargetsymbolleft}
\newcommand*{\glsshowtargetinnersymright}[1]{%
 \glsxtrshowtargetsymbolright\allowbreak\glsshowtargetinner{#1}}
\providecommand*{\glsshowtargetouter}[1]{%
 \glsshowtargetsymbol\marginpar{\glsshowtargetsymbol\glsshowtargetfont #1}}
\providecommand*{\@glsshowtarget}[1]{}
\def\glsshowtarget#1{%
 \glsxtrtitleorpdforheading
 {%
   \ifmmode
     \nfss@text{\glsxtrshowtargetinner{#1}}%
   \else
     \ifinner
       \glsxtrshowtargetinner{#1}%
     \else
       \glsxtrshowtargetouter{#1}%
     \fi
   \fi
 }%
 {[#1]}%
 {{\protect\glsshowtargetinner{#1}}}%
}
\newcommand*{\@glsshowtargetmarkfmt}[1]{%
 \glsxtrtitleorpdforheading
 {%
   \ifmmode \nfss@text{#1}\else #1\fi
 }%
 {}%
 {\ifmmode \nfss@text{#1}\else #1\fi}%
}
\let\@glsxtr@org@doseeglossary\@do@seeglossary
\newcommand*{\@glsxtr@doseeglossary}[2]{%
  \glsdoifexists{#1}%
  {%
    \@@glsxtrwrglossmark
    \@glsxtr@org@doseeglossary{#1}{#2}%
  }%
}
\newcommand*{\@glsxtr@dosee@alsoindex@glossary}[2]{%
  \@glsxtr@recordsee{#1}{#2}%
  \@glsxtr@doseeglossary{#1}{#2}%
}
\let\@glsxtr@org@gloautosee\@glo@autosee
\if@glsxtr@autoseeindex
\else
  \ifdef\@glsxtr@org@gloautosee
  {}%
  {\PackageError{glossaries-extra}{`autoseeindex=false' package
   option requires at least v4.30 of glossaries.sty}%
   {You need to update the glossaries.sty package}%
  }
\fi
\ifdef\@glo@autosee
{%
  \renewcommand*{\@glo@autosee}{%
    \if@glsxtr@autoseeindex\@glsxtr@org@gloautosee\fi}%
}%
{}
\renewcommand*{\gls@checkseeallowed}{%
 \if@glsxtr@autoseeindex\@gls@see@noindex\fi
}
\@glsxtr@abbreviationsdef
\let\@glsxtr@abbreviationsdef\relax
\@glsxtr@setupshortcuts
\@glsxtr@redef@forglsentries
\renewcommand{\glsxtr@dooption}[1]{\setupglossaries{#1}}%
\disable@keys{glossaries-extra.sty}{accsupp}
\newcommand*{\glossariesextrasetup}[1]{%
  \let\glsxtr@setup@record\relax
  \let\@glsxtr@setupshortcuts\relax
  \let\@glsxtr@redef@forglsentries\relax
  \let\@glsxtr@doloadprefix\relax
  \setkeys{glossaries-extra.sty}{#1}%
  \@glsxtr@abbreviationsdef
  \let\@glsxtr@abbreviationsdef\relax
  \@glsxtr@setupshortcuts
  \glsxtr@setup@record
  \@glsxtr@redef@forglsentries
  \@glsxtr@doloadprefix
}
\let\glsxtr@org@@do@wrglossary\@@do@wrglossary
\newcommand*{\glsxtr@@do@wrglossary}[1]{%
 \@@glsxtrwrglossmark
 \glsxtr@inc@wrglossaryctr{#1}%
 \glsxtr@org@@do@wrglossary{#1}%
}
\let\glsxtr@saveentrycounter\@gls@saveentrycounter
\let\@gls@saveentrycounter\glsxtr@indexonly@saveentrycounter
\providecommand*\@xp@gls@getcounterprefix[2]{%
 \bgroup
   \glswrglossdisableanchorcmds
   \protected@edef\@do@gls@getcounterprefix{%
     \noexpand\egroup
     \noexpand\@gls@getcounterprefix{#1}{#2}%
 }%
 \@do@gls@getcounterprefix
}
\providecommand{\glswrglossdisableanchorcmds}{\let\glstexorpdfstring\@secondoftwo}
\renewcommand*\@gls@getcounterprefix[2]{%
  \def\@gls@thisloc{#1}\def\@gls@thisHloc{#2}%
  \ifx\@gls@thisloc\@gls@thisHloc
    \def\@glo@counterprefix{}%
  \else
    \def\@gls@get@counterprefix##1.#1##2\end@getprefix{%
      \def\@glo@tmp{##2}%
      \ifx\@glo@tmp\@empty
        \def\@glo@counterprefix{}%
      \else
        \def\@glo@counterprefix{##1}%
      \fi
    }%
    \@gls@get@counterprefix#2.#1\end@getprefix
    \ifx\@glo@counterprefix\@empty
      \ifx\@glsxtr@record@setting\@glsxtr@record@setting@nameref
      \else
        \GlossariesExtraWarning{Hyper target `#2' can't be formed by
         prefixing^^Jlocation `#1'. You need to modify the
         definition of \string\theH\@gls@counter^^Jotherwise you
         will get the warning: "`name{\@gls@counter.#1}' has been^^J
         referenced but does not exist"%
         \ifx\@glsxtr@record@setting\@glsxtr@record@setting@only
         . You may want to consider using record=nameref instead%
         \fi}%
      \fi
    \fi
  \fi
}
\newcommand*{\@glsxtrdialecthook}{}
\glsxtr@setup@record
\AtBeginDocument{%
  \disable@keys{glossaries-extra.sty}{abbreviations,docdef,record}%
  \def\glsxtrundefdebug{\@glsxtrundefdebug}%
  \def\@glsxtrundeftag{\glsxtrundeftag}%
}
\newcommand*{\GlsXtrIfUnusedOrUndefined}[3]{%
  \ifglsentryexists{#1}%
  {\ifbool{glo@\glsdetoklabel{#1}@flag}{#3}{#2}}%
  {#2}%
}
\ifdef\s@ifglossaryexists
{}
{
  \renewcommand{\ifglossaryexists}{%
    \@ifstar\s@ifglossaryexists\@ifglossaryexists
  }
  \newcommand{\@ifglossaryexists}[3]{%
    \ifcsundef{@glotype@#1@out}{#3}{#2}%
  }
  \newcommand{\s@ifglossaryexists}[3]{%
    \ifcsundef{glolist@#1}{#3}{#2}%
  }
}
\newcommand{\glsxtrifemptyglossary}[3]{%
  \ifcsdef{glolist@#1}%
  {%
    \ifcsstring{glolist@#1}{,}{#2}{#3}%
  }%
  {%
    \glsxtrundefaction{Glossary type `#1' doesn't exist}{}%
    #2%
  }%
}
\newcommand*{\GlsXtrIfInGlossary}[4]{%
  \ifcsdef{glolist@#2}%
  {%
    \protected@edef\@glsxtr@tmp{#1}%
    \letcs\@glsxtr@tmplist{glolist@#2}%
    \expandafter\DTLifinlist\expandafter{\@glsxtr@tmp}{\@glsxtr@tmplist}%
    {#3}{#4}%
  }%
  {%
   \glsxtrundefaction{Glossary type `#1' doesn't exist}{}%
   #4%
  }%
}
\newcommand*{\glsxtrifkeydefined}[3]{%
  \key@ifundefined{glossentry}{#1}{#3}{#2}%
}
\newcommand*{\glsxtrprovidestoragekey}{%
  \@ifstar\@sglsxtr@provide@storagekey\@glsxtr@provide@storagekey
}
\newcommand*{\@glsxtr@provide@storagekey}[3]{%
  \key@ifundefined{glossentry}{#1}%
  {%
    \define@key{glossentry}{#1}{\csdef{@glo@#1}{##1}}%
    \appto\@gls@keymap{,{#1}{#1}}%
    \appto\@newglossaryentryprehook{\csdef{@glo@#1}{#2}}%
    \appto\@newglossaryentryposthook{%
      \letcs{\@glo@tmp}{@glo@#1}%
      \gls@assign@field{#2}{\@glo@label}{#1}{\@glo@tmp}%
    }%
    \ifblank{#3}
    {}%
    {%
       \newcommand*{#3}[1]{\@gls@entry@field{##1}{#1}}%
    }%
  }%
  {%
    \ifblank{#3}
    {}%
    {%
      \providecommand*{#3}[1]{\@gls@entry@field{##1}{#1}}%
    }%
  }%
}
\newcommand*{\s@glsxtr@provide@storagekey}[1]{%
  \key@ifundefined{glossentry}{#1}%
  {%
    \expandafter\newcommand\expandafter*\expandafter
     {\csname gls@assign@#1@field\endcsname}[2]{%
       \@@gls@expand@field{##1}{#1}{##2}%
     }%
  }%
  {}%
  \@glsxtr@provide@addstoragekey{#1}%
}
\newcommand{\GlsXtrFmtField}{useri}
\newcommand{\GlsXtrFmtDefaultOptions}{noindex}
\newrobustcmd*{\glsxtrfmt}{\@ifstar\s@glsxtrfmt\@glsxtrfmt}
\newcommand*{\@glsxtrfmt}[3][]{\@@glsxtrfmt{#1}{#2}{#3}{}}
\newcommand*{\s@glsxtrfmt}[3][]{%
 \new@ifnextchar[{\s@@glsxtrfmt{#1}{#2}{#3}}%
  {\@@glsxtrfmt{#1}{#2}{#3}{}}%
}
\def\s@@glsxtrfmt#1#2#3[#4]{\@@glsxtrfmt{#1}{#2}{#3}{#4}}
\newcommand*{\@@glsxtrfmt}[4]{%
 \begingroup
   \def\glslabel{#2}%
   \glsdoifexistsordo{#2}%
   {%
     \ifglshasfield{\GlsXtrFmtField}{#2}%
     {%
       \let\do@gls@link@checkfirsthyper\relax
       \expandafter\@gls@link\expandafter[\GlsXtrFmtDefaultOptions,#1]{#2}%
         {\glsxtrfmtdisplay{\glscurrentfieldvalue}{#3}{#4}}%
     }%
     {\glsxtrfmtdisplay{@firstofone}{#3}{#4}}%
   }%
   {%
     \begingroup
       \@gls@setdefault@glslink@opts
       \setkeys{glslink}{\GlsXtrFmtDefaultOptions,#1}%
       \ifKV@glslink@noindex\else\glsadd{#2}\fi
     \endgroup
     \glsxtrfmtdisplay{@firstofone}{#3}{#4}%
   }%
 \endgroup
}
\newrobustcmd*{\Glsxtrfmt}{\@ifstar\s@Glsxtrfmt\@Glsxtrfmt}
\glsmfuaddmap{\glsxtrfmt}{\Glsxtrfmt}
\newcommand*{\@Glsxtrfmt}[3][]{\@@glsxtrfmt{#1}{#2}{\glssentencecase{#3}}{}}
\newcommand*{\s@Glsxtrfmt}[3][]{%
 \new@ifnextchar[{\s@@glsxtrfmt{#1}{#2}{\glssentencecase{#3}}}%
  {\@@glsxtrfmt{#1}{#2}{\glssentencecase{#3}}{}}%
}
\newcommand{\glsxtrfmtdisplay}[3]{\csuse{#1}{#2}#3}
\newcommand*{\glsxtrentryfmt}[2]{%
  \glstexorpdfstring{\@glsxtrentryfmt{#1}{#2}}{\glsxtrpdfentryfmt{#1}{#2}}%
}
\newcommand*{\glsxtrpdfentryfmt}[2]{#2}
\newrobustcmd*{\@glsxtrentryfmt}[2]{%
 {%
   \protected@edef\glslabel{#1}%
   \glsdoifexistsordo{#1}%
   {%
     \ifglshasfield{\GlsXtrFmtField}{#1}%
     {%
       \csuse{\glscurrentfieldvalue}{#2}%
     }%
     {#2}%
   }%
   {#2}%
 }%
}
\newcommand*{\Glsxtrentryfmt}[2]{%
  \glstexorpdfstring
    {\@glsxtrentryfmt{#1}{\glssentencecase{#2}}}%
    {\Glsxtrpdfentryfmt{#1}{#2}}%
}
\glsmfuaddmap{\glsxtrentryfmt}{\Glsxtrentryfmt}
\newcommand*{\Glsxtrpdfentryfmt}[2]{\MFUsentencecase{#2}}
\newcommand*{\glsxtrfieldlistadd}[3]{%
  \listcsadd{glo@\glsdetoklabel{#1}@#2}{#3}%
}
\newcommand*{\glsxtrfieldlistgadd}[3]{%
  \listcsgadd{glo@\glsdetoklabel{#1}@#2}{#3}%
}
\newcommand*{\glsxtrfieldlisteadd}[3]{%
  \listcseadd{glo@\glsdetoklabel{#1}@#2}{#3}%
}
\newcommand*{\glsxtrfieldlistxadd}[3]{%
  \listcsxadd{glo@\glsdetoklabel{#1}@#2}{#3}%
}
\newcommand*{\glsxtrfielddolistloop}[2]{%
  \dolistcsloop{glo@\glsdetoklabel{#1}@#2}%
}
\newcommand*{\glsxtrfieldforlistloop}[3]{%
  \forlistcsloop{#3}{glo@\glsdetoklabel{#1}@#2}%
}
\newrobustcmd*{\glsxtrfieldformatlist}[2]{%
 \begingroup
  \def\@dtl@formatlist@itemsep{}%
  \def\@dtl@formatlist@lastitem{}%
  \def\@dtl@formatlist@prelastitem{}%
  \def\@dtl@formatlist@prelastitemsep{}%
  \forlistcsloop{\@dtl@formatlist@handler}{glo@\glsdetoklabel{#1}@#2}%
  \@dtl@formatlist@prelastitem\@dtl@formatlist@lastitem
 \endgroup
}
\newcommand*{\glsxtrfieldifinlist}[5]{%
  \ifinlistcs{#3}{glo@\glsdetoklabel{#1}@#2}{#4}{#5}%
}
\newcommand*{\glsxtrfieldxifinlist}[5]{%
  \xifinlistcs{#3}{glo@\glsdetoklabel{#1}@#2}{#4}{#5}%
}
\newcommand*{\glsxtrforcsvfield}{%
  \@ifstar\s@glsxtrforcsvfield\@glsxtrforcsvfield
}
\newcommand*{\@glsxtrforcsvfield}[3]{%
 \@glsxtrifhasfield{#2}{#1}%
 {%
   \let\glsxtrendfor\@endfortrue
   \@for\@glsxtr@label:=\glscurrentfieldvalue\do
   {\expandafter#3\expandafter{\@glsxtr@label}}}%
 {}%
}
\newcommand*{\s@glsxtrforcsvfield}[3]{%
 \s@glsxtrifhasfield{#2}{#1}%
 {%
   \let\glsxtrendfor\@endfortrue
   \@for\@glsxtr@label:=\glscurrentfieldvalue\do
   {\expandafter#3\expandafter{\@glsxtr@label}}}%
 {}%
}
\newrobustcmd*{\glsxtrfieldformatcsvlist}[2]{%
 \@glsxtrifhasfield{#2}{#1}%
 {\@dtlformatlist\glscurrentfieldvalue}%
 {}%
}
\newcommand*{\GlsXtrIfFieldValueInCsvList}{%
  \@ifstar\s@GlsXtrIfFieldValueInCsvList\@GlsXtrIfFieldValueInCsvList
}
\newcommand*{\@GlsXtrIfFieldValueInCsvList}[5]{%
 \@glsxtrifhasfield{#2}{#1}%
 {%
   \expandafter\DTLifinlist\expandafter{\glscurrentfieldvalue}%
   {#3}{#4}{#5}%
 }%
 {#5}%
}
\newcommand*{\s@GlsXtrIfFieldValueInCsvList}[5]{%
 \s@glsxtrifhasfield{#2}{#1}%
 {%
   \expandafter\DTLifinlist\expandafter{\glscurrentfieldvalue}%
   {#3}{#4}{#5}%
 }%
 {#5}%
}
\newcommand*{\GlsXtrIfValueInFieldCsvList}{%
  \@ifstar\s@GlsXtrIfValueInFieldCsvList\@GlsXtrIfValueInFieldCsvList
}
\newcommand*{\@GlsXtrIfValueInFieldCsvList}[5]{%
 \@glsxtrifhasfield{#2}{#1}%
 {%
   \DTLifinlist{#3}{\glscurrentfieldvalue}{#4}{#5}%
 }%
 {#5}%
}
\newcommand*{\s@GlsXtrIfValueInFieldCsvList}[5]{%
 \s@glsxtrifhasfield{#2}{#1}%
 {%
   \DTLifinlist{#3}{\glscurrentfieldvalue}{#4}{#5}%
 }%
 {#5}%
}
\newcommand*{\xGlsXtrIfValueInFieldCsvList}{%
  \@ifstar\s@xGlsXtrIfValueInFieldCsvList\@xGlsXtrIfValueInFieldCsvList
}
\newcommand*{\@xGlsXtrIfValueInFieldCsvList}[5]{%
 \@glsxtrifhasfield{#2}{#1}%
 {%
   \protected@edef\@gls@tmp{#3}%
   \expandafter\DTLifinlist\expandafter{\@gls@tmp}{\glscurrentfieldvalue}{#4}{#5}%
 }%
 {#5}%
}
\newcommand*{\s@xGlsXtrIfValueInFieldCsvList}[5]{%
 \s@glsxtrifhasfield{#2}{#1}%
 {%
   \protected@edef\@gls@tmp{#3}%
   \expandafter\DTLifinlist\expandafter{\@gls@tmp}{\glscurrentfieldvalue}{#4}{#5}%
 }%
 {#5}%
}
\newrobustcmd{\glsxtrifhasfield}{%
  \@ifstar{\s@glsxtrifhasfield}{\@glsxtrifhasfield}%
}
\newcommand{\@glsxtrifhasfield}[4]{%
  {\s@glsxtrifhasfield{#1}{#2}{#3}{#4}}%
}
\newcommand{\s@glsxtrifhasfield}[4]{%
  \letcs{\glscurrentfieldvalue}{glo@\glsdetoklabel{#2}@#1}%
  \ifundef\glscurrentfieldvalue
  {#4}%
  {%
   \ifdefempty\glscurrentfieldvalue{#4}{#3}%
  }%
}
\newcommand{\GlsXtrIfFieldNonZero}{%
  \@ifstar\s@GlsXtrIfFieldNonZero\@GlsXtrIfFieldNonZero
}
\newcommand{\@GlsXtrIfFieldNonZero}[4]{%
  \@GlsXtrIfFieldCmpNum{#1}{#2}{=}{0}{#4}{#3}%
}
\newcommand{\s@GlsXtrIfFieldNonZero}[4]{%
  \s@GlsXtrIfFieldCmpNum{#1}{#2}{=}{0}{#4}{#3}%
}
\newcommand{\GlsXtrIfFieldEqNum}{%
  \@ifstar\s@GlsXtrIfFieldEqNum\@GlsXtrIfFieldEqNum
}
\newcommand{\@GlsXtrIfFieldEqNum}[5]{%
  \@GlsXtrIfFieldCmpNum{#1}{#2}{=}{#3}{#4}{#5}%
}
\newcommand{\s@GlsXtrIfFieldEqNum}[5]{%
  \s@GlsXtrIfFieldCmpNum{#1}{#2}{=}{#3}{#4}{#5}%
}
\newcommand{\GlsXtrIfFieldCmpNum}{%
  \@ifstar\s@GlsXtrIfFieldCmpNum\@GlsXtrIfFieldCmpNum
}
\newcommand{\@GlsXtrIfFieldCmpNum}[6]{%
  {%
    \letcs{\glscurrentfieldvalue}{glo@\glsdetoklabel{#2}@#1}%
    \ifundef\glscurrentfieldvalue
    {\def\glscurrentfieldvalue{0}}%
    {%
     \ifdefempty\glscurrentfieldvalue
     {\def\glscurrentfieldvalue{0}}%
     {}%
    }%
    \ifnum\glscurrentfieldvalue#3#4\relax #5\else #6\fi
  }%
}
\newcommand{\s@GlsXtrIfFieldCmpNum}[6]{%
  \letcs{\glscurrentfieldvalue}{glo@\glsdetoklabel{#2}@#1}%
  \ifundef\glscurrentfieldvalue
  {\def\glscurrentfieldvalue{0}}%
  {%
   \ifdefempty\glscurrentfieldvalue
   {\def\glscurrentfieldvalue{0}}%
   {}%
  }%
  \ifnum\glscurrentfieldvalue#3#4\relax #5\else #6\fi
}
\newcommand{\GlsXtrIfFieldUndef}[2]{%
 \ifcsundef{glo@\glsdetoklabel{#2}@#1}%
}
\newcommand*{\glsxtrusefield}[2]{%
  \@gls@entry@field{#1}{#2}%
}
\newcommand*{\Glsxtrusefield}[2]{%
  \@Glsentryfield{#1}{#2}%
}
\glsmfuaddmap{\glsxtrusefield}{\Glsxtrusefield}
\newcommand*{\GLSxtrusefield}[2]{%
  \glsuppercase{\csuse{glo@\glsdetoklabel{#1}@#2}}%
}
\glsmfublocker{\GLSxtrusefield}
\newcommand*{\glsxtrentryparentname}[1]{%
  \ifcsdef{glo@\glsdetoklabel{#1}@parent}%
  {\csuse{glo@\csuse{glo@\glsdetoklabel{#1}@parent}@name}}%
  {}%
}
\newcommand*{\glsxtrdeffield}[2]{\csdef{glo@\glsdetoklabel{#1}@#2}}
\newcommand*{\glsxtredeffield}[2]{\protected@csedef{glo@\glsdetoklabel{#1}@#2}}
\newcommand*{\glsxtrapptocsvfield}[3]{%
 \ifcsdef{glo@\glsdetoklabel{#1}@#2}%
 {\csappto{glo@\glsdetoklabel{#1}@#2}{,#3}}%
 {\csdef{glo@\glsdetoklabel{#1}@#2}{#3}}%
}
\newcommand*{\glsxtrsetfieldifexists}[3]{\glsdoifexists{#1}{#3}}
\newrobustcmd*{\GlsXtrSetField}[3]{%
  \glsxtrsetfieldifexists{#1}{#2}%
  {\csdef{glo@\glsdetoklabel{#1}@#2}{#3}}%
}
\newrobustcmd*{\GlsXtrLetField}[3]{%
  \glsxtrsetfieldifexists{#1}{#2}%
  {\cslet{glo@\glsdetoklabel{#1}@#2}{#3}}%
}
\newrobustcmd*{\csGlsXtrLetField}[3]{%
  \glsxtrsetfieldifexists{#1}{#2}%
  {\csletcs{glo@\glsdetoklabel{#1}@#2}{#3}}%
}
\newrobustcmd*{\GlsXtrLetFieldToField}[4]{%
  \glsxtrsetfieldifexists{#1}{#2}%
  {\csletcs{glo@\glsdetoklabel{#1}@#2}{glo@\glsdetoklabel{#3}@#4}}%
}
\newrobustcmd*{\gGlsXtrSetField}[3]{%
  \glsxtrsetfieldifexists{#1}{#2}%
  {\csgdef{glo@\glsdetoklabel{#1}@#2}{#3}}%
}
\newrobustcmd*{\xGlsXtrSetField}[3]{%
  \glsxtrsetfieldifexists{#1}{#2}%
  {\protected@csxdef{glo@\glsdetoklabel{#1}@#2}{#3}}%
}
\newrobustcmd*{\eGlsXtrSetField}[3]{%
  \glsxtrsetfieldifexists{#1}{#2}%
  {\protected@csedef{glo@\glsdetoklabel{#1}@#2}{#3}}%
}
\newcommand*{\GlsXtrIfFieldEqStr}{%
  \@ifstar\s@GlsXtrIfFieldEqStr\@GlsXtrIfFieldEqStr
}
\newrobustcmd*{\@GlsXtrIfFieldEqStr}[5]{%
  \@glsxtrifhasfield{#1}{#2}%
  {%
    \ifdefstring{\glscurrentfieldvalue}{#3}{#4}{#5}%
  }%
  {#5}%
}
\newrobustcmd*{\s@GlsXtrIfFieldEqStr}[5]{%
  \s@glsxtrifhasfield{#1}{#2}%
  {%
    \ifdefstring{\glscurrentfieldvalue}{#3}{#4}{#5}%
  }%
  {#5}%
}
\newcommand*{\GlsXtrIfFieldEqXpStr}{%
  \@ifstar\s@GlsXtrIfFieldEqXpStr\@GlsXtrIfFieldEqXpStr
}
\newrobustcmd*{\@GlsXtrIfFieldEqXpStr}[5]{%
  \@glsxtrifhasfield{#1}{#2}%
  {%
    \protected@edef\@gls@tmp{#3}%
    \ifdefequal{\glscurrentfieldvalue}{\@gls@tmp}{#4}{#5}%
  }%
  {#5}%
}
\newrobustcmd*{\s@GlsXtrIfFieldEqXpStr}[5]{%
  \s@glsxtrifhasfield{#1}{#2}%
  {%
    \protected@edef\@gls@tmp{#3}%
    \ifdefequal{\glscurrentfieldvalue}{\@gls@tmp}{#4}{#5}%
  }%
  {#5}%
}
\newcommand*{\GlsXtrIfXpFieldEqXpStr}{%
  \@ifstar\s@GlsXtrIfXpFieldEqXpStr\@GlsXtrIfXpFieldEqXpStr
}
\newrobustcmd*{\@GlsXtrIfXpFieldEqXpStr}[5]{%
  \@glsxtrifhasfield{#1}{#2}%
  {%
    \protected@edef\@gls@tmp{\glscurrentfieldvalue}%
    \let\glscurrentfieldvalue\@gls@tmp
    \protected@edef\@gls@tmp{#3}%
    \ifdefequal{\glscurrentfieldvalue}{\@gls@tmp}{#4}{#5}%
  }%
  {#5}%
}
\newrobustcmd*{\s@GlsXtrIfXpFieldEqXpStr}[5]{%
  \s@glsxtrifhasfield{#1}{#2}%
  {%
    \protected@edef\@gls@tmp{\glscurrentfieldvalue}%
    \let\glscurrentfieldvalue\@gls@tmp
    \protected@edef\@gls@tmp{#3}%
    \ifdefequal{\glscurrentfieldvalue}{\@gls@tmp}{#4}{#5}%
  }%
  {#5}%
}
\ifdef\foreignlanguage
{
  \ifdef\GetTrackedDialectFromLanguageTag
  {
    \newcommand{\GlsXtrForeignText}[2]{%
      \let\@glsxtr@org@currentfieldvalue\glscurrentfieldvalue
      \glsxtrifhasfield{\GlsXtrForeignTextField}{#1}%
      {%
        \expandafter\GetTrackedDialectFromLanguageTag\expandafter
          {\glscurrentfieldvalue}{\@glsxtr@dialect}%
        \let\@glsxtr@locale\glscurrentfieldvalue
        \let\glscurrentfieldvalue\@glsxtr@org@currentfieldvalue
        \ifdefempty\@glsxtr@dialect
        {%
          \ifundef\TrackedDialectClosestSubMatch
          {%
            \GlossariesExtraWarning{Can't obtain dialect label
              (tracklang v1.3.6+ required)}%
          }%
          {\let\@glsxtr@dialect\TrackedDialectClosestSubMatch}%
        }%
        {}%
        \ifdefempty\@glsxtr@dialect
        {%
        }%
        {%
          \ifcsundef{captions\@glsxtr@dialect}{}%
          {%
            \IfTrackedDialectHasMapping{\@glsxtr@dialect}%
            {%
              \edef\@glsxtr@dialect{%
                \GetTrackedDialectToMapping{\@glsxtr@dialect}}%
              \ifcsundef{captions\@glsxtr@dialect}{}%
              {%
                \ifcsundef{captions\@tracklang@lang}{}%
                {%
                  \let\@glsxtr@dialect\@tracklang@lang
                }%
              }%
            }%
            {%
              \ifcsundef{captions\@tracklang@lang}{}%
              {%
                \let\@glsxtr@dialect\@tracklang@lang
              }%
            }%
          }%
        }%
        \ifdefempty\@glsxtr@dialect
        {%
          \GlsXtrUnknownDialectWarning{\@glsxtr@locale}{\@tracklang@lang}%
          #2%
        }%
        {\foreignlanguage{\@glsxtr@dialect}{#2}}%
      }%
      {#2}% key not set
    }
  }
  {
    \newcommand{\GlsXtrForeignText}[2]{%
      \GlossariesExtraWarning{Can't encapsulate foreign text:
        tracklang v1.3.6+ required}%
      #2%
    }
  }
}
{
  \newcommand{\GlsXtrForeignText}[2]{#2}
}
\newcommand*{\GlsXtrForeignTextField}{userii}
\newcommand*{\GlsXtrUnknownDialectWarning}[2]{%
  \GlossariesExtraWarning{Can't determine valid dialect label
   for locale `#1' (root language: #2)}%
}
\ifdef\GlsEntryCounterLabelPrefix
{%
  \newcommand*{\glsxtrpageref}[1]{%
    \ifglsentrycounter
      \pageref{\GlsEntryCounterLabelPrefix\glsdetoklabel{#1}}%
    \else
      \ifglssubentrycounter
        \pageref{\GlsEntryCounterLabelPrefix\glsdetoklabel{#1}}%
      \else
        \gls{#1}%
      \fi
    \fi
  }
}%
{%
  \newcommand*{\glsxtrpageref}[1]{%
    \ifglsentrycounter
      \pageref{glsentry-\glsdetoklabel{#1}}%
    \else
      \ifglssubentrycounter
        \pageref{glsentry-\glsdetoklabel{#1}}%
      \else
        \gls{#1}%
      \fi
    \fi
  }
}%
\newcommand{\apptoglossarypreamble}[2][\glsdefaulttype]{%
  \ifcsdef{glolist@#1}%
  {%
   \ifcsundef{@glossarypreamble@#1}%
   {\csdef{@glossarypreamble@#1}{}}%
   {}%
   \csappto{@glossarypreamble@#1}{#2}%
  }%
  {%
    \GlossariesExtraWarning{Glossary `#1' is not defined}%
  }%
}
\newcommand{\preglossarypreamble}[2][\glsdefaulttype]{%
  \ifcsdef{glolist@#1}%
  {%
   \ifcsundef{@glossarypreamble@#1}%
   {\csdef{@glossarypreamble@#1}{}}%
   {}%
   \cspreto{@glossarypreamble@#1}{#2}%
  }%
  {%
    \GlossariesExtraWarning{Glossary `#1' is not defined}%
  }%
}
\renewcommand*{\@p@glossarysection}[2]{%
  \glsclearpage
  \ifdefempty\@@glossarysecstar
  {%
    \csname\@@glossarysec\endcsname{#2}%
  }%
  {%
    \phantomsection
    \@gls@toc{#1}{\@@glossarysec}%
    \csname\@@glossarysec\endcsname*{#2}%
  }%
  \@@glossaryseclabel
}
\ifdef\@gls@entry@field
{
 \renewcommand*{\@gls@entry@field}[2]{\csuse{glo@\glsdetoklabel{#1}@#2}}
}
{}
\renewcommand*{\ifglsused}[3]{%
  \glsdoifexists{#1}{\ifbool{glo@\glsdetoklabel{#1}@flag}{#2}{#3}}%
}
\renewcommand{\@@gls@noexpand@field}[3]{%
 \glsifcategoryattributehasitem{\@glo@category}{encapnocaseinnerfmt}{#2}%
 {%
   \csxdef{glo@#1@#2}{\noexpand\NoCaseChange{\noexpand\glsxtrgenentrytextfmt
     {\expandonce{#3}}}}%
   \glsexclapplyinnerfmtfield{#1}{#2}%
 }%
 {%
   \glsifcategoryattributehasitem{\@glo@category}{encapnocase}{#2}%
   {%
     \glsifcategoryattributehasitem{\@glo@category}{encapinnerfmt}{#2}%
     {%
       \csxdef{glo@#1@#2}{\noexpand\NoCaseChange{\noexpand\glsxtrgenentrytextfmt
         {\expandonce{#3}}}}%
       \glsexclapplyinnerfmtfield{#1}{#2}%
     }%
     {%
       \csxdef{glo@#1@#2}{\noexpand\NoCaseChange{\expandonce{#3}}}%
     }%
   }%
   {%
     \glsifcategoryattributehasitem{\@glo@category}{encapinnerfmt}{#2}%
     {%
       \csxdef{glo@#1@#2}{\noexpand\glsxtrgenentrytextfmt{\expandonce{#3}}}%
       \glsexclapplyinnerfmtfield{#1}{#2}%
     }%
     {%
       \expandafter\global\expandafter\let\csname glo@#1@#2\endcsname#3%
     }%
   }%
 }%
}
\renewcommand{\@@gls@expand@field}[3]{%
 \glsifcategoryattributehasitem{\@glo@category}{encapnocaseinnerfmt}{#2}%
 {%
   \protected@csxdef{glo@#1@#2}{\noexpand\NoCaseChange
    {\noexpand\glsxtrgenentrytextfmt{#3}}}%
   \glsexclapplyinnerfmtfield{#1}{#2}%
 }%
 {%
   \glsifcategoryattributehasitem{\@glo@category}{encapnocase}{#2}%
   {%
     \glsifcategoryattributehasitem{\@glo@category}{encapinnerfmt}{#2}%
     {%
       \protected@csxdef{glo@#1@#2}{\noexpand\NoCaseChange
        {\noexpand\glsxtrgenentrytextfmt{#3}}}%
       \glsexclapplyinnerfmtfield{#1}{#2}%
     }%
     {%
       \protected@csxdef{glo@#1@#2}{\noexpand\NoCaseChange{#3}}%
     }%
   }%
   {%
     \glsifcategoryattributehasitem{\@glo@category}{encapinnerfmt}{#2}%
     {%
       \protected@csxdef{glo@#1@#2}{\noexpand\glsxtrgenentrytextfmt{#3}}%
       \glsexclapplyinnerfmtfield{#1}{#2}%
     }%
     {%
       \protected@csxdef{glo@#1@#2}{#3}%
     }%
   }%
 }%
}
\renewcommand*{\longnewglossaryentry}{%
 \@ifstar\@glsxtr@s@longnewglossaryentry\@glsxtr@longnewglossaryentry
}
\newcommand{\@glsxtr@s@longnewglossaryentry}[3]{%
  \glsdoifnoexists{#1}%
  {%
     \bgroup
       \let\@org@newglossaryentryprehook\@newglossaryentryprehook
       \long\def\@newglossaryentryprehook{%
         \long\def\@glo@desc{#3}%
         \@org@newglossaryentryprehook
       }%
       \renewcommand*{\gls@assign@desc}[1]{%
          \global\cslet{glo@\glsdetoklabel{#1}@desc}{\@glo@desc}%
          \global\cslet{glo@\glsdetoklabel{#1}@descplural}{\@glo@descplural}%
        }
       \gls@defglossaryentry{#1}{#2}%
     \egroup
  }%
}
\newcommand{\@glsxtr@longnewglossaryentry}[3]{%
  \glsdoifnoexists{#1}%
  {%
     \bgroup
       \let\@org@newglossaryentryprehook\@newglossaryentryprehook
       \long\def\@newglossaryentryprehook{%
         \long\def\@glo@desc{#3\glsxtrpostlongdescription}%
         \@org@newglossaryentryprehook
       }%
       \renewcommand*{\gls@assign@desc}[1]{%
          \global\cslet{glo@\glsdetoklabel{#1}@desc}{\@glo@desc}%
          \global\cslet{glo@\glsdetoklabel{#1}@descplural}{\@glo@descplural}%
        }
       \gls@defglossaryentry{#1}{#2}%
     \egroup
  }%
}
\newcommand*{\glsxtrpostlongdescription}{\leavevmode\unskip\nopostdesc}
\renewcommand{\newignoredglossary}{%
 \@ifstar\glsxtr@s@newignoredglossary\glsxtr@org@newignoredglossary
}
\newcommand*{\glsxtr@org@newignoredglossary}[1]{%
  \ifcsdef{glolist@#1}
  {%
    \glsxtrundefaction{Glossary type `#1' already exists}{}%
  }%
  {%
    \ifdefempty\@ignored@glossaries
    {%
      \protected@edef\@ignored@glossaries{#1}%
    }%
    {%
      \protected@eappto\@ignored@glossaries{,#1}%
    }%
    \csgdef{glolist@#1}{,}%
    \ifcsundef{gls@#1@entryfmt}%
    {%
      \defglsentryfmt[#1]{\glsentryfmt}%
    }%
    {}%
    \ifdefempty\@gls@nohyperlist
    {%
       \renewcommand*{\@gls@nohyperlist}{#1}%
    }%
    {%
       \protected@eappto\@gls@nohyperlist{,#1}%
    }%
  }%
}
\newcommand*{\glsxtr@s@newignoredglossary}[1]{%
  \ifcsdef{glolist@#1}
  {%
    \glsxtrundefaction{Glossary type `#1' already exists}{}%
  }%
  {%
    \ifdefempty\@ignored@glossaries
    {%
      \protected@edef\@ignored@glossaries{#1}%
    }%
    {%
      \protected@eappto\@ignored@glossaries{,#1}%
    }%
    \csgdef{glolist@#1}{,}%
    \ifcsundef{gls@#1@entryfmt}%
    {%
      \defglsentryfmt[#1]{\glsentryfmt}%
    }%
    {}%
  }%
}
\glsifusetranslator
{%
  \renewcommand*{\glssettoctitle}[1]{%
    \ifcsdef{gls@tr@set@#1@toctitle}%
    {%
      \csuse{gls@tr@set@#1@toctitle}%
    }%
    {%
      \ifcsdef{@glotype@#1@title}%
      {\def\glossarytoctitle{\csname @glotype@#1@title\endcsname}}%
      {\def\glossarytoctitle{\glossarytitle}}%
    }%
  }%
}
{
  \renewcommand*{\glssettoctitle}[1]{%
    \ifcsdef{@glotype@#1@title}%
    {\def\glossarytoctitle{\csname @glotype@#1@title\endcsname}}%
    {\def\glossarytoctitle{\glossarytitle}}%
  }
}
\newcommand{\provideignoredglossary}{%
 \@ifstar\glsxtr@s@provideignoredglossary\glsxtr@provideignoredglossary
}
\newcommand*{\glsxtr@provideignoredglossary}[1]{%
  \ifcsdef{glolist@#1}
  {}%
  {%
    \ifdefempty\@ignored@glossaries
    {%
      \protected@edef\@ignored@glossaries{#1}%
    }%
    {%
      \protected@eappto\@ignored@glossaries{,#1}%
    }%
    \csgdef{glolist@#1}{,}%
    \ifcsundef{gls@#1@entryfmt}%
    {%
      \defglsentryfmt[#1]{\glsentryfmt}%
    }%
    {}%
    \ifdefempty\@gls@nohyperlist
    {%
       \renewcommand*{\@gls@nohyperlist}{#1}%
    }%
    {%
       \protected@eappto\@gls@nohyperlist{,#1}%
    }%
  }%
}
\newcommand*{\glsxtr@s@provideignoredglossary}[1]{%
  \ifcsdef{glolist@#1}
  {}%
  {%
    \ifdefempty\@ignored@glossaries
    {%
      \protected@edef\@ignored@glossaries{#1}%
    }%
    {%
      \protected@eappto\@ignored@glossaries{,#1}%
    }%
    \csgdef{glolist@#1}{,}%
    \ifcsundef{gls@#1@entryfmt}%
    {%
      \defglsentryfmt[#1]{\glsentryfmt}%
    }%
    {}%
  }%
}
\newcommand*{\glsxtrcopytoglossary}{%
  \@ifstar\s@glsxtrcopytoglossary\@glsxtrcopytoglossary
}
\newcommand*{\@glsxtrcopytoglossary}[2]{%
  \glsdoifexists{#1}%
  {%
    \ifcsdef{glolist@#2}
    {%
      \protected@cseappto{glolist@#2}{#1,}%
    }%
    {%
      \glsxtrundefaction{Glossary type `#2' doesn't exist}{}%
    }%
  }%
}
\newcommand*{\s@glsxtrcopytoglossary}[2]{%
  \glsdoifexists{#1}%
  {%
    \ifcsdef{glolist@#2}
    {%
      \protected@csxappto{glolist@#2}{#1,}%
    }%
    {%
      \glsxtrundefaction{Glossary type `#2' doesn't exist}{}%
    }%
  }%
}
\renewcommand{\glsdoifexists}[2]{%
  \ifglsentryexists{#1}{#2}{\glsxtr@doifexists{#1}}%
}
\newrobustcmd{\glsxtr@doifexists}[1]{%
  \protected@edef\glslabel{\glsdetoklabel{#1}}%
  \expandafter\glsxtrundefdebug\expandafter
    {\expandafter\detokenize\expandafter{\glslabel}}%
  \glsxtrundefaction{Glossary entry `\glslabel'
  has not been defined}{You need to define a glossary entry before
  you can reference it.}%
}
\renewcommand{\glsdoifnoexists}[2]{%
  \ifglsentryexists{#1}{\glsxtr@doifnoexists{#1}}{#2}%
}
\newrobustcmd{\glsxtr@doifnoexists}[1]{%
  \glsxtrundefaction{Glossary entry `\glsdetoklabel{#1}'
    has already been defined}%
}
\ifdef\glsdoifexistsordo
{%
  \renewcommand{\glsdoifexistsordo}[3]{%
    \ifglsentryexists{#1}{#2}%
    {%
      \glsxtrundefaction{Glossary entry `\glsdetoklabel{#1}'
      has not been defined}{You need to define a glossary entry
      before you can use it.}%
      #3%
    }%
  }%
}
{%
  \glsxtr@warnonexistsordo\glsdoifexistsordo
  \newcommand{\glsdoifexistsordo}[3]{%
    \ifglsentryexists{#1}{#2}%
    {%
      \glsxtrundefaction{Glossary entry `\glsdetoklabel{#1}'
      has not been defined}{You need to define a glossary entry
      before you can use it.}%
      #3%
    }%
  }%
}
\ifdef\doifglossarynoexistsordo
{%
  \renewcommand{\doifglossarynoexistsordo}[3]{%
    \ifglossaryexists*{#1}%
    {%
      \glsxtrundefaction{Glossary type `#1' already exists}{}%
      #3%
    }%
    {#2}%
  }%
}
{%
  \glsxtr@warnonexistsordo\doifglossarynoexistsordo
  \newcommand{\doifglossarynoexistsordo}[3]{%
    \ifglossaryexists*{#1}%
    {%
      \glsxtrundefaction{Glossary type `#1' already exists}{}%
      #3%
    }%
    {#2}%
  }%
}

\appto\@newglossaryentryposthook{%
  \ifdefvoid\@glo@see
   {\csxdef{glo@\@glo@label @see}{}}%
   {%
     \csxdef{glo@\@glo@label @see}{\@glo@see}%
     \if@glsxtr@autoseeindex
       \@glsxtr@autoindexcrossrefs
     \fi
   }%
}
\appto\@gls@keymap{,{see}{see}}
\newcommand*{\glsxtrseelistsencap}[1]{\space #1}
\newcommand*{\glsxtrseelistsdelim}{, }
\newcommand*{\glsxtrseelists}[1]{%
  \glsdoifexists{#1}%
  {%
    \def\@glsxtr@seelists{}%
    \letcs{\@glo@see}{glo@\glsdetoklabel{#1}@see}%
    \ifdefempty\@glo@see
    {}%
    {%
      \protected@edef\@glsxtr@seelists{%
        \noexpand\glsxtr@usesee\@glo@see\noexpand\@end@glsxtr@usesee
      }%
    }%
    \letcs{\@glo@see}{glo@\glsdetoklabel{#1}@seealso}%
    \ifdefempty\@glo@see
    {}%
    {%
      \ifdefempty\@glsxtr@seelists{}%
      {\appto\@glsxtr@seelists{\glsxtrseelistsdelim}}%
      \protected@edef\@glsxtr@seelists{%
        \noexpand\glsxtruseseealsoformat{\@glo@see}%
      }%
    }%
    \letcs{\@glo@see}{glo@\glsdetoklabel{#1}@alias}%
    \ifdefempty\@glo@see
    {}%
    {%
      \ifdefempty\@glsxtr@seelists{}%
      {\appto\@glsxtr@seelists{\glsxtrseelistsdelim}}%
      \protected@edef\@glsxtr@seelists{%
        \noexpand\glsxtruseseeformat{\noexpand\seename}{\@glo@see}%
      }%
    }%
    \ifdefempty\@glsxtr@seelists{}%
    {\glsxtrseelistsencap\@glsxtr@seelists}%
  }%
}
\newcommand*{\glsxtrusesee}[1]{%
  \glsdoifexists{#1}%
  {%
    \letcs{\@glo@see}{glo@\glsdetoklabel{#1}@see}%
    \ifdefempty\@glo@see
    {}%
    {%
      \expandafter\glsxtr@usesee\@glo@see\@end@glsxtr@usesee
    }%
  }%
}
\newcommand*{\glsxtr@usesee}[1][\seename]{%
  \@glsxtr@usesee[#1]%
}
\def\@glsxtr@usesee[#1]#2\@end@glsxtr@usesee{%
  \glsxtruseseeformat{#1}{#2}%
}
\newcommand*{\glsxtruseseeformat}[2]{%
  \glsseeformat[#1]{#2}{}%
}
\renewcommand*{\glsseeitemformat}[1]{%
 \ifglshasshort{#1}{\glsfmttext{#1}}{\glsfmtname{#1}}%
}
\newcommand*{\glsxtrhiername}[1]{%
  \glstexorpdfstring
  {\@glsxtrhiername{#1}}%
  {\glsentryname{#1}}%
}
\newrobustcmd*{\@glsxtrhiername}[1]{%
  \glsdoifexists{#1}%
  {%
    \glsxtrifhasfield{parent}{#1}%
    {\expandafter\glsxtrhiername\expandafter
      {\glscurrentfieldvalue}\glsxtrhiernamesep}%
    {}%
    \ifglshasshort{#1}{\glsfmttext{#1}}{\glsfmtname{#1}}%
  }%
}
\newcommand*{\Glsxtrhiername}[1]{%
  \glstexorpdfstring
  {\@Glsxtrhiername{#1}}%
  {\MFUsentencecase{\glsentryname{#1}}}%
}
\newrobustcmd*{\@Glsxtrhiername}[1]{%
  \glsdoifexists{#1}%
  {%
    \glsxtrifhasfield{parent}{#1}%
    {%
      \expandafter\Glsxtrhiername\expandafter
        {\glscurrentfieldvalue}\glsxtrhiernamesep
      \ifglshasshort{#1}{\glsfmttext{#1}}{\glsfmtname{#1}}%
    }%
    {\ifglshasshort{#1}{\Glsfmttext{#1}}{\Glsfmtname{#1}}}%
  }%
}
\glsmfuaddmap{\glsxtrhiername}{\Glsxtrhiername}
\newcommand*{\GlsXtrhiername}[1]{%
  \glstexorpdfstring
  {\@GlsXtrhiername{#1}}%
  {\glsentryname{#1}}%
}
\newrobustcmd*{\@GlsXtrhiername}[1]{%
  \glsdoifexists{#1}%
  {%
    \glsxtrifhasfield{parent}{#1}%
    {\expandafter\GlsXtrhiername\expandafter
      {\glscurrentfieldvalue}\glsxtrhiernamesep}%
    {}%
    \ifglshasshort{#1}{\Glsfmttext{#1}}{\Glsfmtname{#1}}%
  }%
}
\glsmfublocker{\GlsXtrhiername}
\newcommand*{\GLSxtrhiername}[1]{%
  \glstexorpdfstring
  {\@GLSxtrhiername{#1}}%
  {\GLSxtrusefield{#1}{name}}%
}
\newrobustcmd*{\@GLSxtrhiername}[1]{%
  \glsdoifexists{#1}%
  {%
    \glsxtrifhasfield{parent}{#1}%
    {%
      \expandafter\GLSxtrhiername\expandafter
       {\glscurrentfieldvalue}\glsxtrhiernamesep
      \ifglshasshort{#1}{\glsfmttext{#1}}{\glsfmtname{#1}}%
    }%
    {\ifglshasshort{#1}{\GLSfmttext{#1}}{\GLSfmtname{#1}}}%
  }%
}
\glsmfublocker{\GLSxtrhiername}
\newcommand*{\GLSXTRhiername}[1]{%
  \glstexorpdfstring
  {\@GLSXTRhiername{#1}}%
  {\GLSxtrusefield{#1}{name}}%
}
\newrobustcmd*{\@GLSXTRhiername}[1]{%
 \glsdoifexists{#1}%
 {%
   \glsxtrifhasfield{parent}{#1}%
   {\expandafter\GLSXTRhiername\expandafter
      {\glscurrentfieldvalue}\glsxtrhiernamesep}%
   {}%
   \ifglshasshort{#1}{\GLSfmttext{#1}}{\GLSfmtname{#1}}%
 }%
}
\glsmfublocker{\GLSXTRhiername}
\newcommand*{\glsxtrhiernamesep}{\,{\small$\triangleright$}\,}
\newcommand*{\glsxtruseseealso}[1]{%
  \glsdoifexists{#1}%
  {%
    \letcs{\@glo@see}{glo@\glsdetoklabel{#1}@seealso}%
    \ifdefempty\@glo@see
    {}%
    {%
      \expandafter\glsxtruseseealsoformat\expandafter{\@glo@see}%
    }%
  }%
}
\newcommand*{\glsxtrusealias}[1]{%
  \glsdoifexists{#1}%
  {%
    \letcs{\@glo@see}{glo@\glsdetoklabel{#1}@alias}%
    \ifdefempty\@glo@see
    {}%
    {%
      \glsxtruseseeformat{\seename}{\@glo@see}%
    }%
  }%
}
\newcommand*{\glsxtruseseealsoformat}[1]{%
  \glsseeformat[\seealsoname]{#1}{}%
}
\newrobustcmd{\glsxtrseelist}[1]{%
  \protected@edef\@glo@tmp{\noexpand\glsseelist{#1}}\@glo@tmp
}
\renewrobustcmd*{\glsseelist}[1]{%
  \let\@gls@dolast\relax
  \let\@gls@donext\relax
  \let\@glsseeitem\@glsxtr@seefirstitem
  \let\@glsseelastsep\glsseelastsep
  \@for\@gls@thislabel:=#1\do{%
    \ifx\@xfor@nextelement\@nnil
      \@gls@dolast
    \else
      \@gls@donext
    \fi
    \expandafter\@glsseeitem\expandafter{\@gls@thislabel}%
    \let\@gls@dolast\@glsseelastsep
    \let\@gls@donext\glsseesep
    \let\@glsseeitem\@glsxtr@seeitem
    \let\@glsseelastsep\glsseelastoxfordsep
  }%
}
\newcommand{\glsxtrtaggedlistsep}{\space}
\newrobustcmd*{\glsxtrtaggedlist}[4]{%
 \begingroup
  \protected@edef\@gls@taggedlist@labels{#4}%
  \let\@gls@dolast\relax
  \let\@gls@donext\relax
  \let\@glsseeitem\@glsxtr@seefirstitem
  \let\@glsseelastsep\glsseelastsep
  \def\@gls@taggedlist@content{}%
  \let\@gls@taggedlist@tag\relax
  \@for\@gls@thislabel:=\@gls@taggedlist@labels\do{%
    \ifx\@xfor@nextelement\@nnil
      \ifx\@gls@dolast\relax
      \else
        \eappto\@gls@taggedlist@content{\expandonce\@gls@dolast}%
      \fi
    \else
      \ifx\@gls@dolast\relax
      \else
        \eappto\@gls@taggedlist@content{\expandonce\@gls@donext}%
      \fi
    \fi
    \protected@eappto\@gls@taggedlist@content{\noexpand\@glsseeitem
      {#3\@gls@thislabel}}%
    \let\@gls@dolast\@glsseelastsep
    \let\@gls@donext\glsseesep
    \let\@glsseeitem\@glsxtr@seeitem
    \let\@glsseelastsep\glsseelastoxfordsep
    \ifx\@gls@taggedlist@tag\relax
     \def\@gls@taggedlist@tag{#1\glsxtrtaggedlistsep}%
    \else
     \def\@gls@taggedlist@tag{#2\glsxtrtaggedlistsep}%
    \fi
  }%
  \@gls@taggedlist@tag\@gls@taggedlist@content
 \endgroup
}
\newcommand*{\@glsxtr@seeitem}[1]{%
 \glsxtrifmulti{#1}{\mglsseeitem{#1}}{\glsseeitem{#1}}%
}
\newcommand*{\@glsxtr@seefirstitem}[1]{%
 \glsxtrifmulti{#1}{\mglsseefirstitem{#1}}{\glsseefirstitem{#1}}%
}
\newcommand*{\mglsseeitem}[1]{%
 \mglsname[all={noindex},setup={hyper=allmain}]{#1}%
}
\newcommand*{\mglsseefirstitem}{\mglsseeitem}
\newcommand*{\glsseefirstitem}{\glsseeitem}
\newcommand*{\glsseelastoxfordsep}{\glsseelastsep}
\ifdef\alsoname
{\providecommand{\seealsoname}{\alsoname}}
{\providecommand{\seealsoname}{see also}}
\ifdef\@xdycrossrefhook
{
  \appto\@xdycrossrefhook{%
    \write\glswrite{(define-crossref-class \string"seealso\string"
      :unverified )}%
    \write\glswrite{(markup-crossref-list
       :class \string"seealso\string"^^J\space\space\space
       :open \string"\string\glsxtruseseealsoformat\glsopenbrace\string"
       :close \string"\glsclosebrace\string")}%
  }
  \appto\@xdylocationclassorder{\space\string"seealso\string"}
  \newrobustcmd*{\glsxtrindexseealso}[2]{%
    \glsxtr@wrglossary@encap{#1}
    {%
      \ifx\@glsxtr@record@setting\@glsxtr@record@setting@alsoindex
        \@glsxtr@recordsee{#1}{#2}%
      \fi
      \glsdoifexists{#1}%
      {%
        \@@glsxtrwrglossmark
        \def\@gls@xref{#2}%
        \@onelevel@sanitize\@gls@xref
        \@gls@checkmkidxchars\@gls@xref
        \gls@glossary{\csname glo@#1@type\endcsname}{%
          (indexentry
            :tkey (\csname glo@#1@index\endcsname)
            :xref (\string"\@gls@xref\string")
            :attr \string"seealso\string"
          )
        }%
      }%
    }%
  }
}
{
  \newrobustcmd*{\glsxtrindexseealso}{\glssee[\seealsoname]}
}
\ifdef\gls@set@xr@key
{
  \define@key{glossentry}{alias}{%
    \gls@set@xr@key{alias}{\@glo@alias}{#1}%
  }
  \define@key{glossentry}{seealso}{%
    \gls@set@xr@key{seealso}{\@glo@seealso}{#1}%
  }
  \appto\@gls@keymap{,{alias}{alias},{seealso}{seealso}}
  \appto\@newglossaryentryprehook{\def\@glo@alias{}\def\@glo@seealso{}}%
  \appto\@newglossaryentryposthook{%
    \ifdefvoid\@glo@seealso
     {\csxdef{glo@\@glo@label @seealso}{}}%
     {%
       \csxdef{glo@\@glo@label @seealso}{\@glo@seealso}%
       \if@glsxtr@autoseeindex
         \@glsxtr@autoindexcrossrefs
       \fi
     }%
    \ifdefvoid\@glo@alias
     {\csxdef{glo@\@glo@label @alias}{}}%
     {%
       \csxdef{glo@\@glo@label @alias}{\@glo@alias}%
       \glsxtraliashook{\@glo@label}%
     }%
  }
  \newcommand*{\glsxtralias}[1]{\@gls@entry@field{#1}{alias}}
  \newcommand*{\glsxtrseealsolabels}[1]{\@gls@entry@field{#1}{seealso}}
  \appto\@glo@autoseehook{%
    \ifdefvoid\@glo@alias
    {%
      \ifdefvoid\@glo@seealso
      {}%
      {%
        \protected@edef\@do@glssee{\noexpand\glsxtrindexseealso
          {\@glo@label}{\@glo@seealso}}%
        \@do@glssee
      }%
    }%
    {%
      \ifdefvoid\@glo@see
      {%
        \protected@edef\@do@glssee{\noexpand\glssee{\@glo@label}{\@glo@alias}}%
        \@do@glssee
        \glsxtraliashook{\@glo@label}%
      }%
      {}%
    }%
  }%
}
{
  \glsaddstoragekey*{alias}{}{\glsxtralias}
  \glsaddstoragekey*{seealso}{}{\glsxtrseealsolabels}
  \appto\@newglossaryentryposthook{%
    \ifcsvoid{glo@\@glo@label @alias}%
    {%
      \ifcsvoid{glo@\@glo@label @seealso}%
      {}%
      {%
        \protected@edef\@do@glssee{\noexpand\glsxtrindexseealso
          {\@glo@label}{\csuse{glo@\@glo@label @seealso}}}%
        \@do@glssee
      }%
    }%
    {%
      \ifdefvoid\@glo@see
      {%
        \protected@edef\@do@glssee{\noexpand\glssee
          {\@glo@label}{\csuse{glo@\@glo@label @alias}}}%
        \@do@glssee
      }%
      {}%
    }%
  }
}
\newcommand*{\glsxtraliashook}[1]{}
\AtEndDocument{\if@glsxtrindexcrossrefs\glsxtraddallcrossrefs\fi}
\newcommand*{\glsxtraddallcrossrefs}{%
  \forallglossaries{\@glo@type}%
  {%
     \forglsentries[\@glo@type]{\@glo@label}%
     {%
       \ifglsused{\@glo@label}{\glsxtraddunusedxrefs{\@glo@label}}{}%
     }%
  }%
}
\newcommand*{\glsxtraddunusedxrefs}[1]{\expandafter\@glsxtr@addunusedxrefs\expandafter{#1}}
\newcommand*{\@glsxtr@addunusedxrefs}[1]{%
  \letcs{\@glo@see}{glo@\glsdetoklabel{#1}@see}%
  \ifdefvoid\@glo@see
  {}%
  {%
    \expandafter\glsxtr@addunused\@glo@see\@end@glsxtr@addunused
  }%
  \letcs{\@glo@see}{glo@\glsdetoklabel{#1}@seealso}%
  \ifdefvoid\@glo@see
  {}%
  {%
    \expandafter\glsxtr@addunused\@glo@see\@end@glsxtr@addunused
  }%
}
\newcommand*{\glsxtr@addunused}[1][]{%
  \@glsxtr@addunused
}
\def\@glsxtr@addunused#1\@end@glsxtr@addunused{%
 \@for\@glsxtr@label:=#1\do
 {%
   \glsxtrifmulti\@glsxtr@label
   {%
     \letcs\@glsxtr@labellist{@gls@combined@\@glsxtr@label @list}%
     \@for\@glsxtr@multilabel:=\@glsxtr@labellist\do
     {\@glsxtr@addunused\@glsxtr@multilabel\@end@glsxtr@addunused}%
   }%
   {%
     \ifglsused{\@glsxtr@label}{}%
     {%
       \glsadd[format=glsxtrunusedformat]{\@glsxtr@label}%
       \glsunset{\@glsxtr@label}%
       \expandafter\@glsxtr@addunusedxrefs\expandafter{\@glsxtr@label}%
     }%
   }%
 }%
}
\newcommand*{\glsxtrunusedformat}[1]{\unskip}
\ifdef\gls@begindocdefs
{%
  \renewcommand*{\gls@begindocdefs}{%
    \ifnum\@glsxtr@docdefval=1\relax
      \@gls@enablesavenonumberlist
      \edef\@gls@restoreat{%
        \noexpand\catcode`\noexpand\@=\number\catcode`\@\relax}%
      \makeatletter
      \InputIfFileExists{\jobname.glsdefs}{}{}%
      \@gls@restoreat
      \undef\@gls@restoreat
      \gls@defdocnewglossaryentry
    \else
      \ifnum\@glsxtr@docdefval=3\relax
        \@gls@enablesavenonumberlist
        \let\gls@checkseeallowed\relax
        \let\newglossaryentry\new@atom@glossaryentry
        \global\newwrite\@gls@deffile
        \immediate\openout\@gls@deffile=\jobname.glsdefs
        \forallglsentries{\@glsentry}{\@gls@writedef{\@glsentry}}%
      \fi
    \fi
  }
}
{%
  \ifnum\@glsxtr@docdefval=3\relax
    \PackageError{glossaries-extra}{Package option
    `docdef=\@glsxtr@docdefsetting' requires at least version 4.37
    of the base glossaries.sty package}{}
  \fi
}
\newrobustcmd{\new@atom@glossaryentry}[2]{%
  \gls@defglossaryentry{#1}{#2}%
  \@gls@writedef{#1}%
}
\let\glsxtr@orgmakenoidxglossaries\makenoidxglossaries
\renewcommand{\makenoidxglossaries}{%
 \def\glsindexingsetting{noidx}%
 \@domakeglossaries
 {%
  \ifdefequal\@glsxtr@record@setting\@glsxtr@record@setting@off
  {%
    \glsxtr@orgmakenoidxglossaries
    \renewcommand{\@do@seeglossary}[2]{%
      \@@glsxtrwrglossmark
      \protected@edef\@gls@label{\glsdetoklabel{##1}}%
      \protected@write\@auxout{}{%
        \string\@gls@reference
          {\csname glo@\@gls@label @type\endcsname}%
          {\@gls@label}%
          {%
            \string\glsseeformat##2{}%
          }%
      }%
    }%
    \if@glsxtrdocdefrestricted
      \renewcommand*{\@gls@reference}[3]{%
        \ifcsundef{@glsref@##1}{\csgdef{@glsref@##1}{}}{}%
        \ifinlistcs{##2}{@glsref@##1}%
        {}%
        {\listcsgadd{@glsref@##1}{##2}}%
        \ifcsundef{glo@\glsdetoklabel{##2}@loclist}%
        {\csgdef{glo@\glsdetoklabel{##2}@loclist}{}}%
        {}%
        \listcsgadd{glo@\glsdetoklabel{##2}@loclist}{##3}%
      }%
    \else
      \@glsxtrdocdeffalse
    \fi
    \disable@keys{glossaries-extra.sty}{docdef}%
  }%
  {%
    \PackageError{glossaries-extra}{\string\makenoidxglossaries\space
     not permitted\MessageBreak
     with record=\@glsxtr@record@setting\space package option}%
    {You may only use \string\makenoidxglossaries\ space with the
     record=off option}%
  }%
  \let\gls@warn@noidx@incompatible\@gls@warn@noidx@incompatible
 }%
}
\newcommand*{\gls@warn@noidx@incompatible}[2]{}
\newcommand*{\@gls@warn@noidx@incompatible}[2]{%
  #2\GlossariesExtraWarning{#1\space is incompatible with \string\makenoidxglossaries}%
}
\newcommand*{\gls@warn@noidxmakegloss@incompatible}[2]{%
  \gls@warn@noidx@incompatible{#1}{#2}%
  \gls@warn@makegloss@incompatible{#1}{#2}%
}
\renewcommand*{\gls@defdocnewglossaryentry}{%
  \ifcase\@glsxtr@docdefval
    \renewcommand*{\newglossaryentry}[2]{%
      \PackageError{glossaries-extra}{Glossary entries must
       be \MessageBreak defined in the preamble with \MessageBreak
       package option `docdef=false'\MessageBreak(consider using
       `docdef=restricted')}{Move your glossary definitions to
       the preamble. You can also put them in a \MessageBreak separate file
       and load them with \string\loadglsentries.}%
    }%
  \or
    \let\gls@checkseeallowed\relax
    \let\newglossaryentry\new@glossaryentry
  \else
    \let\gls@checkseeallowed\relax
  \fi
}%
\newcommand*{\GlsXtrEnableOnTheFly}{%
  \@ifstar\@sGlsXtrEnableOnTheFly\@GlsXtrEnableOnTheFly
}
\newcommand*{\@sGlsXtrEnableOnTheFly}{%
  \renewcommand*{\glsdetoklabel}[1]{%
    \expandafter\@glsxtr@ifcsstart\string##1 \@glsxtr@end@
    {%
      \expandafter\detokenize\expandafter{##1}%
    }%
    {\detokenize{##1}}%
  }%
  \@GlsXtrEnableOnTheFly
}
\def\@glsxtr@ifcsstart#1#2\@glsxtr@end@#3#4{%
  \expandafter\if\glsbackslash#1%
    #3%
  \else
    #4%
  \fi
}
\newcommand*{\glsxtrstarflywarn}{%
  \GlossariesExtraWarning{Experimental starred version of
  \string\GlsXtrEnableOnTheFly\space in use (please ensure you have
  read the warnings in the glossaries-extra user manual)}%
}
\newcommand*{\@GlsXtrEnableOnTheFly}{%
  \newcommand*{\glsxtrcat}{general}
  \newcommand*{\glsxtr}[1][]{%
   \def\glsxtr@keylist{##1}%
   \@glsxtr
  }
  \newcommand*{\@glsxtr}[2][]{%
   \ifglsentryexists{##2}%
   {%
     \ifblank{##1}{}{\GlsXtrWarning{##1}{##2}}%
   }%
   {%
     \gls@defglossaryentry{##2}{name={##2},category=\glsxtrcat,
       description={\nopostdesc},##1}%
   }%
   \expandafter\gls\expandafter[\glsxtr@keylist]{##2}%
  }
  \newcommand*{\Glsxtr}[1][]{%
   \def\glsxtr@keylist{##1}%
   \@Glsxtr
  }
  \glsmfuaddmap{\glsxtr}{\Glsxtr}
  \newcommand*{\@Glsxtr}[2][]{%
   \ifglsentryexists{##2}%
   {%
     \ifblank{##1}{}{\GlsXtrWarning{##1}{##2}}%
   }%
   {%
     \gls@defglossaryentry{##2}{name={##2},category=\glsxtrcat,
       description={\nopostdesc},##1}%
   }%
   \expandafter\Gls\expandafter[\glsxtr@keylist]{##2}%
  }
  \newcommand*{\glsxtrpl}[1][]{%
   \def\glsxtr@keylist{##1}%
   \@glsxtrpl
  }
  \newcommand*{\@glsxtrpl}[2][]{%
   \ifglsentryexists{##2}%
   {%
     \ifblank{##1}{}{\GlsXtrWarning{##1}{##2}}%
   }%
   {%
     \gls@defglossaryentry{##2}{name={##2},category=\glsxtrcat,
       description={\nopostdesc},##1}%
   }%
   \expandafter\glspl\expandafter[\glsxtr@keylist]{##2}%
  }
  \newcommand*{\Glsxtrpl}[1][]{%
   \def\glsxtr@keylist{##1}%
   \@Glsxtrpl
  }
  \glsmfuaddmap{\glsxtrpl}{\Glsxtrpl}
  \newcommand*{\@Glsxtrpl}[2][]{%
   \ifglsentryexists{##2}
   {%
     \ifblank{##1}{}{\GlsXtrWarning{##1}{##2}}%
   }%
   {%
     \gls@defglossaryentry{##2}{name={##2},category=\glsxtrcat,
       description={\nopostdesc},##1}%
   }%
   \expandafter\Glspl\expandafter[\glsxtr@keylist]{##2}%
  }
  \newcommand*{\GlsXtrWarning}[2]{%
    \def\@glsxtr@optlist{##1}%
    \@onelevel@sanitize\@glsxtr@optlist
    \GlossariesExtraWarning{The options `\@glsxtr@optlist' have
    been ignored for entry `##2' as it has already been defined}%
  }
  \renewcommand\@printglossary[2]{%
    \def\@glsxtr@printglossopts{##1}%
    \@glsxtr@orgprintglossary{##1}{##2}%
    \def\@glsxtr{\@glsxtr@disabledflycommand\glsxtr}%
    \def\@glsxtrpl{\@glsxtr@disabledflycommand\glsxtrpl}%
    \def\@Glsxtr{\@glsxtr@disabledflycommand\Glsxtr}%
    \def\@Glsxtrpl{\@glsxtr@disabledflycommand\Glsxtrpl}%
  }
  \newcommand*{\@glsxtr@disabledflycommand}[1]{%
    \PackageError{glossaries-extra}%
    {\string##1\space can't be used after any of the \MessageBreak
     glossaries have been displayed}%
    {The on-the-fly commands enabled by
     \string\GlsXtrEnableOnTheFly\space may only be used \MessageBreak
     before the glossaries. If you want to use any entries \MessageBreak
     after any of the glossaries, you must use the standard \MessageBreak
     method of first defining the entry and then using the \MessageBreak
     entry with commands like \string\gls}%
     \@@glsxtr@disabledflycommand
  }%
  \newcommand*{\@@glsxtr@disabledflycommand}[2][]{##2}
  \let\GlsXtrEnableOnTheFly\relax
}
\@onlypreamble\GlsXtrEnableOnTheFly
\newcommand*{\@glsxtr@current@style}{\@glossary@default@style}
\newcommand{\glsxtrpreglossarystyle}{%
  \renewcommand*{\glssubgroupheading}[4]{\glsgroupheading{##4}}%
}
\renewcommand*{\setglossarystyle}[1]{%
  \ifcsundef{@glsstyle@#1}%
  {%
    \PackageError{glossaries-extra}{Glossary style `#1' undefined}{}%
  }%
  {%
    \glsxtrpreglossarystyle
    \csname @glsstyle@#1\endcsname
    \protected@edef\@glsxtr@current@style{#1}%
  }%
  \ifx\@glossary@default@style\relax
    \protected@edef\@glossary@default@style{#1}%
  \fi
}
\ifdef\@glossary@default@style
{}
{%
  \let\@glossary@default@style\relax
}
\ifdef\glslistdottedwidth
{%
  \ifdim\glslistdottedwidth=.5\hsize
    \setlength{\glslistdottedwidth}{-\dimexpr\maxdimen-1sp\relax}
    \AtBeginDocument{%
      \ifdim\glslistdottedwidth=-\dimexpr\maxdimen-1sp\relax
       \setlength{\glslistdottedwidth}{.5\columnwidth}%
      \fi
    }%
  \fi
}
{}%
\ifdef\glsdescwidth
{%
  \ifdim\glsdescwidth=.6\hsize
    \setlength{\glsdescwidth}{-\dimexpr\maxdimen-1sp\relax}
    \AtBeginDocument{%
      \ifdim\glsdescwidth=-\dimexpr\maxdimen-1sp\relax
       \setlength{\glsdescwidth}{.6\columnwidth}%
      \fi
    }%
  \fi
}
{}%
\ifdef\glspagelistwidth
{%
  \ifdim\glspagelistwidth=.1\hsize
    \setlength{\glspagelistwidth}{-\dimexpr\maxdimen-1sp\relax}
    \AtBeginDocument{%
      \ifdim\glspagelistwidth=-\dimexpr\maxdimen-1sp\relax
       \setlength{\glspagelistwidth}{.1\columnwidth}%
      \fi
    }%
  \fi
}
{}%
\def\org@glossaryentrynumbers#1{#1\gls@save@numberlist{#1}}%
\ifx\org@glossaryentrynumbers\glossaryentrynumbers
  \glsnonumberlistfalse
  \renewcommand*{\glossaryentrynumbers}[1]{%
    \ifglsentryexists{\glscurrententrylabel}%
    {%
      \@glsxtrpreloctag
      \GlsXtrFormatLocationList{#1}%
      \@glsxtrpostloctag
      \gls@save@numberlist{#1}%
    }{}%
  }%
\else
  \glsnonumberlisttrue
  \renewcommand*{\glossaryentrynumbers}[1]{%
    \ifglsentryexists{\glscurrententrylabel}%
    {%
      \gls@save@numberlist{#1}%
    }{}%
  }%
\fi
\newcommand*{\GlsXtrFormatLocationList}[1]{#1}
\newcommand*{\GlsXtrEnablePreLocationTag}[2]{%
  \let\@glsxtrpreloctag\@@glsxtrpreloctag
  \let\@glsxtrpostloctag\@@glsxtrpostloctag
  \renewcommand*{\@glsxtr@pagetag}{#1}%
  \renewcommand*{\@glsxtr@pagestag}{#2}%
  \renewcommand*{\@glsxtr@savepreloctag}[2]{%
    \csgdef{@glsxtr@preloctag@##1}{##2}%
  }%
  \renewcommand*{\@glsxtr@doloctag}{%
    \ifcsundef{@glsxtr@preloctag@\glscurrententrylabel}%
    {%
      \GlossariesWarning{Missing pre-location tag for `\glscurrententrylabel'.
        Rerun required}%
    }%
    {%
      \csuse{@glsxtr@preloctag@\glscurrententrylabel}%
    }%
  }%
}
\@onlypreamble\GlsXtrEnablePreLocationTag
\newcommand*{\@@glsxtrpreloctag}{%
   \let\@glsxtr@org@delimN\delimN
   \let\@glsxtr@org@delimR\delimR
   \let\@glsxtr@org@glsignore\glsignore
   \gdef\@glsxtr@thisloctag{\@glsxtr@pagetag}%
   \renewcommand*{\delimN}{%
     \gdef\@glsxtr@thisloctag{\@glsxtr@pagestag}%
     \@glsxtr@org@delimN}%
   \renewcommand*{\delimR}{%
     \gdef\@glsxtr@thisloctag{\@glsxtr@pagestag}%
     \@glsxtr@org@delimR}%
   \renewcommand*{\glsignore}[1]{%
     \gdef\@glsxtr@thisloctag{\relax}%
     \@glsxtr@org@glsignore{##1}}%
   \@glsxtr@doloctag
}
\newcommand*{\@glsxtrpreloctag}{}
\newcommand*{\@glsxtr@pagetag}{}%
\newcommand*{\@glsxtr@pagestag}{}%
\newcommand*{\@@glsxtrpostloctag}{%
   \let\delimN\@glsxtr@org@delimN
   \let\delimR\@glsxtr@org@delimR
   \let\glsignore\@glsxtr@org@glsignore
   \protected@write\@auxout{}%
    {\string\@glsxtr@savepreloctag{\glscurrententrylabel}{\@glsxtr@thisloctag}}%
}
\newcommand*{\@glsxtrpostloctag}{}
\newcommand*{\@glsxtr@savepreloctag}[2]{}
\protected@write\@auxout{}{%
  \string\providecommand\string\@glsxtr@savepreloctag[2]{}}
\newcommand*{\@glsxtr@doloctag}{}
\renewcommand*{\KV@printgloss@nonumberlist}[1]{%
 \XKV@plfalse
 \XKV@sttrue
 \XKV@checkchoice[\XKV@resa]{#1}{true,false}%
 {%
   \csname glsnonumberlist\XKV@resa\endcsname
   \ifglsnonumberlist
     \def\glossaryentrynumbers##1{\gls@save@numberlist{##1}}%
   \else
     \def\glossaryentrynumbers##1{%
       \@glsxtrpreloctag
       \GlsXtrFormatLocationList{##1}%
       \@glsxtrpostloctag
       \gls@save@numberlist{##1}}%
   \fi
 }%
}
\renewcommand*{\glsentryfmt}{%
  \ifglshasshort{\glslabel}{\glssetabbrvfmt{\glscategory{\glslabel}}}{}%
  \glsifregular{\glslabel}%
  {\glsxtrregularfont{\glsgenentryfmt}}%
  {%
    \ifglshasshort{\glslabel}%
    {\glsxtrabbreviationfont{\glsxtrgenabbrvfmt}}%
    {\glsxtrregularfont{\glsgenentryfmt}}%
  }%
}
\newcommand*{\glsxtrregularfont}[1]{#1}
\newcommand*{\glsxtrabbreviationfont}[1]{#1}
\newcommand{\glsxtrdefaultentrytextfmt}[1]{#1}
\newcommand{\glsxtrattrentrytextfmt}[1]{%
  \glshasattribute{\glslabel}{innertextformat}%
  {%
    \csuse{\glsgetattribute{\glslabel}{innertextformat}}{#1}%
  }%
  {#1}%
}
\newcommand*{\glsxtrgenentrytextfmt}{\glsxtrdefaultentrytextfmt}
\newcommand*{\glsfmtfield}[4]{%
  \expandafter\expandafter\expandafter
  #2\expandafter\expandafter\expandafter
   {\csname glo@\glsdetoklabel{#3}@#4\endcsname #1}%
}
\newcommand*{\Glsfmtfield}[4]{%
  \ifx#2\@firstofone
   \expandafter\expandafter\expandafter
   \glssentencecase\expandafter\expandafter\expandafter
    {%
      \csname glo@\glsdetoklabel{#3}@#4\endcsname #1%
    }%
  \else
   \expandafter\expandafter\expandafter
   \glssentencecase\expandafter\expandafter\expandafter
    {%
      \expandafter\expandafter\expandafter
       #2\expandafter\expandafter\expandafter
        {\csname glo@\glsdetoklabel{#3}@#4\endcsname #1}%
    }%
  \fi
}
\glsmfuaddmap{\glsfmtfield}{\Glsfmtfield}
\newcommand*{\GLSfmtfield}[4]{%
  \ifx#2\@firstofone
   \expandafter\expandafter\expandafter
   \glsuppercase\expandafter\expandafter\expandafter
    {%
      \csname glo@\glsdetoklabel{#3}@#4\endcsname #1%
    }%
  \else
   \expandafter\expandafter\expandafter
   \glsuppercase\expandafter\expandafter\expandafter
    {%
      \expandafter\expandafter\expandafter
       #2\expandafter\expandafter\expandafter
        {\csname glo@\glsdetoklabel{#3}@#4\endcsname #1}%
    }%
  \fi
}
\glsmfublocker{\GLSfmtfield}
\newcommand*{\glsfmtinsert}{%
  \ifdefempty\glsinsert{}%
  {\expandafter\glsxtrgenentrytextfmt\expandafter{\glsinsert}}%
}
\newcommand*{\GLSfmtinsert}{%
  \ifdefempty\glsinsert{}%
  {%
    \expandafter\glsuppercase\expandafter
      {\expandafter\glsxtrgenentrytextfmt\expandafter{\glsinsert}}%
  }%
}
\newcommand*{\glsifapplyinnerfmtfield}[4]{%
 \ifcsundef{@glo@\glsdetoklabel{#1}@innerfmt@fields}%
 {#3}%
 {\xifinlistcs{#2}{@glo@\glsdetoklabel{#1}@innerfmt@fields}{#4}{#3}}%
}
\newcommand*{\glsexclapplyinnerfmtfield}[2]{%
 \listcseadd{@glo@\glsdetoklabel{#1}@innerfmt@fields}{#2}%
}
\renewcommand*{\glsgenentryfmt}{%
  \ifdefempty\glscustomtext
  {%
    \glsifplural
    {%
      \glscapscase
      {%
        \ifglsused\glslabel
        {%
          \glsifapplyinnerfmtfield{\glslabel}{plural}%
          {%
            \expandafter\glsaccessfmtplural\expandafter{\glsinsert}%
              {\glsxtrgenentrytextfmt}{\glslabel}%
          }%
          {\glsaccessplural{\glslabel}\glsfmtinsert}%
        }%
        {%
          \glsifapplyinnerfmtfield{\glslabel}{firstpl}%
          {%
            \expandafter\glsaccessfmtfirstplural\expandafter{\glsinsert}%
              {\glsxtrgenentrytextfmt}{\glslabel}%
          }%
          {\glsaccessfirstplural{\glslabel}\glsfmtinsert}%
        }%
      }%
      {%
        \ifglsused\glslabel
        {%
          \glsifapplyinnerfmtfield{\glslabel}{plural}%
          {%
            \expandafter\Glsaccessfmtplural\expandafter
             {\glsinsert}{\glsxtrgenentrytextfmt}{\glslabel}%
          }%
          {\Glsaccessplural{\glslabel}\glsfmtinsert}%
        }%
        {%
          \glsifapplyinnerfmtfield{\glslabel}{firstpl}%
          {%
            \expandafter\Glsaccessfmtfirstplural\expandafter
             {\glsinsert}{\glsxtrgenentrytextfmt}{\glslabel}%
          }%
          {\Glsaccessfirstplural{\glslabel}\glsfmtinsert}%
        }%
      }%
      {%
        \ifglsused\glslabel
        {%
          \glsifapplyinnerfmtfield{\glslabel}{plural}%
          {%
            \expandafter\GLSaccessfmtplural\expandafter
              {\glsinsert}{\glsxtrgenentrytextfmt}{\glslabel}%
          }%
          {\GLSaccessplural{\glslabel}\GLSfmtinsert}%
        }%
        {%
          \glsifapplyinnerfmtfield{\glslabel}{firstpl}%
          {%
            \expandafter\GLSaccessfmtfirstplural\expandafter
              {\glsinsert}{\glsxtrgenentrytextfmt}{\glslabel}%
          }%
          {\GLSaccessfirstplural{\glslabel}\GLSfmtinsert}%
        }%
      }%
    }%
    {%
      \glscapscase
      {%
        \ifglsused\glslabel
        {%
          \glsifapplyinnerfmtfield{\glslabel}{text}%
          {%
            \expandafter\glsaccessfmttext\expandafter
              {\glsinsert}{\glsxtrgenentrytextfmt}{\glslabel}%
          }%
          {\glsaccesstext{\glslabel}\glsfmtinsert}%
        }%
        {%
          \glsifapplyinnerfmtfield{\glslabel}{first}%
          {%
            \expandafter\glsaccessfmtfirst\expandafter
             {\glsinsert}{\glsxtrgenentrytextfmt}{\glslabel}%
          }%
          {\glsaccessfirst{\glslabel}\glsfmtinsert}%
        }%
      }%
      {%
        \ifglsused\glslabel
        {%
          \glsifapplyinnerfmtfield{\glslabel}{text}%
          {%
            \expandafter\Glsaccessfmttext\expandafter
              {\glsinsert}{\glsxtrgenentrytextfmt}{\glslabel}%
          }%
          {\Glsaccesstext{\glslabel}\glsfmtinsert}%
        }%
        {%
          \glsifapplyinnerfmtfield{\glslabel}{first}%
          {%
            \expandafter\Glsaccessfmtfirst\expandafter
              {\glsinsert}{\glsxtrgenentrytextfmt}{\glslabel}%
          }%
          {\Glsaccessfirst{\glslabel}\glsfmtinsert}%
        }%
      }%
      {%
        \ifglsused\glslabel
        {%
          \glsifapplyinnerfmtfield{\glslabel}{text}%
          {%
            \expandafter\GLSaccessfmttext\expandafter
              {\glsinsert}{\glsxtrgenentrytextfmt}{\glslabel}%
          }%
          {\GLSaccesstext{\glslabel}\GLSfmtinsert}%
        }%
        {%
          \glsifapplyinnerfmtfield{\glslabel}{first}%
          {%
            \expandafter\GLSaccessfmtfirst\expandafter
              {\glsinsert}{\glsxtrgenentrytextfmt}{\glslabel}%
          }%
          {\GLSaccessfirst{\glslabel}\GLSfmtinsert}%
        }%
      }%
    }%
  }%
  {%
    \glscustomtext
  }%
}
\newcommand*{\glsxtrifwasglslike}[2]{#2}
\newcommand*{\glsxtrifwasglslikeandfirstuse}[2]{%
  \glsxtrifwasglslike
  {%
    \glsxtrifwasfirstuse{#1}{#2}%
  }{#2}%
}
\newcommand*{\glsxtrifwassubsequentuse}[2]{%
  \glsxtrifwasglslike
  {%
    \glsxtrifwasfirstuse{#2}{#1}%
  }{#2}%
}
\newcommand*{\glsxtrifallcaps}[2]{\glscapscase{#2}{#1}{#1}}
\newcommand*{\glsxtrcurrentfield}{}
\newcommand*{\glsxtr@shortfieldname}{short}
\newcommand*{\glsxtrifwassubsequentorshort}[2]{%
  \glsxtrifwasglslike
  {%
    \glsxtrifwasfirstuse{#2}{#1}%
  }%
  {\ifdefequal\glsxtrcurrentfield\glsxtr@shortfieldname{#1}{#2}}%
}
\renewcommand{\@gls@field@link}[4][]{%
  \@glsxtr@record{#2}{#3}{glslink}%
  \glsdoifexists{#3}%
  {%
    \let\glsxtrorg@ifKV@glslink@hyper\ifKV@glslink@hyper
    \@gls@save@glslocal
    \glsinitreunsets
    \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper
    \def\glscustomtext{#4}%
    \@glsxtr@field@linkdefs
    #1%
    \@gls@link[#2]{#3}{#4}%
    \let\ifKV@glslink@hyper\glsxtrorg@ifKV@glslink@hyper
    \@gls@restore@glslocal
  }%
  \glspostlinkhook
}
\let\@glsxtr@org@gls@\@gls@
\def\@gls@#1#2{%
  \def\glsxtrcurrentfield{}%
  \@glsxtr@record{#1}{#2}{glslink}%
  \@glsxtr@org@gls@{#1}{#2}%
}%
\let\@glsxtr@org@glspl@\@glspl@
\def\@glspl@#1#2{%
  \def\glsxtrcurrentfield{}%
  \@glsxtr@record{#1}{#2}{glslink}%
  \@glsxtr@org@glspl@{#1}{#2}%
}%
\let\@glsxtr@org@Gls@\@Gls@
\def\@Gls@#1#2{%
  \def\glsxtrcurrentfield{}%
  \@glsxtr@record{#1}{#2}{glslink}%
  \@glsxtr@org@Gls@{#1}{#2}%
}%
\let\@glsxtr@org@Glspl@\@Glspl@
\def\@Glspl@#1#2{%
  \def\glsxtrcurrentfield{}%
  \@glsxtr@record{#1}{#2}{glslink}%
  \@glsxtr@org@Glspl@{#1}{#2}%
}%
\let\@glsxtr@org@GLS@\@GLS@
\def\@GLS@#1#2{%
  \def\glsxtrcurrentfield{}%
  \@glsxtr@record{#1}{#2}{glslink}%
  \@glsxtr@org@GLS@{#1}{#2}%
}%
\let\@glsxtr@org@GLSpl@\@GLSpl@
\def\@GLSpl@#1#2{%
  \def\glsxtrcurrentfield{}%
  \@glsxtr@record{#1}{#2}{glslink}%
  \@glsxtr@org@GLSpl@{#1}{#2}%
}%
\renewcommand*{\@glsdisp}[3][]{%
  \def\glsxtrcurrentfield{}%
  \@glsxtr@record{#1}{#2}{glslink}%
  \glsdoifexists{#2}{%
    \let\do@gls@link@checkfirsthyper\@gls@link@checkfirsthyper
    \let\glsifplural\@secondoftwo
    \let\glscapscase\@firstofthree
    \def\glscustomtext{\glsxtrgenentrytextfmt{#3}}%
    \def\glsinsert{}%
    \def\@glo@text{\csname gls@\glstype @entryfmt\endcsname}%
    \@gls@link[#1]{#2}{\@glo@text}%
    \@gls@do@glsunset{#2}%
  }%
  \glspostlinkhook
}
\renewcommand*{\@gls@@link}[3][]{%
  \def\glsxtrcurrentfield{}%
  \@glsxtr@record{#1}{#2}{glslink}%
  \glsdoifexistsordo{#2}%
  {%
    \let\do@gls@link@checkfirsthyper\relax
    \def\glscustomtext{#3}%
    \def\glsinsert{}%
    \@glsxtr@field@linkdefs
    \@gls@link[#1]{#2}{\glsxtrgenentrytextfmt{#3}}%
  }%
  {%
    \glstextformat{#3}%
  }%
  \glspostlinkhook
}
\newcommand*{\glsxtrinitwrgloss}{%
 \glsifattribute{\glslabel}{wrgloss}{after}%
 {%
   \glsxtrinitwrglossbeforefalse
 }%
 {%
   \glsxtrinitwrglossbeforetrue
 }%
}
\newif\ifglsxtrinitwrglossbefore
\glsxtrinitwrglossbeforetrue
\newcommand*{\setupglslink}[1]{\setkeys{glslink}{#1}}
\newcommand*{\setupglsadd}[1]{\setkeys{glsadd}{#1}}
\newcommand*{\@gls@do@glsprereset}[1]{}
\define@choicekey{glslink}{prereset}%
[\@glsxtr@preresetval\@glsxtr@preresetnr]%
{none,local,global}[local]%
{%
  \ifcase\@glsxtr@preresetnr
   \let\@gls@do@glsprereset\@gobble
  \or
   \def\@gls@do@glsprereset{%
     \let\@gls@link@postkeys@checkfirsthyper\do@gls@link@checkfirsthyper
     \let\glsxtrifwasfirstuse\@firstoftwo\glslocalreset}%
  \or
   \def\@gls@do@glsprereset{%
     \let\@gls@link@postkeys@checkfirsthyper\do@gls@link@checkfirsthyper
     \let\glsxtrifwasfirstuse\@firstoftwo\glsreset}%
  \fi
}
\newcommand*{\@gls@do@glspreunset}[1]{}
\ifdef\@gls@glslink@hyper@update@hook
{%
  \renewcommand*{\@gls@glslink@hyper@update@hook}{%
    \let\@gls@if@glslink@hyper@updated\@firstoftwo
  }
}
{
  \newcommand*{\@gls@glslink@hyper@update@hook}{%
    \let\@gls@if@glslink@hyper@updated\@firstoftwo
  }
  \renewcommand*{\KV@glslink@hyper}[1]{%
    \XKV@plfalse\XKV@sttrue
    \XKV@checkchoice[\XKV@resa ]{#1}{true,false}%
     {\csname KV@glslink@hyper\XKV@resa\endcsname\@gls@glslink@hyper@update@hook}%
  }
}
\define@choicekey{glslink}{preunset}%
[\@glsxtr@preunsetval\@glsxtr@preunsetnr]%
{none,local,global}[local]%
{%
  \ifcase\@glsxtr@preunsetnr
   \let\@gls@do@glspreunset\@gobble
  \or
   \def\@gls@do@glspreunset{%
     \let\@gls@link@postkeys@checkfirsthyper\do@gls@link@checkfirsthyper
     \let\glsxtrifwasfirstuse\@secondoftwo\glslocalunset}%
  \or
   \def\@gls@do@glspreunset{%
     \let\@gls@link@postkeys@checkfirsthyper\do@gls@link@checkfirsthyper
     \let\glsxtrifwasfirstuse\@secondoftwo\glsunset}%
  \fi
}
\define@choicekey{glslink}{postunset}%
[\@glsxtr@postunsetval\@glsxtr@postunsetnr]%
{none,local,global}[global]%
{%
  \ifcase\@glsxtr@postunsetnr
    \let\@gls@restore@glslocal\@gls@ignore@restore@glslocal
  \or
    \let\@gls@restore@glslocal\@gls@default@restore@glslocal
    \KV@glslink@localtrue
  \or
    \let\@gls@restore@glslocal\@gls@default@restore@glslocal
    \KV@glslink@localfalse
  \fi
}
\newcommand*{\glsinitreunsets}{%
  \let\@gls@do@glspreunset\@gobble
  \let\@gls@do@glsprereset\@gobble
  \let\@gls@restore@glslocal\@gls@default@restore@glslocal
  \@glsxtrbuffer@check@repeats
}
\define@choicekey{glslink}{wrgloss}%
[\@glsxtr@wrglossval\@glsxtr@wrglossnr]%
{before,after}%
{%
  \ifcase\@glsxtr@wrglossnr\relax
    \glsxtrinitwrglossbeforetrue
  \or
    \glsxtrinitwrglossbeforefalse
  \fi
}
\define@key{glslink}{thevalue}{\def\@glsxtr@thevalue{#1}}
\define@key{glslink}{theHvalue}{\def\@glsxtr@theHvalue{#1}}
\define@boolkey{glslink}[glsxtr@]{hyperoutside}[true]{}
\glsxtr@hyperoutsidetrue
\newcommand*{\@glsxtr@current@textformat@csname}{glstextformat}
\newcommand*{\@glsxtr@current@innertextformat@csname}{glsxtrdefaultentrytextfmt}
\newcommand*{\glsxtrassignlinktextfmt}{}
\define@key{glslink}{textformat}{%
  \ifcsdef{#1}
  {%
    \letcs{\@glsxtr@local@textformat}{#1}%
    \def\@glsxtr@current@textformat@csname{#1}%
  }%
  {%
    \PackageError{glossaries-extra}{Unknown control sequence name `#1'}{}%
  }%
}
\define@key{glslink}{innertextformat}{%
  \ifcsdef{#1}
  {%
    \letcs{\@glsxtr@local@innertextformat}{#1}%
    \def\@glsxtr@current@innertextformat@csname{#1}%
  }%
  {%
    \PackageError{glossaries-extra}{Unknown control sequence name `#1'}{}%
  }%
}
\define@key{glslink}{prefix}{\def\glolinkprefix{#1}}
\newcommand*{\glsxtrinithyperoutside}{%
 \glsifattribute{\glslabel}{hyperoutside}{false}%
 {%
   \glsxtr@hyperoutsidefalse
 }%
 {%
   \glsxtr@hyperoutsidetrue
 }%
}
\newcommand*{\glsxtr@inc@linkcount}{}
\newcommand*{\glslinkpresetkeys}{}
\newrobustcmd*{\GlsXtrExpandedFmt}[2]{%
  \protected@edef\@glsxtr@tmp{#2}%
  \expandafter#1\expandafter{\@glsxtr@tmp}%
}
\newcommand*{\@glsxtr@use@equation@counter}{%
  \@glsxtr@ifnum@mmode{\def\@gls@counter{equation}}{}%
}
\newcommand*{\glsxtr@do@autoadd}[1]{}
\newcommand*{\GlsXtrAutoAddOnFormat}[3][\glslabel]{%
  \renewcommand*{\glsxtr@do@autoadd}[1]{%
    \begingroup
      \protected@edef\@glsxtr@do@autoadd{%
         \noexpand\ifstrequal{##1}{glslink}%
         {%
           \noexpand\DTLifinlist{\@glsnumberformat}{#2}{\noexpand\glsadd[format={\@glsnumberformat},#3]{#1}}{}%
         }%
         {}%
      }%
      \@glsxtr@do@autoadd
    \endgroup
  }%
}
\providecommand*{\glslinkwrcontent}[1]{#1}
\newcommand*{\@glslink@prefix@label}[1]{%
 \@glslink{\glolinkprefix\glslabel}{#1}}
\newcommand*{\@noglslink@prefix@label}[1]{%
  \glsdonohyperlink{\glolinkprefix\glslabel}{#1}}
\def\@gls@link[#1]#2#3{%
  \leavevmode
  \protected@edef\glslabel{\glsdetoklabel{#2}}%
  \def\@gls@link@opts{#1}%
  \let\@gls@link@label\glslabel
  \let\@glsnumberformat\@glsxtr@defaultnumberformat
  \protected@edef\@gls@counter{\csname glo@\glslabel @counter\endcsname}%
  \protected@edef\glstype{\csname glo@\glslabel @type\endcsname}%
  \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper
  \@gls@save@glslocal
  \glsinitreunsets
  \let\@glsxtr@org@glolinkprefix\glolinkprefix
  \let\@glsxtr@local@textformat\relax
  \def\@glsxtr@current@textformat@csname{glstextformat}%
  \let\@glsxtr@local@innertextformat\glsxtrdefaultentrytextfmt
  \def\@glsxtr@current@innertextformat@csname{glsxtrdefaultentrytextfmt}%
  \def\@glsxtr@thevalue{}%
  \def\@glsxtr@theHvalue{\@glsxtr@thevalue}%
  \glsxtrinitwrgloss
  \glsxtrinithyperoutside
  \@gls@setdefault@glslink@opts
   \glsxtr@inc@linkcount
   \if@glsxtr@equations
     \@glsxtr@use@equation@counter
   \fi
  \do@glsdisablehyperinlist
  \do@gls@link@checkfirsthyper
  \let\@gls@if@glslink@hyper@updated\@secondoftwo
  \let\@gls@link@postkeys@checkfirsthyper\relax
  \glslinkpresetkeys
  \setkeys{glslink}{#1}%
  \glsxtr@do@autoadd{glslink}%
  \glslinkpostsetkeys
  \@gls@do@glsprereset{#2}%
  \@gls@do@glspreunset{#2}%
  \@gls@if@glslink@hyper@updated{}{\@gls@link@postkeys@checkfirsthyper}%
  \let\glsxtrgenentrytextfmt\@glsxtr@local@innertextformat
  \ifdefempty{\@glsxtr@thevalue}%
  {%
    \@gls@saveentrycounter
  }%
  {%
    \let\theglsentrycounter\@glsxtr@thevalue
    \def\theHglsentrycounter{\@glsxtr@theHvalue}%
  }%
  \@gls@setsort{\glslabel}%
  \ifx\@glsxtr@local@textformat\relax
     \glshasattribute{\glslabel}{textformat}%
     {%
       \protected@edef\@glsxtr@attrval{\glsgetattribute{\glslabel}{textformat}}%
       \ifcsdef{\@glsxtr@attrval}%
       {%
         \letcs{\@glsxtr@textformat}{\@glsxtr@attrval}%
         \let\@glsxtr@current@textformat@csname\@glsxtr@attrval
       }%
       {%
         \GlossariesExtraWarning{Unknown control sequence name
         `\@glsxtr@attrval' supplied in textformat attribute
         for entry `\glslabel'. Reverting to default \string\glstextformat}%
         \let\@glsxtr@textformat\glstextformat
       }%
     }%
     {%
       \let\@glsxtr@textformat\glstextformat
     }%
  \else
     \let\@glsxtr@textformat\@glsxtr@local@textformat
  \fi
  \edef\glsxtrassignlinktextfmt{%
    \noexpand\def\noexpand\glslabel{\expandonce\glslabel}%
    \noexpand\letcs\noexpand\glstextformat{\@glsxtr@current@textformat@csname}%
    \noexpand\letcs\noexpand\glsxtrgenentrytextfmt
      {\@glsxtr@current@innertextformat@csname}%
  }%
  \glslinkwrcontent
  {%
    \ifglsxtrinitwrglossbefore
      \glsxtr@wrglossary@encap{#2}{\@do@wrglossary{#2}}%
    \fi
    \ifKV@glslink@hyper
      \ifglsxtr@hyperoutside
       \@glslink@prefix@label{\@glsxtr@textformat{#3}}%
      \else
       \@glsxtr@textformat{\@glslink@prefix@label{#3}}%
      \fi
    \else
      \ifglsxtr@hyperoutside
       \@noglslink@prefix@label{\@glsxtr@textformat{#3}}%
      \else
       \@glsxtr@textformat{\@noglslink@prefix@label{#3}}%
      \fi
    \fi
    \ifglsxtrinitwrglossbefore
    \else
      \glsxtr@wrglossary@encap{#2}{\@do@wrglossary{#2}}%
    \fi
  }%
  \let\glolinkprefix\@glsxtr@org@glolinkprefix
  \let\ifKV@glslink@hyper\org@ifKV@glslink@hyper
  \@gls@restore@glslocal
}
\define@key{glossadd}{thevalue}{\def\@glsxtr@thevalue{#1}}
\define@key{glossadd}{theHvalue}{\def\@glsxtr@theHvalue{#1}}
\newcommand*{\glsaddpresetkeys}{}

\newcommand*{\glsaddpostsetkeys}{}
\renewrobustcmd*{\glsadd}[2][]{%
  \glsxtrifinmark
  {}%
  {%
    \@gls@adjustmode
    \begingroup
    \@glsadd{#1}{#2}%
    \endgroup
  }%
}
\newcommand{\@glsadd}[2]{%
  \@glsxtr@record{#1}{#2}{glossadd}%
  \glsdoifexists{#2}%
  {%
    \let\@glsnumberformat\@glsxtr@defaultnumberformat
    \protected@edef\@gls@counter{\csname glo@\glsdetoklabel{#2}@counter\endcsname}%
    \def\@glsxtr@thevalue{}%
    \def\@glsxtr@theHvalue{\@glsxtr@thevalue}%
    \glsaddpresetkeys
    \setkeys{glossadd}{#1}%
    \glsaddpostsetkeys
    \ifdefempty{\@glsxtr@thevalue}%
    {%
      \@gls@saveentrycounter
    }%
    {%
      \let\theglsentrycounter\@glsxtr@thevalue
      \def\theHglsentrycounter{\@glsxtr@theHvalue}%
    }%
    \@gls@setsort{#2}%
    \KV@glslink@noindexfalse
    \glsxtr@wrglossary@encap{#2}{\@@do@wrglossary{#2}}%
  }%
}
\newrobustcmd{\glsaddeach}[2][]{%
  \glsxtrifinmark
  {}%
  {%
    \@gls@adjustmode
    \@for\@gls@thislabel:=#2\do{{\@glsadd{#1}{\@gls@thislabel}}}%
  }%
}
\newcommand{\glsxtr@rangeformat}{\@glsxtr@defaultnumberformat}
\newcommand*{\GlsXtrSetDefaultRangeFormat}[1]{%
  \renewcommand*{\glsxtr@rangeformat}{#1}%
}%
\newrobustcmd{\glsstartrange}[2][]{%
  \glsxtrifinmark
  {}%
  {%
    \@gls@adjustmode
    \begingroup
    \appto\glsaddpresetkeys{\protected@edef\@glsnumberformat{\glsxtr@rangeformat}}%
    \appto\glsaddpostsetkeys{\protected@edef\@glsnumberformat{(\@glsnumberformat}}%
    \@for\@gls@thislabel:=#2\do{\@glsadd{#1}{\@gls@thislabel}}%
    \endgroup
  }%
}
\newrobustcmd{\glsendrange}[2][]{%
  \glsxtrifinmark
  {}%
  {%
    \@gls@adjustmode
    \begingroup
    \appto\glsaddpresetkeys{\protected@edef\@glsnumberformat{\glsxtr@rangeformat}}%
    \appto\glsaddpostsetkeys{\protected@edef\@glsnumberformat{)\@glsnumberformat}}%
    \@for\@gls@thislabel:=#2\do{\@glsadd{#1}{\@gls@thislabel}}%
    \endgroup
  }%
}
\newcommand*{\@glsxtr@field@linkdefs}{%
  \let\glsxtrifwasglslike\@secondoftwo
  \let\glsxtrifwasfirstuse\@secondoftwo
  \let\glsifplural\@secondoftwo
  \let\glscapscase\@firstofthree
}
\newcommand*{\glsxtrassignfieldfont}[1]{%
  \ifglsentryexists{#1}%
  {%
    \ifglshasshort{#1}%
    {%
      \glssetabbrvfmt{\glscategory{#1}}%
      \glsifregular{#1}%
      {\let\@gls@field@font\glsxtrregularfont}%
      {\let\@gls@field@font\@firstofone}%
    }%
    {%
      \glsifnotregular{#1}%
      {\let\@gls@field@font\@firstofone}%
      {\let\@gls@field@font\glsxtrregularfont}%
    }%
  }%
  {%
    \let\@gls@field@font\@gobble
  }%
}
\newcommand*{\glsxtrsaveinsert}[2]{\def\glsinsert{}}
\newcommand*{\glsxtrfullsaveinsert}{\glsxtrsaveinsert}
\def\@glstext@#1#2[#3]{%
  \def\glsxtrcurrentfield{text}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link{#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{text}%
    {%
      \@gls@field@font{\glsaccessfmttext{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\glsaccesstext{#2}\glsxtrgenentrytextfmt{#3}}%
    }%
  }%
}
\def\@GLStext@#1#2[#3]{%
  \def\glsxtrcurrentfield{text}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link[\let\glscapscase\@thirdofthree]{#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{text}%
    {%
      \@gls@field@font{\GLSaccessfmttext{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \ifx\glscapscase\@thirdofthree
        \@gls@field@font{\GLSaccesstext{#2}%
          \glsuppercase{\glsxtrgenentrytextfmt{#3}}}%
      \else
        \@gls@field@font{\glsaccesstext{#2}\glsxtrgenentrytextfmt{#3}}%
      \fi
    }%
  }%
}
\def\@Glstext@#1#2[#3]{%
  \def\glsxtrcurrentfield{text}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link[\let\glscapscase\@secondofthree]{#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{text}%
    {%
      \@gls@field@font{\Glsaccessfmttext{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\Glsaccesstext{#2}\glsxtrgenentrytextfmt{#3}}%
    }%
  }%
}
\newcommand*{\glsxtrchecknohyperfirst}[1]{%
  \glsifattribute{#1}{nohyperfirst}{true}{\KV@glslink@hyperfalse}{}%
}
\def\@glsfirst@#1#2[#3]{%
  \def\glsxtrcurrentfield{first}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link
  [\let\glsxtrifwasfirstuse\@firstoftwo
   \glsxtrchecknohyperfirst{#2}%
   \glsxtr@check@complexstyle{#2}{#3}%
  ]{#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{first}%
    {%
      \@gls@field@font{\glsaccessfmtfirst{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\glsaccessfirst{#2}\glsxtrgenentrytextfmt{#3}}%
    }%
  }%
}
\def\@Glsfirst@#1#2[#3]{%
  \def\glsxtrcurrentfield{first}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link
  [\let\glsxtrifwasfirstuse\@firstoftwo
   \let\glscapscase\@secondofthree
   \glsxtrchecknohyperfirst{#2}%
   \glsxtr@check@complexstyle{#2}{#3}%
  ]%
  {#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{first}%
    {%
      \@gls@field@font{\Glsaccessfmtfirst{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\Glsaccessfirst{#2}\glsxtrgenentrytextfmt{#3}}%
    }%
  }%
}
\def\@GLSfirst@#1#2[#3]{%
  \def\glsxtrcurrentfield{first}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link
  [\let\glsxtrifwasfirstuse\@firstoftwo
   \let\glscapscase\@thirdofthree
   \glsxtrchecknohyperfirst{#2}%
   \glsxtr@check@complexstyle{#2}{#3}%
  ]%
  {#1}{#2}%
  {%
   \ifx\glscapscase\@thirdofthree
    \glsifapplyinnerfmtfield{#2}{first}%
    {%
      \@gls@field@font{\GLSaccessfmtfirst{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\GLSaccessfirst{#2}%
        \glsuppercase{\glsxtrgenentrytextfmt{#3}}}%
    }%
   \else
    \glsifapplyinnerfmtfield{#2}{first}%
    {%
      \@gls@field@font{\glsaccessfmtfirst{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\glsaccessfirst{#2}\glsxtrgenentrytextfmt{#3}}%
    }%
   \fi
  }%
}
\def\@glsplural@#1#2[#3]{%
  \def\glsxtrcurrentfield{text}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link
   [\let\glsifplural\@firstoftwo
    \glsxtr@check@complexstyle{#2}{#3}%
   ]{#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{plural}%
    {%
      \@gls@field@font{\glsaccessfmtplural{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\glsaccessplural{#2}\glsxtrgenentrytextfmt{#3}}%
    }%
  }%
}
\def\@Glsplural@#1#2[#3]{%
  \def\glsxtrcurrentfield{text}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link
  [\let\glsifplural\@firstoftwo
   \let\glscapscase\@secondofthree
    \glsxtr@check@complexstyle{#2}{#3}%
  ]%
  {#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{plural}%
    {%
      \@gls@field@font{\Glsaccessfmtplural{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\Glsaccessplural{#2}\glsxtrgenentrytextfmt{#3}}%
    }%
  }%
}
\def\@GLSplural@#1#2[#3]{%
  \def\glsxtrcurrentfield{text}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link
  [\let\glsifplural\@firstoftwo
   \let\glscapscase\@thirdofthree
   \glsxtr@check@complexstyle{#2}{#3}%
  ]%
  {#1}{#2}%
  {%
   \ifx\glscapscase\@thirdofthree
    \glsifapplyinnerfmtfield{#2}{plural}%
    {%
      \@gls@field@font{\GLSaccessfmtplural{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\GLSaccessplural{#2}%
         \glsuppercase{\glsxtrgenentrytextfmt{#3}}}%
    }%
   \else
    \glsifapplyinnerfmtfield{#2}{plural}%
    {%
      \@gls@field@font{\glsaccessfmtplural{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\glsaccessplural{#2}\glsxtrgenentrytextfmt{#3}}%
    }%
   \fi
  }%
}
\def\@glsfirstplural@#1#2[#3]{%
  \def\glsxtrcurrentfield{first}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link
  [\let\glsxtrifwasfirstuse\@firstoftwo
   \let\glsifplural\@firstoftwo
   \glsxtrchecknohyperfirst{#2}%
   \glsxtr@check@complexstyle{#2}{#3}%
  ]%
  {#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{firstpl}%
    {%
      \@gls@field@font{\glsaccessfmtfirstplural{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\glsaccessfirstplural{#2}\glsxtrgenentrytextfmt{#3}}%
    }%
  }%
}
\def\@Glsfirstplural@#1#2[#3]{%
  \def\glsxtrcurrentfield{first}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link
  [\let\glsxtrifwasfirstuse\@firstoftwo
   \let\glsifplural\@firstoftwo
   \let\glscapscase\@secondofthree
   \glsxtrchecknohyperfirst{#2}%
   \glsxtr@check@complexstyle{#2}{#3}%
  ]%
  {#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{firstpl}%
    {%
      \@gls@field@font{\Glsaccessfmtfirstplural{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\Glsaccessfirstplural{#2}\glsxtrgenentrytextfmt{#3}}%
    }%
  }%
}
\def\@GLSfirstplural@#1#2[#3]{%
  \def\glsxtrcurrentfield{first}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link
  [\let\glsxtrifwasfirstuse\@firstoftwo
   \let\glsifplural\@firstoftwo
   \let\glscapscase\@thirdofthree
   \glsxtrchecknohyperfirst{#2}%
   \glsxtr@check@complexstyle{#2}{#3}%
  ]%
  {#1}{#2}%
  {%
   \ifx\glscapscase\@thirdofthree
    \glsifapplyinnerfmtfield{#2}{firstpl}%
    {%
      \@gls@field@font{\GLSaccessfmtfirstplural{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\GLSaccessfirstplural{#2}%
       \glsuppercase{\glsxtrgenentrytextfmt{#3}}}%
    }%
   \else
    \glsifapplyinnerfmtfield{#2}{firstpl}%
    {%
      \@gls@field@font{\glsaccessfmtfirstplural{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\glsaccessfirstplural{#2}\glsxtrgenentrytextfmt{#3}}%
    }%
   \fi
  }%
}
\def\@glsname@#1#2[#3]{%
  \def\glsxtrcurrentfield{name}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link{#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{name}%
    {%
      \@gls@field@font{\glsaccessfmtname{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\glsaccessname{#2}\glsxtrgenentrytextfmt{#3}}%
    }%
  }%
}
\def\@Glsname@#1#2[#3]{%
  \def\glsxtrcurrentfield{name}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link
  [\let\glscapscase\@secondofthree]{#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{name}%
    {%
      \@gls@field@font{\Glsaccessfmtname{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\Glsaccessname{#2}\glsxtrgenentrytextfmt{#3}}%
    }%
  }%
}
\def\@GLSname@#1#2[#3]{%
  \def\glsxtrcurrentfield{name}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link[\let\glscapscase\@thirdofthree]%
  {#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{name}%
    {%
      \@gls@field@font{\GLSaccessfmtname{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\GLSaccessname{#2}%
       \glsuppercase{\glsxtrgenentrytextfmt{#3}}}%
    }%
  }%
}
\def\@glsdesc@#1#2[#3]{%
  \def\glsxtrcurrentfield{description}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link{#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{desc}%
    {%
      \@gls@field@font{\glsaccessfmtdesc{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\glsaccessdesc{#2}\glsxtrgenentrytextfmt{#3}}%
    }%
  }%
}
\def\@Glsdesc@#1#2[#3]{%
  \def\glsxtrcurrentfield{description}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link
  [\let\glscapscase\@secondofthree]{#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{desc}%
    {%
      \@gls@field@font{\Glsaccessfmtdesc{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\Glsaccessdesc{#2}\glsxtrgenentrytextfmt{#3}}%
    }%
  }%
}
\def\@GLSdesc@#1#2[#3]{%
  \def\glsxtrcurrentfield{description}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link[\let\glscapscase\@thirdofthree]%
  {#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{desc}%
    {%
      \@gls@field@font{\GLSaccessfmtdesc{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\GLSaccessdesc{#2}%
       \glsuppercase{\glsxtrgenentrytextfmt{#3}}}%
    }%
  }%
}
\def\@glsdescplural@#1#2[#3]{%
  \def\glsxtrcurrentfield{description}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link
  [\let\glscapscase\@secondofthree
   \let\glsifplural\@firstoftwo
  ]{#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{descplural}%
    {%
      \@gls@field@font{\glsaccessfmtdescpl{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\glsaccessdescplural{#2}\glsxtrgenentrytextfmt{#3}}%
    }%
  }%
}
\def\@Glsdescplural@#1#2[#3]{%
  \def\glsxtrcurrentfield{description}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link
  [\let\glscapscase\@secondofthree
   \let\glsifplural\@firstoftwo
  ]{#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{descplural}%
    {%
      \@gls@field@font{\Glsaccessfmtdescpl{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\Glsaccessdescplural{#2}#3}%
    }%
  }%
}
\def\@GLSdescplural@#1#2[#3]{%
  \def\glsxtrcurrentfield{description}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link
  [\let\glscapscase\@thirdofthree
   \let\glsifplural\@firstoftwo
  ]%
  {#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{descplural}%
    {%
      \@gls@field@font{\GLSaccessfmtdescplural{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\GLSaccessdescplural{#2}%
        \glsuppercase{\glsxtrgenentrytextfmt{#3}}}%
    }%
  }%
}
\def\@glssymbol@#1#2[#3]{%
  \def\glsxtrcurrentfield{symbol}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link{#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{symbol}%
    {%
      \@gls@field@font{\glsaccessfmtsymbol{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\glsaccesssymbol{#2}\glsxtrgenentrytextfmt{#3}}%
    }%
  }%
}
\def\@Glssymbol@#1#2[#3]{%
  \def\glsxtrcurrentfield{symbol}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link
  [\let\glscapscase\@secondofthree]%
  {#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{symbol}%
    {%
      \@gls@field@font{\Glsaccessfmtsymbol{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\Glsaccesssymbol{#2}\glsxtrgenentrytextfmt{#3}}%
    }%
  }%
}
\def\@GLSsymbol@#1#2[#3]{%
  \def\glsxtrcurrentfield{symbol}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link[\let\glscapscase\@thirdofthree]%
  {#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{symbol}%
    {%
      \@gls@field@font{\GLSaccessfmtsymbol{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\GLSaccesssymbol{#2}%
       \glsuppercase{\glsxtrgenentrytextfmt{#3}}}%
    }%
  }%
}
\def\@glssymbolplural@#1#2[#3]{%
  \def\glsxtrcurrentfield{symbol}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link
  [\let\glscapscase\@secondofthree
   \let\glsifplural\@firstoftwo
  ]{#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{symbolplural}%
    {%
      \@gls@field@font{\glsaccessfmtsymbolplural{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\glsaccesssymbolplural{#2}\glsxtrgenentrytextfmt{#3}}%
    }%
  }%
}
\def\@Glssymbolplural@#1#2[#3]{%
  \def\glsxtrcurrentfield{symbol}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link
  [\let\glscapscase\@secondofthree
   \let\glsifplural\@firstoftwo
  ]{#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{symbolplural}%
    {%
      \@gls@field@font{\Glsaccessfmtsymbolplural{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\Glsaccesssymbolplural{#2}\glsxtrgenentrytextfmt{#3}}%
    }%
  }%
}
\def\@GLSsymbolplural@#1#2[#3]{%
  \def\glsxtrcurrentfield{symbol}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link
  [\let\glscapscase\@thirdofthree
   \let\glsifplural\@firstoftwo
  ]%
  {#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{symbolplural}%
    {%
      \@gls@field@font{\GLSaccessfmtsymbolplural{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\GLSaccesssymbolplural{#2}%
        \glsuppercase{\glsxtrgenentrytextfmt{#3}}}%
    }%
  }%
}
\def\@glsuseri@#1#2[#3]{%
  \def\glsxtrcurrentfield{user1}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link
  {#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{useri}%
    {%
      \@gls@field@font{\glsaccessfmtuseri{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\glsaccessuseri{#2}\glsxtrgenentrytextfmt{#3}}%
    }%
  }%
}
\def\@Glsuseri@#1#2[#3]{%
  \def\glsxtrcurrentfield{user1}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link
  [\let\glscapscase\@secondofthree]{#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{useri}%
    {%
      \@gls@field@font{\Glsaccessfmtuseri{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\Glsaccessuseri{#2}\glsxtrgenentrytextfmt{#3}}%
    }%
  }%
}
\def\@GLSuseri@#1#2[#3]{%
  \def\glsxtrcurrentfield{user1}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link[\let\glscapscase\@thirdofthree]%
  {#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{useri}%
    {%
      \@gls@field@font{\GLSaccessfmtuseri{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \ifx\glscapscase\@thirdofthree
        \@gls@field@font{\GLSaccessuseri{#2}%
          \glsuppercase{\glsxtrgenentrytextfmt{#3}}}%
      \else
        \@gls@field@font{\glsaccessuseri{#2}\glsxtrgenentrytextfmt{#3}}%
      \fi
    }%
  }%
}
\def\@glsuserii@#1#2[#3]{%
  \def\glsxtrcurrentfield{user2}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link
  {#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{userii}%
    {%
      \@gls@field@font{\glsaccessfmtuserii{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\glsaccessuserii{#2}\glsxtrgenentrytextfmt{#3}}%
    }%
  }%
}
\def\@Glsuserii@#1#2[#3]{%
  \def\glsxtrcurrentfield{user2}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link
  [\let\glscapscase\@secondofthree]%
  {#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{userii}%
    {%
      \@gls@field@font{\Glsaccessfmtuserii{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\Glsaccessuserii{#2}\glsxtrgenentrytextfmt{#3}}%
    }%
  }%
}
\def\@GLSuserii@#1#2[#3]{%
  \def\glsxtrcurrentfield{user2}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link[\let\glscapscase\@thirdofthree]%
  {#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{userii}%
    {%
      \@gls@field@font{\GLSaccessfmtuserii{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \ifx\glscapscase\@thirdofthree
        \@gls@field@font{\GLSaccessuserii{#2}%
          \glsuppercase{\glsxtrgenentrytextfmt{#3}}}%
      \else
        \@gls@field@font{\glsaccessuserii{#2}\glsxtrgenentrytextfmt{#3}}%
      \fi
    }%
  }%
}
\def\@glsuseriii@#1#2[#3]{%
  \def\glsxtrcurrentfield{user3}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link
  {#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{useriii}%
    {%
      \@gls@field@font{\glsaccessfmtuseriii{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\glsaccessuseriii{#2}\glsxtrgenentrytextfmt{#3}}%
    }%
  }%
}
\def\@Glsuseriii@#1#2[#3]{%
  \def\glsxtrcurrentfield{user3}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link
  [\let\glscapscase\@secondofthree]%
  {#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{useriii}%
    {%
      \@gls@field@font{\Glsaccessfmtuseriii{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\Glsaccessuseriii{#2}\glsxtrgenentrytextfmt{#3}}%
    }%
  }%
}
\def\@GLSuseriii@#1#2[#3]{%
  \def\glsxtrcurrentfield{user3}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link[\let\glscapscase\@thirdofthree]%
  {#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{useriii}%
    {%
      \@gls@field@font{\GLSaccessfmtuseriii{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \ifx\glscapscase\@thirdofthree
        \@gls@field@font{\GLSaccessuseriii{#2}%
          \glsuppercase{\glsxtrgenentrytextfmt{#3}}}%
      \else
        \@gls@field@font{\glsaccessuseriii{#2}\glsxtrgenentrytextfmt{#3}}%
      \fi
    }%
  }%
}
\def\@glsuseriv@#1#2[#3]{%
  \def\glsxtrcurrentfield{user4}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link
  {#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{useriv}%
    {%
      \@gls@field@font{\glsaccessfmtuseriv{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\glsaccessuseriv{#2}\glsxtrgenentrytextfmt{#3}}%
    }%
  }%
}
\def\@Glsuseriv@#1#2[#3]{%
  \def\glsxtrcurrentfield{user4}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link
  [\let\glscapscase\@secondofthree]%
   {#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{useriv}%
    {%
      \@gls@field@font{\Glsaccessfmtuseriv{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\Glsaccessuseriv{#2}#3}%
    }%
  }%
}
\def\@GLSuseriv@#1#2[#3]{%
  \def\glsxtrcurrentfield{user4}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link[\let\glscapscase\@thirdofthree]%
  {#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{useriv}%
    {%
      \@gls@field@font{\GLSaccessfmtuseriv{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \ifx\glscapscase\@thirdofthree
        \@gls@field@font{\GLSaccessuseriv{#2}%
          \glsuppercase{\glsxtrgenentrytextfmt{#3}}}%
      \else
        \@gls@field@font{\glsaccessuseriv{#2}\glsxtrgenentrytextfmt{#3}}%
      \fi
    }%
  }%
}
\def\@glsuserv@#1#2[#3]{%
  \def\glsxtrcurrentfield{user5}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link
  {#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{userv}%
    {%
      \@gls@field@font{\glsaccessfmtuserv{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\glsaccessuserv{#2}\glsxtrgenentrytextfmt{#3}}%
    }%
  }%
}
\def\@Glsuserv@#1#2[#3]{%
  \def\glsxtrcurrentfield{user5}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link
  [\let\glscapscase\@secondofthree]%
  {#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{userv}%
    {%
      \@gls@field@font{\Glsfmtfield{#3}{\glsxtrgenentrytextfmt}{#2}{userv}}%
    }%
    {%
      \@gls@field@font{\Glsentryuserv{#2}\glsxtrgenentrytextfmt{#3}}%
    }%
  }%
}
\def\@GLSuserv@#1#2[#3]{%
  \def\glsxtrcurrentfield{user5}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link[\let\glscapscase\@thirdofthree]%
  {#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{userv}%
    {%
      \@gls@field@font{\GLSaccessfmtuserv{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \ifx\glscapscase\@thirdofthree
        \@gls@field@font{\GLSaccessuserv{#2}%
          \glsuppercase{\glsxtrgenentrytextfmt{#3}}}%
      \else
        \@gls@field@font{\glsaccessuserv{#2}\glsxtrgenentrytextfmt{#3}}%
      \fi
    }%
  }%
}
\def\@glsuservi@#1#2[#3]{%
  \def\glsxtrcurrentfield{user6}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link
  {#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{uservi}%
    {%
      \@gls@field@font{\glsaccessfmtuservi{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\glsaccessuservi{#2}\glsxtrgenentrytextfmt{#3}}%
    }%
  }%
}
\def\@Glsuservi@#1#2[#3]{%
  \def\glsxtrcurrentfield{user6}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link
  [\let\glscapscase\@secondofthree]%
  {#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{uservi}%
    {%
      \@gls@field@font{\Glsaccessfmtuservi{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \@gls@field@font{\Glsaccessuservi{#2}\glsxtrgenentrytextfmt{#3}}%
    }%
  }%
}
\def\@GLSuservi@#1#2[#3]{%
  \def\glsxtrcurrentfield{user6}%
  \glsxtrassignfieldfont{#2}%
  \glsxtrsaveinsert{#2}{#3}%
  \@gls@field@link[\let\glscapscase\@thirdofthree]%
  {#1}{#2}%
  {%
    \glsifapplyinnerfmtfield{#2}{uservi}%
    {%
      \@gls@field@font{\GLSaccessfmtuservi{#3}{\glsxtrgenentrytextfmt}{#2}}%
    }%
    {%
      \ifx\glscapscase\@thirdofthree
        \@gls@field@font{\GLSaccessuservi{#2}%
          \glsuppercase{\glsxtrgenentrytextfmt{#3}}}%
      \else
        \@gls@field@font{\glsaccessuservi{#2}\glsxtrgenentrytextfmt{#3}}%
      \fi
    }%
  }%
}
\newcommand*{\@@glsxtr@base@acrcmd@warn}[2]{%
  \GlossariesExtraWarning{Base acronym command \string#1\space
   should not be used with new abbreviation definitions. Use
   \string#2\space instead}%
}
\let\@glsxtr@base@acrcmd\@@glsxtr@base@acrcmd@warn
\def\@acrshort#1#2[#3]{%
  \def\glsxtrcurrentfield{short}%
  \@glsxtr@base@acrcmd\acrshort\glsxtrshort
  \glsdoifexists{#2}%
  {%
    \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper
    \let\glsxtrifwasglslike\@secondoftwo
    \let\glsxtrifwasfirstuse\@secondoftwo
    \let\glsifplural\@secondoftwo
    \let\glscapscase\@firstofthree
    \let\glsinsert\@empty
    \def\glscustomtext{%
      \acronymfont{\glsaccessshort{#2}}#3%
    }%
    \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}%
  }%
  \glspostlinkhook
}
\def\@Acrshort#1#2[#3]{%
  \def\glsxtrcurrentfield{short}%
  \@glsxtr@base@acrcmd\Acrshort\Glsxtrshort
  \glsdoifexists{#2}%
  {%
    \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper
    \let\glsxtrifwasglslike\@secondoftwo
    \let\glsxtrifwasfirstuse\@secondoftwo
    \let\glsifplural\@secondoftwo
    \let\glscapscase\@secondofthree
    \let\glsinsert\@empty
    \def\glscustomtext{%
      \acronymfont{\Glsaccessshort{#2}}#3%
    }%
    \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}%
  }%
  \glspostlinkhook
}
\def\@ACRshort#1#2[#3]{%
  \def\glsxtrcurrentfield{short}%
  \@glsxtr@base@acrcmd\ACRshort\GLSxtrshort
  \glsdoifexists{#2}%
  {%
    \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper
    \let\glsxtrifwasglslike\@secondoftwo
    \let\glsxtrifwasfirstuse\@secondoftwo
    \let\glsifplural\@secondoftwo
    \let\glscapscase\@thirdofthree
    \let\glsinsert\@empty
    \def\glscustomtext{%
      \glsuppercase{\acronymfont{\glsaccessshort{#2}}#3}%
    }%
    \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}%
  }%
  \glspostlinkhook
}
\def\@acrshortpl#1#2[#3]{%
  \def\glsxtrcurrentfield{short}%
  \@glsxtr@base@acrcmd\acrshortpl\glsxtrshortpl
  \glsdoifexists{#2}%
  {%
    \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper
    \let\glsxtrifwasglslike\@secondoftwo
    \let\glsxtrifwasfirstuse\@secondoftwo
    \let\glsifplural\@firstoftwo
    \let\glscapscase\@firstofthree
    \let\glsinsert\@empty
    \def\glscustomtext{%
      \acronymfont{\glsaccessshortpl{#2}}#3%
    }%
    \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}%
  }%
  \glspostlinkhook
}
\def\@Acrshortpl#1#2[#3]{%
  \def\glsxtrcurrentfield{short}%
  \@glsxtr@base@acrcmd\Acrshortpl\Glsxtrshortpl
  \glsdoifexists{#2}%
  {%
    \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper
    \let\glsxtrifwasglslike\@secondoftwo
    \let\glsxtrifwasfirstuse\@secondoftwo
    \let\glsifplural\@firstoftwo
    \let\glscapscase\@secondofthree
    \let\glsinsert\@empty
    \def\glscustomtext{%
      \acronymfont{\Glsaccessshortpl{#2}}#3%
    }%
    \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}%
  }%
  \glspostlinkhook
}
\def\@ACRshortpl#1#2[#3]{%
  \def\glsxtrcurrentfield{short}%
  \@glsxtr@base@acrcmd\ACRshortpl\GLSxtrshortpl
  \glsdoifexists{#2}%
  {%
    \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper
    \let\glsxtrifwasglslike\@secondoftwo
    \let\glsxtrifwasfirstuse\@secondoftwo
    \let\glsifplural\@firstoftwo
    \let\glscapscase\@thirdofthree
    \let\glsinsert\@empty
    \def\glscustomtext{%
      \glsuppercase{\acronymfont{\glsaccessshortpl{#2}}#3}%
    }%
    \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}%
  }%
  \glspostlinkhook
}
\def\@acrlong#1#2[#3]{%
  \def\glsxtrcurrentfield{long}%
  \@glsxtr@base@acrcmd\acrlong\glsxtrlong
  \glsdoifexists{#2}%
  {%
    \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper
    \let\glsxtrifwasglslike\@secondoftwo
    \let\glsxtrifwasfirstuse\@secondoftwo
    \let\glsifplural\@secondoftwo
    \let\glscapscase\@firstofthree
    \let\glsinsert\@empty
    \def\glscustomtext{%
      \acronymfont{\glsaccesslong{#2}}#3%
    }%
    \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}%
  }%
  \glspostlinkhook
}
\def\@Acrlong#1#2[#3]{%
  \def\glsxtrcurrentfield{long}%
  \@glsxtr@base@acrcmd\Acrlong\Glsxtrlong
  \glsdoifexists{#2}%
  {%
    \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper
    \let\glsxtrifwasglslike\@secondoftwo
    \let\glsxtrifwasfirstuse\@secondoftwo
    \let\glsifplural\@secondoftwo
    \let\glscapscase\@secondofthree
    \let\glsinsert\@empty
    \def\glscustomtext{%
      \acronymfont{\Glsaccesslong{#2}}#3%
    }%
    \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}%
  }%
  \glspostlinkhook
}
\def\@ACRlong#1#2[#3]{%
  \def\glsxtrcurrentfield{long}%
  \@glsxtr@base@acrcmd\ACRlong\GLSxtrlong
  \glsdoifexists{#2}%
  {%
    \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper
    \let\glsxtrifwasglslike\@secondoftwo
    \let\glsxtrifwasfirstuse\@secondoftwo
    \let\glsifplural\@secondoftwo
    \let\glscapscase\@thirdofthree
    \let\glsinsert\@empty
    \def\glscustomtext{%
      \glsuppercase{\acronymfont{\glsaccesslong{#2}}#3}%
    }%
    \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}%
  }%
  \glspostlinkhook
}
\def\@acrlongpl#1#2[#3]{%
  \def\glsxtrcurrentfield{long}%
  \@glsxtr@base@acrcmd\acrlongpl\glsxtrlongpl
  \glsdoifexists{#2}%
  {%
    \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper
    \let\glsxtrifwasglslike\@secondoftwo
    \let\glsxtrifwasfirstuse\@secondoftwo
    \let\glsifplural\@firstoftwo
    \let\glscapscase\@firstofthree
    \let\glsinsert\@empty
    \def\glscustomtext{%
      \acronymfont{\glsaccesslongpl{#2}}#3%
    }%
    \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}%
  }%
  \glspostlinkhook
}
\def\@Acrlongpl#1#2[#3]{%
  \def\glsxtrcurrentfield{long}%
  \@glsxtr@base@acrcmd\Acrlongpl\Glsxtrlongpl
  \glsdoifexists{#2}%
  {%
    \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper
    \let\glsxtrifwasglslike\@secondoftwo
    \let\glsxtrifwasfirstuse\@secondoftwo
    \let\glsifplural\@firstoftwo
    \let\glscapscase\@secondofthree
    \let\glsinsert\@empty
    \def\glscustomtext{%
      \acronymfont{\Glsaccesslongpl{#2}}#3%
    }%
    \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}%
  }%
  \glspostlinkhook
}
\def\@ACRlongpl#1#2[#3]{%
  \def\glsxtrcurrentfield{long}%
  \@glsxtr@base@acrcmd\ACRlongpl\GLSxtrlongpl
  \glsdoifexists{#2}%
  {%
    \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper
    \let\glsxtrifwasglslike\@secondoftwo
    \let\glsxtrifwasfirstuse\@secondoftwo
    \let\glsifplural\@firstoftwo
    \let\glscapscase\@thirdofthree
    \let\glsinsert\@empty
    \def\glscustomtext{%
      \glsuppercase{\acronymfont{\glsaccesslongpl{#2}}#3}%
    }%
    \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}%
  }%
  \glspostlinkhook
}
\def\@acrfull#1#2[#3]{%
  \def\glsxtrcurrentfield{}%
  \@glsxtr@base@acrcmd\acrfull\glsxtrfull
  \acrfullfmt{#1}{#2}{#3}%
}
\def\@Acrfull#1#2[#3]{%
  \def\glsxtrcurrentfield{}%
  \@glsxtr@base@acrcmd\Acrfull\Glsxtrfull
  \Acrfullfmt{#1}{#2}{#3}%
}
\def\@ACRfull#1#2[#3]{%
  \def\glsxtrcurrentfield{}%
  \@glsxtr@base@acrcmd\ACRfull\GLSxtrfull
  \ACRfullfmt{#1}{#2}{#3}%
}
\def\@acrfullpl#1#2[#3]{%
  \def\glsxtrcurrentfield{}%
  \@glsxtr@base@acrcmd\acrfullpl\glsxtrfullpl
  \acrfullplfmt{#1}{#2}{#3}%
}
\def\@Acrfullpl#1#2[#3]{%
  \def\glsxtrcurrentfield{}%
  \@glsxtr@base@acrcmd\Acrfullpl\Glsxtrfullpl
  \Acrfullplfmt{#1}{#2}{#3}%
}
\def\@ACRfullpl#1#2[#3]{%
  \def\glsxtrcurrentfield{}%
  \@glsxtr@base@acrcmd\ACRfullpl\GLSxtrfullpl
  \ACRfullplfmt{#1}{#2}{#3}%
}
\renewcommand*{\@glsaddkey}[7]{%
  \key@ifundefined{glossentry}{#1}%
  {%
    \define@key{glossentry}{#1}{\csdef{@glo@#1}{##1}}%
    \appto\@gls@keymap{,{#1}{#1}}%
    \appto\@newglossaryentryprehook{\csdef{@glo@#1}{#2}}%
    \appto\@newglossaryentryposthook{%
      \letcs{\@glo@tmp}{@glo@#1}%
      \gls@assign@field{#2}{\@glo@label}{#1}{\@glo@tmp}%
    }%
    \newcommand*{#3}[1]{\@gls@entry@field{##1}{#1}}%
    \newcommand*{#4}[1]{\@Glsentryfield{##1}{#1}}%
    \ifcsdef{@gls@user@#1@}%
    {%
       \PackageError{glossaries}%
       {Can't define `\string#5' as helper command
        `\expandafter\string\csname @gls@user@#1@\endcsname' already
        exists}%
       {}%
    }%
    {%
      \expandafter\newcommand\expandafter*\expandafter
        {\csname @gls@user@#1\endcsname}[2][]{%
          \new@ifnextchar[%
            {\csuse{@gls@user@#1@}{##1}{##2}}%
            {\csuse{@gls@user@#1@}{##1}{##2}[]}}%
      \csdef{@gls@user@#1@}##1##2[##3]{%
        \def\glsxtrcurrentfield{#1}%
        \glsxtrassignfieldfont{##2}%
        \glsxtrsaveinsert{##2}{##3}%
        \@gls@field@link{##1}{##2}{\@gls@field@font{#3{##2}##3}}%
      }%
      \newrobustcmd*{#5}{%
        \expandafter\@gls@hyp@opt\csname @gls@user@#1\endcsname}%
    }%
    \ifcsdef{@Gls@user@#1@}%
    {%
       \PackageError{glossaries}%
       {Can't define `\string#6' as helper command
        `\expandafter\string\csname @Gls@user@#1@\endcsname' already
         exists}%
       {}%
    }%
    {%
      \expandafter\newcommand\expandafter*\expandafter
        {\csname @Gls@user@#1\endcsname}[2][]{%
          \new@ifnextchar[%
            {\csuse{@Gls@user@#1@}{##1}{##2}}%
            {\csuse{@Gls@user@#1@}{##1}{##2}[]}}%
      \csdef{@Gls@user@#1@}##1##2[##3]{%
        \def\glsxtrcurrentfield{#1}%
        \glsxtrassignfieldfont{##2}%
        \glsxtrsaveinsert{##2}{##3}%
        \@gls@field@link[\let\glscapscase\@secondofthree]%
          {##1}{##2}{\@gls@field@font{#4{##2}##3}}%
      }%
      \newrobustcmd*{#6}{%
        \expandafter\@gls@hyp@opt\csname @Gls@user@#1\endcsname}%
    }%
    \ifcsdef{@GLS@user@#1@}%
    {%
       \PackageError{glossaries}%
       {Can't define `\string#7' as helper command
        `\expandafter\string\csname @GLS@user@#1@\endcsname' already
         exists}%
       {}%
    }%
    {%
      \expandafter\newcommand\expandafter*\expandafter
        {\csname @GLS@user@#1\endcsname}[2][]{%
          \new@ifnextchar[%
            {\csuse{@GLS@user@#1@}{##1}{##2}}%
            {\csuse{@GLS@user@#1@}{##1}{##2}[]}}%
      \csdef{@GLS@user@#1@}##1##2[##3]{%
        \def\glsxtrcurrentfield{#1}%
        \glsxtrassignfieldfont{##2}%
        \glsxtrsaveinsert{##2}{##3}%
        \@gls@field@link[\let\glscapscase\@thirdofthree]%
           {##1}{##2}{\@gls@field@font{\glsuppercase{#3{##2}##3}}}%
      }%
      \newrobustcmd*{#7}{%
        \expandafter\@gls@hyp@opt\csname @GLS@user@#1\endcsname}%
    }%
    \glsmfuaddmap{#3}{#4}%
    \glsmfuaddmap{#5}{#6}%
    \glsmfublocker{#7}%
  }%
  {%
    \PackageError{glossaries-extra}{Key `#1' already exists}{}%
  }%
}
\providecommand*{\@gls@link@nocheckfirsthyper}{}
\newcommand*{\@gls@link@postkeys@checkfirsthyper}{}
\let\@glsxtr@org@checkfirsthyper\@gls@link@checkfirsthyper
\renewcommand*{\@gls@link@checkfirsthyper}{%
  \ifglsused{\glslabel}%
   {\let\glsxtrifwasfirstuse\@secondoftwo}
   {\let\glsxtrifwasfirstuse\@firstoftwo}%
  \let\glsxtrifwasglslike\@firstoftwo
  \protected@edef\glscategorylabel{\glscategory{\glslabel}}%
  \glsxtrifwasfirstuse
  {%
    \glsifcategoryattribute{\glscategorylabel}{nohyperfirst}{true}%
      {\KV@glslink@hyperfalse}{}%
  }%
  {%
    \glsifcategoryattribute{\glscategorylabel}{nohypernext}{true}%
      {\KV@glslink@hyperfalse}{}%
  }%
  \glslinkcheckfirsthyperhook
}
\ifdef\do@glsdisablehyperinlist
{%
  \let\@glsxtr@do@glsdisablehyperinlist\do@glsdisablehyperinlist
  \renewcommand*{\do@glsdisablehyperinlist}{%
    \@glsxtr@do@glsdisablehyperinlist
    \glsifattribute{\glslabel}{nohyper}{true}{\KV@glslink@hyperfalse}{}%
  }
}
{}
\define@boolkey{glslink}{noindex}[true]{}
\KV@glslink@noindexfalse
\providecommand*{\@gls@save@glslocal}{%
  \let\if@org@KV@glslink@local\ifKV@glslink@local
}
\providecommand*{\@gls@restore@glslocal}{%
  \ifKV@glslink@local
    \let\@gls@do@glsunset\glslocalunset
  \else
    \let\@gls@do@glsunset\glsunset
  \fi
  \let\ifKV@glslink@local\if@org@KV@glslink@local
}
\let\@gls@default@restore@glslocal\@gls@restore@glslocal
\newcommand*{\@gls@ignore@restore@glslocal}{%
  \let\@gls@do@glsunset\@gobble
  \let\ifKV@glslink@local\if@org@KV@glslink@local
}
\providecommand*{\@gls@do@glsunset}[1]{\glsunset{#1}}
\newcommand*{\@gls@default@glslink@opts}{}
\ifdef\@gls@setdefault@glslink@opts
{
  \renewcommand*{\@gls@setdefault@glslink@opts}{%
    \KV@glslink@noindexfalse
    \expandafter\setupglslink\expandafter{\@gls@default@glslink@opts}%
    \@glsxtrsetaliasnoindex
  }
}
{
  \newcommand*{\@gls@setdefault@glslink@opts}{%
    \KV@glslink@noindexfalse
    \expandafter\setupglslink\expandafter{\@gls@default@glslink@opts}%
    \@glsxtrsetaliasnoindex
  }
  \preto\do@glsdisablehyperinlist{\@gls@setdefault@glslink@opts}
}
\providecommand*{\glsxtrsetaliasnoindex}{%
 \KV@glslink@noindextrue
}
\newcommand*{\@glsxtrsetaliasnoindex}{%
 \ifcsvoid{glo@\glsdetoklabel{\glslabel}@alias}%
 {}%
 {%
   \let\glsxtrindexaliased\@glsxtrindexaliased
   \glsxtrsetaliasnoindex
   \let\glsxtrindexaliased\@no@glsxtrindexaliased
 }%
}
\newcommand{\@glsxtrindexaliased}{%
 \ifKV@glslink@noindex
 \else
   \begingroup
   \let\@glsnumberformat\@glsxtr@defaultnumberformat
   \protected@edef\@gls@counter{\csname glo@\glsdetoklabel{\glslabel}@counter\endcsname}%
   \glsxtr@saveentrycounter
   \glsxtr@wrglossary@encap{\glsxtralias{\glslabel}}{\@@do@wrglossary{\glsxtralias{\glslabel}}}%
   \endgroup
 \fi
}
\newcommand{\@no@glsxtrindexaliased}{%
  \PackageError{glossaries-extra}{\string\glsxtrindexaliased\space
  not permitted outside definition of \string\glsxtrsetaliasnoindex}%
  {}%
}
\let\glsxtrindexaliased\@no@glsxtrindexaliased
\newcommand*{\GlsXtrSetDefaultGlsOpts}[1]{%
  \renewcommand*{\@gls@default@glslink@opts}{#1}%
}
\newcommand*{\GlsXtrAppToDefaultGlsOpts}[1]{%
  \appto\@gls@default@glslink@opts{,#1}%
}
\newcommand*{\GlsXtrPreToDefaultGlsOpts}[1]{%
  \preto\@gls@default@glslink@opts{#1,}%
}
\newcommand*{\glsxtrifindexing}[2]{%
  \ifKV@glslink@noindex #2\else #1\fi
}
\newcommand*{\glsxtr@wrglossary@encap}[2]{\glsencapwrcontent{#2\@glsxtr@inc@indexcount{#1}}}
\newcommand*{\@glsxtr@inc@indexcount}[1]{%
  \ifcsdef{glo@\glsdetoklabel{#1}@indexed}
  {%
    \csxdef{glo@\glsdetoklabel{#1}@indexed}{%
     \expandafter\number\expandafter\numexpr\csname glo@\glsdetoklabel{#1}@indexed\endcsname+1}%
  }%
  {%
    \csgdef{glo@\glsdetoklabel{#1}@indexed}{1}%
  }%
}
\newcommand*{\glsentryindexcount}[1]{%
  \ifcsdef{glo@\glsdetoklabel{#1}@indexed}
  {\csuse{glo@\glsdetoklabel{#1}@indexed}}%
  {0}%
}
\newcommand*{\glsifindexed}[3]{%
  \ifcsdef{glo@\glsdetoklabel{#1}@indexed}%
  {\expandafter\ifnum\csname glo@\glsdetoklabel{#1}@indexed\endcsname>0 #2\else#3\fi}%
  {#3}%
}
\newcommand*{\glsaddallunindexed}[1][\@glo@types]{%
 \forallglsentries[#1]{\@glo@entry}%
 {%
    \glsifindexed{\@glo@entry}{}{\glsadd[format=glsignore]{\@glo@entry}}%
 }%
}
\providecommand*{\glsencapwrcontent}[1]{{#1}}
\renewcommand*{\glswriteentry}[2]{%
  \glsxtrifindexing
  {%
   \ifglsindexonlyfirst
     \GlsXtrIfUnusedOrUndefined{#1}
     {#2}%
     {\glsxtrdoautoindexname{#1}{dualindex}}%
   \else
     \glsifattribute{#1}{indexonlyfirst}{true}%
     {%
       \GlsXtrIfUnusedOrUndefined{#1}%
       {#2}%
       {\glsxtrdoautoindexname{#1}{dualindex}}%
     }%
     {#2}%
   \fi
  }%
  {}%
}
\appto\@@do@@wrglossary{\@glsxtr@do@@wrindex
  \glsxtrdowrglossaryhook{\@gls@label}%
}
\appto\gls@noidxglossary{\@glsxtr@do@@wrindex
  \glsxtrdowrglossaryhook{\@gls@label}%
}
\newcommand*{\@glsxtr@do@@wrindex}{%
  \glsxtrdoautoindexname{\@gls@label}{dualindex}%
}
\newcommand*{\glsxtrdowrglossaryhook}[1]{}
\newcommand*{\@gls@alt@hyp@opt}[1]{%
 \let\glslinkvar\@firstofthree
 \def\@gls@hyp@opt@cs{#1}%
 \@ifstar{\s@gls@hyp@opt}%
 {\@ifnextchar+%
   {\@firstoftwo{\p@gls@hyp@opt}}%
   {%
     \expandafter\@ifnextchar\@gls@alt@hyp@opt@char
     {\@firstoftwo{\@alt@gls@hyp@opt}}%
     {#1}%
   }%
 }%
}
\newcommand*{\@alt@gls@hyp@opt}[1][]{%
 \let\glslinkvar\@firstofthree
 \expandafter\@gls@hyp@opt@cs\expandafter[\@gls@alt@hyp@opt@keys,#1]}
\newcommand*{\@gls@alt@hyp@opt@char}{}
\newcommand*{\@gls@alt@hyp@opt@keys}{}
\newcommand*{\GlsXtrSetAltModifier}[2]{%
  \let\@gls@hyp@opt\@gls@alt@hyp@opt
  \ifstrequal{#1}{+}%
  {\PackageError{glossaries-extra}%
   {Can't use '#1' as modifier (it's already in use)}{}}%
  {%
    \ifstrequal{#1}{*}%
    {\PackageError{glossaries-extra}%
     {Can't use '#1' as modifier (it's already in use)}{}}%
    {}%
  }%
  \def\@gls@alt@hyp@opt@char{#1}%
  \def\@gls@alt@hyp@opt@keys{#2}%
  \ifdefequal\@glsxtr@record@setting\@glsxtr@record@setting@off
  {}%
  {%
    \protected@write\@auxout{}{\string\providecommand{\string\@glsxtr@altmodifier}[1]{}}%
    \protected@write\@auxout{}{\string\@glsxtr@altmodifier{#1}}%
  }%
}
\newcommand*{\GlsXtrSetPlusModifier}[1]{%
 \renewcommand*{\p@gls@hyp@opt}[1][]{%
   \let\glslinkvar\@thirdofthree
   \@gls@hyp@opt@cs[#1,##1]%
 }%
}
\newcommand*{\GlsXtrSetStarModifier}[1]{%
 \renewcommand*{\s@gls@hyp@opt}[1][]{%
   \let\glslinkvar\@secondofthree
   \@gls@hyp@opt@cs[#1,##1]%
 }
}
\let\glsxtr@org@dohyperlink\glsdohyperlink
\ifdef\glsnavhyperlink
{
  \renewcommand*{\glsnavhyperlink}[3][\@glo@type]{%
    \protected@edef\gls@grplabel{#2}\protected@edef\@gls@grptitle{#3}%
    {%
      \let\glsxtrdohyperlink\glsxtr@org@dohyperlink
      \@glslink{\glsnavhyperlinkname{#1}{#2}}{#3}%
    }%
  }%
}
{}
\ifdef\@@gls@navhypertarget
{}
{%
 \renewcommand*{\glsnavhypertarget}{\protect\@@gls@navhypertarget}
 \newcommand*{\@@gls@navhypertarget}[3][\@glo@type]{%
   \@glsnavhypertarget{#1}{#2}{#3}%
 }
}%
\ifdef\@glsnavhypertarget
{%
  \renewcommand*{\@glsnavhypertarget}[3]{%
    \protected@write\@auxout{}{\string\@gls@hypergroup{#1}{#2}}%
    \@glsxtr@do@org@target{\glsnavhyperlinkname{#1}{#2}}{#3}%
    \ifcsdef{@gls@hypergrouplist@#1}%
    {%
      \letcs\@gls@list{@gls@hypergrouplist@#1}%
      \protected@edef\@gls@thishypernavlabel{#2}%
      \expandafter\DTLifinlist\expandafter{\@gls@thishypernavlabel}\@gls@list{}%
      {%
        \GlossariesWarningNoLine{Navigation panel
           for glossary type `#1'^^Jmissing group `#2'}%
        \gdef\gls@hypergrouprerun{%
          \GlossariesWarningNoLine{Navigation panel
          has changed. Rerun LaTeX}}%
      }%
    }%
    {%
      \GlossariesWarningNoLine{Navigation panel
         for glossary type `#1'^^Jmissing group `#2'}%
      \gdef\gls@hypergrouprerun{%
        \GlossariesWarningNoLine{Navigation panel
        has changed. Rerun LaTeX}}%
    }%
  }%
}
{}
\newcommand*{\glsxtrdohyperlink}[2]{%
 \glshasattribute{\glslabel}{targeturl}%
 {%
   \glshasattribute{\glslabel}{targetname}%
   {%
     \glshasattribute{\glslabel}{targetcategory}%
     {%
       \hyperref{\glsgetattribute{\glslabel}{targeturl}}%
         {\glsgetattribute{\glslabel}{targetcategory}}%
         {\glsgetattribute{\glslabel}{targetname}}%
         {{\glsxtrprotectlinks#2}}%
     }%
     {%
       \hyperref{\glsgetattribute{\glslabel}{targeturl}}%
         {}%
         {\glsgetattribute{\glslabel}{targetname}}%
         {{\glsxtrprotectlinks#2}}%
     }%
   }%
   {%
     \href{\glsgetattribute{\glslabel}{targeturl}}%
       {{\glsxtrprotectlinks#2}}%
   }%
 }%
 {%
   \glsfieldfetch{\glslabel}{alias}{\gloaliaslabel}%
   \ifdefvoid\gloaliaslabel
   {%
     \glsxtrhyperlink{#1}{{\glsxtrprotectlinks#2}}%
   }%
   {%
     \glsxtrifmulti\gloaliaslabel
     {%
       \letcs\gloaliaslabel{@gls@combined@\gloaliaslabel @main}%
     }%
     {}%
     \glsxtrhyperlink
     {\glolinkprefix\glsdetoklabel{\gloaliaslabel}}%
     {{\glsxtrprotectlinks#2}}%
   }%
 }%
}

\newcommand{\glsxtrhyperlink}[2]{%
  \glsdoshowtarget{#1}{\hyperlink{#1}{#2}}%
}%
\renewrobustcmd*{\glshyperlink}[2][\glsentrytext{\@glo@label}]{%
 \glsdoifexists{#2}%
 {%
   \def\@glo@label{#2}%
   {\protected@edef\glslabel{#2}%
   \@glslink{\glolinkprefix\glslabel}{#1}}%
 }%
}
\renewcommand{\glsdisablehyper}{%
  \KV@glslink@hyperfalse
  \def\@glslink{\glsdonohyperlink}%
  \let\@glstarget\@secondoftwo
}
\renewcommand{\glsenablehyper}{%
 \KV@glslink@hypertrue
 \def\@glslink{\glsxtrdohyperlink}%
 \def\@glstarget{\glsdohypertarget}%
}
\def\glsdonohyperlink#1#2{{\glsxtrprotectlinks #2}}
\ifcsundef{hyperlink}%
{%
  \def\@glslink{\glsdonohyperlink}
}%
{%
  \def\@glslink{\glsxtrdohyperlink}
}
\newcommand*{\glsxtrprotectlinks}{%
  \KV@glslink@hyperfalse
  \KV@glslink@noindextrue
  \let\@gls@\@glsxtr@p@text@
  \let\@Gls@\@Glsxtr@p@text@
  \let\@GLS@\@GLSxtr@p@text@
  \let\@glspl@\@glsxtr@p@plural@
  \let\@Glspl@\@Glsxtr@p@plural@
  \let\@GLSpl@\@GLSxtr@p@plural@
  \let\@glsxtrshort\@glsxtr@p@short@
  \let\@Glsxtrshort\@Glsxtr@p@short@
  \let\@GLSxtrshort\@GLSxtr@p@short@
  \let\@glsxtrlong\@glsxtr@p@long@
  \let\@Glsxtrlong\@Glsxtr@p@long@
  \let\@GLSxtrlong\@GLSxtr@p@long@
  \let\@glsxtrshortpl\@glsxtr@p@shortpl@
  \let\@Glsxtrshortpl\@Glsxtr@p@shortpl@
  \let\@GLSxtrshortpl\@GLSxtr@p@shortpl@
  \let\@glsxtrlongpl\@glsxtr@p@longpl@
  \let\@Glsxtrlongpl\@Glsxtr@p@longpl@
  \let\@GLSxtrlongpl\@GLSxtr@p@longpl@
  \let\@acrshort\@glsxtr@p@acrshort@
  \let\@Acrshort\@Glsxtr@p@acrshort@
  \let\@ACRshort\@GLSxtr@p@acrshort@
  \let\@acrshortpl\@glsxtr@p@acrshortpl@
  \let\@Acrshortpl\@Glsxtr@p@acrshortpl@
  \let\@ACRshortpl\@GLSxtr@p@acrshortpl@
  \let\@acrlong\@glsxtr@p@acrlong@
  \let\@Acrlong\@Glsxtr@p@acrlong@
  \let\@ACRlong\@GLSxtr@p@acrlong@
  \let\@acrlongpl\@glsxtr@p@acrlongpl@
  \let\@Acrlongpl\@Glsxtr@p@acrlongpl@
  \let\@ACRlongpl\@GLSxtr@p@acrlongpl@
}
\def\@glsxtr@p@text@#1#2[#3]{{\@glstext@{#1}{#2}[#3]}}
\def\@Glsxtr@p@text@#1#2[#3]{{\@Glstext@{#1}{#2}[#3]}}
\def\@GLSxtr@p@text@#1#2[#3]{{\@GLStext@{#1}{#2}[#3]}}
\def\@glsxtr@p@plural@#1#2[#3]{{\@glsplural@{#1}{#2}[#3]}}
\def\@Glsxtr@p@plural@#1#2[#3]{{\@Glsplural@{#1}{#2}[#3]}}
\def\@GLSxtr@p@plural@#1#2[#3]{{\@GLSplural@{#1}{#2}[#3]}}
\def\@glsxtr@p@short@#1#2[#3]{%
 {%
  \glssetabbrvfmt{\glscategory{#2}}%
  \glsabbrvfont{\glsentryshort{#2}}#3%
 }%
}
\def\@Glsxtr@p@short@#1#2[#3]{%
 {%
   \glssetabbrvfmt{\glscategory{#2}}%
   \glsabbrvfont{\Glsentryshort{#2}}#3%
 }%
}
\def\@GLSxtr@p@short@#1#2[#3]{%
  {%
    \glssetabbrvfmt{\glscategory{#2}}%
    \glsuppercase{\glsabbrvfont{\glsentryshort{#2}}#3}%
  }%
}
\def\@glsxtr@p@shortpl@#1#2[#3]{%
 {%
   \glssetabbrvfmt{\glscategory{#2}}%
   \glsabbrvfont{\glsentryshortpl{#2}}#3%
 }%
}
\def\@Glsxtr@p@shortpl@#1#2[#3]{%
 {%
   \glssetabbrvfmt{\glscategory{#2}}%
   \glsabbrvfont{\Glsentryshortpl{#2}}#3%
 }%
}
\def\@GLSxtr@p@shortpl@#1#2[#3]{%
  {%
    \glssetabbrvfmt{\glscategory{#2}}%
    \glsuppercase{\glsabbrvfont{\glsentryshortpl{#2}}#3}%
  }%
}
\def\@glsxtr@p@long@#1#2[#3]{{\glsentrylong{#2}#3}}
\def\@Glsxtr@p@long@#1#2[#3]{{\Glsentrylong{#2}#3}}
\def\@GLSxtr@p@long@#1#2[#3]{%
  {\glsuppercase{\glslongfont{\glsentrylong{#2}}#3}}}
\def\@glsxtr@p@longpl@#1#2[#3]{{\glsentrylongpl{#2}#3}}
\def\@Glsxtr@p@longpl@#1#2[#3]{{\glslongfont{\Glsentrylongpl{#2}}#3}}
\def\@GLSxtr@p@longpl@#1#2[#3]{%
  {\glsuppercase{\glslongfont{\glsentrylongpl{#2}}#3}}}
\def\@glsxtr@p@acrshort@#1#2[#3]{{\acronymfont{\glsentryshort{#2}}#3}}
\def\@Glsxtr@p@acrshort@#1#2[#3]{{\acronymfont{\Glsentryshort{#2}}#3}}
\def\@GLSxtr@p@acrshort@#1#2[#3]{%
  {\glsuppercase{\acronymfont{\glsentryshort{#2}}#3}}}
\def\@glsxtr@p@acrshortpl@#1#2[#3]{{\acronymfont{\glsentryshortpl{#2}}#3}}
\def\@Glsxtr@p@acrshortpl@#1#2[#3]{{\acronymfont{\Glsentryshortpl{#2}}#3}}
\def\@GLSxtr@p@acrshortpl@#1#2[#3]{%
  {\glsuppercase{\acronymfont{\glsentryshortpl{#2}}#3}}}
\def\@glsxtr@p@acrlong@#1#2[#3]{{\glsentrylong{#2}#3}}
\def\@Glsxtr@p@acrlong@#1#2[#3]{{\Glsentrylong{#2}#3}}
\def\@GLSxtr@p@acrlong@#1#2[#3]{%
 {\glsuppercase{\glsentrylong{#2}#3}}}
\def\@glsxtr@p@acrlongpl@#1#2[#3]{{\glsentrylongpl{#2}#3}}
\def\@Glsxtr@p@acrlongpl@#1#2[#3]{{\Glsentrylongpl{#2}#3}}
\def\@GLSxtr@p@acrlongpl@#1#2[#3]{%
 {\glsuppercase{\glsentrylongpl{#2}#3}}}
\newcommand*{\@glsxtrp@opt}{hyper=false,noindex}
\newcommand*{\glsxtrsetpopts}[1]{%
  \renewcommand*{\@glsxtrp@opt}{#1}%
}
\newcommand*{\glossxtrsetpopts}{%
  \glsxtrsetpopts{noindex}%
}
\newrobustcmd*{\@@glsxtrp}[2]{%
  {%
    \let\glspostlinkhook\relax
    \csname#1\expandafter\endcsname\expandafter[\@glsxtrp@opt]{#2}[]%
  }%
}
\newrobustcmd*{\@glsxtrp}[2]{%
  \ifcsdef{gls#1}%
  {%
    \@@glsxtrp{gls#1}{#2}%
  }%
  {%
    \ifcsdef{glsxtr#1}%
    {%
      \@@glsxtrp{glsxtr#1}{#2}%
    }%
    {%
      \PackageError{glossaries-extra}{`#1' not recognised by
        \string\glsxtrp}{}%
    }%
  }%
}
\newrobustcmd*{\@Glsxtrp}[2]{%
  \ifcsdef{Gls#1}%
  {%
    \@@glsxtrp{Gls#1}{#2}%
  }%
  {%
    \ifcsdef{Glsxtr#1}%
    {%
      \@@glsxtrp{Glsxtr#1}{#2}%
    }%
    {%
      \PackageError{glossaries-extra}{`#1' not recognised by
        \string\Glsxtrp}{}%
    }%
  }%
}
\newrobustcmd*{\@GLSxtrp}[2]{%
  \ifcsdef{GLS#1}%
  {%
    \@@glsxtrp{GLS#1}{#2}%
  }%
  {%
    \ifcsdef{GLSxtr#1}%
    {%
      \@@glsxtrp{GLSxtr#1}{#2}%
    }%
    {%
      \PackageError{glossaries-extra}{`#1' not recognised by
        \string\GLSxtrp}{}%
    }%
  }%
}
\newcommand{\glsxtrifintoc}[2]{#2}
\newcommand*{\glsxtrifheaduc}[3]{%
 \glsxtrifintoc{#3}{\glsifattribute{#1}{headuc}{true}{#2}{#3}}%
}
\newrobustcmd*{\glsxtr@headentry@p}[2]{%
 \glsxtrifheaduc{#1}%
 {%
   \glsuppercase{\@gls@entry@field{#1}{#2}}%
 }%
 {%
   \@gls@entry@field{#1}{#2}%
 }%
}
\newcommand{\glsxtrp}[2]{%
  \protect\NoCaseChange
  {%
    \protect\glstexorpdfstring
    {%
      \protect\glsxtrifinmark
      {%
        \ifcsdef{glsxtrhead#1}%
        {%
          {\protect\csuse{glsxtrhead#1}{#2}}%
        }%
        {%
          \glsxtr@headentry@p{#2}{#1}%
        }%
      }%
      {%
        \@glsxtrp{#1}{#2}%
      }%
    }%
    {%
      \protect\@gls@entry@field{#2}{#1}%
    }%
  }%
}
\newcommand*{\glsps}{\glsxtrp{short}}
\newcommand*{\glspt}{\glsxtrp{text}}
\newcommand{\Glsxtrp}[2]{%
  \protect\NoCaseChange
  {%
    \protect\glstexorpdfstring
    {%
      \protect\glsxtrifinmark
      {%
        \ifcsdef{Glsxtrhead#1}%
        {%
          {\protect\csuse{Glsxtrhead#1}{#2}}%
        }%
        {%
          \protect\@Gls@entry@field{#2}{#1}%
        }%
      }%
      {%
        \@Glsxtrp{#1}{#2}%
      }%
    }%
    {%
      \MFUsentencecase{\@gls@entry@field{#2}{#1}}%
    }%
  }%
}
\glsmfuaddmap{\glsxtrp}{\Glsxtrp}
\newcommand{\GLSxtrp}[2]{%
  \protect\NoCaseChange
  {%
    \protect\glstexorpdfstring
    {%
      \protect\glsxtrifinmark
      {%
        \ifcsdef{GLSxtr#1}%
        {%
          {\protect\GLSxtrshort[noindex,hyper=false]{#1}[]}%
        }%
        {%
          \protect\glsuppercase
          {%
            \protect\@gls@entry@field{#2}{#1}%
          }%
        }%
      }%
      {%
        \@GLSxtrp{#1}{#2}%
      }%
    }%
    {%
      \protect\GLSxtrusefield{#2}{#1}%
    }%
  }%
}
\glsmfublocker{\GLSxtrp}
\newcommand*{\@glsxtr@unset}[1]{%
  \@@glsunset{#1}%
  \glsxtrpostunset{#1}%
}%
\let\@glsunset\@glsxtr@unset
\newcommand*{\glsxtrpostunset}[1]{}
\newcommand*{\GlsXtrStartUnsetBuffering}{%
  \@ifstar\s@GlsXtrStartUnsetBuffering\@GlsXtrStartUnsetBuffering
}
\newcommand*{\@GlsXtrStartUnsetBuffering}{%
  \let\@glsxtr@org@unset@buffer\@glsxtr@unset@buffer
  \GlsXtrClearUnsetBuffer
  \let\@glsunset\@glsxtrbuffer@unset
  \let\org@glsxtrbuffer@check@repeats\@glsxtrbuffer@check@repeats
  \renewcommand*{\@glsxtrbuffer@check@repeats}{%
   \@@glsxtrbuffer@check@repeats
  }%
}
\newcommand*{\s@GlsXtrStartUnsetBuffering}{%
  \let\@glsxtr@org@unset@buffer\@glsxtr@unset@buffer
  \GlsXtrClearUnsetBuffer
  \let\@glsunset\@glsxtrbuffer@nodup@unset
  \let\org@glsxtrbuffer@check@repeats\@glsxtrbuffer@check@repeats
  \renewcommand*{\@glsxtrbuffer@check@repeats}{%
   \@@glsxtrbuffer@check@repeats
  }%
}
\newcommand*{\@glsxtrbuffer@unset}[1]{%
  \listxadd\@glsxtr@unset@buffer{#1}%
}
\newcommand*{\@glsxtrbuffer@nodup@unset}[1]{%
  \expandafter\ifinlist\expandafter{#1}{\@glsxtr@unset@buffer}{}%
  {\listxadd\@glsxtr@unset@buffer{#1}}%
}
\newcommand*{\@glsxtrbuffer@check@repeats}{}
\newcommand*{\@@glsxtrbuffer@check@repeats}{}
\newcommand*{\@@glsxtrbuffer@check@repeats@notused}{}
\newrobustcmd*{\@@glsxtrbuffer@do@check@repeat}{%
  \expandafter\ifinlist\expandafter{\glslabel}{\@glsxtr@unset@buffer}%
  {\@glslocalunset{\glslabel}}%
  {\GlsXtrIfUnusedOrUndefined\glslabel
    {\listxadd\@@glsxtrbuffer@check@repeats@notused{\glslabel}}{}}%
}
\newcommand*{\GlsXtrUnsetBufferEnableRepeatLocal}{%
  \def\@@glsxtrbuffer@check@repeats{\@@glsxtrbuffer@do@check@repeat}%
  \def\@@glsxtrbuffer@check@repeats@notused{}%
}
\newcommand*{\GlsXtrUnsetBufferDisableRepeatLocal}{%
  \def\@@glsxtrbuffer@check@repeats{}%
  \def\@@glsxtrbuffer@check@repeats@notused{}%
}
\newcommand*{\GlsXtrResetLocalBuffer}{%
 \forlistloop\@glslocalreset\@@glsxtrbuffer@check@repeats@notused
 \GlsXtrClearUnsetBuffer
}
\newcommand*{\GlsXtrClearUnsetBuffer}{%
  \def\@@glsxtrbuffer@check@repeats@notused{}%
  \def\@glsxtr@unset@buffer{}%
}
\newcommand*{\GlsXtrStopUnsetBuffering}{%
  \@ifstar\s@GlsXtrStopUnsetBuffering\@GlsXtrStopUnsetBuffering
}
\newcommand*{\@GlsXtrStopUnsetBuffering}{%
  \let\@glsunset\@glsxtr@unset
  \forlistloop\@glsunset\@glsxtr@unset@buffer
  \let\@glsxtr@unset@buffer\@glsxtr@org@unset@buffer
  \let\@glsxtrbuffer@check@repeats\org@glsxtrbuffer@check@repeats
}
\newcommand*{\s@GlsXtrStopUnsetBuffering}{%
  \forlistloop\@glslocalunset\@glsxtr@unset@buffer
  \let\@glsunset\@glsxtr@unset
  \let\@glsxtrbuffer@check@repeats\org@glsxtrbuffer@check@repeats
}
\newcommand*{\GlsXtrDiscardUnsetBuffering}{%
  \let\@glsunset\@glsxtr@unset
  \let\@glsxtr@unset@buffer\@glsxtr@org@unset@buffer
  \let\@glsxtrbuffer@check@repeats\org@glsxtrbuffer@check@repeats
}
\newcommand*{\GlsXtrForUnsetBufferedList}[1]{%
  \forlistloop#1\@glsxtr@unset@buffer
}
\renewcommand*{\@glslocalunset}[1]{%
  \@@glslocalunset{#1}%
  \glsxtrpostlocalunset{#1}%
}%
\newcommand*{\glsxtrpostlocalunset}[1]{}
\renewcommand*{\@glsreset}[1]{%
  \@@glsreset{#1}%
  \glsxtrpostreset{#1}%
}%
\newcommand*{\glsxtrpostreset}[1]{}
\renewcommand*{\@glslocalreset}[1]{%
  \@@glslocalreset{#1}%
  \glsxtrpostlocalreset{#1}%
}%
\newcommand*{\glsxtrpostlocalreset}[1]{}
\newcommand*{\glslocalreseteach}[1]{%
  \gls@ifnotmeasuring
  {%
    \@for\@gls@thislabel:=#1\do{%
      \glsdoifexists{\@gls@thislabel}%
      {%
        \@glslocalreset{\@gls@thislabel}%
      }%
    }%
  }%
}
\newcommand*{\glslocalunseteach}[1]{%
  \gls@ifnotmeasuring
  {%
    \@for\@gls@thislabel:=#1\do{%
      \glsdoifexists{\@gls@thislabel}%
      {%
        \@glslocalunset{\@gls@thislabel}%
      }%
    }%
  }%
}
\newcommand*{\GlsXtrEnableEntryCounting}[2]{%
  \glsenableentrycount
  \renewcommand*{\gls}{\cgls}%
  \renewcommand*{\Gls}{\cGls}%
  \renewcommand*{\glspl}{\cglspl}%
  \renewcommand*{\Glspl}{\cGlspl}%
  \renewcommand*{\GLS}{\cGLS}%
  \renewcommand*{\GLSpl}{\cGLSpl}%
  \@glsxtr@setentrycountunsetattr{#1}{#2}%
  \let\GlsXtrEnableEntryCounting\@glsxtr@setentrycountunsetattr
  \renewcommand*{\GlsXtrEnableEntryUnitCounting}[3]{%
   \PackageError{glossaries-extra}{\string\GlsXtrEnableEntryUnitCounting\space
    can't be used with \string\GlsXtrEnableEntryCounting}%
   {Use one or other but not both commands}}%
}
\newcommand*{\@glsxtr@setentrycountunsetattr}[2]{%
 \@for\@glsxtr@cat:=#1\do
 {%
   \ifdefempty{\@glsxtr@cat}{}%
   {%
     \glssetcategoryattribute{\@glsxtr@cat}{entrycount}{#2}%
   }%
 }%
}
\ifdef\glsresetcurrcountfalse{}{\newif\ifglsresetcurrcount}
\glsresetcurrcountfalse
\renewcommand*{\glsenableentrycount}{%
  \appto\@newglossaryentry@defcounters{\@@newglossaryentry@defcounters}%
  \renewcommand*{\gls@defdocnewglossaryentry}{%
    \renewcommand*\newglossaryentry[2]{%
      \PackageError{glossaries}{\string\newglossaryentry\space
      may only be used in the preamble when entry counting has
      been activated}{If you use \string\glsenableentrycount\space
      you must place all entry definitions in the preamble not in
      the document environment}%
    }%
  }%
  \newcommand*{\glsentrycurrcount}[1]{%
   \ifcsundef{glo@\glsdetoklabel{##1}@currcount}%
   {0}{\@gls@entry@field{##1}{currcount}}%
  }%
  \newcommand*{\glsentryprevcount}[1]{%
   \ifcsundef{glo@\glsdetoklabel{##1}@prevcount}%
   {0}{\@gls@entry@field{##1}{prevcount}}%
  }%
  \let\@glsxtr@entrycount@org@unset\glsxtrpostunset
  \renewcommand*{\glsxtrpostunset}[1]{%
    \@glsxtr@entrycount@org@unset{##1}%
    \@gls@increment@currcount{##1}%
  }%
  \let\@glsxtr@entrycount@org@localunset\glsxtrpostlocalunset
  \renewcommand*{\glsxtrpostlocalunset}[1]{%
    \@glsxtr@entrycount@org@localunset{##1}%
    \@gls@local@increment@currcount{##1}%
  }%
  \let\@glsxtr@entrycount@org@reset\glsxtrpostreset
  \renewcommand*{\glsxtrpostreset}[1]{%
    \@glsxtr@entrycount@org@reset{##1}%
    \ifglsresetcurrcount
       \csgdef{glo@\glsdetoklabel{##1}@currcount}{0}%
    \fi
  }%
  \let\@glsxtr@entrycount@org@localreset\glsxtrpostlocalreset
  \renewcommand*{\glsxtrpostlocalreset}[1]{%
    \@glsxtr@entrycount@org@localreset{##1}%
    \ifglsresetcurrcount
      \csdef{glo@\glsdetoklabel{##1}@currcount}{0}%
    \fi
  }%
  \let\@cgls@\@@cgls@
  \let\@cglspl@\@@cglspl@
  \let\@cGls@\@@cGls@
  \let\@cGlspl@\@@cGlspl@
  \let\@cGLS@\@@cGLS@
  \let\@cGLSpl@\@@cGLSpl@
  \AtEndDocument{\@gls@write@entrycounts}%
  \renewcommand*{\@gls@entry@count}[2]{%
    \csgdef{glo@\glsdetoklabel{##1}@prevcount}{##2}%
  }%
  \let\glsenableentrycount\relax
  \renewcommand*{\glsenableentryunitcount}{%
    \PackageError{glossaries-extra}{\string\glsenableentryunitcount\space
     can't be used with \string\glsenableentrycount}%
    {Use one or other but not both commands}%
  }%
}
\renewcommand*{\@@newglossaryentry@defcounters}{%
 \csdef{glo@\@glo@label @currcount}{0}%
 \ifnum\@glsxtr@docdefval=2\relax
  \ifcsdef{glo@\@glo@label @prevcount}{}{\csdef{glo@\@glo@label @prevcount}{0}}%
 \else
  \csdef{glo@\@glo@label @prevcount}{0}%
 \fi
}
\renewcommand*{\@gls@write@entrycounts}{%
  \immediate\write\@auxout
    {\string\providecommand*{\string\@gls@entry@count}[2]{}}%
  \count@=0\relax
  \forallglsentries{\@glsentry}{%
    \glshasattribute{\@glsentry}{entrycount}%
    {%
      \ifglsused{\@glsentry}%
      {%
        \immediate\write\@auxout
         {\string\@gls@entry@count{\@glsentry}{\glsentrycurrcount{\@glsentry}}}%
      }%
      {}%
      \advance\count@ by \@ne
    }%
    {}%
  }%
  \ifnum\count@=0
    \GlossariesExtraWarningNoLine{Entry counting has been enabled
     \MessageBreak with \string\glsenableentrycount\space but the
     \MessageBreak attribute `entrycount' hasn't
     \MessageBreak been assigned to any of the defined
     \MessageBreak entries}%
  \fi
}
\newcommand*{\glsxtrifcounttrigger}[3]{%
 \glshasattribute{#1}{entrycount}%
 {%
   \ifnum\glsentryprevcount{#1}>\glsgetattribute{#1}{entrycount}\relax
    #3%
   \else
    #2%
   \fi
 }%
 {#3}%
}
\def\@@cgls@#1#2[#3]{%
  \glsxtrifcounttrigger{#2}%
  {%
    \cglsformat{#2}{#3}%
    \glsunset{#2}%
  }%
  {%
    \@gls@{#1}{#2}[#3]%
  }%
}%
\def\@@cglspl@#1#2[#3]{%
  \glsxtrifcounttrigger{#2}%
  {%
    \cglsplformat{#2}{#3}%
    \glsunset{#2}%
  }%
  {%
    \@glspl@{#1}{#2}[#3]%
  }%
}%
\def\@@cGls@#1#2[#3]{%
  \glsxtrifcounttrigger{#2}%
  {%
    \cGlsformat{#2}{#3}%
    \glsunset{#2}%
  }%
  {%
    \@Gls@{#1}{#2}[#3]%
  }%
}%
\def\@@cGlspl@#1#2[#3]{%
  \glsxtrifcounttrigger{#2}%
  {%
    \cGlsplformat{#2}{#3}%
    \glsunset{#2}%
  }%
  {%
    \@Glspl@{#1}{#2}[#3]%
  }%
}%
\def\@@cGLS@#1#2[#3]{%
  \glsxtrifcounttrigger{#2}%
  {%
    \cGLSformat{#2}{#3}%
    \glsunset{#2}%
  }%
  {%
    \@GLS@{#1}{#2}[#3]%
  }%
}%
\def\@@cGLSpl@#1#2[#3]{%
  \glsxtrifcounttrigger{#2}%
  {%
    \cGLSplformat{#2}{#3}%
    \glsunset{#2}%
  }%
  {%
    \@GLSpl@{#1}{#2}[#3]%
  }%
}%
\def\@cgls@#1#2[#3]{\@gls@{#1}{#2}[#3]}
\def\@cGls@#1#2[#3]{\@Gls@{#1}{#2}[#3]}
\def\@cglspl@#1#2[#3]{\@glspl@{#1}{#2}[#3]}
\def\@cGlspl@#1#2[#3]{\@Glspl@{#1}{#2}[#3]}
\newrobustcmd*{\cGLS}{\@gls@hyp@opt\@cGLS}
\glsmfublocker{\cGLS}
\newcommand*{\@cGLS}[2][]{%
  \new@ifnextchar[{\@cGLS@{#1}{#2}}{\@cGLS@{#1}{#2}[]}%
}
\def\@cGLS@#1#2[#3]{\@GLS@{#1}{#2}[#3]}
\newcommand*{\cGLSformat}[2]{%
 \expandafter\glsuppercase\expandafter{\cglsformat{#1}{#2}}%
}
\newrobustcmd*{\cGLSpl}{\@gls@hyp@opt\@cGLSpl}
\glsmfublocker{\cGLSpl}
\newcommand*{\@cGLSpl}[2][]{%
  \new@ifnextchar[{\@cGLSpl@{#1}{#2}}{\@cGLSpl@{#1}{#2}[]}%
}
\def\@cGLSpl@#1#2[#3]{\@GLSpl@{#1}{#2}[#3]}
\newcommand*{\cGLSplformat}[2]{%
 \expandafter\glsuppercase\expandafter{\cglsplformat{#1}{#2}}%
}
\renewcommand*{\cglsformat}[2]{%
  \glsifregular{#1}
  {\glsentryfirst{#1}}%
  {\ifglshaslong{#1}{\glsentrylong{#1}}{\glsentryfirst{#1}}}#2%
}
\renewcommand*{\cGlsformat}[2]{%
  \glsifregular{#1}
  {\Glsentryfirst{#1}}%
  {\ifglshaslong{#1}{\Glsentrylong{#1}}{\Glsentryfirst{#1}}}#2%
}
\renewcommand*{\cglsplformat}[2]{%
  \glsifregular{#1}
  {\glsentryfirstplural{#1}}%
  {\ifglshaslong{#1}{\glsentrylongpl{#1}}{\glsentryfirstplural{#1}}}#2%
}
\renewcommand*{\cGlsplformat}[2]{%
  \glsifregular{#1}
  {\Glsentryfirstplural{#1}}%
  {\ifglshaslong{#1}{\Glsentrylongpl{#1}}{\Glsentryfirstplural{#1}}}#2%
}
\newcommand*{\@@newglossaryentry@defunitcounters}{%
  \protected@edef\@glo@countunit{\csuse{@glsxtr@categoryattr@@\@glo@category @unitcount}}%
  \ifdefvoid\@glo@countunit
  {}%
  {%
    \@glsxtr@ifunitcounter{\@glo@countunit}%
    {}%
    {\expandafter\@glsxtr@addunitcounter\expandafter{\@glo@countunit}}%
  }%
}
\newcommand*{\@glsxtr@unitcountlist}{}
\newcommand*{\@glsxtr@addunitcounter}[1]{%
 \listadd{\@glsxtr@unitcountlist}{#1}%
 \ifcsundef{glsxtr@theunit@#1}
 {%
   \ifcsdef{theH#1}%
   {\csdef{glsxtr@theunit@#1}{\csuse{theH#1}}}%
   {\csdef{glsxtr@theunit@#1}{\csuse{the#1}}}%
 }%
 {}%
}
\newcommand*{\@glsxtr@ifunitcounter}[3]{%
  \xifinlist{#1}{\@glsxtr@unitcountlist}{#2}{#3}%
}
\newcommand*\@glsxtr@currentunitcount[1]{%
 glo@\glsdetoklabel{#1}@currunit@\glsgetattribute{#1}{unitcount}.%
 \csuse{glsxtr@theunit@\glsgetattribute{#1}{unitcount}}%
}
\newcommand*\@glsxtr@previousunitcount[1]{%
 glo@\glsdetoklabel{#1}@prevunit@\glsgetattribute{#1}{unitcount}.%
 \csuse{glsxtr@theunit@\glsgetattribute{#1}{unitcount}}%
}
\newcommand*{\@gls@increment@currunitcount}[1]{%
  \glshasattribute{#1}{unitcount}%
  {%
    \protected@edef\@glsxtr@csname{\@glsxtr@currentunitcount{#1}}%
    \ifcsundef{\@glsxtr@csname}%
    {%
      \csgdef{\@glsxtr@csname}{1}%
      \listcsxadd
       {glo@\glsdetoklabel{#1}@unitlist}%
       {\glsgetattribute{#1}{unitcount}.%
        \csuse{glsxtr@theunit@\glsgetattribute{#1}{unitcount}}%
       }%
    }%
    {%
      \csxdef{\@glsxtr@csname}%
      {\number\numexpr\csname\@glsxtr@csname\endcsname+1}%
    }%
  }%
  {}%
}
\newcommand*{\@gls@local@increment@currunitcount}[1]{%
  \glshasattribute{#1}{unitcount}%
  {%
    \protected@edef\@glsxtr@csname{\@glsxtr@currentunitcount{#1}}%
    \ifcsundef{\@glsxtr@csname}%
    {%
      \csdef{\@glsxtr@csname}{1}%
      \listcseadd
       {glo@\glsdetoklabel{#1}@unitlist}%
       {\glsgetattribute{#1}{unitcount}.%
        \csuse{glsxtr@theunit@\glsgetattribute{#1}{unitcount}}%
       }%
    }%
    {%
      \csedef{\@glsxtr@csname}%
      {\number\numexpr\csname\@glsxtr@csname\endcsname+1}%
    }%
  }%
  {}%
}
\newcommand*{\@glsxtr@currunitcount}[2]{%
 \ifcsundef
 {glo@\glsdetoklabel{#1}@currunit@#2}%
 {0}%
 {\csuse{glo@\glsdetoklabel{#1}@currunit@#2}}%
}%
\newcommand*{\@glsxtr@prevunitcount}[2]{%
 \ifcsundef
 {glo@\glsdetoklabel{#1}@prevunit@#2}%
 {0}%
 {\csuse{glo@\glsdetoklabel{#1}@prevunit@#2}}%
}%
\newcommand*{\glsenableentryunitcount}{%
  \appto\@newglossaryentry@defcounters{\@@newglossaryentry@defunitcounters}%
  \renewcommand*{\gls@defdocnewglossaryentry}{%
    \renewcommand*\newglossaryentry[2]{%
      \PackageError{glossaries}{\string\newglossaryentry\space
      may only be used in the preamble when entry counting has
      been activated}{If you use \string\glsenableentryunitcount\space
      you must place all entry definitions in the preamble not in
      the document environment}%
    }%
  }%
  \newcommand*{\glsentrycurrcount}[1]{%
    \@glsxtr@currunitcount{##1}{\glsgetattribute{##1}{unitcount}.%
     \csuse{glsxtr@theunit@\glsgetattribute{##1}{unitcount}}}%
  }%
  \newcommand*{\glsentryprevcount}[1]{%
    \@glsxtr@prevunitcount{##1}{\glsgetattribute{##1}{unitcount}.%
     \csuse{glsxtr@theunit@\glsgetattribute{##1}{unitcount}}}%
  }%
  \newcommand*{\glsentryprevtotalcount}[1]{%
    \ifcsundef{glo@\glsdetoklabel{##1}@prevunittotal}%
    {0}%
    {%
      \number\csuse{glo@\glsdetoklabel{##1}@prevunittotal}
    }%
  }%
  \newcommand*{\glsentryprevmaxcount}[1]{%
    \ifcsundef{glo@\glsdetoklabel{##1}@prevunitmax}%
    {0}%
    {%
      \number\csuse{glo@\glsdetoklabel{##1}@prevunitmax}
    }%
  }%
  \let\@glsxtr@entryunitcount@org@unset\glsxtrpostunset
  \renewcommand*{\glsxtrpostunset}[1]{%
    \@glsxtr@entryunitcount@org@unset{##1}%
    \@gls@increment@currunitcount{##1}%
  }%
  \let\@glsxtr@entryunitcount@org@localunset\glsxtrpostlocalunset
  \renewcommand*{\glsxtrpostlocalunset}[1]{%
    \@glsxtr@entryunitcount@org@localunset{##1}%
    \@gls@local@increment@currunitcount{##1}%
  }%
  \let\@glsxtr@entryunitcount@org@reset\glsxtrpostreset
  \renewcommand*{\glsxtrpostreset}[1]{%
    \glshasattribute{##1}{unitcount}%
    {%
      \protected@edef\@glsxtr@csname{\@glsxtr@currentunitcount{##1}}%
      \ifcsundef{\@glsxtr@csname}%
      {}%
      {\ifglsresetcurrcount\csgdef{\@glsxtr@csname}{0}\fi}%
    }%
    {}%
  }%
  \let\@glsxtr@entryunitcount@org@localreset\glsxtrpostlocalreset
  \renewcommand*{\glsxtrpostlocalreset}[1]{%
    \@glsxtr@entryunitcount@org@localreset{##1}%
    \glshasattribute{##1}{unitcount}%
    {%
      \protected@edef\@glsxtr@csname{\@glsxtr@currentunitcount{##1}}%
      \ifcsundef{\@glsxtr@csname}%
      {}%
      {\ifglsresetcurrcount\csdef{\@glsxtr@csname}{0}\fi}%
    }%
    {}%
  }%
  \let\@cgls@\@@cgls@
  \let\@cglspl@\@@cglspl@
  \let\@cGls@\@@cGls@
  \let\@cGlspl@\@@cGlspl@
  \let\@cGLS@\@@cGLS@
  \let\@cGLSpl@\@@cGLSpl@
  \AtEndDocument{\@gls@write@entryunitcounts}%
  \renewcommand*{\@gls@entry@unitcount}[3]{%
    \csgdef{glo@\glsdetoklabel{##1}@prevunit@##3}{##2}%
    \ifcsundef{glo@\glsdetoklabel{##1}@prevunittotal}%
    {\csgdef{glo@\glsdetoklabel{##1}@prevunittotal}{##2}}%
    {%
      \csxdef{glo@\glsdetoklabel{##1}@prevunittotal}{
        \number\numexpr\csuse{glo@\glsdetoklabel{##1}@prevunittotal}+##2}%
    }%
    \ifcsundef{glo@\glsdetoklabel{##1}@prevunitmax}%
    {\csgdef{glo@\glsdetoklabel{##1}@prevunitmax}{##2}}%
    {%
      \ifnum\csuse{glo@\glsdetoklabel{##1}@prevunitmax}<##2
       \csgdef{glo@\glsdetoklabel{##1}@prevunitmax}{##2}%
      \fi
    }%
  }%
  \let\glsenableentryunitcount\relax
  \renewcommand*{\glsenableentrycount}{%
    \PackageError{glossaries-extra}{\string\glsenableentrycount\space
     can't be used with \string\glsenableentryunitcount}%
    {Use one or other but not both commands}%
  }%
}
\@onlypreamble\glsenableentryunitcount
\newcommand*{\@gls@entry@unitcount}[3]{}
\newcommand*{\@gls@write@entryunitcounts@do}[1]{%
  \immediate\write\@auxout
   {\string\@gls@entry@unitcount
     {\@glsentry}%
     {\@glsxtr@currunitcount{\@glsentry}{#1}%
     }%
     {#1}}%
}
\newcommand*{\@gls@write@entryunitcounts}{%
  \immediate\write\@auxout
    {\string\providecommand*{\string\@gls@entry@unitcount}[3]{}}%
  \count@=0\relax
  \forallglsentries{\@glsentry}{%
    \glshasattribute{\@glsentry}{unitcount}%
    {%
      \ifglsused{\@glsentry}%
      {%
        \forlistcsloop
          {\@gls@write@entryunitcounts@do}%
          {glo@\glsdetoklabel{\@glsentry}@unitlist}%
      }%
      {}%
      \advance\count@ by \@ne
    }%
    {}%
  }%
  \ifnum\count@=0
    \GlossariesExtraWarningNoLine{Entry counting has been enabled
     \MessageBreak with \string\glsenableentryunitcount\space but the
     \MessageBreak attribute `unitcount' hasn't
     \MessageBreak been assigned to any of the defined
     \MessageBreak entries}%
  \fi
}
\newcommand*{\GlsXtrEnableEntryUnitCounting}[3]{%
  \glsenableentryunitcount
  \renewcommand*{\gls}{\cgls}%
  \renewcommand*{\Gls}{\cGls}%
  \renewcommand*{\glspl}{\cglspl}%
  \renewcommand*{\Glspl}{\cGlspl}%
  \renewcommand*{\GLS}{\cGLS}%
  \renewcommand*{\GLSpl}{\cGLSpl}%
  \@glsxtr@setentryunitcountunsetattr{#1}{#2}{#3}%
  \let\GlsXtrEnableEntryUnitCounting\@glsxtr@setentryunitcountunsetattr
  \renewcommand*{\GlsXtrEnableEntryCounting}[2]{%
   \PackageError{glossaries-extra}{\string\GlsXtrEnableEntryCounting\space
    can't be used with \string\GlsXtrEnableEntryUnitCounting}%
   {Use one or other but not both commands}}%
}
\newcommand*{\@glsxtr@setentryunitcountunsetattr}[3]{%
 \@for\@glsxtr@cat:=#1\do
 {%
   \ifdefempty{\@glsxtr@cat}{}%
   {%
     \glssetcategoryattribute{\@glsxtr@cat}{entrycount}{#2}%
     \glssetcategoryattribute{\@glsxtr@cat}{unitcount}{#3}%
   }%
 }%
}
\renewcommand*{\SetGenericNewAcronym}{%
  \ifdefequal\@addtoacronymlists\@glsxtr@org@addtoacronynlists
  {}%
  {%
    \GlossariesWarning{\string\SetGenericNewAcronym\space used
    without restoring base acronym functions with
    \string\RestoreAcronyms}%
  }%
  \let\@Gls@entryname\@Gls@acrentryname
  \renewcommand{\newacronym}[4][]{%
    \ifdefempty{\@glsacronymlists}%
    {%
      \def\@glo@type{\acronymtype}%
      \setkeys{glossentry}{##1}%
      \DeclareAcronymList{\@glo@type}%
    }%
    {}%
    \glskeylisttok{##1}%
    \glslabeltok{##2}%
    \glsshorttok{##3}%
    \glslongtok{##4}%
    \newacronymhook
    \protected@edef\@do@newglossaryentry{%
      \noexpand\newglossaryentry{\the\glslabeltok}%
      {%
        type=\acronymtype,%
        name={\expandonce{\acronymentry{##2}}},%
        sort={\acronymsort{\the\glsshorttok}{\the\glslongtok}},%
        text={\the\glsshorttok},%
        short={\the\glsshorttok},%
        shortplural={\the\glsshorttok\noexpand\acrpluralsuffix},%
        long={\the\glslongtok},%
        longplural={\the\glslongtok\noexpand\acrpluralsuffix},%
        category=acronym,
        \GenericAcronymFields,%
        \the\glskeylisttok
      }%
    }%
    \@do@newglossaryentry
  }%
  \renewcommand*{\acrfullfmt}[3]{%
    \glslink[##1]{##2}{\genacrfullformat{##2}{##3}}}%
  \renewcommand*{\Acrfullfmt}[3]{%
    \glslink[##1]{##2}{\Genacrfullformat{##2}{##3}}}%
  \renewcommand*{\ACRfullfmt}[3]{%
    \glslink[##1]{##2}{%
      \glsuppercase{\genacrfullformat{##2}{##3}}}}%
  \renewcommand*{\acrfullplfmt}[3]{%
    \glslink[##1]{##2}{\genplacrfullformat{##2}{##3}}}%
  \renewcommand*{\Acrfullplfmt}[3]{%
    \glslink[##1]{##2}{\Genplacrfullformat{##2}{##3}}}%
  \renewcommand*{\ACRfullplfmt}[3]{%
    \glslink[##1]{##2}{%
      \glsuppercase{\genplacrfullformat{##2}{##3}}}}%
  \renewcommand*{\glsentryfull}[1]{\genacrfullformat{##1}{}}%
  \renewcommand*{\Glsentryfull}[1]{\Genacrfullformat{##1}{}}%
  \renewcommand*{\glsentryfullpl}[1]{\genplacrfullformat{##1}{}}%
  \renewcommand*{\Glsentryfullpl}[1]{\Genplacrfullformat{##1}{}}%
}
\let\@glsxtr@org@setacronymstyle\setacronymstyle
\let\@glsxtr@org@newacronymstyle\newacronymstyle
\let\@glsxtr@acronymlists\@glsacronymlists
\let\@glsxtr@org@addtoacronynlists\@addtoacronymlists
\let\@glsxtr@org@setacronymlists\SetAcronymLists
\newcommand{\@glsxtr@abbrlists}{}
\newcommand*{\forallabbreviationlists}[2]{%
  \@for#1:=\@glsxtr@abbrlists\do{\ifdefempty{#1}{}{#2}}%
}
\newcommand*{\@glsxtr@addabbreviationlist}[1]{%
  \protected@edef\@glo@type{#1}%
  \ifdefempty\@glsxtr@abbrlists
  {\let\@glsxtr@abbrlists\@glo@type}%
  {%
    \ifdefequal\@glsxtr@abbrlists\@glo@type
    {}%
    {%
      \expandafter\DTLifinlist\expandafter{\@glo@type}{\@glsxtr@abbrlists}{}%
      {\protected@eappto\@glsxtr@abbrlists{,\@glo@type}}%
    }%
  }%
}
\renewcommand*{\forallacronyms}[2]{%
  \@glsxtr@base@acrcmd\forallacronyms\forallabbreviationlists
  \@for#1:=\@glsacronymlists\do{\ifx#1\@empty\else#2\fi}%
}
\newcommand*{\MakeAcronymsAbbreviations}{%
   \@for\@gls@type:=\@glsacronymlists\do{%
     \csgdef{gls@\@gls@type @entryfmt}{\glsentryfmt}%
   }%
   \let\@glsxtr@acronymlists\@glsacronymlists
   \let\@glsacronymlists\@empty
   \let\@addtoacronymlists\@gobble
   \let\SetAcronymLists\@gobble
   \let\@glsxtr@base@acrcmd\@@glsxtr@base@acrcmd@warn
   \renewcommand*{\newacronym}[4][]{%
     \glsxtr@newabbreviation{type=\acronymtype,category=acronym,##1}{##2}{##3}{##4}%
   }%
   \renewcommand*{\firstacronymfont}[1]{\glsfirstabbrvfont{##1}}%
   \renewcommand*{\acronymfont}[1]{\glsabbrvfont{##1}}%
   \renewcommand*{\setacronymstyle}[1]{%
      \PackageError{glossaries-extra}{\string\setacronymstyle{##1}
      unavailable.
      Use \string\setabbreviationstyle[acronym]\space instead.
      The original acronym interface can be restored with
      \string\RestoreAcronyms}{}%
   }%
   \renewcommand*{\newacronymstyle}[1]{%
      \GlossariesExtraWarning{New acronym style `##1' won't be
      available unless you restore the original acronym interface with
      \string\RestoreAcronyms}%
      \@glsxtr@org@newacronymstyle{##1}%
   }%
}
\MakeAcronymsAbbreviations
\newcommand*{\RestoreAcronyms}{%
  \let\@glsacronymlists\@glsxtr@acronymlists
  \let\@addtoacronymlists\@glsxtr@org@addtoacronynlists
  \let\SetAcronymLists\@glsxtr@org@setacronymlists
  \let\@glsxtr@base@acrcmd\@gobbletwo
  \@for\@gls@type:=\@glsacronymlists\do{%
    \SetDefaultAcronymDisplayStyle{\@gls@type}%
  }%
  \SetGenericNewAcronym
  \renewcommand{\firstacronymfont}[1]{\acronymfont{##1}}%
  \renewcommand{\acronymfont}[1]{##1}%
  \let\setacronymstyle\@glsxtr@org@setacronymstyle
  \let\newacronymstyle\@glsxtr@org@newacronymstyle
  \renewcommand*\@gls@link@checkfirsthyper{%
    \ifglsused{\glslabel}%
    {\let\glsxtrifwasfirstuse\@secondoftwo}
    {\let\glsxtrifwasfirstuse\@firstoftwo}%
    \@glsxtr@org@checkfirsthyper
  }
  \glssetcategoryattribute{acronym}{regular}{false}%
  \setacronymstyle{long-short}%
}
\renewcommand*{\glsacspace}[1]{%
  \glsmeasurewidth{\dimen@}{(\firstacronymfont{\glsentryshort{#1}})}%
  \ifdim\dimen@<\glsacspacemax~\else\space\fi
}
\newcommand*{\glsacspacemax}{3em}
\newrobustcmd*{\glsabspace}[1]{%
  \glsmeasurewidth{\dimen@}{(\glsfirstabbrvfont{\glsentryshort{#1}})}%
  \ifdim\dimen@<\glsacspacemax
    \glsxtrgenentrytextfmt{~}%
  \else
    \glsxtrgenentrytextfmt{ }%
  \fi
}
\newcommand*{\@glsxtr@reg@glosslist}{}
\let\@glsxtr@org@makeglossaries\makeglossaries
\providecommand\@makeglossaries@warn@noprintglossary{%
  \ifdefstring{\@glo@types}{,}%
  {%
    \GlossariesWarningNoLine{No glossaries have been defined}%
  }%
  {%
    \GlossariesWarningNoLine{No \string\printglossary\space
      or \string\printglossaries\space
      found. ^^J(Remove \string\makeglossaries\space if you
      don't want any glossaries.) ^^JThis document will not
      have a glossary}%
  }%
}%
\providecommand{\@domakeglossaries}[1]{#1}
\providecommand{\@gls@automake@types}{\@glo@types}
\renewcommand*{\makeglossaries}[1][]{%
 \ifx\@glsxtr@record@setting\@glsxtr@record@setting@alsoindex
   \edef\glsindexingsetting{bib2gls-\ifglsxindy xindy\else makeindex\fi}%
 \else
   \ifglsxindy
     \def\glsindexingsetting{xindy}%
   \else
     \def\glsindexingsetting{makeindex}%
   \fi
 \fi
 \@domakeglossaries
 {%
   \@glsxtr@if@record@only
   {%
    \PackageError{glossaries-extra}{\string\makeglossaries\space
     not permitted\MessageBreak with record=\@glsxtr@record@setting\space
     package option}%
    {You may only use \string\makeglossaries\space with
     record=off or record=hybrid options}%
   }%
   {%
     \ifblank{#1}%
     {%
        \@glsxtr@org@makeglossaries
        \ifx\@glsxtr@record@setting\@glsxtr@record@setting@alsoindex
          \let\warn@noprintglossary\@glsxtr@warn@hybrid@noprintgloss
        \fi
     }%
     {%
       \ifx\@glsxtr@record@setting\@glsxtr@record@setting@alsoindex
         \PackageError{glossaries-extra}{\string\makeglossaries[#1]\space
         not permitted\MessageBreak with record=\@glsxtr@record@setting\space package option}%
         {You may only use the hybrid \string\makeglossaries[...]\space with
          record=off option}%
       \else
        \appto\glsindexingsetting{-noidx}%
         \protected@edef\@glsxtr@reg@glosslist{#1}%
         \let\@gls@automake@types\@glsxtr@reg@glosslist
         \ifdef\@gls@@automake@immediate{\@gls@@automake@immediate}{}%
         \ifundef{\glswrite}{\newwrite\glswrite}{}%
         \protected@write\@auxout{}{\string\providecommand
           \string\@glsorder[1]{}}
         \protected@write\@auxout{}{\string\providecommand
           \string\@istfilename[1]{}}
         \protected@write\@auxout{}{\string\@istfilename{\istfilename}}%
         \protected@write\@auxout{}{\string\@glsorder{\glsorder}}
         \protected@write\@auxout{}{\string\glsxtr@makeglossaries{#1}}
         \write\@auxout{\string\providecommand\string\@gls@reference[3]{}}%
         \@for\@glo@type:=#1\do{%
          \ifdefempty{\@glo@type}{}{\@makeglossary{\@glo@type}}%
         }%
         \renewcommand*\newglossary[4][]{%
         \PackageError{glossaries}{New glossaries
         must be created before \string\makeglossaries}{You need
         to move \string\makeglossaries\space after all your
         \string\newglossary\space commands}}%
          \let\@makeglossary\@gobble
          \renewcommand\makeglossaries[1][]{}%
          \@disable@onlypremakeg
          \let\gls@checkseeallowed\relax
          \renewcommand*{\@do@seeglossary}[2]{%
            \glsdoifexists{##1}%
            {%
              \protected@edef\@gls@label{\glsdetoklabel{##1}}%
              \protected@edef\@gls@type{\csname glo@\@gls@label @type\endcsname}%
              \expandafter\DTLifinlist\expandafter{\@gls@type}{\@glsxtr@reg@glosslist}%
              {\@glsxtr@org@doseeglossary{##1}{##2}}%
              {%
                \@@glsxtrwrglossmark
                \protected@write\@auxout{}{%
                  \string\@gls@reference
                    {\gls@type}{\@gls@label}{\string\glsseeformat##2{}}%
                }%
              }%
            }%
          }%
          \let\@glsxtr@@do@@wrglossary\@@do@@wrglossary
          \def\@@do@@wrglossary{%
            \protected@edef\@gls@type{\csname glo@\@gls@label @type\endcsname}%
            \expandafter\DTLifinlist\expandafter{\@gls@type}{\@glsxtr@reg@glosslist}%
            {\@glsxtr@@do@@wrglossary}%
            {\gls@noidxglossary}%
          }%
          \let\warn@nomakeglossaries\relax
          \let\warn@noprintglossary\@makeglossaries@warn@noprintglossary
          \renewcommand{\@gls@noref@warn}[1]{%
            \protected@edef\@gls@type{##1}%
            \expandafter\DTLifinlist\expandafter{\@gls@type}{\@glsxtr@reg@glosslist}%
            {%
              \GlossariesExtraWarning{Can't use
                 \string\printnoidxglossary[type={\@gls@type}]
                 when `\@gls@type' is listed in the optional argument of
                 \string\makeglossaries}%
            }%
            {%
              \GlossariesWarning{Empty glossary for
              \string\printnoidxglossary[type={##1}].
              Rerun may be required (or you may have forgotten to use
              commands like \string\gls)}%
            }%
          }%
          \renewcommand*{\glsdisplaynumberlist}[1]{%
            \expandafter\DTLifinlist\expandafter{##1}{\@glsxtr@reg@glosslist}%
            {\@glsxtr@idx@displaynumberlist{##1}}%
            {\@glsxtr@noidx@displaynumberlist{##1}}%
          }%
          \renewcommand*{\glsentrynumberlist}[1]{%
            \expandafter\DTLifinlist\expandafter{##1}{\@glsxtr@reg@glosslist}%
            {\@glsxtr@idx@entrynumberlist{##1}}%
            {\@glsxtr@noidx@entrynumberlist{##1}}%
          }%
          \renewcommand*{\glsnumberlistloop}[2]{%
            \expandafter\DTLifinlist\expandafter{##1}{\@glsxtr@reg@glosslist}%
            {%
               \PackageError{glossaries-extra}{\string\glsnumberlistloop\space
                not available for glossary `##1'}{}%
            }%
            {\@glsxtr@noidx@numberlistloop{##1}{##2}}%
          }%
          \renewcommand*{\glsprestandardsort}[3]{%
            \expandafter\DTLifinlist\expandafter{##2}{\@glsxtr@reg@glosslist}%
            {%
              \glsdosanitizesort
            }%
            {%
              \ifglssanitizesort
               \@gls@noidx@sanitizesort
              \else
               \@gls@noidx@nosanitizesort
              \fi
            }%
          }%
          \renewcommand*\new@glossaryentry[2]{%
            \PackageError{glossaries-extra}{Glossary entries must be defined
             in the preamble\MessageBreak when you use the optional argument
             of \string\makeglossaries}{Either move your definitions to the
             preamble or don't use the optional argument of
             \string\makeglossaries}%
          }%
          \let\@glo@assign@sortkey\@glsxtr@mixed@assign@sortkey
          \renewcommand*{\@printgloss@setsort}{%
            \expandafter\@glsxtr@gettype\expandafter,\@glsxtr@printglossopts,%
              type=\glsdefaulttype,\@end@glsxtr@gettype
            \def\@glo@sorttype{\@glo@default@sorttype}%
          }%
          \ifglsautomake
            \renewcommand*{\@gls@doautomake}{%
              \@for\@gls@type:=\@glsxtr@reg@glosslist\do{%
                \ifdefempty{\@gls@type}{}{\@gls@automake{\@gls@type}}%
              }%
            }%
          \fi
          \ifdef\@glo@check@sortallowed{\@glo@check@sortallowed\makeglossaries}{}%
       \fi
     }%
     \prohibit@glsxtrnoidxgroups
     \let\gls@warn@makegloss@incompatible\@gls@warn@makegloss@incompatible
   }%
 }%
}
\newcommand*{\gls@warn@makegloss@incompatible}[2]{}
\newcommand*{\@gls@warn@makegloss@incompatible}[2]{%
  #2\GlossariesExtraWarning{#1\space is incompatible with \string\makeglossaries}%
}
\ifdef\@printgloss@checkexists
{\newcommand{\glsxtr@printgloss@checkexists}{\@printgloss@checkexists}}
{\newcommand{\glsxtr@printgloss@checkexists}[2]{#2}}
\newcommand{\@glsxtr@orgprintglossary}[2]{%
  \def\@glo@type{\glsdefaulttype}%
  \def\glossarytitle{%
     \ifcsdef{@glotype@\@glo@type @title}%
     {\csuse{@glotype@\@glo@type @title}}%
     {\glossaryname}}%
  \def\glossarytoctitle{\glossarytitle}%
  \let\org@glossarytitle\glossarytitle
  \def\@glossarystyle{%
    \ifx\@glossary@default@style\relax
      \GlossariesWarning{No default glossary style provided \MessageBreak
        for the glossary `\@glo@type'. \MessageBreak
        Using fallback. \MessageBreak
        To fix this set the style with \MessageBreak
        \string\setglossarystyle\space or use the \MessageBreak
        style key=value option}%
    \fi
  }%
  \def\gls@dotoctitle{\glssettoctitle{\@glo@type}}%
  \let\@org@glossaryentrynumbers\glossaryentrynumbers
  \bgroup
    \@printgloss@setsort
    \setkeys{printgloss}{#1}%
    \ifx\glossarytitle\org@glossarytitle
    \else
      \cslet{@glotype@\@glo@type @title}{\glossarytitle}%
    \fi
    \let\currentglossary\@glo@type
    \let\org@glossaryentrynumbers\glossaryentrynumbers
    \let\glsnonextpages\@glsnonextpages
    \let\glsnextpages\@glsnextpages
    \glsxtractivatenopost
    \gls@dotoctitle
    \@glossarystyle
    \let\gls@org@glossaryentryfield\glossentry
    \let\gls@org@glossarysubentryfield\subglossentry
    \renewcommand{\glossentry}[1]{%
      \protected@xdef\glscurrententrylabel{\glsdetoklabel{##1}}%
      \gls@org@glossaryentryfield{##1}%
    }%
    \renewcommand{\subglossentry}[2]{%
      \protected@xdef\glscurrententrylabel{\glsdetoklabel{##2}}%
      \gls@org@glossarysubentryfield{##1}{##2}%
    }%
    \@gls@preglossaryhook
    \glsxtr@printgloss@checkexists{\@glo@type}{#2}%
  \egroup
  \global\let\glossaryentrynumbers\@org@glossaryentrynumbers
  \global\let\warn@noprintglossary\relax
}
\newcommand*{\glsxtractivatenopost}{%
  \let\nopostdesc\@nopostdesc
  \let\glsxtrnopostpunc\@glsxtr@nopostpunc
}
\newrobustcmd*{\glsxtrnopostpunc}{}
\newcommand{\@glsxtr@nopostpunc}{%
 \let\@@glsxtr@org@postdescription\glspostdescription
 \ifglsnopostdot
   \renewcommand{\glspostdescription}{%
     \glsnopostdottrue
     \let\glspostdescription\@@glsxtr@org@postdescription
     \let\glsxtrrestorepostpunc\@glsxtr@restore@postpunc
     \glsxtrpostdescription
     \@glsxtr@nopostpunc@postdesc}%
 \else
   \renewcommand{\glspostdescription}{%
     \let\glspostdescription\@@glsxtr@org@postdescription
     \let\glsxtrrestorepostpunc\@glsxtr@restore@postpunc
     \glsxtrpostdescription
     \@glsxtr@nopostpunc@postdesc}%
 \fi
 \glsnopostdotfalse
}
\newcommand*{\@glsxtr@nopostpunc@postdesc}{}
\newcommand*{\@glsxtr@restore@postpunc}{%
 \def\@glsxtr@nopostpunc@postdesc{%
   \@glsxtr@org@postdescription
   \let\@glsxtr@nopostpunc@postdesc\@empty
   \let\glsxtrrestorepostpunc\@empty
 }%
}
\newcommand*{\glsxtrrestorepostpunc}{}
\renewcommand{\@printglossary}[2]{%
  \def\@glsxtr@printglossopts{#1}%
  \@glsxtr@orgprintglossary{#1}{#2}%
}
\define@choicekey{printgloss}{target}
[\@glsxtr@printglossval\@glsxtr@printglossnr]%
{true,false}[true]%
{%
  \ifcase\@glsxtr@printglossnr
    \def\@glstarget{\glsdohypertarget}%
  \else
    \let\@glstarget\@secondoftwo
  \fi
}
\newcommand{\@glsxtrhypernameprefix}{}
\define@key{printgloss}{targetnameprefix}{%
  \renewcommand{\@glsxtrhypernameprefix}{#1}%
}
\define@key{printgloss}{prefix}{%
  \renewcommand{\glolinkprefix}{#1}%
}
\define@key{printgloss}{label}{%
  \glsxtrsetglossarylabel{#1}%
}
\define@key{printgloss}{preamble}{%
  \renewcommand{\glossarypreamble}{#1}%
}
\define@key{printgloss}{postamble}{%
  \renewcommand{\glossarypostamble}{#1}%
}
\newcommand{\glsxtrsetglossarylabel}[1]{%
  \ifstrempty{#1}%
  {%
    \renewcommand*{\@@glossaryseclabel}{}%
  }%
  {%
    \renewcommand*{\@@glossaryseclabel}{%
      \protected@edef\@currentlabelname{\glossarytoctitle}%
      \label{#1}%
    }%
  }%
}
\newcount\@glsxtr@leveloffset
\define@key{printgloss}{leveloffset}{%
  \@glsxtr@assign@leveloffset#1\relax
  \gls@warn@noidxmakegloss@incompatible{option `leveloffset'}
    {\@glsxtr@leveloffset=0\relax}%
}
\newcommand*{\@glsxtr@assign@leveloffset}{%
 \@ifnextchar+{\p@glsxtr@assign@leveloffset}{\np@glsxtr@assign@leveloffset}%
}
\newcommand*{\p@glsxtr@assign@leveloffset}[1]{%
 \@ifnextchar+{\pp@glsxtr@assign@leveloffset}{\np@glsxtr@assign@leveloffset}%
}
\def\np@glsxtr@assign@leveloffset#1\relax{\@glsxtr@leveloffset=#1\relax}
\def\pp@glsxtr@assign@leveloffset#1\relax{\advance\@glsxtr@leveloffset by #1\relax}
\define@boolkey{printgloss}[glsxtr@printgloss@]{groups}[true]{%
 \ifglsxtr@printgloss@groups
 \else
  \gls@warn@noidxmakegloss@incompatible{option `groups'}%
    {\glsxtr@printgloss@groupstrue}%
 \fi
}
\glsxtr@printgloss@groupstrue
\define@boolkey{printgloss}[glsxtrprintgloss]{flatten}[true]{%
 \ifglsxtrprintglossflatten
  \gls@warn@noidxmakegloss@incompatible{option `flatten'}%
    {\glsxtrprintglossflattenfalse}%
 \fi
}
\glsxtrprintglossflattenfalse
\let\@glsxtr@org@glsdohypertarget\glsdohypertarget
\renewcommand{\glsdohypertarget}[2]{%
  \@glsxtr@org@glsdohypertarget{\@glsxtrhypernameprefix#1}{#2}%
}
\ifx\@glstarget\@glsxtr@org@glsdohypertarget
 \def\@glstarget{\glsdohypertarget}%
\fi
\newcommand{\@glsxtr@do@org@target}[2]{%
 {%
  \let\glsdohypertarget\@glsxtr@org@glsdohypertarget
  \@glstarget{#1}{#2}%
 }%
}
\newcommand*{\glsxtr@makeglossaries}[1]{}
\def\@glsxtr@gettype#1,type=#2,#3\@end@glsxtr@gettype{%
  \def\@glo@type{#2}%
}
\newcommand\@glsxtr@mixed@assign@sortkey[1]{%
  \protected@edef\@glo@type{\@glo@type}%
  \expandafter\DTLifinlist\expandafter{\@glo@type}{\@glsxtr@reg@glosslist}%
  {%
    \@glo@no@assign@sortkey{#1}%
  }%
  {%
    \@@glo@assign@sortkey{#1}%
  }%
}%
\let\@glsxtr@idx@displaynumberlist\glsdisplaynumberlist
\newcommand*{\@glsxtr@noidx@displaynumberlist}[1]{%
  \letcs{\@gls@loclist}{glo@\glsdetoklabel{#1}@loclist}%
  \ifdef\@gls@loclist
  {%
    \def\@gls@noidxloclist@sep{%
      \def\@gls@noidxloclist@sep{%
        \def\@gls@noidxloclist@sep{%
          \glsnumlistsep
        }%
        \def\@gls@noidxloclist@finalsep{\glsnumlistlastsep}%
      }%
    }%
    \def\@gls@noidxloclist@finalsep{}%
    \def\@gls@noidxloclist@prev{}%
    \forlistloop{\glsnoidxdisplayloclisthandler}{\@gls@loclist}%
    \@gls@noidxloclist@finalsep
    \@gls@noidxloclist@prev
  }%
  {%
    \glsxtrundeftag
    \glsdoifexists{#1}%
    {%
      \GlossariesWarning{Missing location list for `#1'. Either
        a rerun is required or you haven't referenced the entry.}%
    }%
  }%
}%

\newcommand*{\@glsxtr@noidx@numberlistloop}[3]{%
  \letcs{\@gls@loclist}{glo@\glsdetoklabel{#1}@loclist}%
  \let\@gls@org@glsnoidxdisplayloc\glsnoidxdisplayloc
  \let\@gls@org@glsseeformat\glsseeformat
  \let\glsnoidxdisplayloc#2\relax
  \let\glsseeformat#3\relax
  \ifdef\@gls@loclist
  {%
    \forlistloop{\glsnoidxnumberlistloophandler}{\@gls@loclist}%
  }%
  {%
    \glsxtrundeftag
    \glsdoifexists{#1}%
    {%
      \GlossariesWarning{Missing location list for `##1'. Either
        a rerun is required or you haven't referenced the entry.}%
    }%
  }%
  \let\glsnoidxdisplayloc\@gls@org@glsnoidxdisplayloc
  \let\glsseeformat\@gls@org@glsseeformat
}%
\newcommand*{\@glsxtr@noidx@entrynumberlist}[1]{%
  \letcs{\@gls@loclist}{glo@\glsdetoklabel{#1}@loclist}%
  \ifdef\@gls@loclist
  {%
    \glsnoidxloclist{\@gls@loclist}%
  }%
  {%
    \glsxtrundeftag
    \glsdoifexists{#1}%
    {%
      \GlossariesWarning{Missing location list for `#1'. Either
        a rerun is required or you haven't referenced the entry.}%
    }%
  }%
}%
\newcommand*{\@glsxtr@idx@entrynumberlist}[1]{\glsentrynumberlist{#1}}
\renewcommand*{\@gls@noidx@getgrouptitle}[2]{%
  \protected@edef\@glsxtr@titlelabel{#1}%
  \ifdefvoid\@glsxtr@titlelabel
  {}%
  {%
    \protected@edef\@glsxtr@titlelabel{\csuse{glsxtr@grouptitle@#1}}%
  }%
  \ifdefvoid{\@glsxtr@titlelabel}%
  {%
    \DTLifint{#1}%
    {%
      \ifnum#1<256\relax
        \edef#2{\char#1\relax}%
      \else
        \edef#2{#1}%
      \fi
    }%
    {%
      \ifcsundef{#1groupname}%
      {\def#2{#1}}%
      {\letcs#2{#1groupname}}%
    }%
  }%
  {%
    \let#2\@glsxtr@titlelabel
  }%
}
\let\glsxtr@org@getgrouptitle\@gls@getgrouptitle
\newcommand*{\glsxtrnoidxgroups}{%
  \ifdefequal\@glsxtr@record@setting\@glsxtr@record@setting@off
  {%
   \let\@gls@getgrouptitle\@gls@noidx@getgrouptitle
   \let\glsxtr@org@getgrouptitle\@gls@getgrouptitle
  }%
  {\PackageError{glossaries-extra}{Can't use
   \string\glsxtrunsrtgrouptonoidx\space with record=\@glsxtr@record@setting}
   {\string\glsxtrunsrtgrouptonoidx\space is only available with record=off}}%
   \global\let\prohibit@glsxtrnoidxgroups\@glsxtrnoidxgroups@nomakegloss
}
\newcommand{\@glsxtrnoidxgroups@nomakegloss}{%
 \PackageError{glossaries-extra}{Can't use
   \string\glsxtrunsrtgrouptonoidx\space with \string\makeglossaries}{}
}
\newcommand{\prohibit@glsxtrnoidxgroups}{%
  \global\let\glsxtrnoidxgroups\@glsxtrnoidxgroups@nomakegloss
}
\newrobustcmd{\glsxtrgetgrouptitle}[2]{%
  \protected@edef\@glsxtr@titlecsname{glsxtr@grouptitle@#1}%
  \@onelevel@sanitize\@glsxtr@titlecsname
  \ifcsdef{\@glsxtr@titlecsname}
  {\letcs{#2}{\@glsxtr@titlecsname}}%
  {\glsxtr@org@getgrouptitle{#1}{#2}}%
}
\let\@gls@getgrouptitle\glsxtrgetgrouptitle
\newcommand{\glsxtrsetgrouptitle}[2]{%
  \protected@edef\@glsxtr@titlelabel{glsxtr@grouptitle@#1}%
  \@onelevel@sanitize\@glsxtr@titlelabel
  \protected@csxdef{\@glsxtr@titlelabel}{#2}%
}
\newcommand{\glsxtrlocalsetgrouptitle}[2]{%
  \protected@edef\@glsxtr@titlelabel{glsxtr@grouptitle@#1}%
  \@onelevel@sanitize\@glsxtr@titlelabel
  \protected@csedef{\@glsxtr@titlelabel}{#2}%
}
\renewcommand*{\glsnavigation}{%
  \def\@gls@between{}%
  \ifcsundef{@gls@hypergrouplist@\@glo@type}%
  {%
    \def\@gls@list{}%
  }%
  {%
    \expandafter\let\expandafter\@gls@list
      \csname @gls@hypergrouplist@\@glo@type\endcsname
  }%
  \@for\@gls@tmp:=\@gls@list\do{%
    \@gls@between
    \glsxtrgetgrouptitle{\@gls@tmp}{\@gls@grptitle}%
    \glsnavhyperlink{\@gls@tmp}{\@gls@grptitle}%
    \let\@gls@between\glshypernavsep
  }%
}
\renewcommand*{\@print@noidx@glossary}{%
  \ifcsdef{@glsref@\@glo@type}%
  {%
    \ifcsdef{@glo@sortmacro@\@glo@sorttype}%
    {%
      \csuse{@glo@sortmacro@\@glo@sorttype}{\@glo@type}%
    }%
    {%
      \PackageError{glossaries}{Unknown sort handler `\@glo@sorttype'}{}%
    }%
    \glossarysection[\glossarytoctitle]{\glossarytitle}%
    \glossarypreamble
    \def\@gls@currentlettergroup{}%
    \begin{theglossary}%
    \glossaryheader
    \glsresetentrylist
    \forlistcsloop{\@gls@noidx@do}{@glsref@\@glo@type}%
    \end{theglossary}%
    \glossarypostamble
  }%
  {%
    \glsxtrifemptyglossary{\@glo@type}%
    {}%
    {\glossarysection[\glossarytoctitle]{\glossarytitle}}%
    \@gls@noref@warn{\@glo@type}%
  }%
}
\renewcommand*{\glsnoidxdisplayloc}[4]{%
  \setentrycounter[#1]{#2}%
  \@glsxtr@display@loc#3\empty\end@glsxtr@display@loc{#4}%
}
\def\@glsxtr@display@loc#1#2\end@glsxtr@display@loc#3{%
  \ifx#1(\relax
    \glsxtrdisplaystartloc{#2}{#3}%
  \else
    \ifx#1)\relax
      \glsxtrdisplayendloc{#2}{#3}%
    \else
      \glsxtrdisplaysingleloc{#1#2}{#3}%
    \fi
  \fi
}
\newcommand*{\glsxtrdisplaysingleloc}[2]{%
  \csuse{#1}{#2}%
}
\newcommand*{\glsxtrdisplaystartloc}[2]{%
  \protected@edef\glsxtrlocrangefmt{#1}%
  \ifx\glsxtrlocrangefmt\empty
    \def\glsxtrlocrangefmt{glsnumberformat}%
  \fi
  \expandafter\glsxtrdisplaysingleloc
    \expandafter{\glsxtrlocrangefmt}{#2}%
}
\newcommand*{\glsxtrdisplayendloc}[2]{%
  \protected@edef\@glsxtr@tmp{#1}%
  \ifdefempty{\@glsxtr@tmp}{\def\@glsxtr@tmp{glsnumberformat}}{}%
  \ifx\glsxtrlocrangefmt\@glsxtr@tmp
  \else
    \GlossariesExtraWarning{Mismatched end location range
      (start=\glsxtrlocrangefmt, end=\@glsxtr@tmp)}%
  \fi
  \expandafter\glsxtrdisplayendlochook\expandafter{\@glsxtr@tmp}{#2}%
  \expandafter\glsxtrdisplaysingleloc
    \expandafter{\glsxtrlocrangefmt}{#2}%
  \def\glsxtrlocrangefmt{}%
}
\newcommand*{\glsxtrdisplayendlochook}[2]{}
\newcommand*{\glsxtrlocrangefmt}{}
\renewcommand*{\setentrycounter}[2][]{%
  \def\glsxtrcounterprefix{#1}%
  \ifx\glsxtrcounterprefix\@empty
    \def\@glo@counterprefix{.}%
  \else
    \def\@glo@counterprefix{.#1.}%
  \fi
  \def\glsentrycounter{#2}%
}
\def\@gls@removespaces#1 #2\@nil{%
 \toks@=\expandafter{\the\toks@#1}%
 \ifx\\#2\\%
   \edef\@glo@tmp{\the\toks@}%
   \ifx\@glo@tmp\empty
   \else
    \expandafter\glsxtrlocationhyperlink\expandafter
     \glsentrycounter\expandafter\@glo@counterprefix\expandafter{\the\toks@}%
   \fi
 \else
   \@gls@ReturnAfterFi{%
     \@gls@removespaces#2\@nil
   }%
 \fi
}
\newcommand*{\glsxtrlocationhyperlink}[3]{%
  \ifdefvoid\glsxtrsupplocationurl
  {%
    \GlsXtrInternalLocationHyperlink{#1}{#2}{#3}%
  }%
  {%
    \hyperref{\glsxtrsupplocationurl}{}{#1#2#3}{#3}%
  }%
}
\newcommand*{\glsxtrsupphypernumber}[1]{%
 {%
   \glshasattribute{\glscurrententrylabel}{externallocation}%
   {%
     \def\glsxtrsupplocationurl{%
       \glsgetattribute{\glscurrententrylabel}{externallocation}}%
   }%
   {%
     \def\glsxtrsupplocationurl{}%
   }%
   \glshypernumber{#1}%
 }%
}
\renewcommand{\@print@glossary}{%
  \makeatletter
  \@input@{\jobname.\csname @glotype@\@glo@type @in\endcsname}%
  \IfFileExists{\jobname.\csname @glotype@\@glo@type @in\endcsname}%
  {}%
  {\glsxtrNoGlossaryWarning{\@glo@type}}%
  \ifglsxindy
    \ifcsundef{@xdy@\@glo@type @language}%
    {%
      \edef\@do@auxoutstuff{%
        \noexpand\AtEndDocument{%
          \noexpand\immediate\noexpand\write\@auxout{%
            \string\providecommand\string\@xdylanguage[2]{}}%
          \noexpand\immediate\noexpand\write\@auxout{%
            \string\@xdylanguage{\@glo@type}{\@xdy@main@language}}%
        }%
      }%
    }%
    {%
      \edef\@do@auxoutstuff{%
        \noexpand\AtEndDocument{%
          \noexpand\immediate\noexpand\write\@auxout{%
            \string\providecommand\string\@xdylanguage[2]{}}%
          \noexpand\immediate\noexpand\write\@auxout{%
            \string\@xdylanguage{\@glo@type}{\csname @xdy@\@glo@type
              @language\endcsname}}%
        }%
      }%
    }%
    \@do@auxoutstuff
    \edef\@do@auxoutstuff{%
      \noexpand\AtEndDocument{%
         \noexpand\immediate\noexpand\write\@auxout{%
          \string\providecommand\string\@gls@codepage[2]{}}%
         \noexpand\immediate\noexpand\write\@auxout{%
          \string\@gls@codepage{\@glo@type}{\gls@codepage}}%
      }%
    }%
    \@do@auxoutstuff
  \fi
  \renewcommand*{\@warn@nomakeglossaries}{%
    \GlossariesWarningNoLine{\string\makeglossaries\space
    hasn't been used,^^Jthe glossaries will not be updated}%
  }%
}
\newcommand{\GlsXtrNoGlsWarningHead}[2]{%
 This document is incomplete. The external file associated with
 the glossary `#1' (which should be called \texttt{#2})
 hasn't been created.%
}
\newcommand{\GlsXtrNoGlsWarningEmptyStart}{%
  This has probably happened because there are no entries defined
  in this glossary.%
}
\newcommand{\GlsXtrNoGlsWarningEmptyMain}{%
 If you don't want this glossary,
 add \texttt{nomain} to your package option list when you load
 \texttt{glossaries-extra.sty}. For example:%
}
\newcommand{\GlsXtrNoGlsWarningEmptyNotMain}[1]{%
 Did you forget to use \texttt{type=#1} when you defined your
 entries? If you tried to load entries into this glossary with
 \texttt{\string\loadglsentries} did you remember to use
 \texttt{[#1]} as the optional argument? If you did, check that
 the definitions in the file you loaded all had the type set
 to \texttt{\string\glsdefaulttype}.%
}
\newcommand{\GlsXtrNoGlsWarningCheckFile}[1]{%
  Check the contents of the file \texttt{#1}. If
  it's empty, that means you haven't indexed any of your entries in this
  glossary (using commands like \texttt{\string\gls} or
  \texttt{\string\glsadd}) so this list can't be generated.
  If the file isn't empty, the document build process hasn't been
  completed.%
}
\newcommand{\GlsXtrNoGlsWarningAutoMake}[1]{%
  You may need to rerun \LaTeX. If you already have, it may be that
  \TeX's shell escape doesn't allow you to run
  \ifglsxindy xindy\else makeindex\fi. Check the
  transcript file \texttt{\jobname.log}. If the shell escape is
  disabled, try one of the following:

  \begin{itemize}
    \item Run the external (Lua) application:

       \texttt{makeglossaries-lite \string"\jobname\string"}

    \item Run the external (Perl) application:

       \texttt{makeglossaries \string"\jobname\string"}
  \end{itemize}

  Then rerun \LaTeX\ on this document.
  \GlossariesExtraWarning{Rerun required to build the
  glossary `#1' or check TeX's shell escape allows
  you to run \ifglsxindy xindy\else makeindex\fi}%
}
\newcommand{\GlsXtrNoGlsWarningMisMatch}{%
  You need to either replace \texttt{\string\makenoidxglossaries}
  with \texttt{\string\makeglossaries} or replace
  \texttt{\string\printglossary} (or \texttt{\string\printglossaries}) with
  \texttt{\string\printnoidxglossary}
  (or \texttt{\string\printnoidxglossaries}) and then rebuild
  this document.%
}
\newcommand{\GlsXtrNoGlsWarningBuildInfo}{%
  Try one of the following:
  \begin{itemize}
    \item Add \texttt{automake} to your package option list when you load
          \texttt{glossaries-extra.sty}. For example:

          \texttt{\string\usepackage[automake]%
              \glsopenbrace glossaries-extra\glsclosebrace}

    \item Run the external (Lua) application:

          \texttt{makeglossaries-lite.lua \string"\jobname\string"}

    \item Run the external (Perl) application:

          \texttt{makeglossaries \string"\jobname\string"}
  \end{itemize}

  Then rerun \LaTeX\ on this document.%
}
\newcommand{\GlsXtrRecordWarning}[1]{%
 \texttt{\string\printglossary} doesn't work
 with the \texttt{record=\@glsxtr@record@setting} package option
 use\par\texttt{\string\printunsrtglossary[type=#1]}\par
 instead (or change the package option).%
}
\newcommand{\GlsXtrNoGlsWarningTail}{%
 This message will be removed once the problem has been fixed.%
}
\newcommand{\GlsXtrNoGlsWarningNoOut}[1]{%
  The file \texttt{#1} doesn't exist. This most likely means you haven't used
  \texttt{\string\makeglossaries} or you have used
  \texttt{\string\nofiles}. If this is just a draft version of the
  document, you can suppress this message using the
  \texttt{nomissingglstext} package option.%
}
\newcommand*{\@glsxtr@defaultnoglossarywarning}[1]{%
 \glossarysection[\glossarytoctitle]{\glossarytitle}
 \GlsXtrNoGlsWarningHead{#1}{\jobname.\csname @glotype@\@glo@type @in\endcsname}
 \par
 \glsxtrifemptyglossary{#1}%
 {%
    \GlsXtrNoGlsWarningEmptyStart\space
    \ifthenelse{\equal{#1}{main}}{\GlsXtrNoGlsWarningEmptyMain\par
    \medskip
    \noindent\texttt{\string\usepackage[nomain\ifglsacronym ,acronym\fi]%
        \glsopenbrace glossaries-extra\glsclosebrace}
    \medskip
    }%
    {\GlsXtrNoGlsWarningEmptyNotMain{#1}}%
 }%
 {%
   \IfFileExists{\jobname.\csname @glotype@\@glo@type @out\endcsname}
   {%
     \GlsXtrNoGlsWarningCheckFile
       {\jobname.\csname @glotype@\@glo@type @out\endcsname}

     \ifglsautomake

      \GlsXtrNoGlsWarningAutoMake{#1}

     \else

        \ifthenelse{\equal{#1}{main}}%
        {%
          \GlsXtrNoGlsWarningEmptyMain\par
          \medskip
          \noindent\texttt{\string\usepackage[nomain]%
            \glsopenbrace glossaries-extra\glsclosebrace}
          \medskip
        }%
        {}%

        \ifdefequal\makeglossaries\@no@makeglossaries
        {%
          \GlsXtrNoGlsWarningMisMatch
        }%
        {%
          \GlsXtrNoGlsWarningBuildInfo
        }%
     \fi
   }%
   {%
     \GlsXtrNoGlsWarningNoOut
       {\jobname.\csname @glotype@\@glo@type @out\endcsname}%
   }%
 }%
 \par
 \GlsXtrNoGlsWarningTail
}
\newcommand*{\@glsxtr@record@noglossarywarning}[1]{%
  \GlossariesExtraWarning{\string\printglossary\space doesn't work\MessageBreak
  with record=\@glsxtr@record@setting\space package option\MessageBreak(use
  \string\printunsrtglossary[type=#1])\MessageBreak
  instead (or change the package option)}%
 \glossarysection[\glossarytoctitle]{\glossarytitle}
 \GlsXtrRecordWarning{#1}
 \GlsXtrNoGlsWarningTail
}
\newcommand*{\GlsXtrDefaultResourceOptions}{}
\newcommand*{\glsxtrresourcefile}[2][]{%
 \@glsxtr@if@record@only
 {\renewcommand{\glsindexingsetting}{bib2gls}}%
 {\edef\glsindexingsetting{bib2gls-\ifglsxindy xindy\else makeindex\fi}}%
  \disable@keys{glossaries-extra.sty}{record}%
  \glsxtr@writefields
  \glsxtr@save@mfu
  \ifdefempty\GlsXtrDefaultResourceOptions
  {%
    \protected@write\@auxout{\glsxtrresourceinit}%
    {\string\glsxtr@resource{#1}{#2}}%
  }%
  {%
   \protected@write\@auxout{\glsxtrresourceinit}%
    {\string\glsxtr@resource{\GlsXtrDefaultResourceOptions,#1}{#2}}%
  }%
  \let\@glsxtr@org@see@noindex\@gls@see@noindex
  \let\@gls@see@noindex\relax
  \IfFileExists{#2.glstex}%
  {%
    \edef\@bibgls@restoreat{\noexpand\catcode\noexpand`\noexpand\@=\number\catcode`\@}%
    \makeatletter
    \@input{#2.glstex}%
    \@bibgls@restoreat
    \@glsxtr@check@bibgls@nameref
  }%
  {%
    \GlossariesExtraWarning{No file `#2.glstex'}%
  }%
  \let\@gls@see@noindex\@glsxtr@org@see@noindex
}
\@onlypreamble\glsxtrresourcefile
\newcommand{\@glsxtr@check@bibgls@nameref}{%
  \ifx\@glsxtr@record@setting\@glsxtr@record@setting@nameref
    \ifdef\bibglshrefchar
    {}%
    {%
      \GlossariesExtraWarning{record=nameref requires at least
      version 1.8 of bib2gls}%
    }%
  \fi
  \let\@glsxtr@check@bibgls@nameref\relax
}
\newcommand*{\glsxtrresourceinit}{}
\newcount\glsxtrresourcecount
\newcommand*{\GlsXtrLoadResources}[1][]{%
  \ifnum\glsxtrresourcecount=0\relax
    \glsxtrresourcefile[#1]{\jobname}%
  \else
    \glsxtrresourcefile[#1]{\jobname-\the\glsxtrresourcecount}%
  \fi
  \advance\glsxtrresourcecount by 1\relax
}
\newcommand*{\glsxtr@resource}[2]{}
\newcommand*{\glsxtrMFUsave}{%
  \ifdef\MFUsave
  {%
    \AtBeginDocument{\MFUsave}%
  }%
  {%
    \GlossariesExtraWarning{mfirstuc.sty too old,
     \string\glsxtrMFUsave\space has no effect. You need to upgrade
     to mfirstuc v2.08}%
  }%
  \let\glsxtrMFUsave\relax
}
\ifdef\MFUsave
{
  \newcommand*{\glsxtr@save@mfu}{%
    \glsxtrMFUsave
    \let\glsxtr@save@mfu\relax
  }
}
{
  \newcommand*{\glsxtr@save@mfu}{}
}
\newcommand*{\glsxtr@fields}[1]{}
\newcommand*{\glsxtr@texencoding}[1]{}
\newcommand*{\glsxtr@langtag}[1]{}
\newcommand*{\glsxtr@pluralsuffixes}[4]{}
\newcommand*{\glsxtr@shortcutsval}[1]{}
\newcommand*{\glsxtr@linkprefix}[1]{}
\newcommand*{\glsxtr@writefields}{%
  \protected@write\@auxout{}%
   {\string\providecommand*{\string\glsxtr@fields}[1]{}}%
  \protected@write\@auxout{}%
   {\string\providecommand*{\string\glsxtr@resource}[2]{}}%
  \protected@write\@auxout{}%
   {\string\providecommand*{\string\glsxtr@pluralsuffixes}[4]{}}%
  \protected@write\@auxout{}%
   {\string\providecommand*{\string\glsxtr@shortcutsval}[1]{}}%
  \protected@write\@auxout{}%
   {\string\providecommand*{\string\glsxtr@linkprefix}[1]{}}%
  \protected@write\@auxout{}{\string\glsxtr@fields{\@gls@keymap}}%
  \protected@write\@auxout{}%
   {\string\providecommand*{\string\glsxtr@record}[5]{}}%
  \ifx\@glsxtr@record@setting\@glsxtr@record@setting@nameref
    \protected@write\@auxout{}%
     {\string\providecommand*{\string\glsxtr@record@nameref}[8]{}}%
  \fi
  \ifdef\CurrentTrackedLanguageTag
  {%
     \protected@write\@auxout{}{%
       \string\glsxtr@langtag{\CurrentTrackedLanguageTag}}%
  }%
  {}%
  \protected@write\@auxout{}{\string\glsxtr@pluralsuffixes
    {\glspluralsuffix}{\abbrvpluralsuffix}{\acrpluralsuffix}%
    {\glsxtrabbrvpluralsuffix}}%
  \ifdefvoid\inputencodingname
  {%
     \protected@write\@auxout{}{\string\glsxtr@texencoding{utf8}}%
  }%
  {%
     \protected@write\@auxout{}{\string\glsxtr@texencoding{\inputencodingname}}%
  }%
  \protected@write\@auxout{}{\string\glsxtr@shortcutsval{\@glsxtr@shortcutsval}}%
  \AtBeginDocument
    {\protected@write\@auxout{}{\string\glsxtr@linkprefix{\glolinkprefix}}}%
  \let\glsxtr@writefields\relax
  \ifglsautomake
    \IfFileExists{\jobname.aux}%
    {\immediate\write18{bib2gls \jobname}}{}%
    \ifx\@gls@doautomake\@gls@doautomake@err
       \let\@gls@doautomake\relax
    \fi
  \fi
  \@glsxtr@if@record@only
  {\ifdefstring{\glsorder}{letter}%
   {\GlossariesExtraWarningNoLine{Package option `order=letter' isn't
    supported with `record=\@glsxtr@record@setting'. Use `break-at=none'
    resource option instead}}%
   {}%
  }%
  {}%
}
\ifdef{\@gls@do@automake@err}
{
  \let\@gls@doautomake@err\@gls@do@automake@err
}
{
  \newcommand*{\@gls@doautomake@err}{%
    \PackageError{glossaries}{You must use
    \string\makeglossaries\space with automake=true}
    {%
       Either remove the automake=true setting or
       add \string\makeglossaries\space to your document preamble.%
    }%
  }
}
\newcommand*{\glsxtr@record}[5]{}
\newcommand*{\glsxtr@record@nameref}[8]{}
\newcommand*{\glsxtr@counterrecord}[3]{%
  \glsxtrfieldlistgadd{#1}{record.#2}{#3}%
  \glsxtrAddCounterRecordHook{#1}{#2}{#3}%
}
\newcommand{\glsxtrAddCounterRecordHook}[3]{}
\newcommand*{\@glsxtr@counterrecordhook}{}
\newcommand*{\GlsXtrRecordCounter}[1]{%
  \@@glsxtr@recordcounter{#1}%
}
\@onlypreamble\GlsXtrRecordCounter
\newcommand*{\@glsxtr@docounterrecord}[1]{%
  \@bibgls@write@aux{}{\string\glsxtr@counterrecord
    {\@gls@label}{#1}{\csuse{the#1}}}%
}
\newcommand*{\glsxtrglossentry}[1]{%
  \glsxtrtitleorpdforheading
  {\@glsxtrglossentry{#1}}%
  {\GlsXtrStandaloneEntryPdfName{#1}}%
  {\GlsXtrStandaloneEntryHeadName{#1}}%
}
\newrobustcmd*{\@glsxtrglossentry}[1]{%
  \glsxtrtitleorpdforheading
  {%
    \glsdoifexists{#1}%
    {%
      \begingroup
        \protected@edef\glscurrententrylabel{\glsdetoklabel{#1}}%
        \protected@edef\currentglossary{\GlsXtrStandaloneGlossaryType}%
        \ifglshasparent{#1}%
        {\GlsXtrStandaloneSubEntryItem{#1}}%
        {\glsentryitem{#1}}%
        \GlsXtrStandaloneEntryName{#1}%
      \endgroup
    }%
  }%
  {\GlsXtrStandaloneEntryPdfName{#1}}%
  {\GlsXtrStandaloneEntryHeadName{#1}}%
}
\newcommand*{\GlsXtrStandaloneEntryHeadName}[1]{%
  \glsxtrheadname{#1}%
}
\newcommand*{\GlsXtrStandaloneEntryPdfName}[1]{%
  \glsentryname{#1}%
}
\newcommand*{\GlsXtrStandaloneEntryName}[1]{%
  \glstarget{#1}{\glossentryname{#1}}%
}
\newcommand{\GlsXtrStandaloneGlossaryType}{\glsentrytype{\glscurrententrylabel}}
\newcommand*{\GlsXtrStandaloneSubEntryItem}[1]{%
  \GlsXtrIfFieldEqNum{level}{#1}{1}{\glssubentryitem{#1}}{}%
}
\newcommand*{\glsxtrglossentryother}[3]{%
  \ifstrempty{#1}%
  {%
    \glsxtrtitleorpdforheading
    {\@glsxtrglossentryother{#2}{#3}{\GlsXtrStandaloneEntryHeadOther{#3}{#2}}}%
    {\GlsXtrStandaloneEntryPdfOther{#2}{#3}}%
    {\GlsXtrStandaloneEntryHeadOther{#3}{#2}}%
  }%
  {%
    \glsxtrtitleorpdforheading
    {\@glsxtrglossentryother{#2}{#3}{#1}}%
    {\GlsXtrStandaloneEntryPdfOther{#2}{#3}}%
    {#1}%
  }%
}
\newcommand*{\GlsXtrStandaloneEntryHeadOther}[2]{%
 \ifcsdef{glsxtrhead#2}%
 {\csuse{glsxtrhead#2}{#1}}%
 {\@gls@entry@field{\NoCaseChange{#1}}{#2}}%
}
\newcommand*{\GlsXtrStandaloneEntryPdfOther}[2]{%
 \@gls@entry@field{#1}{#2}%
}
\newrobustcmd*{\@glsxtrglossentryother}[3]{%
  \glsxtrtitleorpdforheading
  {%
    \glsdoifexists{#1}%
    {%
      \begingroup
        \protected@edef\glscurrententrylabel{\glsdetoklabel{#1}}%
        \protected@edef\currentglossary{\GlsXtrStandaloneGlossaryType}%
        \ifglshasparent{#1}%
        {\GlsXtrStandaloneSubEntryItem{#1}}%
        {\glsentryitem{#1}}%
        \GlsXtrStandaloneEntryOther{#1}{#2}%
      \endgroup
    }%
  }%
  {\GlsXtrStandaloneEntryPdfOther{#1}{#2}}%
  {#3}%
}
\newcommand*{\GlsXtrStandaloneEntryOther}[2]{%
  \glstarget{#1}{\glossentrynameother{#1}{#2}}%
}
\ifdef\@printgloss@checkexists
{
  \newcommand*{\printunsrtglossary}{%
    \let\@printgloss@checkexists\@printgloss@checkexists@allowignored
    \@ifstar\s@printunsrtglossary\@printunsrtglossary
  }
}
{
  \newcommand*{\printunsrtglossary}{%
    \@ifstar\s@printunsrtglossary\@printunsrtglossary
  }
}
\newcommand*{\@printunsrtglossary}[1][]{%
  \@printglossary{type=\glsdefaulttype,#1}{\@print@unsrt@glossary}%
}
\newcommand*{\s@printunsrtglossary}[2][]{%
  \begingroup
    #2%
    \@printglossary{type=\glsdefaulttype,#1}{\@print@unsrt@glossary}%
  \endgroup
}
\newcommand*{\printunsrtglossaries}{%
  \forallglossaries{\@@glo@type}{\printunsrtglossary[type=\@@glo@type]}%
}

\newcommand*{\@print@unsrt@glossary}{%
  \glossarysection[\glossarytoctitle]{\glossarytitle}%
  \glossarypreamble
  \glsxtrifemptyglossary{\@glo@type}%
  {%
    \GlossariesExtraWarning{No entries defined in glossary `\@glo@type'}%
  }%
  {%
    \@glsxtr@unsrt@gloss@init
    \def\@glsxtr@doglossary{%
      \begin{theglossary}%
      \glossaryheader
    }%
    \printunsrtglossarypostbegin{\@glsxtr@doglossary}%
    \expandafter\@for\expandafter\glscurrententrylabel\expandafter
      :\expandafter=\csname glolist@\@glo@type\endcsname\do{%
      \ifdefempty{\glscurrententrylabel}
      {}%
      {%
        \@gls@xtr@initprocess
        \glsxtr@process
        {%
          \ifglsxtr@printgloss@groups
            \glsxtraddgroup\glscurrententrylabel
            {%
               \@glsxtr@checkgroup\glscurrententrylabel
               \expandafter\appto\expandafter\@glsxtr@doglossary\expandafter
                 {\@glsxtr@groupheading}%
            }%
          \fi
          \printunsrtglossarypreentryprocesshook{\@glsxtr@doglossary}%
          \protected@eappto\@glsxtr@doglossary{%
            \noexpand\@printunsrt@glossary@handler{\glscurrententrylabel}}%
          \printunsrtglossarypostentryprocesshook{\@glsxtr@doglossary}%
        }%
      }%
    }%
    \printunsrtglossarypreend{\@glsxtr@doglossary}%
    \appto\@glsxtr@doglossary{\end{theglossary}}%
    \printunsrtglossarypredoglossary
    \@glsxtr@doglossary
  }%
  \glossarypostamble
}
\newcommand*{\@glsxtr@unsrt@gloss@init}{%
  \key@ifundefined{glossentry}{group}%
  {\let\@gls@getgrouptitle\@gls@noidx@getgrouptitle}%
  {\let\@gls@getgrouptitle\@glsxtr@unsrt@getgrouptitle}%
  \def\@gls@currentlettergroup{}%
  \def\@gls@currentlettergroup@level{-1}%
  \def\glscurrententrylevel{-1}%
  \def\glscurrentrootentry{}%
  \def\glscurrenttoplevelentry{}%
}
\newcommand*{\@gls@xtr@initprocess}{%
 \ifglsxtrprintglossflatten
  \edef\glscurrententrylevel{\number\@glsxtr@leveloffset}%
 \else
  \edef\glscurrententrylevel{%
    \number\numexpr\csname glo@\glscurrententrylabel @level\endcsname
      + \@glsxtr@leveloffset}%
 \fi
  \ifnum\glscurrententrylevel=0\relax
    \let\glscurrenttoplevelentry\glscurrententrylabel
  \fi
  \ifglsxtrprintglossflatten
    \let\glscurrentrootentry\glscurrententrylabel
  \else
    \ifglshasparent{\glscurrententrylabel}{}%
    {\let\glscurrentrootentry\glscurrententrylabel}%
  \fi
 \let\glsxtr@process\@firstofone
 \let\printunsrtglossaryskipentry\@glsxtr@printunsrtglossaryskipentry
 \printunsrtglossaryentryprocesshook{\glscurrententrylabel}%
}
\newcommand*{\printunsrtinnerglossary}[3][]{%
  \begingroup
   \def\@glsxtr@printglossopts{#1}%
   \def\@glo@type{\glsdefaulttype}%
   \setkeys{printgloss}[title,toctitle,style,numberedsection,sort,label]{#1}%
   \let\currentglossary\@glo@type
   #2%
   \@print@unsrt@innerglossary
   #3%
  \endgroup
}
\newenvironment{printunsrtglossarywrap}[1][]%
{%
  \def\@glsxtr@printglossopts{#1}%
  \def\@glo@type{\glsdefaulttype}%
  \def\glossarytitle{\csname @glotype@\@glo@type @title\endcsname}%
  \def\glossarytoctitle{\glossarytitle}%
  \let\org@glossarytitle\glossarytitle
  \def\@glossarystyle{%
    \ifx\@glossary@default@style\relax
      \GlossariesWarning{No default glossary style provided \MessageBreak
        for the glossary `\@glo@type'. \MessageBreak
        Using fallback. \MessageBreak
        To fix this set the style with \MessageBreak
        \string\setglossarystyle\space or use the \MessageBreak
        style key=value option}%
    \fi
  }%
  \def\gls@dotoctitle{\glssettoctitle{\@glo@type}}%
  \let\@org@glossaryentrynumbers\glossaryentrynumbers
  \@printgloss@setsort
  \setkeys{printgloss}{#1}%
  \ifglossaryexists*{\@glo@type}%
  {%
   \ifx\glossarytitle\org@glossarytitle
   \else
     \expandafter\let\csname @glotype@\@glo@type @title\endcsname
                   \glossarytitle
   \fi
   \let\currentglossary\@glo@type
  }%
  {}%
  \let\org@glossaryentrynumbers\glossaryentrynumbers
  \let\glsnonextpages\@glsnonextpages
  \let\glsnextpages\@glsnextpages
  \let\nopostdesc\@nopostdesc
  \gls@dotoctitle
  \@glossarystyle
  \let\gls@org@glossaryentryfield\glossentry
  \let\gls@org@glossarysubentryfield\subglossentry
  \renewcommand{\glossentry}[1]{%
    \protected@xdef\glscurrententrylabel{\glsdetoklabel{##1}}%
    \gls@org@glossaryentryfield{##1}%
  }%
  \renewcommand{\subglossentry}[2]{%
    \protected@xdef\glscurrententrylabel{\glsdetoklabel{##2}}%
    \gls@org@glossarysubentryfield{##1}{##2}%
  }%
  \@gls@preglossaryhook
  \glossarysection[\glossarytoctitle]{\glossarytitle}%
  \glossarypreamble
  \begin{theglossary}%
  \glossaryheader
  \glsresetentrylist
}%
{%
  \end{theglossary}%
  \glossarypostamble
  \global\let\glossaryentrynumbers\@org@glossaryentrynumbers
  \global\let\warn@noprintglossary\relax
}
\newcommand*{\@print@unsrt@innerglossary}{%
  \glsxtrifemptyglossary{\@glo@type}%
  {%
    \GlossariesExtraWarning{No entries defined in glossary `\@glo@type'}%
  }%
  {%
    \@glsxtr@unsrt@gloss@init
    \def\@glsxtr@doglossary{}%
    \expandafter\@for\expandafter\glscurrententrylabel\expandafter
      :\expandafter=\csname glolist@\@glo@type\endcsname\do{%
      \ifdefempty{\glscurrententrylabel}
      {}%
      {%
        \@gls@xtr@initprocess
        \glsxtr@process
        {%
          \ifglsxtr@printgloss@groups
            \glsxtraddgroup\glscurrententrylabel
            {%
               \@glsxtr@checkgroup\glscurrententrylabel
               \expandafter\appto\expandafter\@glsxtr@doglossary\expandafter
                 {\@glsxtr@groupheading}%
            }%
          \fi
          \printunsrtglossarypreentryprocesshook{\@glsxtr@doglossary}%
          \protected@eappto\@glsxtr@doglossary{%
            \noexpand\@printunsrt@glossary@handler{\glscurrententrylabel}}%
          \printunsrtglossarypostentryprocesshook{\@glsxtr@doglossary}%
        }%
      }%
    }%
    \printunsrtglossarypredoglossary
    \@glsxtr@doglossary
  }%
}
\newcommand*{\glsxtraddgroup}[2]{%
  \ifglsxtrprintglossflatten
    #2%
  \else
    \ifglshasparent{#1}{}{#2}%
  \fi
}
\newcommand*{\printunsrtglossaryentryprocesshook}[1]{}
\newcommand*{\printunsrtglossarypreentryprocesshook}[1]{}
\newcommand*{\printunsrtglossarypostentryprocesshook}[1]{}
\newcommand*{\printunsrtglossarygrouphook}[1]{}
\newcommand*{\printunsrtglossaryskipentry}{%
  \PackageError{glossaries-extra}{\string\printunsrtglossaryskipentry\space
can only be used within \string\printunsrtglossaryentryprocesshook}{}%
}
\newcommand*{\@glsxtr@printunsrtglossaryskipentry}{%
  \let\glsxtr@process\@gobble
}
\newcommand*{\printunsrtglossarypredoglossary}{}
\newcommand*{\printunsrtglossarypreend}[1]{}
\newcommand*{\printunsrtglossarypostbegin}[1]{}
\newcommand{\@printunsrt@glossary@handler}[1]{%
  \protected@xdef\glscurrententrylabel{#1}%
  \printunsrtglossaryhandler\glscurrententrylabel
}
\newcommand{\printunsrtglossaryhandler}[1]{%
  \glsxtrunsrtdo{#1}%
}
\newrobustcmd*{\glsxtriflabelinlist}[4]{%
 \protected@edef\@glsxtr@doiflabelinlist{\noexpand\@gls@ifinlist{#1}{#2}}%
 \@glsxtr@doiflabelinlist{#3}{#4}%
}
\newcommand{\print@op@unsrtglossaryunit}[2][]{%
  \s@printunsrtglossary[type=\glsdefaulttype,#1]{%
    \printunsrtglossaryunitsetup{#2}%
  }%
}
\newcommand*{\printunsrtglossaryunitsetup}[1]{%
  \renewcommand{\printunsrtglossaryhandler}[1]{%
    \glsxtrfieldxifinlist{##1}{record.#1}{\csuse{the#1}}
    {\glsxtrunsrtdo{##1}}%
    {}%
  }%
  \ifcsundef{theH#1}%
  {%
    \renewcommand*{\@glsxtrhypernameprefix}{record.#1.\csuse{the#1}.\@gobble}%
  }%
  {%
    \renewcommand*{\@glsxtrhypernameprefix}{record.#1.\csuse{theH#1}.\@gobble}%
  }%
  \renewcommand*{\glossarysection}[2][]{}%
  \appto\glossarypostamble{\printunsrtglossaryunitpostskip}%
}
\newcommand*{\printunsrtglossaryunitpostskip}{\glspar\medskip\glspar}
\newcommand{\print@noop@unsrtglossaryunit}[2][]{%
  \PackageError{glossaries-extra}{\string\printunsrtglossaryunit\space
   requires the record=only or record=alsoindex package option}{}%
}
\newrobustcmd*{\@glsxtr@unsrt@getgrouptitle}[2]{%
  \protected@edef\@glsxtr@titlelabel{glsxtr@grouptitle@#1}%
  \@onelevel@sanitize\@glsxtr@titlelabel
  \ifcsdef{\@glsxtr@titlelabel}
  {\letcs{#2}{\@glsxtr@titlelabel}}%
  {\def#2{#1}}%
}
\newcommand{\glsxtrunsrtdo}{\@glsxtr@noidx@do}
\newcommand*{\glsxtrgroupfield}{group}
\newcommand*{\@glsxtr@checkgroup}[1]{%
  \def\@glsxtr@groupheading{}%
  \key@ifundefined{glossentry}{group}%
  {%
    \letcs{\@gls@sort}{glo@\glsdetoklabel{#1}@sort}%
    \expandafter\glo@grabfirst\@gls@sort{}{}\@nil
  }%
  {%
    \protected@edef\@glo@thislettergrp{%
        \csuse{glo@\glsdetoklabel{#1}@\glsxtrgroupfield}}%
  }%
  \ifcsundef{@gls@currentlettergroup\romannumeral\glscurrententrylevel}%
  {\csdef{@gls@currentlettergroup\romannumeral\glscurrententrylevel}{}}{}%
  \ifcsequal{@glo@thislettergrp}{@gls@currentlettergroup\romannumeral\glscurrententrylevel}%
  {}%
  {%
    \ifdefempty\@glo@thislettergrp
    {}%
    {%
      \ifnum\glscurrententrylevel>0\relax
        \protected@eappto\@glsxtr@groupheading{%
          \noexpand\glssubgroupheading
          {\@gls@currentlettergroup@level}{\glscurrententrylevel}%
          {\csuse{glo@\glsdetoklabel{#1}@parent}}%
          {\expandonce\@glo@thislettergrp}%
        }%
      \else
        \ifdefempty{\@gls@currentlettergroup}{}%
        {%
          \ifglsnogroupskip
          \else
            \def\@glsxtr@groupheading{\glsgroupskip}%
          \fi
        }%
        \protected@eappto\@glsxtr@groupheading{%
          \noexpand\glsgroupheading{\expandonce\@glo@thislettergrp}%
        }%
      \fi
      \let\@gls@currentlettergroup@level\glscurrententrylevel
      \cslet{@gls@currentlettergroup\romannumeral\glscurrententrylevel}\@glo@thislettergrp
      \printunsrtglossarygrouphook{\@glsxtr@groupheading}%
    }%
  }%
}
\newcommand*{\glssubgroupheading}[4]{\glsgroupheading{#4}}
\newcommand*{\GlsXtrLocationField}{location}
\newcommand{\@glsxtr@noidx@do}[1]{%
  \ifglsentryexists{#1}%
  {%
    \global\letcs{\@gls@loclist}{glo@\glsdetoklabel{#1}@loclist}%
    \global\letcs{\@gls@location}{glo@\glsdetoklabel{#1}@\GlsXtrLocationField}%
    \ifglsxtrprintglossflatten
      \gls@level=\@glsxtr@leveloffset\relax
    \else
      \gls@level=\numexpr\csuse{glo@\glsdetoklabel{#1}@level}+\@glsxtr@leveloffset\relax
    \fi
    \ifnum\gls@level>0
      \let\@glsxtr@ifischild\@firstoftwo
    \else
      \let\@glsxtr@ifischild\@secondoftwo
    \fi
    \@glsxtr@ifischild
    {%
      \ifdefvoid{\@gls@location}%
      {%
        \ifdefstring{\GlsXtrLocationField}{location}%
        {%
          \ifdefvoid{\@gls@loclist}%
          {%
            \expandafter\subglossentry\expandafter{\number\gls@level}{#1}{}%
          }%
          {%
            \expandafter\subglossentry\expandafter{\number\gls@level}{#1}%
            {%
              \glossaryentrynumbers{\glsnoidxloclist{\@gls@loclist}}%
            }%
          }%
        }%
        {%
          \expandafter\subglossentry\expandafter{\number\gls@level}{#1}{}%
        }%
      }%
      {%
        \expandafter\subglossentry\expandafter
          {\number\gls@level}{#1}{\glossaryentrynumbers{\@gls@location}}%
      }%
    }%
    {%
      \ifdefvoid{\@gls@location}%
      {%
        \ifdefstring{\GlsXtrLocationField}{location}%
        {%
          \ifdefvoid{\@gls@loclist}
          {%
            \glossentry{#1}{}%
          }%
          {%
            \glossentry{#1}%
            {%
              \glossaryentrynumbers{\glsnoidxloclist{\@gls@loclist}}%
            }%
          }%
        }%
        {%
          \glossentry{#1}{}%
        }%
      }%
      {%
        \glossentry{#1}%
        {%
          \glossaryentrynumbers{\@gls@location}%
        }%
      }%
    }%
  }%
  {}%
}
\newcount\@glsxtrnewgls@inner
\newcommand*{\glsxtrdoidentify}[1]{%
 \ifdefequal\@glsxtr@record@setting\@glsxtr@record@setting@off{}{#1}%
}
\newcommand*{\@glsxtr@providenewgls}{%
  \protected@write\@auxout{}{\string\providecommand{\string\@glsxtr@newglslike}[2]{}}%
  \let\@glsxtr@providenewgls\relax
}
\newcommand{\glsxtridentifyglslike}[2]{%
 \glsmfublocker{#2}%
 \glsxtrdoidentify
 {%
   \@glsxtr@providenewgls
   \protected@write\@auxout{}{\string\@glsxtr@newglslike{#1}{\string#2}}%
 }%
}
\newcommand*{\@glsxtr@providenewglsfamily}{%
  \protected@write\@auxout{}{\string\providecommand{\string\@glsxtr@newglslikefamily}[8]{}}%
  \let\@glsxtr@providenewglsfamily\relax
}
\newcommand{\glsxtridentifyglsfamily}[8]{%
 \glsmfuaddmap{#3}{#5}%
 \glsmfuaddmap{#4}{#6}%
 \glsmfublocker{#7}%
 \glsmfublocker{#8}%
 \glsxtrdoidentify
 {%
   \@glsxtr@providenewglsfamily
   \protected@write\@auxout{}{\string\@glsxtr@newglslikefamily{\detokenize{#1}}{\detokenize{#2}}{\detokenize{#3}}{\detokenize{#4}}{\detokenize{#5}}{\detokenize{#6}}{\detokenize{#7}}{\detokenize{#8}}}%
 }%
}
\newcommand*{\@glsxtr@providenewglslink}{%
  \protected@write\@auxout{}{\string\providecommand{\string\@glsxtr@newglslink}[2]{}}%
  \let\@glsxtr@providenewglslink\relax
}
\newcommand{\glsxtridentifyglslink}[2]{%
 \glsmfublocker{#2}%
 \glsxtrdoidentify
 {%
   \@glsxtr@providenewglslink
   \protected@write\@auxout{}{\string\@glsxtr@newglslink{#1}{\string#2}}%
 }%
}
\newcommand*{\@glsxtrnewglslink}[4]{%
  \ifdef{#3}%
  {%
    \PackageError{glossaries-extra}{Command \string#3\space already
defined}{}%
  }%
  {%
     \glsxtridentifyglslink{#2}{#3}%
     \ifcsdef{@#4link@#2}%
     {%
       \advance\@glsxtrnewgls@inner by \@ne
       \def\@glsxtrnewgls@innercsname{@#4link\number\@glsxtrnewgls@inner @#2}%
     }%
     {\def\@glsxtrnewgls@innercsname{@#4link@#2}}%
     \expandafter\newrobustcmd\expandafter*\expandafter
      #3\expandafter{\expandafter\@gls@hyp@opt\csname\@glsxtrnewgls@innercsname\endcsname}%
     \ifstrempty{#1}%
     {%
       \expandafter\newcommand\expandafter*\csname\@glsxtrnewgls@innercsname\endcsname[2][]{%
          \csname #4\endcsname{##1}{#2##2}%
       }%
     }%
     {%
       \expandafter\newcommand\expandafter*\csname\@glsxtrnewgls@innercsname\endcsname[2][]{%
          \csname #4\endcsname{#1,##1}{#2##2}%
       }%
     }%
  }%
}
\newrobustcmd*{\glsxtrnewglslink}[3][]{%
  \@glsxtrnewglslink{#1}{#2}{#3}{@gls@@link}%
}
\newrobustcmd*{\glsxtrnewglsdisp}[3][]{%
  \@glsxtrnewglslink{#1}{#2}{#3}{@glsdisp}%
}
\newcommand*{\@glsxtrnewgls}[4]{%
  \ifdef{#3}%
  {%
    \PackageError{glossaries-extra}{Command \string#3\space already
defined}{}%
  }%
  {%
     \glsxtridentifyglslike{#2}{#3}%
     \ifcsdef{@#4like@#2}%
     {%
       \advance\@glsxtrnewgls@inner by \@ne
       \def\@glsxtrnewgls@innercsname{@#4like\number\@glsxtrnewgls@inner @#2}%
     }%
     {\def\@glsxtrnewgls@innercsname{@#4like@#2}}%
     \expandafter\newrobustcmd\expandafter*\expandafter
      #3\expandafter{\expandafter\@gls@hyp@opt\csname\@glsxtrnewgls@innercsname\endcsname}%
     \ifstrempty{#1}%
     {%
       \expandafter\newcommand\expandafter*\csname\@glsxtrnewgls@innercsname\endcsname[2][]{%
         \new@ifnextchar[%
          {\csname @#4@\endcsname{##1}{#2##2}}%
          {\csname @#4@\endcsname{##1}{#2##2}[]}%
       }%
     }%
     {%
       \expandafter\newcommand\expandafter*\csname\@glsxtrnewgls@innercsname\endcsname[2][]{%
         \new@ifnextchar[%
          {\csname @#4@\endcsname{#1,##1}{#2##2}}%
          {\csname @#4@\endcsname{#1,##1}{#2##2}[]}%
       }%
     }%
  }%
}
\newrobustcmd*{\glsxtrnewgls}[3][]{%
  \@glsxtrnewgls{#1}{#2}{#3}{gls}%
}
\newrobustcmd*{\glsxtrnewglslike}[6][]{%
  \glsxtridentifyglsfamily{#1}{#2}{#3}{#4}{#5}{#6}{}{}%
  \@glsxtrnewgls{#1}{#2}{#3}{gls}%
  \@glsxtrnewgls{#1}{#2}{#4}{glspl}%
  \@glsxtrnewgls{#1}{#2}{#5}{Gls}%
  \@glsxtrnewgls{#1}{#2}{#6}{Glspl}%
}
\newrobustcmd*{\glsxtrnewGLSlike}[4][]{%
  \glsxtridentifyglsfamily{#1}{#2}{}{}{}{}{#3}{#4}%
  \@glsxtrnewgls{#1}{#2}{#3}{GLS}%
  \@glsxtrnewgls{#1}{#2}{#4}{GLSpl}%
}
\newrobustcmd*{\glsxtrnewrgls}[3][]{%
  \@glsxtrnewgls{#1}{#2}{#3}{rgls}%
}
\newrobustcmd*{\glsxtrnewrglslike}[6][]{%
  \glsxtridentifyglsfamily{#1}{#2}{#3}{#4}{#5}{#6}{}{}%
  \@glsxtrnewgls{#1}{#2}{#3}{rgls}%
  \@glsxtrnewgls{#1}{#2}{#4}{rglspl}%
  \@glsxtrnewgls{#1}{#2}{#5}{rGls}%
  \@glsxtrnewgls{#1}{#2}{#6}{rGlspl}%
}
\newrobustcmd*{\glsxtrnewrGLSlike}[4][]{%
  \glsxtridentifyglsfamily{#1}{#2}{}{}{}{}{#3}{#4}%
  \@glsxtrnewgls{#1}{#2}{#3}{rGLS}%
  \@glsxtrnewgls{#1}{#2}{#4}{rGLSpl}%
}
\newcommand*{\GlsXtrTotalRecordCount}[1]{%
 \ifcsdef{glo@\glsdetoklabel{#1}@recordcount}%
 {\csname glo@\glsdetoklabel{#1}@recordcount\endcsname}%
 {0}%
}
\newcommand*{\GlsXtrRecordCount}[2]{%
 \ifcsdef{glo@\glsdetoklabel{#1}@recordcount.#2}%
 {\csname glo@\glsdetoklabel{#1}@recordcount.#2\endcsname}%
 {0}%
}
\newcommand*{\GlsXtrLocationRecordCount}[3]{%
 \ifcsdef{glo@\glsdetoklabel{#1}@recordcount.#2.\glsxtrdetoklocation{#3}}%
 {\csname glo@\glsdetoklabel{#1}@recordcount.#2.\glsxtrdetoklocation{#3}\endcsname}%
 {0}%
}
\newcommand*{\glsxtrdetoklocation}[1]{#1}
\newcommand*{\glsxtrenablerecordcount}{%
  \renewcommand*{\gls}{\rgls}%
  \renewcommand*{\Gls}{\rGls}%
  \renewcommand*{\glspl}{\rglspl}%
  \renewcommand*{\Glspl}{\rGlspl}%
  \renewcommand*{\GLS}{\rGLS}%
  \renewcommand*{\GLSpl}{\rGLSpl}%
  \renewcommand{\shortcut@gls}{\rgls}%
  \renewcommand{\shortcut@glspl}{\rglspl}%
  \renewcommand{\shortcut@Gls}{\rGls}%
  \renewcommand{\shortcut@Glspl}{\rGlspl}%
  \renewcommand{\shortcut@GLS}{\rGLS}%
  \renewcommand{\shortcut@GLSpl}{\rGLSpl}%
}
\newcommand*{\glsxtrrecordtriggervalue}[1]{%
 \GlsXtrTotalRecordCount{#1}%
}
\newcommand*{\GlsXtrSetRecordCountAttribute}[2]{%
 \@for\@glsxtr@cat:=#1\do
 {%
   \ifdefempty{\@glsxtr@cat}{}%
   {%
     \glssetcategoryattribute{\@glsxtr@cat}{recordcount}{#2}%
   }%
 }%
}
\newcommand*{\glsxtrifrecordtrigger}[3]{%
 \glshasattribute{#1}{recordcount}%
 {%
   \ifnum\glsxtrrecordtriggervalue{#1}>\glsgetattribute{#1}{recordcount}\relax
    #3%
   \else
    #2%
   \fi
 }%
 {#3}%
}
\newcommand*{\@glsxtr@rglstrigger@record}[3]{%
  \protected@edef\glslabel{\glsdetoklabel{#2}}%
  \let\@gls@link@label\glslabel
  \def\@glsxtr@thevalue{}%
  \def\@glsxtr@theHvalue{\@glsxtr@thevalue}%
  \def\@glsnumberformat{glstriggerrecordformat}%
  \protected@edef\@gls@counter{\csname glo@\glslabel @counter\endcsname}%
  \protected@edef\glstype{\csname glo@\glslabel @type\endcsname}%
  \def\@glsxtr@thevalue{}%
  \def\@glsxtr@theHvalue{\@glsxtr@thevalue}%
  \@gls@save@glslocal
  \glsinitreunsets
  \glsxtrinitwrgloss
  \glslinkpresetkeys
  \setkeys{glslink}{#1}%
  \glslinkpostsetkeys
  \ifdefempty{\@glsxtr@thevalue}%
  {%
    \@gls@saveentrycounter
  }%
  {%
    \let\theglsentrycounter\@glsxtr@thevalue
    \def\theHglsentrycounter{\@glsxtr@theHvalue}%
  }%
  \glslinkwrcontent
  {%
    \ifglsxtrinitwrglossbefore
      \glsxtr@wrglossary@encap{#2}{\@do@wrglossary{#2}}%
    \fi
    #3%
    \ifglsxtrinitwrglossbefore
    \else
      \glsxtr@wrglossary@encap{#2}{\@do@wrglossary{#2}}%
    \fi
  }%
  \@gls@restore@glslocal
  \@gls@do@glsunset{#2}%
}
\newcommand*{\glstriggerrecordformat}[1]{}
\newrobustcmd*{\rgls}{\@gls@hyp@opt\@rgls}
\newcommand*{\@rgls}[2][]{%
  \new@ifnextchar[{\@rgls@{#1}{#2}}{\@rgls@{#1}{#2}[]}%
}
\def\@rgls@#1#2[#3]{%
  \glsxtrifrecordtrigger{#2}%
  {%
    \@glsxtr@rglstrigger@record{#1}{#2}{\rglsformat{#2}{#3}}%
  }%
  {%
    \@gls@{#1}{#2}[#3]%
  }%
}%
\newrobustcmd*{\rglspl}{\@gls@hyp@opt\@rglspl}
\newcommand*{\@rglspl}[2][]{%
  \new@ifnextchar[{\@rglspl@{#1}{#2}}{\@rglspl@{#1}{#2}[]}%
}
\def\@rglspl@#1#2[#3]{%
  \glsxtrifrecordtrigger{#2}%
  {%
    \@glsxtr@rglstrigger@record{#1}{#2}{\rglsplformat{#2}{#3}}%
  }%
  {%
    \@glspl@{#1}{#2}[#3]%
  }%
}%
\newrobustcmd*{\rGls}{\@gls@hyp@opt\@rGls}
\glsmfuaddmap{\rgls}{\rGls}
\newcommand*{\@rGls}[2][]{%
  \new@ifnextchar[{\@rGls@{#1}{#2}}{\@rGls@{#1}{#2}[]}%
}
\def\@rGls@#1#2[#3]{%
  \glsxtrifrecordtrigger{#2}%
  {%
    \@glsxtr@rglstrigger@record{#1}{#2}{\rGlsformat{#2}{#3}}%
  }%
  {%
    \@Gls@{#1}{#2}[#3]%
  }%
}%
\newrobustcmd*{\rGlspl}{\@gls@hyp@opt\@rGlspl}
\glsmfuaddmap{\rglspl}{\rGlspl}
\newcommand*{\@rGlspl}[2][]{%
  \new@ifnextchar[{\@rGlspl@{#1}{#2}}{\@rGlspl@{#1}{#2}[]}%
}
\def\@rGlspl@#1#2[#3]{%
  \glsxtrifrecordtrigger{#2}%
  {%
    \@glsxtr@rglstrigger@record{#1}{#2}{\rGlsplformat{#2}{#3}}%
  }%
  {%
    \@Glspl@{#1}{#2}[#3]%
  }%
}%
\newrobustcmd*{\rGLS}{\@gls@hyp@opt\@rGLS}
\glsmfublocker{\rGLS}%
\newcommand*{\@rGLS}[2][]{%
  \new@ifnextchar[{\@rGLS@{#1}{#2}}{\@rGLS@{#1}{#2}[]}%
}
\def\@rGLS@#1#2[#3]{%
  \glsxtrifrecordtrigger{#2}%
  {%
    \@glsxtr@rglstrigger@record{#1}{#2}{\rGLSformat{#2}{#3}}%
  }%
  {%
    \@GLS@{#1}{#2}[#3]%
  }%
}%
\newrobustcmd*{\rGLSpl}{\@gls@hyp@opt\@rGLSpl}
\glsmfublocker{\rGLSpl}%
\newcommand*{\@rGLSpl}[2][]{%
  \new@ifnextchar[{\@rGLSpl@{#1}{#2}}{\@rGLSpl@{#1}{#2}[]}%
}
\def\@rGLSpl@#1#2[#3]{%
  \glsxtrifrecordtrigger{#2}%
  {%
    \@glsxtr@rglstrigger@record{#1}{#2}{\rGLSplformat{#2}{#3}}%
  }%
  {%
    \@GLSpl@{#1}{#2}[#3]%
  }%
}%
\newcommand*{\rglsformat}[2]{%
  \glsifregular{#1}
  {\glsentryfirst{#1}}%
  {\ifglshaslong{#1}{\glsentrylong{#1}}{\glsentryfirst{#1}}}#2%
}
\newcommand*{\rglsplformat}[2]{%
  \glsifregular{#1}
  {\glsentryfirstplural{#1}}%
  {\ifglshaslong{#1}{\glsentrylongplural{#1}}{\glsentryfirstplural{#1}}}#2%
}
\newcommand*{\rGlsformat}[2]{%
  \glsifregular{#1}
  {\Glsentryfirst{#1}}%
  {\ifglshaslong{#1}{\Glsentrylong{#1}}{\Glsentryfirst{#1}}}#2%
}
\newcommand*{\rGlsplformat}[2]{%
  \glsifregular{#1}
  {\Glsentryfirstplural{#1}}%
  {\ifglshaslong{#1}{\Glsentrylongplural{#1}}{\Glsentryfirstplural{#1}}}#2%
}
\newcommand*{\rGLSformat}[2]{%
 \expandafter\glsuppercase\expandafter{\rglsformat{#1}{#2}}%
}
\newcommand*{\rGLSplformat}[2]{%
 \expandafter\glsuppercase\expandafter{\rglsplformat{#1}{#2}}%
}
\newcommand{\@glsxtr@do@inc@linkcount}{%
 \glsifattribute{\glslabel}{linkcount}{true}%
 {%
   \ifcsdef{c@glsxtr@linkcount@\glslabel}{}%
   {%
     \newcounter{glsxtr@linkcount@\glslabel}%
     \glshasattribute{\glslabel}{linkcountmaster}%
     {%
       \begingroup
        \edef\@glo@tmp{\endgroup\noexpand\@addtoreset{glsxtr@linkcount@\glslabel}%
         {\glsgetattribute{\glslabel}{linkcountmaster}}}%
       \@glo@tmp
     }%
     {}%
   }%
  \glsxtrinclinkcounter{glsxtr@linkcount@\glslabel}%
 }%
 {}%
}
\newcommand*{\glsxtrinclinkcounter}[1]{\stepcounter{#1}}
\newcommand*{\GlsXtrLinkCounterValue}[1]{%
 \ifcsundef{c@glsxtr@linkcount@#1}{0}{\csname c@glsxtr@linkcount@#1\endcsname}%
}
\newcommand*{\GlsXtrTheLinkCounter}[1]{%
 \ifcsundef{theglsxtr@linkcount@#1}{0}%
 {\csname theglsxtr@linkcount@#1\endcsname}%
}
\newcommand*{\GlsXtrIfLinkCounterDef}[3]{%
 \ifcsundef{theglsxtr@linkcount@#1}{#3}{#2}%
}
\newcommand*{\GlsXtrLinkCounterName}[1]{glsxtr@linkcount@#1}
\newcommand*{\GlsXtrEnableLinkCounting}[2][]{%
 \let\glsxtr@inc@linkcount\@glsxtr@do@inc@linkcount
 \@for\@glsxtr@label:=#2\do
 {%
  \glssetcategoryattribute{\@glsxtr@label}{linkcount}{true}%
  \ifstrempty{#1}{}%
  {%
    \ifcsundef{c@#1}%
    {\@nocounterr{#1}}%
    {\glssetcategoryattribute{\@glsxtr@label}{linkcountmaster}{#1}}%
  }%
 }%
}
\@onlypreamble\GlsXtrEnableLinkCounting
\@ifpackageloaded{glossaries-accsupp}
{
  \newcommand*{\glsaccessname}[1]{%
    \glsnameaccessdisplay
    {%
      \glsentryname{#1}%
    }%
    {#1}%
  }
  \newcommand*{\glsaccessfmtname}[3]{%
    \glsnameaccessdisplay
    {%
      \glsfmtfield{#1}{#2}{#3}{name}%
    }%
    {#3}%
  }
  \newcommand*{\Glsaccessname}[1]{%
    \glsnameaccessdisplay
    {%
      \Glsentryname{#1}%
    }%
    {#1}%
  }
  \newcommand*{\Glsaccessfmtname}[3]{%
    \glsnameaccessdisplay
    {%
      \Glsfmtfield{#1}{#2}{#3}{name}%
    }%
    {#3}%
  }
  \newcommand*{\GLSaccessname}[1]{%
    \glsnameaccessdisplay
    {%
      \glsuppercase{\glsentryname{#1}}%
    }%
    {#1}%
  }
  \newcommand*{\GLSaccessfmtname}[3]{%
    \glsnameaccessdisplay
    {%
      \GLSfmtfield{#1}{#2}{#3}{name}%
    }%
    {#3}%
  }
  \newcommand*{\glsaccesstext}[1]{%
    \glstextaccessdisplay
    {%
      \glsentrytext{#1}%
    }%
    {#1}%
  }
  \newcommand*{\glsaccessfmttext}[3]{%
    \glstextaccessdisplay
    {%
      \glsfmtfield{#1}{#2}{#3}{text}%
    }%
    {#3}%
  }
  \newcommand*{\Glsaccesstext}[1]{%
    \glstextaccessdisplay
    {%
      \Glsentrytext{#1}%
    }%
    {#1}%
  }
  \newcommand*{\Glsaccessfmttext}[3]{%
    \glstextaccessdisplay
    {%
      \Glsfmtfield{#1}{#2}{#3}{text}%
    }%
    {#3}%
  }
  \newcommand*{\GLSaccesstext}[1]{%
    \glstextaccessdisplay
    {%
      \glsuppercase{\glsentrytext{#1}}%
    }%
    {#1}%
  }
  \newcommand*{\GLSaccessfmttext}[3]{%
    \glstextaccessdisplay
    {%
      \GLSfmtfield{#1}{#2}{#3}{text}%
    }%
    {#3}%
  }
  \newcommand*{\glsaccessplural}[1]{%
    \glspluralaccessdisplay
    {%
      \glsentryplural{#1}%
    }%
    {#1}%
  }
  \newcommand*{\glsaccessfmtplural}[3]{%
    \glspluralaccessdisplay
    {%
      \glsfmtfield{#1}{#2}{#3}{plural}%
    }%
    {#3}%
  }
  \newcommand*{\Glsaccessplural}[1]{%
    \glspluralaccessdisplay
    {%
      \Glsentryplural{#1}%
    }%
    {#1}%
  }
  \newcommand*{\Glsaccessfmtplural}[3]{%
    \glspluralaccessdisplay
    {%
      \Glsfmtfield{#1}{#2}{#3}{plural}%
    }%
    {#3}%
  }
  \newcommand*{\GLSaccessplural}[1]{%
    \glspluralaccessdisplay
    {%
      \glsuppercase{\glsentryplural{#1}}%
    }%
    {#1}%
  }
  \newcommand*{\GLSaccessfmtplural}[3]{%
    \glspluralaccessdisplay
    {%
      \GLSfmtfield{#1}{#2}{#3}{plural}%
    }%
    {#3}%
  }
  \newcommand*{\glsaccessfirst}[1]{%
    \glsfirstaccessdisplay
    {%
      \glsentryfirst{#1}%
    }%
    {#1}%
  }
  \newcommand*{\glsaccessfmtfirst}[3]{%
    \glsfirstaccessdisplay
    {%
      \glsfmtfield{#1}{#2}{#3}{first}%
    }%
    {#3}%
  }
  \newcommand*{\Glsaccessfirst}[1]{%
    \glsfirstaccessdisplay
    {%
      \Glsentryfirst{#1}%
    }%
    {#1}%
  }
  \newcommand*{\Glsaccessfmtfirst}[3]{%
    \glsfirstaccessdisplay
    {%
      \Glsfmtfield{#1}{#2}{#3}{first}%
    }%
    {#3}%
  }
  \newcommand*{\GLSaccessfirst}[1]{%
    \glsfirstaccessdisplay
    {%
      \glsuppercase{\glsentryfirst{#1}}%
    }%
    {#1}%
  }
  \newcommand*{\GLSaccessfmtfirst}[3]{%
    \glsfirstaccessdisplay
    {%
      \GLSfmtfield{#1}{#2}{#3}{first}%
    }%
    {#3}%
  }
  \newcommand*{\glsaccessfirstplural}[1]{%
    \glsfirstpluralaccessdisplay
    {%
      \glsentryfirstplural{#1}%
    }%
    {#1}%
  }
  \newcommand*{\glsaccessfmtfirstplural}[3]{%
    \glsfirstpluralaccessdisplay
    {%
      \glsfmtfield{#1}{#2}{#3}{firstpl}%
    }%
    {#3}%
  }
  \newcommand*{\Glsaccessfirstplural}[1]{%
    \glsfirstpluralaccessdisplay
    {%
      \Glsentryfirstplural{#1}%
    }%
    {#1}%
  }
  \newcommand*{\Glsaccessfmtfirstplural}[3]{%
    \glsfirstpluralaccessdisplay
    {%
      \Glsfmtfield{#1}{#2}{#3}{firstpl}%
    }%
    {#3}%
  }
  \newcommand*{\GLSaccessfirstplural}[1]{%
    \glsfirstpluralaccessdisplay
    {%
      \glsuppercase{\glsentryfirstplural{#1}}%
    }%
    {#1}%
  }
  \newcommand*{\GLSaccessfmtfirstplural}[3]{%
    \glsfirstpluralaccessdisplay
    {%
      \GLSfmtfield{#1}{#2}{#3}{firstpl}%
    }%
    {#3}%
  }
  \newcommand*{\glsaccesssymbol}[1]{%
    \glssymbolaccessdisplay
    {%
      \glsentrysymbol{#1}%
    }%
    {#1}%
  }
  \newcommand*{\glsaccessfmtsymbol}[3]{%
    \glssymbolaccessdisplay
    {%
      \glsfmtfield{#1}{#2}{#3}{symbol}%
    }%
    {#3}%
  }
  \newcommand*{\Glsaccesssymbol}[1]{%
    \glssymbolaccessdisplay
    {%
      \Glsentrysymbol{#1}%
    }%
    {#1}%
  }
  \newcommand*{\Glsaccessfmtsymbol}[3]{%
    \glssymbolaccessdisplay
    {%
      \Glsfmtfield{#1}{#2}{#3}{symbol}%
    }%
    {#3}%
  }
  \newcommand*{\GLSaccesssymbol}[1]{%
    \glssymbolaccessdisplay
    {%
      \glsuppercase{\glsentrysymbol{#1}}%
    }%
    {#1}%
  }
  \newcommand*{\GLSaccessfmtsymbol}[3]{%
    \glssymbolaccessdisplay
    {%
      \GLSfmtfield{#1}{#2}{#3}{symbol}%
    }%
    {#3}%
  }
  \newcommand*{\glsaccesssymbolplural}[1]{%
    \glssymbolpluralaccessdisplay
    {%
      \glsentrysymbolplural{#1}%
    }%
    {#1}%
  }
  \newcommand*{\glsaccessfmtsymbolplural}[3]{%
    \glssymbolpluralaccessdisplay
    {%
      \glsfmtfield{#1}{#2}{#3}{symbolplural}%
    }%
    {#3}%
  }
  \newcommand*{\Glsaccesssymbolplural}[1]{%
    \glssymbolpluralaccessdisplay
    {%
      \Glsentrysymbolplural{#1}%
    }%
    {#1}%
  }
  \newcommand*{\Glsaccessfmtsymbolplural}[3]{%
    \glssymbolpluralaccessdisplay
    {%
      \Glsfmtfield{#1}{#2}{#3}{symbolplural}%
    }%
    {#3}%
  }
  \newcommand*{\GLSaccesssymbolplural}[1]{%
    \glssymbolpluralaccessdisplay
    {%
      \glsuppercase{\glsentrysymbolplural{#1}}%
    }%
    {#1}%
  }
  \newcommand*{\GLSaccessfmtsymbolplural}[3]{%
    \glssymbolpluralaccessdisplay
    {%
      \GLSfmtfield{#1}{#2}{#3}{symbolplural}%
    }%
    {#3}%
  }
  \newcommand*{\glsaccessdesc}[1]{%
    \glsdescriptionaccessdisplay
    {%
      \glsentrydesc{#1}%
    }%
    {#1}%
  }
  \newcommand*{\glsaccessfmtdesc}[3]{%
    \glsdescaccessdisplay
    {%
      \glsfmtfield{#1}{#2}{#3}{desc}%
    }%
    {#3}%
  }
  \newcommand*{\Glsaccessdesc}[1]{%
    \glsdescriptionaccessdisplay
    {%
      \Glsentrydesc{#1}%
    }%
    {#1}%
  }
  \newcommand*{\Glsaccessfmtdesc}[3]{%
    \glsdescaccessdisplay
    {%
      \Glsfmtfield{#1}{#2}{#3}{desc}%
    }%
    {#3}%
  }
  \newcommand*{\GLSaccessdesc}[1]{%
    \glsdescriptionaccessdisplay
    {%
      \glsuppercase{\glsentrydesc{#1}}%
    }%
    {#1}%
  }
  \newcommand*{\GLSaccessfmtdesc}[3]{%
    \glsdescaccessdisplay
    {%
      \GLSfmtfield{#1}{#2}{#3}{desc}%
    }%
    {#3}%
  }
  \newcommand*{\glsaccessdescplural}[1]{%
    \glsdescriptionpluralaccessdisplay
    {%
      \glsentrydescplural{#1}%
    }%
    {#1}%
  }
  \newcommand*{\glsaccessfmtdescplural}[3]{%
    \glsdescpluralaccessdisplay
    {%
      \glsfmtfield{#1}{#2}{#3}{descplural}%
    }%
    {#3}%
  }
  \newcommand*{\Glsaccessdescplural}[1]{%
    \glsdescriptionpluralaccessdisplay
    {%
      \Glsentrydescplural{#1}%
    }%
    {#1}%
  }
  \newcommand*{\Glsaccessfmtdescplural}[3]{%
    \glsdescpluralaccessdisplay
    {%
      \Glsfmtfield{#1}{#2}{#3}{descplural}%
    }%
    {#3}%
  }
  \newcommand*{\GLSaccessdescplural}[1]{%
    \glsdescriptionpluralaccessdisplay
    {%
      \glsuppercase{\glsentrydescplural{#1}}%
    }%
    {#1}%
  }
  \newcommand*{\GLSaccessfmtdescplural}[3]{%
    \glsdescpluralaccessdisplay
    {%
      \GLSfmtfield{#1}{#2}{#3}{descplural}%
    }%
    {#3}%
  }
  \newcommand*{\glsaccessshort}[1]{%
    \glsshortaccessdisplay
    {%
      \glsentryshort{#1}%
    }%
    {#1}%
  }
  \newcommand*{\glsaccessfmtshort}[3]{%
    \glsshortaccessdisplay
    {%
      \glsfmtfield{#1}{#2}{#3}{short}%
    }%
    {#3}%
  }
  \newcommand*{\Glsaccessshort}[1]{%
    \glsshortaccessdisplay
    {%
      \Glsentryshort{#1}%
    }%
    {#1}%
  }
  \newcommand*{\Glsaccessfmtshort}[3]{%
    \glsshortaccessdisplay
    {%
      \Glsfmtfield{#1}{#2}{#3}{short}%
    }%
    {#3}%
  }
  \newcommand*{\GLSaccessshort}[1]{%
    \glsshortaccessdisplay
    {%
      \glsuppercase{\glsentryshort{#1}}%
    }%
    {#1}%
  }
  \newcommand*{\GLSaccessfmtshort}[3]{%
    \glsshortaccessdisplay
    {%
      \GLSfmtfield{#1}{#2}{#3}{short}%
    }%
    {#3}%
  }
  \newcommand*{\glsaccessshortpl}[1]{%
    \glsshortpluralaccessdisplay
    {%
      \glsentryshortpl{#1}%
    }%
    {#1}%
  }
  \newcommand*{\glsaccessfmtshortpl}[3]{%
    \glsshortpluralaccessdisplay
    {%
      \glsfmtfield{#1}{#2}{#3}{shortpl}%
    }%
    {#3}%
  }
  \newcommand*{\Glsaccessshortpl}[1]{%
    \glsshortpluralaccessdisplay
    {%
      \Glsentryshortpl{#1}%
    }%
    {#1}%
  }
  \newcommand*{\Glsaccessfmtshortpl}[3]{%
    \glsshortpluralaccessdisplay
    {%
      \Glsfmtfield{#1}{#2}{#3}{shortpl}%
    }%
    {#3}%
  }
  \newcommand*{\GLSaccessshortpl}[1]{%
    \glsshortpluralaccessdisplay
    {%
      \glsuppercase{\glsentryshortpl{#1}}%
    }%
    {#1}%
  }
  \newcommand*{\GLSaccessfmtshortpl}[3]{%
    \glsshortpluralaccessdisplay
    {%
      \GLSfmtfield{#1}{#2}{#3}{shortpl}%
    }%
    {#3}%
  }
  \newcommand*{\glsaccesslong}[1]{%
    \glslongaccessdisplay{\glsentrylong{#1}}{#1}%
  }
  \newcommand*{\glsaccessfmtlong}[3]{%
    \glslongaccessdisplay
    {%
      \glsfmtfield{#1}{#2}{#3}{long}%
    }%
    {#3}%
  }
  \newcommand*{\Glsaccesslong}[1]{%
    \glslongaccessdisplay{\Glsentrylong{#1}}{#1}%
  }
  \newcommand*{\Glsaccessfmtlong}[3]{%
    \glslongaccessdisplay
    {%
      \Glsfmtfield{#1}{#2}{#3}{long}%
    }%
    {#3}%
  }
  \newcommand*{\GLSaccesslong}[1]{%
    \glslongaccessdisplay
    {%
      \glsuppercase{\glsentrylong{#1}}%
    }%
    {#1}%
  }
  \newcommand*{\GLSaccessfmtlong}[3]{%
    \glslongaccessdisplay
    {%
      \GLSfmtfield{#1}{#2}{#3}{long}%
    }%
    {#3}%
  }
  \newcommand*{\glsaccesslongpl}[1]{%
    \glslongpluralaccessdisplay{\glsentrylongpl{#1}}{#1}%
  }
  \newcommand*{\glsaccessfmtlongpl}[3]{%
    \glslongpluralaccessdisplay
    {%
      \glsfmtfield{#1}{#2}{#3}{longpl}%
    }%
    {#3}%
  }

  \newcommand*{\Glsaccesslongpl}[1]{%
    \glslongpluralaccessdisplay{\Glsentrylongpl{#1}}{#1}%
  }
  \newcommand*{\Glsaccessfmtlongpl}[3]{%
    \glslongpluralaccessdisplay
    {%
      \Glsfmtfield{#1}{#2}{#3}{longpl}%
    }%
    {#3}%
  }
  \newcommand*{\GLSaccesslongpl}[1]{%
    \glslongpluralaccessdisplay
    {%
      \glsuppercase{\glsentrylongpl{#1}}%
    }%
    {#1}%
  }
  \newcommand*{\GLSaccessfmtlongpl}[3]{%
    \glslongpluralaccessdisplay
    {%
      \GLSfmtfield{#1}{#2}{#3}{longpl}%
    }%
    {#3}%
  }
  \ifdef\glsuseriaccessdisplay
  {
    \newcommand*{\glsaccessuseri}[1]{%
      \glsuseriaccessdisplay
      {%
        \glsentryuseri{#1}%
      }%
      {#1}%
    }
  }
  {
    \newcommand*{\glsaccessuseri}[1]{%
      \glsentryuseri{#1}%
    }
  }
  \ifdef\glsuseriaccessdisplay
  {
    \newcommand*{\glsaccessfmtuseri}[3]{%
      \glsuseriaccessdisplay
      {%
        \glsfmtfield{#1}{#2}{#3}{useri}%
      }%
      {#3}%
    }
  }
  {
    \newcommand*{\glsaccessfmtuseri}[3]{%
      \glsfmtfield{#1}{#2}{#3}{useri}%
    }
  }
  \ifdef\glsuseriaccessdisplay
  {
    \newcommand*{\Glsaccessuseri}[1]{%
      \glsuseriaccessdisplay
      {%
        \Glsentryuseri{#1}%
      }%
      {#1}%
    }
  }
  {
    \newcommand*{\Glsaccessuseri}[1]{%
      \Glsentryuseri{#1}%
    }
  }
  \ifdef\glsuseriaccessdisplay
  {
    \newcommand*{\Glsaccessfmtuseri}[3]{%
      \glsuseriaccessdisplay
      {%
        \Glsfmtfield{#1}{#2}{#3}{useri}%
      }%
      {#3}%
    }
  }
  {
    \newcommand*{\Glsaccessfmtuseri}[3]{%
      \Glsfmtfield{#1}{#2}{#3}{useri}%
    }
  }
  \ifdef\glsuseriaccessdisplay
  {
    \newcommand*{\GLSaccessuseri}[1]{%
      \glsuseriaccessdisplay
      {%
        \glsuppercase{\glsentryuseri{#1}}%
      }%
      {#1}%
    }
  }
  {
    \newcommand*{\GLSaccessuseri}[1]{%
      \glsuppercase{\glsentryuseri{#1}}%
    }
  }
  \ifdef\glsuseriaccessdisplay
  {
    \newcommand*{\GLSaccessfmtuseri}[3]{%
      \glsuseriaccessdisplay
      {%
        \GLSfmtfield{#1}{#2}{#3}{useri}%
      }%
      {#3}%
    }
  }
  {
    \newcommand*{\GLSaccessfmtuseri}[3]{%
      \GLSfmtfield{#1}{#2}{#3}{useri}%
    }
  }
  \ifdef\glsuseriiaccessdisplay
  {
    \newcommand*{\glsaccessuserii}[1]{%
      \glsuseriiaccessdisplay
      {%
        \glsentryuserii{#1}%
      }%
      {#1}%
    }
  }
  {
    \newcommand*{\glsaccessuserii}[1]{%
      \glsentryuserii{#1}%
    }
  }
  \ifdef\glsuseriiaccessdisplay
  {
    \newcommand*{\glsaccessfmtuserii}[3]{%
      \glsuseriiaccessdisplay
      {%
        \glsfmtfield{#1}{#2}{#3}{userii}%
      }%
      {#3}%
    }
  }
  {
    \newcommand*{\glsaccessfmtuserii}[3]{%
      \glsfmtfield{#1}{#2}{#3}{userii}%
    }
  }
  \ifdef\glsuseriiaccessdisplay
  {
    \newcommand*{\Glsaccessuserii}[1]{%
      \glsuseriiaccessdisplay
      {%
        \Glsentryuserii{#1}%
      }%
      {#1}%
    }
  }
  {
    \newcommand*{\Glsaccessuserii}[1]{%
      \Glsentryuserii{#1}%
    }
  }
  \ifdef\glsuseriiaccessdisplay
  {
    \newcommand*{\Glsaccessfmtuserii}[3]{%
      \glsuseriiaccessdisplay
      {%
        \Glsfmtfield{#1}{#2}{#3}{userii}%
      }%
      {#3}%
    }
  }
  {
    \newcommand*{\Glsaccessfmtuserii}[3]{%
      \Glsfmtfield{#1}{#2}{#3}{userii}%
    }
  }
  \ifdef\glsuseriiaccessdisplay
  {
    \newcommand*{\GLSaccessuserii}[1]{%
      \glsuseriiaccessdisplay
      {%
        \glsuppercase{\glsentryuserii{#1}}%
      }%
      {#1}%
    }
  }
  {
    \newcommand*{\GLSaccessuserii}[1]{%
      \glsuppercase{\glsentryuserii{#1}}%
    }
  }
  \ifdef\glsuseriiaccessdisplay
  {
    \newcommand*{\GLSaccessfmtuserii}[3]{%
      \glsuseriiaccessdisplay
      {%
        \GLSfmtfield{#1}{#2}{#3}{userii}%
      }%
      {#3}%
    }
  }
  {
    \newcommand*{\GLSaccessfmtuserii}[3]{%
      \GLSfmtfield{#1}{#2}{#3}{userii}%
    }
  }
  \ifdef\glsuseriiiaccessdisplay
  {
    \newcommand*{\glsaccessuseriii}[1]{%
      \glsuseriiiaccessdisplay
      {%
        \glsentryuseriii{#1}%
      }%
      {#1}%
    }
  }
  {
    \newcommand*{\glsaccessuseriii}[1]{%
      \glsentryuseriii{#1}%
    }
  }
  \ifdef\glsuseriiiaccessdisplay
  {
    \newcommand*{\glsaccessfmtuseriii}[3]{%
      \glsuseriiiaccessdisplay
      {%
        \glsfmtfield{#1}{#2}{#3}{useriii}%
      }%
      {#3}%
    }
  }
  {
    \newcommand*{\glsaccessfmtuseriii}[3]{%
      \glsfmtfield{#1}{#2}{#3}{useriii}%
    }
  }
  \ifdef\glsuseriiiaccessdisplay
  {
    \newcommand*{\Glsaccessuseriii}[1]{%
      \glsuseriiiaccessdisplay
      {%
        \Glsentryuseriii{#1}%
      }%
      {#1}%
    }
  }
  {
    \newcommand*{\Glsaccessuseriii}[1]{%
      \Glsentryuseriii{#1}%
    }
  }
  \ifdef\glsuseriiiaccessdisplay
  {
    \newcommand*{\Glsaccessfmtuseriii}[3]{%
      \glsuseriiiaccessdisplay
      {%
        \Glsfmtfield{#1}{#2}{#3}{useriii}%
      }%
      {#3}%
    }
  }
  {
    \newcommand*{\Glsaccessfmtuseriii}[3]{%
      \Glsfmtfield{#1}{#2}{#3}{useriii}%
    }
  }
  \ifdef\glsuseriiiaccessdisplay
  {
    \newcommand*{\GLSaccessuseriii}[1]{%
      \glsuseriiiaccessdisplay
      {%
        \glsuppercase{\glsentryuseriii{#1}}%
      }%
      {#1}%
    }
  }
  {
    \newcommand*{\GLSaccessuseriii}[1]{%
      \glsuppercase{\glsentryuseriii{#1}}%
    }
  }
  \ifdef\glsuseriiiaccessdisplay
  {
    \newcommand*{\GLSaccessfmtuseriii}[3]{%
      \glsuseriiiaccessdisplay
      {%
        \GLSfmtfield{#1}{#2}{#3}{useriii}%
      }%
      {#3}%
    }
  }
  {
    \newcommand*{\GLSaccessfmtuseriii}[3]{%
      \GLSfmtfield{#1}{#2}{#3}{useriii}%
    }
  }
  \ifdef\glsuserivaccessdisplay
  {
    \newcommand*{\glsaccessuseriv}[1]{%
      \glsuserivaccessdisplay
      {%
        \glsentryuseriv{#1}%
      }%
      {#1}%
    }
  }
  {
    \newcommand*{\glsaccessuseriv}[1]{%
      \glsentryuseriv{#1}%
    }
  }
  \ifdef\glsuserivaccessdisplay
  {
    \newcommand*{\glsaccessfmtuseriv}[3]{%
      \glsuserivaccessdisplay
      {%
        \glsfmtfield{#1}{#2}{#3}{useriv}%
      }%
      {#3}%
    }
  }
  {
    \newcommand*{\glsaccessfmtuseriv}[3]{%
      \glsfmtfield{#1}{#2}{#3}{useriv}%
    }
  }
  \ifdef\glsuserivaccessdisplay
  {
    \newcommand*{\Glsaccessuseriv}[1]{%
      \glsuserivaccessdisplay
      {%
        \Glsentryuseriv{#1}%
      }%
      {#1}%
    }
  }
  {
    \newcommand*{\Glsaccessuseriv}[1]{%
      \Glsentryuseriv{#1}%
    }
  }
  \ifdef\glsuserivaccessdisplay
  {
    \newcommand*{\Glsaccessfmtuseriv}[3]{%
      \glsuserivaccessdisplay
      {%
        \Glsfmtfield{#1}{#2}{#3}{useriv}%
      }%
      {#3}%
    }
  }
  {
    \newcommand*{\Glsaccessfmtuseriv}[3]{%
      \Glsfmtfield{#1}{#2}{#3}{useriv}%
    }
  }
  \ifdef\glsuserivaccessdisplay
  {
    \newcommand*{\GLSaccessuseriv}[1]{%
      \glsuserivaccessdisplay
      {%
        \glsuppercase{\glsentryuseriv{#1}}%
      }%
      {#1}%
    }
  }
  {
    \newcommand*{\GLSaccessuseriv}[1]{%
      \glsuppercase{\glsentryuseriv{#1}}%
    }
  }
  \ifdef\glsuserivaccessdisplay
  {
    \newcommand*{\GLSaccessfmtuseriv}[3]{%
      \glsuserivaccessdisplay
      {%
        \GLSfmtfield{#1}{#2}{#3}{useriv}%
      }%
      {#3}%
    }
  }
  {
    \newcommand*{\GLSaccessfmtuseriv}[3]{%
      \GLSfmtfield{#1}{#2}{#3}{useriv}%
    }
  }
  \ifdef\glsuservaccessdisplay
  {
    \newcommand*{\glsaccessuserv}[1]{%
      \glsuservaccessdisplay
      {%
        \glsentryuserv{#1}%
      }%
      {#1}%
    }
  }
  {
    \newcommand*{\glsaccessuserv}[1]{%
      \glsentryuserv{#1}%
    }
  }
  \ifdef\glsuservaccessdisplay
  {
    \newcommand*{\glsaccessfmtuserv}[3]{%
      \glsuservaccessdisplay
      {%
        \glsfmtfield{#1}{#2}{#3}{userv}%
      }%
      {#3}%
    }
  }
  {
    \newcommand*{\glsaccessfmtuserv}[3]{%
      \glsfmtfield{#1}{#2}{#3}{userv}%
    }
  }
  \ifdef\glsuservaccessdisplay
  {
    \newcommand*{\Glsaccessuserv}[1]{%
      \glsuservaccessdisplay
      {%
        \Glsentryuserv{#1}%
      }%
      {#1}%
    }
  }
  {
    \newcommand*{\Glsaccessuserv}[1]{%
      \Glsentryuserv{#1}%
    }
  }
  \ifdef\glsuservaccessdisplay
  {
    \newcommand*{\Glsaccessfmtuserv}[3]{%
      \glsuservaccessdisplay
      {%
        \Glsfmtfield{#1}{#2}{#3}{userv}%
      }%
      {#3}%
    }
  }
  {
    \newcommand*{\Glsaccessfmtuserv}[3]{%
      \Glsfmtfield{#1}{#2}{#3}{userv}%
    }
  }
  \ifdef\glsuservaccessdisplay
  {
    \newcommand*{\GLSaccessuserv}[1]{%
      \glsuservaccessdisplay
      {%
        \glsuppercase{\glsentryuserv{#1}}%
      }%
      {#1}%
    }
  }
  {
    \newcommand*{\GLSaccessuserv}[1]{%
      \glsuppercase{\glsentryuserv{#1}}%
    }
  }
  \ifdef\glsuservaccessdisplay
  {
    \newcommand*{\GLSaccessfmtuserv}[3]{%
      \glsuservaccessdisplay
      {%
        \GLSfmtfield{#1}{#2}{#3}{userv}%
      }%
      {#3}%
    }
  }
  {
    \newcommand*{\GLSaccessfmtuserv}[3]{%
      \GLSfmtfield{#1}{#2}{#3}{userv}%
    }
  }
  \ifdef\glsuserviaccessdisplay
  {
    \newcommand*{\glsaccessuservi}[1]{%
      \glsuserviaccessdisplay
      {%
        \glsentryuservi{#1}%
      }%
      {#1}%
    }
  }
  {
    \newcommand*{\glsaccessuservi}[1]{%
      \glsentryuservi{#1}%
    }
  }
  \ifdef\glsuserviaccessdisplay
  {
    \newcommand*{\glsaccessfmtuservi}[3]{%
      \glsuserviaccessdisplay
      {%
        \glsfmtfield{#1}{#2}{#3}{uservi}%
      }%
      {#3}%
    }
  }
  {
    \newcommand*{\glsaccessfmtuservi}[3]{%
      \glsfmtfield{#1}{#2}{#3}{uservi}%
    }
  }
  \ifdef\glsuserviaccessdisplay
  {
    \newcommand*{\Glsaccessuservi}[1]{%
      \glsuserviaccessdisplay
      {%
        \Glsentryuservi{#1}%
      }%
      {#1}%
    }
  }
  {
    \newcommand*{\Glsaccessuservi}[1]{%
      \Glsentryuservi{#1}%
    }
  }
  \ifdef\glsuserviaccessdisplay
  {
    \newcommand*{\Glsaccessfmtuservi}[3]{%
      \glsuserviaccessdisplay
      {%
        \Glsfmtfield{#1}{#2}{#3}{uservi}%
      }%
      {#3}%
    }
  }
  {
    \newcommand*{\Glsaccessfmtuservi}[3]{%
      \Glsfmtfield{#1}{#2}{#3}{uservi}%
    }
  }
  \ifdef\glsuserviaccessdisplay
  {
    \newcommand*{\GLSaccessuservi}[1]{%
      \glsuserviaccessdisplay
      {%
        \glsuppercase{\glsentryuservi{#1}}%
      }%
      {#1}%
    }
  }
  {
    \newcommand*{\GLSaccessuservi}[1]{%
      \glsuppercase{\glsentryuservi{#1}}%
    }
  }
  \ifdef\glsuserviaccessdisplay
  {
    \newcommand*{\GLSaccessfmtuservi}[3]{%
      \glsuserviaccessdisplay
      {%
        \GLSfmtfield{#1}{#2}{#3}{uservi}%
      }%
      {#3}%
    }
  }
  {
    \newcommand*{\GLSaccessfmtuservi}[3]{%
      \GLSfmtfield{#1}{#2}{#3}{uservi}%
    }
  }
  \define@key{glsxtrabbrv}{access}{%
    \def\@gls@nameaccess{#1}%
  }
  \define@key{glsxtrabbrv}{textaccess}{%
    \def\@gls@textaccess{#1}%
  }
  \define@key{glsxtrabbrv}{pluralaccess}{%
    \def\@gls@pluralaccess{#1}%
  }
  \define@key{glsxtrabbrv}{firstaccess}{%
    \def\@gls@firstaccess{#1}%
  }
  \define@key{glsxtrabbrv}{firstpluralaccess}{%
    \def\@gls@firstpluralaccess{#1}%
  }
  \define@key{glsxtrabbrv}{shortaccess}{%
    \def\@gls@shortaccess{#1}%
  }
  \define@key{glsxtrabbrv}{shortpluralaccess}{%
    \def\@gls@shortaccesspl{#1}%
  }
  \define@key{glsxtrabbrv}{longaccess}{%
    \def\@gls@longaccess{#1}%
  }
  \define@key{glsxtrabbrv}{longpluralaccess}{%
    \def\@gls@longaccesspl{#1}%
  }
  \newcommand*{\@gls@initaccesskeys}{%
    \def\@gls@nameaccess{}%
    \def\@gls@textaccess{}%
    \def\@gls@pluralaccess{}%
    \def\@gls@firstaccess{}%
    \def\@gls@firstpluralaccess{}%
    \def\@gls@shortaccess{}%
    \def\@gls@shortaccesspl{}%
    \def\@gls@longaccess{}%
    \def\@gls@longaccesspl{}%
  }
  \newcommand*{\@gls@ifaccessattribute@set}[3]{%
    \glsifcategoryattribute{\glscategorylabel}{access#1}{true}%
    {#2}%
    {%
      \glsifcategoryattribute{\glscategorylabel}{access#1}{false}%
      {#3}%
      {%
        \glsifcategoryattribute{\glscategorylabel}{#1}{true}%
        {#2}%
        {#3}%
      }%
    }%
  }
  \providecommand*{\glsdefaultshortaccess}[2]{#1}
  \newcommand{\glsxtrassignactualsetup}{%
   \let\@\empty
   \let\emph\@firstofone
   \let\textbf\@firstofone
   \let\textmd\@firstofone
   \let\textit\@firstofone
   \let\textsl\@firstofone
   \let\textsc\@firstofone
   \let\textrm\@firstofone
   \let\textsf\@firstofone
   \let\texttt\@firstofone
   \let\glstextup\@firstofone
  }
  \newcommand{\@gls@assign@actual}{%
   \begingroup
    \glsxtrassignactualsetup
    \protected@edef\@gls@tmp{\endgroup
      \def\noexpand\@gls@actualshort{\glsxtrorgshort}%
      \def\noexpand\@gls@actuallong{\glsxtrorglong}%
      \def\noexpand\@gls@actualshortpl{\@gls@shortpl}%
      \def\noexpand\@gls@actuallongpl{\@gls@longpl}%
    }%
    \@gls@tmp
  }
  \newcommand{\@gls@setup@default@access}{%
    \@gls@assign@actual
    \ifdefempty\@gls@shortaccess
    {%
      \@gls@ifaccessattribute@set{insertdots}%
      {%
        \expandafter\@glsxtr@insertdots\expandafter\@gls@actualshort\expandafter
         {\@gls@actualshort}%
      }%
      {}%
      \ifdefempty\@gls@longaccess
      {%
        \protected@edef\@gls@shortaccess{\glsdefaultshortaccess
          {\expandonce\@gls@actuallong}{\expandonce\@gls@actualshort}}%
      }%
      {%
        \protected@edef\@gls@shortaccess{\glsdefaultshortaccess
          {\expandonce\@gls@longaccess}{\expandonce\@gls@actualshort}}%
      }%
      \eappto\ExtraCustomAbbreviationFields{shortaccess={\@gls@shortaccess},}%
      \ifdefempty\@gls@shortaccesspl
      {%
        \@gls@ifaccessattribute@set{aposplural}%
        {%
          \expandafter\def\expandafter\@gls@shortaccesspl\expandafter{%
            \@gls@actualshort'\glsxtrabbrvpluralsuffix}%
        }%
        {%
          \@gls@ifaccessattribute@set{noshortplural}%
          {%
             \let\@gls@shortaccesspl\@gls@shortaccess
          }%
          {%
            \let\@gls@shortaccesspl\@gls@actualshortpl
          }%
        }%
      \ifdefempty\@gls@longaccesspl
      {%
        \protected@edef\@gls@shortaccesspl{\glsdefaultshortaccess
          {\expandonce\@gls@actuallongpl}{\expandonce\@gls@actualshortpl}}%
      }%
      {%
        \protected@edef\@gls@shortaccesspl{\glsdefaultshortaccess
          {\expandonce\@gls@longaccesspl}{\expandonce\@gls@actualshort}}%
      }%
      \eappto\ExtraCustomAbbreviationFields{shortpluralaccess={\@gls@shortaccesspl},}%
      }%
      {}%
    }%
    {%
      \ifdefempty\@gls@shortaccesspl
      {\let\@gls@shortaccesspl\@gls@shortaccess}%
      {}%
    }%
    \ifdefempty\@gls@nameaccess
    {%
      \glsifcategoryattribute{\glscategorylabel}{nameshortaccess}{true}%
      {%
        \eappto\ExtraCustomAbbreviationFields{access={\@gls@shortaccess},}%
      }%
      {}%
    }%
    {}%
    \ifdefempty\@gls@textaccess
    {%
      \glsifcategoryattribute{\glscategorylabel}{textshortaccess}{true}%
      {%
        \eappto\ExtraCustomAbbreviationFields{textaccess={\@gls@shortaccess},}%
      }%
      {}%
    }%
    {}%
    \ifdefempty\@gls@pluralaccess
    {%
      \glsifcategoryattribute{\glscategorylabel}{textshortaccess}{true}%
      {%
        \eappto\ExtraCustomAbbreviationFields{%
           pluralaccess={\@gls@shortaccesspl},%
        }%
      }%
      {}%
    }%
    {}%
    \ifdefempty\@gls@firstaccess
    {%
      \glsifcategoryattribute{\glscategorylabel}{firstshortaccess}{true}%
      {%
        \eappto\ExtraCustomAbbreviationFields{firstaccess={\@gls@shortaccess},}%
      }%
      {}%
    }%
    {}%
    \ifdefempty\@gls@firstpluralaccess
    {%
      \glsifcategoryattribute{\glscategorylabel}{firstshortaccess}{true}%
      {%
        \eappto\ExtraCustomAbbreviationFields{%
           firstpluralaccess={\@gls@shortaccesspl},%
        }%
      }%
      {}%
    }%
    {}%
  }
  \newcommand*{\glsxtrprovideaccsuppcmd}[2]{%
    \ifcsundef{glsxtr#1#2accsupp}%
    {\csdef{glsxtr#1#2accsupp}{\glsshortaccsupp}}%
    {}%
  }
  \newcommand*{\glsxtrAccSuppAbbrSetNoLongAttrs}[1]{%
   \glssetcategoryattribute{#1}{nameshortaccess}{true}%
   \glssetcategoryattribute{#1}{firstshortaccess}{true}%
   \glssetcategoryattribute{#1}{textshortaccess}{true}%
   \glsxtrprovideaccsuppcmd{#1}{name}%
   \glsxtrprovideaccsuppcmd{#1}{first}%
   \glsxtrprovideaccsuppcmd{#1}{firstpl}%
   \glsxtrprovideaccsuppcmd{#1}{text}%
   \glsxtrprovideaccsuppcmd{#1}{plural}%
  }
  \newcommand*{\glsxtrAccSuppAbbrSetFirstLongAttrs}[1]{%
   \glssetcategoryattribute{#1}{nameshortaccess}{true}%
   \glssetcategoryattribute{#1}{textshortaccess}{true}%
   \glsxtrprovideaccsuppcmd{#1}{name}%
   \glsxtrprovideaccsuppcmd{#1}{text}%
   \glsxtrprovideaccsuppcmd{#1}{plural}%
  }
  \newcommand*{\glsxtrAccSuppAbbrSetTextShortAttrs}[1]{%
   \glssetcategoryattribute{#1}{textshortaccess}{true}%
   \glsxtrprovideaccsuppcmd{#1}{text}%
   \glsxtrprovideaccsuppcmd{#1}{plural}%
  }
  \newcommand*{\glsxtrAccSuppAbbrSetNameShortAttrs}[1]{%
   \glssetcategoryattribute{#1}{nameshortaccess}{true}%
   \glsxtrprovideaccsuppcmd{#1}{name}%
  }
  \newcommand*{\glsxtrAccSuppAbbrSetNameLongAttrs}[1]{%
   \glssetcategoryattribute{#1}{firstshortaccess}{true}%
   \glssetcategoryattribute{#1}{textshortaccess}{true}%
   \glsxtrprovideaccsuppcmd{#1}{first}%
   \glsxtrprovideaccsuppcmd{#1}{firstpl}%
   \glsxtrprovideaccsuppcmd{#1}{text}%
   \glsxtrprovideaccsuppcmd{#1}{plural}%
  }
}
{
  \newcommand*{\glsaccessname}[1]{\glsentryname{#1}}
  \newcommand*{\glsaccessfmtname}[3]{%
    \glsfmtfield{#1}{#2}{#3}{name}%
  }
  \newcommand*{\Glsaccessname}[1]{\Glsentryname{#1}}
  \newcommand*{\Glsaccessfmtname}[3]{%
    \Glsfmtfield{#1}{#2}{#3}{name}%
  }
  \newcommand*{\GLSaccessname}[1]{%
   \protect\glsuppercase{\glsentryname{#1}}}
  \newcommand*{\GLSaccessfmtname}[3]{%
    \GLSfmtfield{#1}{#2}{#3}{name}%
  }
  \newcommand*{\glsaccesstext}[1]{\glsentrytext{#1}}
  \newcommand*{\glsaccessfmttext}[3]{%
    \glsfmtfield{#1}{#2}{#3}{text}%
  }
  \newcommand*{\Glsaccesstext}[1]{\Glsentrytext{#1}}
  \newcommand*{\Glsaccessfmttext}[3]{%
    \Glsfmtfield{#1}{#2}{#3}{text}%
  }
  \newcommand*{\GLSaccesstext}[1]{%
   \protect\glsuppercase{\glsentrytext{#1}}}
  \newcommand*{\GLSaccessfmttext}[3]{%
    \GLSfmtfield{#1}{#2}{#3}{text}%
  }
  \newcommand*{\glsaccessplural}[1]{\glsentryplural{#1}}
  \newcommand*{\glsaccessfmtplural}[3]{%
    \glsfmtfield{#1}{#2}{#3}{plural}%
  }
  \newcommand*{\Glsaccessplural}[1]{\Glsentryplural{#1}}
  \newcommand*{\Glsaccessfmtplural}[3]{%
    \Glsfmtfield{#1}{#2}{#3}{plural}%
  }
  \newcommand*{\GLSaccessplural}[1]{%
   \protect\glsuppercase{\glsentryplural{#1}}}
  \newcommand*{\GLSaccessfmtplural}[3]{%
    \GLSfmtfield{#1}{#2}{#3}{plural}%
  }
  \newcommand*{\glsaccessfirst}[1]{\glsentryfirst{#1}}
  \newcommand*{\glsaccessfmtfirst}[3]{%
    \glsfmtfield{#1}{#2}{#3}{first}%
  }
  \newcommand*{\Glsaccessfirst}[1]{\Glsentryfirst{#1}}
  \newcommand*{\Glsaccessfmtfirst}[3]{%
    \Glsfmtfield{#1}{#2}{#3}{first}%
  }
  \newcommand*{\GLSaccessfirst}[1]{%
   \protect\glsuppercase{\glsentryfirst{#1}}}
  \newcommand*{\GLSaccessfmtfirst}[3]{%
    \GLSfmtfield{#1}{#2}{#3}{first}%
  }
  \newcommand*{\glsaccessfirstplural}[1]{\glsentryfirstplural{#1}}
  \newcommand*{\glsaccessfmtfirstplural}[3]{%
    \glsfmtfield{#1}{#2}{#3}{firstpl}%
  }
  \newcommand*{\Glsaccessfirstplural}[1]{\Glsentryfirstplural{#1}}
  \newcommand*{\Glsaccessfmtfirstplural}[3]{%
    \Glsfmtfield{#1}{#2}{#3}{firstpl}%
  }
  \newcommand*{\GLSaccessfirstplural}[1]{%
   \protect\glsuppercase{\glsentryfirstplural{#1}}}
  \newcommand*{\GLSaccessfmtfirstplural}[3]{%
    \GLSfmtfield{#1}{#2}{#3}{firstpl}%
  }
  \newcommand*{\glsaccesssymbol}[1]{\glsentrysymbol{#1}}
  \newcommand*{\glsaccessfmtsymbol}[3]{%
    \glsfmtfield{#1}{#2}{#3}{symbol}%
  }
  \newcommand*{\Glsaccesssymbol}[1]{\Glsentrysymbol{#1}}
  \newcommand*{\Glsaccessfmtsymbol}[3]{%
    \Glsfmtfield{#1}{#2}{#3}{symbol}%
  }
  \newcommand*{\GLSaccesssymbol}[1]{%
   \protect\glsuppercase{\glsentrysymbol{#1}}}
  \newcommand*{\GLSaccessfmtsymbol}[3]{%
    \GLSfmtfield{#1}{#2}{#3}{symbol}%
  }
  \newcommand*{\glsaccesssymbolplural}[1]{\glsentrysymbolplural{#1}}
  \newcommand*{\glsaccessfmtsymbolplural}[3]{%
    \glsfmtfield{#1}{#2}{#3}{symbolplural}%
  }
  \newcommand*{\Glsaccesssymbolplural}[1]{\Glsentrysymbolplural{#1}}
  \newcommand*{\Glsaccessfmtsymbolplural}[3]{%
    \Glsfmtfield{#1}{#2}{#3}{symbolplural}%
  }
  \newcommand*{\GLSaccesssymbolplural}[1]{%
   \protect\glsuppercase{\glsentrysymbolplural{#1}}}
  \newcommand*{\GLSaccessfmtsymbolplural}[3]{%
    \GLSfmtfield{#1}{#2}{#3}{symbolplural}%
  }
  \newcommand*{\glsaccessdesc}[1]{\glsentrydesc{#1}}
  \newcommand*{\glsaccessfmtdesc}[3]{%
    \glsfmtfield{#1}{#2}{#3}{desc}%
  }
  \newcommand*{\Glsaccessdesc}[1]{\Glsentrydesc{#1}}
  \newcommand*{\Glsaccessfmtdesc}[3]{%
    \Glsfmtfield{#1}{#2}{#3}{desc}%
  }
  \newcommand*{\GLSaccessdesc}[1]{%
   \protect\glsuppercase{\glsentrydesc{#1}}}
  \newcommand*{\GLSaccessfmtdesc}[3]{%
    \GLSfmtfield{#1}{#2}{#3}{desc}%
  }
  \newcommand*{\glsaccessdescplural}[1]{\glsentrydescplural{#1}}
  \newcommand*{\glsaccessfmtdescplural}[3]{%
    \glsfmtfield{#1}{#2}{#3}{descplural}%
  }
  \newcommand*{\Glsaccessdescplural}[1]{\Glsentrydescplural{#1}}
  \newcommand*{\Glsaccessfmtdescplural}[3]{%
    \Glsfmtfield{#1}{#2}{#3}{descplural}%
  }
  \newcommand*{\GLSaccessdescplural}[1]{%
   \protect\glsuppercase{\glsentrydescplural{#1}}}
  \newcommand*{\GLSaccessfmtdescplural}[3]{%
    \GLSfmtfield{#1}{#2}{#3}{descplural}%
  }
  \newcommand*{\glsaccessshort}[1]{\glsentryshort{#1}}
  \newcommand*{\glsaccessfmtshort}[3]{%
    \glsfmtfield{#1}{#2}{#3}{short}%
  }
  \newcommand*{\Glsaccessshort}[1]{\Glsentryshort{#1}}
  \newcommand*{\Glsaccessfmtshort}[3]{%
    \Glsfmtfield{#1}{#2}{#3}{short}%
  }
  \newcommand*{\GLSaccessshort}[1]{%
   \protect\glsuppercase{\glsentryshort{#1}}}
  \newcommand*{\GLSaccessfmtshort}[3]{%
    \GLSfmtfield{#1}{#2}{#3}{short}%
  }
  \newcommand*{\glsaccessshortpl}[1]{\glsentryshortpl{#1}}
  \newcommand*{\glsaccessfmtshortpl}[3]{%
    \glsfmtfield{#1}{#2}{#3}{shortpl}%
  }
  \newcommand*{\Glsaccessshortpl}[1]{\Glsentryshortpl{#1}}
  \newcommand*{\Glsaccessfmtshortpl}[3]{%
    \Glsfmtfield{#1}{#2}{#3}{shortpl}%
  }
  \newcommand*{\GLSaccessshortpl}[1]{%
   \protect\glsuppercase{\glsentryshortpl{#1}}}
  \newcommand*{\GLSaccessfmtshortpl}[3]{%
    \GLSfmtfield{#1}{#2}{#3}{shortpl}%
  }
  \newcommand*{\glsaccesslong}[1]{\glsentrylong{#1}}
  \newcommand*{\glsaccessfmtlong}[3]{%
    \glsfmtfield{#1}{#2}{#3}{long}%
  }
  \newcommand*{\Glsaccesslong}[1]{\Glsentrylong{#1}}
  \newcommand*{\Glsaccessfmtlong}[3]{%
    \Glsfmtfield{#1}{#2}{#3}{long}%
  }
  \newcommand*{\GLSaccesslong}[1]{%
   \protect\glsuppercase{\glsentrylong{#1}}}
  \newcommand*{\GLSaccessfmtlong}[3]{%
    \GLSfmtfield{#1}{#2}{#3}{long}%
  }
  \newcommand*{\glsaccesslongpl}[1]{\glsentrylongpl{#1}}
  \newcommand*{\glsaccessfmtlongpl}[3]{%
    \glsfmtfield{#1}{#2}{#3}{longpl}%
  }
  \newcommand*{\Glsaccesslongpl}[1]{\Glsentrylongpl{#1}}
  \newcommand*{\Glsaccessfmtlongpl}[3]{%
    \Glsfmtfield{#1}{#2}{#3}{longpl}%
  }
  \newcommand*{\GLSaccesslongpl}[1]{%
   \protect\glsuppercase{\glsentrylongpl{#1}}}
  \newcommand*{\GLSaccessfmtlongpl}[3]{%
    \GLSfmtfield{#1}{#2}{#3}{longpl}%
  }
  \newcommand*{\glsaccessuseri}[1]{\glsentryuseri{#1}}
  \newcommand*{\glsaccessfmtuseri}[3]{%
    \glsfmtfield{#1}{#2}{#3}{useri}%
  }
  \newcommand*{\Glsaccessuseri}[1]{\Glsentryuseri{#1}}
  \newcommand*{\Glsaccessfmtuseri}[3]{%
    \Glsfmtfield{#1}{#2}{#3}{useri}%
  }
  \newcommand*{\GLSaccessuseri}[1]{%
   \protect\glsuppercase{\glsentryuseri{#1}}}
  \newcommand*{\GLSaccessfmtuseri}[3]{%
    \GLSfmtfield{#1}{#2}{#3}{useri}%
  }
  \newcommand*{\glsaccessuserii}[1]{\glsentryuserii{#1}}
  \newcommand*{\glsaccessfmtuserii}[3]{%
    \glsfmtfield{#1}{#2}{#3}{userii}%
  }
  \newcommand*{\Glsaccessuserii}[1]{\Glsentryuserii{#1}}
  \newcommand*{\Glsaccessfmtuserii}[3]{%
    \Glsfmtfield{#1}{#2}{#3}{userii}%
  }
  \newcommand*{\GLSaccessuserii}[1]{%
   \protect\glsuppercase{\glsentryuserii{#1}}}
  \newcommand*{\GLSaccessfmtuserii}[3]{%
    \GLSfmtfield{#1}{#2}{#3}{userii}%
  }
  \newcommand*{\glsaccessuseriii}[1]{\glsentryuseriii{#1}}
  \newcommand*{\glsaccessfmtuseriii}[3]{%
    \glsfmtfield{#1}{#2}{#3}{useriii}%
  }
  \newcommand*{\Glsaccessuseriii}[1]{\Glsentryuseriii{#1}}
  \newcommand*{\Glsaccessfmtuseriii}[3]{%
    \Glsfmtfield{#1}{#2}{#3}{useriii}%
  }
  \newcommand*{\GLSaccessuseriii}[1]{%
   \protect\glsuppercase{\glsentryuseriii{#1}}}
  \newcommand*{\GLSaccessfmtuseriii}[3]{%
    \GLSfmtfield{#1}{#2}{#3}{useriii}%
  }
  \newcommand*{\glsaccessuseriv}[1]{\glsentryuseriv{#1}}
  \newcommand*{\glsaccessfmtuseriv}[3]{%
    \glsfmtfield{#1}{#2}{#3}{useriv}%
  }
  \newcommand*{\Glsaccessuseriv}[1]{\Glsentryuseriv{#1}}
  \newcommand*{\Glsaccessfmtuseriv}[3]{%
    \Glsfmtfield{#1}{#2}{#3}{useriv}%
  }
  \newcommand*{\GLSaccessuseriv}[1]{%
   \protect\glsuppercase{\glsentryuseriv{#1}}}
  \newcommand*{\GLSaccessfmtuseriv}[3]{%
    \GLSfmtfield{#1}{#2}{#3}{useriv}%
  }
  \newcommand*{\glsaccessuserv}[1]{\glsentryuserv{#1}}
  \newcommand*{\glsaccessfmtuserv}[3]{%
    \glsfmtfield{#1}{#2}{#3}{userv}%
  }
  \newcommand*{\Glsaccessuserv}[1]{\Glsentryuserv{#1}}
  \newcommand*{\Glsaccessfmtuserv}[3]{%
    \Glsfmtfield{#1}{#2}{#3}{userv}%
  }
  \newcommand*{\GLSaccessuserv}[1]{%
   \protect\glsuppercase{\glsentryuserv{#1}}}
  \newcommand*{\GLSaccessfmtuserv}[3]{%
    \GLSfmtfield{#1}{#2}{#3}{userv}%
  }
  \newcommand*{\glsaccessuservi}[1]{\glsentryuservi{#1}}
  \newcommand*{\glsaccessfmtuservi}[3]{%
    \glsfmtfield{#1}{#2}{#3}{uservi}%
  }
  \newcommand*{\Glsaccessuservi}[1]{\Glsentryuservi{#1}}
  \newcommand*{\Glsaccessfmtuservi}[3]{%
    \Glsfmtfield{#1}{#2}{#3}{uservi}%
  }
  \newcommand*{\GLSaccessuservi}[1]{%
   \protect\glsuppercase{\glsentryuservi{#1}}}
  \newcommand*{\GLSaccessfmtuservi}[3]{%
    \GLSfmtfield{#1}{#2}{#3}{uservi}%
  }
  \newcommand*{\@gls@initaccesskeys}{}
  \newcommand{\@gls@setup@default@access}{}
  \newcommand*{\glsxtrAccSuppAbbrSetNoLongAttrs}[1]{}
  \newcommand*{\glsxtrAccSuppAbbrSetFirstLongAttrs}[1]{}
  \newcommand*{\glsxtrAccSuppAbbrSetTextShortAttrs}[1]{}
  \newcommand*{\glsxtrAccSuppAbbrSetNameShortAttrs}[1]{}
  \newcommand*{\glsxtrAccSuppAbbrSetNameLongAttrs}[1]{}
}
\glsmfuaddmap{\glsaccessname}{\Glsaccessname}
\glsmfuaddmap{\glsaccessfmtname}{\Glsaccessfmtname}
\glsmfublocker{\GLSaccessname}
\glsmfublocker{\GLSaccessfmtname}
\glsmfuaddmap{\glsaccesstext}{\Glsaccesstext}
\glsmfuaddmap{\glsaccessfmttext}{\Glsaccessfmttext}
\glsmfublocker{\GLSaccesstext}
\glsmfublocker{\GLSaccessfmttext}
\glsmfuaddmap{\glsaccessplural}{\Glsaccessplural}
\glsmfuaddmap{\glsaccessfmtplural}{\Glsaccessfmtplural}
\glsmfublocker{\GLSaccessplural}
\glsmfublocker{\GLSaccessfmtplural}
\glsmfuaddmap{\glsaccessfirst}{\Glsaccessfirst}
\glsmfuaddmap{\glsaccessfmtfirst}{\Glsaccessfmtfirst}
\glsmfublocker{\GLSaccessfirst}
\glsmfublocker{\GLSaccessfmtfirst}
\glsmfuaddmap{\glsaccessfirstplural}{\Glsaccessfirstplural}
\glsmfuaddmap{\glsaccessfmtfirstplural}{\Glsaccessfmtfirstplural}
\glsmfublocker{\GLSaccessfirstplural}
\glsmfublocker{\GLSaccessfmtfirstplural}
\glsmfuaddmap{\glsaccesssymbol}{\Glsaccesssymbol}
\glsmfuaddmap{\glsaccessfmtsymbol}{\Glsaccessfmtsymbol}
\glsmfublocker{\GLSaccesssymbol}
\glsmfublocker{\GLSaccessfmtsymbol}
\glsmfuaddmap{\glsaccesssymbolplural}{\Glsaccesssymbolplural}
\glsmfuaddmap{\glsaccessfmtsymbolplural}{\Glsaccessfmtsymbolplural}
\glsmfublocker{\GLSaccesssymbolplural}
\glsmfublocker{\GLSaccessfmtsymbolplural}
\glsmfuaddmap{\glsaccessdesc}{\Glsaccessdesc}
\glsmfuaddmap{\glsaccessfmtdesc}{\Glsaccessfmtdesc}
\glsmfublocker{\GLSaccessdesc}
\glsmfublocker{\GLSaccessfmtdesc}
\glsmfuaddmap{\glsaccessdescplural}{\Glsaccessdescplural}
\glsmfuaddmap{\glsaccessfmtdescplural}{\Glsaccessfmtdescplural}
\glsmfublocker{\GLSaccessdescplural}
\glsmfublocker{\GLSaccessfmtdescplural}
\glsmfuaddmap{\glsaccessshort}{\Glsaccessshort}
\glsmfuaddmap{\glsaccessfmtshort}{\Glsaccessfmtshort}
\glsmfublocker{\GLSaccessshort}
\glsmfublocker{\GLSaccessfmtshort}
\glsmfuaddmap{\glsaccessshortpl}{\Glsaccessshortpl}
\glsmfuaddmap{\glsaccessfmtshortpl}{\Glsaccessfmtshortpl}
\glsmfublocker{\GLSaccessshortpl}
\glsmfublocker{\GLSaccessfmtshortpl}
\glsmfuaddmap{\glsaccesslong}{\Glsaccesslong}
\glsmfuaddmap{\glsaccessfmtlong}{\Glsaccessfmtlong}
\glsmfublocker{\GLSaccesslong}
\glsmfublocker{\GLSaccessfmtlong}
\glsmfuaddmap{\glsaccesslongpl}{\Glsaccesslongpl}
\glsmfuaddmap{\glsaccessfmtlongpl}{\Glsaccessfmtlongpl}
\glsmfublocker{\GLSaccesslongpl}
\glsmfublocker{\GLSaccessfmtlongpl}
\glsmfuaddmap{\glsaccessuseri}{\Glsaccessuseri}
\glsmfuaddmap{\glsaccessfmtuseri}{\Glsaccessfmtuseri}
\glsmfublocker{\GLSaccessuseri}
\glsmfublocker{\GLSaccessfmtuseri}
\glsmfuaddmap{\glsaccessuserii}{\Glsaccessuserii}
\glsmfuaddmap{\glsaccessfmtuserii}{\Glsaccessfmtuserii}
\glsmfublocker{\GLSaccessuserii}
\glsmfublocker{\GLSaccessfmtuserii}
\glsmfuaddmap{\glsaccessuseriii}{\Glsaccessuseriii}
\glsmfuaddmap{\glsaccessfmtuseriii}{\Glsaccessfmtuseriii}
\glsmfublocker{\GLSaccessuseriii}
\glsmfublocker{\GLSaccessfmtuseriii}
\glsmfuaddmap{\glsaccessuseriv}{\Glsaccessuseriv}
\glsmfuaddmap{\glsaccessfmtuseriv}{\Glsaccessfmtuseriv}
\glsmfublocker{\GLSaccessuseriv}
\glsmfublocker{\GLSaccessfmtuseriv}
\glsmfuaddmap{\glsaccessuserv}{\Glsaccessuserv}
\glsmfuaddmap{\glsaccessfmtuserv}{\Glsaccessfmtuserv}
\glsmfublocker{\GLSaccessuserv}
\glsmfublocker{\GLSaccessfmtuserv}
\glsmfuaddmap{\glsaccessuservi}{\Glsaccessuservi}
\glsmfuaddmap{\glsaccessfmtuservi}{\Glsaccessfmtuservi}
\glsmfublocker{\GLSaccessuservi}
\glsmfublocker{\GLSaccessfmtuservi}
\glsaddstoragekey{category}{general}{\glscategory}
\newcommand{\glsifcategory}[4]{%
 \ifglsfieldeq{#1}{category}{#2}{#3}{#4}%
}
\newcommand*{\glssetcategoryattribute}[3]{%
  \csdef{@glsxtr@categoryattr@@#1@#2}{#3}%
}
\newcommand*{\glssetcategoriesattribute}[3]{%
  \@for\@gls@thiscatlabel:=#1\do{%
    \csgdef{@glsxtr@categoryattr@@\@gls@thiscatlabel @#2}{#3}%
  }%
}
\newcommand*{\glssetcategoriesattributes}[3]{%
 {%
   \@for\@gls@thisattrlabel:=#2\do{%
     \glssetcategoriesattribute{#1}{\@gls@thisattrlabel}{#3}%
   }%
 }%
}
\newcommand*{\glssetcategoryattributes}[3]{%
  \@for\@gls@thisattrlabel:=#2\do{%
    \csgdef{@glsxtr@categoryattr@@#1@\@gls@thisattrlabel}{#3}%
  }%
}
\newcommand*{\glsgetcategoryattribute}[2]{%
  \csuse{@glsxtr@categoryattr@@#1@#2}%
}
\newcommand*{\glsunsetcategoryattribute}[2]{%
  \csundef{@glsxtr@categoryattr@@#1@#2}%
}
\newcommand*{\glshascategoryattribute}[4]{%
  \ifcsvoid{@glsxtr@categoryattr@@#1@#2}{#4}{#3}%
}
\newcommand*{\glssetattribute}[3]{%
  \glssetcategoryattribute{\glscategory{#1}}{#2}{#3}%
}
\newcommand*{\glsgetattribute}[2]{%
  \glsgetcategoryattribute{\glscategory{#1}}{#2}%
}
\newcommand*{\glshasattribute}[4]{%
  \ifglsentryexists{#1}%
  {\glshascategoryattribute{\glscategory{#1}}{#2}{#3}{#4}}%
  {#4}%
}
\newcommand{\glsifcategoryattribute}[5]{%
 \ifcsundef{@glsxtr@categoryattr@@#1@#2}%
 {#5}%
 {\ifcsstring{@glsxtr@categoryattr@@#1@#2}{#3}{#4}{#5}}%
}
\newcommand{\glsifattribute}[5]{%
  \ifglsentryexists{#1}%
  {\glsifcategoryattribute{\glscategory{#1}}{#2}{#3}{#4}{#5}}%
  {#5}%
}
\newcommand*{\@glsxtr@truevalue}{true}
\newcommand*{\glsifcategoryattributetrue}[4]{%
 \ifcsequal{@glsxtr@categoryattr@@#1@#2}%
 {@glsxtr@truevalue}%
 {#3}{#4}%
}
\newcommand*{\glsifattributetrue}[4]{%
 \ifcsundef{glo@\glsdetoklabel{#1}@category}%
 {#4}
 {\ifcsequal
  {@glsxtr@categoryattr@@\csname glo@\glsdetoklabel{#1}@category\endcsname @#2}%
  {@glsxtr@truevalue}%
  {#3}{#4}%
 }%
}
\newrobustcmd{\glsifcategoryattributehasitem}[5]{%
 \ifcsundef{@glsxtr@categoryattr@@#1@#2}%
 {#5}%
 {%
  \protected@edef\gls@tmp{%
    \noexpand\DTLifinlist{#3}{\csuse{@glsxtr@categoryattr@@#1@#2}}}%
  \gls@tmp{#4}{#5}%
 }%
}
\glssetcategoryattribute{general}{regular}{true}
\glssetcategoryattribute{acronym}{regular}{true}
\newcommand*{\glssetregularcategory}[1]{%
 \glssetcategoryattribute{#1}{regular}{true}%
}
\newcommand{\glsifregularcategory}[3]{%
  \glsifcategoryattribute{#1}{regular}{true}{#2}{#3}%
}
\newcommand{\glsifnotregularcategory}[3]{%
  \glsifcategoryattribute{#1}{regular}{false}{#2}{#3}%
}
\newcommand{\glsifregular}[3]{%
  \glsifregularcategory{\glscategory{#1}}{#2}{#3}%
}
\newcommand{\glsifnotregular}[3]{%
  \glsifnotregularcategory{\glscategory{#1}}{#2}{#3}%
}
\newcommand{\glsforeachincategory}[5][\@glo@types]{%
  \forallglossaries[#1]{#3}%
  {%
     \forglsentries[#3]{#4}%
     {%
       \glsifcategory{#4}{#2}{#5}{}%
     }%
  }%
}
\newcommand{\glsforeachwithattribute}[6][\@glo@types]{%
  \forallglossaries[#1]{#4}%
  {%
     \forglsentries[#4]{#5}%
     {%
       \glsifattribute{#5}{#2}{#3}{#6}{}%
     }%
  }%
}
\ifdef\newterm
{%
  \renewcommand*{\newterm}[2][]{%
    \newglossaryentry{#2}%
    {type={index},category=index,name={#2},%
     description={\glsxtrpostdescription\nopostdesc},#1}%
  }
  \glssetcategoryattribute{index}{regular}{true}
  \newcommand*{\glsxtrpostdescindex}{}
}
{}
\ifdef\printsymbols
{%
  \newcommand*{\glsxtrnewsymbol}[3][]{%
    \newglossaryentry{#2}{name={#3},sort={#2},type=symbols,category=symbol,#1}%
  }
  \glssetcategoryattribute{symbol}{regular}{true}
  \newcommand*{\glsxtrpostdescsymbol}{}
}
{}
\ifdef\printnumbers
{%
\ifdef\printnumbers
  \newcommand*{\glsxtrnewnumber}[3][]{%
    \newglossaryentry{#2}{name={#3},sort={#2},type=numbers,category=number,#1}%
  }
  \glssetcategoryattribute{number}{regular}{true}
  \newcommand*{\glsxtrpostdescnumber}{}
}
{}
\newcommand*{\glsxtrsetcategory}[2]{%
  \@for\@glsxtr@label:=#1\do
  {%
    \glsfieldxdef{\@glsxtr@label}{category}{#2}%
  }%
}
\newcommand*{\glsxtrsetcategoryforall}[2]{%
  \forallglossaries[#1]{\@glsxtr@type}{%
    \forglsentries[\@glsxtr@type]{\@glsxtr@label}%
    {%
      \glsfieldxdef{\@glsxtr@label}{category}{#2}%
    }%
  }%
}
\newcommand*{\glsxtrfieldtitlecase}[2]{%
  \expandafter\glsxtrfieldtitlecasecs\expandafter
    {\csname glo@\glsdetoklabel{#1}@#2\endcsname}%
}
\ifdef\glscapitalisewords
{
 \newcommand*{\glsxtrfieldtitlecasecs}[1]{%
  \expandafter\glscapitalisewords\expandafter{#1}}
}
{
 \newcommand*{\glsxtrfieldtitlecasecs}[1]{\xcapitalisewords{#1}}
}
\@ifpackageloaded{glossaries-accsupp}
{
  \renewcommand*{\glossentrydesc}[1]{%
    \glsdoifexistsorwarn{#1}%
    {%
      \glssetabbrvfmt{\glscategory{#1}}%
      \glshasattribute{#1}{glossdescfont}%
      {%
        \protected@edef\@glsxtr@attrval{\glsgetattribute{#1}{glossdescfont}}%
        \ifcsdef{\@glsxtr@attrval}%
        {%
          \letcs{\@glsxtr@glossdescfont}{\@glsxtr@attrval}%
        }%
        {%
          \GlossariesExtraWarning{Unknown control sequence name
          `\@glsxtr@attrval' supplied in glossdescfont attribute
          for entry `#1'. Ignoring}%
          \let\@glsxtr@glossdescfont\@firstofone
        }%
      }%
      {\let\@glsxtr@glossdescfont\@firstofone}%
      \glsifattribute{#1}{glossdesc}{firstuc}%
      {%
        \@glsxtr@glossdescfont{\Glsaccessdesc{#1}}%
      }%
      {%
        \glsifattribute{#1}{glossdesc}{title}%
        {%
          \@glsxtr@do@titlecaps@warn
          \glsdescriptionaccessdisplay
          {%
            \@glsxtr@glossdescfont{\glsxtrfieldtitlecase{#1}{desc}}%
          }%
          {#1}%
        }%
        {%
          \@glsxtr@glossdescfont{\glsaccessdesc{#1}}%
        }%
      }%
    }%
  }
}
{
  \renewcommand*{\glossentrydesc}[1]{%
    \glsdoifexistsorwarn{#1}%
    {%
      \glssetabbrvfmt{\glscategory{#1}}%
      \glshasattribute{#1}{glossdescfont}%
      {%
        \protected@edef\@glsxtr@attrval{\glsgetattribute{#1}{glossdescfont}}%
        \ifcsdef{\@glsxtr@attrval}%
        {%
          \letcs{\@glsxtr@glossdescfont}{\@glsxtr@attrval}%
        }%
        {%
          \GlossariesExtraWarning{Unknown control sequence name
          `\@glsxtr@attrval' supplied in glossdescfont attribute
          for entry `#1'. Ignoring}%
          \let\@glsxtr@glossdescfont\@firstofone
        }%
      }%
      {\let\@glsxtr@glossdescfont\@firstofone}%
      \glsifattribute{#1}{glossdesc}{firstuc}%
      {%
        \@glsxtr@glossdescfont{\Glsentrydesc{#1}}%
      }%
      {%
        \glsifattribute{#1}{glossdesc}{title}%
        {%
          \@glsxtr@do@titlecaps@warn
          \@glsxtr@glossdescfont{\glsxtrfieldtitlecase{#1}{desc}}%
        }%
        {%
          \@glsxtr@glossdescfont{\glsentrydesc{#1}}%
        }%
      }%
    }%
  }
}
\@ifpackageloaded{glossaries-accsupp}
{
  \renewcommand*{\glossentryname}[1]{%
    \@glsdoifexistsorwarn{#1}%
    {%
      \glssetabbrvfmt{\glscategory{#1}}%
      \glshasattribute{#1}{glossnamefont}%
      {%
        \protected@edef\@glsxtr@attrval{\glsgetattribute{#1}{glossnamefont}}%
        \ifcsdef{\@glsxtr@attrval}%
        {%
          \letcs{\@glsxtr@glossnamefont}{\@glsxtr@attrval}%
        }%
        {%
          \GlossariesExtraWarning{Unknown control sequence name
          `\@glsxtr@attrval' supplied in glossnamefont attribute
          for entry `#1'. Reverting to default \string\glsnamefont}%
          \let\@glsxtr@glossnamefont\glsnamefont
        }%
      }%
      {\let\@glsxtr@glossnamefont\glsnamefont}%
      \glsifattribute{#1}{glossname}{firstuc}%
      {%
        \glsnameaccessdisplay
        {%
          \@glsxtr@glossnamefont{\Glsentryname{#1}}%
        }%
        {#1}%
      }%
      {%
        \glsifattribute{#1}{glossname}{title}%
        {%
          \@glsxtr@do@titlecaps@warn
          \glsnameaccessdisplay
          {%
            \@glsxtr@glossnamefont{\glsxtrfieldtitlecase{#1}{name}}%
          }%
          {#1}%
        }%
        {%
          \glsifattribute{#1}{glossname}{uc}%
          {%
            \glsnameaccessdisplay
            {%
               \letcs{\glo@name}{glo@\glsdetoklabel{#1}@name}%
               \@glsxtr@glossnamefont{\glsuppercase{\glo@name}}%
            }%
            {#1}%
          }%
          {%
            \letcs{\glo@name}{glo@\glsdetoklabel{#1}@name}%
            \glsnameaccessdisplay
            {%
              \expandafter\@glsxtr@glossnamefont\expandafter{\glo@name}%
            }%
            {#1}%
          }%
        }%
      }%
      \glsxtrpostnamehook{#1}%
    }%
  }
}
{
  \renewcommand*{\glossentryname}[1]{%
    \@glsdoifexistsorwarn{#1}%
    {%
      \glssetabbrvfmt{\glscategory{#1}}%
      \glshasattribute{#1}{glossnamefont}%
      {%
        \protected@edef\@glsxtr@attrval{\glsgetattribute{#1}{glossnamefont}}%
        \ifcsdef{\@glsxtr@attrval}%
        {%
          \letcs{\@glsxtr@glossnamefont}{\@glsxtr@attrval}%
        }%
        {%
          \GlossariesExtraWarning{Unknown control sequence name
          `\@glsxtr@attrval' supplied in glossnamefont attribute
          for entry `#1'. Reverting to default \string\glsnamefont}%
          \let\@glsxtr@glossnamefont\glsnamefont
        }%
      }%
      {\let\@glsxtr@glossnamefont\glsnamefont}%
      \glsifattribute{#1}{glossname}{firstuc}%
      {%
        \@glsxtr@glossnamefont{\Glsentryname{#1}}%
      }%
      {%
        \glsifattribute{#1}{glossname}{title}%
        {%
          \@glsxtr@do@titlecaps@warn
          \@glsxtr@glossnamefont{\glsxtrfieldtitlecase{#1}{name}}%
        }%
        {%
          \glsifattribute{#1}{glossname}{uc}%
          {%
            \letcs{\glo@name}{glo@\glsdetoklabel{#1}@name}%
            \@glsxtr@glossnamefont{\glsuppercase{\glo@name}}%
          }%
          {%
            \letcs{\glo@name}{glo@\glsdetoklabel{#1}@name}%
            \expandafter\@glsxtr@glossnamefont\expandafter{\glo@name}%
          }%
        }%
      }%
      \glsxtrpostnamehook{#1}%
    }%
  }
}
\@ifpackageloaded{glossaries-accsupp}
{
  \renewcommand*{\Glossentryname}[1]{%
    \@glsdoifexistsorwarn{#1}%
    {%
      \glssetabbrvfmt{\glscategory{#1}}%
      \glshasattribute{#1}{glossnamefont}%
      {%
        \protected@edef\@glsxtr@attrval{\glsgetattribute{#1}{glossnamefont}}%
        \ifcsdef{\@glsxtr@attrval}%
        {%
          \letcs{\@glsxtr@glossnamefont}{\@glsxtr@attrval}%
        }%
        {%
          \GlossariesExtraWarning{Unknown control sequence name
          `\@glsxtr@attrval' supplied in glossnamefont attribute
          for entry `#1'. Reverting to default \string\glsnamefont}%
          \let\@glsxtr@glossnamefont\glsnamefont
        }%
      }%
      {\let\@glsxtr@glossnamefont\glsnamefont}%
      \glsnameaccessdisplay
      {%
        \@glsxtr@glossnamefont{\Glsentryname{#1}}%
      }%
      {#1}%
      \glsxtrpostnamehook{#1}%
    }%
  }
}
{
  \renewcommand*{\Glossentryname}[1]{%
    \@glsdoifexistsorwarn{#1}%
    {%
      \glssetabbrvfmt{\glscategory{#1}}%
      \glshasattribute{#1}{glossnamefont}%
      {%
        \protected@edef\@glsxtr@attrval{\glsgetattribute{#1}{glossnamefont}}%
        \ifcsdef{\@glsxtr@attrval}%
        {%
          \letcs{\@glsxtr@glossnamefont}{\@glsxtr@attrval}%
        }%
        {%
          \GlossariesExtraWarning{Unknown control sequence name
          `\@glsxtr@attrval' supplied in glossnamefont attribute
          for entry `#1'. Reverting to default \string\glsnamefont}%
          \let\@glsxtr@glossnamefont\glsnamefont
        }%
      }%
      {\let\@glsxtr@glossnamefont\glsnamefont}%
      \@glsxtr@glossnamefont{\Glsentryname{#1}}%
      \glsxtrpostnamehook{#1}%
    }%
  }
}
\newcommand*{\glsxtrpostnamehook}[1]{%
  \let\@glsnumberformat\@glsxtr@defaultnumberformat
  \glsxtrdoautoindexname{#1}{indexname}%
  \glsextrapostnamehook{#1}%
  \csuse{glsxtrpostname\glscategory{#1}}%
}
\newcommand*{\glsextrapostnamehook}[1]{}%
\newcommand*{\glsdefpostname}[2]{%
  \csdef{glsxtrpostname#1}{#2}%
}
\@ifpackageloaded{glossaries-accsupp}
{
  \newcommand*{\glsxtr@setaccessdisplay}[1]{%
     \ifcsdef{gls#1accessdisplay}%
     {\letcs\@glsxtr@accessdisplay{gls#1accessdisplay}}%
     {%
       \protected@edef\@gls@thisval{#1}%
       \@for\@gls@map:=\@gls@keymap\do{%
        \protected@edef\@this@key{\expandafter\@secondoftwo\@gls@map}%
        \ifdefequal{\@this@key}{\@gls@thisval}%
        {%
          \protected@edef\@gls@thisval{\expandafter\@firstoftwo\@gls@map}%
          \@endfortrue
        }%
        {}%
       }%
       \ifcsdef{gls\@gls@thisval accessdisplay}%
       {\letcs\@glsxtr@accessdisplay{gls\@gls@thisval accessdisplay}}%
       {\let\@glsxtr@accessdisplay\@firstoftwo}%
     }%
  }
}
{%
  \newcommand*{\glsxtr@setaccessdisplay}[1]{%
   \let\@glsxtr@accessdisplay\@firstoftwo}
}
\newrobustcmd*{\glossentrynameother}[2]{%
  \@glsdoifexistsorwarn{#1}%
  {%
    \glsxtr@setaccessdisplay{#2}%
    \glssetabbrvfmt{\glscategory{#1}}%
    \glshasattribute{#1}{glossnamefont}%
    {%
      \protected@edef\@glsxtr@attrval{\glsgetattribute{#1}{glossnamefont}}%
      \ifcsdef{\@glsxtr@attrval}%
      {%
        \letcs{\@glsxtr@glossnamefont}{\@glsxtr@attrval}%
      }%
      {%
        \GlossariesExtraWarning{Unknown control sequence name
        `\@glsxtr@attrval' supplied in glossnamefont attribute
        for entry `#1'. Reverting to default \string\glsnamefont}%
        \let\@glsxtr@glossnamefont\glsnamefont
      }%
    }%
    {\let\@glsxtr@glossnamefont\glsnamefont}%
    \glsifattribute{#1}{glossname}{firstuc}%
    {%
      \@glsxtr@accessdisplay
      {\@glsxtr@glossnamefont{\@Gls@entry@field{#1}{#2}}}%
      {#1}%
    }%
    {%
      \glsifattribute{#1}{glossname}{title}%
      {%
        \@glsxtr@do@titlecaps@warn
        \@glsxtr@accessdisplay
        {\@glsxtr@glossnamefont{\glsxtrfieldtitlecase{#1}{#2}}}%
        {#1}%
      }%
      {%
        \glsifattribute{#1}{glossname}{uc}%
        {%
          \letcs{\glo@name}{glo@\glsdetoklabel{#1}@#2}%
          \@glsxtr@accessdisplay
          {\@glsxtr@glossnamefont{\glsuppercase{\glo@name}}}%
          {#1}%
        }%
        {%
          \letcs{\glo@name}{glo@\glsdetoklabel{#1}@#2}%
          \@glsxtr@accessdisplay
          {\expandafter\@glsxtr@glossnamefont\expandafter{\glo@name}}%
          {#1}%
        }%
      }%
    }%
    \glsxtrpostnamehook{#1}%
  }%
}
\newif\if@glsxtr@format@override
\@glsxtr@format@overridefalse
\@ifpackageloaded{hyperref}
{
  \ifHy@hyperindex
    \newcommand*{\GlsXtrEnableIndexFormatOverride}{%
      \@glsxtr@format@overridetrue
      \appto\theindex{\let\glshypernumber\@firstofone}%
    }
  \else
    \newcommand*{\GlsXtrEnableIndexFormatOverride}{%
      \@glsxtr@format@overridetrue
      \appto\theindex{\let\glshypernumber\hyperpage}%
    }
  \fi
}
{
  \newcommand*{\GlsXtrEnableIndexFormatOverride}{%
    \@glsxtr@format@overridetrue
  }
}
\@onlypreamble\GlsXtrEnableIndexFormatOverride
\newcommand*{\glsxtrdoautoindexname}[2]{%
  \glshasattribute{#1}{#2}%
  {%
    \@glsxtr@autoindex@setname{#1}%
    \protected@edef\@glsxtr@attrval{\glsgetattribute{#1}{#2}}%
    \if@glsxtr@format@override
      \ifx\@glsnumberformat\@glsxtr@defaultnumberformat
      \else
        \let\@glsxtr@attrval\@glsnumberformat
      \fi
    \fi
    \ifdefstring{\@glsxtr@attrval}{true}%
    {}%
    {\protected@eappto\@glo@name{\@glsxtr@autoindex@encap\@glsxtr@attrval}}%
    \expandafter\glsxtrautoindex\expandafter{\@glo@name}%
  }%
  {}%
}
\newcommand*{\glsxtrautoindex}{\index}
\newcommand{\glsxtrautoindexesc}{%
  \@gls@checkmkidxchars\@glo@sort
  \@glsxtr@autoindex@doextra@esc\@glo@sort
}
\newcommand*{\@glsxtr@autoindex@setname}[1]{%
  \protected@edef\@glo@name{\glsxtrautoindexentry{#1}}%
  \glsxtrautoindexassignsort{\@glo@sort}{#1}%
  \glsxtrautoindexesc
  \epreto\@glo@name{\@glo@sort\@glsxtr@autoindex@at}%
}
\newcommand*{\glsxtrautoindexentry}[1]{\string\glsentryname{#1}}
\newcommand*{\glsxtrautoindexassignsort}[2]{%
  \glsletentryfield{#1}{#2}{sort}%
}
\newcommand*{\@glsxtr@autoindex@doextra@esc}[1]{%
  \ifx\@glsxtr@autoindex@esc\@gls@quotechar
  \else
    \def\@gls@checkedmkidx{}%
    \edef\@@glsxtr@checkspch{%
      \noexpand\@glsxtr@autoindex@escquote\expandonce{#1}%
        \noexpand\@empty\@glsxtr@autoindex@esc\noexpand\@nnil
        \@glsxtr@autoindex@esc\noexpand\@empty\noexpand\@glsxtr@endescspch}%
    \@@glsxtr@checkspch
    \let#1\@gls@checkedmkidx\relax
  \fi
  \ifx\@glsxtr@autoindex@at\@gls@actualchar
  \else
    \def\@gls@checkedmkidx{}%
    \edef\@@glsxtr@checkspch{%
      \noexpand\@glsxtr@autoindex@escat\expandonce{#1}%
        \noexpand\@empty\@glsxtr@autoindex@at\noexpand\@nnil
        \@glsxtr@autoindex@at\noexpand\@empty\noexpand\@glsxtr@endescspch}%
    \@@glsxtr@checkspch
    \let#1\@gls@checkedmkidx\relax
  \fi
  \ifx\@glsxtr@autoindex@level\@gls@levelchar
  \else
    \def\@gls@checkedmkidx{}%
    \edef\@@glsxtr@checkspch{%
      \noexpand\@glsxtr@autoindex@esclevel\expandonce{#1}%
        \noexpand\@empty\@glsxtr@autoindex@level\noexpand\@nnil
        \@glsxtr@autoindex@level\noexpand\@empty\noexpand\@glsxtr@endescspch}%
    \@@glsxtr@checkspch
    \let#1\@gls@checkedmkidx\relax
  \fi
  \ifx\@glsxtr@autoindex@encap\@gls@encapchar
  \else
    \def\@gls@checkedmkidx{}%
    \edef\@@glsxtr@checkspch{%
      \noexpand\@glsxtr@autoindex@escencap\expandonce{#1}%
        \noexpand\@empty\@glsxtr@autoindex@encap\noexpand\@nnil
        \@glsxtr@autoindex@encap\noexpand\@empty\noexpand\@glsxtr@endescspch}%
    \@@glsxtr@checkspch
    \let#1\@gls@checkedmkidx\relax
  \fi
}
\newcommand*{\@glsxtr@autoindex@at}{}
\newcommand*{\GlsXtrSetActualChar}[1]{%
  \gdef\@glsxtr@autoindex@at{#1}%
  \def\@glsxtr@autoindex@escat##1#1##2#1##3\@glsxtr@endescspch{%
    \@@glsxtr@autoindex@escspch{#1}{\@glsxtr@autoindex@escat}{##1}{##2}{##3}%
  }%
}
\@onlypreamble\GlsXtrSetActualChar
\makeatother
\GlsXtrSetActualChar{@}
\makeatletter
\newcommand*{\@glsxtr@autoindex@encap}{}
\newcommand*{\GlsXtrSetEncapChar}[1]{%
  \gdef\@glsxtr@autoindex@encap{#1}%
  \def\@glsxtr@autoindex@escencap##1#1##2#1##3\@glsxtr@endescspch{%
    \@@glsxtr@autoindex@escspch{#1}{\@glsxtr@autoindex@escencap}{##1}{##2}{##3}%
  }%
}
\GlsXtrSetEncapChar{|}
\@onlypreamble\GlsXtrSetEncapChar
\newcommand*{\@glsxtr@autoindex@level}{}
\newcommand*{\GlsXtrSetLevelChar}[1]{%
  \gdef\@glsxtr@autoindex@level{#1}%
  \def\@glsxtr@autoindex@esclevel##1#1##2#1##3\@glsxtr@endescspch{%
    \@@glsxtr@autoindex@escspch{#1}{\@glsxtr@autoindex@esclevel}{##1}{##2}{##3}%
  }%
}
\GlsXtrSetLevelChar{!}
\@onlypreamble\GlsXtrSetLevelChar
\newcommand*{\@glsxtr@autoindex@esc}{"}
\newcommand*{\GlsXtrSetEscChar}[1]{%
  \gdef\@glsxtr@autoindex@esc{#1}%
  \def\@glsxtr@autoindex@escquote##1#1##2#1##3\@glsxtr@endescspch{%
    \@@glsxtr@autoindex@escspch{#1}{\@glsxtr@autoindex@escquote}{##1}{##2}{##3}%
  }%
}
\GlsXtrSetEscChar{"}
\@onlypreamble\GlsXtrSetEscChar
\ifdef\actualchar
 {\expandafter\GlsXtrSetActualChar\expandafter{\actualchar}}
 {}
\ifdef\quotechar
 {\expandafter\GlsXtrSetEscChar\expandafter{\quotechar}}
 {}
\ifdef\levelchar
 {\expandafter\GlsXtrSetLevelChar\expandafter{\levelchar}}
 {}
\ifdef\encapchar
 {\expandafter\GlsXtrSetEncapChar\expandafter{\encapchar}}
 {}
\def\@glsxtr@gobbleto@endescspch#1\@glsxtr@endescspch{}
\newcommand*{\@@glsxtr@autoindex@escspch}[5]{%
  \@gls@tmpb=\expandafter{\@gls@checkedmkidx}%
  \toks@={#3}%
  \ifx\@nnil#3\relax
    \def\@@glsxtr@checkspch{\@glsxtr@gobbleto@endescspch#5\@glsxtr@endescspch}%
  \else
    \ifx\@nnil#4\relax
      \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@}%
     \def\@@glsxtr@checkspch{\@glsxtr@gobbleto@endescspch
        #4#5\@glsxtr@endescspch}%
    \else
      \edef\@gls@checkedmkidx{\the\@gls@tmpb\the\toks@
       \@glsxtr@autoindex@esc#1}%
      \def\@@glsxtr@checkspch{#2#5#1\@nnil#1\@glsxtr@endescspch}%
    \fi
  \fi
  \@@glsxtr@checkspch
}
\renewcommand*{\Glossentrydesc}[1]{%
  \glsdoifexistsorwarn{#1}%
  {%
    \glssetabbrvfmt{\glscategory{#1}}%
    \Glsaccessdesc{#1}%
  }%
}
\renewcommand*{\glossentrysymbol}[1]{%
  \glstexorpdfstring{\@glossentrysymbol{#1}}{\glsentrypdfsymbol{#1}}%
}
\newcommand{\glsentrypdfsymbol}[1]{\glsentrysymbol{#1}}
\newrobustcmd*{\@glossentrysymbol}[1]{%
  \glsdoifexistsorwarn{#1}%
  {%
    \begingroup
      \glssetabbrvfmt{\glscategory{#1}}%
      \glshasattribute{#1}{glosssymbolfont}%
      {%
        \protected@edef\@glsxtr@attrval{\glsgetattribute{#1}{glosssymbolfont}}%
        \ifcsdef{\@glsxtr@attrval}%
        {%
          \letcs{\@glsxtr@glosssymbolfont}{\@glsxtr@attrval}%
        }%
        {%
          \GlossariesExtraWarning{Unknown control sequence name
          `\@glsxtr@attrval' supplied in glosssymbolfont attribute
          for entry `#1'. Ignoring}%
          \let\@glsxtr@glosssymbolfont\@firstofone
        }%
      }%
      {\let\@glsxtr@glosssymbolfont\@firstofone}%
      \@glsxtr@glosssymbolfont{\glsaccesssymbol{#1}}%
    \endgroup
  }%
}
\renewcommand*{\Glossentrysymbol}[1]{%
  \glsdoifexistsorwarn{#1}%
  {%
    \glssetabbrvfmt{\glscategory{#1}}%
    \Glsaccesssymbol{#1}%
  }%
}
\newcommand*{\GlsXtrEnableInitialTagging}{%
  \@ifstar\s@glsxtr@enabletagging\@glsxtr@enabletagging
}
\@onlypreamble\GlsXtrEnableInitialTagging
\newcommand*{\s@glsxtr@enabletagging}[2]{%
  \undef#2%
  \@glsxtr@enabletagging{#1}{#2}%
}
\newcommand*{\@glsxtr@enabletagging}[2]{%
  \@for\@glsxtr@cat:=#1\do
  {%
    \ifdefempty\@glsxtr@cat
    {}%
    {\glssetcategoryattribute{\@glsxtr@cat}{tagging}{true}}%
  }%
  \newrobustcmd*#2[1]{##1}%
  \def\@glsxtr@taggingcs{#2}%
  \renewcommand*\@glsxtr@activate@initialtagging{%
    \let#2\@glsxtr@tag
  }%
  \ifundef\@gls@preglossaryhook
  {\GlossariesExtraWarning{Initial tagging requires at least
    glossaries.sty v4.19 to work correctly}}%
  {}%
}
\ifundef\mfu@checkword@do
{
  \newcommand*{\mfu@checkword@do}[1]{%
   \ifdefstring{\mfu@checkword@arg}{#1}%
   {%
     \let\@mfu@domakefirstuc\@firstofone
     \listbreak
   }%
   {}%
  }
  \ifundef\mfu@checkword
  {
    \newcommand{\@glsxtr@do@titlecaps@warn}{%
     \GlossariesExtraWarning{mfirstuc.sty too old. Title Caps
      support not available}%
      \let\@glsxtr@do@titlecaps@warn\relax
    }
  }
  {
    \renewcommand*{\mfu@checkword}[1]{%
      \def\mfu@checkword@arg{#1}%
      \let\@mfu@domakefirstuc\makefirstuc
      \forlistloop\mfu@checkword@do\@mfu@nocaplist
    }
  }
}
{}% no patch required
\newcommand*{\@glsxtr@do@titlecaps@warn}{}
\newcommand*\@glsxtr@activate@initialtagging{}
\newrobustcmd*{\@glsxtr@tag}[1]{%
  \glsifattribute{\glscurrententrylabel}{tagging}{true}%
  {\glsxtrtagfont{#1}}{#1}%
}
\newcommand*{\glsxtrtagfont}[1]{\underline{#1}}
\ifdef\@gls@preglossaryhook
{
  \renewcommand*{\@gls@preglossaryhook}{%
    \@glsxtr@activate@initialtagging
    \ifundef\@glsxtr@org@postdescription
    {%
      \let\@glsxtr@org@postdescription\glspostdescription
      \renewcommand*{\glspostdescription}{%
        \ifglsentryexists{\glscurrententrylabel}%
        {%
          \glsxtrpostdescription
          \@glsxtr@org@postdescription
        }%
        {}%
      }%
    }%
    {}%
    \glossxtrsetpopts
  }%
}
{}
\newcommand*{\glsxtrpostdescription}{%
  \csuse{glsxtrpostdesc\glscategory{\glscurrententrylabel}}%
}
\newcommand*{\glsxtrpostdescgeneral}{}
\newcommand*{\glsxtrpostdescterm}{}
\newcommand*{\glsxtrpostdescacronym}{}
\newcommand*{\glsxtrpostdescabbreviation}{}
\newcommand*{\glsdefpostdesc}[2]{%
  \csdef{glsxtrpostdesc#1}{#2}%
}
\renewcommand*{\glspostlinkhook}{%
 \ifglsentryexists{\glslabel}{\glsxtrpostlinkhook}{}%
}
\newcommand*{\glsxtrpostlinkhook}{%
 \glsxtrdiscardperiod{\glslabel}%
 {\glsxtrpostlinkendsentence}%
 {\glsxtrifcustomdiscardperiod
  {\glsxtrifperiod{\glsxtrpostlinkendsentence}{\glsxtrpostlink}}%
  {\glsxtrpostlink}%
 }%
}
\newcommand*{\glsxtrifcustomdiscardperiod}[2]{#2}
\newcommand*{\glsxtrpostlink}{%
 \csuse{glsxtrpostlink\glscategory{\glslabel}}%
}
\newcommand*{\glsdefpostlink}[2]{%
  \ifthenelse{\equal{#1}{}}%
  {\PackageError{glossaries-extra}
    {Invalid empty category label in \string\glsdefpostlink}{}}%
  {\csdef{glsxtrpostlink#1}{#2}}%
}
\newcommand*{\glspretopostlink}[2]{%
  \ifthenelse{\equal{#1}{}}%
  {\PackageError{glossaries-extra}
    {Invalid empty category label in \string\glspretopostlink}{}}%
  {%
    \ifcsundef{glsxtrpostlink#1}
    {\csdef{glsxtrpostlink#1}{#2}}%
    {\cspreto{glsxtrpostlink#1}{#2}}%
  }%
}
\newcommand*{\glsapptopostlink}[2]{%
  \ifthenelse{\equal{#1}{}}%
  {\PackageError{glossaries-extra}
    {Invalid empty category label in \string\glspretopostlink}{}}%
  {%
    \ifcsundef{glsxtrpostlink#1}
    {\csdef{glsxtrpostlink#1}{#2}}%
    {\csappto{glsxtrpostlink#1}{#2}}%
  }%
}
\newcommand*{\glsxtrpostlinkendsentence}{%
 \ifcsdef{glsxtrpostlink\glscategory{\glslabel}}
 {%
   \csuse{glsxtrpostlink\glscategory{\glslabel}}%
   .\spacefactor\sfcode`\. \relax
 }%
 {%
   \spacefactor\sfcode`\. \relax
 }%
}
\newcommand*{\glsxtrpostlinkAddDescOnFirstUse}{%
  \glsxtrifwasfirstuse{\glsxtrgenentrytextfmt{ }%
   \glsxtrparen{\glsaccessfmtdesc{}{\glsxtrgenentrytextfmt}{\glslabel}}}{}%
}
\newcommand*{\glsxtrpostlinkAddSymbolOnFirstUse}{%
  \glsxtrifwasfirstuse
  {%
    \ifglshassymbol{\glslabel}%
    {\glsxtrgenentrytextfmt{ }%
     \glsxtrparen{\glsaccessfmtsymbol{}{\glsxtrgenentrytextfmt}{\glslabel}}}%
    {}%
  }%
  {}%
}
\newcommand*{\glsxtrpostlinkAddSymbolDescOnFirstUse}{%
  \glsxtrifwasfirstuse
  {%
    \glsxtrgenentrytextfmt{ }\glsxtrparen
    {%
      \ifglshassymbol{\glslabel}%
      {\glsaccessfmtsymbol{}{\glsxtrgenentrytextfmt}{\glslabel}%
       \expandafter\glsxtrgenentrytextfmt\expandafter{\glsxtrpostlinkSymbolDescSep}}%
      {}%
      \glsaccessfmtdesc{}{\glsxtrgenentrytextfmt}{\glslabel}%
    }%
  }%
  {}%
}
\newcommand*{\glsxtrpostlinkSymbolDescSep}{, }
\newcommand*{\glsxtrdiscardperiodretainfirstuse}[3]{%
 \glsxtrifwassubsequentorshort{\glsxtrifperiod{#2}{#3}}{#3}%
}
\newcommand*{\glsxtrdiscardperiod}[3]{%
 \glsifattribute{#1}{retainfirstuseperiod}{true}%
 {\glsxtrdiscardperiodretainfirstuse{#1}{#2}{#3}}%
 {%
   \glsifattribute{#1}{discardperiod}{true}%
   {%
     \glsifplural
     {%
       \glsifattribute{#1}{pluraldiscardperiod}{true}%
       {\glsxtrifperiod{#2}{#3}}%
       {#3}%
     }%
     {%
       \glsxtrifperiod{#2}{#3}%
     }%
   }%
   {#3}%
 }%
}
\newcommand*{\glsxtrifperiod}[1]{\new@ifnextchar.{\@firstoftwo{#1}}}
\newcommand*{\glsxtr@punclist}{.,:;?!}
\newcommand*{\glsxtraddpunctuationmark}[1]{\appto\glsxtr@punclist{#1}}
\newcommand*{\glsxtrsetpunctuationmarks}[1]{\def\glsxtr@punclist{#1}}
\newcommand*{\glsxtrifnextpunc}[2]{%
  \def\reserved@a{#1}%
  \def\reserved@b{#2}%
  \futurelet\@glspunc@token\glsxtr@ifnextpunc
}
\newcommand*{\glsxtr@ifnextpunc}{%
 \glsxtr@ifpunctoken{\@glspunc@token}{\let\reserved@b\reserved@a}{}%
 \reserved@b
}
\newcommand*{\glsxtr@ifpunctoken}[1]{%
  \expandafter\@glsxtr@ifpunctoken\expandafter#1\glsxtr@punclist\@nnil
}
\def\@glsxtr@ifpunctoken#1#2{%
  \let\reserved@d=#2%
  \ifx\reserved@d\@nnil
    \let\glsxtr@next\@glsxtr@notfoundinlist
  \else
    \ifx#1\reserved@d
     \let\glsxtr@next\@glsxtr@foundinlist
    \else
     \let\glsxtr@next\@glsxtr@ifpunctoken
    \fi
  \fi
  \glsxtr@next#1%
}
\def\@glsxtr@foundinlist#1\@nnil{\@firstoftwo}
\def\@glsxtr@notfoundinlist#1{\@secondoftwo}
\newrobustcmd{\glsxtrdopostpunc}[1]{%
  \glsxtrifnextpunc{\@glsxtr@swaptwo{#1}}{#1}%
}
\newcommand{\@glsxtr@swaptwo}[2]{#2#1}
\define@key{glsxtrabbrv}{category}{%
 \protected@edef\glscategorylabel{#1}%
}
\define@key{glsxtrabbrvpl}{shortplural}{%
  \def\@gls@shortpl{#1}%
}
\define@key{glsxtrabbrvpl}{longplural}{%
  \def\@gls@longpl{#1}%
}
\newtoks\glsshortpltok
\newtoks\glslongpltok
\newcommand*{\@glsxtr@insertdots}[2]{%
  \def#1{}%
  \@glsxtr@insert@dots#1#2\@nnil
}
\newcommand*{\@glsxtr@insert@dots}[2]{%
  \ifx\@nnil#2\relax
   \let\@glsxtr@insert@dots@next\@gobble
  \else
   \ifx\relax#2\relax
   \else
     \appto#1{#2.}%
   \fi
   \let\@glsxtr@insert@dots@next\@glsxtr@insert@dots
  \fi
  \@glsxtr@insert@dots@next#1%
}
\newcommand*{\glsxtrwordsep}{\glsxtrgenentrytextfmt{ }}
\newcommand*{\glsxtrwordsephyphen}{\glsxtrgenentrytextfmt{-}}
\newcommand*{\glsxtrword}[1]{\glsxtrgenentrytextfmt{#1}}
\newcommand*{\@glsxtr@markwordseps}[2]{%
  \def#1{}%
  \@glsxtr@mark@wordseps#1#2 \@nnil
}
\def\@glsxtr@mark@wordseps#1#2 #3{%
  \ifdefempty{#1}%
  {\def#1{\protect\glsxtrword{#2}}}%
  {\appto#1{\protect\glsxtrwordsep\protect\glsxtrword{#2}}}%
  \ifx\@nnil#3\relax
   \let\@glsxtr@mark@wordseps@next\relax
  \else
   \def\@glsxtr@mark@wordseps@next{%
     \@glsxtr@mark@wordseps#1#3}%
  \fi
  \@glsxtr@mark@wordseps@next
}
\newcommand*{\newabbreviation}[4][]{%
  \glsxtr@newabbreviation{#1}{#2}{#3}{#4}%
}
\newcommand*{\glsxtr@newabbreviation}[4]{%
  \glskeylisttok{#1}%
  \glslabeltok{#2}%
  \glsshorttok{#3}%
  \glslongtok{#4}%
  \def\glsxtrorgshort{#3}%
  \def\glsxtrorglong{#4}%
  \def\glsxtrorgkeylist{#1}%
  \def\ExtraCustomAbbreviationFields{}%
  \@gls@initaccesskeys
  \def\glscategorylabel{abbreviation}%
  \setkeys*{glsxtrabbrv}{#1}%
  \let\@glsxtrabbrv@rmkeys\XKV@rm
  \ifcsdef{@glsabbrv@current@\glscategorylabel}%
  {%
    \let\@glsxtr@orgwarndep\GlsXtrWarnDeprecatedAbbrStyle
    \let\GlsXtrWarnDeprecatedAbbrStyle\@gobbletwo
    \glsxtr@applyabbrvstyle{\csname @glsabbrv@current@\glscategorylabel\endcsname}%
    \let\GlsXtrWarnDeprecatedAbbrStyle\@glsxtr@orgwarndep
  }%
  {%
    \glsxtr@applyabbrvstyle{\@glsabbrv@current@abbreviation}%
  }%
  \def\@gls@longpl{#4\glspluralsuffix}%
  \glsifcategoryattribute{\glscategorylabel}{markwords}{true}%
  {%
    \@glsxtr@markwordseps\@gls@long{#4}%
    \expandafter\glslongtok\expandafter{\@gls@long}%
    \glsexclapplyinnerfmtfield{\the\glslabeltok}{desc}%
  }%
  {}%
  \let\@glsxtr@if@markshortwords\@secondoftwo
  \glsifcategoryattribute{\glscategorylabel}{markshortwords}{true}%
  {%
    \let\@glsxtr@if@markshortwords\@firstoftwo
    \def\@gls@short{#3}%
  }%
  {%
    \glsifcategoryattribute{\glscategorylabel}{insertdots}{true}%
    {%
      \@glsxtr@insertdots\@gls@short{#3}%
      \appto\@gls@short{\@}%
    }%
    {\def\@gls@short{#3}}%
  }%
  \glsifcategoryattribute{\glscategorylabel}{aposplural}{true}%
  {%
    \expandafter\def\expandafter\@gls@shortpl\expandafter{\@gls@short
      '\abbrvpluralsuffix}%
  }%
  {%
    \glsifcategoryattribute{\glscategorylabel}{noshortplural}{true}%
    {%
      \let\@gls@shortpl\@gls@short
    }%
    {%
      \expandafter\def\expandafter\@gls@shortpl\expandafter{\@gls@short
        \abbrvpluralsuffix}%
    }%
  }%
  \@glsxtr@if@markshortwords
  {%
    \expandafter\@glsxtr@markwordseps\expandafter\@gls@short
     \expandafter{\@gls@short}%
  }%
  {}%
  \expandafter\glsshorttok\expandafter{\@gls@short}%
  \glsxtrnewabbrevpresetkeyhook{#1}{#2}{#3}%
  \let\@gls@default@shortpl\@gls@shortpl
  \let\XKV@rm\@glsxtrabbrv@rmkeys
  \setrmkeys*{glsxtrabbrvpl}%
  \expandafter\glskeylisttok\expandafter{\XKV@rm}%
  \let\@gls@org@longpl\@gls@longpl
  \let\@gls@org@shortpl\@gls@shortpl
  \glsifcategoryattribute{\glscategorylabel}{markwords}{true}%
  {%
    \expandafter\@glsxtr@markwordseps\expandafter\@gls@longpl\expandafter
     {\@gls@longpl}%
  }%
  {}%
  \@glsxtr@if@markshortwords
  {%
    \expandafter\@glsxtr@markwordseps\expandafter\@gls@shortpl
     \expandafter{\@gls@shortpl}%
  }%
  {%
    \ifx\@gls@default@shortpl\@gls@shortpl
    \else
      \glsifcategoryattribute{\glscategorylabel}{insertdots}{true}%
      {%
        \expandafter\@glsxtr@insertdots\expandafter\@gls@shortpl
          \expandafter{\@gls@shortpl}%
        \appto\@gls@shortpl{\@}%
      }%
      {}%
    \fi
  }%
  \expandafter\glsshortpltok\expandafter{\@gls@shortpl}%
  \expandafter\glslongpltok\expandafter{\@gls@longpl}%
  \@gls@setup@default@access
  \newabbreviationhook
  \protected@edef\@do@newglossaryentry{%
    \noexpand\newglossaryentry{\the\glslabeltok}%
    {%
      type={\glsxtrabbrvtype},%
      category={\glscategorylabel},%
      short={\the\glsshorttok},%
      shortplural={\the\glsshortpltok},%
      long={\the\glslongtok},%
      longplural={\the\glslongpltok},%
      name={\the\glsshorttok},%
      \CustomAbbreviationFields,%
      \ExtraCustomAbbreviationFields
      \the\glskeylisttok
    }%
  }%
  \@do@newglossaryentry
  \@glsxtr@addabbreviationlist{\glsentrytype{\the\glslabeltok}}%
  \glsexclapplyinnerfmtfield{\the\glslabeltok}{first}%
  \glsexclapplyinnerfmtfield{\the\glslabeltok}{firstpl}%
  \glsexclapplyinnerfmtfield{\the\glslabeltok}{text}%
  \glsexclapplyinnerfmtfield{\the\glslabeltok}{plural}%
  \glsexclapplyinnerfmtfield{\the\glslabeltok}{name}%
  \GlsXtrPostNewAbbreviation
}
\newcommand*{\glsxtrnewabbrevpresetkeyhook}[3]{}
\newcommand*{\GlsXtrPostNewAbbreviation}{}
\newcommand*{\newabbreviationhook}{}
\newcommand*{\CustomAbbreviationFields}{}
\newcommand*{\glsxtrparen}[1]{%
 \glsxtrgenentrytextfmt{(}#1\glsxtrgenentrytextfmt{)}}
\newcommand*{\glsxtrfullformat}[2]{%
  \ifglsxtrinsertinside
   \glsfirstlongfont{\glsaccessfmtlong{#2}{\glsxtrgenentrytextfmt}{#1}}%
  \else
   \glsfirstlongfont{\glsaccessfmtlong{}{\glsxtrgenentrytextfmt}{#1}}%
   \glsxtrgenentrytextfmt{#2}%
  \fi
  \glsxtrfullsep{#1}%
  \glsxtrparen{\protect\glsfirstabbrvfont
    {\glsaccessfmtshort{}{\glsxtrgenentrytextfmt}{#1}}}%
}
\newcommand*{\Glsxtrfullformat}[2]{%
  \ifglsxtrinsertinside
   \glsfirstlongfont{\Glsaccessfmtlong{#2}{\glsxtrgenentrytextfmt}{#1}}%
  \else
   \glsfirstlongfont{\Glsaccessfmtlong{}{\glsxtrgenentrytextfmt}{#1}}%
   \glsxtrgenentrytextfmt{#2}%
  \fi
  \glsxtrfullsep{#1}%
  \glsxtrparen{\protect\glsfirstabbrvfont
    {\glsaccessfmtshort{}{\glsxtrgenentrytextfmt}{#1}}}%
}
\glsmfuaddmap{\glsxtrfullformat}{\Glsxtrfullformat}
\newcommand*{\GLSxtrfullformat}[2]{%
  \ifglsxtrinsertinside
   \glsfirstlongfont{\GLSaccessfmtlong{#2}{\glsxtrgenentrytextfmt}{#1}}%
  \else
   \glsfirstlongfont{\GLSaccessfmtlong{}{\glsxtrgenentrytextfmt}{#1}}%
   \glsuppercase{\glsxtrgenentrytextfmt{#2}}%
  \fi
  \glsxtrfullsep{#1}%
  \glsxtrparen{\protect\glsfirstabbrvfont
    {\GLSaccessfmtshort{}{\glsxtrgenentrytextfmt}{#1}}}%
}
\glsmfublocker{\GLSxtrfullformat}
\newcommand*{\glsxtrfullplformat}[2]{%
  \ifglsxtrinsertinside
   \glsfirstlongfont{\glsaccessfmtlongpl{#2}{\glsxtrgenentrytextfmt}{#1}}%
  \else
   \glsfirstlongfont{\glsaccessfmtlongpl{}{\glsxtrgenentrytextfmt}{#1}}%
   \glsxtrgenentrytextfmt{#2}%
  \fi
  \glsxtrfullsep{#1}%
  \glsxtrparen{\protect\glsfirstabbrvfont
    {\glsaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{#1}}}%
}
\newcommand*{\Glsxtrfullplformat}[2]{%
  \ifglsxtrinsertinside
   \glsfirstlongfont{\Glsaccessfmtlongpl{#2}{\glsxtrgenentrytextfmt}{#1}}%
  \else
   \glsfirstlongfont{\Glsaccessfmtlongpl{}{\glsxtrgenentrytextfmt}{#1}}%
   \glsxtrgenentrytextfmt{#2}%
  \fi
  \glsxtrfullsep{#1}%
  \glsxtrparen{\protect\glsfirstabbrvfont
    {\glsaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{#1}}}%
}
\glsmfuaddmap{\glsxtrfullplformat}{\Glsxtrfullplformat}
\newcommand*{\GLSxtrfullplformat}[2]{%
  \ifglsxtrinsertinside
   \glsfirstlongfont{\GLSaccessfmtlongpl{#2}{\glsxtrgenentrytextfmt}{#1}}%
  \else
   \glsfirstlongfont{\GLSaccessfmtlongpl{}{\glsxtrgenentrytextfmt}{#1}}%
   \glsuppercase{\glsxtrgenentrytextfmt{#2}}%
  \fi
  \glsxtrfullsep{#1}%
  \glsxtrparen{\protect\glsfirstabbrvfont
    {\GLSaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{#1}}}%
}
\glsmfublocker{\GLSxtrfullplformat}
\newcommand*{\GLSxtr@fullformat@fallback}[2]{%
  \glsuppercase{\glsxtrfullformat{##1}{##2}}%
}%
\newcommand*{\GLSxtr@fullplformat@fallback}[2]{%
  \glsuppercase{\glsxtrfullplformat{##1}{##2}}%
}%
\newcommand*{\glsxtrfullsep}[1]{\glsxtrgenentrytextfmt{ }}
\newcommand*{\glsxtrinlinefullformat}{\glsxtrfullformat}
\newcommand*{\Glsxtrinlinefullformat}{\Glsxtrfullformat}
\newcommand*{\GLSxtrinlinefullformat}{\GLSxtrfullformat}
\newcommand*{\glsxtrinlinefullplformat}{\glsxtrfullplformat}
\newcommand*{\Glsxtrinlinefullplformat}{\Glsxtrfullplformat}
\newcommand*{\GLSxtrinlinefullplformat}{\GLSxtrfullplformat}
\renewcommand*{\glsentryfull}[1]{\glsxtrinlinefullformat{#1}{}}
\renewcommand*{\Glsentryfull}[1]{\Glsxtrinlinefullformat{#1}{}}
\glsmfuaddmap{\glsentryfull}{\Glsentryfull}
\renewcommand*{\glsentryfullpl}[1]{\glsxtrinlinefullplformat{#1}{}}
\renewcommand*{\Glsentryfullpl}[1]{\Glsxtrinlinefullplformat{#1}{}}
\glsmfuaddmap{\glsentryfullpl}{\Glsentryfullpl}
\newcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{#1}}
\newrobustcmd*{\glsfirstinnerfmtabbrvfont}[1]{%
 \glsfirstabbrvfont{\glsxtrgenentrytextfmt{#1}}%
}
\newcommand*{\glsfirstxpabbrvfont}[2]{%
 \glsifcategoryattributetrue{#2}{markshortwords}%
 {\protect\glsfirstabbrvfont{#1}}%
 {\glsfirstinnerfmtabbrvfont{#1}}%
}
\newcommand*{\glsfirstabbrvdefaultfont}[1]{\glsabbrvdefaultfont{#1}}
\newcommand*{\glsabbrvfont}[1]{\glsabbrvdefaultfont{#1}}
\newrobustcmd*{\glsinnerfmtabbrvfont}[1]{%
 \glsabbrvfont{\glsxtrgenentrytextfmt{#1}}%
}
\newcommand*{\glsxpabbrvfont}[2]{%
 \glsifcategoryattributetrue{#2}{markshortwords}%
 {\protect\glsabbrvfont{#1}}%
 {\glsinnerfmtabbrvfont{#1}}%
}
\newcommand*{\glsabbrvdefaultfont}[1]{#1}
\newcommand*{\glslongfont}[1]{\glslongdefaultfont{#1}}
\newrobustcmd*{\glsinnerfmtlongfont}[1]{%
 \glslongfont{\glsxtrgenentrytextfmt{#1}}%
}
\newcommand*{\glsxplongfont}[2]{%
 \glsifcategoryattributetrue{#2}{markwords}%
 {\protect\glslongfont{#1}}%
 {\glsinnerfmtlongfont{#1}}%
}
\newcommand*{\glslongdefaultfont}[1]{#1}
\newcommand*{\glsfirstlongfont}[1]{\glslongfont{#1}}
\newrobustcmd*{\glsfirstinnerfmtlongfont}[1]{%
 \glsfirstlongfont{\glsxtrgenentrytextfmt{#1}}%
}
\newcommand*{\glsfirstxplongfont}[2]{%
 \glsifcategoryattributetrue{#2}{markwords}%
 {\protect\glsfirstlongfont{#1}}%
 {\glsfirstinnerfmtlongfont{#1}}%
}
\newcommand*{\glsfirstlongdefaultfont}[1]{\glslongdefaultfont{#1}}
\newcommand*{\glsxtrabbrvpluralsuffix}{\glspluralsuffix}
\newcommand*{\abbrvpluralsuffix}{\glsxtrabbrvpluralsuffix}
\newcommand*{\glsxtrrevert}[1]{\glsxtrdefaultrevert{#1}}%
\newcommand*{\glsxtrdefaultrevert}[1]{#1}%
\newrobustcmd*{\glsxtrfull}{\@gls@hyp@opt\ns@glsxtrfull}
\newcommand*\ns@glsxtrfull[2][]{%
  \new@ifnextchar[{\@glsxtr@full{#1}{#2}}%
                  {\@glsxtr@full{#1}{#2}[]}%
}
\def\@glsxtr@full#1#2[#3]{%
  \def\glsxtrcurrentfield{}%
  \@glsxtr@record{#1}{#2}{glslink}%
  \glsdoifexists{#2}%
  {%
    \glssetabbrvfmt{\glscategory{#2}}%
    \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper
    \let\glsxtrifwasglslike\@secondoftwo
    \let\glsifplural\@secondoftwo
    \let\glscapscase\@firstofthree
    \glsxtrfullsaveinsert{#2}{#3}%
    \def\glscustomtext{\glsxtrinlinefullformat{#2}{#3}}%
    \glsxtrsetupfulldefs
    \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}%
  }%
  \glspostlinkhook
}
\newcommand*{\glsxtrsetupfulldefs}{%
  \let\glsxtrifwasfirstuse\@firstoftwo
}
\newrobustcmd*{\Glsxtrfull}{\@gls@hyp@opt\ns@Glsxtrfull}
\newcommand*\ns@Glsxtrfull[2][]{%
  \new@ifnextchar[{\@Glsxtr@full{#1}{#2}}%
                  {\@Glsxtr@full{#1}{#2}[]}%
}
\glsmfuaddmap{\glsxtrfull}{\Glsxtrfull}
\def\@Glsxtr@full#1#2[#3]{%
  \def\glsxtrcurrentfield{}%
  \glsdoifexists{#2}%
  {%
    \glssetabbrvfmt{\glscategory{#2}}%
    \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper
    \let\glsxtrifwasglslike\@secondoftwo
    \let\glsifplural\@secondoftwo
    \let\glscapscase\@secondofthree
    \glsxtrfullsaveinsert{#2}{#3}%
    \def\glscustomtext{\Glsxtrinlinefullformat{#2}{#3}}%
    \glsxtrsetupfulldefs
    \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}%
  }%
  \glspostlinkhook
}
\newrobustcmd*{\GLSxtrfull}{\@gls@hyp@opt\ns@GLSxtrfull}
\newcommand*\ns@GLSxtrfull[2][]{%
  \new@ifnextchar[{\@GLSxtr@full{#1}{#2}}%
                  {\@GLSxtr@full{#1}{#2}[]}%
}
\def\@GLSxtr@full#1#2[#3]{%
  \def\glsxtrcurrentfield{}%
  \glsdoifexists{#2}%
  {%
    \glssetabbrvfmt{\glscategory{#2}}%
    \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper
    \let\glsxtrifwasglslike\@secondoftwo
    \let\glsifplural\@secondoftwo
    \let\glscapscase\@thirdofthree
    \glsxtrfullsaveinsert{#2}{#3}%
    \def\glscustomtext{\GLSxtrinlinefullformat{#2}{#3}}%
    \glsxtrsetupfulldefs
    \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}%
  }%
  \glspostlinkhook
}
\glsmfublocker{\GLSxtrfull}
\newrobustcmd*{\glsxtrfullpl}{\@gls@hyp@opt\ns@glsxtrfullpl}
\newcommand*\ns@glsxtrfullpl[2][]{%
  \new@ifnextchar[{\@glsxtr@fullpl{#1}{#2}}%
                  {\@glsxtr@fullpl{#1}{#2}[]}%
}
\def\@glsxtr@fullpl#1#2[#3]{%
  \def\glsxtrcurrentfield{}%
  \@glsxtr@record{#1}{#2}{glslink}%
  \glsdoifexists{#2}%
  {%
    \glssetabbrvfmt{\glscategory{#2}}%
    \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper
    \let\glsxtrifwasglslike\@secondoftwo
    \let\glsifplural\@firstoftwo
    \let\glscapscase\@firstofthree
    \glsxtrfullsaveinsert{#2}{#3}%
    \def\glscustomtext{\glsxtrinlinefullplformat{#2}{#3}}%
    \glsxtrsetupfulldefs
    \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}%
  }%
  \glspostlinkhook
}
\newrobustcmd*{\Glsxtrfullpl}{\@gls@hyp@opt\ns@Glsxtrfullpl}
\newcommand*\ns@Glsxtrfullpl[2][]{%
  \new@ifnextchar[{\@Glsxtr@fullpl{#1}{#2}}%
                  {\@Glsxtr@fullpl{#1}{#2}[]}%
}
\glsmfuaddmap{\glsxtrfullpl}{\Glsxtrfullpl}
\def\@Glsxtr@fullpl#1#2[#3]{%
  \def\glsxtrcurrentfield{}%
  \@glsxtr@record{#1}{#2}{glslink}%
  \glsdoifexists{#2}%
  {%
    \glssetabbrvfmt{\glscategory{#2}}%
    \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper
    \let\glsxtrifwasglslike\@secondoftwo
    \let\glsifplural\@firstoftwo
    \let\glscapscase\@secondofthree
    \glsxtrfullsaveinsert{#2}{#3}%
    \def\glscustomtext{\Glsxtrinlinefullplformat{#2}{#3}}%
    \glsxtrsetupfulldefs
    \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}%
  }%
  \glspostlinkhook
}
\newrobustcmd*{\GLSxtrfullpl}{\@gls@hyp@opt\ns@GLSxtrfullpl}
\newcommand*\ns@GLSxtrfullpl[2][]{%
  \new@ifnextchar[{\@GLSxtr@fullpl{#1}{#2}}%
                  {\@GLSxtr@fullpl{#1}{#2}[]}%
}
\glsmfublocker{\GLSxtrfullpl}
\def\@GLSxtr@fullpl#1#2[#3]{%
  \def\glsxtrcurrentfield{}%
  \@glsxtr@record{#1}{#2}{glslink}%
  \glsdoifexists{#2}%
  {%
    \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper
    \let\glsxtrifwasglslike\@secondoftwo
    \let\glsifplural\@firstoftwo
    \let\glscapscase\@thirdofthree
    \glsxtrfullsaveinsert{#2}{#3}%
    \def\glscustomtext{%
      \GLSxtrinlinefullplformat{#2}{#3}}%
    \glsxtrsetupfulldefs
    \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}%
  }%
  \glspostlinkhook
}
\newrobustcmd*{\glsxtrshort}{\@gls@hyp@opt\ns@glsxtrshort}
\newcommand*{\ns@glsxtrshort}[2][]{%
  \new@ifnextchar[{\@glsxtrshort{#1}{#2}}{\@glsxtrshort{#1}{#2}[]}%
}
\def\@glsxtrshort#1#2[#3]{%
  \def\glsxtrcurrentfield{short}%
  \@glsxtr@record{#1}{#2}{glslink}%
  \glsdoifexists{#2}%
  {%
    \glssetabbrvfmt{\glscategory{#2}}%
    \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper
    \let\glsxtrifwasglslike\@secondoftwo
    \let\glsxtrifwasfirstuse\@secondoftwo
    \let\glsifplural\@secondoftwo
    \let\glscapscase\@firstofthree
    \glsxtrsaveinsert{#2}{#3}%
    \def\glscustomtext{%
      \glsxtrshortformat{#2}{#3}{\glsabbrvfont}%
    }%
    \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}%
  }%
  \glspostlinkhook
}
\newrobustcmd*{\Glsxtrshort}{\@gls@hyp@opt\ns@Glsxtrshort}
\glsmfuaddmap{\glsxtrshort}{\Glsxtrshort}
\newcommand*{\ns@Glsxtrshort}[2][]{%
  \new@ifnextchar[{\@Glsxtrshort{#1}{#2}}{\@Glsxtrshort{#1}{#2}[]}%
}
\def\@Glsxtrshort#1#2[#3]{%
  \def\glsxtrcurrentfield{short}%
  \@glsxtr@record{#1}{#2}{glslink}%
  \glsdoifexists{#2}%
  {%
    \glssetabbrvfmt{\glscategory{#2}}%
    \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper
    \let\glsxtrifwasglslike\@secondoftwo
    \let\glsxtrifwasfirstuse\@secondoftwo
    \let\glsifplural\@secondoftwo
    \let\glscapscase\@secondofthree
    \glsxtrsaveinsert{#2}{#3}%
    \def\glscustomtext{%
      \Glsxtrshortformat{#2}{#3}{\glsabbrvfont}%
    }%
    \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}%
  }%
  \glspostlinkhook
}
\newrobustcmd*{\GLSxtrshort}{\@gls@hyp@opt\ns@GLSxtrshort}
\glsmfublocker{\GLSxtrshort}
\newcommand*{\ns@GLSxtrshort}[2][]{%
  \new@ifnextchar[{\@GLSxtrshort{#1}{#2}}{\@GLSxtrshort{#1}{#2}[]}%
}
\def\@GLSxtrshort#1#2[#3]{%
  \def\glsxtrcurrentfield{short}%
  \@glsxtr@record{#1}{#2}{glslink}%
  \glsdoifexists{#2}%
  {%
    \glssetabbrvfmt{\glscategory{#2}}%
    \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper
    \let\glsxtrifwasglslike\@secondoftwo
    \let\glsxtrifwasfirstuse\@secondoftwo
    \let\glsifplural\@secondoftwo
    \let\glscapscase\@thirdofthree
    \glsxtrsaveinsert{#2}{#3}%
    \def\glscustomtext{\GLSxtrshortformat{#2}{#3}{\glsabbrvfont}}%
    \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}%
  }%
  \glspostlinkhook
}
\newcommand{\glsxtrsetlongfirstuse}[1]{%
  \let\glsxtrifwasfirstuse\@firstoftwo
}
\newrobustcmd*{\glsxtrlong}{\@gls@hyp@opt\ns@glsxtrlong}
\newcommand*{\ns@glsxtrlong}[2][]{%
  \new@ifnextchar[{\@glsxtrlong{#1}{#2}}{\@glsxtrlong{#1}{#2}[]}%
}
\def\@glsxtrlong#1#2[#3]{%
  \def\glsxtrcurrentfield{long}%
  \@glsxtr@record{#1}{#2}{glslink}%
  \glsdoifexists{#2}%
  {%
    \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper
    \let\glsxtrifwasglslike\@secondoftwo
    \let\glsifplural\@secondoftwo
    \let\glscapscase\@firstofthree
    \glsxtrsetlongfirstuse{#2}%
    \glsxtrsaveinsert{#2}{#3}%
    \def\glscustomtext{%
      \glsxtrlongformat{#2}{#3}{\glslongfont}%
    }%
    \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}%
  }%
  \glspostlinkhook
}
\newrobustcmd*{\Glsxtrlong}{\@gls@hyp@opt\ns@Glsxtrlong}
\glsmfuaddmap{\glsxtrlong}{\Glsxtrlong}
\newcommand*{\ns@Glsxtrlong}[2][]{%
  \new@ifnextchar[{\@Glsxtrlong{#1}{#2}}{\@Glsxtrlong{#1}{#2}[]}%
}
\def\@Glsxtrlong#1#2[#3]{%
  \def\glsxtrcurrentfield{long}%
  \@glsxtr@record{#1}{#2}{glslink}%
  \glsdoifexists{#2}%
  {%
    \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper
    \let\glsxtrifwasglslike\@secondoftwo
    \let\glsifplural\@secondoftwo
    \let\glscapscase\@secondofthree
    \glsxtrsetlongfirstuse{#2}%
    \glsxtrsaveinsert{#2}{#3}%
    \def\glscustomtext{%
      \Glsxtrlongformat{#2}{#3}{\glslongfont}%
    }%
    \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}%
  }%
  \glspostlinkhook
}
\newrobustcmd*{\GLSxtrlong}{\@gls@hyp@opt\ns@GLSxtrlong}
\glsmfublocker{\GLSxtrlong}
\newcommand*{\ns@GLSxtrlong}[2][]{%
  \new@ifnextchar[{\@GLSxtrlong{#1}{#2}}{\@GLSxtrlong{#1}{#2}[]}%
}
\def\@GLSxtrlong#1#2[#3]{%
  \def\glsxtrcurrentfield{long}%
  \@glsxtr@record{#1}{#2}{glslink}%
  \glsdoifexists{#2}%
  {%
    \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper
    \let\glsxtrifwasglslike\@secondoftwo
    \let\glsifplural\@secondoftwo
    \let\glscapscase\@thirdofthree
    \glsxtrsetlongfirstuse{#2}%
    \glsxtrsaveinsert{#2}{#3}%
    \def\glscustomtext{%
     \GLSxtrlongformat{#2}{#3}{\glslongfont}%
    }%
    \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}%
  }%
  \glspostlinkhook
}
\newrobustcmd*{\glsxtrshortpl}{\@gls@hyp@opt\ns@glsxtrshortpl}
\newcommand*{\ns@glsxtrshortpl}[2][]{%
  \new@ifnextchar[{\@glsxtrshortpl{#1}{#2}}{\@glsxtrshortpl{#1}{#2}[]}%
}
\def\@glsxtrshortpl#1#2[#3]{%
  \def\glsxtrcurrentfield{short}%
  \@glsxtr@record{#1}{#2}{glslink}%
  \glsdoifexists{#2}%
  {%
    \glssetabbrvfmt{\glscategory{#2}}%
    \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper
    \let\glsxtrifwasglslike\@secondoftwo
    \let\glsxtrifwasfirstuse\@secondoftwo
    \let\glsifplural\@firstoftwo
    \let\glscapscase\@firstofthree
    \glsxtrsaveinsert{#2}{#3}%
    \def\glscustomtext{%
      \glsxtrshortplformat{#2}{#3}{\glsabbrvfont}%
    }%
    \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}%
  }%
  \glspostlinkhook
}
\newrobustcmd*{\Glsxtrshortpl}{\@gls@hyp@opt\ns@Glsxtrshortpl}
\glsmfuaddmap{\glsxtrshortpl}{\Glsxtrshortpl}
\newcommand*{\ns@Glsxtrshortpl}[2][]{%
  \new@ifnextchar[{\@Glsxtrshortpl{#1}{#2}}{\@Glsxtrshortpl{#1}{#2}[]}%
}
\def\@Glsxtrshortpl#1#2[#3]{%
  \def\glsxtrcurrentfield{short}%
  \@glsxtr@record{#1}{#2}{glslink}%
  \glsdoifexists{#2}%
  {%
    \glssetabbrvfmt{\glscategory{#2}}%
    \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper
    \let\glsxtrifwasglslike\@secondoftwo
    \let\glsxtrifwasfirstuse\@secondoftwo
    \let\glsifplural\@firstoftwo
    \let\glscapscase\@secondofthree
    \glsxtrsaveinsert{#2}{#3}%
    \def\glscustomtext{%
      \Glsxtrshortplformat{#2}{#3}{\glsabbrvfont}%
    }%
    \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}%
  }%
  \glspostlinkhook
}
\newrobustcmd*{\GLSxtrshortpl}{\@gls@hyp@opt\ns@GLSxtrshortpl}
\glsmfublocker{\GLSxtrshortpl}
\newcommand*{\ns@GLSxtrshortpl}[2][]{%
  \new@ifnextchar[{\@GLSxtrshortpl{#1}{#2}}{\@GLSxtrshortpl{#1}{#2}[]}%
}
\def\@GLSxtrshortpl#1#2[#3]{%
  \def\glsxtrcurrentfield{short}%
  \@glsxtr@record{#1}{#2}{glslink}%
  \glsdoifexists{#2}%
  {%
    \glssetabbrvfmt{\glscategory{#2}}%
    \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper
    \let\glsxtrifwasglslike\@secondoftwo
    \let\glsxtrifwasfirstuse\@secondoftwo
    \let\glsifplural\@firstoftwo
    \let\glscapscase\@thirdofthree
    \glsxtrsaveinsert{#2}{#3}%
    \def\glscustomtext{%
        \GLSxtrshortplformat{#2}{#3}{\glsabbrvfont}%
    }%
    \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}%
  }%
  \glspostlinkhook
}
\newrobustcmd*{\glsxtrlongpl}{\@gls@hyp@opt\ns@glsxtrlongpl}
\newcommand*{\ns@glsxtrlongpl}[2][]{%
  \new@ifnextchar[{\@glsxtrlongpl{#1}{#2}}{\@glsxtrlongpl{#1}{#2}[]}%
}
\def\@glsxtrlongpl#1#2[#3]{%
  \def\glsxtrcurrentfield{long}%
  \@glsxtr@record{#1}{#2}{glslink}%
  \glsdoifexists{#2}%
  {%
    \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper
    \let\glsxtrifwasglslike\@secondoftwo
    \let\glsifplural\@firstoftwo
    \let\glscapscase\@firstofthree
    \glsxtrsetlongfirstuse{#2}%
    \glsxtrsaveinsert{#2}{#3}%
    \def\glscustomtext{%
      \glsxtrlongplformat{#2}{#3}{\glslongfont}%
    }%
    \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}%
  }%
  \glspostlinkhook
}
\newrobustcmd*{\Glsxtrlongpl}{\@gls@hyp@opt\ns@Glsxtrlongpl}
\glsmfuaddmap{\glsxtrlongpl}{\Glsxtrlongpl}
\newcommand*{\ns@Glsxtrlongpl}[2][]{%
  \new@ifnextchar[{\@Glsxtrlongpl{#1}{#2}}{\@Glsxtrlongpl{#1}{#2}[]}%
}
\def\@Glsxtrlongpl#1#2[#3]{%
  \def\glsxtrcurrentfield{long}%
  \@glsxtr@record{#1}{#2}{glslink}%
  \glsdoifexists{#2}%
  {%
    \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper
    \let\glsxtrifwasglslike\@secondoftwo
    \let\glsifplural\@firstoftwo
    \let\glscapscase\@secondofthree
    \glsxtrsetlongfirstuse{#2}%
    \glsxtrsaveinsert{#2}{#3}%
    \def\glscustomtext{%
      \Glsxtrlongplformat{#2}{#3}{\glslongfont}%
    }%
    \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}%
  }%
  \glspostlinkhook
}
\newrobustcmd*{\GLSxtrlongpl}{\@gls@hyp@opt\ns@GLSxtrlongpl}
\glsmfublocker{\GLSxtrlongpl}
\newcommand*{\ns@GLSxtrlongpl}[2][]{%
  \new@ifnextchar[{\@GLSxtrlongpl{#1}{#2}}{\@GLSxtrlongpl{#1}{#2}[]}%
}
\def\@GLSxtrlongpl#1#2[#3]{%
  \def\glsxtrcurrentfield{long}%
  \@glsxtr@record{#1}{#2}{glslink}%
  \glsdoifexists{#2}%
  {%
    \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper
    \let\glsxtrifwasglslike\@secondoftwo
    \let\glsifplural\@firstoftwo
    \let\glscapscase\@thirdofthree
    \glsxtrsetlongfirstuse{#2}%
    \glsxtrsaveinsert{#2}{#3}%
    \def\glscustomtext{%
        \GLSxtrlongplformat{#2}{#3}{\glslongfont}%
    }%
    \@gls@link[#1]{#2}{\csname gls@\glstype @entryfmt\endcsname}%
  }%
  \glspostlinkhook
}
\newcommand*{\glssetabbrvfmt}[1]{%
  \ifcsdef{@glsabbrv@current@#1}%
  {\glsxtr@applyabbrvfmt{\csname @glsabbrv@current@#1\endcsname}}%
  {\glsxtr@applyabbrvfmt{\@glsabbrv@current@abbreviation}}%
}
\newrobustcmd*{\glsuseabbrvfont}[2]{{\glssetabbrvfmt{#2}\glsabbrvfont{#1}}}
\newrobustcmd*{\glsuselongfont}[2]{{\glssetabbrvfmt{#2}\glslongfont{#1}}}
\newcommand*{\glsxtrgenabbrvfmt}{%
  \ifdefempty\glscustomtext
  {%
    \ifglsused\glslabel
    {%
      \glsifplural
      {%
        \glscapscase
        {%
          \expandafter\glsxtrsubsequentplfmt\expandafter\glslabel
            \expandafter{\glsinsert}%
        }%
        {%
          \expandafter\Glsxtrsubsequentplfmt\expandafter\glslabel
            \expandafter{\glsinsert}%
        }%
        {%
          \expandafter\GLSxtrsubsequentplfmt\expandafter\glslabel
            \expandafter{\glsinsert}%
        }%
      }%
      {%
        \glscapscase
        {%
          \expandafter\glsxtrsubsequentfmt\expandafter\glslabel
            \expandafter{\glsinsert}%
        }%
        {%
          \expandafter\Glsxtrsubsequentfmt\expandafter
            \glslabel\expandafter{\glsinsert}%
        }%
        {%
          \expandafter\GLSxtrsubsequentfmt\expandafter
            \glslabel\expandafter{\glsinsert}%
        }%
      }%
    }%
    {%
      \glsifplural
      {%
        \glscapscase
        {%
          \expandafter\glsxtrfullplformat\expandafter\glslabel
            \expandafter{\glsinsert}%
        }%
        {%
          \expandafter\Glsxtrfullplformat\expandafter\glslabel
            \expandafter{\glsinsert}%
        }%
        {%
          \expandafter\GLSxtrfullplformat\expandafter\glslabel
            \expandafter{\glsinsert}%
        }%
      }%
      {%
        \glscapscase
        {%
          \expandafter\glsxtrfullformat\expandafter\glslabel
            \expandafter{\glsinsert}%
        }%
        {%
          \expandafter\Glsxtrfullformat\expandafter\glslabel
           \expandafter{\glsinsert}%
        }%
        {%
          \expandafter\GLSxtrfullformat\expandafter\glslabel
           \expandafter{\glsinsert}%
        }%
      }%
    }%
  }%
  {%
    \glscustomtext
  }%
}
\newcommand*{\glsxtrsubsequentfmt}[2]{%
  \glsifattribute{#1}{markshortwords}{true}%
  {%
    \ifglsxtrinsertinside
      \glsabbrvfont{\glsaccessshort{#1}\glsxtrgenentrytextfmt{#2}}%
    \else
      \glsabbrvfont{\glsaccessshort{#1}}\glsxtrgenentrytextfmt{#2}%
    \fi
  }%
  {%
    \ifglsxtrinsertinside
     \glsabbrvfont{\glsaccessfmtshort{#2}{\glsxtrgenentrytextfmt}{#1}}%
    \else
     \glsabbrvfont{\glsaccessfmtshort{}{\glsxtrgenentrytextfmt}{#1}}%
     \glsxtrgenentrytextfmt{#2}%
    \fi
  }%
}
\let\glsxtrdefaultsubsequentfmt\glsxtrsubsequentfmt
\newcommand*{\glsxtrsubsequentplfmt}[2]{%
  \glsifattribute{#1}{markshortwords}{true}%
  {%
    \ifglsxtrinsertinside
      \glsabbrvfont{\glsaccessshortpl{#1}\glsxtrgenentrytextfmt{#2}}%
    \else
      \glsabbrvfont{\glsaccessshortpl{#1}}\glsxtrgenentrytextfmt{#2}%
    \fi
  }%
  {%
    \ifglsxtrinsertinside
     \glsabbrvfont{\glsaccessfmtshortpl{#2}{\glsxtrgenentrytextfmt}{#1}}%
    \else
     \glsabbrvfont{\glsaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{#1}}%
     \glsxtrgenentrytextfmt{#2}%
    \fi
  }%
}
\let\glsxtrdefaultsubsequentplfmt\glsxtrsubsequentplfmt
\newcommand*{\Glsxtrsubsequentfmt}[2]{%
  \glsifattribute{#1}{markshortwords}{true}%
  {%
    \ifglsxtrinsertinside
      \glsabbrvfont{\Glsaccessshort{#1}\glsxtrgenentrytextfmt{#2}}%
    \else
      \glsabbrvfont{\Glsaccessshort{#1}}\glsxtrgenentrytextfmt{#2}%
    \fi
  }%
  {%
    \ifglsxtrinsertinside
     \glsabbrvfont{\Glsaccessfmtshort{#2}{\glsxtrgenentrytextfmt}{#1}}%
    \else
     \glsabbrvfont{\Glsaccessfmtshort{}{\glsxtrgenentrytextfmt}{#1}}%
     \glsxtrgenentrytextfmt{#2}%
    \fi
  }%
}
\let\Glsxtrdefaultsubsequentfmt\Glsxtrsubsequentfmt
\glsmfuaddmap{\glsxtrsubsequentfmt}{\Glsxtrsubsequentfmt}
\newcommand*{\Glsxtrsubsequentplfmt}[2]{%
  \glsifattribute{#1}{markshortwords}{true}%
  {%
    \ifglsxtrinsertinside
      \glsabbrvfont{\Glsaccessshortpl{#1}\glsxtrgenentrytextfmt{#2}}%
    \else
      \glsabbrvfont{\Glsaccessshortpl{#1}}\glsxtrgenentrytextfmt{#2}%
    \fi
  }%
  {%
    \ifglsxtrinsertinside
     \glsabbrvfont{\Glsaccessfmtshortpl{#2}{\glsxtrgenentrytextfmt}{#1}}%
    \else
     \glsabbrvfont{\Glsaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{#1}}%
     \glsxtrgenentrytextfmt{#2}%
    \fi
  }%
}
\let\Glsxtrdefaultsubsequentplfmt\Glsxtrsubsequentplfmt
\glsmfuaddmap{\glsxtrsubsequentplfmt}{\Glsxtrsubsequentplfmt}
\newcommand*{\GLSxtrsubsequentfmt}[2]{%
  \glsifattribute{#1}{markshortwords}{true}%
  {%
    \ifglsxtrinsertinside
      \glsabbrvfont{\GLSaccessshort{#1}%
        \glsuppercase{\glsxtrgenentrytextfmt{#2}}}%
    \else
      \glsabbrvfont{\GLSaccessshort{#1}}%
        \glsuppercase{\glsxtrgenentrytextfmt{#2}}%
    \fi
  }%
  {%
    \ifglsxtrinsertinside
     \glsabbrvfont{\GLSaccessfmtshort{#2}{\glsxtrgenentrytextfmt}{#1}}%
    \else
     \glsabbrvfont{\GLSaccessfmtshort{}{\glsxtrgenentrytextfmt}{#1}}%
     \glsuppercase{\glsxtrgenentrytextfmt{#2}}%
    \fi
  }%
}
\glsmfublocker{\GLSxtrsubsequentfmt}
\let\GLSxtrdefaultsubsequentfmt\GLSxtrsubsequentfmt
\newcommand*{\GLSxtrsubsequentplfmt}[2]{%
  \glsifattribute{#1}{markshortwords}{true}%
  {%
    \ifglsxtrinsertinside
      \glsabbrvfont{\GLSaccessshortpl{#1}%
       \glsuppercase{\glsxtrgenentrytextfmt{#2}}}%
    \else
      \glsabbrvfont{\GLSaccessshortpl{#1}}%
       \glsuppercase{\glsxtrgenentrytextfmt{#2}}%
    \fi
  }%
  {%
    \ifglsxtrinsertinside
     \glsabbrvfont{\GLSaccessfmtshortpl{#2}{\glsxtrgenentrytextfmt}{#1}}%
    \else
     \glsabbrvfont{\GLSaccessfmtshortpl{}{\glsxtrgenentrytextfmt}{#1}}%
     \glsuppercase{\glsxtrgenentrytextfmt{#2}}%
    \fi
  }%
}
\glsmfublocker{\GLSxtrsubsequentplfmt}
\let\GLSxtrdefaultsubsequentplfmt\GLSxtrsubsequentplfmt
\newcommand*{\setabbreviationstyle}[2][abbreviation]{%
  \ifcsundef{@glsabbrv@dispstyle@setup@#2}
  {%
    \PackageError{glossaries-extra}{Undefined abbreviation style `#2'}{}%
  }%
  {%
     \ifcsstring{@glsabbrv@current@#1}{#2}%
     {%
     }%
     {%
       \def\@glsxtr@dostylewarn{}%
       \glsforeachincategory{#1}{\@gls@type}{\@gls@label}%
       {%
         \def\@glsxtr@dostylewarn{\GlossariesWarning{Abbreviation
           style has been switched \MessageBreak
           for category `#1', \MessageBreak
           but there have already been entries \MessageBreak
           defined for this category. Unwanted \MessageBreak
           side-effects may result}}%
         \@endfortrue
       }%
       \@glsxtr@dostylewarn
       \csdef{@glsabbrv@current@#1}{#2}%
       \protected@edef\glscategorylabel{#1}%
       \glsxtr@applyabbrvstyle{#2}%
     }%
  }%
}
\newcommand*{\glsxtr@applyabbrvstyle}[1]{%
  \csuse{@glsabbrv@dispstyle@setup@#1}%
  \csuse{@glsabbrv@dispstyle@fmts@#1}%
}
\newcommand*{\glsxtr@applyabbrvfmt}[1]{%
  \csuse{@glsabbrv@dispstyle@fmts@#1}%
}
\newcommand*{\glsxtrsetcomplexstyle}[2]{%
  \csdef{@glsxtr@has@complexstyle@#1}{#2}%
}
\newcommand*{\glsxtr@do@ifcomplexstyle@allcaps}[2]{%
  \ifcsdef{@glsxtr@has@complexstyle@#1}%
  {%
    \ifnum\csuse{@glsxtr@has@complexstyle@#1}<1
    \else
     \ifnum\csuse{@glsxtr@has@complexstyle@#1}<3
       #2%
     \fi
    \fi
  }%
  {}%
}
\newcommand*{\glsxtr@do@ifcomplexstyle@insert}[2]{%
  \ifcsdef{@glsxtr@has@complexstyle@#1}%
  {%
    \ifnum\csuse{@glsxtr@has@complexstyle@#1}<2
    \else
      #2%
    \fi
  }%
  {}%
}
\newcommand*{\GlossariesAbbrStyleTooComplexWarning}[2]{%
  \GlossariesExtraWarning{Abbreviation style used by `#1' too complex #2}%
}
\newcommand*{\glsxtr@check@complexstyle}[2]{%
  \ifx\glscapscase\@thirdofthree
  \glsxtr@do@ifcomplexstyle@allcaps{#1}%
  {%
    \glsxtrifwasfirstuse
    {%
      \glsifplural
      {%
        \GlossariesAbbrStyleTooComplexWarning{#1}{for \string\GLSfirstplural.
          Use \string\GLSpl{#1} or \string\GLSxtrfullpl{#1} instead.
          Switching off all-caps%
        }%
      }%
      {%
        \GlossariesAbbrStyleTooComplexWarning{#1}{for \string\GLSfirst.
          Use \string\GLS{#1} or \string\GLSxtrfull{#1} instead.
          Switching off all-caps%
        }%
      }%
    }%
    {%
      \glsifplural
      {%
         \GlossariesAbbrStyleTooComplexWarning{#1}{for \string\GLSplural.
           Use \string\GLSpl{#1} or \string\GLSxtrshortpl{#1} instead.
           Switching off all-caps%
         }%
      }%
      {%
         \GlossariesAbbrStyleTooComplexWarning{#1}{for \string\GLStext.
           Use \string\GLS{#1} or \string\GLSxtrshort{#1} instead.
           Switching off all-caps%
         }%
      }%
    }%
    \let\glscapscase\@firstofthree
  }%
  \fi
  \ifstrempty{#2}{}%
  {%
    \glsxtr@do@ifcomplexstyle@insert{#1}%
    {%
      \GlossariesAbbrStyleTooComplexWarning{#1}%
      {to support insert argument with commands like \string\glsfirst\space or
       \string\glstext. Unexpected results may occur. Use commands
       like \string\gls\space or \string\glsxtrshort\space instead}%
    }%
  }%
}
\newcommand*{\newabbreviationstyle}[3]{%
  \ifcsdef{@glsabbrv@dispstyle@setup@#1}
  {%
    \PackageError{glossaries-extra}{Abbreviation style `#1' already
     defined}{}%
  }%
  {%
    \csdef{@glsabbrv@dispstyle@setup@#1}{%
     \renewcommand*{\GlsXtrPostNewAbbreviation}{}%
     #2}%
    \csdef{@glsabbrv@dispstyle@fmts@#1}{%
    \renewcommand*{\glsxtrinlinefullformat}{\glsxtrfullformat}%
    \renewcommand*{\Glsxtrinlinefullformat}{\Glsxtrfullformat}%
    \renewcommand*{\GLSxtrinlinefullformat}{\GLSxtrfullformat}%
    \renewcommand*{\glsxtrinlinefullplformat}{\glsxtrfullplformat}%
    \renewcommand*{\Glsxtrinlinefullplformat}{\Glsxtrfullplformat}%
    \renewcommand*{\GLSxtrinlinefullplformat}{\GLSxtrfullplformat}%
    \renewcommand*{\GLSxtrfullformat}{\GLSxtr@fullformat@fallback}%
    \renewcommand*{\GLSxtrfullplformat}{\GLSxtr@fullplformat@fallback}%
    \let\glsxtrsubsequentfmt\glsxtrdefaultsubsequentfmt
    \let\glsxtrsubsequentplfmt\glsxtrdefaultsubsequentplfmt
    \let\Glsxtrsubsequentfmt\Glsxtrdefaultsubsequentfmt
    \let\Glsxtrsubsequentplfmt\Glsxtrdefaultsubsequentplfmt
    \let\GLSxtrsubsequentfmt\GLSxtrdefaultsubsequentfmt
    \let\GLSxtrsubsequentplfmt\GLSxtrdefaultsubsequentplfmt
    #3}%
  }%
}
\newcommand*{\renewabbreviationstyle}[3]{%
  \ifcsundef{@glsabbrv@dispstyle@setup@#1}
  {%
    \PackageError{glossaries-extra}{Abbreviation style `#1' not defined}{}%
  }%
  {%
    \csdef{@glsabbrv@dispstyle@setup@#1}{%
     \renewcommand*{\GlsXtrPostNewAbbreviation}{}%
     #2}%
    \csdef{@glsabbrv@dispstyle@fmts@#1}{%
    \renewcommand*{\glsxtrinlinefullformat}{\glsxtrfullformat}%
    \renewcommand*{\Glsxtrinlinefullformat}{\Glsxtrfullformat}%
    \renewcommand*{\GLSxtrinlinefullformat}{\GLSxtrfullformat}%
    \renewcommand*{\glsxtrinlinefullplformat}{\glsxtrfullplformat}%
    \renewcommand*{\Glsxtrinlinefullplformat}{\Glsxtrfullplformat}%
    \renewcommand*{\GLSxtrinlinefullplformat}{\GLSxtrfullplformat}%
    \renewcommand*{\GLSxtrfullformat}{\GLSxtr@fullformat@fallback}%
    \renewcommand*{\GLSxtrfullplformat}{\GLSxtr@fullplformat@fallback}%
    \let\glsxtrsubsequentfmt\glsxtrdefaultsubsequentfmt
    \let\glsxtrsubsequentplfmt\glsxtrdefaultsubsequentplfmt
    \let\Glsxtrsubsequentfmt\Glsxtrdefaultsubsequentfmt
    \let\Glsxtrsubsequentplfmt\Glsxtrdefaultsubsequentplfmt
    \let\GLSxtrsubsequentfmt\GLSxtrdefaultsubsequentfmt
    \let\GLSxtrsubsequentplfmt\GLSxtrdefaultsubsequentplfmt
    #3}%
  }%
}
\newcommand*{\letabbreviationstyle}[2]{%
  \csletcs{@glsabbrv@dispstyle@setup@#1}{@glsabbrv@dispstyle@setup@#2}%
  \csletcs{@glsabbrv@dispstyle@fmts@#1}{@glsabbrv@dispstyle@fmts@#2}%
}
\newcommand*{\@glsxtr@deprecated@abbrstyle}[2]{%
  \csdef{@glsabbrv@dispstyle@setup@#1}{%
    \GlsXtrWarnDeprecatedAbbrStyle{#1}{#2}%
    \csuse{@glsabbrv@dispstyle@setup@#2}%
  }%
  \csletcs{@glsabbrv@dispstyle@fmts@#1}{@glsabbrv@dispstyle@fmts@#2}%
}
\newcommand*{\GlsXtrWarnDeprecatedAbbrStyle}[2]{%
  \GlossariesExtraWarning{Deprecated abbreviation style name `#1',
  use `#2' instead}%
}
\newcommand*{\GlsXtrUseAbbrStyleSetup}[1]{%
  \ifcsundef{@glsabbrv@dispstyle@setup@#1}%
  {%
     \PackageError{glossaries-extra}%
     {Unknown abbreviation style definitions `#1'}{}%
  }%
  {%
     \csname @glsabbrv@dispstyle@setup@#1\endcsname
  }%
}
\newcommand*{\GlsXtrUseAbbrStyleFmts}[1]{%
  \ifcsundef{@glsabbrv@dispstyle@fmts@#1}%
  {%
     \PackageError{glossaries-extra}%
     {Unknown abbreviation style formats `#1'}{}%
  }%
  {%
     \csname @glsabbrv@dispstyle@fmts@#1\endcsname
  }%
}
\newif\ifglsxtrinsertinside
\glsxtrinsertinsidefalse
\input{glossaries-extra-abbrstyles.def}
\let\@glsxtr@org@markright\markright
\renewcommand*{\markright}[1]{%
 \glsxtrmarkhook
 \@glsxtr@org@markright{\@glsxtrinmark#1\@glsxtrnotinmark}%
 \glsxtrrestoremarkhook
}
\let\@glsxtr@org@markboth\markboth
\renewcommand*{\markboth}[2]{%
 \glsxtrmarkhook
 \@glsxtr@org@markboth
   {\@glsxtrinmark#1\@glsxtrnotinmark}%
   {\@glsxtrinmark#2\@glsxtrnotinmark}%
 \glsxtrrestoremarkhook
}
\let\@glsxtr@org@@starttoc\@starttoc
\renewcommand*{\@starttoc}[1]{%
 \let\glsxtrifintoc\@firstoftwo
 \glsxtrmarkhook
 \@glsxtrinmark
 \@glsxtr@org@@starttoc{#1}%
 \@glsxtrnotinmark
 \glsxtrrestoremarkhook
 \let\glsxtrifintoc\@secondoftwo
}
\newcommand*{\glsxtrRevertMarks}{%
  \let\markright\@glsxtr@org@markright
  \let\markboth\@glsxtr@org@markboth
  \let\@starttoc\@glsxtr@org@@starttoc
}
\newcommand*{\glsxtrRevertTocMarks}{%
  \let\@starttoc\@glsxtr@org@@starttoc
}
\newcommand*{\glsxtrifinmark}[2]{#2}
\newrobustcmd*{\@glsxtrinmark}{%
  \let\glsxtrifinmark\@firstoftwo
}
\newrobustcmd*{\@glsxtrnotinmark}{%
  \let\glsxtrifinmark\@secondoftwo
}
\newcommand*{\glsxtrtitleorpdforheading}[3]{%
 \glsxtrifinmark{#3}{\glstexorpdfstring{#1}{#2}}}
\ifdef\GetTitleStringDisableCommands
{\GetTitleStringDisableCommands{\let\glsxtrtitleorpdforheading\@thirdofthree
   \let\glsxtrifinmark\@firstoftwo}}
{}
\newcommand*{\glsxtrmarkhook}{%
  \@glsxtr@saveMakeUppercase
  \let\@glsxtr@org@glsxtrtitleorpdforheading\glsxtrtitleorpdforheading
  \let\@glsxtr@org@glsxtrtitleshort\glsxtrtitleshort
  \let\@glsxtr@org@glsxtrtitleshortpl\glsxtrtitleshortpl
  \let\@glsxtr@org@Glsxtrtitleshort\Glsxtrtitleshort
  \let\@glsxtr@org@Glsxtrtitleshortpl\Glsxtrtitleshortpl
  \let\@glsxtr@org@GLSxtrtitleshort\GLSxtrtitleshort
  \let\@glsxtr@org@GLSxtrtitleshortpl\GLSxtrtitleshortpl
  \let\@glsxtr@org@glsxtrtitlename\glsxtrtitlename
  \let\@glsxtr@org@Glsxtrtitlename\Glsxtrtitlename
  \let\@glsxtr@org@glsxtrtitletext\glsxtrtitletext
  \let\@glsxtr@org@Glsxtrtitletext\Glsxtrtitletext
  \let\@glsxtr@org@GLSxtrtitletext\GLSxtrtitletext
  \let\@glsxtr@org@glsxtrtitleplural\glsxtrtitleplural
  \let\@glsxtr@org@Glsxtrtitleplural\Glsxtrtitleplural
  \let\@glsxtr@org@GLSxtrtitleplural\GLSxtrtitleplural
  \let\@glsxtr@org@glsxtrtitlefirst\glsxtrtitlefirst
  \let\@glsxtr@org@Glsxtrtitlefirst\Glsxtrtitlefirst
  \let\@glsxtr@org@glsxtrtitlefirstplural\glsxtrtitlefirstplural
  \let\@glsxtr@org@Glsxtrtitlefirstplural\Glsxtrtitlefirstplural
  \let\@glsxtr@org@GLSxtrtitlefirstplural\GLSxtrtitlefirstplural
  \let\@glsxtr@org@glsxtrtitlelong\glsxtrtitlelong
  \let\@glsxtr@org@glsxtrtitlelongpl\glsxtrtitlelongpl
  \let\@glsxtr@org@Glsxtrtitlelong\Glsxtrtitlelong
  \let\@glsxtr@org@Glsxtrtitlelongpl\Glsxtrtitlelongpl
  \let\@glsxtr@org@glsxtrtitlefull\glsxtrtitlefull
  \let\@glsxtr@org@glsxtrtitlefullpl\glsxtrtitlefullpl
  \let\@glsxtr@org@Glsxtrtitlefull\Glsxtrtitlefull
  \let\@glsxtr@org@Glsxtrtitlefullpl\Glsxtrtitlefullpl
  \let\@glsxtr@org@GLSxtrtitlefull\GLSxtrtitlefull
  \let\@glsxtr@org@GLSxtrtitlefullpl\GLSxtrtitlefullpl
  \let\glsxtrifinmark\@firstoftwo
  \@glsxtr@assignMakeUppercase
  \let\glsxtrtitleorpdforheading\@thirdofthree
  \let\glsxtrtitleshort\glsxtrheadshort
  \let\glsxtrtitleshortpl\glsxtrheadshortpl
  \let\Glsxtrtitleshort\Glsxtrheadshort
  \let\Glsxtrtitleshortpl\Glsxtrheadshortpl
  \let\GLSxtrtitleshort\GLSxtrheadshort
  \let\GLSxtrtitleshortpl\GLSxtrheadshortpl
  \let\glsxtrtitlename\glsxtrheadname
  \let\Glsxtrtitlename\Glsxtrheadname
  \let\GLSxtrtitlename\GLSxtrheadname
  \let\glsxtrtitletext\glsxtrheadtext
  \let\Glsxtrtitletext\Glsxtrheadtext
  \let\GLSxtrtitletext\GLSxtrheadtext
  \let\glsxtrtitleplural\glsxtrheadplural
  \let\Glsxtrtitleplural\Glsxtrheadplural
  \let\GLSxtrtitleplural\GLSxtrheadplural
  \let\glsxtrtitlefirst\glsxtrheadfirst
  \let\Glsxtrtitlefirst\Glsxtrheadfirst
  \let\GLSxtrtitlefirst\GLSxtrheadfirst
  \let\glsxtrtitlefirstplural\glsxtrheadfirstplural
  \let\Glsxtrtitlefirstplural\Glsxtrheadfirstplural
  \let\GLSxtrtitlefirstplural\GLSxtrheadfirstplural
  \let\glsxtrtitlelong\glsxtrheadlong
  \let\glsxtrtitlelongpl\glsxtrheadlongpl
  \let\Glsxtrtitlelong\Glsxtrheadlong
  \let\Glsxtrtitlelongpl\Glsxtrheadlongpl
  \let\glsxtrtitlefull\glsxtrheadfull
  \let\glsxtrtitlefullpl\glsxtrheadfullpl
  \let\Glsxtrtitlefull\Glsxtrheadfull
  \let\Glsxtrtitlefullpl\Glsxtrheadfullpl
  \let\GLSxtrtitlefull\GLSxtrheadfull
  \let\GLSxtrtitlefullpl\GLSxtrheadfullpl
}
\newcommand*{\glsxtrrestoremarkhook}{%
  \let\glsxtrifinmark\@secondoftwo
  \@glsxtr@restoreMakeUppercase
  \let\glsxtrtitleorpdforheading\@glsxtr@org@glsxtrtitleorpdforheading
  \let\glsxtrtitleshort\@glsxtr@org@glsxtrtitleshort
  \let\glsxtrtitleshortpl\@glsxtr@org@glsxtrtitleshortpl
  \let\Glsxtrtitleshort\@glsxtr@org@Glsxtrtitleshort
  \let\Glsxtrtitleshortpl\@glsxtr@org@Glsxtrtitleshortpl
  \let\GLSxtrtitleshort\@glsxtr@org@GLSxtrtitleshort
  \let\GLSxtrtitleshortpl\@glsxtr@org@GLSxtrtitleshortpl
  \let\glsxtrtitlename\@glsxtr@org@glsxtrtitlename
  \let\Glsxtrtitlename\@glsxtr@org@Glsxtrtitlename
  \let\GLSxtrtitlename\@glsxtr@org@GLSxtrtitlename
  \let\glsxtrtitletext\@glsxtr@org@glsxtrtitletext
  \let\Glsxtrtitletext\@glsxtr@org@Glsxtrtitletext
  \let\GLSxtrtitletext\@glsxtr@org@GLSxtrtitletext
  \let\glsxtrtitleplural\@glsxtr@org@glsxtrtitleplural
  \let\Glsxtrtitleplural\@glsxtr@org@Glsxtrtitleplural
  \let\GLSxtrtitleplural\@glsxtr@org@GLSxtrtitleplural
  \let\glsxtrtitlefirst\@glsxtr@org@glsxtrtitlefirst
  \let\Glsxtrtitlefirst\@glsxtr@org@Glsxtrtitlefirst
  \let\GLSxtrtitlefirst\@glsxtr@org@GLSxtrtitlefirst
  \let\glsxtrtitlefirstplural\@glsxtr@org@glsxtrtitlefirstplural
  \let\Glsxtrtitlefirstplural\@glsxtr@org@Glsxtrtitlefirstplural
  \let\GLSxtrtitlefirstplural\@glsxtr@org@GLSxtrtitlefirstplural
  \let\glsxtrtitlelong\@glsxtr@org@glsxtrtitlelong
  \let\glsxtrtitlelongpl\@glsxtr@org@glsxtrtitlelongpl
  \let\Glsxtrtitlelong\@glsxtr@org@Glsxtrtitlelong
  \let\Glsxtrtitlelongpl\@glsxtr@org@Glsxtrtitlelongpl
  \let\glsxtrtitlefull\@glsxtr@org@glsxtrtitlefull
  \let\glsxtrtitlefullpl\@glsxtr@org@glsxtrtitlefullpl
  \let\Glsxtrtitlefull\@glsxtr@org@Glsxtrtitlefull
  \let\Glsxtrtitlefullpl\@glsxtr@org@Glsxtrtitlefullpl
  \let\GLSxtrtitlefull\@glsxtr@org@GLSxtrtitlefull
  \let\GLSxtrtitlefullpl\@glsxtr@org@GLSxtrtitlefullpl
}
\newcommand*{\glsxtrtitleopts}{noindex,hyper=false}
\newcommand*{\glsxtr@title@field}[2]{%
  \expandafter#1\expandafter[\glsxtrtitleopts]{#2}[]%
}
\newcommand*{\glsxtrheadshort}[1]{%
 \protect\NoCaseChange
 {%
   \glsxtrifheaduc{#1}%
   {%
     \GLSxtrshort[noindex,hyper=false]{#1}[]%
   }%
   {%
     \glsxtrshort[noindex,hyper=false]{#1}[]%
   }%
 }%
}
\newrobustcmd*{\glsxtrtitleshort}[1]{%
  \glsxtr@title@field\glsxtrshort{#1}%
}
\newcommand*{\glsxtrheadshortpl}[1]{%
 \protect\NoCaseChange
 {%
   \glsxtrifheaduc{#1}%
   {%
      \GLSxtrshortpl[noindex,hyper=false]{#1}[]%
   }%
   {%
      \glsxtrshortpl[noindex,hyper=false]{#1}[]%
   }%
 }%
}
\newrobustcmd*{\glsxtrtitleshortpl}[1]{%
  \glsxtr@title@field\glsxtrshortpl{#1}%
}
\newcommand*{\Glsxtrheadshort}[1]{%
 \protect\NoCaseChange
 {%
   \glsxtrifheaduc{#1}%
   {%
     \GLSxtrshort[noindex,hyper=false]{#1}[]%
   }%
   {%
     \Glsxtrshort[noindex,hyper=false]{#1}[]%
   }%
 }%
}
\newrobustcmd*{\Glsxtrtitleshort}[1]{%
  \glsxtr@title@field\Glsxtrshort{#1}%
}
\newcommand*{\GLSxtrheadshort}[1]{%
 \protect\NoCaseChange
 {%
   \GLSxtrshort[noindex,hyper=false]{#1}[]%
 }%
}
\newrobustcmd*{\GLSxtrtitleshort}[1]{%
  \glsxtr@title@field\GLSxtrshort{#1}%
}
\newcommand*{\GLSxtrheadshortpl}[1]{%
 \protect\NoCaseChange
 {%
   \GLSxtrshortpl[noindex,hyper=false]{#1}[]%
 }%
}
\newcommand*{\Glsxtrheadshortpl}[1]{%
 \protect\NoCaseChange
 {%
   \glsxtrifheaduc{#1}%
   {%
     \GLSxtrshortpl[noindex,hyper=false]{#1}[]%
   }%
   {%
     \Glsxtrshortpl[noindex,hyper=false]{#1}[]%
   }%
 }%
}
\newrobustcmd*{\Glsxtrtitleshortpl}[1]{%
  \glsxtr@title@field\Glsxtrshortpl{#1}%
}
\newrobustcmd*{\GLSxtrtitleshortpl}[1]{%
  \glsxtr@title@field\GLSxtrshortpl{#1}%
}
\newcommand*{\glsxtrheadname}[1]{%
 \protect\NoCaseChange
 {%
   \glsxtrifheaduc{#1}%
   {%
     \GLSname[noindex,hyper=false]{#1}[]%
   }%
   {%
     \glsname[noindex,hyper=false]{#1}[]%
   }%
 }%
}
\newrobustcmd*{\glsxtrtitlename}[1]{%
  \glsxtr@title@field\glsname{#1}%
}
\newcommand*{\Glsxtrheadname}[1]{%
 \protect\NoCaseChange
 {%
   \glsxtrifheaduc{#1}%
   {%
     \GLSname[noindex,hyper=false]{#1}[]%
   }%
   {%
     \Glsname[noindex,hyper=false]{#1}[]%
   }%
 }%
}
\newrobustcmd*{\Glsxtrtitlename}[1]{%
  \glsxtr@title@field\Glsname{#1}%
}
\newcommand*{\GLSxtrheadname}[1]{%
 \protect\NoCaseChange
 {%
   \GLSname[noindex,hyper=false]{#1}[]%
 }%
}
\newrobustcmd*{\GLSxtrtitlename}[1]{%
  \glsxtr@title@field\GLSname{#1}%
}
\newcommand*{\glsxtrheadtext}[1]{%
 \protect\NoCaseChange
 {%
   \glsxtrifheaduc{#1}%
   {%
     \GLStext[noindex,hyper=false]{#1}[]%
   }%
   {%
     \glstext[noindex,hyper=false]{#1}[]%
   }%
 }%
}
\newrobustcmd*{\glsxtrtitletext}[1]{%
  \glsxtr@title@field\glstext{#1}%
}
\newcommand*{\Glsxtrheadtext}[1]{%
 \protect\NoCaseChange
 {%
   \glsxtrifheaduc{#1}%
   {%
     \GLStext[noindex,hyper=false]{#1}[]%
   }%
   {%
     \Glstext[noindex,hyper=false]{#1}[]%
   }%
 }%
}
\newrobustcmd*{\Glsxtrtitletext}[1]{%
  \glsxtr@title@field\Glstext{#1}%
}
\newcommand*{\GLSxtrheadtext}[1]{%
 \protect\NoCaseChange
 {%
   \GLStext[noindex,hyper=false]{#1}[]%
 }%
}
\newrobustcmd*{\GLSxtrtitletext}[1]{%
  \glsxtr@title@field\GLStext{#1}%
}
\newcommand*{\glsxtrheadplural}[1]{%
 \protect\NoCaseChange
 {%
   \glsxtrifheaduc{#1}%
   {%
     \GLSplural[noindex,hyper=false]{#1}[]%
   }%
   {%
     \glsplural[noindex,hyper=false]{#1}[]%
   }%
 }%
}
\newrobustcmd*{\glsxtrtitleplural}[1]{%
  \glsxtr@title@field\glsplural{#1}%
}
\newcommand*{\Glsxtrheadplural}[1]{%
 \protect\NoCaseChange
 {%
   \glsxtrifheaduc{#1}%
   {%
     \GLSplural[noindex,hyper=false]{#1}[]%
   }%
   {%
     \Glsplural[noindex,hyper=false]{#1}[]%
   }%
 }%
}
\newrobustcmd*{\Glsxtrtitleplural}[1]{%
  \glsxtr@title@field\Glsplural{#1}%
}
\newcommand*{\GLSxtrheadplural}[1]{%
 \protect\NoCaseChange
 {%
   \GLSplural[noindex,hyper=false]{#1}[]%
 }%
}
\newrobustcmd*{\GLSxtrtitleplural}[1]{%
  \glsxtr@title@field\GLSplural{#1}%
}
\newcommand*{\glsxtrheadfirst}[1]{%
 \protect\NoCaseChange
 {%
   \glsxtrifheaduc{#1}%
   {%
     \GLSfirst[noindex,hyper=false]{#1}[]%
   }%
   {%
     \glsfirst[noindex,hyper=false]{#1}[]%
   }%
 }%
}
\newrobustcmd*{\glsxtrtitlefirst}[1]{%
  \glsxtr@title@field\glsfirst{#1}%
}
\newcommand*{\Glsxtrheadfirst}[1]{%
 \protect\NoCaseChange
 {%
   \glsxtrifheaduc{#1}%
   {%
     \GLSfirst[noindex,hyper=false]{#1}[]%
   }%
   {%
     \Glsfirst[noindex,hyper=false]{#1}[]%
   }%
 }%
}
\newrobustcmd*{\Glsxtrtitlefirst}[1]{%
  \glsxtr@title@field\Glsfirst{#1}%
}
\newcommand*{\GLSxtrheadfirst}[1]{%
 \protect\NoCaseChange
 {%
   \GLSfirst[noindex,hyper=false]{#1}[]%
 }%
}
\newrobustcmd*{\GLSxtrtitlefirst}[1]{%
  \glsxtr@title@field\GLSfirst{#1}%
}
\newcommand*{\glsxtrheadfirstplural}[1]{%
 \protect\NoCaseChange
 {%
   \glsxtrifheaduc{#1}%
   {%
     \GLSfirstplural[noindex,hyper=false]{#1}[]%
   }%
   {%
     \glsfirstplural[noindex,hyper=false]{#1}[]%
   }%
 }%
}
\newrobustcmd*{\glsxtrtitlefirstplural}[1]{%
  \glsxtr@title@field\glsfirstplural{#1}%
}
\newcommand*{\Glsxtrheadfirstplural}[1]{%
 \protect\NoCaseChange
 {%
   \glsxtrifheaduc{#1}%
   {%
     \GLSfirstplural[noindex,hyper=false]{#1}[]%
   }%
   {%
     \Glsfirstplural[noindex,hyper=false]{#1}[]%
   }%
 }%
}
\newrobustcmd*{\Glsxtrtitlefirstplural}[1]{%
  \glsxtr@title@field\Glsfirstplural{#1}%
}
\newcommand*{\GLSxtrheadfirstplural}[1]{%
 \protect\NoCaseChange
 {%
   \GLSfirstplural[noindex,hyper=false]{#1}[]%
 }%
}
\newrobustcmd*{\GLSxtrtitlefirstplural}[1]{%
  \glsxtr@title@field\GLSfirstplural{#1}%
}
\newcommand*{\glsxtrheadlong}[1]{%
 \protect\NoCaseChange
 {%
   \glsxtrifheaduc{#1}%
   {%
     \GLSxtrlong[noindex,hyper=false]{#1}[]%
   }%
   {%
     \glsxtrlong[noindex,hyper=false]{#1}[]%
   }%
 }%
}
\newrobustcmd*{\glsxtrtitlelong}[1]{%
  \glsxtr@title@field\glsxtrlong{#1}%
}
\newcommand*{\glsxtrheadlongpl}[1]{%
 \protect\NoCaseChange
 {%
   \glsxtrifheaduc{#1}%
   {%
      \GLSxtrlongpl[noindex,hyper=false]{#1}[]%
   }%
   {%
      \glsxtrlongpl[noindex,hyper=false]{#1}[]%
   }%
 }%
}
\newrobustcmd*{\glsxtrtitlelongpl}[1]{%
  \glsxtr@title@field\glsxtrlongpl{#1}%
}
\newcommand*{\Glsxtrheadlong}[1]{%
 \protect\NoCaseChange
 {%
   \glsxtrifheaduc{#1}%
   {%
     \GLSxtrlong[noindex,hyper=false]{#1}[]%
   }%
   {%
     \Glsxtrlong[noindex,hyper=false]{#1}[]%
   }%
 }%
}
\newrobustcmd*{\Glsxtrtitlelong}[1]{%
  \glsxtr@title@field\Glsxtrlong{#1}%
}
\newrobustcmd*{\GLSxtrtitlelong}[1]{%
  \glsxtr@title@field\GLSxtrlong{#1}%
}
\newcommand*{\GLSxtrheadlong}[1]{%
 \protect\NoCaseChange
 {%
   \GLSxtrlong[noindex,hyper=false]{#1}[]%
 }%
}
\newcommand*{\Glsxtrheadlongpl}[1]{%
 \protect\NoCaseChange
 {%
   \glsxtrifheaduc{#1}%
   {%
     \GLSxtrlongpl[noindex,hyper=false]{#1}[]%
   }%
   {%
     \Glsxtrlongpl[noindex,hyper=false]{#1}[]%
   }%
 }%
}
\newrobustcmd*{\Glsxtrtitlelongpl}[1]{%
  \glsxtr@title@field\Glsxtrlongpl{#1}%
}
\newrobustcmd*{\GLSxtrtitlelongpl}[1]{%
  \glsxtr@title@field\GLSxtrlongpl{#1}%
}
\newcommand*{\GLSxtrheadlongpl}[1]{%
 \protect\NoCaseChange
 {%
   \GLSxtrlongpl[noindex,hyper=false]{#1}[]%
 }%
}
\newcommand*{\glsxtrheadfull}[1]{%
 \protect\NoCaseChange
 {%
   \glsxtrifheaduc{#1}%
   {%
     \GLSxtrfull[noindex,hyper=false]{#1}[]%
   }%
   {%
     \glsxtrfull[noindex,hyper=false]{#1}[]%
   }%
 }%
}
\newrobustcmd*{\glsxtrtitlefull}[1]{%
  \glsxtr@title@field\glsxtrfull{#1}%
}
\newcommand*{\glsxtrheadfullpl}[1]{%
 \protect\NoCaseChange
 {%
   \glsxtrifheaduc{#1}%
   {%
      \GLSxtrfullpl[noindex,hyper=false]{#1}[]%
   }%
   {%
      \glsxtrfullpl[noindex,hyper=false]{#1}[]%
   }%
 }%
}
\newrobustcmd*{\glsxtrtitlefullpl}[1]{%
  \glsxtr@title@field\glsxtrfullpl{#1}%
}
\newcommand*{\Glsxtrheadfull}[1]{%
 \protect\NoCaseChange
 {%
   \glsxtrifheaduc{#1}%
   {%
     \GLSxtrfull[noindex,hyper=false]{#1}[]%
   }%
   {%
     \Glsxtrfull[noindex,hyper=false]{#1}[]%
   }%
 }%
}
\newrobustcmd*{\Glsxtrtitlefull}[1]{%
  \glsxtr@title@field\Glsxtrfull{#1}%
}
\newcommand*{\GLSxtrheadfull}[1]{%
 \protect\NoCaseChange
 {%
   \GLSxtrfull[noindex,hyper=false]{#1}[]%
 }%
}
\newrobustcmd*{\GLSxtrtitlefull}[1]{%
  \glsxtr@title@field\GLSxtrfull{#1}%
}
\newcommand*{\Glsxtrheadfullpl}[1]{%
 \protect\NoCaseChange
 {%
   \glsxtrifheaduc{#1}%
   {%
     \GLSxtrfullpl[noindex,hyper=false]{#1}[]%
   }%
   {%
     \Glsxtrfullpl[noindex,hyper=false]{#1}[]%
   }%
 }%
}
\newrobustcmd*{\Glsxtrtitlefullpl}[1]{%
  \glsxtr@title@field\Glsxtrfullpl{#1}%
}
\newcommand*{\GLSxtrheadfullpl}[1]{%
 \protect\NoCaseChange
 {%
   \GLSxtrfullpl[noindex,hyper=false]{#1}[]%
 }%
}
\newrobustcmd*{\GLSxtrtitlefullpl}[1]{%
  \glsxtr@title@field\GLSxtrfullpl{#1}%
}
\newcommand*{\glsfmtshort}[1]{%
  \glstexorpdfstring
    {\glsxtrtitleshort{#1}}%
    {\glsentryshort{#1}}%
}
\newcommand*{\glsfmtshortpl}[1]{%
  \glstexorpdfstring
    {\glsxtrtitleshortpl{#1}}%
    {\glsentryshortpl{#1}}%
}
\newcommand*{\Glsfmtshort}[1]{%
  \glstexorpdfstring
    {\Glsxtrtitleshort{#1}}%
    {\MFUsentencecase{\glsentryshort{#1}}}%
}
\glsmfuaddmap{\glsfmtshort}{\Glsfmtshort}
\newcommand*{\Glsfmtshortpl}[1]{%
  \glstexorpdfstring
  {\Glsxtrtitleshortpl{#1}}%
  {\MFUsentencecase{\glsentryshortpl{#1}}}%
}
\glsmfuaddmap{\glsfmtshortpl}{\Glsfmtshortpl}
\newcommand*{\GLSfmtshort}[1]{%
  \glstexorpdfstring
    {\GLSxtrtitleshort{#1}}%
    {\GLSxtrusefield{#1}{short}}%
}
\glsmfublocker{\GLSfmtshort}
\newcommand*{\GLSfmtshortpl}[1]{%
  \glstexorpdfstring
    {\GLSxtrtitleshortpl{#1}}%
    {\GLSxtrusefield{#1}{shortpl}}%
}
\glsmfublocker{\GLSfmtshortpl}
\newcommand*{\glsfmtname}[1]{%
  \glstexorpdfstring
  {\glsxtrtitlename{#1}}%
  {\glsentryname{#1}}%
}
\newcommand*{\Glsfmtname}[1]{%
  \glstexorpdfstring
  {\Glsxtrtitlename{#1}}%
  {\MFUsentencecase{\glsentryname{#1}}}%
}
\glsmfuaddmap{\glsfmtname}{\Glsfmtname}
\newcommand*{\GLSfmtname}[1]{%
  \glstexorpdfstring
  {\GLSxtrtitlename{#1}}%
  {\GLSxtrusefield{#1}{name}}%
}
\glsmfublocker{\GLSfmtname}
\newcommand*{\glsfmttext}[1]{%
  \glstexorpdfstring
  {\glsxtrtitletext{#1}}%
  {\glsentrytext{#1}}%
}
\newcommand*{\Glsfmttext}[1]{%
  \glstexorpdfstring
  {\Glsxtrtitletext{#1}}%
  {\MFUsentencecase{\glsentrytext{#1}}}%
}
\glsmfuaddmap{\glsfmttext}{\Glsfmttext}
\newcommand*{\GLSfmttext}[1]{%
  \glstexorpdfstring
  {\GLSxtrtitletext{#1}}%
  {\GLSxtrusefield{#1}{text}}%
}
\glsmfublocker{\GLSfmttext}
\newcommand*{\glsfmtplural}[1]{%
  \glstexorpdfstring
  {\glsxtrtitleplural{#1}}%
  {\glsentryplural{#1}}%
}
\newcommand*{\Glsfmtplural}[1]{%
  \glstexorpdfstring
  {\Glsxtrtitleplural{#1}}%
  {\MFUsentencecase{\glsentryplural{#1}}}%
}
\glsmfuaddmap{\glsfmtplural}{\Glsfmtplural}
\newcommand*{\GLSfmtplural}[1]{%
  \glstexorpdfstring
  {\GLSxtrtitleplural{#1}}%
  {\GLSxtrusefield{#1}{plural}}%
}
\glsmfublocker{\GLSfmtplural}
\newcommand*{\glsfmtfirst}[1]{%
  \glstexorpdfstring
  {\glsxtrtitlefirst{#1}}%
  {\glsentryfirst{#1}}%
}
\newcommand*{\Glsfmtfirst}[1]{%
  \glstexorpdfstring
  {\Glsxtrtitlefirst{#1}}%
  {\MFUsentencecase{\glsentryfirst{#1}}}%
}
\glsmfuaddmap{\glsfmtfirst}{\Glsfmtfirst}
\newcommand*{\GLSfmtfirst}[1]{%
  \glstexorpdfstring
  {\GLSxtrtitlefirst{#1}}%
  {\GLSxtrusefield{#1}{first}}%
}
\glsmfublocker{\GLSfmtfirst}
\newcommand*{\glsfmtfirstpl}[1]{%
  \glstexorpdfstring
  {\glsxtrtitlefirstplural{#1}}%
  {\GLSxtrusefield{#1}{firstpl}}%
}
\newcommand*{\Glsfmtfirstpl}[1]{%
  \glstexorpdfstring
  {\Glsxtrtitlefirstplural{#1}}%
  {\MFUsentencecase{\glsentryfirstplural{#1}}}%
}
\newcommand*{\GLSfmtfirstpl}[1]{%
  \glstexorpdfstring
  {\GLSxtrtitlefirstplural{#1}}%
  {\GLSxtrusefield{#1}{firstpl}}%
}
\glsmfublocker{\GLSfmtfirstpl}
\newcommand*{\glsfmtlong}[1]{%
  \glstexorpdfstring
  {\glsxtrtitlelong{#1}}%
  {\glsentrylong{#1}}%
}
\newcommand*{\Glsfmtlong}[1]{%
  \glstexorpdfstring
  {\Glsxtrtitlelong{#1}}%
  {\MFUsentencecase{\glsentrylong{#1}}}%
}
\glsmfuaddmap{\glsfmtlong}{\Glsfmtlong}
\newcommand*{\GLSfmtlong}[1]{%
  \glstexorpdfstring
  {\GLSxtrtitlelong{#1}}%
  {\GLSxtrusefield{#1}{long}}%
}
\glsmfublocker{\GLSfmtlong}
\newcommand*{\glsfmtlongpl}[1]{%
  \glstexorpdfstring
  {\glsxtrtitlelongpl{#1}}%
  {\glsentrylongpl{#1}}%
}
\newcommand*{\Glsfmtlongpl}[1]{%
  \glstexorpdfstring
  {\Glsxtrtitlelongpl{#1}}%
  {\MFUsentencecase{\glsentrylongpl{#1}}}%
}
\glsmfuaddmap{\glsfmtlongpl}{\Glsfmtlongpl}
\newcommand*{\GLSfmtlongpl}[1]{%
  \glstexorpdfstring
  {\GLSxtrtitlelongpl{#1}}%
  {\GLSxtrusefield{#1}{longpl}}%
}
\glsmfublocker{\GLSfmtlongpl}
\newcommand*{\glspdffmtfull}[1]{\glsentrylong{#1} (\glsentryshort{#1})}%
\newcommand*{\glspdffmtfullpl}[1]{\glsentrylongpl{#1} (\glsentryshortpl{#1})}%
\newcommand*{\glsfmtfull}[1]{%
  \glstexorpdfstring
  {\glsxtrtitlefull{#1}}%
  {\glspdffmtfull{#1}}%
}
\newcommand*{\Glsfmtfull}[1]{%
  \glstexorpdfstring
  {\Glsxtrtitlefull{#1}}%
  {\MFUsentencecase{\glspdffmtfull{#1}{}}}%
}
\glsmfuaddmap{\glsfmtfull}{\Glsfmtfull}
\ExplSyntaxOn
\newcommand*{\GLSfmtfull}[1]{%
  \glstexorpdfstring
  {\GLSxtrtitlefull{#1}}%
  {\text_uppercase:n{\glspdffmtfull{#1}}}%
}
\ExplSyntaxOff
\glsmfublocker{\GLSfmtfull}
\newcommand*{\glsfmtfullpl}[1]{%
  \glstexorpdfstring
  {\glsxtrtitlefullpl{#1}}%
  {\glspdffmtfullpl{#1}}%
}
\newcommand*{\Glsfmtfullpl}[1]{%
  \glstexorpdfstring
  {\Glsxtrtitlefullpl{#1}}%
  {\MFUsentencecase{\glspdffmtfullpl{#1}{}}}%
}
\glsmfuaddmap{\glsfmtfullpl}{\Glsfmtfullpl}
\ExplSyntaxOn
\newcommand*{\GLSfmtfullpl}[1]{%
  \glstexorpdfstring
  {\GLSxtrtitlefullpl{#1}}%
  {\text_uppercase:n{\glspdffmtfullpl{#1}{}}}%
}
\ExplSyntaxOff
\glsmfublocker{\GLSfmtfullpl}
\newcommand{\pglsprefix}[2]{%
  \ifcsempty{glo@\glsdetoklabel{#1}@#2}{}%
  {\csuse{glo@\glsdetoklabel{#1}@#2}\glsprefixsep}%
}
\newcommand{\Pglsprefix}[2]{%
  \Glsxtrusefield{#1}{#2}\glsprefixsep
}
\newcommand{\PGLSprefix}[2]{%
  \ifcsempty{glo@\glsdetoklabel{#1}@#2}{}%
  {\glsuppercase{\csuse{glo@\glsdetoklabel{#1}@#2}\glsprefixsep}}%
}
\newrobustcmd*{\pglsxtrshort}{\@gls@hyp@opt\ns@pglsxtrshort}
\newcommand*{\ns@pglsxtrshort}[2][]{%
  \new@ifnextchar[{\@pglsxtrshort{#1}{#2}}{\@pglsxtrshort{#1}{#2}[]}%
}
\def\@pglsxtrshort#1#2[#3]{%
  \pglsprefix{#2}{prefix}%
  \@glsxtrshort{#1}{#2}[#3]%
}
\newrobustcmd*{\Pglsxtrshort}{\@gls@hyp@opt\ns@Pglsxtrshort}
\newcommand*{\ns@Pglsxtrshort}[2][]{%
  \new@ifnextchar[{\@Pglsxtrshort{#1}{#2}}{\@Pglsxtrshort{#1}{#2}[]}%
}
\def\@Pglsxtrshort#1#2[#3]{%
  \ifglshasprefix{#2}%
  {%
    \Pglsprefix{#2}{prefix}%
    \@glsxtrshort{#1}{#2}[#3]%
  }%
  {\@Glsxtrshort{#1}{#2}[#3]}%
}
\glsmfuaddmap{\pglsxtrshort}{\Pglsxtrshort}
\newrobustcmd*{\PGLSxtrshort}{\@gls@hyp@opt\ns@PGLSxtrshort}
\newcommand*{\ns@PGLSxtrshort}[2][]{%
  \new@ifnextchar[{\@PGLSxtrshort{#1}{#2}}{\@PGLSxtrshort{#1}{#2}[]}%
}
\def\@PGLSxtrshort#1#2[#3]{%
  \PGLSprefix{#2}{prefix}%
  \@GLSxtrshort{#1}{#2}[#3]%
}
\glsmfublocker{\PGLSxtrshort}
\newrobustcmd*{\pglsxtrshortpl}{\@gls@hyp@opt\ns@pglsxtrshortpl}
\newcommand*{\ns@pglsxtrshortpl}[2][]{%
  \new@ifnextchar[{\@pglsxtrshortpl{#1}{#2}}{\@pglsxtrshortpl{#1}{#2}[]}%
}
\def\@pglsxtrshortpl#1#2[#3]{%
  \pglsprefix{#2}{prefixplural}%
  \@glsxtrshortpl{#1}{#2}[#3]%
}
\newrobustcmd*{\Pglsxtrshortpl}{\@gls@hyp@opt\ns@Pglsxtrshortpl}
\newcommand*{\ns@Pglsxtrshortpl}[2][]{%
  \new@ifnextchar[{\@Pglsxtrshortpl{#1}{#2}}{\@Pglsxtrshortpl{#1}{#2}[]}%
}
\def\@Pglsxtrshortpl#1#2[#3]{%
  \ifglshasprefixplural{#2}%
  {%
    \Pglsprefix{#2}{prefixplural}%
    \@glsxtrshortpl{#1}{#2}[#3]%
  }%
  {\@Glsxtrshortpl{#1}{#2}[#3]}%
}
\glsmfuaddmap{\pglsxtrshortpl}{\Pglsxtrshortpl}
\newrobustcmd*{\PGLSxtrshortpl}{\@gls@hyp@opt\ns@PGLSxtrshortpl}
\newcommand*{\ns@PGLSxtrshortpl}[2][]{%
  \new@ifnextchar[{\@PGLSxtrshortpl{#1}{#2}}{\@PGLSxtrshortpl{#1}{#2}[]}%
}
\def\@PGLSxtrshortpl#1#2[#3]{%
  \PGLSprefix{#2}{prefixplural}%
  \@GLSxtrshortpl{#1}{#2}[#3]%
}
\glsmfublocker{\PGLSxtrshortpl}
\newrobustcmd*{\pglsxtrlong}{\@gls@hyp@opt\ns@pglsxtrlong}
\newcommand*{\ns@pglsxtrlong}[2][]{%
  \new@ifnextchar[{\@pglsxtrlong{#1}{#2}}{\@pglsxtrlong{#1}{#2}[]}%
}
\def\@pglsxtrlong#1#2[#3]{%
  \pglsprefix{#2}{prefixfirst}%
  \@glsxtrlong{#1}{#2}[#3]%
}
\newrobustcmd*{\Pglsxtrlong}{\@gls@hyp@opt\ns@Pglsxtrlong}
\newcommand*{\ns@Pglsxtrlong}[2][]{%
  \new@ifnextchar[{\@Pglsxtrlong{#1}{#2}}{\@Pglsxtrlong{#1}{#2}[]}%
}
\def\@Pglsxtrlong#1#2[#3]{%
  \ifglshasprefixfirst{#2}%
  {%
    \Pglsprefix{#2}{prefixfirst}%
    \@glsxtrlong{#1}{#2}[#3]%
  }%
  {\@Glsxtrlong{#1}{#2}[#3]}%
}
\glsmfuaddmap{\pglsxtrlong}{\Pglsxtrlong}
\newrobustcmd*{\PGLSxtrlong}{\@gls@hyp@opt\ns@PGLSxtrlong}
\newcommand*{\ns@PGLSxtrlong}[2][]{%
  \new@ifnextchar[{\@PGLSxtrlong{#1}{#2}}{\@PGLSxtrlong{#1}{#2}[]}%
}
\def\@PGLSxtrlong#1#2[#3]{%
  \PGLSprefix{#2}{prefixfirst}%
  \@GLSxtrlong{#1}{#2}[#3]%
}
\glsmfublocker{\PGLSxtrlong}
\newrobustcmd*{\pglsxtrlongpl}{\@gls@hyp@opt\ns@pglsxtrlongpl}
\newcommand*{\ns@pglsxtrlongpl}[2][]{%
  \new@ifnextchar[{\@pglsxtrlongpl{#1}{#2}}{\@pglsxtrlongpl{#1}{#2}[]}%
}
\def\@pglsxtrlongpl#1#2[#3]{%
  \pglsprefix{#2}{prefixfirstplural}%
  \@glsxtrlongpl{#1}{#2}[#3]%
}
\newrobustcmd*{\Pglsxtrlongpl}{\@gls@hyp@opt\ns@Pglsxtrlongpl}
\newcommand*{\ns@Pglsxtrlongpl}[2][]{%
  \new@ifnextchar[{\@Pglsxtrlongpl{#1}{#2}}{\@Pglsxtrlongpl{#1}{#2}[]}%
}
\def\@Pglsxtrlongpl#1#2[#3]{%
  \ifglshasprefixfirstplural{#2}%
  {%
    \Pglsprefix{#2}{prefixfirstplural}%
    \@glsxtrlongpl{#1}{#2}[#3]%
  }%
  {\@Glsxtrlongpl{#1}{#2}[#3]}%
}
\glsmfuaddmap{\pglsxtrlongpl}{\Pglsxtrlongpl}
\newrobustcmd*{\PGLSxtrlongpl}{\@gls@hyp@opt\ns@PGLSxtrlongpl}
\newcommand*{\ns@PGLSxtrlongpl}[2][]{%
  \new@ifnextchar[{\@PGLSxtrlongpl{#1}{#2}}{\@PGLSxtrlongpl{#1}{#2}[]}%
}
\def\@PGLSxtrlongpl#1#2[#3]{%
  \PGLSprefix{#2}{prefixfirstplural}%
  \@GLSxtrlongpl{#1}{#2}[#3]%
}
\glsmfublocker{\PGLSxtrlongpl}
\newcommand*{\pglsfmtshort}[1]{%
  \pglsprefix{#1}{prefix}%
  \glsfmtshort{#1}%
}
\newcommand*{\Pglsfmtshort}[1]{%
 \glstexorpdfstring
  {\Pglsxtrtitleshort{#1}}%
  {\MFUsentencecase{%
    \pglsprefix{#1}{prefix}%
    \glsentryshort{#1}}%
  }%
}
\glsmfuaddmap{\pglsfmtshort}{\Pglsfmtshort}
\newrobustcmd*{\Pglsxtrtitleshort}[1]{%
  \glsxtr@title@field\Pglsxtrshort{#1}%
}
\newcommand*{\PGLSfmtshort}[1]{%
  \PGLSprefix{#1}{prefix}%
  \GLSfmtshort{#1}%
}
\glsmfublocker{\PGLSfmtshort}
\newcommand*{\pglsfmtshortpl}[1]{%
  \pglsprefix{#1}{prefixplural}%
  \glsfmtshortpl{#1}%
}
\newcommand*{\Pglsfmtshortpl}[1]{%
 \glstexorpdfstring
  {\Pglsxtrtitleshortpl{#1}}%
  {\MFUsentencecase
    {%
      \pglsprefix{#1}{prefixplural}%
      \glsentryshortpl{#1}%
    }%
  }%
}
\glsmfuaddmap{\pglsfmtshortpl}{\Pglsfmtshortpl}
\newrobustcmd*{\Pglsxtrtitleshortpl}[1]{%
  \glsxtr@title@field\Pglsxtrshortpl{#1}%
}
\newcommand*{\PGLSfmtshortpl}[1]{%
  \PGLSprefix{#1}{prefixplural}%
  \GLSfmtshortpl{#1}%
}
\glsmfublocker{\PGLSfmtshortpl}
\newcommand*{\pglsfmtlong}[1]{%
  \pglsprefix{#1}{prefixfirst}%
  \glsfmtlong{#1}%
}
\newcommand*{\Pglsfmtlong}[1]{%
 \glstexorpdfstring
  {\Pglsxtrtitlelong{#1}}%
  {\MFUsentencecase{%
    \pglsprefix{#1}{prefixfirst}%
    \glsentrylong{#1}}%
  }%
}
\glsmfuaddmap{\pglsfmtlong}{\Pglsfmtlong}
\newrobustcmd*{\Pglsxtrtitlelong}[1]{%
  \glsxtr@title@field\Pglsxtrlong{#1}%
}
\newcommand*{\PGLSfmtlong}[1]{%
  \PGLSprefix{#1}{prefixfirst}%
  \GLSfmtlong{#1}%
}
\glsmfublocker{\PGLSfmtlong}
\newcommand*{\pglsfmtlongpl}[1]{%
  \pglsprefix{#1}{prefixfirstplural}%
  \glsfmtlongpl{#1}%
}
\newcommand*{\Pglsfmtlongpl}[1]{%
 \glstexorpdfstring
  {\Pglsxtrtitlelongpl{#1}}%
  {\MFUsentencecase
    {%
      \pglsprefix{#1}{prefixfirstplural}%
      \glsentrylongpl{#1}%
    }%
  }%
}
\glsmfuaddmap{\pglsfmtlongpl}{\Pglsfmtlongpl}
\newrobustcmd*{\Pglsxtrtitlelongpl}[1]{%
  \glsxtr@title@field\Pglsxtrlongpl{#1}%
}
\newcommand*{\PGLSfmtlongpl}[1]{%
  \PGLSprefix{#1}{prefixfirstplural}%
  \GLSfmtlongpl{#1}%
}
\glsmfublocker{\PGLSfmtlongpl}
\newcommand*{\multiglossaryentrysetup}[1]{\setkeys{glsxtrcombined}{#1}}
\newcommand*{\@gls@combined@indexmain}{1}
\define@choicekey{glsxtrcombined}{indexmain}%
 [\@gls@combined@indexmain@val\@gls@combined@indexmain]
 {false,true,first}[true]{}
\newcommand*{\@gls@combined@indexothers}{2}
\define@choicekey{glsxtrcombined}{indexothers}%
 [\@gls@combined@indexothers@val\@gls@combined@indexothers]
 {false,true,first}[true]{}
\newcommand*{\@gls@combined@hyper}{3}
\define@choicekey{glsxtrcombined}{hyper}%
 [\@gls@combined@hyper@val\@gls@combined@hyper]
 {none,allmain,mainonly,individual,otheronly,notmainfirst,nototherfirst,notfirst}{}
\newcommand*{\@gls@combined@encapmain}{glsnumberformat}
\define@key{glsxtrcombined}{encapmain}{%
 \renewcommand*{\@gls@combined@encapmain}{#1}%
}
\newcommand*{\@gls@combined@encapothers}{glsnumberformat}
\define@key{glsxtrcombined}{encapothers}{%
 \renewcommand*{\@gls@combined@encapothers}{#1}%
}
\newcommand*{\@gls@combined@textformat}{@firstofone}
\define@key{glsxtrcombined}{textformat}{%
 \renewcommand*{\@gls@combined@textformat}{#1}%
}
\newcommand*{\@gls@combined@category}{}
\define@key{glsxtrcombined}{category}{%
 \renewcommand*{\@gls@combined@category}{#1}%
}
\define@key{glsxtrcombinedpreopts}{category}{%
 \renewcommand*{\@gls@combined@category}{#1}%
}
\newcommand*{\@gls@combined@mglsopts}{}
\define@key{glsxtrcombined}{mglsopts}{%
 \renewcommand*{\@gls@combined@mglsopts}{#1}%
}
\define@key{glsxtrcombinedpreopts}{mglsopts}{%
 \@gls@combined@mglsopts@do
 {%
   \renewcommand*{\@gls@combined@mglsopts}{#1}%
 }%
}
\newcommand*{\@gls@combined@mglsopts@do}[1]{#1}
\newcommand*{\mgls@disable@mglsopts}{%
 \let\@gls@combined@mglsopts@do\@gls@combined@mglsopts@do@not
}
\newcommand*{\mgls@enable@mglsopts}{%
 \let\@gls@combined@mglsopts@do\@firstofone
}
\newcommand*{\@gls@combined@mglsopts@do@not}[1]{%
  \PackageError{glossaries-extra}{`mglsopts' key not permitted inside
   `setup' value}{}%
}
\newcommand*{\@gls@combined@firstprefix}{}
\define@key{glsxtrcombined}{firstprefix}{%
 \renewcommand*{\@gls@combined@firstprefix}{#1}%
}
\newcommand*{\@gls@combined@usedprefix}{}
\define@key{glsxtrcombined}{usedprefix}{%
 \renewcommand*{\@gls@combined@usedprefix}{#1}%
}
\newcommand*{\@gls@combined@firstsuffix}{}
\define@key{glsxtrcombined}{firstsuffix}{%
 \renewcommand*{\@gls@combined@firstsuffix}{#1}%
}
\newcommand*{\@gls@combined@usedsuffix}{}
\define@key{glsxtrcombined}{usedsuffix}{%
 \renewcommand*{\@gls@combined@usedsuffix}{#1}%
}
\define@boolkey{glsxtrcombined}{firstskipmain}[true]{}
\KV@glsxtrcombined@firstskipmainfalse
\define@boolkey{glsxtrcombined}{firstskipothers}[true]{}
\KV@glsxtrcombined@firstskipothersfalse
\define@boolkey{glsxtrcombined}{usedskipmain}[true]{}
\KV@glsxtrcombined@usedskipmainfalse
\define@boolkey{glsxtrcombined}{usedskipothers}[true]{}
\KV@glsxtrcombined@usedskipothersfalse
\newcommand*{\@gls@combined@postlinks@nr}{0}
\define@choicekey{glsxtrcombined}{postlinks}%
 [\@gls@combined@postlinks@val\@gls@combined@postlinks@nr]
 {none,all,notlast,mainnotlast,mainonly,othernotlast,otheronly}{}
\newcommand*{\@gls@combined@mpostlink@nr}{1}
\define@choicekey{glsxtrcombined}{mpostlink}%
 [\@gls@combined@mpostlink@val\@gls@combined@mpostlink@nr]
 {false,true,firstonly,usedonly}[true]{}
\newcommand*{\@gls@combined@mpostlinkelement@nr}{0}
\define@choicekey{glsxtrcombined}{mpostlinkelement}%
 [\@gls@combined@mpostlinkelement@val\@gls@combined@mpostlinkelement@nr]
 {last,main,custom}{}
\newcommand*{\glsxtrifmulti}[3]{\ifcsdef{@gls@combined@#1@main}{#2}{#3}}
\newcommand*{\glsxtrmultimain}[1]{\csuse{@gls@combined@#1@main}}
\newcommand*{\glsxtrmultilist}[1]{\csuse{@gls@combined@#1@list}}
\newcommand*{\glsxtrmultitotalelements}[1]{\csuse{@gls@combined@#1@total}}
\newcommand*{\glsxtrmultimainindex}[1]{\csuse{@gls@combined@#1@mainindex}}
\newcommand*{\glsxtrmultilastotherindex}[1]{\csuse{@gls@combined@#1@lastotherindex}}
\newif\ifmultiglossaryentryglobal
\multiglossaryentryglobalfalse
\newcount\mglselementindex
\newrobustcmd{\multiglossaryentry}[1][]{%
 \def\@gls@combined@current@opts{#1}%
 \ifnum\@glsxtr@docdefval=1\relax
  \let\@multi@glossentry@donext\@defmultiglossaryentry
 \else
  \let\@multi@glossentry@donext\@multiglossaryentry
 \fi
 \@multi@glossentry@donext
}
\newcommand*{\@multiglossaryentry}[1]{%
  \def\@gls@combined@current@label{#1}%
  \@multi@glossaryentry
}
\newcommand*{\@multi@glossaryentry}[2][]{%
  \ifcsdef{@gls@combined@\@gls@combined@current@label @main}%
  {\PackageError{glossaries-extra}%
    {Multi-entry label `\@gls@combined@current@label' already defined}%
    {}%
  }%
  {%
    \@multi@glossary@entry{#1}{#2}%
  }%
}
\newcommand*{\@defmultiglossaryentry}[1]{%
  \def\@gls@combined@current@label{#1}%
  \@def@multi@glossaryentry
}
\newcommand*{\@def@multi@glossaryentry}[2][]{%
  \let\@def@multi@glossaryentry@do\@multi@glossary@entry
  \ifundef\@glsxtr@docdefs@multilist
  {%
    \gdef\@glsxtr@docdefs@multilist{}%
    \listxadd
     {\@glsxtr@docdefs@multilist}{\expandonce\@gls@combined@current@label}%
  }%
  {%
    \xifinlist{\@gls@combined@current@label}{\@glsxtr@docdefs@multilist}%
    {%
      \PackageError{glossaries-extra}%
      {Multi-entry label `\@gls@combined@current@label' already defined}%
      {}%
      \let\@def@multi@glossaryentry@do\@gobbletwo
    }%
    {%
      \listxadd
       {\@glsxtr@docdefs@multilist}{\expandonce\@gls@combined@current@label}%
    }%
  }%
  \@def@multi@glossaryentry@do{#1}{#2}%
}
\newcommand*{\@multi@glossary@doifexists}{\glsdoifexists}
\newrobustcmd{\providemultiglossaryentry}[2][]{%
 \def\@gls@combined@current@opts{#1}%
 \def\@gls@combined@current@label{#2}%
 \ifcsdef{@gls@combined@\@gls@combined@current@label @main}%
 {\def\@multi@glossentry@donext{\@provide@multi@glossaryentry@noop}}%
 {%
   \ifnum\@glsxtr@docdefval=1\relax
    \def\@multi@glossentry@donext{\@def@multi@glossaryentry}%
   \else
    \def\@multi@glossentry@donext{\@multi@glossaryentry}%
   \fi
 }%
 \@multi@glossentry@donext
}
\newcommand*{\@provide@multi@glossaryentry@noop}[2][]{}
\newcommand*{\@multi@glossaryentry@list}{}
\newcommand*{\@multi@glossary@entry}[2]{%
  \protected@edef\@gls@combined@current@main{#1}%
  \protected@edef\@gls@combined@currentlist{#2}%
  \mglselementindex=0\relax
  \@for\@gls@tmp:=\@gls@combined@currentlist\do{%
    \advance\mglselementindex by 1\relax
    \@multi@glossary@doifexists{\@gls@tmp}{}%
    \let\@gls@combined@finalitem\@gls@tmp
    \ifdefvoid\@gls@combined@current@main
    {}%
    {%
      \ifx\@gls@combined@current@main\@gls@tmp
        \ifmultiglossaryentryglobal
          \global\cslet{@gls@combined@\@gls@combined@current@label @main}%
                \@gls@combined@current@main
          \csxdef{@gls@combined@\@gls@combined@current@label @mainindex}%
                 {\the\mglselementindex}%
        \else
          \cslet{@gls@combined@\@gls@combined@current@label @main}%
                \@gls@combined@current@main
          \csedef{@gls@combined@\@gls@combined@current@label @mainindex}%
                 {\the\mglselementindex}%
        \fi
      \else
        \ifmultiglossaryentryglobal
          \csxdef{@gls@combined@\@gls@combined@current@label @lastotherindex}%
                 {\the\mglselementindex}%
        \else
          \csedef{@gls@combined@\@gls@combined@current@label @lastotherindex}%
                 {\the\mglselementindex}%
        \fi
      \fi
    }%
  }%
  \ifmultiglossaryentryglobal
    \csxdef{@gls@combined@\@gls@combined@current@label @total}%
           {\the\mglselementindex}%
  \else
    \csedef{@gls@combined@\@gls@combined@current@label @total}%
           {\the\mglselementindex}%
  \fi
  \ifnum\mglselementindex<2\relax
     \PackageError{glossaries-extra}{At least 2 labels required in
       multi-entry element list (\number\mglselementindex\space found)}{}%
  \else
    \ifdefvoid\@gls@combined@current@main
    {}%
    {%
      \ifcsundef{@gls@combined@\@gls@combined@current@label @main}%
      {\PackageError{glossaries-extra}%
       {Main element `\@gls@combined@current@main' not found in list}%
       {The final element `\@gls@combined@finalitem' will be used instead}
       \let\@gls@combined@current@main\@empty
      }%
      {}%
    }%
    \ifdefvoid\@gls@combined@current@main
    {%
      \ifmultiglossaryentryglobal
        \global\cslet{@gls@combined@\@gls@combined@current@label @main}%
              \@gls@combined@finalitem
        \global\csletcs{@gls@combined@\@gls@combined@current@label @mainindex}%
          {@gls@combined@\@gls@combined@current@label @total}%
        \csxdef{@gls@combined@\@gls@combined@current@label @lastotherindex}%
               {\the\numexpr\mglselementindex-1 }%
      \else
        \cslet{@gls@combined@\@gls@combined@current@label @main}%
              \@gls@combined@finalitem
        \csletcs{@gls@combined@\@gls@combined@current@label @mainindex}%
          {@gls@combined@\@gls@combined@current@label @total}%
        \csedef{@gls@combined@\@gls@combined@current@label @lastotherindex}%
               {\the\numexpr\mglselementindex-1 }%
      \fi
    }%
    {}%
    \ifmultiglossaryentryglobal
      \global\cslet{@gls@combined@\@gls@combined@current@label @list}%
             \@gls@combined@currentlist
      \protected@csxdef{@gls@combined@\@gls@combined@current@label @options}%
       {\@gls@combined@current@opts}%
      \expandafter\@ifdefinable
       \csname if@gls@combined@\@gls@combined@current@label @flag\endcsname
       {\expandafter\global\expandafter
        \newif\csname if@gls@combined@\@gls@combined@current@label @flag\endcsname}%
      \expandafter\global
       \csname @gls@combined@\@gls@combined@current@label @flagfalse\endcsname
    \else
      \cslet{@gls@combined@\@gls@combined@current@label @list}%
             \@gls@combined@currentlist
      \protected@csedef{@gls@combined@\@gls@combined@current@label @options}%
       {\@gls@combined@current@opts}%
      \newboolean{@gls@combined@\@gls@combined@current@label @flag}%
      \csname @gls@combined@\@gls@combined@current@label @flagfalse\endcsname
    \fi
  \fi
  \writemultiglossentry
   {\@gls@combined@current@opts}{\@gls@combined@current@label}%
   {\csuse{@gls@combined@\@gls@combined@current@label @main}}{#2}%
  \ifmultiglossaryentryglobal
    \ifdefempty\@multi@glossaryentry@list
    {\let\@multi@glossaryentry@list\@gls@combined@current@label}%
    {%
      \eappto\@multi@glossaryentry@list{,\expandonce\@gls@combined@current@label}%
    }%
  \else
    \ifdefempty\@multi@glossaryentry@list
    {\global\let\@multi@glossaryentry@list\@gls@combined@current@label}%
    {%
      \xappto\@multi@glossaryentry@list{,\expandonce\@gls@combined@current@label}%
    }%
  \fi
}
\newcommand*{\@glsxtr@multientry}[4]{%
 \ifnum\@glsxtr@docdefval=1\relax
  \bgroup
    \def\@gls@combined@current@opts{#1}%
    \def\@gls@combined@current@label{#2}%
    \let\@multi@glossary@doifexists\@secondoftwo
    \let\writemultiglossentry\@gobblefour
    \multiglossaryentryglobaltrue
    \@multi@glossary@entry{#3}{#4}%
  \egroup
 \fi
}
\newcommand*{\writemultiglossentry}[4]{%
  \protected@write\@auxout{}{\string\@glsxtr@multientry{#1}{#2}{#3}{#4}}%
}
\newcommand*{\ifmglsused}[3]{%
 \ifbool{@gls@combined@#1@flag}{#2}{#3}%
}
\newcommand*{\mglsunset}[1]{%
 \gls@ifnotmeasuring
 {%
    \glsxtrifmulti{#1}{\@mglsunset{#1}}%
    {%
      \glsxtrundefaction{Multi entry `#1' hasn't been defined}%
      {You need to define `#1' with \string\multiglossaryentry}%
    }%
 }%
}
\newcommand*{\@mglsunset}[1]{%
 \expandafter\global\csname @gls@combined@#1@flagtrue\endcsname
}
\newcommand*{\mglsreset}[1]{%
 \gls@ifnotmeasuring
 {%
    \glsxtrifmulti{#1}{\@mglsreset{#1}}%
    {%
      \glsxtrundefaction{Multi entry `#1' hasn't been defined}%
      {You need to define `#1' with \string\multiglossaryentry}%
    }%
 }%
}
\newcommand*{\@mglsreset}[1]{%
 \expandafter\global\csname @gls@combined@#1@flagfalse\endcsname
}
\newcommand*{\mglslocalunset}[1]{%
 \gls@ifnotmeasuring
 {%
    \glsxtrifmulti{#1}{\@mglslocalunset{#1}}%
    {%
      \glsxtrundefaction{Multi entry `#1' hasn't been defined}%
      {You need to define `#1' with \string\multiglossaryentry}%
    }%
 }%
}
\newcommand*{\@mglslocalunset}[1]{%
 \csname @gls@combined@#1@flagtrue\endcsname
}
\newcommand*{\mglslocalreset}[1]{%
 \gls@ifnotmeasuring
 {%
    \glsxtrifmulti{#1}{\@mglslocalreset{#1}}%
    {%
      \glsxtrundefaction{Multi entry `#1' hasn't been defined}%
      {You need to define `#1' with \string\multiglossaryentry}%
    }%
 }%
}
\newcommand*{\@mglslocalreset}[1]{%
 \csname @gls@combined@#1@flagfalse\endcsname
}
\newcommand*{\mglsunsetall}{%
  \@for\@mgls@thislabel:=\@multi@glossaryentry@list\do{\mglsunset\@mgls@thislabel}%
}%
\newcommand*{\mglsresetall}{%
  \@for\@mgls@thislabel:=\@multi@glossaryentry@list\do{\mglsreset\@mgls@thislabel}%
}%
\newrobustcmd{\mglsSetMain}[2]{%
  \ifcsundef{@gls@combined@#1@main}%
  {\PackageError{glossaries-extra}{Multi-entry label `#1' not defined}{}}%
  {%
    \protected@edef\@gls@combined@current@main{#2}%
    \letcs\@gls@combined@currentlist{@gls@combined@#1@list}%
    \mglselementindex=0\relax
    \count@=0\relax
    \@for\@gls@tmp:=\@gls@combined@currentlist\do{%
      \advance\mglselementindex by 1\relax
      \ifx\@gls@combined@current@main\@gls@tmp
        \count@=\mglselementindex\relax
        \let\@gls@combined@finalitem\@gls@tmp
        \ifmultiglossaryentryglobal
          \global\cslet{@gls@combined@#1@main}\@gls@combined@current@main
          \csxdef{@gls@combined@#1@mainindex}{\the\mglselementindex}%
        \else
          \cslet{@gls@combined@#1@main}\@gls@combined@current@main
          \csedef{@gls@combined@#1@mainindex}{\the\mglselementindex}%
        \fi
      \else
        \ifmultiglossaryentryglobal
          \csxdef{@gls@combined@#1@lastotherindex}{\the\mglselementindex}%
        \else
          \csedef{@gls@combined@#1@lastotherindex}{\the\mglselementindex}%
        \fi
      \fi
    }%
    \ifnum\count@=0\relax
      \PackageError{glossaries-extra}{Label `#2' is not in `#1' set
       (\@gls@combined@currentlist)}{}%
      \ifmultiglossaryentryglobal
        \global\cslet{@gls@combined@#1@main}\@gls@combined@finalitem
        \csxdef{@gls@combined@#1@mainindex}{\the\mglselementindex}%
        \csxdef{@gls@combined@#1@lastotherindex}{%
          \number\numexpr\mglselementindex-1 }%
      \else
        \cslet{@gls@combined@#1@main}\@gls@combined@finalitem
        \csedef{@gls@combined@#1@mainindex}{\the\mglselementindex}%
        \csedef{@gls@combined@#1@lastotherindex}{%
          \number\numexpr\mglselementindex-1 }%
      \fi
    \fi
  }%
}
\newrobustcmd{\mglsSetOptions}[2]{%
  \ifcsundef{@gls@combined@#1@main}%
  {\PackageError{glossaries-extra}{Multi-entry label `#1' not defined}{}}%
  {%
    \csdef{@gls@combined@#1@options}{#2}%
  }%
}
\newrobustcmd{\mglsAddOptions}[2]{%
  \ifcsundef{@gls@combined@#1@main}%
  {\PackageError{glossaries-extra}{Multi-entry label `#1' not defined}{}}%
  {%
    \ifcsempty{@gls@combined@#1@options}%
    {\csdef{@gls@combined@#1@options}{#2}}%
    {\csappto{@gls@combined@#1@options}{,#2}}%
  }%
}
\newcommand*{\@mgls@all}{}
\define@key{mgls}{all}{\renewcommand*{\@mgls@all}{#1}}
\newcommand*{\@mgls@main}{}
\define@key{mgls}{main}{\renewcommand*{\@mgls@main}{#1}}
\newcommand*{\@mgls@others}{}
\define@key{mgls}{others}{\renewcommand*{\@mgls@others}{#1}}
\newcommand*{\@mgls@setup}{}
\define@key{mgls}{setup}{%
 \@mgls@setup@do{\renewcommand*{\@mgls@setup}{#1}}%
}
\newcommand*{\@mgls@setup@do}[1]{#1}
\newcommand*{\@mgls@setup@do@not}[1]{%
  \PackageError{glossaries-extra}{`setup' key not permitted inside
   `mglsopts' value}{}%
}
\newcommand*{\mgls@disable@setup}{%
  \let\@mgls@setup@do\@mgls@setup@do@not
}
\newcommand*{\mgls@enable@setup}{%
  \let\@mgls@setup@do\@firstofone
}
\newcommand\@mgls@unsetaction{0}
\define@choicekey{mgls}{multiunset}[\@mgls@unsetaction@val\@mgls@unsetaction]%
 {global,local,none}{}
\define@boolkey{mgls}{presetlocal}[true]{}
\KV@mgls@presetlocalfalse
\newcommand*{\@mgls@hyper}{}
\define@choicekey{mgls}{hyper}[\@mgls@hyper@val\@mgls@hyper@nr]{true,false}[true]%
{%
  \renewcommand*{\@mgls@hyper}{hyper=#1}%
  \ifnum\@mgls@hyper@nr=1\relax
   \let\@mgls@hyperlink\@secondoftwo
  \else
   \let\@mgls@hyperlink\@@mgls@hyperlink
  \fi
}
\newcommand*{\@@mgls@hyperlink}[2]{%
  \ifx\@glslink\glsdonohyperlink
   #2%
  \else
   \glsxtr@org@dohyperlink{\glolinkprefix#1}{#2}%
  \fi
}
\let\@mgls@hyperlink\@@mgls@hyperlink
\newcommand*{\mglsforelements}[3]{%
  \expandafter\@for\expandafter#2\expandafter:\expandafter
    =\csname @gls@combined@#1@list\endcsname\do{#3}%
}
\newcommand*{\mglsforotherelements}[3]{%
  \expandafter\@for\expandafter#2\expandafter:\expandafter
    =\csname @gls@combined@#1@list\endcsname\do
  {\expandafter\ifdefequal\csname @gls@combined@#1@main\endcsname{#2}{}{#3}}%
}
\newcommand*{\mglsunsetothers}[1]{%
  \mglsforotherelements{#1}{\@gls@tmp}{\glsunset{\@gls@tmp}}%
}
\newcommand*{\mglslocalunsetothers}[1]{%
  \mglsforotherelements{#1}{\@gls@tmp}{\glslocalunset{\@gls@tmp}}%
}
\newcommand*{\mglselementreset}[1]{%
 \ifKV@mgls@presetlocal
  \glslocalreset{#1}%
 \else
  \glsreset{#1}%
 \fi
}
\newcommand*{\mglselementunset}[1]{%
 \ifKV@mgls@presetlocal
  \glslocalunset{#1}%
 \else
  \glsunset{#1}%
 \fi
}
\newcommand*{\@mgls@resetall}{}
\define@choicekey{mgls}{resetall}%
[\@mgls@resetall@val\@mgls@resetall@nr]{false,true}[true]%
{%
 \ifcase\@mgls@resetall@nr\relax
   \renewcommand*{\@mgls@resetall}{}%
 \or
   \renewcommand*{\@mgls@resetall}{%
     \@for\@gls@resetlabel:=\mglscurrentlist\do{\mglselementreset\@gls@resetlabel}}%
   \renewcommand*{\@mgls@unsetall}{}%
 \fi
}
\newcommand*{\@mgls@resetmain}{}
\define@choicekey{mgls}{resetmain}
[\@mgls@resetmain@val\@mgls@resetmain@nr]{false,true}[true]%
{%
 \ifcase\@mgls@resetmain@nr\relax
   \renewcommand*{\@mgls@resetmain}{}%
 \or
   \renewcommand*{\@mgls@resetmain}{\mglselementreset\mglscurrentmainlabel}%
   \renewcommand*{\@mgls@unsetmain}{}%
 \fi
}
\newcommand*{\@mgls@resetothers}{}
\define@choicekey{mgls}{resetothers}
[\@mgls@resetothers@val\@mgls@resetothers@nr]{false,true}[true]%
{%
 \ifcase\@mgls@resetothers@nr\relax
   \renewcommand*{\@mgls@resetothers}{}%
 \or
   \renewcommand*{\@mgls@resetothers}{%
     \@for\@gls@resetlabel:=\mglscurrentlist\do{%
       \ifx\@gls@resetlabel\mglscurrentmainlabel
       \else
         \mglselementreset\@gls@resetlabel
       \fi
     }%
   }%
   \renewcommand*{\@mgls@unsetothers}{}%
 \fi
}
\newcommand*{\@mgls@unsetall}{}
\define@choicekey{mgls}{unsetall}%
[\@mgls@unsetall@val\@mgls@unsetall@nr]{false,true}[true]%
{%
 \ifcase\@mgls@unsetall@nr\relax
   \renewcommand*{\@mgls@unsetall}{}%
 \or
   \renewcommand*{\@mgls@unsetall}{%
     \@for\@gls@unsetlabel:=\mglscurrentlist\do{\mglselementunset\@gls@unsetlabel}}%
   \renewcommand*{\@mgls@resetall}{}%
 \fi
}
\newcommand*{\@mgls@unsetmain}{}
\define@choicekey{mgls}{unsetmain}
[\@mgls@unsetmain@val\@mgls@unsetmain@nr]{false,true}[true]%
{%
 \ifcase\@mgls@unsetmain@nr\relax
   \renewcommand*{\@mgls@unsetmain}{}%
 \or
   \renewcommand*{\@mgls@unsetmain}{\mglselementunset\mglscurrentmainlabel}%
   \renewcommand*{\@mgls@resetmain}{}%
 \fi
}
\newcommand*{\@mgls@unsetothers}{}
\define@choicekey{mgls}{unsetothers}
[\@mgls@unsetothers@val\@mgls@unsetothers@nr]{false,true}[true]%
{%
 \ifcase\@mgls@unsetothers@nr\relax
   \renewcommand*{\@mgls@unsetothers}{}%
 \or
   \renewcommand*{\@mgls@unsetothers}{%
     \@for\@gls@unsetlabel:=\mglscurrentlist\do{%
       \ifx\@gls@unsetlabel\mglscurrentmainlabel
       \else
         \mglselementunset\@gls@unsetlabel
       \fi
     }%
   }%
   \renewcommand*{\@mgls@resetothers}{}%
 \fi
}
\newcommand{\glsxtr@setup@docurrent}{%
 \ifx\mglscurrentlabel\mglscurrentmainlabel
   \mglsisfirstuse
   {%
     \ifKV@glsxtrcombined@firstskipmain
       \let\@mgls@do@current@element\@gobble
     \else
       \let\@mgls@do@current@element\@firstofone
     \fi
   }%
   {%
     \ifKV@glsxtrcombined@usedskipmain
       \let\@mgls@do@current@element\@gobble
     \else
       \let\@mgls@do@current@element\@firstofone
     \fi
   }%
 \else
   \mglsisfirstuse
   {%
     \ifKV@glsxtrcombined@firstskipothers
       \let\@mgls@do@current@element\@gobble
     \else
       \let\@mgls@do@current@element\@firstofone
     \fi
   }%
   {%
     \ifKV@glsxtrcombined@usedskipothers
       \let\@mgls@do@current@element\@gobble
     \else
       \let\@mgls@do@current@element\@firstofone
     \fi
   }%
 \fi
}
\newcommand*{\glsxtr@mgls@checklastelement}[2]{%
  \ifbool{KV@glsxtrcombined@#1skipmain}%
  {%
    \ifbool{KV@glsxtrcombined@#1skipothers}%
    {%
    }%
    {%
      \ifnum\mglselementindex=\glsxtrmultilastotherindex{#2}\relax
        \let\mglsiflast\@firstoftwo
      \else
        \let\mglsiflast\@secondoftwo
      \fi
    }%
  }%
  {%
     \ifbool{KV@glsxtrcombined@#1skipothers}%
     {%
       \ifnum\mglselementindex=\glsxtrmultimainindex{#2}\relax
         \let\mglsiflast\@firstoftwo
       \else
         \let\mglsiflast\@secondoftwo
       \fi
     }%
     {%
       \let\mglsiflast\@secondoftwo
     }%
  }%
}
\newcommand{\glsxtrmglsWarnAllSkipped}[3]{%
  \GlossariesExtraWarning{#1}%
  #3{#2}%
}
\newcommand*{\glsxtr@mgls@applyopts}[1]{%
  \edef\@mgls@dooptions{\noexpand\setkeys*{mgls}{\expandonce#1}}%
  \@mgls@dooptions
  \ifdefvoid\XKV@rm{}{\eappto\@mgls@all{,\expandonce\XKV@rm}}%
  \ifdefvoid\@mgls@setup
  {}%
  {%
    \edef\@mgls@dooptions{%
       \noexpand\setkeys*{glsxtrcombinedpreopts}{\expandonce\@mgls@setup}}%
    \mgls@disable@mglsopts
    \@mgls@dooptions
    \mgls@enable@mglsopts
    \ifx\@mgls@setupoptions\@empty
      \let\@mgls@setupoptions\XKV@rm
    \else
      \eappto\@mgls@setupoptions{,\expandonce\XKV@rm}%
    \fi
  }%
  \@mgls@resetall
  \@mgls@unsetall
  \@mgls@resetmain
  \@mgls@unsetmain
  \@mgls@resetothers
  \@mgls@unsetothers
  \let\@mgls@resetall\@empty
  \let\@mgls@resetmain\@empty
  \let\@mgls@resetothers\@empty
  \let\@mgls@unsetall\@empty
  \let\@mgls@unsetmain\@empty
  \let\@mgls@unsetothers\@empty
  \ifmglsused\mglscurrentmultilabel
  {\let\mglsisfirstuse\@secondoftwo}%
  {\let\mglsisfirstuse\@firstoftwo}%
}
\providecommand{\@firstofthree}[3]{#1}
\providecommand{\@secondofthree}[3]{#2}
\providecommand{\@thirdofthree}[3]{#3}
\newcommand*{\glsxtr@mgls@inner}[7]{%
 \let\mglslastmainlabel\@empty
 \let\mglsiflastmainwasfirstuse\@firstoftwo
 \let\mglsiflastmainwasplural\@secondoftwo
 \let\mglsiflastmaincapscase\@firstofthree
 \let\mglsiflastmainskipped\@firstoftwo
 \bgroup
 \ifcsundef{@gls@combined@#2@main}%
 {%
   \glsxtrundefaction{Multi entry `#2' hasn't been defined}%
   {You need to define `#2' with \string\multiglossaryentry}%
   \gdef\@mgls@post@hookdefs{%
     \protected@edef\mglslastmultilabel{#2}%
     \let\mglswasfirstuse\@firstoftwo
     \let\mglslastcategory\@empty
     \let\mglsiflastelementskipped\@firstoftwo
     \let\mglsiflastelementwasfirstuse\@firstoftwo
     \let\mglsiflastelementwasplural\@secondoftwo
     \let\mglsiflastelementcapscase\@firstofthree
     \let\mglslastelementlabel\@empty
     \let\mgls@do@postlinkhook\relax
   }%
 }%
 {%
   \let\glsxtrifwasfirstuse\@firstoftwo
   \let\glsifplural\@secondoftwo
   \let\glscapscase\@firstofthree
   \protected@edef\mglscurrentmultilabel{#2}%
   \letcs\mglscurrentmainlabel{@gls@combined@#2@main}%
   \letcs\mglscurrentlist{@gls@combined@#2@list}%
   \letcs\mglscurrentoptions{@gls@combined@#2@options}%
   \ifmglsused\mglscurrentmultilabel
   {\let\mglsisfirstuse\@secondoftwo}%
   {\let\mglsisfirstuse\@firstoftwo}%
   \edef\@mgls@dooptions{%
      \noexpand\setkeys*{glsxtrcombinedpreopts}{\expandonce\mglscurrentoptions}}%
   \@mgls@dooptions
   \let\@mgls@setupoptions\XKV@rm
   \mgls@disable@setup
   \ifdefvoid\@gls@combined@mglsopts
   {}%
   {\glsxtr@mgls@applyopts\@gls@combined@mglsopts}%
   \mgls@enable@setup
   \ifstrempty{#1}{}{\def\@mgls@options{#1}\glsxtr@mgls@applyopts\@mgls@options}%
   \ifx\@gls@combined@category\empty
   \else
     \glshascategoryattribute{\@gls@combined@category}{multioptions}%
     {%
       \letcs\@mgls@attroptions{@glsxtr@categoryattr@@\@gls@combined@category
           @multioptions}%
       \let\@gls@combined@mglsopts\@empty
       \edef\@mgls@dooptions{%
         \noexpand\setkeys*{glsxtrcombinedpreopts}{\expandonce\@mgls@attroptions}}%
       \@mgls@dooptions
       \eappto\@mgls@setupoptions{,\expandonce\XKV@rm}%
       \ifx\@gls@combined@mglsopts\@empty
       \else
         \let\@mgls@setup\@empty
         \mgls@disable@setup
         \glsxtr@mgls@applyopts\@gls@combined@mglsopts
         \mgls@enable@setup
       \fi
     }%
     {}%
   \fi
   \edef\@mgls@dooptions{%
      \noexpand\setkeys{glsxtrcombined}{\expandonce\@mgls@setupoptions}}%
   \@mgls@dooptions
   \let\mglscurrentcategory\@gls@combined@category
   \ifnum\@gls@combined@hyper=1\relax
     \def\@mgls@combinedlink{\@mgls@hyperlink{\mglscurrentmainlabel}}%
   \else
     \def\@mgls@combinedlink{\@firstofone}%
   \fi
   \def\@gls@combined@encapsulator##1{%
       \@mgls@combinedlink{\csuse{\@gls@combined@textformat}{##1}}}%
   \let\@mgls@do@current@element\@firstofone
   \mglsisfirstuse
   {%
     \ifKV@glsxtrcombined@firstskipmain
       \ifKV@glsxtrcombined@firstskipothers
         \let\@gls@org@combined@encapsulator\@gls@combined@encapsulator
         \def\@gls@combined@encapsulator##1{%
           \glsxtrmglsWarnAllSkipped{All elements skipped for
             first use of multi-entry `#2'}{#3}%
             {\@gls@org@combined@encapsulator}%
         }%
         \let\@mgls@do@current@element\@gobble
       \fi
     \fi
   }%
   {%
     \ifKV@glsxtrcombined@usedskipmain
       \ifKV@glsxtrcombined@usedskipothers
         \let\@gls@org@combined@encapsulator\@gls@combined@encapsulator
         \def\@gls@combined@encapsulator##1{%
           \glsxtrmglsWarnAllSkipped{All elements skipped for
             subsequent use of multi-entry `#2'}{#3}%
             {\@gls@org@combined@encapsulator}%
         }%
         \let\@mgls@do@current@element\@gobble
       \fi
     \fi
   }%
   \mglsisfirstuse
   {%
     \let\mglscurrentprefix\@gls@combined@firstprefix
     \let\mglscurrentsuffix\@gls@combined@firstsuffix
   }%
   {%
     \let\mglscurrentprefix\@gls@combined@usedprefix
     \let\mglscurrentsuffix\@gls@combined@usedsuffix
   }%
   \xdef\@mgls@post@hookdefs{%
    \noexpand\def\noexpand\mglslastmultilabel{\expandonce\mglscurrentmultilabel}%
    \noexpand\def\noexpand\mglslastcategory{\mglscurrentcategory}%
   }%
   \ifx\@mgls@do@current@element\@gobble
     \gappto\@mgls@post@hookdefs{%
       \let\mglsiflastelementskipped\@firstoftwo
       \let\mglslastelementlabel\@empty
       \let\mglsiflastelementwasfirstuse\@firstoftwo
       \let\mglsiflastelementwasplural\@secondoftwo
       \let\mglsiflastelementcapscase\@firstofthree
     }%
   \fi
   \mglsisfirstuse
   {%
     \gappto\@mgls@post@hookdefs{\let\mglswasfirstuse\@firstoftwo}%
     \ifcase\@gls@combined@mpostlink@nr\relax
       \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\relax}%
     \or
       \ifcase\@gls@combined@mpostlinkelement@nr\relax
         \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglslastelementpostlinkhook}%
       \or
         \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglslastmainpostlinkhook}%
       \or
         \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglscustompostlinkhook}%
       \fi
     \or
       \ifcase\@gls@combined@mpostlinkelement@nr\relax
         \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglslastelementpostlinkhook}%
       \or
         \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglslastmainpostlinkhook}%
       \or
         \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglscustompostlinkhook}%
       \fi
     \or
       \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\relax}%
     \fi
   }%
   {%
     \gappto\@mgls@post@hookdefs{\let\mglswasfirstuse\@secondoftwo}%
     \ifcase\@gls@combined@mpostlink@nr\relax
       \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\relax}%
     \or
       \ifcase\@gls@combined@mpostlinkelement@nr\relax
         \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglslastelementpostlinkhook}%
       \or
         \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglslastmainpostlinkhook}%
       \or
         \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglscustompostlinkhook}%
       \fi
     \or
       \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\relax}%
     \or
       \ifcase\@gls@combined@mpostlinkelement@nr\relax
         \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglslastelementpostlinkhook}%
       \or
         \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglslastmainpostlinkhook}%
       \or
         \gappto\@mgls@post@hookdefs{\let\mgls@do@postlinkhook\mglscustompostlinkhook}%
       \fi
     \fi
   }%
   \let\mgls@org@postlinkhook\glspostlinkhook
   \mglsprefix
   \let\mglslastelementlabel\@empty
   \@gls@combined@encapsulator
   {%
    \def\@mgls@previouslabel{}%
    \mglselementindex=0\relax
    \@for\mglscurrentlabel:=\mglscurrentlist\do{%
     \advance\mglselementindex by 1\relax
     \glsxtr@setup@docurrent
     \ifx\@xfor@nextelement\@nnil
       \let\mglsiflast\@firstoftwo
     \else
       \let\mglsiflast\@secondoftwo
       \mglsisfirstuse
       {%
        \glsxtr@mgls@checklastelement{first}{#2}%
       }%
       {%
        \glsxtr@mgls@checklastelement{used}{#2}%
       }%
     \fi
     \ifcase\@gls@combined@postlinks@nr\relax
       \let\glspostlinkhook\relax
     \or
       \let\glspostlinkhook\mgls@org@postlinkhook
     \or
       \mglsiflast
       {%
         \let\glspostlinkhook\relax
       }%
       {%
         \let\glspostlinkhook\mgls@org@postlinkhook
       }%
     \or
       \ifx\mglscurrentlabel\mglscurrentmainlabel
         \mglsiflast
         {%
           \let\glspostlinkhook\relax
         }%
         {%
           \let\glspostlinkhook\mgls@org@postlinkhook
         }%
       \else
         \let\glspostlinkhook\relax
       \fi
     \or
       \ifx\mglscurrentlabel\mglscurrentmainlabel
         \let\glspostlinkhook\mgls@org@postlinkhook
       \else
         \let\glspostlinkhook\relax
       \fi
     \or
       \ifx\mglscurrentlabel\mglscurrentmainlabel
         \let\glspostlinkhook\relax
       \else
         \mglsiflast
         {%
           \let\glspostlinkhook\relax
         }%
         {%
           \let\glspostlinkhook\mgls@org@postlinkhook
         }%
       \fi
     \or
       \ifx\mglscurrentlabel\mglscurrentmainlabel
         \let\glspostlinkhook\relax
       \else
         \let\glspostlinkhook\mgls@org@postlinkhook
       \fi
     \fi
     \mglsiflast
     {%
       \xappto\@mgls@post@hookdefs{%
         \noexpand\def\noexpand\mglslastelementlabel
           {\expandonce\mglscurrentlabel}}%
     }%
     {}%
     \@mgls@do@current@element
     {%
       \mglselementprehook
       \GlsXtrIfUnusedOrUndefined{\mglscurrentlabel}%
       {\let\@mgls@current@iffirstuse\@firstoftwo}%
       {\let\@mgls@current@iffirstuse\@secondoftwo}%
       \ifx\mglscurrentlabel\mglscurrentmainlabel
         \edef\@mgls@current@options{format=\@gls@combined@encapmain}%
         \ifcase\@gls@combined@indexmain
          \appto\@mgls@current@options{,noindex}%
         \or
          \appto\@mgls@current@options{,noindex=false}%
         \or
          \@mgls@current@iffirstuse
          {\appto\@mgls@current@options{,noindex=false}}%
          {\appto\@mgls@current@options{,noindex}}%
         \fi
         \ifcase\@gls@combined@hyper\relax
           \appto\@mgls@current@options{,hyper=false}% none
         \or
           \appto\@mgls@current@options{,hyper=false}% allmain
         \or
           \eappto\@mgls@current@options{,\@mgls@hyper}% mainonly
         \or
           \eappto\@mgls@current@options{,\@mgls@hyper}% individual
         \or
           \appto\@mgls@current@options{,hyper=false}% otheronly
         \or
          \mglsisfirstuse
          {%
           \appto\@mgls@current@options{,hyper=false}% notmainfirst
          }%
          {%
           \eappto\@mgls@current@options{,\@mgls@hyper}% notmainfirst
          }%
         \or
           \eappto\@mgls@current@options{,\@mgls@hyper}% nototherfirst
         \or
          \mglsisfirstuse
          {%
           \appto\@mgls@current@options{,hyper=false}% notfirst
          }%
          {%
           \eappto\@mgls@current@options{,\@mgls@hyper}% notfirst
          }%
         \fi
         \eappto\@mgls@current@options{,\@mgls@all,\@mgls@main}%
       \else
         \edef\@mgls@current@options{format=\@gls@combined@encapothers}%
         \ifcase\@gls@combined@indexothers\relax
          \appto\@mgls@current@options{,noindex}%
         \or
          \appto\@mgls@current@options{,noindex=false}%
         \or
          \@mgls@current@iffirstuse
          {\appto\@mgls@current@options{,noindex=false}}%
          {\appto\@mgls@current@options{,noindex}}%
         \fi
         \ifcase\@gls@combined@hyper\relax
           \appto\@mgls@current@options{,hyper=false}% none
         \or
           \appto\@mgls@current@options{,hyper=false}% allmain
         \or
           \appto\@mgls@current@options{,hyper=false}% mainonly
         \or
           \eappto\@mgls@current@options{,\@mgls@hyper}% individual
         \or
           \eappto\@mgls@current@options{,\@mgls@hyper}% otheronly
         \or
           \eappto\@mgls@current@options{,\@mgls@hyper}% notmainfirst
         \or
          \mglsisfirstuse
          {%
           \appto\@mgls@current@options{,hyper=false}% nototherfirst
          }%
          {%
           \eappto\@mgls@current@options{,\@mgls@hyper}% nototherfirst
          }%
         \or
          \mglsisfirstuse
          {%
           \appto\@mgls@current@options{,hyper=false}% notfirst
          }%
          {%
           \eappto\@mgls@current@options{,\@mgls@hyper}% notfirst
          }%
         \fi
         \eappto\@mgls@current@options{,\@mgls@all,\@mgls@others}%
       \fi
       \ifx\@mgls@previouslabel\empty
        \ifx\mglscurrentlabel\mglscurrentmainlabel
          \let\@mgls@cs#6\relax
        \else
          \let\@mgls@cs#4\relax
        \fi
       \else
         \@mgls@previous@iffirstuse
         {%
           \@mgls@current@iffirstuse
           {\glscombinedfirstsepfirst{\@mgls@previouslabel}{\mglscurrentlabel}}%
           {\glscombinedfirstsep{\@mgls@previouslabel}{\mglscurrentlabel}}%
         }%
         {%
           \@mgls@current@iffirstuse
           {\glscombinedsepfirst{\@mgls@previouslabel}{\mglscurrentlabel}}%
           {\glscombinedsep{\@mgls@previouslabel}{\mglscurrentlabel}}%
         }%
        \ifx\mglscurrentlabel\mglscurrentmainlabel
          \let\@mgls@cs#7\relax
        \else
          \let\@mgls@cs#5\relax
        \fi
       \fi
       \mglsiflast
        {\expandafter\@mgls@cs\expandafter{\@mgls@current@options}{\mglscurrentlabel}[#3]}%
        {\expandafter\@mgls@cs\expandafter{\@mgls@current@options}{\mglscurrentlabel}[]}%
       \ifx\mglscurrentlabel\mglscurrentmainlabel
        \xappto\@mgls@post@hookdefs{%
          \noexpand\def\noexpand\mglslastmainlabel
            {\expandonce\mglscurrentmainlabel}%
        }%
        \glsxtrifwasfirstuse
        {%
         \gappto\@mgls@post@hookdefs{\let\mglsiflastmainwasfirstuse\@firstoftwo}%
        }%
        {%
         \gappto\@mgls@post@hookdefs{\let\mglsiflastmainwasfirstuse\@secondoftwo}%
        }%
        \glsifplural
        {%
         \gappto\@mgls@post@hookdefs{\let\mglsiflastmainwasplural\@firstoftwo}%
        }%
        {%
         \gappto\@mgls@post@hookdefs{\let\mglsiflastmainwasplural\@secondoftwo}%
        }%
        \glscapscase
        {%
          \gappto\@mgls@post@hookdefs{%
            \let\mglsiflastmaincapscase\@firstofthree
          }%
        }%
        {%
          \gappto\@mgls@post@hookdefs{%
            \let\mglsiflastmaincapscase\@secondofthree
          }%
        }%
        {%
          \gappto\@mgls@post@hookdefs{%
            \let\mglsiflastmaincapscase\@thirdofthree
          }%
        }%
       \fi
       \let\@mgls@previouslabel\mglscurrentlabel
       \let\@mgls@previous@iffirstuse\@mgls@current@iffirstuse
      }%
       \mglselementposthook
    }%
    \ifx\mglslastmainlabel\@empty
     \gappto\@mgls@post@hookdefs{\let\mglsiflastmainskipped\@firstoftwo}%
    \else
     \gappto\@mgls@post@hookdefs{\let\mglsiflastmainskipped\@secondoftwo}%
    \fi
    \ifx\@mgls@do@current@element\@gobble
     \gappto\@mgls@post@hookdefs{\let\mglsiflastelementskipped\@firstoftwo}%
    \else
     \gappto\@mgls@post@hookdefs{\let\mglsiflastelementskipped\@secondoftwo}%
    \fi
    \glsxtrifwasfirstuse
    {%
     \gappto\@mgls@post@hookdefs{\let\mglsiflastelementwasfirstuse\@firstoftwo}%
    }%
    {%
     \gappto\@mgls@post@hookdefs{\let\mglsiflastelementwasfirstuse\@secondoftwo}%
    }%
    \glsifplural
    {%
     \gappto\@mgls@post@hookdefs{\let\mglsiflastelementwasplural\@firstoftwo}%
    }%
    {%
     \gappto\@mgls@post@hookdefs{\let\mglsiflastelementwasplural\@secondoftwo}%
    }%
    \glscapscase
    {%
      \gappto\@mgls@post@hookdefs{%
        \let\mglsiflastelementcapscase\@firstofthree
      }%
    }%
    {%
      \gappto\@mgls@post@hookdefs{%
        \let\mglsiflastelementcapscase\@secondofthree
      }%
    }%
    {%
      \gappto\@mgls@post@hookdefs{%
        \let\mglsiflastelementcapscase\@thirdofthree
      }%
    }%
   }%
   \@mgls@post@hookdefs
   \mglssuffix
   \ifcase\@mgls@unsetaction\relax
     \xappto\@mgls@post@hookdefs{%
       \noexpand\mglsunset{\expandonce\mglscurrentmultilabel}}%
   \or
     \xappto\@mgls@post@hookdefs{%
       \noexpand\mglslocalunset{\expandonce\mglscurrentmultilabel}}%
   \fi
 }%
 \glsxtrmglswrite{#2}%
 \egroup
 \@mgls@post@hookdefs
 \mgls@do@postlinkhook
}
\newcommand*{\mglscustompostlinkhook}{}
\newcommand*{\mglslastelementpostlinkhook}{%
 \let\glsxtrifwasfirstuse\mglsiflastelementwasfirstuse
 \let\glsifplural\mglsiflastelementwasplural
 \let\glscapscase\mglsiflastelementcapscase
 \let\glslabel\mglslastelementlabel
 \glspostlinkhook
}
\newcommand*{\mglslastmainpostlinkhook}{%
 \let\glsxtrifwasfirstuse\mglsiflastmainwasfirstuse
 \let\glsifplural\mglsiflastmainwasplural
 \let\glscapscase\mglsiflastmaincapscase
 \let\glslabel\mglslastmainlabel
 \glspostlinkhook
}
\newcommand*{\mglsdefcategoryprefix}[2]{%
 \csdef{mglsprefix@#1}{#2}%
}
\newcommand*{\mglshascategoryprefix}[3]{%
 \ifcsdef{mglsprefix@#1}{#2}{#3}%
}
\newcommand*{\mglsusecategoryprefix}[1]{%
 \csuse{mglsprefix@#1}%
}
\newcommand*{\mglsprefix}{%
 \ifdefempty\mglscurrentcategory
 {\mglscurrentprefix}%
 {%
   \mglshascategoryprefix{\mglscurrentcategory}%
   {\mglsusecategoryprefix{\mglscurrentcategory}}%
   {\mglscurrentprefix}%
 }%
}
\newcommand*{\mglsdefcategorysuffix}[2]{%
 \csdef{mglssuffix@#1}{#2}%
}
\newcommand*{\mglshascategorysuffix}[3]{%
 \ifcsdef{mglssuffix@#1}{#2}{#3}%
}
\newcommand*{\mglsusecategorysuffix}[1]{%
 \csuse{mglssuffix@#1}%
}
\newcommand*{\mglssuffix}{%
 \ifdefempty\mglscurrentcategory
 {\ifdefempty{\mglscurrentsuffix}{}{\space(\mglscurrentsuffix)}}%
 {%
   \mglshascategorysuffix{\mglscurrentcategory}%
   {\mglsusecategorysuffix{\mglscurrentcategory}}%
   {\ifdefempty{\mglscurrentsuffix}{}{\space(\mglscurrentsuffix)}}%
 }%
}
\newcommand*{\mglselementprehook}{}
\newcommand*{\mglselementposthook}{}
\newcommand*{\glscombinedsep}[2]{%
  \glshasattribute{#1}{combinedsep}%
  {\glsgetattribute{#1}{combinedsep}}%
  { }%
}
\newcommand*{\glscombinedfirstsepfirst}[2]{%
  \glshasattribute{#1}{combinedfirstsepfirst}%
  {\glsgetattribute{#1}{combinedfirstsepfirst}}%
  {\glscombinedsep{#1}{#2}}%
}
\newcommand*{\glscombinedfirstsep}[2]{%
  \glshasattribute{#1}{combinedfirstsep}%
  {\glsgetattribute{#1}{combinedfirstsep}}%
  {\glscombinedsep{#1}{#2}}%
}
\newcommand*{\glscombinedsepfirst}[2]{%
  \glshasattribute{#1}{combinedsepfirst}%
  {\glsgetattribute{#1}{combinedsepfirst}}%
  {\glscombinedsep{#1}{#2}}%
}
\newcommand*{\glssetcombinedsepabbrvnbsp}{%
 \renewcommand*{\glscombinedsep}[2]{%
  \glshasattribute{##1}{combinedsep}%
  {\glsgetattribute{##1}{combinedsep}}%
  {\ifglshasshort{##1}{~}{ }}%
 }%
 \renewcommand*{\glscombinedsepfirst}[2]{%
  \glshasattribute{##1}{combinedsepfirst}%
  {\glsgetattribute{##1}{combinedsepfirst}}%
  {\ifglshasshort{##1}{~}{ }}%
 }%
 \renewcommand*{\glscombinedfirstsep}[2]{%
  \glshasattribute{##1}{combinedfirstsep}%
  {\glsgetattribute{##1}{combinedfirstsep}}%
  { }%
 }%
 \renewcommand*{\glscombinedfirstsepfirst}[2]{%
  \glshasattribute{##1}{combinedfirstsepfirst}%
  {\glsgetattribute{##1}{combinedfirstsepfirst}}%
  { }%
 }%
}
\newcommand*{\glssetcombinedsepabbrvnone}{%
 \renewcommand*{\glscombinedsep}[2]{%
   \glshasattribute{##1}{combinedsep}%
   {\glsgetattribute{##1}{combinedsep}}%
   {\ifglshasshort{##1}{}{\ifglshasshort{##2}{}{ }}}%
 }%
 \renewcommand*{\glscombinedsepfirst}[2]{%
   \glshasattribute{##1}{combinedsepfirst}%
   {\glsgetattribute{##1}{combinedsepfirst}}%
   {\ifglshasshort{##1}{}{ }}%
 }%
 \renewcommand*{\glscombinedfirstsep}[2]{%
  \glshasattribute{##1}{combinedfirstsep}%
  {\glsgetattribute{##1}{combinedfirstsep}}%
  {\ifglshasshort{##2}{}{ }}%
 }%
 \renewcommand*{\glscombinedfirstsepfirst}[2]{%
  \glshasattribute{##1}{combinedfirstsepfirst}%
  {\glsgetattribute{##1}{combinedfirstsepfirst}}%
  { }%
 }%
}
\newcommand*{\glssetcombinedsepnarrow}[2]{%
 \renewcommand*{\glscombinedsep}[2]{%
  \glshasattribute{##1}{combinedsep}%
  {\glsgetattribute{##1}{combinedsep}}%
  {%
   \ifglshasshort{##1}%
   {\glsmeasurewidth{\dimen@}{\glsentryshort{##1}}}%
   {\glsmeasurewidth{\dimen@}{\glsentrytext{##1}}}%
   \ifdim\dimen@<#1\relax
    #2%
   \else
     \ifglshasshort{##2}%
     {\glsmeasurewidth{\dimen@}{\glsentryshort{##2}}}%
     {\glsmeasurewidth{\dimen@}{\glsentrytext{##2}}}%
     \ifdim\dimen@<#1\relax
      #2%
     \else
      \space
     \fi
   \fi
  }%
 }%
 \renewcommand*{\glscombinedsepfirst}[2]{%
  \glshasattribute{##1}{combinedsepfirst}%
  {\glsgetattribute{##1}{combinedsepfirst}}%
  {%
   \ifglshasshort{##1}%
   {\glsmeasurewidth{\dimen@}{\glsentryshort{##1}}}%
   {\glsmeasurewidth{\dimen@}{\glsentrytext{##1}}}%
   \ifdim\dimen@<#1\relax
    #2%
   \else
     \ifhaslong{##2}%
     {\glsmeasurewidth{\dimen@}{\glsentrylong{##2}}}%
     {\glsmeasurewidth{\dimen@}{\glsentryfirst{##2}}}%
     \ifdim\dimen@<#1\relax
      #2%
     \else
      \space
     \fi
   \fi
  }%
 }%
 \renewcommand*{\glscombinedfirstsep}[2]{%
  \glshasattribute{##1}{combinedfirstsep}%
  {\glsgetattribute{##1}{combinedfirstsep}}%
  {%
    \ifhaslong{##1}%
    {\glsmeasurewidth{\dimen@}{\glsentrylong{##1}}}%
    {\glsmeasurewidth{\dimen@}{\glsentryfirst{##1}}}%
    \ifdim\dimen@<#1\relax
     #2%
    \else
      \ifglshasshort{##2}%
      {\glsmeasurewidth{\dimen@}{\glsentryshort{##2}}}%
      {\glsmeasurewidth{\dimen@}{\glsentrytext{##2}}}%
      \ifdim\dimen@<#1\relax
       #2%
      \else
       \space
      \fi
    \fi
  }%
 }%
 \renewcommand*{\glscombinedfirstsepfirst}[2]{%
  \glshasattribute{##1}{combinedfirstsepfirst}%
  {\glsgetattribute{##1}{combinedfirstsepfirst}}%
  {%
    \ifhaslong{##1}%
    {\glsmeasurewidth{\dimen@}{\glsentrylong{##1}}}%
    {\glsmeasurewidth{\dimen@}{\glsentryfirst{##1}}}%
    \ifdim\dimen@<#1\relax
     #2%
    \else
      \ifhaslong{##2}%
      {\glsmeasurewidth{\dimen@}{\glsentrylong{##2}}}%
      {\glsmeasurewidth{\dimen@}{\glsentryfirst{##2}}}%
      \ifdim\dimen@<#1\relax
       #2%
      \else
       \space
      \fi
    \fi
  }%
 }%
}
\newcommand{\glsxtrmglswrite}[1]{%
 \ifx\@glsxtr@record@setting\@glsxtr@record@setting@off
 \else
  \protected@edef\@glsxtr@mglslabel{#1}%
  \ifdef\@glsxtr@mglsreflist
  {%
    \expandafter\DTLifinlist\expandafter{\@glsxtr@mglslabel}%
    {\@glsxtr@mglsreflist}{}%
    {%
      \xappto\@glsxtr@mglsreflist{,\expandonce\@glsxtr@mglslabel}%
      \if@mgls@writeseparaterefs
        \protected@write\@auxout{}{\string\@glsxtr@mglsrefs{#1}}%
      \fi
    }%
  }%
  {%
    \global\let\@glsxtr@mglsreflist\@glsxtr@mglslabel
    \if@mgls@writeseparaterefs
      \protected@write\@auxout{}{\string\@glsxtr@mglsrefs{#1}}%
    \else
      \AtEndDocument{\immediate\protected@write\@auxout{}%
        {\string\@glsxtr@mglsrefs{\@glsxtr@mglsreflist}}}%
    \fi
    \@mgls@disable@writeseparateref@cond
  }%
 \fi
}
\newcommand{\@glsxtr@mglsrefs}[1]{}
\newif\if@mgls@writeseparaterefs \@mgls@writeseparaterefsfalse
\newcommand{\mglsWriteSeparateRefsTrue}{\global\@mgls@writeseparaterefstrue}
\newcommand{\mglsWriteSeparateRefsFalse}{\global\@mgls@writeseparaterefsfalse}
\newcommand*{\@mgls@disable@writeseparateref@cond}{%
  \gdef\mglsWriteSeparateRefsTrue{\PackageError{glossaries-extra}%
   {Too late to use \string\mglsWriteSeparateRefsTrue}%
   {\string\mglsWriteSeparateRefsTrue\space can only be used before
   the first instance of any \string\mgls-like command}}%
  \gdef\mglsWriteSeparateRefsFalse{\PackageError{glossaries-extra}%
   {Too late to use \string\mglsWriteSeparateRefsFalse}%
   {\string\mglsWriteSeparateRefsFalse\space can only be used before
   the first instance of any \string\mgls-like command}}%
}
\newcommand{\glsxtr@newmgls}[5]{%
  \edef\@glsxr@newmgls@do{%
   \noexpand\newrobustcmd*{\expandonce{\csname #1\endcsname}}%
    {\noexpand\@gls@hyp@opt\expandonce{\csname ns@glsxtr@#1\endcsname}}%
   \noexpand\newcommand*{\expandonce{\csname ns@glsxtr@#1\endcsname}}[2][]{%
    \noexpand\new@ifnextchar[%
     {\expandonce{\csname glsxtr@#1\endcsname}{####1}{####2}}%
     {\expandonce{\csname glsxtr@#1\endcsname}{####1}{####2}[]}%
   }%
   \noexpand\def\expandonce{\csname glsxtr@#1\endcsname}####1####2[####3]{%
     \noexpand\def\noexpand\glsxtrcurrentmglscsname{#1}%
     \noexpand\glsxtr@mgls@inner{####1}{####2}{####3}%
      {\noexpand#2}{\noexpand#3}{\noexpand#4}{\noexpand#5}%
    }%
  }%
  \@glsxr@newmgls@do
  \ifx\@glsxtr@record@setting\@glsxtr@record@setting@off
  \else
    \ifdef\@glsxtr@mglslikelist
    {\xappto\@glsxtr@mglslikelist{,#1}}%
    {%
      \gdef\@glsxtr@mglslikelist{#1}%
      \AtEndDocument{\immediate\protected@write\@auxout{}%
        {\string\@glsxtr@mglslike{\@glsxtr@mglslikelist}}}%
    }%
  \fi
}
\newcommand*{\@glsxtr@mglslike}[1]{}
\newcommand*{\GlsXtrMglsOrGls}[2]{%
  \def\@glsxtr@mgls@or@gls@mcs{#1}%
  \def\@glsxtr@mgls@or@gls@gcs{#2}%
  \@ifstar{\s@GlsXtrMglsOrGls}%
  {%
   \@ifnextchar+{\@firstoftwo{\p@GlsXtrMglsOrGls}}%
   {%
     \ifdefempty\@gls@alt@hyp@opt@char\@GlsXtrMglsOrGls\alt@GlsXtrMglsOrGls
   }%
  }%
}
\newcommand*{\alt@GlsXtrMglsOrGls}{
 \expandafter\@ifnextchar\@gls@alt@hyp@opt@char
 {\@firstoftwo{\@alt@GlsXtrMglsOrGls}}{\@GlsXtrMglsOrGls}%
}
\newcommand*{\@GlsXtrMglsOrGls}[2][]{%
  \glsxtrifmulti{#2}%
  {\@glsxtr@mgls@or@gls@mcs[#1]{#2}}%
  {\@glsxtr@mgls@or@gls@gcs[#1]{#2}}%
}
\newcommand*{\s@GlsXtrMglsOrGls}[2][]{%
  \glsxtrifmulti{#2}%
  {\@glsxtr@mgls@or@gls@mcs*[#1]{#2}}%
  {\@glsxtr@mgls@or@gls@gcs*[#1]{#2}}%
}
\newcommand*{\p@GlsXtrMglsOrGls}[2][]{%
  \glsxtrifmulti{#2}%
  {\@glsxtr@mgls@or@gls@mcs+[#1]{#2}}%
  {\@glsxtr@mgls@or@gls@gcs+[#1]{#2}}%
}
\newcommand*{\@alt@GlsXtrMglsOrGls}[2][]{%
  \glsxtrifmulti{#2}%
  {\expandafter\@glsxtr@mgls@or@gls@mcs\@gls@alt@hyp@opt@char[#1]{#2}}%
  {\expandafter\@glsxtr@mgls@or@gls@gcs\@gls@alt@hyp@opt@char[#1]{#2}}%
}
\glsxtr@newmgls{mgls}{\@gls@}{\@gls@}{\@gls@}{\@gls@}%
\glsxtr@newmgls{mglspl}{\@glspl@}{\@glspl@}{\@glspl@}{\@glspl@}%
\glsxtr@newmgls{mglsmainpl}{\@gls@}{\@gls@}{\@glspl@}{\@glspl@}%
\glsxtr@newmgls{Mgls}{\@Gls@}{\@gls@}{\@Gls@}{\@gls@}%
\glsmfuaddmap{\mgls}{\Mgls}
\glsxtr@newmgls{Mglspl}{\@Glspl@}{\@glspl@}{\@Glspl@}{\@glspl@}%
\glsmfuaddmap{\mglspl}{\Mglspl}
\glsxtr@newmgls{Mglsmainpl}{\@Gls@}{\@gls@}{\@Glspl@}{\@glspl@}%
\glsmfuaddmap{\mglsmainpl}{\Mglsmainpl}
\glsxtr@newmgls{MGls}{\@Gls@}{\@Gls@}{\@Gls@}{\@Gls@}%
\glsmfublocker{\MGls}
\glsxtr@newmgls{MGlspl}{\@Glspl@}{\@Glspl@}{\@Glspl@}{\@Glspl@}%
\glsmfublocker{\MGlspl}
\glsxtr@newmgls{MGlsmainpl}{\@Gls@}{\@Gls@}{\@Glspl@}{\@Glspl@}%
\glsmfublocker{\MGlsmainpl}
\glsxtr@newmgls{MGLS}{\@GLS@}{\@GLS@}{\@GLS@}{\@GLS@}%
\glsmfublocker{\MGLS}
\glsxtr@newmgls{MGLSpl}{\@GLSpl@}{\@GLSpl@}{\@GLSpl@}{\@GLSpl@}%
\glsmfublocker{\MGLSpl}
\glsxtr@newmgls{MGLSmainpl}{\@GLS@}{\@GLS@}{\@GLSpl@}{\@GLSpl@}%
\glsmfublocker{\MGLSmainpl}
\def\@glslongortext#1#2[#3]{%
  \ifglshaslong{#2}{\@glsxtrlong{#1}{#2}[#3]}{\@glstext@{#1}{#2}[#3]}%
}
\def\@glsshortortext#1#2[#3]{%
  \ifglshasshort{#2}{\@glsxtrshort{#1}{#2}[#3]}{\@glstext@{#1}{#2}[#3]}%
}
\def\@glsfullorfirst#1#2[#3]{%
  \ifglshasshort{#2}{\@glsxtr@full{#1}{#2}[#3]}{\@glsfirst@{#1}{#2}[#3]}%
}
\def\@Glslongortext#1#2[#3]{%
  \ifglshaslong{#2}{\@Glsxtrlong{#1}{#2}[#3]}{\@Glstext@{#1}{#2}[#3]}%
}
\def\@Glsshortortext#1#2[#3]{%
  \ifglshasshort{#2}{\@Glsxtrshort{#1}{#2}[#3]}{\@Glstext@{#1}{#2}[#3]}%
}
\def\@Glsfullorfirst#1#2[#3]{%
  \ifglshasshort{#2}{\@Glsxtr@full{#1}{#2}[#3]}{\@Glsfirst@{#1}{#2}[#3]}%
}
\glsxtr@newmgls{mglsshort}%
{\@glsshortortext}{\@glsshortortext}{\@glsshortortext}{\@glsshortortext}%
\glsxtr@newmgls{mglslong}%
{\@glslongortext}{\@glslongortext}{\@glslongortext}{\@glslongortext}%
\glsxtr@newmgls{mglsfull}%
{\@glsfullorfirst}{\@glsfullorfirst}{\@glsfullorfirst}{\@glsfullorfirst}%
\glsxtr@newmgls{Mglsshort}%
{\@Glsshortortext}{\@glsshortortext}{\@Glsshortortext}{\@glsshortortext}%
\glsmfuaddmap{\mglsshort}{\Mglsshort}
\glsxtr@newmgls{Mglslong}%
{\@Glslongortext}{\@glslongortext}{\@Glslongortext}{\@glslongortext}%
\glsmfuaddmap{\mglslong}{\Mglslong}
\glsxtr@newmgls{Mglsfull}%
{\@Glsfullorfirst}{\@glsfullorfirst}{\@Glsfullorfirst}{\@glsfullorfirst}%
\glsmfuaddmap{\mglsfull}{\Mglsfull}
\glsxtr@newmgls{mglsname}%
 {\@glsname@}{\@glsname@}{\@glsname@}{\@glsname@}%
\glsxtr@newmgls{Mglsname}%
 {\@Glsname@}{\@glsname@}{\@Glsname@}{\@glsname@}%
\glsmfuaddmap{\mglsname}{\Mglsname}
\glsxtr@newmgls{MGlsname}%
 {\@Glsname@}{\@Glsname@}{\@Glsname@}{\@Glsname@}%
\glsmfublocker{\MGlsname}
\def\@glssymbolorgls#1#2[#3]{%
  \ifglshassymbol{#2}{\@glssymbol@{#1}{#2}[#3]}{\@gls@{#1}{#2}[#3]}%
}
\def\@glssymbolorGls#1#2[#3]{%
  \ifglshassymbol{#2}{\@glssymbol@{#1}{#2}[#3]}{\@Gls@{#1}{#2}[#3]}%
}
\glsxtr@newmgls{mglssymbol}%
 {\@glssymbolorgls}{\@glssymbolorgls}{\@glssymbolorgls}{\@glssymbolorgls}%
\glsxtr@newmgls{Mglssymbol}%
 {\@glssymbolorGls}{\@glssymbolorgls}{\@glssymbolorGls}{\@glssymbolorgls}%
\glsmfuaddmap{\mglssymbol}{\Mglssymbol}
\glsxtr@newmgls{MGlssymbol}%
 {\@glssymbolorGls}{\@glssymbolorGls}{\@glssymbolorGls}{\@glssymbolorGls}%
\glsmfublocker{\MGlssymbol}
\newcommand{\mglsfield}{useri}
\def\@glsfieldorgls#1#2[#3]{%
  \glsxtrifhasfield{\mglsfield}{#2}%
  {\@glsdisp[#1]{#2}{\glscurrentfieldvalue#3}}%
  {\@gls@{#1}{#2}[#3]}%
}
\def\@Glsfieldorgls#1#2[#3]{%
  \glsxtrifhasfield{\mglsfield}{#2}%
  {\@glsdisp[#1]{#2}{%
    \expandafter\glssentencecase\expandafter{\glscurrentfieldvalue#3}}}%
  {\@Gls@{#1}{#2}[#3]}%
}
\glsxtr@newmgls{mglsusefield}%
 {\@glsfieldorgls}{\@glsfieldorgls}{\@glsfieldorgls}{\@glsfieldorgls}%
\glsxtr@newmgls{Mglsusefield}%
 {\@Glsfieldorgls}{\@glsfieldorgls}{\@Glsfieldorgls}{\@glsfieldorgls}%
\glsmfuaddmap{\mglsusefield}{\Mglsusefield}
\glsxtr@newmgls{MGlsusefield}%
 {\@Glsfieldorgls}{\@Glsfieldorgls}{\@Glsfieldorgls}{\@Glsfieldorgls}%
\glsmfublocker{\MGlsusefield}
\newcommand*{\mpglsWarning}{%
  \GlossariesExtraWarning{glossaries-prefix.sty is required for
   \string\mpgls\space family of commands}%
}
\def\@pglsorgls#1#2[#3]{%
  \ifdef\@pgls@{\@pgls@{#1}{#2}[#3]}{\mpglsWarning\@gls@{#1}{#2}[#3]}%
}
\def\@pglsorglspl#1#2[#3]{%
  \ifdef\@pglspl@{\@pglspl@{#1}{#2}[#3]}{\mpglsWarning\@glspl@{#1}{#2}[#3]}%
}
\def\@Pglsorgls#1#2[#3]{%
  \ifdef\@Pgls@{\@Pgls@{#1}{#2}[#3]}{\mpglsWarning\@Gls@{#1}{#2}[#3]}%
}
\def\@pglsorglspl#1#2[#3]{%
  \ifdef\@pglspl@{\@pglspl@{#1}{#2}[#3]}{\mpglsWarning\@glspl@{#1}{#2}[#3]}%
}
\def\@Pglsorglspl#1#2[#3]{%
  \ifdef\@Pglspl@{\@Pglspl@{#1}{#2}[#3]}{\mpglsWarning\@Glspl@{#1}{#2}[#3]}%
}
\def\@PGLSorgls#1#2[#3]{%
  \ifdef\@PGLS@{\@PGLS@{#1}{#2}[#3]}{\mpglsWarning\@GLS@{#1}{#2}[#3]}%
}
\def\@PGLSorglspl#1#2[#3]{%
  \ifdef\@PGLSpl@{\@PGLSpl@{#1}{#2}[#3]}{\mpglsWarning\@GLSpl@{#1}{#2}[#3]}%
}
\glsxtr@newmgls{mpgls}{\@pglsorgls@}{\@gls@}{\@pglsorgls@}{\@gls@}%
\glsxtr@newmgls{mpglspl}{\@pglsorglspl@}{\@glspl@}{\@pglsorglspl@}{\@glspl@}%
\glsxtr@newmgls{mpglsmainpl}{\@pglsorgls@}{\@gls@}{\@pglsorglspl@}{\@glspl@}%
\glsxtr@newmgls{Mpgls}{\@Pglsorgls@}{\@gls@}{\@Pglsorgls@}{\@gls@}%
\glsmfuaddmap{\mpgls}{\Mpgls}
\glsxtr@newmgls{Mpglspl}{\@Pglsorglspl@}{\@glspl@}{\@Pglsorglspl@}{\@glspl@}%
\glsmfuaddmap{\mpglspl}{\Mpglspl}
\glsxtr@newmgls{Mpglsmainpl}{\@Pglsorgls@}{\@gls@}{\@Pglsorglspl@}{\@glspl@}%
\glsmfuaddmap{\mpglsmainpl}{\Mpglsmainpl}
\glsxtr@newmgls{MPGls}{\@Pglsorgls@}{\@Gls@}{\@Pglsorgls@}{\@Gls@}%
\glsmfublocker{\MPGls}
\glsxtr@newmgls{MPGlspl}{\@Pglsorglspl@}{\@Glspl@}{\@Pglsorglspl@}{\@Glspl@}%
\glsmfublocker{\MPGlspl}
\glsxtr@newmgls{MPGlsmainpl}{\@Pglsorgls@}{\@Gls@}{\@Pglsorglspl@}{\@Glspl@}%
\glsmfublocker{\MPGlsmainpl}
\glsxtr@newmgls{MPGLS}{\@PGLSorgls@}{\@GLS@}{\@PGLSorgls@}{\@GLS@}%
\glsmfublocker{\MPGLS}
\glsxtr@newmgls{MPGLSpl}{\@PGLSorglspl@}{\@GLSpl@}{\@PGLSorglspl@}{\@GLSpl@}%
\glsmfublocker{\MPGLSpl}
\glsxtr@newmgls{MPGLSmainpl}{\@PGLSorgls@}{\@GLS@}{\@PGLSorglspl@}{\@GLSpl@}%
\glsmfublocker{\MPGLSmainpl}
\providecommand{\glsxtrcontinuedname}{continued}
\newcommand*{\RequireGlossariesExtraLang}[1]{%
  \@ifundefined{ver@glossariesxtr-#1.ldf}{\input{glossariesxtr-#1.ldf}}{}%
}
\newcommand*{\ProvidesGlossariesExtraLang}[1]{%
  \ProvidesFile{glossariesxtr-#1.ldf}%
}
\newcommand{\glsxtr@loaddialect}{%
  \IfTrackedLanguageFileExists{\this@dialect}%
  {glossariesxtr-}% prefix
  {.ldf}%
  {%
    \RequireGlossariesExtraLang{\CurrentTrackedTag}%
  }%
  {}% not found
  \@glsxtrdialecthook
}
\@ifpackageloaded{tracklang} {%
  \AnyTrackedLanguages
  {%
    \ForEachTrackedDialect{\this@dialect}{\glsxtr@loaddialect}%
  }%
  {}%
} {}
\@glsxtr@redefstyles
\@glsxtr@do@style
\endinput
%%
%% End of file `glossaries-extra.sty'.
