%%
%% ---------------------------------------------------------------
%% biblatex-gb7714-2015 --- A biblatex implementation of the
%% GBT7714-2015 citation style,numerical sequence
%% Maintained by huzhenzhen
%% E-mail: hzzmail@163.com
%% Released under the LaTeX Project Public License v1.3c or later
%% ---------------------------------------------------------------
%%
\ProvidesFile{gb7714-2015.cbx}[a biblatex citation style for GB/T 7714-2015]

%
%   ������������������
%
\RequireCitationStyle{numeric-comp} %numeric

%
%   ���������������������������������������������������������������������������
%   20210121,v1.0w,hzz
\newtoggle{bbx:gblabelref}
\DeclareBibliographyOption{gblabelref}[false]{%biblatex���������
  \settoggle{bbx:gblabelref}{#1}}
\ExecuteBibliographyOptions{gblabelref}

%
%   ���������������������������������������������������������
%   20220212,v1.1c,hzz
\newtoggle{bbx:gbcitecomp}
\DeclareBibliographyOption{gbcitecomp}[true]{%biblatex���������
  \settoggle{bbx:gbcitecomp}{#1}}
\ExecuteBibliographyOptions{gbcitecomp}


%
%   ������������������������������������������
%   20211030,1.1a,hzz
%
\newrobustcmd{\mkbibleftborder}{\gbleftbracket}
\newrobustcmd{\mkbibrightborder}{\gbrightbracket}
\DeclareBibliographyOption[string]{gbcitelabel}[bracket]{%
    \csuse{gbcitelabelopt@#1}
}
\ExecuteBibliographyOptions{gbcitelabel}

\renewrobustcmd{\mkbibsuperscript}[1]{%
  \unspace\allowhyphens\textsuperscript{%
    \begingroup
    \protected\long\def\mkbibsuperscript##1{%
      \blx@warning{Nested superscript}%
      \mkbibbrackets{##1}}%������������������������
    #1\endgroup}\kern\z@}%

\def\gbcitelabelopt@bracket{%
\renewrobustcmd{\mkbibleftborder}{\gbleftbracket}%
\renewrobustcmd{\mkbibrightborder}{\gbrightbracket}%
}
\def\gbcitelabelopt@parens{%
\renewrobustcmd{\mkbibleftborder}{\gbleftparen}%
\renewrobustcmd{\mkbibrightborder}{\gbrightparen}%
}
\def\gbcitelabelopt@parensqj{%
\renewrobustcmd{\mkbibleftborder}{\allowbreak���}%
\renewrobustcmd{\mkbibrightborder}{���\unspace}%
}
\def\gbcitelabelopt@bracketqj{%
\renewrobustcmd{\mkbibleftborder}{\allowbreak���}%
\renewrobustcmd{\mkbibrightborder}{���\unspace}%
}
\def\gbcitelabelopt@quanjiao{%
\renewrobustcmd{\mkbibleftborder}{\allowbreak���}%
\renewrobustcmd{\mkbibrightborder}{���\unspace}%
}
\def\gbcitelabelopt@dot{%
\renewrobustcmd{\mkbibleftborder}{}%
\renewrobustcmd{\mkbibrightborder}{.}%
}
\def\gbcitelabelopt@plain{%
\renewrobustcmd{\mkbibleftborder}{}%
\renewrobustcmd{\mkbibrightborder}{}%
}
\def\gbcitelabelopt@box{%
\renewrobustcmd{\mkbibleftborder}{}%
\renewrobustcmd{\mkbibrightborder}{}%
\renewrobustcmd{\mkbibsuperscript}[1]{%
  \unspace\allowhyphens\textsuperscript{%
    \begingroup
\framebox{##1}\endgroup}\kern\z@}%
}
\def\gbcitelabelopt@circle{%
\renewrobustcmd{\mkbibleftborder}{}%
\renewrobustcmd{\mkbibrightborder}{}%
\renewrobustcmd{\mkbibsuperscript}[1]{%
  \unspace\allowhyphens\textsuperscript{%
    \begingroup
\textcircled{##1}\endgroup}\kern\z@}%
}


%
%   ������������
%
\ExecuteBibliographyOptions{
  autocite  = superscript ,
  autopunct = true       ,
  %sorting   = none        ,
  maxcitenames=1,
  mincitenames=1,
}

%
%   ���������������������gblabelref���������������������������������������������������������
%   20210121,v1.0w,hzz
%
\iftoggle{iftlatest}%
{%
\renewbibmacro*{textcite}{%
  \iffieldequals{namehash}{\cbx@lasthash}
    {\usebibmacro{cite:comp}}
    {\usebibmacro{cite:dump}%
     \ifbool{cbx:parens}
       {\printtext{\mkbibrightborder}\global\boolfalse{cbx:parens}}%\bibclosebracket
       {}%
     \iffirstcitekey
       {}
       {\setunit{\textcitedelim}}%
     \usebibmacro{cite:init}%
     \ifnameundef{labelname}
       {\printfield[citetitle]{labeltitle}}
       {\iftoggle{bbx:gblabelref}{\printtext[bibhyperref]{\printnames{labelname}}}{\printnames{labelname}}}%
     \setunit*{\printdelim{namelabeldelim}}%
     \printtext{\mkbibleftborder}\global\booltrue{cbx:parens}%\bibopenbracket
     \ifnumequal{\value{citecount}}{1}
       {\usebibmacro{prenote}}
       {}%
     \usebibmacro{cite:comp}%
     \stepcounter{textcitecount}%
     \savefield{namehash}{\cbx@lasthash}}}
%������������������textcite������������������������������������������������������������������biblatex������������������������������
%\renewbibmacro*{textcite}{%
%  \iffieldequals{namehash}{\cbx@lasthash}
%    {\usebibmacro{cite:comp}}
%    {\usebibmacro{cite:dump}%
%     \ifbool{cbx:parens}
%       {\printtext{\mkbibrightborder}\global\boolfalse{cbx:parens}}%\bibclosebracket
%       {}%
%     \iffirstcitekey
%       {}
%       {\setunit{\textcitedelim}}%
%     \usebibmacro{cite:init}%
%     \ifnameundef{labelname}
%       {\printfield[citetitle]{labeltitle}}
%       {\iftoggle{bbx:gblabelref}{\printtext[bibhyperref]{\printnames{labelname}}}{\printnames{labelname}}}%
%     \setunit*{\printdelim{namelabeldelim}}%
%     \printtext{\mkbibleftborder}\global\booltrue{cbx:parens}%\bibopenbracket
%     \ifnumequal{\value{citecount}}{1}
%       {\usebibmacro{prenote}}
%       {}%
%     \usebibmacro{cite:comp}%
%     \stepcounter{textcitecount}%
%     \savefield{namehash}{\cbx@lasthash}}}%
}


%
%������������������������������������������
%20210530,v1.0y,hzz
%textcite������������������������������
%\DeclareDelimFormat[textcite]{andothersdelim}{\addspace}%
\renewcommand*{\compcitedelim}{\addcomma}%\addcomma\addthinspace
\renewcommand*{\supercitedelim}{\addcomma}
\renewcommand*{\multicitedelim}{\addcomma}

%
%���������3���������������������������2���������������
%
%���������������������������������������������������������������������������������������������cbx@tempcnta���������
%���������������cbx@tempcnta���0������������������������������������������cbx@tempcnta���cite:comp:comp���������������������
%������������������������������������������������������������������cbx@tempcnta������������1���������������������
%������������������������1���0������������������3���������������������2������������������
\newcounter{gbrefcompress}
\setcounter{gbrefcompress}{2}
\renewbibmacro*{cite:dump}{%
  \ifnumgreater{\value{cbx@tempcnta}}{0}%
    {\ifnumgreater{\value{cbx@tempcnta}}{\thegbrefcompress-2}%1������0������������������������3���������������2���������
       {\bibrangedash}%
       {\multicitedelim}%
     \bibhyperref[\cbx@lastkey]{%
       \ifdef\cbx@lastprefix%
         {\printtext[labelprefix]{\cbx@lastprefix}}%
         {}%
       \printtext[labelnumber]{\cbx@lastnumber}}}%
    {}%
  \setcounter{cbx@tempcnta}{0}%
  \global\undef\cbx@lastprefix}

%biblatex v3.15 ������������������������������\multiciterangedelim
%������������������������������������������������������{cite:dump}���������������������������������������
%���������������������������biblatex v2.8������������������������16������20���������������
%������������������������������������biblatex������������������������������������������
\@ifpackagelater{biblatex}{2020/08/15}{%v3.15 2020-08-16
    \renewbibmacro*{cite:dump}{%
      \usebibmacro{cite:dump:inset}%
      % dump labelnumber (+labelprefix)
      \ifnumgreater{\value{cbx@tempcnta}}{0}
        {\ifnumgreater{\value{cbx@tempcnta}}{\thegbrefcompress-2}%1������0������������������������3���������������2���������
           {\setunit{\multiciterangedelim}}
           {\setunit{\multicitedelim}}%
         \usebibmacro{cite:print:last:labelnumber}%
         \global\undef\cbx@lastprefix}
        {}%
      \setcounter{cbx@tempcnta}{0}%
    }%
}{}

%
%   ���������������������������wrapper
%
\newcommand*\mkbibsuperbracket[1]{%
  \mkbibsuperscript{\mkbibleftborder{#1}\mkbibrightborder}%
}

%   ������postnote���������������
\DeclareFieldFormat{postnote}{#1}


%������\mkbibsuperscript������������������������������������xeCJK���������������������������������������������������������������
%20210401,v1.0w,hzz
%20211030,v1.1a,hzz,���������������������
%\renewrobustcmd{\mkbibsuperscript}[1]{%
%  \unspace\allowhyphens\textsuperscript{%
%    \begingroup
%    \protected\long\def\mkbibsuperscript##1{%
%      \blx@warning{Nested superscript}%
%      \mkbibbrackets{##1}}%
%    #1\endgroup}\kern\z@}

\newrobustcmd{\mkbibsuperscriptusp}[1]{%
  \unspace\allowhyphens\textsuperscript{%
    \begingroup%
    \protected\long\def\mkbibsuperscriptusp##1{%
      \blx@warning{Nested superscript}%
      \mkbibleftborder{##1}\mkbibrightborder}%
    #1\endgroup}}



%
%   ���������cite������
%
%   ������:\DeclareCiteCommand{\cite}[\mkbibparens]{precode}{loopcode}{sepcode}{postcode}
%    v1.0p���������cite������������������������������pagescite������������������biblatex���������������
\DeclareCiteCommand{\cite}[\mkbibsuperscript]%������mkbibsuperbracket��������������� \textsuperscript
  {\mkbibleftborder\usebibmacro{cite:init}%
   \usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite:comp}}
  {}
  {\usebibmacro{cite:dump}\mkbibrightborder%
   \printfield{postnote}}%\kern\p@ \kern\z@

%\renewcommand{\cite}[1]{\textsuperscript{[\supercite{#1}]}\kern\z@}
%   v1.0p ������������������
%\DeclareCiteCommand{\cite}[\mkbibsuperbracket]%������mkbibsuperbracket���������������
%  {\usebibmacro{cite:init}%
%   \usebibmacro{prenote}}
%  {\usebibmacro{citeindex}%
%   \usebibmacro{cite:comp}}
%  {}
%  {\usebibmacro{cite:dump}%
%   \usebibmacro{postnote}}

%
%   ������upcite������
%   20180604���v1.0l���hzz
%   20190409���v1.0r���hzz
%   ������:���supercite������[]
\newrobustcmd*{\upcite}{%
    \cite}

%
%   ���������parencite������������������������������������������������
%
\DeclareCiteCommand{\parencite}%[\mkbibbrackets]
  {\mkbibleftborder\usebibmacro{cite:init}%
   \usebibmacro{prenote}}%
  {\usebibmacro{citeindex}%
   \usebibmacro{cite:comp}}
  {}
  {\usebibmacro{cite:dump}\mkbibrightborder%
   \mkbibsuperscriptusp{\printfield{postnote}}}

%
%   ���������pagescite������������������������������������������������
%
%   ������������:
%   1.���������������������
\newbibmacro*{postpages}{%
  \iffieldundef{postnote}
    {\printfield[postnote]{pages}}
    {\printfield{postnote}}}
%   2.������\pagescite������������
\DeclareCiteCommand{\pagescite}[\mkbibsuperscript]%\mkbibbrackets,���������������
  {\mkbibleftborder\usebibmacro{cite:init}%]���������������������
   \usebibmacro{prenote}%
   }
  {\usebibmacro{citeindex}%
   \usebibmacro{cite:comp}}
  {}
  {\usebibmacro{cite:dump}\mkbibrightborder%
   \usebibmacro{postpages}}

%
%   ������yearpagescite���������ay������������������������\pagescite
%
\DeclareCiteCommand{\yearpagescite}[\mkbibsuperscript]%\mkbibbrackets,���������������
  {\mkbibleftborder\usebibmacro{cite:init}%���������������������
   \usebibmacro{prenote}%
   }
  {\usebibmacro{citeindex}%
   \usebibmacro{cite:comp}}
  {}
  {\usebibmacro{cite:dump}\mkbibrightborder%
   \usebibmacro{postpages}}

%
%   ������\yearcite���������������ay���������������������������������������������������������
%
%   ������������:���������\pagescite������������������
\DeclareCiteCommand{\yearcite}[\mkbibsuperscript]%\mkbibbrackets,���������������
  {\mkbibleftborder\usebibmacro{cite:init}%���������������������
   \usebibmacro{prenote}%
   }
  {\usebibmacro{citeindex}%
   \usebibmacro{cite:comp}}
  {}
  {\usebibmacro{cite:dump}\mkbibrightborder}


%
%   ������\authornumcite���������������������������������������������������������������
%   20180427���v1.0k������������hzz
%   gb7714������������������������������cite������������������������������pagescite���yearcite������������\authornumcite
%   ���������biblatex���������������������cite���������������������citeauthor���������numeric.CBX
%   20200121���v1.0w���������������������hzz
\newbibmacro*{citeathn}{%
  \printtext[bibhyperref]{%
    \printfield{labelprefix}%
    \printfield{labelnumber}%
    \ifbool{bbx:subentry}
      {\printfield{entrysetcount}}
      {}}}
%���numeric.CBX���\DeclareCiteCommand{\cite},
\DeclareCiteCommand{\authornumcite}%[\mkbibsuperscript]
  {\usebibmacro{prenote}}
  {\iffieldequalstr{userf}{cn}{\renewcommand*{\andothersdelim}{\addthinspace}}%\addthinspace
  {\renewcommand*{\andothersdelim}{\addspace}}%
  \iftoggle{bbx:gblabelref}{\printtext[bibhyperref]{\printnames{labelname}}}{\printnames{labelname}}%
  \mkbibsuperscript{\mkbibleftborder\usebibmacro{citeindex}%
   \usebibmacro{citeathn}\mkbibrightborder}}
  {\multicitedelim}
  {\mkbibsuperscript{\printfield{postnote}}}


%
%   ������������������������
%   20190409���v1.0r���hzz
%   ������:������newcommand���newrobustcmd������������������
%   ������\citet���\citep���������������������newrobustcmd���������������������natbib���������������������
%\DeclareCiteCommand{\citet}%
%  {\usebibmacro{prenote}}
%  {\iffieldequalstr{userf}{cn}{\renewcommand*{\andothersdelim}{\addthinspace}}%\addthinspace
%  {\renewcommand*{\andothersdelim}{\addspace}}%
%  \printnames{labelname}\mkbibsuperscript{\mkbibbrackets{\usebibmacro{citeindex}%
%   \usebibmacro{citeathn}}}}
%  {\multicitedelim}
%  {\mkbibsuperscript{\printfield{postnote}}}

%
%   ���������citet������������������\authornumcite������������������������������������������bibtexkey���������������������������
%   20200721,v1.0v,hzz
%   ������:������textcite������������������
%   ������������textcite������������citet������������bool{cbx:incitet}������������������������������������������������������
%   20210416,v1.0y,hzz:���namelabeldelim������������������������������������������������������
%   ���������������������context sensitive������������������
\newbool{cbx:incitet}
\global\booltrue{cbx:incitet}

\newbibmacro*{citet}{%
  \iffieldequals{namehash}{\cbx@lasthash}%
    {\usebibmacro{cite:comp}}%
    {\usebibmacro{cite:dump}%
     \ifbool{cbx:parens}%
       {\mkbibsuperscript{{\hspace{-0.075em}\mkbibrightborder}}%\bibclosebracket
       \global\boolfalse{cbx:parens}}%\printtext
       {}%
     \iffirstcitekey
       {}
       {\textcitedelim}%
     \usebibmacro{cite:init}%
     \ifnameundef{labelname}
       {\printfield[citetitle]{labeltitle}}
       {\printnames{labelname}}%
     %\setunit*{\printdelim{namelabeldelim}}%
     \mkbibsuperscript{\printtext{\mkbibleftborder}%\bibopenbracket
     \global\booltrue{cbx:parens}%
     \ifnumequal{\value{citecount}}{1}
       {\usebibmacro{prenote}}%
       {}%
     \usebibmacro{cite:comp}%
     \stepcounter{textcitecount}%
     \savefield{namehash}{\cbx@lasthash}}}}

\DeclareCiteCommand{\cbx@textcite}%
  {\usebibmacro{cite:init}}%
  {\usebibmacro{citeindex}%
   \ifbool{cbx:incitet}{\usebibmacro{citet}}{\usebibmacro{textcite}}%
   }%
  {}%
  {\ifbool{cbx:incitet}%
        {\mkbibsuperscript{\usebibmacro{cite:dump}\usebibmacro{postnote}%
        \ifbool{cbx:parens}{\hspace{-0.075em}\mkbibrightborder%\bibclosebracket
        \global\boolfalse{cbx:parens}}{}%
        }%
        }%
        {\usebibmacro{cite:dump}\usebibmacro{postnote}%
        \ifbool{cbx:parens}{\mkbibrightborder%\bibclosebracket
        \global\boolfalse{cbx:parens}}{}%
        }%
   }

  \newrobustcmd{\cbx@citet@init}[2]{%
  \global\booltrue{cbx:incitet}%
  \setcounter{textcitetotal}{0}%
  \setcounter{textcitecount}{0}%
  \def\cbx@savedcites{#1}#2\cbx@savedcites\empty}

  \renewrobustcmd{\cbx@textcite@init}[2]{%
  \global\boolfalse{cbx:incitet}%
  \setcounter{textcitetotal}{0}%
  \setcounter{textcitecount}{0}%
  \def\cbx@savedcites{#1}#2\cbx@savedcites\empty}

\DeclareCiteCommand{\citet}[\cbx@citet@init\cbx@textcite]
  {\gdef\cbx@savedkeys{}%
   \citetrackerfalse%
   \pagetrackerfalse%
   \DeferNextCitekeyHook%
   \usebibmacro{cite:init}}
  {\ifthenelse{\iffirstcitekey\AND\value{multicitetotal}>0}
     {\protected@xappto\cbx@savedcites{()(\thefield{multipostnote})}%
      \global\clearfield{multipostnote}}
     {}%
   \xappto\cbx@savedkeys{\thefield{entrykey},}%
   \iffieldequals{namehash}{\cbx@lasthash}
     {}
     {\stepcounter{textcitetotal}%
      \savefield{namehash}{\cbx@lasthash}}}
  {}
  {\protected@xappto\cbx@savedcites{%
     [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}}



\DeclareCiteCommand{\citep}[\mkbibsuperscript]%������mkbibsuperbracket���������������
  {\mkbibleftborder\usebibmacro{cite:init}%
   \usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite:comp}}
  {}
  {\usebibmacro{cite:dump}\mkbibrightborder%
   \printfield{postnote}}

\newrobustcmd*{\citetns}%
    {\textcite}

\newrobustcmd*{\citepns}%
    {\parencite}

\newrobustcmd*{\inlinecite}%
    {\parencite}

%
%   ���������������������������������������biblatex���������������������
%   20190430���v1.0r���hzz
% citec���citecs������������������[1]-[3]������������������������
% authornumcites���������������authornumcite���������������
%\DeclareFieldFormat{labelbracket}{\mkbibbrackets{#1}}
\DeclareFieldFormat{labelbracket}{\mkbibleftborder{#1}\mkbibrightborder}

\newbibmacro*{citec:comp:comp}{%
  \ifboolexpr{
    ( test {\iffieldundef{labelprefix}} and test {\ifundef\cbx@lastprefix} )
    or
    test {\iffieldequals{labelprefix}{\cbx@lastprefix}}%
  }
    {\ifnumequal{\thefield{labelnumber}}{\value{cbx@tempcntb}}
       {\savefield{entrykey}{\cbx@lastkey}%
        \savefield{labelnumber}{\cbx@lastnumber}%
        \addtocounter{cbx@tempcnta}{1}}
       {\ifnumequal{\thefield{labelnumber}}{\value{cbx@tempcntb}-1}
          {}
          {\usebibmacro{citec:dump}%
           \ifnumgreater{\value{cbx@tempcntb}}{-1}
             {\multicitedelim}
             {}%
           \printtext[bibhyperref]{%
             \printfield{labelprefix}%
             \printtext[labelbracket]{\printfield{labelnumber}}}}}}
    {\usebibmacro{cite:comp:end}}%
  \setcounter{cbx@tempcntb}{\thefield{labelnumber}}%
  \savefield{labelprefix}{\cbx@lastprefix}}

\newbibmacro*{citec:comp}{%
  \addtocounter{cbx@tempcntb}{1}%
  \iffieldundef{shorthand}
    {\ifbool{bbx:subentry}
       {\iffieldundef{entrysetcount}
          {\usebibmacro{citec:comp:comp}}
          {\usebibmacro{cite:comp:inset}}}
       {\usebibmacro{citec:comp:comp}}}
    {\usebibmacro{cite:comp:shand}}}

\newbibmacro*{citec:dump}{%
  \ifnumgreater{\value{cbx@tempcnta}}{0}
    {\ifnumgreater{\value{cbx@tempcnta}}{0}%���1������0���������3���������������������2���������������
       {\bibrangedash}
       {\multicitedelim}%
     \bibhyperref[\cbx@lastkey]{%
       \ifdef\cbx@lastprefix
         {\printtext[labelprefix]{\cbx@lastprefix}}
         {}%
       \printtext[labelbracket]{\cbx@lastnumber}}}%labelnumber
    {}%
  \setcounter{cbx@tempcnta}{0}%
  \global\undef\cbx@lastprefix}

%\DeclareCiteCommand{\citec}[\mkbibsuperscript]%[\mkbibbrackets]
%  {\usebibmacro{cite:init}%
%   \usebibmacro{prenote}}
%  {\usebibmacro{citeindex}%
%   \usebibmacro{citec:comp}}
%  {}
%  {\usebibmacro{citec:dump}%
%   \usebibmacro{postnote}}

%������������������������������������������������������������������
\DeclareCiteCommand{\citec}[\mkbibsuperscript]%
  {\ifnumless{\value{multicitecount}}{2}
     {\usebibmacro{cite:init}%
      \usebibmacro{prenote}}
     {\iffieldundef{prenote}
        {\iffieldundef{postnote}
           {}
           {\usebibmacro{citec:dump}%
            \usebibmacro{cite:init}%
            \setunit{\multicitedelim}%
            }}
        {\usebibmacro{citec:dump}%
         \usebibmacro{cite:init}%
         \setunit{\multicitedelim}%
         \usebibmacro{prenote}}}}
  {\usebibmacro{citeindex}%
   \usebibmacro{citec:comp}}
  {}
  {\ifboolexpr{       test {\ifnumequal{\value{multicitecount}}{\value{multicitetotal}}}
               or not test {\iffieldundef{postnote}}}
     {\usebibmacro{citec:dump}%
      \printfield{postnote}%
      }
     {}}

\DeclareMultiCiteCommand{\citecs}[\mkbibsuperscript]{\citec}{}

\DeclareMultiCiteCommand{\authornumcites}[]{\authornumcite}{\multicitedelim}

%������������������������������������������������������������
\iftoggle{bbx:gbcitecomp}{}%
{\newbibmacro*{cite}{%
  \printtext[bibhyperref]{%
    \printfield{labelprefix}%
    \printfield{labelnumber}%
    \ifbool{bbx:subentry}
      {\printfield{entrysetcount}}
      {}}}
\DeclareCiteCommand{\cite}[\mkbibsuperscript]%
  {\mkbibleftborder\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}}
  {\multicitedelim}
  {\mkbibrightborder\usebibmacro{postnote}}
\DeclareCiteCommand{\parencite}%
  {\mkbibleftborder\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}}
  {\multicitedelim}
  {\mkbibrightborder\mkbibsuperscriptusp{\usebibmacro{postnote}}}
}