UNPKG

@galaxyproject/galaxy-client

Version:

Galaxy client application build system

1 lines 657 kB
"use strict";(self.webpackChunk_galaxyproject_galaxy_client=self.webpackChunk_galaxyproject_galaxy_client||[]).push([[435],{38511:(e,t,i)=>{i.d(t,{I8:()=>zt,vF:()=>q,Nx:()=>v,ZS:()=>m});var r={};i.r(r),i.d(r,{currentVersion:()=>O,retrieveLastVersion:()=>S,retrieveVersion:()=>A,save:()=>T,undo:()=>w});var s={};i.r(s),i.d(s,{defaultOptions:()=>j,options:()=>L});var a={};i.r(a),i.d(a,{dataTypeOf:()=>F,typeOf:()=>P});var n={};i.r(n),i.d(n,{applyGraph:()=>B,removeGraph:()=>z});var o={};i.r(o),i.d(o,{DataParser:()=>re,FormatParser:()=>se,TypeParser:()=>ie});var l={};i.r(l),i.d(l,{clean:()=>ve});var m={};i.r(m),i.d(m,{Grammar:()=>Ve,Register:()=>Xe,TokenStack:()=>$e,Translator:()=>We,deepCopy:()=>we,downgradeCsl:()=>Oe,fetchFile:()=>ze,fetchFileAsync:()=>Ue,fetchId:()=>qe,setUserAgent:()=>Me,upgradeCsl:()=>Ee});var u={};i.r(u),i.d(u,{add:()=>ct,addDataParser:()=>ot,addTypeParser:()=>W,chain:()=>Qe,chainAsync:()=>Ye,chainLink:()=>Ze,chainLinkAsync:()=>et,data:()=>at,dataAsync:()=>nt,get:()=>ht,has:()=>dt,hasDataParser:()=>lt,hasTypeParser:()=>K,list:()=>gt,listDataParser:()=>ut,listTypeParser:()=>Z,remove:()=>ft,removeDataParser:()=>mt,removeTypeParser:()=>Q,treeTypeParser:()=>Y,type:()=>J,typeMatcher:()=>ee,util:()=>bt});var p={};i.r(p),i.d(p,{add:()=>vt,addAsync:()=>yt,reset:()=>Et,set:()=>_t,setAsync:()=>xt});var c={};i.r(c),i.d(c,{sort:()=>Tt});var h={};i.r(h),i.d(h,{add:()=>It,format:()=>Rt,has:()=>Ct,list:()=>Dt,register:()=>kt,remove:()=>Nt});var f={};i.r(f),i.d(f,{format:()=>Lt,get:()=>Pt,getIds:()=>jt});var d={};i.r(d),i.d(d,{async:()=>Ft,validateOptions:()=>R,validateOutputOptions:()=>D});var g={};i.r(g),i.d(g,{add:()=>Mt,get:()=>Xt,has:()=>Gt,htmlDict:()=>Vt,list:()=>$t,register:()=>Ut,remove:()=>qt,textDict:()=>Ht});var b={};i.r(b),i.d(b,{add:()=>Wt,get:()=>Kt,has:()=>Qt,list:()=>Yt,remove:()=>Zt});var v={};i.r(v),i.d(v,{add:()=>ii,config:()=>b,dict:()=>g,has:()=>si,input:()=>u,list:()=>ai,output:()=>h,remove:()=>ri});var y={};i.r(y),i.d(y,{parse:()=>ni});var _={};i.r(_),i.d(_,{default:()=>li,parse:()=>li});var x={};i.r(x),i.d(x,{parse:()=>mi});var E={};function O(){return this.log.length}function A(e=1){if(e<=0||e>this.currentVersion())return null;{const[t,i]=this.log[e-1],r=new this.constructor(JSON.parse(t),JSON.parse(i));return r.log=this.log.slice(0,e),r}}function w(e=1){return this.retrieveVersion(this.currentVersion()-e)}function S(){return this.retrieveVersion(this.currentVersion())}function T(){return this.log.push([JSON.stringify(this.data),JSON.stringify(this._options)]),this}i.r(E),i.d(E,{parse:()=>ui});const k=["real","string"],I=["json","html","string","rtf"],N=["csl","bibtex","bibtxt","citation-*","ris","ndjson"],C=["string","function"];function D(e){if("object"!=typeof e)throw new TypeError("Options not an object!");const{format:t,type:i,style:r,lang:s,append:a,prepend:n}=e;if(t&&!k.includes(t))throw new TypeError(`Option format ("${t}") should be one of: ${k}`);if(i&&!I.includes(i))throw new TypeError(`Option type ("${i}") should be one of: ${I}`);if(r&&!N.includes(r)&&!/^citation/.test(r))throw new TypeError(`Option style ("${r}") should be one of: ${N}`);if(s&&"string"!=typeof s)throw new TypeError("Option lang should be a string, but is a "+typeof s);if(n&&!C.includes(typeof n))throw new TypeError("Option prepend should be a string or a function, but is a "+typeof n);if(a&&!C.includes(typeof a))throw new TypeError("Option append should be a string or a function, but is a "+typeof a);if(/^citation/.test(r)&&"json"===i)throw new Error(`Combination type/style of json/citation-* is not valid: ${i}/${r}`);return!0}function R(e){if("object"!=typeof e)throw new TypeError("Options should be an object");if(e.output)D(e.output);else{if(e.maxChainLength&&"number"!=typeof e.maxChainLength)throw new TypeError("Option maxChainLength should be a number");if(e.forceType&&"string"!=typeof e.forceType)throw new TypeError("Option forceType should be a string");if(null!=e.generateGraph&&"boolean"!=typeof e.generateGraph)throw new TypeError("Option generateGraph should be a boolean");if(null!=e.strict&&"boolean"!=typeof e.strict)throw new TypeError("Option strict should be a boolean");if(null!=e.target&&"string"!=typeof e.target)throw new TypeError("Option target should be a boolean")}return!0}const j={format:"real",type:"json",style:"csl",lang:"en-US"};function L(e,t){return D(e),t&&this.save(),Object.assign(this._options,e),this}function P(e){switch(e){case void 0:return"Undefined";case null:return"Null";default:return e.constructor.name}}function F(e){switch(typeof e){case"string":return"String";case"object":if(Array.isArray(e))return"Array";if("Object"===P(e))return"SimpleObject";if("Null"!==P(e))return"ComplexObject";default:return"Primitive"}}function B(e,t){if(e._graph){const i=t.findIndex((({type:e})=>"@else/list+object"===e));-1!==i&&t.splice(i+1,0,...e._graph.slice(0,-1))}return e._graph=t,e}function z(e){return delete e._graph,e}var U=i(65606);const M={_output(e,t,i){this._log.push(t,i),this._levels.indexOf(e)<this._levels.indexOf(this.level)||this._console.log(t,...i)},_console:null,_log:[],_levels:["http","debug","unmapped","info","warn","error","silent"],level:"silent"};for(const e of M._levels)M[e]=(t,...i)=>M._output(e,t,i);"function"==typeof console.Console?M._console=new console.Console(U.stderr):M._console=console;const q=M,G={},$={},X={};function V(e,t){switch(t){case"Array":return 0===e.length||e.every((e=>"@csl/object"===J(e)))?"@csl/list+object":"@else/list+object";case"SimpleObject":case"ComplexObject":return"@csl/object";default:return"@invalid"}}function H(e=[],t){for(const i of e)if(G[i].predicate(t))return H(G[i].extensions,t)||i}function J(e){const t=F(e);if("Array"===t&&0===e.length)return V(e,t);return H($[t],e)||V(e,t)}function W(e,{dataType:t,predicate:i,extends:r}){let s=[];e in X&&(s=X[e],delete X[e],q.debug("[core]",`Subclasses "${s}" finally registered to parent type "${e}"`));const a={predicate:i,extensions:s};if(G[e]=a,r){const t=G[r];t?t.extensions.push(e):(X[r]||(X[r]=[]),X[r].push(e),q.debug("[core]",`Subclass "${e}" is waiting on parent type "${r}"`))}else{($[t]||($[t]=[])).push(e)}}function K(e){return Object.prototype.hasOwnProperty.call(G,e)}function Q(e){delete G[e];const t=[...Object.keys($).map((e=>$[e])),...Object.keys(G).map((e=>G[e].extensions)).filter((e=>e.length>0))];t.forEach((t=>{const i=t.indexOf(e);i>-1&&t.splice(i,1)}))}function Z(){return Object.keys(G)}function Y(){const e=t=>({name:t,children:G[t].extensions.map(e)});return{name:"Type tree",children:Object.keys($).map((t=>({name:t,children:$[t].map(e)})))}}const ee=/^(?:@(.+?))(?:\/(?:(.+?)\+)?(?:(.+)))?$/;function te(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}class ie{constructor(e){te(this,"validDataTypes",["String","Array","SimpleObject","ComplexObject","Primitive"]),this.data=e}validateDataType(){const e=this.data.dataType;if(e&&!this.validDataTypes.includes(e))throw new RangeError(`dataType was ${e}; expected one of ${this.validDataTypes}`)}validateParseType(){const e=this.data.predicate;if(e&&!(e instanceof RegExp||"function"==typeof e))throw new TypeError(`predicate was ${typeof e}; expected RegExp or function`)}validateTokenList(){const e=this.data.tokenList;if(e&&"object"!=typeof e)throw new TypeError(`tokenList was ${typeof e}; expected object or RegExp`)}validatePropertyConstraint(){const e=this.data.propertyConstraint;if(e&&"object"!=typeof e)throw new TypeError(`propertyConstraint was ${typeof e}; expected array or object`)}validateElementConstraint(){const e=this.data.elementConstraint;if(e&&"string"!=typeof e)throw new TypeError(`elementConstraint was ${typeof e}; expected string`)}validateExtends(){const e=this.data.extends;if(e&&"string"!=typeof e)throw new TypeError(`extends was ${typeof e}; expected string`)}validate(){if(null===this.data||"object"!=typeof this.data)throw new TypeError(`typeParser was ${typeof this.data}; expected object`);this.validateDataType(),this.validateParseType(),this.validateTokenList(),this.validatePropertyConstraint(),this.validateElementConstraint(),this.validateExtends()}parseTokenList(){let e=this.data.tokenList;if(!e)return[];e instanceof RegExp&&(e={token:e});const{token:t,split:i=/\s+/,trim:r=!0,every:s=!0}=e,a=s?"every":"some";return[e=>(e=>r?e.trim():e)(e).split(i)[a]((e=>t.test(e)))]}parsePropertyConstraint(){return[].concat(this.data.propertyConstraint||[]).map((({props:e,match:t,value:i})=>{switch(e=[].concat(e),t){case"any":case"some":return t=>e.some((e=>e in t&&(!i||i(t[e]))));case"none":return t=>!e.some((e=>e in t&&(!i||i(t[e]))));default:return t=>e.every((e=>e in t&&(!i||i(t[e]))))}}))}parseElementConstraint(){const e=this.data.elementConstraint;return e?[t=>t.every((t=>J(t)===e))]:[]}parsePredicate(){return this.data.predicate instanceof RegExp?[this.data.predicate.test.bind(this.data.predicate)]:this.data.predicate?[this.data.predicate]:[]}getCombinedPredicate(){const e=[...this.parsePredicate(),...this.parseTokenList(),...this.parsePropertyConstraint(),...this.parseElementConstraint()];return 0===e.length?()=>!0:1===e.length?e[0]:t=>e.every((e=>e(t)))}getDataType(){return this.data.dataType?this.data.dataType:this.data.predicate instanceof RegExp||this.data.tokenList?"String":this.data.elementConstraint?"Array":"Primitive"}get dataType(){return this.getDataType()}get predicate(){return this.getCombinedPredicate()}get extends(){return this.data.extends}}class re{constructor(e,{async:t}={}){this.parser=e,this.async=t}validate(){const e=this.parser;if("function"!=typeof e)throw new TypeError(`parser was ${typeof e}; expected function`)}}class se{constructor(e,t={}){this.format=e,t.parseType&&(this.typeParser=new ie(t.parseType)),t.parse&&(this.dataParser=new re(t.parse,{async:!1})),t.parseAsync&&(this.asyncDataParser=new re(t.parseAsync,{async:!0}))}validateFormat(){const e=this.format;if(!ee.test(e))throw new TypeError(`format name was "${e}"; didn't match expected pattern`)}validate(){this.validateFormat(),this.typeParser&&this.typeParser.validate(),this.dataParser&&this.dataParser.validate(),this.asyncDataParser&&this.asyncDataParser.validate()}}var ae=i(5656);function ne(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}function oe(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ne(Object(i),!0).forEach((function(t){le(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ne(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function le(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}const me=1,ue=2,pe=3,ce=4,he={article:!0,"article-journal":!0,"article-magazine":!0,"article-newspaper":!0,bill:!0,book:!0,broadcast:!0,chapter:!0,classic:!0,collection:!0,dataset:!0,document:!0,entry:!0,"entry-dictionary":!0,"entry-encyclopedia":!0,event:!0,figure:!0,graphic:!0,hearing:!0,interview:!0,legal_case:!0,legislation:!0,manuscript:!0,map:!0,motion_picture:!0,musical_score:!0,pamphlet:!0,"paper-conference":!0,patent:!0,performance:!0,periodical:!0,personal_communication:!0,post:!0,"post-weblog":!0,regulation:!0,report:!0,review:!0,"review-book":!0,software:!0,song:!0,speech:!0,standard:!0,thesis:!0,treaty:!0,webpage:!0,"journal-article":"article-journal","book-chapter":"chapter","posted-content":"manuscript","proceedings-article":"paper-conference"},fe={author:ue,chair:ue,"collection-editor":ue,compiler:ue,composer:ue,"container-author":ue,contributor:ue,curator:ue,director:ue,editor:ue,"editorial-director":ue,"executive-producer":ue,guest:ue,host:ue,interviewer:ue,illustrator:ue,narrator:ue,organizer:ue,"original-author":ue,performer:ue,producer:ue,"reviewed-author":ue,recipient:ue,"script-writer":ue,"series-creator":ue,translator:ue,accessed:pe,"available-date":pe,container:pe,"event-date":pe,issued:pe,"original-date":pe,submitted:pe,type:ce,categories:"object",custom:"object",id:["string","number"],language:"string",journalAbbreviation:"string",shortTitle:"string",abstract:"string",annote:"string",archive:"string",archive_collection:"string",archive_location:"string","archive-place":"string",authority:"string","call-number":"string","chapter-number":"string","citation-number":"string","citation-key":"string","citation-label":"string","collection-number":"string","collection-title":"string","container-title":"string","container-title-short":"string",dimensions:"string",division:"string",DOI:"string",edition:["string","number"],event:"string","event-title":"string","event-place":"string","first-reference-note-number":"string",genre:"string",ISBN:"string",ISSN:"string",issue:["string","number"],jurisdiction:"string",keyword:"string",locator:"string",medium:"string",note:"string",number:["string","number"],"number-of-pages":"string","number-of-volumes":["string","number"],"original-publisher":"string","original-publisher-place":"string","original-title":"string",page:"string","page-first":"string","part-number":["string","number"],"part-title":"string",PMCID:"string",PMID:"string",printing:"string",publisher:"string","publisher-place":"string",references:"string","reviewed-title":"string","reviewed-genre":"string",scale:"string",section:"string",source:"string",status:"string",supplement:["string","number"],title:"string","title-short":"string",URL:"string",version:"string",volume:["string","number"],"volume-title":"string","volume-title-short":"string","year-suffix":"string"};function de(e,t){return"object"==typeof e&&null!==e&&(e.literal||e.given||e.family)?e:t&&"string"==typeof e?(0,ae.qg)(e):void 0}function ge(e,t){return e.every((e=>"number"==typeof e))?e:!t||e.some((e=>isNaN(parseInt(e))))?void 0:e.map((e=>parseInt(e)))}function be(e,t,i){const r=[].concat(fe[e]);switch(fe[e]){case me:return de(t,i);case ue:return function(e,t){if(e instanceof Array){const i=e.map((e=>de(e,t))).filter(Boolean);return i.length?i:void 0}}(t,i);case pe:return function(e,t){const i="date-parts";if("object"==typeof e&&null!==e){if(e[i]instanceof Array&&e[i].every((e=>e instanceof Array))){const r=e[i].map((e=>ge(e,t))).filter(Boolean);return r.length?oe(oe({},e),{},{"date-parts":r}):void 0}if(e instanceof Array&&e.every((e=>e[i]instanceof Array))){const r=e.map((e=>ge(e[i],t))).filter(Boolean);return r.length?{"date-parts":r}:void 0}if(e[i]instanceof Array){const r=ge(e[i],t);return r&&{"date-parts":[r]}}return"literal"in e||"raw"in e?e:void 0}}(t,i);case ce:return function(e,t){return e=be("language",e,t),!0===he[e]?e:t&&e in he?he[e]:void 0}(t,i)}if(i){if("string"==typeof t&&r.includes("number")&&!r.includes("string")&&!isNaN(+t))return parseFloat(t);if("number"==typeof t&&r.includes("string")&&!r.includes("number"))return t.toString();if(Array.isArray(t)&&t.length)return be(e,t[0],i)}if(r.includes(typeof t))return t}function ve(e,t=!0){return e.map((function(e){const i={};for(const r in e){const s=be(r,e[r],t);void 0!==s&&(i[r]=s)}return i}))}function ye(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}function _e(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ye(Object(i),!0).forEach((function(t){xe(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ye(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function xe(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Ee(e){return Array.isArray(e)?e.map(Ee):("event"in(e=_e({},e))&&(e["event-title"]=e.event,delete e.event),"book"===e.type&&"version"in e&&(e.type="software"),e)}function Oe(e){return Array.isArray(e)?e.map(Oe):("event-title"in(e=_e({},e))&&(e.event=e["event-title"],delete e["event-title"]),"software"===e.type&&(e.type="book"),e)}function Ae(e,t=new Set){if("object"!=typeof e||null===e||e.constructor!==Object&&e.constructor!==Array)return e;if(t.has(e))throw new TypeError("Recursively copying circular structure");let i;if(t.add(e),e.constructor===Array)i=e.map((e=>Ae(e,t)));else{const r={};for(const i in e)r[i]=Ae(e[i],t);i=r}return t.delete(e),i}const we=Ae;var Se=i(81411),Te=i.n(Se),ke=i(42681),Ie=i.n(ke);const Ne="0.7.1";var Ce=i(65606);const{fetch:De,Headers:Re}=Ie()(),je="undefined"!=typeof location&&"undefined"!=typeof document;let Le=je?"":`Citation.js/${Ne} Node.js/${Ce.version}`;function Pe(e){const t={},i=e instanceof Re||e instanceof Te().Headers?Array.from(e):Object.entries(e);for(const[e,r]of i)t[e.toLowerCase()]=r.toString();return t}function Fe(e={}){const t={headers:{accept:"*/*"},method:"GET",checkContentType:e.checkContentType};if(Le&&!je&&(t.headers["user-agent"]=Le),e.body){t.method="POST";const i="string"!=typeof e.body;t.body=i?JSON.stringify(e.body):e.body,t.headers["content-type"]=i?"application/json":"text/plain"}return e.headers&&Object.assign(t.headers,Pe(e.headers)),t}function Be(e,t){const{status:i,headers:r}=e;let s;if(i>=400?s=new Error(`Server responded with status code ${i}`):!0!==t.checkContentType||function(e,t){if(!e.accept||"*/*"===e.accept||!t["content-type"])return!0;const[i,r]=t["content-type"].split(";")[0].trim().split("/");return e.accept.split(",").map((e=>e.split(";")[0].trim().split("/"))).some((([e,t])=>!(e!==i&&"*"!==e||t!==r&&"*"!==t)))}(t.headers,Pe(r))||(s=new Error(`Server responded with content-type ${r.get("content-type")}`)),s)throw s.status=i,s.headers=r,s.body=e.body,s;return e}function ze(e,t){const i=Fe(t);q.http("[core]",i.method,e,i);return Be(Te()(e,i),i).text()}async function Ue(e,t){const i=Fe(t);return q.http("[core]",i.method,e,i),De(e,i).then((e=>Be(e,i))).then((e=>e.text()))}function Me(e){Le=e}const qe=function(e,t){let i;for(;void 0===i||e.includes(i);)i=`${t}${Math.random().toString().slice(2)}`;return i};class Ge{constructor(e){this.stack=e,this.index=0,this.current=this.stack[this.index]}static getPatternText(e){return`"${e instanceof RegExp?e.source:e}"`}static getMatchCallback(e){if(Array.isArray(e)){const t=e.map(Ge.getMatchCallback);return e=>t.some((t=>t(e)))}return e instanceof Function?e:e instanceof RegExp?t=>e.test(t):t=>e===t}tokensLeft(){return this.stack.length-this.index}matches(e){return Ge.getMatchCallback(e)(this.current,this.index,this.stack)}matchesSequence(e){const t=this.stack.slice(this.index,this.index+e.length).join("");return"string"==typeof e?t===e:e.every(((e,i)=>Ge.getMatchCallback(e)(t[i])))}consumeToken(e=/^[\s\S]$/,{inverse:t=!1,spaced:i=!0}={}){i&&this.consumeWhitespace();const r=this.current;if(!Ge.getMatchCallback(e)(r,this.index,this.stack))throw new SyntaxError(`Unexpected token at index ${this.index}: Expected ${Ge.getPatternText(e)}, got "${r}"`);return this.current=this.stack[++this.index],i&&this.consumeWhitespace(),r}consumeWhitespace(e=/^\s$/,{optional:t=!0}={}){return this.consume(e,{min:+!t})}consumeN(e){if(this.tokensLeft()<e)throw new SyntaxError("Not enough tokens left");const t=this.index;for(;e--;)this.current=this.stack[++this.index];return this.stack.slice(t,this.index).join("")}consumeSequence(e){if(this.matchesSequence(e))return this.consumeN(e.length);throw new SyntaxError(`Expected "${e}", got "${this.consumeN(e.length)}"`)}consume(e=/^[\s\S]$/,{min:t=0,max:i=1/0,inverse:r=!1,tokenMap:s,tokenFilter:a}={}){const n=this.index,o=Ge.getMatchCallback(e);for(;o(this.current,this.index,this.stack)!==r;)this.current=this.stack[++this.index];let l=this.stack.slice(n,this.index);if(l.length<t)throw new SyntaxError(`Not enough ${Ge.getPatternText(e)}`);if(l.length>i)throw new SyntaxError(`Too many ${Ge.getPatternText(e)}`);return s&&(l=l.map(s)),a&&(l=l.filter(a)),l.join("")}}const $e=Ge;const Xe=class{constructor(e={}){this.data=e}set(e,t){return this.data[e]=t,this}add(...e){return this.set(...e)}delete(e){return delete this.data[e],this}remove(...e){return this.delete(...e)}get(e){return this.data[e]}has(e){return Object.prototype.hasOwnProperty.call(this.data,e)}list(){return Object.keys(this.data)}};class Ve{constructor(e,t){this.rules=e,this.defaultState=t,this.mainRule=Object.keys(e)[0],this.log=[]}parse(e,t){return this.lexer=e,this.token=this.lexer.next(),this.state=Ae(this.defaultState),this.log=[],this.consumeRule(t||this.mainRule)}matchEndOfFile(){return!this.token}matchToken(e){return this.token&&e===this.token.type}consumeToken(e,t){const i=this.token;if(!e||i&&i.type===e)return this.token=this.lexer.next(),i;if(!t){const t=i?`"${i.type}"`:"EOF",r=new SyntaxError(this.lexer.formatError(i,`expected "${e}", got ${t}`));throw r.message+=` (${this.log.join("->")})`,r}}consumeRule(e){this.log.push(e);const t=this.rules[e].call(this);return this.log.pop(),t}}function He(e,t){let i,r,s,a;if("string"==typeof e)i=r=e;else{if(!e)return null;i=t?e.target:e.source,r=t?e.source:e.target,e.convert&&(s=t?e.convert.toSource:e.convert.toTarget),e.when&&(a=t?e.when.target:e.when.source,null!=a&&(a=function(e){return function(t){return"boolean"==typeof e?e:Object.keys(e).every((i=>{const r=e[i];return!0===r?i in t:!1===r?!(i in t):"function"==typeof r?r(t[i]):Array.isArray(r)?r.includes(t[i]):t[i]===r}))}}(a)))}return i=[].concat(i).filter(Boolean),r=[].concat(r).filter(Boolean),{inputProp:i,outputProp:r,convert:s,condition:a}}function Je(e,t){return t=t===We.CONVERT_TO_SOURCE,e=e.map((e=>He(e,t))).filter(Boolean),function(t){const i={};for(const{inputProp:r,outputProp:s,convert:a,condition:n}of e){if(0===s.length)continue;if(n&&!n(t))continue;if(0!==r.length&&r.every((e=>!(e in t))))continue;let e=r.map((e=>t[e]));if(a)try{const i=a.apply(t,e);e=1===s.length?[i]:i}catch(e){throw new Error(`Failed to convert ${r} to ${s}`,{cause:e})}s.forEach(((t,r)=>{const s=e[r];void 0!==s&&(i[t]=s)}))}return i}}class We{constructor(e){this.convertToSource=Je(e,We.CONVERT_TO_SOURCE),this.convertToTarget=Je(e,We.CONVERT_TO_TARGET)}}We.CONVERT_TO_SOURCE=Symbol("convert to source"),We.CONVERT_TO_TARGET=Symbol("convert to target");class Ke{constructor(e,t={}){this.options=Object.assign({generateGraph:!0,forceType:J(e),maxChainLength:10,strict:!0,target:"@csl/list+object"},t),this.type=this.options.forceType,this.data="object"==typeof e?we(e):e,this.graph=[{type:this.type,data:e}],this.iteration=0}iterate(){if(0!==this.iteration){const e=ht(this.type);e&&e.outputs?this.type=e.outputs:this.type=J(this.data),this.graph.push({type:this.type})}return!this.error&&this.type!==this.options.target&&(this.iteration>=this.options.maxChainLength?(this.error=new RangeError(`Max. number of parsing iterations reached (${e=this.graph,e.reduce(((e,t)=>{const i=e[e.length-1];return i&&i.type===t.type?i.count=i.count+1||2:e.push(t),e}),[]).map((e=>(e.count>1?e.count+"x ":"")+e.type)).join(" -> ")})`),!1):(this.iteration++,!0));var e}end(){if(this.error){if(q.error("[core]",this.error.message),!1!==this.options.strict)throw this.error;return[]}return"@csl/list+object"===this.options.target?Ee(this.data).map(this.options.generateGraph?e=>B(e,this.graph):z):this.data}}const Qe=(...e)=>{const t=new Ke(...e);for(;t.iterate();)try{t.data=at(t.data,t.type)}catch(e){t.error=e}return t.end()},Ze=e=>{const t=J(e);return at(t.match(/array|object/)?we(e):e,t)},Ye=async(...e)=>{const t=new Ke(...e);for(;t.iterate();)t.data=await nt(t.data,t.type).catch((e=>{t.error=e}));return t.end()},et=async e=>{const t=J(e);return nt(t.match(/array|object/)?we(e):e,t)},tt={},it={},rt={"@csl/object":e=>[e],"@csl/list+object":e=>e,"@else/list+object":e=>e.map(Qe).flat(),"@invalid":()=>{throw new Error("This format is not supported or recognized")}},st={"@else/list+object":async e=>(await Promise.all(e.map(Ye))).flat()};function at(e,t){if("function"==typeof tt[t])return tt[t](e);if("function"==typeof rt[t])return rt[t](e);throw new TypeError(`No synchronous parser found for ${t}`)}async function nt(e,t){if("function"==typeof it[t])return it[t](e);if("function"==typeof st[t])return st[t](e);if(lt(t,!1))return at(e,t);throw new TypeError(`No parser found for ${t}`)}function ot(e,{parser:t,async:i}){i?it[e]=t:tt[e]=t}function lt(e,t){return t?it[e]||st[e]:tt[e]||rt[e]}function mt(e,t){delete(t?it:tt)[e]}function ut(e){return Object.keys(e?it:tt)}const pt={};function ct(e,t){const i=new se(e,t);i.validate();const r=pt[e]||(pt[e]={});i.typeParser&&(W(e,i.typeParser),r.type=!0),i.dataParser&&(ot(e,i.dataParser),r.data=!0),i.asyncDataParser&&(ot(e,i.asyncDataParser),r.asyncData=!0),t.outputs&&(r.outputs=t.outputs)}function ht(e){return pt[e]}function ft(e){const t=pt[e];t&&(t.type&&Q(e),t.data&&mt(e),t.asyncData&&mt(e,!0),delete pt[e])}function dt(e){return e in pt}function gt(){return Object.keys(pt)}const bt=Object.assign({},a,n,o,l);function vt(e,t={},i=!1){return!0!==t&&!0!==i||this.save(),this.data.push(...Qe(e,t)),this.data.filter((e=>!Object.prototype.hasOwnProperty.call(e,"id"))).forEach((e=>{e.id=qe(this.getIds(),"temp_id_")})),this}async function yt(e,t={},i=!1){return!0!==t&&!0!==i||this.save(),this.data.push(...await Ye(e,t)),this.data.filter((e=>!Object.prototype.hasOwnProperty.call(e,"id"))).forEach((e=>{e.id=qe(this.getIds(),"temp_id_")})),this}function _t(e,t={},i=!1){return!0!==t&&!0!==i||this.save(),this.data=[],"boolean"!=typeof t?this.add(e,t):this.add(e)}async function xt(e,t={},i=!1){return!0!==t&&!0!==i||this.save(),this.data=[],"boolean"!=typeof t?this.addAsync(e,t):this.addAsync(e)}function Et(e){return e&&this.save(),this.data=[],this._options={},this}function Ot(e){if("citation-label"in e)return e["citation-label"];let t="";return e.author&&(t+=e.author[0].family||e.author[0].literal),e.issued&&e.issued["date-parts"]&&e.issued["date-parts"][0]&&(t+=e.issued["date-parts"][0][0]),e["year-suffix"]?t+=e["year-suffix"]:e.title&&(t+=e.title.replace(/<\/?.*?>/g,"").match(/^(?:(?:the|a|an)\s+)?(\S+)/i)[1]),t}const At={label:e=>e.reduce(((e,t)=>(e[t.id]=Ot(t),e)),{})};function wt(e,t,i="label"===t){let r=i?Ot(e):e[t];switch(t){case"author":case"editor":return r.map((e=>e.literal||e.family||(0,ae.GP)(e)));case"accessed":case"issued":return r["date-parts"][0];case"page":return r.split("-").map((e=>parseInt(e)));case"edition":case"issue":case"volume":return r=parseInt(r),isNaN(r)?-1/0:r;default:return r||-1/0}}function St(e,t,i,r=/^!/.test(i)){const s=wt(e,i=i.replace(/^!/,"")),a=wt(t,i);return(r?-1:1)*(s>a?1:s<a?-1:0)}function Tt(e=[],t){return t&&this.save(),this.data.sort("function"==typeof e?e:function(...e){return(t,i)=>{const r=e.slice();let s=0;for(;!s&&r.length;)s=St(t,i,r.shift());return s}}(...e,"label")),this}const kt=new Xe;function It(e,t){!function(e,t){if("string"!=typeof e)throw new TypeError("Invalid output format name, expected string, got "+typeof e);if("function"!=typeof t)throw new TypeError("Invalid formatter, expected function, got "+typeof t)}(e,t),kt.set(e,t)}function Nt(e){kt.remove(e)}function Ct(e){return kt.has(e)}function Dt(){return kt.list()}function Rt(e,t,...i){if(!kt.has(e))throw new Error(`Output format "${e}" unavailable`);return kt.get(e)(t,...i)}function jt(){return this.data.map((e=>e.id))}function Lt(e,...t){return Rt(e,ve(this.data),...t)}function Pt(e={}){D(e);const t=Object.assign({},this.defaultOptions,this._options.output,e),{type:i,style:r}=t,[s,a]=r.split("-"),n="citation"===s?"bibliography":"csl"===s?"data":s,o="string"===i?"text":"json"===i?"object":i;let l;switch(n){case"bibliography":{const{lang:e,append:i,prepend:r}=t;l={template:a,lang:e,format:o,append:i,prepend:r};break}case"data":case"bibtex":case"bibtxt":case"ndjson":case"ris":l={type:o};break;default:throw new Error(`Invalid style "${n}"`)}const m=this.format(n,Object.assign(l,e._newOptions)),{format:u}=t;if("real"===u&&"html"===o&&"undefined"!=typeof document&&"function"==typeof document.createElement){const e=document.createElement("div");return e.innerHTML=m,e.firstChild}return"string"===u&&"object"==typeof m?JSON.stringify(m):m}const Ft=function(e,t,i){"function"!=typeof t||i||(i=t,t=void 0);const r=(new this).setAsync(e,t);return"function"==typeof i?void r.then(i):r};function Bt(e,t={}){return this instanceof Bt?(this._options=t,this.log=[],this.data=[],this.set(e,t),this.options(t),this):new Bt(e,t)}Object.assign(Bt.prototype,r,s,p,c,f),Bt.prototype[Symbol.iterator]=function*(){yield*this.data},Object.assign(Bt,d);const zt=Bt;const Ut=new Xe({html:{bibliographyContainer:['<div class="csl-bib-body">',"</div>"],entry:['<div class="csl-entry">',"</div>"],list:['<ul style="list-style-type:none">',"</ul>"],listItem:["<li>","</li>"]},text:{bibliographyContainer:["","\n"],entry:["","\n"],list:["\n",""],listItem:["\t","\n"]}});function Mt(e,t){!function(e,t){if("string"!=typeof e)throw new TypeError("Invalid dict name, expected string, got "+typeof e);if("object"!=typeof t)throw new TypeError("Invalid dict, expected object, got "+typeof t);for(const e in t){const i=t[e];if(!Array.isArray(i)||i.some((e=>"string"!=typeof e)))throw new TypeError(`Invalid dict entry "${e}", expected array of strings`)}}(e,t),Ut.set(e,t)}function qt(e){Ut.remove(e)}function Gt(e){return Ut.has(e)}function $t(){return Ut.list()}function Xt(e){if(!Ut.has(e))throw new Error(`Dict "${e}" unavailable`);return Ut.get(e)}const Vt={wr_start:'<div class="csl-bib-body">',wr_end:"</div>",en_start:'<div class="csl-entry">',en_end:"</div>",ul_start:'<ul style="list-style-type:none">',ul_end:"</ul>",li_start:"<li>",li_end:"</li>"},Ht={wr_start:"",wr_end:"\n",en_start:"",en_end:"\n",ul_start:"\n",ul_end:"",li_start:"\t",li_end:"\n"},Jt={};function Wt(e,t){Jt[e]=t}function Kt(e){return Jt[e]}function Qt(e){return Object.prototype.hasOwnProperty.call(Jt,e)}function Zt(e){delete Jt[e]}function Yt(){return Object.keys(Jt)}const ei={input:u,output:h,dict:g,config:b},ti={};function ii(e,t={}){const i=ti[e]={};for(const r in t){if("config"===r){i.config={[e]:t.config},ei.config.add(e,t.config);continue}const s=i[r]={},a=t[r];for(const e in a){const t=a[e];s[e]=!0,ei[r].add(e,t)}}}function ri(e){const t=ti[e];for(const e in t){const i=t[e];for(const t in i)ei[e].remove(t)}delete ti[e]}function si(e){return e in ti}function ai(){return Object.keys(ti)}function ni(){return[]}const oi=[[/((?:\[|:|,)\s*)'((?:\\'|[^'])*?[^\\])?'(?=\s*(?:\]|}|,))/g,'$1"$2"'],[/((?:(?:"|]|}|\/[gmiuys]|\.|(?:\d|\.|-)*\d)\s*,|{)\s*)(?:"([^":\n]+?)"|'([^":\n]+?)'|([^":\n]+?))(\s*):/g,'$1"$2$3$4"$5:']];function li(e){if("string"!=typeof e)return JSON.parse(e);try{return JSON.parse(e)}catch(t){return q.debug("[plugin-common]","Invalid JSON, switching to experimental parser"),oi.forEach((([t,i])=>{e=e.replace(t,i)})),JSON.parse(e)}}function mi(e){return e.val()||e.text()||e.html()}function ui(e){return e.value||e.textContent}var pi=i(93637);function ci(e,t,i){return e+(t<i.length-1?",":"")}function hi(e,t){const i=Array.isArray(e);let r;return r=i?e.map((e=>fi(e,t))):Object.keys(e).filter((t=>JSON.stringify(e[t]))).map((i=>`"${i}": ${fi(e[i],t)}`)),r=r.map(ci).map((e=>t.listItem.join(e))),r=t.list.join(r.join("")),i?`[${r}]`:`{${r}}`}function fi(e,t){return"object"==typeof e&&null!==e?0===e.length?"[]":0===Object.keys(e).length?"{}":hi(e,t):JSON.stringify(e)}function di(e,t){let i=e.map((e=>hi(e,t)));return i=i.map(ci).map((e=>t.entry.join(e))),i=i.join(""),t.bibliographyContainer.join(`[${i}]`)}const gi={data:(e,{type:t,format:i=t||"text",version:r="1.0.2"}={})=>(r<"1.0.2"&&(e=Oe(e)),"object"===i?we(e):"text"===i?JSON.stringify(e,null,2):(q.warn("[core]","This feature (JSON output with special formatting) is unstable. See https://github.com/larsgw/citation.js/issues/144"),di(e,Xt(i)))),ndjson:(e,{version:t="1.0.2"}={})=>(t<"1.0.2"&&(e=Oe(e)),e.map((e=>JSON.stringify(e))).join("\n"))};ii("@else",{input:{"@empty/text":{parse:ni,parseType:{dataType:"String",predicate:e=>""===e}},"@empty/whitespace+text":{parse:ni,parseType:{dataType:"String",predicate:/^\s+$/}},"@empty":{parse:ni,parseType:{dataType:"Primitive",predicate:e=>null==e}},"@else/json":{parse:li,parseType:{dataType:"String",predicate:/^\s*(\{[\S\s]*\}|\[[\S\s]*\])\s*$/}},"@else/url":{parseType:{dataType:"String",predicate:/^https?:\/\/(([\w-]+\.)*[\w-]+)(:\d+)?(\/[^?/]*)*(\?[^#]*)?(#.*)?$/i}},"@else/jquery":{parse:mi,parseType:{dataType:"ComplexObject",predicate:e=>void 0!==pi&&e instanceof pi}},"@else/html":{parse:ui,parseType:{dataType:"ComplexObject",predicate:e=>"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}}},output:Object.assign({},gi,At)})},50311:(e,t,i)=>{Object.defineProperty(t,"GP",{enumerable:!0,get:function(){return s.default}});var r=a(i(76127)),s=a(i(31202));function a(e){return e&&e.__esModule?e:{default:e}}},76127:(e,t)=>{function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==i)return;var r,s,a=[],n=!0,o=!1;try{for(i=i.call(e);!(n=(r=i.next()).done)&&(a.push(r.value),!t||a.length!==t);n=!0);}catch(e){o=!0,s=e}finally{try{n||null==i.return||i.return()}finally{if(o)throw s}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return r(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,r=new Array(t);i<t;i++)r[i]=e[i];return r}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const s={jan:1,feb:2,mar:3,apr:4,may:5,jun:6,jul:7,aug:8,sep:9,oct:10,nov:11,dec:12},a=/ (?:to|[-/]) | ?(?:--|[–—]) ?/,n=/^(\d{4}-\d{2}-\d{2})\/(\d{4}-\d{2}-\d{2})$/;function o(e){return s[e.toLowerCase().slice(0,3)]}const l=function(e){const t=/^(\d{4}|[-+]\d{6,})-(\d{2})(?:-(\d{2}))?/;if("string"!=typeof e||!t.test(e))return null;const r=i(e.match(t),4),s=r[1],a=r[2],n=r[3];return+a?+n?[s,a,n]:[s,a]:[s]},m=function(e){const t=/^(?:[a-z]{3},\s*)?(\d{1,2}) ([a-z]{3}) (\d{4,})/i;if("string"!=typeof e||!t.test(e))return null;let r=i(e.match(t),4),s=r[1],a=r[2],n=r[3];return a=o(a),a?[n,a,s]:null};function u(e){const t=function(e){const t=new Date(e);return"number"!=typeof e||isNaN(t.valueOf())?null:[t.getFullYear(),t.getMonth()+1,t.getDate()]}(e)||l(e)||m(e)||function(e){const t=/^(\d{1,2})\/(\d{1,2})\/(\d{2}(?:\d{2})?)/;if("string"!=typeof e||!t.test(e))return null;const r=i(e.match(t),4),s=r[1],a=r[2],n=r[3];return new Date(n,s,a).getMonth()===parseInt(s)?[n,s,a]:null}(e)||function(e){const t=/^(\d{1,2})[ .\-/](\d{1,2}|[a-z]{3,10})[ .\-/](-?\d+)/i,r=/^(-?\d+)[ .\-/](\d{1,2}|[a-z]{3,10})[ .\-/](\d{1,2})/i;let s,a,n;if("string"!=typeof e)return null;if(t.test(e)){var l=i(e.match(t),4);n=l[1],a=l[2],s=l[3]}else{if(!r.test(e))return null;var m=i(e.match(r),4);s=m[1],a=m[2],n=m[3]}if(o(a))a=o(a);else if(isNaN(a))return null;return[s,a,n]}(e)||function(e){const t=/^([a-z]{3,10}|-?\d+)[^\w-]+([a-z]{3,10}|-?\d+)$/i;if("string"==typeof e&&t.test(e)){const i=e.match(t).slice(1,3);let r;if(o(i[1]))r=o(i.pop());else if(o(i[0]))r=o(i.shift());else{if(i.some(isNaN)||i.every((e=>+e<0)))return null;r=+i[0]<0||+i[0]>+i[1]&&+i[1]>0?i.pop():i.shift()}return[i.pop(),r]}return null}(e)||function(e){if("string"!=typeof e)return null;const t=e.match(/^(\d+) ?(a\.?d\.?|b\.?c\.?)$/i);if(t){const e=i(t.slice(1),2);return[e[0]*("a"===e[1].toLowerCase()[0]?1:-1)]}return/^-?\d+$/.test(e)?[e]:null}(e);return t&&t.map((e=>parseInt(e)))}var p=function(e,t){const i=[],r="string"==typeof e&&function(e){return n.test(e)?e.match(n).slice(1,3):e.split(a)}(e);t?i.push(e,t):r&&2===r.length?i.push(...r):i.push(e);const s=i.map(u);return s.filter(Boolean).length===i.length?{"date-parts":s}:{raw:t?i.join("/"):e}};t.default=p},31202:(e,t)=>{function i(e,t,i){if(e.length>=t)return e;for(;e.length<t;)e=i+e;return e.slice(-t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e,t="-"){if(!e["date-parts"])return e.raw;const r=e["date-parts"][0].map((e=>e.toString()));switch(r.length){case 3:r[2]=i(r[2],2,"0");case 2:r[1]=i(r[1],2,"0");case 1:r[0]=i(r[0],4,"0")}return r.join(t)};t.default=r},5656:(e,t,i)=>{Object.defineProperty(t,"qg",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"GP",{enumerable:!0,get:function(){return s.default}});var r=a(i(79272)),s=a(i(46859));function a(e){return e&&e.__esModule?e:{default:e}}},79272:(e,t)=>{function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=[],r=!0,s=!1,a=void 0;try{for(var n,o=e[Symbol.iterator]();!(r=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);r=!0);}catch(e){s=!0,a=e}finally{try{r||null==o.return||o.return()}finally{if(s)throw a}}return i}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.parse=t.types=t.scope=void 0;const r=e=>e.replace(/$|( )|(?!^)(?=[A-Z])/g,"\\.?$1"),s=e=>`(?:${e.join("|")})\\b`,a=(e,t)=>new RegExp(`(?:^| )(${e}$)`,t),n=s(["mr","mrs","ms","miss","dr","herr","monsieur","hr","frau","a v m","admiraal","admiral","air cdre","air commodore","air marshal","air vice marshal","alderman","alhaji","ambassador","baron","barones","brig","brig gen","brig general","brigadier","brigadier general","brother","canon","capt","captain","cardinal","cdr","chief","cik","cmdr","coach","col","col dr","colonel","commandant","commander","commissioner","commodore","comte","comtessa","congressman","conseiller","consul","conte","contessa","corporal","councillor","count","countess","crown prince","crown princess","dame","datin","dato","datuk","datuk seri","deacon","deaconess","dean","dhr","dipl ing","doctor","dott","dott sa","dr","dr ing","dra","drs","embajador","embajadora","en","encik","eng","eur ing","exma sra","exmo sr","f o","father","first lieutient","first officer","flt lieut","flying officer","fr","frau","fraulein","fru","gen","generaal","general","governor","graaf","gravin","group captain","grp capt","h e dr","h h","h m","h r h","hajah","haji","hajim","her highness","her majesty","herr","high chief","his highness","his holiness","his majesty","hon","hr","hra","ing","ir","jonkheer","judge","justice","khun ying","kolonel","lady","lcda","lic","lieut","lieut cdr","lieut col","lieut gen","lord","m","m l","m r","madame","mademoiselle","maj gen","major","master","mevrouw","miss","mlle","mme","monsieur","monsignor","mr","mrs","ms","mstr","nti","pastor","president","prince","princess","princesse","prinses","prof","prof dr","prof sir","professor","puan","puan sri","rabbi","rear admiral","rev","rev canon","rev dr","rev mother","reverend","rva","senator","sergeant","sheikh","sheikha","sig","sig na","sig ra","sir","sister","sqn ldr","sr","sr d","sra","srta","sultan","tan sri","tan sri dato","tengku","teuku","than puying","the hon dr","the hon justice","the hon miss","the hon mr","the hon mrs","the hon ms","the hon sir","the very rev","toh puan","tun","vice admiral","viscount","viscountess","wg cdr"].map(r)),o=s(["I","II","III","IV","V","Senior","Junior","Jr","Sr","PhD","Ph\\.D","APR","RPh","PE","MD","MA","DMD","CME","BVM","CFRE","CLU","CPA","CSC","CSJ","DC","DD","DDS","DO","DVM","EdD","Esq","JD","LLD","OD","OSB","PC","Ret","RGS","RN","RNC","SHCJ","SJ","SNJM","SSMO","USA","USAF","USAFR","USAR","USCG","USMC","USMCR","USN","USNR"].map(r)),l=s(["Vere","Von","Van","De","Del","Della","Di","Da","Pietro","Vanden","Du","St.","St","La","Lo","Ter","O","O'","Mac","Fitz"]),m=new RegExp(`^((?:${n} )*)(.*)$`,"i"),u=a(`(?:${o}, )*(?:${o})`,"i"),p=a(`${/(?:[A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1C90-\u1CBA\u1CBD-\u1CBF\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2160-\u216F\u2183\u24B6-\u24CF\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AE\uA7B0-\uA7B4\uA7B6\uA7B8\uFF21-\uFF3A]|\uD801[\uDC00-\uDC27\uDCB0-\uDCD3]|\uD803[\uDC80-\uDCB2]|\uD806[\uDCA0-\uDCBF]|\uD81B[\uDE40-\uDE5F]|\uD835[\uDC00-\uDC19\uDC34-\uDC4D\uDC68-\uDC81\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB5\uDCD0-\uDCE9\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD38\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD6C-\uDD85\uDDA0-\uDDB9\uDDD4-\uDDED\uDE08-\uDE21\uDE3C-\uDE55\uDE70-\uDE89\uDEA8-\uDEC0\uDEE2-\uDEFA\uDF1C-\uDF34\uDF56-\uDF6E\uDF90-\uDFA8\uDFCA]|\uD83A[\uDD00-\uDD21]|\uD83C[\uDD30-\uDD49\uDD50-\uDD69\uDD70-\uDD89])/.source}.*`),c=a(`(?:${/(?:[a-z\xAA\xB5\xBA\xDF-\xF6\xF8-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02B8\u02C0\u02C1\u02E0-\u02E4\u0345\u0371\u0373\u0377\u037A-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0560-\u0588\u10D0-\u10FA\u10FD-\u10FF\u13F8-\u13FD\u1C80-\u1C88\u1D00-\u1DBF\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u2071\u207F\u2090-\u209C\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2170-\u217F\u2184\u24D0-\u24E9\u2C30-\u2C5E\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7D\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B-\uA69D\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7AF\uA7B5\uA7B7\uA7B9\uA7F8-\uA7FA\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A]|\uD801[\uDC28-\uDC4F\uDCD8-\uDCFB]|\uD803[\uDCC0-\uDCF2]|\uD806[\uDCC0-\uDCDF]|\uD81B[\uDE60-\uDE7F]|\uD835[\uDC1A-\uDC33\uDC4E-\uDC54\uDC56-\uDC67\uDC82-\uDC9B\uDCB6-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDCEA-\uDD03\uDD1E-\uDD37\uDD52-\uDD6B\