gitea_hat/public/assets/js/citation-js-bibtex.7842d8b8.js

12 lines
66 KiB
JavaScript

(self.webpackChunk=self.webpackChunk||[]).push([["citation-js-bibtex"],{"./node_modules/@citation-js/date/lib/index.js":function(ue,I,T){"use strict";Object.defineProperty(I,"__esModule",{value:!0}),Object.defineProperty(I,"format",{enumerable:!0,get:function(){return C.default}}),Object.defineProperty(I,"parse",{enumerable:!0,get:function(){return M.default}});var M=A(T("./node_modules/@citation-js/date/lib/input.js")),C=A(T("./node_modules/@citation-js/date/lib/output.js"));function A(S){return S&&S.__esModule?S:{default:S}}},"./node_modules/@citation-js/date/lib/input.js":function(ue,I){"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.default=void 0;function T(s,f){return q(s)||S(s,f)||C(s,f)||M()}function M(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function C(s,f){if(s){if(typeof s=="string")return A(s,f);var l=Object.prototype.toString.call(s).slice(8,-1);if(l==="Object"&&s.constructor&&(l=s.constructor.name),l==="Map"||l==="Set")return Array.from(s);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return A(s,f)}}function A(s,f){(f==null||f>s.length)&&(f=s.length);for(var l=0,v=new Array(f);l<f;l++)v[l]=s[l];return v}function S(s,f){var l=s==null?null:typeof Symbol!="undefined"&&s[Symbol.iterator]||s["@@iterator"];if(l!=null){var v=[],m=!0,O=!1,j,P;try{for(l=l.call(s);!(m=(j=l.next()).done)&&(v.push(j.value),!(f&&v.length===f));m=!0);}catch(i){O=!0,P=i}finally{try{!m&&l.return!=null&&l.return()}finally{if(O)throw P}}return v}}function q(s){if(Array.isArray(s))return s}const _={jan:1,feb:2,mar:3,apr:4,may:5,jun:6,jul:7,aug:8,sep:9,oct:10,nov:11,dec:12},H=/ (?:to|[-/]) | ?(?:--|[–—]) ?/,X=/^(\d{4}-\d{2}-\d{2})\/(\d{4}-\d{2}-\d{2})$/;function L(s){return _[s.toLowerCase().slice(0,3)]}function J(s){const f=new Date(s);return typeof s=="number"&&!isNaN(f.valueOf())?[f.getFullYear(),f.getMonth()+1,f.getDate()]:null}const K=function(f){const l=/^(\d{4}|[-+]\d{6,})-(\d{2})(?:-(\d{2}))?/;if(typeof f!="string"||!l.test(f))return null;const v=f.match(l),m=T(v,4),O=m[1],j=m[2],P=m[3];return+j?+P?[O,j,P]:[O,j]:[O]},oe=function(f){const l=/^(?:[a-z]{3},\s*)?(\d{1,2}) ([a-z]{3}) (\d{4,})/i;if(typeof f!="string"||!l.test(f))return null;let v=f.match(l),m=T(v,4),O=m[1],j=m[2],P=m[3];return j=L(j),j?[P,j,O]:null};function Y(s){const f=/^(\d{1,2})\/(\d{1,2})\/(\d{2}(?:\d{2})?)/;if(typeof s!="string"||!f.test(s))return null;const l=s.match(f),v=T(l,4),m=v[1],O=v[2],j=v[3];return new Date(j,m,O).getMonth()===parseInt(m)?[j,m,O]:null}function ie(s){const f=/^(\d{1,2})[ .\-/](\d{1,2}|[a-z]{3,10})[ .\-/](-?\d+)/i,l=/^(-?\d+)[ .\-/](\d{1,2}|[a-z]{3,10})[ .\-/](\d{1,2})/i;let v,m,O;if(typeof s!="string")return null;if(f.test(s)){var j=s.match(f),P=T(j,4);O=P[1],m=P[2],v=P[3]}else if(l.test(s)){var i=s.match(l),o=T(i,4);v=o[1],m=o[2],O=o[3]}else return null;if(L(m))m=L(m);else if(isNaN(m))return null;return[v,m,O]}function Q(s){const f=/^([a-z]{3,10}|-?\d+)[^\w-]+([a-z]{3,10}|-?\d+)$/i;if(typeof s=="string"&&f.test(s)){const l=s.match(f).slice(1,3);let v;if(L(l[1]))v=L(l.pop());else if(L(l[0]))v=L(l.shift());else{if(l.some(isNaN)||l.every(O=>+O<0))return null;+l[0]<0||+l[0]>+l[1]&&+l[1]>0?v=l.pop():v=l.shift()}return[l.pop(),v]}else return null}function ae(s){if(typeof s!="string")return null;const f=s.match(/^(\d+) ?(a\.?d\.?|b\.?c\.?)$/i);if(f){const l=f.slice(1),v=T(l,2),m=v[0],O=v[1];return[m*(O.toLowerCase()[0]==="a"?1:-1)]}else return/^-?\d+$/.test(s)?[s]:null}function U(s){const f=J(s)||K(s)||oe(s)||Y(s)||ie(s)||Q(s)||ae(s);return f&&f.map(l=>parseInt(l))}function z(s){return X.test(s)?s.match(X).slice(1,3):s.split(H)}function ee(s,f){const l=[],v=typeof s=="string"&&z(s);f?l.push(s,f):v&&v.length===2?l.push(...v):l.push(s);const m=l.map(U);return m.filter(Boolean).length===l.length?{"date-parts":m}:{raw:f?l.join("/"):s}}var te=ee;I.default=te},"./node_modules/@citation-js/date/lib/output.js":function(ue,I){"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.default=void 0;function T(A,S,q){if(A.length>=S)return A;for(;A.length<S;)A=q+A;return A.slice(-S)}var C=function(S,q="-"){if(!S["date-parts"])return S.raw;const _=S["date-parts"][0].map(H=>H.toString());switch(_.length){case 3:_[2]=T(_[2],2,"0");case 2:_[1]=T(_[1],2,"0");case 1:_[0]=T(_[0],4,"0");break}return _.join(q)};I.default=C},"./node_modules/@citation-js/plugin-bibtex/lib-mjs/index.js":function(ue,I,T){"use strict";T.r(I);var M={};T.r(M),T.d(M,{argumentCommands:function(){return ae},commands:function(){return K},defaultStrings:function(){return oe},diacritics:function(){return J},fieldTypes:function(){return L},formatting:function(){return Q},formattingCommands:function(){return ie},formattingEnvs:function(){return Y},ligaturePattern:function(){return U},ligatures:function(){return z},mathScriptFormatting:function(){return ee},mathScripts:function(){return te},required:function(){return X},sentenceCaseLanguages:function(){return s}});var C=T("./node_modules/@citation-js/core/lib-mjs/index.js"),A=T("./node_modules/moo/moo.js"),S=T.n(A),q=JSON.parse('{"biblatex":{"article":["author","title","journaltitle",["year","date"]],"book":["author","title",["year","date"]],"mvbook":["author","title",["year","date"]],"inbook":["author","title","booktitle",["year","date"]],"booklet":[["author","editor"],"title",["year","date"]],"collection":["editor","title",["year","date"]],"mvcollection":["editor","title",["year","date"]],"incollection":["author","title","booktitle",["year","date"]],"dataset":[["author","editor"],"title",["year","date"]],"online":[["author","editor"],"title",["year","date"],["doi","eprint","url"]],"patent":["author","title","number",["year","date"]],"periodical":["editor","title",["year","date"]],"proceedings":["title",["year","date"]],"mvproceedings":["title",["year","date"]],"inproceedings":["author","title","booktitle",["year","date"]],"report":["author","title","type","institution",["year","date"]],"thesis":["author","title","type","institution",["year","date"]],"unpublished":["author","title",["year","date"]],"conference":["author","title","booktitle",["year","date"]],"electronic":[["author","editor"],"title",["year","date"],["doi","eprint","url"]],"mastersthesis":["author","title","institution",["year","date"]],"phdthesis":["author","title","institution",["year","date"]],"techreport":["author","title","institution",["year","date"]],"www":[["author","editor"],"title",["year","date"],["doi","eprint","url"]]},"bibtex":{"article":["author","title","journal","year"],"book":[["author","editor"],"title","publisher","year"],"booklet":["title"],"inbook":[["author","editor"],"title",["chapter","pages"],"publisher","year"],"incollection":["author","title","booktitle","publisher","year"],"inproceedings":["author","title","booktitle","year"],"mastersthesis":["author","title","school","year"],"phdthesis":["author","title","school","year"],"proceedings":["title","year"],"techreport":["author","title","institution","year"],"unpublished":["author","title","note"]}}'),_=JSON.parse('{"abstract":["field","literal"],"addendum":["field","literal"],"afterword":["list","name"],"annotation":["field","literal"],"annotator":["list","name"],"author":["list","name"],"authortype":["field","key"],"bookauthor":["list","name"],"bookpagination":["field","key"],"booksubtitle":["field","literal"],"booktitle":["field","title"],"booktitleaddon":["field","literal"],"chapter":["field","literal"],"commentator":["list","name"],"date":["field","date"],"doi":["field","verbatim"],"edition":["field","literal"],"editor":["list","name"],"editora":["list","name"],"editorb":["list","name"],"editorc":["list","name"],"editortype":["field","key"],"editoratype":["field","key"],"editorbtype":["field","key"],"editorctype":["field","key"],"eid":["field","literal"],"entrysubtype":["field","literal"],"eprint":["field","verbatim"],"eprintclass":["field","literal"],"eprinttype":["field","literal"],"eventdate":["field","date"],"eventtitle":["field","title"],"eventtitleaddon":["field","literal"],"file":["field","verbatim"],"foreword":["list","name"],"holder":["list","name"],"howpublished":["field","literal"],"indextitle":["field","literal"],"institution":["list","literal"],"introduction":["list","name"],"isan":["field","literal"],"isbn":["field","literal"],"ismn":["field","literal"],"isrn":["field","literal"],"issn":["field","literal"],"issue":["field","literal"],"issuesubtitle":["field","literal"],"issuetitle":["field","literal"],"iswc":["field","literal"],"journalsubtitle":["field","literal"],"journaltitle":["field","literal"],"label":["field","literal"],"language":["list","key"],"library":["field","literal"],"location":["list","literal"],"mainsubtitle":["field","literal"],"maintitle":["field","title"],"maintitleaddon":["field","literal"],"month":["field","literal"],"nameaddon":["field","literal"],"note":["field","literal"],"number":["field","literal"],"organization":["list","literal"],"origdate":["field","date"],"origlanguage":["list","key"],"origlocation":["list","literal"],"origpublisher":["list","literal"],"origtitle":["field","title"],"pages":["field","range"],"pagetotal":["field","literal"],"pagination":["field","key"],"part":["field","literal"],"publisher":["list","literal"],"pubstate":["field","key"],"reprinttitle":["field","literal"],"series":["field","title"],"shortauthor":["list","name"],"shorteditor":["list","name"],"shorthand":["field","literal"],"shorthandintro":["field","literal"],"shortjournal":["field","literal"],"shortseries":["field","literal"],"shorttitle":["field","title"],"subtitle":["field","literal"],"title":["field","title"],"titleaddon":["field","literal"],"translator":["list","name"],"type":["field","title"],"url":["field","uri"],"urldate":["field","date"],"venue":["field","literal"],"version":["field","literal"],"volume":["field","integer"],"volumes":["field","integer"],"year":["field","literal"],"crossref":["field","entry key"],"entryset":["separated","literal"],"execute":["field","code"],"gender":["field","gender"],"langid":["field","identifier"],"langidopts":["field","literal"],"ids":["separated","entry key"],"indexsorttitle":["field","literal"],"keywords":["separated","literal"],"options":["separated","options"],"presort":["field","string"],"related":["separated","literal"],"relatedoptions":["separated","literal"],"relatedtype":["field","identifier"],"relatedstring":["field","literal"],"sortkey":["field","literal"],"sortname":["list","name"],"sortshorthand":["field","literal"],"sorttitle":["field","literal"],"sortyear":["field","integer"],"xdata":["separated","entry key"],"xref":["field","entry key"],"namea":["list","name"],"nameb":["list","name"],"namec":["list","name"],"nameatype":["field","key"],"namebtype":["field","key"],"namectype":["field","key"],"lista":["list","literal"],"listb":["list","literal"],"listc":["list","literal"],"listd":["list","literal"],"liste":["list","literal"],"listf":["list","literal"],"usera":["field","literal"],"userb":["field","literal"],"userc":["field","literal"],"userd":["field","literal"],"usere":["field","literal"],"userf":["field","literal"],"verba":["field","literal"],"verbb":["field","literal"],"verbc":["field","literal"],"address":["list","literal"],"annote":["field","literal"],"archiveprefix":["field","literal"],"journal":["field","literal"],"key":["field","literal"],"pdf":["field","verbatim"],"primaryclass":["field","literal"],"school":["list","literal"],"numpages":["field","integer"],"pmid":["field","literal"],"pmcid":["field","literal"]}'),H=JSON.parse('{"j":{"`":"\u0300","\'":"\u0301","^":"\u0302","~":"\u0303","=":"\u0304","u":"\u0306",".":"\u0307","\\"":"\u0308","r":"\u030A","H":"\u030B","v":"\u030C","b":"\u0332","d":"\u0323","c":"\u0327","k":"\u0328","t":"\u0361","textcommabelow":"\u0326"},"C":{"textquotesingle":"\'","textasciigrave":"`","textquotedbl":"\\"","textdollar":"$","textless":"<","textgreater":">","textbackslash":"\\\\","textasciicircum":"^","textunderscore":"_","textbraceleft":"{","textbar":"|","textbraceright":"}","textasciitilde":"~","textexclamdown":"\xA1","textcent":"\xA2","textsterling":"\xA3","textcurrency":"\xA4","textyen":"\xA5","textbrokenbar":"\xA6","textsection":"\xA7","textasciidieresis":"\xA8","textcopyright":"\xA9","textordfeminine":"\xAA","guillemetleft":"\xAB","guillemotleft":"\xAB","textlnot":"\xAC","textregistered":"\xAE","textasciimacron":"\xAF","textdegree":"\xB0","textpm":"\xB1","texttwosuperior":"\xB2","textthreesuperior":"\xB3","textasciiacute":"\xB4","textmu":"\xB5","textparagraph":"\xB6","textperiodcentered":"\xB7","textonesuperior":"\xB9","textordmasculine":"\xBA","guillemetright":"\xBB","guillemotright":"\xBB","textonequarter":"\xBC","textonehalf":"\xBD","textthreequarters":"\xBE","textquestiondown":"\xBF","AE":"\xC6","DH":"\xD0","texttimes":"\xD7","O":"\xD8","TH":"\xDE","ss":"\xDF","ae":"\xE6","dh":"\xF0","textdiv":"\xF7","o":"\xF8","th":"\xFE","DJ":"\u0110","dj":"\u0111","i":"\u0131","IJ":"\u0132","ij":"\u0133","L":"\u0141","l":"\u0142","NG":"\u014A","ng":"\u014B","OE":"\u0152","oe":"\u0153","textflorin":"\u0192","j":"\u0237","textasciicaron":"\u02C7","textasciibreve":"\u02D8","textacutedbl":"\u02DD","textgravedbl":"\u02F5","texttildelow":"\u02F7","textbaht":"\u0E3F","SS":"\u1E9E","textcompwordmark":"\u200C","textendash":"\u2013","textemdash":"\u2014","textbardbl":"\u2016","textquoteleft":"\u2018","textquoteright":"\u2019","quotesinglbase":"\u201A","textquotedblleft":"\u201C","textquotedblright":"\u201D","quotedblbase":"\u201E","textdagger":"\u2020","textdaggerdbl":"\u2021","textbullet":"\u2022","textellipsis":"\u2026","textperthousand":"\u2030","textpertenthousand":"\u2031","guilsinglleft":"\u2039","guilsinglright":"\u203A","textreferencemark":"\u203B","textinterrobang":"\u203D","textfractionsolidus":"\u2044","textlquill":"\u2045","textrquill":"\u2046","textdiscount":"\u2052","textcolonmonetary":"\u20A1","textlira":"\u20A4","textnaira":"\u20A6","textwon":"\u20A9","textdong":"\u20AB","texteuro":"\u20AC","textpeso":"\u20B1","textcelsius":"\u2103","textnumero":"\u2116","textcircledP":"\u2117","textrecipe":"\u211E","textservicemark":"\u2120","texttrademark":"\u2122","textohm":"\u2126","textmho":"\u2127","textestimated":"\u212E","textleftarrow":"\u2190","textuparrow":"\u2191","textrightarrow":"\u2192","textdownarrow":"\u2193","textminus":"\u2212","Hwithstroke":"\u0126","hwithstroke":"\u0127","textasteriskcentered":"\u2217","textsurd":"\u221A","textlangle":"\u2329","textrangle":"\u232A","textblank":"\u2422","textvisiblespace":"\u2423","textopenbullet":"\u25E6","textbigcircle":"\u25EF","textmusicalnote":"\u266A","textmarried":"\u26AD","textdivorced":"\u26AE","textinterrobangdown":"\u2E18","textcommabelow":null,"copyright":"\xA9","Gamma":"\u0393","Delta":"\u0394","Theta":"\u0398","Lambda":"\u039B","Xi":"\u039E","Pi":"\u03A0","Sigma":"\u03A3","Phi":"\u03A6","Psi":"\u03A8","Omega":"\u03A9","alpha":"\u03B1","beta":"\u03B2","gamma":"\u03B3","delta":"\u03B4","varepsilon":"\u03B5","zeta":"\u03B6","eta":"\u03B7","theta":"\u03B8","iota":"\u03B9","kappa":"\u03BA","lambda":"\u03BB","mu":"\u03BC","nu":"\u03BD","xi":"\u03BE","pi":"\u03C0","rho":"\u03C1","varsigma":"\u03C2","sigma":"\u03C3","tau":"\u03C4","upsilon":"\u03C5","varphi":"\u03C6","chi":"\u03C7","psi":"\u03C8","omega":"\u03C9","vartheta":"\u03D1","Upsilon":"\u03D2","phi":"\u03D5","varpi":"\u03D6","varrho":"\u03F1","epsilon":"\u03F5"}}');const X=q,L=_,J=H.j,K=H.C,oe={jan:"01",feb:"02",mar:"03",apr:"04",may:"05",jun:"06",jul:"07",aug:"08",sep:"09",oct:"10",nov:"11",dec:"12",acmcs:"ACM Computing Surveys",acta:"Acta Informatica",cacm:"Communications of the ACM",ibmjrd:"IBM Journal of Research and Development",ibmsj:"IBM Systems Journal",ieeese:"IEEE Transactions on Software Engineering",ieeetc:"IEEE Transactions on Computers",ieeetcad:"IEEE Transactions on Computer-Aided Design of Integrated Circuits",ipl:"Information Processing Letters",jacm:"Journal of the ACM",jcss:"Journal of Computer and System Sciences",scp:"Science of Computer Programming",sicomp:"SIAM Journal on Computing",tocs:"ACM Transactions on Computer Systems",tods:"ACM Transactions on Database Systems",tog:"ACM Transactions on Graphics",toms:"ACM Transactions on Mathematical Software",toois:"ACM Transactions on Office Information Systems",toplas:"ACM Transactions on Programming Languages and Systems",tcs:"Theoretical Computer Science"},Y={it:"italics",itshape:"italics",sl:"italics",slshape:"italics",em:"italics",bf:"bold",bfseries:"bold",sc:"smallcaps",scshape:"smallcaps",rm:void 0,sf:void 0,tt:void 0},ie={textit:"italics",textsl:"italics",emph:"italics",mkbibitalic:"italics",mkbibemph:"italics",textbf:"bold",strong:"bold",mkbibbold:"bold",textsc:"smallcaps",textsuperscript:"superscript",textsubscript:"subscript",enquote:"quotes",mkbibquote:"quotes",textmd:void 0,textrm:void 0,textsf:void 0,texttt:void 0,textup:void 0},Q={italics:["<i>","</i>"],bold:["<b>","</b>"],superscript:["<sup>","</sup>"],subscript:["<sub>","</sub>"],smallcaps:['<span style="font-variant:small-caps;">',"</span>"],nocase:['<span class="nocase">',"</span>"],quotes:["\u201C","\u201D"]},ae={ElsevierGlyph(e){return String.fromCharCode(parseInt(e,16))},href(e,t){return e},url(e){return e}},U=/---?|''|``|~/g,z={"--":"\u2013","---":"\u2014","``":"\u201C","''":"\u201D","~":"\xA0"},ee={"^":"superscript",sp:"superscript",_:"subscript",sb:"subscript",mathrm:void 0},te={"^":{0:"\u2070",1:"\xB9",2:"\xB2",3:"\xB3",4:"\u2074",5:"\u2075",6:"\u2076",7:"\u2077",8:"\u2078",9:"\u2079","+":"\u207A","-":"\u207B","=":"\u207C","(":"\u207D",")":"\u207E",i:"\u2071",n:"\u207F"},_:{0:"\u2080",1:"\u2081",2:"\u2082",3:"\u2083",4:"\u2084",5:"\u2085",6:"\u2086",7:"\u2087",8:"\u2088",9:"\u2089","+":"\u208A","-":"\u208B","=":"\u208C","(":"\u208D",")":"\u208E",a:"\u2090",e:"\u2091",o:"\u2092",x:"\u2093",\u0259:"\u2094",h:"\u2095",k:"\u2096",l:"\u2097",m:"\u2098",n:"\u2099",s:"\u209A",p:"\u209B",t:"\u209C"}},s=["american","british","canadian","english","australian","newzealand","usenglish","ukenglish","en","eng","en-au","en-bz","en-ca","en-cb","en-gb","en-ie","en-jm","en-nz","en-ph","en-tt","en-us","en-za","en-zw","anglais"];function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?f(Object(r),!0).forEach(function(n){v(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function v(e,t,r){return t=m(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m(e){var t=O(e,"string");return typeof t=="symbol"?t:String(t)}function O(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const j=/[a-zA-Z_][a-zA-Z0-9_:-]*/,P={comment:/%.*/,whitespace:{match:/\s+/,lineBreaks:!0}},i=S().states({main:{junk:{match:/@[cC][oO][mM][mM][eE][nN][tT].+|[^@]+/,lineBreaks:!0},at:{match:"@",push:"entry"}},entry:l(l({},P),{},{otherEntryType:{match:/[sS][tT][rR][iI][nN][gG]|[pP][rR][eE][aA][mM][bB][lL][eE]/,next:"otherEntryContents"},dataEntryType:{match:j,next:"dataEntryContents"}}),otherEntryContents:l(l({},P),{},{lbrace:{match:/[{(]/,next:"fields"}}),dataEntryContents:l(l({},P),{},{lbrace:{match:/[{(]/,next:"dataEntryContents"},label:/[^,\s]+/,comma:{match:",",next:"fields"}}),fields:l(l({},P),{},{identifier:j,number:/-?\d+/,hash:"#",equals:"=",comma:",",quote:{match:'"',push:"quotedLiteral"},lbrace:{match:"{",push:"bracedLiteral"},rbrace:{match:/[})]/,pop:!0}}),quotedLiteral:{lbrace:{match:"{",push:"bracedLiteral"},quote:{match:'"',pop:!0},text:{match:/(?:\\[\\{]|[^{"])+/,lineBreaks:!0}},bracedLiteral:{lbrace:{match:"{",push:"bracedLiteral"},rbrace:{match:"}",pop:!0},text:{match:/(?:\\[\\{}]|[^{}])+/,lineBreaks:!0}}}),o={"(":")","{":"}"},u=new C.util.Grammar({Main(){const e=[];for(;;){for(;this.matchToken("junk");)this.consumeToken("junk");if(this.matchEndOfFile())break;e.push(this.consumeRule("Entry"))}return e.filter(Boolean)},_(){let e;for(;e!==this.token;)e=this.token,this.consumeToken("whitespace",!0),this.consumeToken("comment",!0)},Entry(){this.consumeToken("at"),this.consumeRule("_");const e=(this.matchToken("otherEntryType")?this.consumeToken("otherEntryType"):this.consumeToken("dataEntryType")).value.toLowerCase();this.consumeRule("_");const t=this.consumeToken("lbrace").value;this.consumeRule("_");let r;if(e==="string"){const[a,c]=this.consumeRule("Field");this.state.strings[a]=c}else if(e==="preamble")this.consumeRule("Expression");else{const a=this.consumeToken("label").value;this.consumeRule("_"),this.consumeToken("comma"),this.consumeRule("_");const c=this.consumeRule("EntryBody");r={type:e,label:a,properties:c}}this.consumeRule("_");const n=this.consumeToken("rbrace").value;return n!==o[t]&&C.logger.warn("[plugin-bibtex]",`entry started with "${t}", but ends with "${n}"`),r},EntryBody(){const e={};for(;this.matchToken("identifier");){const[t,r]=this.consumeRule("Field");if(e[t]=r,this.consumeRule("_"),this.consumeToken("comma",!0))this.consumeRule("_");else break}return e},Field(){const e=this.consumeToken("identifier").value.toLowerCase();this.consumeRule("_"),this.consumeToken("equals"),this.consumeRule("_");const t=this.consumeRule("Expression");return[e,t]},Expression(){let e=this.consumeRule("ExpressionPart");for(this.consumeRule("_");this.matchToken("hash");)this.consumeToken("hash"),this.consumeRule("_"),e+=this.consumeRule("ExpressionPart").toString(),this.consumeRule("_");return e},ExpressionPart(){return this.matchToken("identifier")?this.state.strings[this.consumeToken("identifier").value.toLowerCase()]||"":this.matchToken("number")?parseInt(this.consumeToken("number")):this.matchToken("quote")?this.consumeRule("QuoteString"):this.consumeRule("BracketString")},QuoteString(){let e="";for(this.consumeToken("quote");!this.matchToken("quote");)e+=this.consumeRule("Text");return this.consumeToken("quote"),e},BracketString(){let e="";for(this.consumeToken("lbrace");!this.matchToken("rbrace");)e+=this.consumeRule("Text");return this.consumeToken("rbrace"),e},Text(){return this.matchToken("lbrace")?`{${this.consumeRule("BracketString")}}`:this.consumeToken("text").value}},{strings:oe});function p(e){return u.parse(i.reset(e))}const b={splitEntries:/\n\s*(?=\[)/g,parseEntry:/^\[(.+?)\]\s*(?:\n([\s\S]+))?$/,splitPairs:/((?=.)\s)*\n\s*/g,splitPair:/:(.*)/},h=e=>{const[,t,r]=e.match(b.parseEntry)||[];if(!t||!r)return{};{const n={type:"book",label:t,properties:{}};return r.trim().split(b.splitPairs).filter(a=>a).forEach(a=>{let[c,k]=a.split(b.splitPair);k&&(c=c.trim(),k=k.trim(),c==="type"?n.type=k:n.properties[c]=k)}),n}},y=e=>e.trim().split(b.splitEntries).map(h);var x=JSON.parse('{"source":{"article":"article-journal","book":"book","mvbook":"book","inbook":"chapter","bookinbook":"book","booklet":"book","collection":"book","mvcollection":"book","incollection":"chapter","dataset":"dataset","manual":"report","misc":"document","online":"webpage","patent":"patent","periodical":"periodical","proceedings":"book","mvproceedings":"book","inproceedings":"paper-conference","reference":"book","mvreference":"book","inreference":"entry","report":"report","software":"software","thesis":"thesis","unpublished":"manuscript","artwork":"graphic","audio":"song","image":"figure","jurisdiction":"legal_case","legislation":"legislation","legal":"treaty","letter":"personal_communication","movie":"motion_picture","music":"musical_score","performance":"performance","review":"review","standard":"standard","video":"motion_picture","conference":"paper-conference","electronic":"webpage","mastersthesis":"thesis","phdthesis":"thesis","techreport":"report","www":"webpage"},"target":{"article":"article","article-journal":"article","article-magazine":"article","article-newspaper":"article","bill":"legislation","book":"book","broadcast":"audio","chapter":"inbook","classic":"unpublished","collection":"misc","dataset":"dataset","document":"misc","entry":"inreference","entry-dictionary":"inreference","entry-encyclopedia":"inreference","event":"misc","figure":"artwork","graphic":"artwork","hearing":"legal","interview":"audio","legal_case":"jurisdiction","legislation":"legislation","manuscript":"unpublished","motion_picture":"movie","musical_score":"music","paper-conference":"inproceedings","patent":"patent","performance":"performance","periodical":"periodical","personal_communication":"letter","post":"online","post-weblog":"online","regulation":"legal","report":"report","review":"review","review-book":"review","software":"software","song":"music","speech":"audio","standard":"standard","thesis":"thesis","treaty":"legal","webpage":"online"}}'),w=JSON.parse('{"source":{"article":"article-journal","book":"book","booklet":"book","conference":"paper-conference","inbook":"chapter","incollection":"chapter","inproceedings":"paper-conference","manual":"report","mastersthesis":"thesis","misc":"document","phdthesis":"thesis","proceedings":"book","techreport":"report","unpublished":"manuscript"},"target":{"article":"article","article-journal":"article","article-magazine":"article","article-newspaper":"article","book":"book","chapter":"inbook","manuscript":"unpublished","paper-conference":"inproceedings","report":"techreport","review":"article","review-book":"article"}}'),d={constants:M,types:{biblatex:x,bibtex:w},parse:{biblatex:!0,strict:!1,sentenceCase:"never"},format:{useIdAsLabel:!1}};const R=new Set(["the","a","an"]),F=/(?:<\/?.*?>|[\u0020-\u002F\u003A-\u0040\u005B-\u005E\u0060\u007B-\u007F])+/g,V=/[^\u0020-\u007F]+/g;function G(e){return e?e.normalize("NFKD").replace(V,"").split(F).find(t=>t.length&&!R.has(t.toLowerCase())):""}const Z=new C.util.Translator([{source:"given",target:"given"},{source:"family",target:"family"},{source:"suffix",target:"suffix"},{source:"prefix",target:"non-dropping-particle"},{source:"family",target:"literal",when:{source:!1,target:{family:!1,given:!1}}}]),N=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],E="BibTeX type",D="BibTeX label",B={jan:1,feb:2,mar:3,apr:4,may:5,jun:6,jul:7,aug:8,sep:9,oct:10,nov:11,dec:12,january:1,february:2,march:3,april:4,may:5,june:6,july:7,august:8,september:9,october:10,november:11,december:12},se={bathesis:"Bachelor's thesis",mathesis:"Master's thesis",phdthesis:"PhD thesis",candthesis:"Candidate thesis",techreport:"technical report",resreport:"research report",software:"computer software",datacd:"data cd",audiocd:"audio cd",patent:"patent",patentde:"German patent",patenteu:"European patent",patentfr:"French patent",patentuk:"British patent",patentus:"U.S. patent",patreq:"patent request",patreqde:"German patent request",patreqeu:"European patent request",patreqfr:"French patent request",patrequk:"British patent request",patrequs:"U.S. patent request"},fe=/(^(?:ISAN )?(?:[0-9a-f]{4}-){4}[0-9a-z](?:-(?:[0-9a-f]{4}-){2}[0-9a-z])?$)|(^(?:979-?0-?|M-?)(?:\d{9}|(?=[\d-]{11}$)\d+-\d+-\d)$)|(^ISRN .{1,36}$)|(^(?:ISWC )?T-?\d{9}-?\d$)/i;function Ue(e){const t=e.split("T")[0].replace(/[?~%]$/,"").split("-"),r=+t[0].replace(/^Y(?=-?\d{4}\d+)/,"").replace(/X/g,"0"),n=+t[1],a=+t[2];return!n||n>20?[r]:a?[r,n,a]:[r,n]}function Ge(e){if(e==null)return[];if(+e)return[parseInt(e,10)];if(e=e.trim().toLowerCase(),e in B)return[B[e]];const t=e.split(/\s+/);let r,n;return t[0]in B?(r=B[t[0]],n=parseInt(t[1])):t[1]in B&&(r=B[t[1]],n=parseInt(t[0])),n?[r,n]:r?[r]:[]}function We(e,t,r,n){let a="";return e&&e[0]&&(a+=G(e[0].family||e[0].literal)),t&&t["date-parts"]&&t["date-parts"][0]&&(a+=t["date-parts"][0][0]),r?a+=r:n&&(a+=G(n)),a}const g={PICK:{toTarget(...e){return e.find(Boolean)},toSource(e){return[e]}},DATE:{toTarget(e){const t=e.split("/").map(r=>r&&r!==".."?Ue(r):void 0);return isNaN(t[0][0])?{literal:e}:{"date-parts":t}},toSource(e){if("date-parts"in e)return e["date-parts"].map(t=>t.map(r=>r.toString().padStart(2,"0")).join("-")).join("/")}},YEAR_MONTH:{toTarget(e,t,r){return isNaN(+e)?{literal:e}:!isNaN(+r)&&!isNaN(+t)?{"date-parts":[[+e,+t,+r]]}:{"date-parts":[[+e,...Ge(t)]]}},toSource(e){if("date-parts"in e){const[t,r,n]=e["date-parts"][0];return[t.toString(),r?n?`${N[r-1]} ${n}`:r:void 0]}else return[]}},EPRINT:{toTarget(e,t){if(t==="pubmed")return e},toSource(e){return[e,"pubmed"]}},EVENT_TITLE:{toTarget(e,t){return t&&(e+=" ("+t+")"),e},toSource(e){return e.match(/^(.+)(?: \((.+)\))?$/).slice(1,3)}},HOW_PUBLISHED:{toTarget(e){if(e.startsWith("http"))return e}},KEYWORDS:{toTarget(e){return e.join(",")},toSource(e){return e.split(",")}},LABEL:{toTarget(e){return[e,e]},toSource(e,t,r,n,a,c){let k;return e===null?k="null":e===void 0?k="undefined":k=e.toString().replace(F,""),d.format.useIdAsLabel?k:t&&!F.test(t)?t:We(r,n,a,c)||k}},NAMES:{toTarget(e){return e.map(Z.convertToTarget)},toSource(e){return e.map(Z.convertToSource)}},PAGES:{toTarget(e){return e.replace(/[–—]/,"-")},toSource(e){return e.replace("-","--")}},STANDARD_NUMBERS:{toTarget(...e){return e.find(Boolean)},toSource(e){const t=e.toString().match(fe);return t?t.slice(1,5):[]}},STATUS:{toSource(e){if(/^(inpreparation|submitted|forthcoming|inpress|prepublished)$/i.test(e))return e}},TITLE:{toTarget(e,t,r){return t&&(e+=": "+t),e},toSource(e){return[e]}}};var be=T("./node_modules/@citation-js/date/lib/index.js");const He=[{source:"note",target:"accessed",when:{source:!1,target:{note:!1,addendum:!1}},convert:{toSource(e){return`[Online; accessed ${(0,be.format)(e)}]`}}},{source:"numpages",target:"number-of-pages",when:{source:{pagetotal:!1},target:!1}},{source:"pmid",target:"PMID",when:{source:{eprinttype(e){return e!=="pmid"},archiveprefix(e){return e!=="pmid"}},target:!1}},{source:"pmcid",target:"PMCID",when:{target:!1}},{source:"s2id",target:"custom",convert:{toTarget(e){return{S2ID:e}},toSource({S2ID:e}){return e}}}],Je=[{source:"annote",target:"annote",when:{source:{annotation:!1},target:!1}},{source:"address",target:"publisher-place",convert:g.PICK,when:{source:{location:!1},target:!1}},{source:["eprint","archiveprefix"],target:"PMID",convert:g.EPRINT,when:{source:{eprinttype:!1},target:!1}},{source:"journal",target:"container-title",when:{source:{maintitle:!1,booktitle:!1,journaltitle:!1},target:!1}},{source:"school",target:"publisher",convert:g.PICK,when:{source:{institution:!1,organization:!1,publisher:!1},target:!1}}];var ye=new C.util.Translator([...Je,...He,{source:"abstract",target:"abstract"},{source:"urldate",target:"accessed",convert:g.DATE},{source:"annotation",target:"annote"},{source:"author",target:"author",convert:g.NAMES},{source:"library",target:"call-number"},{source:"chapter",target:"chapter-number"},{source:"bookauthor",target:"container-author",convert:g.NAMES},{source:["maintitle","mainsubtitle","maintitleaddon"],target:"container-title",when:{source:!0,target:{"number-of-volumes":!0}},convert:g.TITLE},{source:["booktitle","booksubtitle","booktitleaddon"],target:"container-title",when:{source:{maintitle:!1},target:{"number-of-volumes":!1,type(e){return!e||!e.startsWith("article")}}},convert:g.TITLE},{source:["journaltitle","journalsubtitle","journaltitleaddon"],target:"container-title",when:{source:{[E]:"article"},target:{type:["article","article-newspaper","article-journal","article-magazine"]}},convert:g.TITLE},{source:"shortjournal",target:"container-title-short",when:{source:{[E]:"article"},target:{type:["article","article-newspaper","article-journal","article-magazine"]}}},{source:"shortjournal",target:"journalAbbreviation",when:{source:!1,target:{"container-title-short":!1}}},{source:"number",target:"collection-number",when:{source:{[E]:["book","mvbook","inbook","bookinbook","suppbook","collection","mvcollection","incollection","suppcollection","manual","suppperiodical","proceedings","mvproceedings","refererence"]},target:{type:["bill","book","broadcast","chapter","dataset","entry","entry-dictionary","entry-encyclopedia","figure","graphic","interview","legislation","legal_case","manuscript","map","motion_picture","musical_score","pamphlet","post","post-weblog","personal_communication","review","review-book","song","speech","thesis","treaty","webpage"]}}},{source:"series",target:"collection-title"},{source:"shortseries",target:"collection-title-short"},{source:"doi",target:"DOI"},{source:"edition",target:"edition"},{source:"editor",target:"editor",convert:g.NAMES},{source:[E,"entrysubtype","type"],target:["type","genre"],convert:{toTarget(e,t,r){return r||(e==="mastersthesis"&&(r="mathesis"),e==="phdthesis"&&(r="phdthesis"),e==="techreport"&&(r="techreport")),[x.source[e]||"document",r||t]},toSource(e,t){const r=x.target[e]||"misc";return t in se?[r,void 0,t]:[r,t]}}},{source:E,when:{target:{type:!1}},convert:{toSource(){return"misc"}}},{source:"eventdate",target:"event-date",convert:g.DATE},{source:"venue",target:"event-place"},{source:["eventtitle","eventtitleaddon"],target:"event-title",convert:g.EVENT_TITLE},{source:["eventtitle","eventtitleaddon"],target:"event",convert:g.EVENT_TITLE,when:{source:!1,target:{"event-title":!1}}},{source:D,target:["id","citation-key","author","issued","year-suffix","title"],convert:g.LABEL},{source:"isbn",target:"ISBN"},{source:"issn",target:"ISSN"},{source:"issue",target:"issue",when:{source:{number:!1,[E]:["article","periodical"]},target:{issue(e){return typeof e=="string"&&!e.match(/\d+/)},type:["article","article-journal","article-newspaper","article-magazine","periodical"]}}},{source:"number",target:"issue",when:{source:{[E]:["article","periodical","inproceedings"]},target:{issue(e){return e&&(typeof e=="number"||e.match(/\d+/))},type:["article","article-journal","article-newspaper","article-magazine","paper-conference","periodical"]}}},{source:"date",target:"issued",convert:g.DATE},{source:["year","month","day"],target:"issued",convert:g.YEAR_MONTH,when:{source:{date:!1},target:!1}},{source:"location",target:"jurisdiction",when:{source:{type:"patent"},target:{type:"patent"}}},{source:"keywords",target:"keyword",convert:g.KEYWORDS},{source:"language",target:"language",convert:g.PICK},{source:"langid",target:"language",when:{source:{language:!1},target:!1}},{source:"note",target:"note"},{source:"addendum",target:"note",when:{source:{note:!1},target:!1}},{source:"eid",target:"number",when:{target:{type:["article-journal"]}}},{source:["isan","ismn","isrn","iswc"],target:"number",convert:g.STANDARD_NUMBERS,when:{source:{[E](e){return e!=="patent"}},target:{type(e){return e!=="patent"}}}},{source:"number",target:"number",when:{source:{[E]:["patent","report","techreport","legislation"]},target:{type:["patent","report","legislation"]}}},{source:"origdate",target:"original-date",convert:g.DATE},{source:"origlocation",target:"original-publisher-place",convert:g.PICK},{source:"origpublisher",target:"original-publisher",convert:g.PICK},{source:"origtitle",target:"original-title"},{source:"pages",target:"page",when:{source:{bookpagination:[void 0,"page"]}},convert:g.PAGES},{source:"pagetotal",target:"number-of-pages"},{source:"part",target:"part-number"},{source:["eprint","eprinttype"],target:"PMID",convert:g.EPRINT},{source:"location",target:"publisher-place",convert:g.PICK},{source:"publisher",target:"publisher",convert:g.PICK,when:{source:!0,target:{type:["article","article-journal","article-magazine","article-newspaper","bill","book","broadcast","chapter","classic","collection","dataset","document","entry","entry-dictionary","entry-encyclopedia","event","figure","graphic","hearing","interview","legal_case","legislation","manuscript","map","motion_picture","musical_score","pamphlet","paper-conference","patent","performance","periodical","personal_communication","post","post-weblog","regulation","review","review-book","software","song","speech","standard","treaty"]}}},{source:"organization",target:"publisher",convert:g.PICK,when:{source:{publisher:!1},target:{type:"webpage"}}},{source:"institution",target:"publisher",convert:g.PICK,when:{source:{publisher:!1,organization:!1},target:{type:["report","thesis"]}}},{source:"howpublished",target:"publisher",convert:g.PICK,when:{source:{publisher:!1,organization:!1,institution:!1},target:{type:"manuscript"}}},{source:["pages","bookpagination"],target:"section",when:{source:{bookpagination:"section"},target:{page:!1}},convert:{toTarget(e){return e},toSource(e){return[e,"section"]}}},{source:"pubstate",target:"status",convert:g.STATUS},{source:"shorttitle",target:"title-short"},{source:"shorttitle",target:"shortTitle",when:{source:!1,target:{"title-short":!1}}},{source:["title","subtitle","titleaddon"],target:"title",convert:g.TITLE},{source:"translator",target:"translator",convert:g.NAMES},{source:"url",target:"URL"},{source:"howpublished",target:"URL",convert:g.HOW_PUBLISHED,when:{source:{url:!1},target:!1}},{source:"version",target:"version"},{source:"volume",target:"volume"},{source:"volumes",target:"number-of-volumes"},{source:["issuetitle","issuesubtitle","issuetitleaddon"],target:"volume-title",convert:g.TITLE}]),ve=new C.util.Translator([{source:"note",target:"accessed",when:{source:!1,target:{note:!1}},convert:{toSource(e){return`[Online; accessed ${(0,be.format)(e)}]`}}},{source:"annote",target:"annote"},{source:"address",target:"publisher-place",convert:g.PICK},{source:"author",target:"author",convert:g.NAMES},{source:"chapter",target:"chapter-number"},{source:"number",target:"collection-number",when:{source:{[E]:["book","mvbook","inbook","collection","mvcollection","incollection","suppcollection","manual","suppperiodical","proceedings","mvproceedings","refererence"]},target:{type:["bill","book","broadcast","chapter","dataset","entry","entry-dictionary","entry-encyclopedia","figure","graphic","interview","legislation","legal_case","manuscript","map","motion_picture","musical_score","pamphlet","post","post-weblog","personal_communication","review","review-book","song","speech","thesis","treaty","webpage"]}}},{source:"series",target:"collection-title"},{source:"booktitle",target:"container-title",when:{target:{type:["chapter","paper-conference"]}}},{source:"journal",target:"container-title",when:{source:{[E]:"article"},target:{type:["article","article-newspaper","article-journal","article-magazine"]}}},{source:"edition",target:"edition"},{source:"editor",target:"editor",convert:g.NAMES},{source:D,target:["id","citation-key","author","issued","year-suffix","title"],convert:g.LABEL},{source:"number",target:"issue",when:{source:{[E]:["article","periodical","inproceedings"]},target:{issue(e){return typeof e=="number"||typeof e=="string"&&e.match(/\d+/)},type:["article","article-journal","article-newspaper","article-magazine","paper-conference","periodical"]}}},{source:["year","month","day"],target:"issued",convert:g.YEAR_MONTH},{source:"note",target:"note"},{source:"number",target:"number",when:{source:{[E]:["patent","report","techreport"]},target:{type:["patent","report"]}}},{source:"pages",target:"page",convert:g.PAGES},{source:"publisher",target:"publisher",convert:g.PICK,when:{target:{type:["article","article-journal","article-magazine","article-newspaper","bill","book","broadcast","chapter","classic","collection","dataset","document","entry","entry-dictionary","entry-encyclopedia","event","figure","graphic","hearing","interview","legal_case","legislation","map","motion_picture","musical_score","pamphlet","patent","performance","periodical","personal_communication","post","post-weblog","regulation","review","review-book","software","song","speech","standard","treaty","webpage"]}}},{source:"organization",target:"publisher",convert:g.PICK,when:{source:{publisher:!1},target:{type:"paper-conference"}}},{source:"institution",target:"publisher",convert:g.PICK,when:{source:{publisher:!1,organization:!1},target:{type:"report"}}},{source:"school",target:"publisher",convert:g.PICK,when:{source:{institution:!1,organization:!1,publisher:!1},target:{type:"thesis"}}},{source:"howpublished",target:"publisher",convert:g.PICK,when:{source:{publisher:!1,organization:!1,institution:!1,school:!1},target:{type:"manuscript"}}},{source:"title",target:"title"},{source:[E,"type"],target:["type","genre"],convert:{toTarget(e,t){const r=w.source[e]||"document";return t?[r,t]:e==="mastersthesis"?[r,"Master's thesis"]:e==="phdthesis"?[r,"PhD thesis"]:[r]},toSource(e,t){const r=w.target[e]||"misc";return/^(master'?s|diploma) thesis$/i.test(t)?["mastersthesis"]:/^(phd|doctoral) thesis$/i.test(t)?["phdthesis"]:[r,t]}}},{source:E,when:{target:{type:!1}},convert:{toSource(){return"misc"}}},{source:"howpublished",target:"URL",convert:g.HOW_PUBLISHED,when:{target:{publisher:!1}}},{source:"volume",target:"volume"}]);function we(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ye(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?we(Object(r),!0).forEach(function(n){Ve(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):we(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ve(e,t,r){return t=Ze(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ze(e){var t=Xe(e,"string");return typeof t=="symbol"?t:String(t)}function Xe(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const Qe=new Set(["book","inbook","bookinbook","suppbook"]),ke=new Set(["inbook","bookinbook","suppbook"]),xe=new Set(["collection","reference","incollection","inreference","suppcollection"]),Te=new Set(["incollection","inreference","suppcollection"]),Se={mvbook:["main",Qe],mvcollection:["main",xe],mvreference:["main",xe],mvproceedings:["main",new Set(["proceedings","inproceedings"])],book:["book",ke],collection:["book",Te],reference:["book",Te],proceedings:["book",new Set(["inproceedings"])],periodical:["journal",new Set(["article","suppperiodical"])]};function Ee(e,t,r){if(t.crossref in r){const n=r[t.crossref];if(n.properties===t)return t;const a=Ye({},Ee(n.type,n.properties,r));if(delete a.ids,delete a.crossref,delete a.xref,delete a.entryset,delete a.entrysubtype,delete a.execute,delete a.label,delete a.options,delete a.presort,delete a.related,delete a.relatedoptions,delete a.relatedstring,delete a.relatedtype,delete a.shortand,delete a.shortandintro,delete a.sortkey,(n.type==="mvbook"||n.type==="book")&&ke.has(e)&&(a.bookauthor=a.author),n.type in Se){const[c,k]=Se[n.type];k.has(e)&&(a[c+"title"]=a.title,a[c+"subtitle"]=a.subtitle,c!=="journal"&&(a[c+"titleaddon"]=a.titleaddon),delete a.title,delete a.subtitle,delete a.titleaddon,delete a.shorttitle,delete a.sorttitle,delete a.indextitle,delete a.indexsorttitle)}return Object.assign(a,t)}return t}function et(e,t){if(e==null)return{};var r=tt(e,t),n,a;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(a=0;a<c.length;a++)n=c[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function tt(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,c;for(c=0;c<n.length;c++)a=n[c],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function Oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function rt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Oe(Object(r),!0).forEach(function(n){nt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Oe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nt(e,t,r){return t=je(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function je(e){var t=it(e,"string");return typeof t=="symbol"?t:String(t)}function it(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Pe(e,t){const r={};for(const n of e)r[n.label]=n;return e.map(({type:n,label:a,properties:c})=>t.convertToTarget(rt({[E]:n,[D]:a},Ee(n,c,r))))}function _e(e,t){return e.map(r=>{const n=t.convertToSource(r),{[E]:a,[D]:c}=n,k=et(n,[E,D].map(je));return{type:a,label:c,properties:k}})}function at(e){return Pe(e,ve)}function ot(e){return _e(e,ve)}function st(e){return Pe(e,ye)}function lt(e){return _e(e,ye)}function ut(e){const t=e.toUpperCase(),r=e.toLowerCase();for(let n=0;n<e.length;n++)if(t[n]!==r[n])return t[n]===e[n];return null}function re(e){if(e.length===0)return;let t="";for(;e.length>1;){const{value:n,hyphenated:a}=e.shift();t+=n+(a?"-":" ")}const r=t+e[0].value;return r[0]&&r}function ct(e,t=!0){const r=[],n=[];if(t)for(;e.length>1&&e[0].upperCase!==!1;){for(r.push(...n),n.length=0;e.length>1&&e[0].upperCase!==!1&&!e[0].hyphenated;)r.push(e.shift());for(;e.length>0&&e[0].upperCase!==!1&&e[0].hyphenated;)n.push(e.shift())}const a=[],c=[];for(;e.length>1;){for(a.push(...c),c.length=0;e.length>1&&e[0].upperCase===!1;)a.push(e.shift());for(;e.length>0&&e[0].upperCase!==!1;)c.push(e.shift())}return n.length&&c.unshift(...n),e.length&&c.push(e[0]),[re(r),re(a),re(c)]}function pt(e){if(e[0][0].label){const c={};for(const[{value:k,label:W}]of e)c[W]=k;return c}const t={},[r,n,a]=ct(e[0],e.length===1);return a&&(t.family=a),n&&(t.prefix=n),e.length===3?(t.given=re(e[2]),t.suffix=re(e[1])):e.length===2?t.given=re(e[1]):r&&(t.given=r),t}function Ce(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function $(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ce(Object(r),!0).forEach(function(n){ft(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ce(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ft(e,t,r){return t=ht(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ht(e){var t=dt(e,"string");return typeof t=="symbol"?t:String(t)}function dt(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const le={command:{match:/\\(?:[a-zA-Z]+|.) */,type:S().keywords({commandBegin:"\\begin",commandEnd:"\\end"}),value:e=>e.slice(1).trim()},lbrace:{match:"{",push:"bracedLiteral"},mathShift:{match:"$",push:"mathLiteral"},whitespace:{match:/[\s]+|~/,lineBreaks:!0,value(e){return e==="~"?"\xA0":" "}}},mt=S().states({stringLiteral:$($({},le),{},{text:/[^{$}\s~\\]+/}),namesLiteral:$($({and:/\s+[aA][nN][dD]\s+/,comma:",",hyphen:"-",equals:"="},le),{},{text:/[^{$}\s~\\,=-]+/}),listLiteral:$($({and:/\s+and\s+/},le),{},{text:/[^{$}\s~\\]+/}),separatedLiteral:$($({comma:","},le),{},{text:/[^{$}\s~\\,]+/}),bracedLiteral:$($({},le),{},{rbrace:{match:"}",pop:!0},text:/[^{$}\s~\\]+/}),mathLiteral:$($({},le),{},{mathShift:{match:"$",pop:!0},script:/[\^_]/,text:/[^{$}\s~\\^_]+/})});function pe(e){return e[0],e}function ce(e,t){return t in Q?e&&Q[t].join(e):e}const gt=new C.util.Grammar({String(){let e="";for(;!this.matchEndOfFile();)e+=this.consumeRule("Text");return pe(e)},StringNames(){const e=[];for(;;){if(this.consumeToken("whitespace",!0),e.push(this.consumeRule("Name")),this.consumeToken("whitespace",!0),this.matchEndOfFile())return e;this.consumeToken("and")}},Name(){const e=[];for(;;){if(e.push(this.consumeRule("NamePiece")),this.matchEndOfFile()||this.matchToken("and"))return pt(e);this.consumeToken("comma"),this.consumeToken("whitespace",!0)}},NamePiece(){const e=[];for(;;){const t=this.consumeRule("NameToken");if(t.label)return t.label=re([...e,{value:t.label}]),[t];if(e.push(t),this.matchEndOfFile()||this.matchToken("and")||this.matchToken("comma"))return e;for(;this.matchToken("hyphen")||this.matchToken("whitespace");)this.consumeToken()}},NameToken(){let e=null,t="";for(;;)if(e===null&&this.matchToken("text")){const r=this.consumeToken().value;t+=r,e=ut(r)}else{if(this.matchEndOfFile()||this.matchToken("and")||this.matchToken("comma")||this.matchToken("whitespace"))return{value:t,upperCase:e};if(this.matchToken("hyphen"))return{value:t,upperCase:e,hyphenated:!0};if(this.matchToken("equals")){this.consumeToken("equals");const r=this.consumeRule("NamePiece");return r[0].label&&(t+="="+r[0].label),{value:re(r),label:t}}else t+=this.consumeRule("Text")}},StringList(){const e=[];for(;!this.matchEndOfFile();){let t="";for(;!this.matchEndOfFile()&&!this.matchToken("and");)t+=this.consumeRule("Text");e.push(pe(t)),this.consumeToken("and",!0)}return e.length===1?e[0]:e},StringSeparated(){const e=[];for(;!this.matchEndOfFile();){let t="";for(;!this.matchEndOfFile()&&!this.matchToken("comma");)t+=this.consumeRule("Text");e.push(t.trim()),this.consumeToken("comma",!0),this.consumeToken("whitespace",!0)}return e},StringVerbatim(){let e="";for(;!this.matchEndOfFile();)e+=this.consumeToken().text;return pe(e)},StringUri(){const e=this.consumeRule("StringVerbatim");try{return decodeURI(e)===e?encodeURI(e):e}catch(t){return encodeURI(e)}},StringTitleCase(){this.state.sentenceCase=!0;let e="";for(;!this.matchEndOfFile();)e+=this.consumeRule("Text");return pe(e)},BracketString(){var e;let t="";this.consumeToken("lbrace");const r=this.state.sentenceCase;for(this.state.sentenceCase=r&&this.matchToken("command"),(e=this.state).partlyLowercase&&(e.partlyLowercase=this.state.sentenceCase);!this.matchToken("rbrace");)t+=this.consumeRule("Text");const a=r&&!this.state.sentenceCase&&this.state.partlyLowercase;return this.state.sentenceCase=r,this.consumeToken("rbrace"),a?ce(t,"nocase"):t},MathString(){let e="";for(this.consumeToken("mathShift");!this.matchToken("mathShift");){if(this.matchToken("script")){const t=this.consumeToken("script").value,r=this.consumeRule("Text").split("");if(r.every(n=>n in te[t]))e+=r.map(n=>te[t][n]).join("");else{const n=ee[t];e+=Q[n].join(r.join(""))}continue}if(this.matchToken("command")){const t=this.token.value;if(t in ee){this.consumeToken("command");const r=this.consumeRule("BracketString");e+=ce(r,ee[t]);continue}}e+=this.consumeRule("Text")}return this.consumeToken("mathShift"),e},Text(){if(this.matchToken("lbrace"))return this.consumeRule("BracketString");if(this.matchToken("mathShift"))return this.consumeRule("MathString");if(this.matchToken("whitespace"))return this.consumeToken("whitespace").value;if(this.matchToken("commandBegin"))return this.consumeRule("EnclosedEnv");if(this.matchToken("command"))return this.consumeRule("Command");const e=this.consumeToken("text").value.replace(U,W=>z[W]),t=this.state.afterPunctuation;if(this.state.afterPunctuation=/[?!.:]$/.test(e),!this.state.sentenceCase){var r;return(r=this.state).partlyLowercase||(r.partlyLowercase=e===e.toLowerCase()&&e!==e.toUpperCase()),e}const[n,...a]=e,c=a.join(""),k=c.toLowerCase();return c!==k?e:t?n+k:e.toLowerCase()},Command(){const e=this.consumeToken("command"),t=e.value;if(t in Y){const r=this.consumeRule("Env"),n=Y[t];return ce(r,n)}else if(t in ie){const r=this.consumeRule("BracketString"),n=ie[t];return ce(r,n)}else{if(t in K)return K[t];if(t in J&&!this.matchEndOfFile()){const r=this.consumeRule("Text");return(r[0]+J[t]).normalize("NFC")+r.slice(1)}else if(t in ae){const r=ae[t],n=[];let a=r.length;for(;a-- >0;)this.consumeToken("whitespace",!0),n.push(this.consumeRule("BracketString"));return r(...n)}else return/^[&%$#_{}]$/.test(t)?e.text.slice(1):e.text}},Env(){let e="";for(;!this.matchEndOfFile()&&!this.matchToken("rbrace");)e+=this.consumeRule("Text");return e},EnclosedEnv(){this.consumeToken("commandBegin");const e=this.consumeRule("BracketString");let t="";for(;!this.matchToken("commandEnd");)t+=this.consumeRule("Text");const r=this.consumeToken("commandEnd"),n=this.consumeRule("BracketString");if(e!==n)throw new SyntaxError(this.lexer.formatError(r,`environment started with "${e}", ended with "${n}"`));return ce(t,Y[e])}},{sentenceCase:!1,partlyLowercase:!1,afterPunctuation:!0});function Re(e){return s.includes(e.toLowerCase())}function bt(e){return Array.isArray(e)?e.every(Re):Re(e)}function yt(e,t){if(e[1]==="name")return e[0]==="list"?"StringNames":"Name";if(e[1]==="title"){const r=d.parse.sentenceCase;return r==="always"||r==="english"&&bt(t)?"StringTitleCase":"String"}switch(e[0]==="field"?e[1]:e[0]){case"list":return"StringList";case"separated":return"StringSeparated";case"verbatim":return"StringVerbatim";case"uri":return"StringUri";case"title":case"literal":default:return"String"}}function vt(e){if(e[1]==="name")return"namesLiteral";switch(e[0]){case"list":return"listLiteral";case"separated":return"separatedLiteral";case"field":default:return"stringLiteral"}}function Ae(e,t,r=[]){const n=L[t]||[];return gt.parse(mt.reset(e,{state:vt(n),line:0,col:0}),yt(n,r))}function Ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Le(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ie(Object(r),!0).forEach(function(n){wt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ie(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function wt(e,t,r){return t=kt(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kt(e){var t=xt(e,"string");return typeof t=="symbol"?t:String(t)}function xt(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ne(e,t){const r=[];for(const{type:n,label:a,properties:c}of e)if(n in t){const k=[];for(const W of t[n])Array.isArray(W)&&!W.some(Dt=>Dt in c)?k.push(W.join("/")):typeof W=="string"&&!(W in c)&&k.push(W);k.length&&r.push([a,`missing fields: ${k.join(", ")}`])}else r.push([a,`invalid type: "${n}"`]);if(r.length)throw new RangeError(["Invalid entries:"].concat(r.map(([n,a])=>` - ${n} has ${a}`)).join(`
`))}function De(e){const t={};"language"in e.properties&&(t.language=Ae(e.properties.language,"language"));for(const r in e.properties){const n=e.properties[r];n!==""&&(t[r]=Ae(n+"",r,t.language))}return Le(Le({},e),{},{properties:t})}function Be(e){return d.parse.strict&&Ne(e,X.biblatex),st(e.map(De))}function $e(e){return d.parse.strict&&Ne(e,X.bibtex),at(e.map(De))}const Tt="@bibtex",St={"@biblatex/text":{parse:p,parseType:{dataType:"String",predicate:/@\s{0,5}[A-Za-z]{1,13}\s{0,5}\{\s{0,5}[^@{}"=,\\\s]{0,100}\s{0,5},[\s\S]*\}/}},"@biblatex/entry+object":{parse(e){return Be([e])},parseType:{dataType:"SimpleObject",propertyConstraint:{props:["type","label","properties"]}}},"@biblatex/entries+list":{parse:Be,parseType:{elementConstraint:"@biblatex/entry+object"}},"@bibtex/text":{parse:p,outputs:"@bibtex/entries+list"},"@bibtex/entry+object":{parse(e){return $e([e])}},"@bibtex/entries+list":{parse:$e},"@bibtxt/text":{parse:y,parseType:{dataType:"String",predicate:/^\s*(\[(?!\s*[{[]).*?\]\s*(\n\s*[^[]((?!:)\S)+\s*:\s*.+?\s*)*\s*)+$/}}},ne={};for(const e in K)ne[K[e]]=e;for(const e in J)ne[J[e]]=e;for(const e in z)ne[z[e]]=e;const Et=/[^a-zA-Z0-9\s!"#%&'()*+,\-./:;=?@[\]{}\u0300-\u0308\u030a-\u030c\u0332\u0323\u0327\u0328\u0361\u0326]/g,Ot=/.[\u0300-\u0308\u030a-\u030c\u0332\u0323\u0327\u0328\u0361\u0326]+/g,he={separated:",",list:" and "},Me={i:"\\textit{",b:"\\textbf{",sc:"\\textsc{",sup:"\\textsuperscript{",sub:"\\textsubscript{",'span style="font-variant:small-caps;"':"\\textsc{",'span class="nocase"':"{"};function de(e){return e.normalize("NFKD").replace(Et,t=>t in ne?ne[t]in z?ne[t]:`\\${ne[t]}{}`:"").replace(Ot,t=>Array.from(t).reduce((r,n)=>`{\\${ne[n]} ${r}}`))}function qe(e){const t=[];let r=e.split(/<(\/?(?:i|b|sc|sup|sub|span)|span .*?)>/g);return r=r.map((n,a)=>a%2===0?de(n):n in Me?(t.push("/"+n.split(" ")[0]),Me[n]):n===t[t.length-1]?(t.pop(),"}"):""),r.join("")}function jt(e){if(e.family&&!e.prefix&&!e.given&!e.suffix)return e.family.includes(he.list)?e.family:`{${e.family}}`;const t=[""];return e.prefix&&e.family&&(t[0]+=e.prefix+" "),e.family&&(t[0]+=e.family),e.suffix?(t.push(e.suffix),t.push(e.given||"")):t.push(e.given),de(t.join(", ").trim())}function Pt(e){return qe(e).split(/(:\s*)/).map((t,r)=>r%2?t:t.replace(/(?!^)\b[a-z]*[A-Z].*?\b/g,"{$&}")).join("")}function me(e,t){switch(t){case"title":return Pt(e);case"literal":return qe(e.toString());case"name":return jt(e);case"verbatim":case"uri":return e.toString();default:return de(e.toString())}}function _t(e,t,r){const n=he[r];return e.map(a=>{const c=me(a,t);return c.includes(n)?`{${c}}`:c}).join(n)}function Ct(e,t){if(!(e in L))return me(t,"verbatim");const[r,n]=L[e];return r in he?_t(t,n,r):me(t,n)}function ze({type:e,label:t,properties:r}){const n={};for(const a in r){const c=r[a];n[a]=Ct(a,c)}return{type:e,label:t,properties:n}}function Rt(e){return lt(e).map(ze)}function Fe(e){return ot(e).map(ze)}function At({type:e,label:t,properties:r},n){const a=Object.entries(r).map(([c,k])=>n.listItem.join(`${c} = {${k}},`));return n.entry.join(`@${e}{${t},${n.list.join(a.join(""))}}`)}function Ke(e,t){const r=e.map(n=>At(n,t)).join("");return t.bibliographyContainer.join(r)}function It({type:e,label:t,properties:r},n){const a=Object.entries(r).concat([["type",e]]).map(([c,k])=>n.listItem.join(`${c}: ${k}`));return n.entry.join(`[${t}]${n.list.join(a.join(""))}`)}function Lt(e,t){const r=e.map(n=>It(n,t)).join(`
`);return t.bibliographyContainer.join(r)}const ge=function(e,t){return function(r,n={}){const{type:a,format:c=a||"text"}=n;if(r=e(r),c==="object")return r;if(C.plugins.dict.has(c))return t(r,C.plugins.dict.get(c),n);throw new RangeError(`Output dictionary "${c}" not available`)}};var Nt={bibtex:ge(Fe,Ke),biblatex:ge(Rt,Ke),bibtxt:ge(Fe,Lt)};C.plugins.add(Tt,{input:St,output:Nt,config:d})},"./node_modules/moo/moo.js":function(ue,I){var T,M,C;(function(A,S){M=[],T=S,C=typeof T=="function"?T.apply(I,M):T,C!==void 0&&(ue.exports=C)})(this,function(){"use strict";var A=Object.prototype.hasOwnProperty,S=Object.prototype.toString,q=typeof new RegExp().sticky=="boolean";function _(i){return i&&S.call(i)==="[object RegExp]"}function H(i){return i&&typeof i=="object"&&!_(i)&&!Array.isArray(i)}function X(i){return i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function L(i){var o=new RegExp("|"+i);return o.exec("").length-1}function J(i){return"("+i+")"}function K(i){if(!i.length)return"(?!)";var o=i.map(function(u){return"(?:"+u+")"}).join("|");return"(?:"+o+")"}function oe(i){if(typeof i=="string")return"(?:"+X(i)+")";if(_(i)){if(i.ignoreCase)throw new Error("RegExp /i flag not allowed");if(i.global)throw new Error("RegExp /g flag is implied");if(i.sticky)throw new Error("RegExp /y flag is implied");if(i.multiline)throw new Error("RegExp /m flag is implied");return i.source}else throw new Error("Not a pattern: "+i)}function Y(i,o){return i.length>o?i:Array(o-i.length+1).join(" ")+i}function ie(i,o){for(var u=i.length,p=0;;){var b=i.lastIndexOf(`
`,u-1);if(b===-1||(p++,u=b,p===o)||u===0)break}var h=p<o?0:u+1;return i.substring(h).split(`
`)}function Q(i){for(var o=Object.getOwnPropertyNames(i),u=[],p=0;p<o.length;p++){var b=o[p],h=i[b],y=[].concat(h);if(b==="include"){for(var x=0;x<y.length;x++)u.push({include:y[x]});continue}var w=[];y.forEach(function(d){H(d)?(w.length&&u.push(U(b,w)),u.push(U(b,d)),w=[]):w.push(d)}),w.length&&u.push(U(b,w))}return u}function ae(i){for(var o=[],u=0;u<i.length;u++){var p=i[u];if(p.include){for(var b=[].concat(p.include),h=0;h<b.length;h++)o.push({include:b[h]});continue}if(!p.type)throw new Error("Rule has no type: "+JSON.stringify(p));o.push(U(p.type,p))}return o}function U(i,o){if(H(o)||(o={match:o}),o.include)throw new Error("Matching rules cannot also include states");var u={defaultType:i,lineBreaks:!!o.error||!!o.fallback,pop:!1,next:null,push:null,error:!1,fallback:!1,value:null,type:null,shouldThrow:!1};for(var p in o)A.call(o,p)&&(u[p]=o[p]);if(typeof u.type=="string"&&i!==u.type)throw new Error("Type transform cannot be a string (type '"+u.type+"' for token '"+i+"')");var b=u.match;return u.match=Array.isArray(b)?b:b?[b]:[],u.match.sort(function(h,y){return _(h)&&_(y)?0:_(y)?-1:_(h)?1:y.length-h.length}),u}function z(i){return Array.isArray(i)?ae(i):Q(i)}var ee=U("error",{lineBreaks:!0,shouldThrow:!0});function te(i,o){for(var u=null,p=Object.create(null),b=!0,h=null,y=[],x=[],w=0;w<i.length;w++)i[w].fallback&&(b=!1);for(var w=0;w<i.length;w++){var d=i[w];if(d.include)throw new Error("Inheritance is not allowed in stateless lexers");if(d.error||d.fallback){if(u)throw!d.fallback==!u.fallback?new Error("Multiple "+(d.fallback?"fallback":"error")+" rules not allowed (for token '"+d.defaultType+"')"):new Error("fallback and error are mutually exclusive (for token '"+d.defaultType+"')");u=d}var R=d.match.slice();if(b)for(;R.length&&typeof R[0]=="string"&&R[0].length===1;){var F=R.shift();p[F.charCodeAt(0)]=d}if(d.pop||d.push||d.next){if(!o)throw new Error("State-switching options are not allowed in stateless lexers (for token '"+d.defaultType+"')");if(d.fallback)throw new Error("State-switching options are not allowed on fallback tokens (for token '"+d.defaultType+"')")}if(R.length!==0){b=!1,y.push(d);for(var V=0;V<R.length;V++){var G=R[V];if(_(G)){if(h===null)h=G.unicode;else if(h!==G.unicode&&d.fallback===!1)throw new Error("If one rule is /u then all must be")}}var Z=K(R.map(oe)),N=new RegExp(Z);if(N.test(""))throw new Error("RegExp matches empty string: "+N);var E=L(Z);if(E>0)throw new Error("RegExp has capture groups: "+N+`
Use (?: \u2026 ) instead`);if(!d.lineBreaks&&N.test(`
`))throw new Error("Rule should declare lineBreaks: "+N);x.push(J(Z))}}var D=u&&u.fallback,B=q&&!D?"ym":"gm",se=q||D?"":"|";h===!0&&(B+="u");var fe=new RegExp(K(x)+se,B);return{regexp:fe,groups:y,fast:p,error:u||ee}}function s(i){var o=te(z(i));return new m({start:o},"start")}function f(i,o,u){var p=i&&(i.push||i.next);if(p&&!u[p])throw new Error("Missing state '"+p+"' (in token '"+i.defaultType+"' of state '"+o+"')");if(i&&i.pop&&+i.pop!=1)throw new Error("pop must be 1 (in token '"+i.defaultType+"' of state '"+o+"')")}function l(i,o){var u=i.$all?z(i.$all):[];delete i.$all;var p=Object.getOwnPropertyNames(i);o||(o=p[0]);for(var b=Object.create(null),h=0;h<p.length;h++){var y=p[h];b[y]=z(i[y]).concat(u)}for(var h=0;h<p.length;h++)for(var y=p[h],x=b[y],w=Object.create(null),d=0;d<x.length;d++){var R=x[d];if(R.include){var F=[d,1];if(R.include!==y&&!w[R.include]){w[R.include]=!0;var V=b[R.include];if(!V)throw new Error("Cannot include nonexistent state '"+R.include+"' (in state '"+y+"')");for(var G=0;G<V.length;G++){var Z=V[G];x.indexOf(Z)===-1&&F.push(Z)}}x.splice.apply(x,F),d--}}for(var N=Object.create(null),h=0;h<p.length;h++){var y=p[h];N[y]=te(b[y],!0)}for(var h=0;h<p.length;h++){for(var E=p[h],D=N[E],B=D.groups,d=0;d<B.length;d++)f(B[d],E,N);for(var se=Object.getOwnPropertyNames(D.fast),d=0;d<se.length;d++)f(D.fast[se[d]],E,N)}return new m(N,o)}function v(i){for(var o=typeof Map!="undefined",u=o?new Map:Object.create(null),p=Object.getOwnPropertyNames(i),b=0;b<p.length;b++){var h=p[b],y=i[h],x=Array.isArray(y)?y:[y];x.forEach(function(w){if(typeof w!="string")throw new Error("keyword must be string (in keyword '"+h+"')");o?u.set(w,h):u[w]=h})}return function(w){return o?u.get(w):u[w]}}var m=function(i,o){this.startState=o,this.states=i,this.buffer="",this.stack=[],this.reset()};m.prototype.reset=function(i,o){return this.buffer=i||"",this.index=0,this.line=o?o.line:1,this.col=o?o.col:1,this.queuedToken=o?o.queuedToken:null,this.queuedText=o?o.queuedText:"",this.queuedThrow=o?o.queuedThrow:null,this.setState(o?o.state:this.startState),this.stack=o&&o.stack?o.stack.slice():[],this},m.prototype.save=function(){return{line:this.line,col:this.col,state:this.state,stack:this.stack.slice(),queuedToken:this.queuedToken,queuedText:this.queuedText,queuedThrow:this.queuedThrow}},m.prototype.setState=function(i){if(!(!i||this.state===i)){this.state=i;var o=this.states[i];this.groups=o.groups,this.error=o.error,this.re=o.regexp,this.fast=o.fast}},m.prototype.popState=function(){this.setState(this.stack.pop())},m.prototype.pushState=function(i){this.stack.push(this.state),this.setState(i)};var O=q?function(i,o){return i.exec(o)}:function(i,o){var u=i.exec(o);return u[0].length===0?null:u};m.prototype._getGroup=function(i){for(var o=this.groups.length,u=0;u<o;u++)if(i[u+1]!==void 0)return this.groups[u];throw new Error("Cannot find token type for matched text")};function j(){return this.value}if(m.prototype.next=function(){var i=this.index;if(this.queuedGroup){var o=this._token(this.queuedGroup,this.queuedText,i);return this.queuedGroup=null,this.queuedText="",o}var u=this.buffer;if(i!==u.length){var y=this.fast[u.charCodeAt(i)];if(y)return this._token(y,u.charAt(i),i);var p=this.re;p.lastIndex=i;var b=O(p,u),h=this.error;if(b==null)return this._token(h,u.slice(i,u.length),i);var y=this._getGroup(b),x=b[0];return h.fallback&&b.index!==i?(this.queuedGroup=y,this.queuedText=x,this._token(h,u.slice(i,b.index),i)):this._token(y,x,i)}},m.prototype._token=function(i,o,u){var p=0;if(i.lineBreaks){var b=/\n/g,h=1;if(o===`
`)p=1;else for(;b.exec(o);)p++,h=b.lastIndex}var y={type:typeof i.type=="function"&&i.type(o)||i.defaultType,value:typeof i.value=="function"?i.value(o):o,text:o,toString:j,offset:u,lineBreaks:p,line:this.line,col:this.col},x=o.length;if(this.index+=x,this.line+=p,p!==0?this.col=x-h+1:this.col+=x,i.shouldThrow){var w=new Error(this.formatError(y,"invalid syntax"));throw w}return i.pop?this.popState():i.push?this.pushState(i.push):i.next&&this.setState(i.next),y},typeof Symbol!="undefined"&&Symbol.iterator){var P=function(i){this.lexer=i};P.prototype.next=function(){var i=this.lexer.next();return{value:i,done:!i}},P.prototype[Symbol.iterator]=function(){return this},m.prototype[Symbol.iterator]=function(){return new P(this)}}return m.prototype.formatError=function(i,o){if(i==null)var u=this.buffer.slice(this.index),i={text:u,offset:this.index,lineBreaks:u.indexOf(`
`)===-1?0:1,line:this.line,col:this.col};var p=2,b=Math.max(i.line-p,1),h=i.line+p,y=String(h).length,x=ie(this.buffer,this.line-i.line+p+1).slice(0,5),w=[];w.push(o+" at line "+i.line+" col "+i.col+":"),w.push("");for(var d=0;d<x.length;d++){var R=x[d],F=b+d;w.push(Y(String(F),y)+" "+R),F===i.line&&w.push(Y("",y+i.col+1)+"^")}return w.join(`
`)},m.prototype.clone=function(){return new m(this.states,this.state)},m.prototype.has=function(i){return!0},{compile:s,states:l,error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:v}})}}]);