System.register([],(function(e){"use strict";return{execute:function(){e("p",v);function r(e){var r=[];var i=0;while(i<e.length){var n=e[i];if(n==="*"||n==="+"||n==="?"){r.push({type:"MODIFIER",index:i,value:e[i++]});continue}if(n==="\\"){r.push({type:"ESCAPED_CHAR",index:i++,value:e[i++]});continue}if(n==="{"){r.push({type:"OPEN",index:i,value:e[i++]});continue}if(n==="}"){r.push({type:"CLOSE",index:i,value:e[i++]});continue}if(n===":"){var t="";var a=i+1;while(a<e.length){var f=e.charCodeAt(a);if(f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||f===95){t+=e[a++];continue}break}if(!t)throw new TypeError("Missing parameter name at "+i);r.push({type:"NAME",index:i,value:t});i=a;continue}if(n==="("){var u=1;var o="";var a=i+1;if(e[a]==="?"){throw new TypeError('Pattern cannot start with "?" at '+a)}while(a<e.length){if(e[a]==="\\"){o+=e[a++]+e[a++];continue}if(e[a]===")"){u--;if(u===0){a++;break}}else if(e[a]==="("){u++;if(e[a+1]!=="?"){throw new TypeError("Capturing groups are not allowed at "+a)}}o+=e[a++]}if(u)throw new TypeError("Unbalanced pattern at "+i);if(!o)throw new TypeError("Missing pattern at "+i);r.push({type:"PATTERN",index:i,value:o});i=a;continue}r.push({type:"CHAR",index:i,value:e[i++]})}r.push({type:"END",index:i,value:""});return r}function i(e,i){if(i===void 0){i={}}var t=r(e);var a=i.prefixes,f=a===void 0?"./":a;var u="[^"+n(i.delimiter||"/#?")+"]+?";var o=[];var v=0;var p=0;var s="";var c=function(e){if(p<t.length&&t[p].type===e)return t[p++].value};var d=function(e){var r=c(e);if(r!==undefined)return r;var i=t[p],n=i.type,a=i.index;throw new TypeError("Unexpected "+n+" at "+a+", expected "+e)};var h=function(){var e="";var r;while(r=c("CHAR")||c("ESCAPED_CHAR")){e+=r}return e};while(p<t.length){var l=c("CHAR");var E=c("NAME");var x=c("PATTERN");if(E||x){var w=l||"";if(f.indexOf(w)===-1){s+=w;w=""}if(s){o.push(s);s=""}o.push({name:E||v++,prefix:w,suffix:"",pattern:x||u,modifier:c("MODIFIER")||""});continue}var y=l||c("ESCAPED_CHAR");if(y){s+=y;continue}if(s){o.push(s);s=""}var g=c("OPEN");if(g){var w=h();var m=c("NAME")||"";var A=c("PATTERN")||"";var R=h();d("CLOSE");o.push({name:m||(A?v++:""),pattern:m&&!A?u:A,prefix:w,suffix:R,modifier:c("MODIFIER")||""});continue}d("END")}return o}function n(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function t(e){return e&&e.sensitive?"":"i"}function a(e,r){if(!r)return e;var i=/\((?:\?<(.*?)>)?(?!\?)/g;var n=0;var t=i.exec(e.source);while(t){r.push({name:t[1]||n++,prefix:"",suffix:"",modifier:"",pattern:""});t=i.exec(e.source)}return e}function f(e,r,i){var n=e.map((function(e){return v(e,r,i).source}));return new RegExp("(?:"+n.join("|")+")",t(i))}function u(e,r,n){return o(i(e,n),r,n)}function o(e,r,i){if(i===void 0){i={}}var a=i.strict,f=a===void 0?false:a,u=i.start,o=u===void 0?true:u,v=i.end,p=v===void 0?true:v,s=i.encode,c=s===void 0?function(e){return e}:s;var d="["+n(i.endsWith||"")+"]|$";var h="["+n(i.delimiter||"/#?")+"]";var l=o?"^":"";for(var E=0,x=e;E<x.length;E++){var w=x[E];if(typeof w==="string"){l+=n(c(w))}else{var y=n(c(w.prefix));var g=n(c(w.suffix));if(w.pattern){if(r)r.push(w);if(y||g){if(w.modifier==="+"||w.modifier==="*"){var m=w.modifier==="*"?"?":"";l+="(?:"+y+"((?:"+w.pattern+")(?:"+g+y+"(?:"+w.pattern+"))*)"+g+")"+m}else{l+="(?:"+y+"("+w.pattern+")"+g+")"+w.modifier}}else{l+="("+w.pattern+")"+w.modifier}}else{l+="(?:"+y+g+")"+w.modifier}}}if(p){if(!f)l+=h+"?";l+=!i.endsWith?"$":"(?="+d+")"}else{var A=e[e.length-1];var R=typeof A==="string"?h.indexOf(A[A.length-1])>-1:A===undefined;if(!f){l+="(?:"+h+"(?="+d+"))?"}if(!R){l+="(?="+h+"|"+d+")"}}return new RegExp(l,t(i))}function v(e,r,i){if(e instanceof RegExp)return a(e,r);if(Array.isArray(e))return f(e,r,i);return u(e,r,i)}}}}));