Comparing version 4.3.1 to 4.3.2
@@ -1,2 +0,2 @@ | ||
var Regex=(()=>{var B=Object.defineProperty;var Ce=Object.getOwnPropertyDescriptor;var Le=Object.getOwnPropertyNames;var _e=Object.prototype.hasOwnProperty;var be=(e,t)=>{for(var n in t)B(e,n,{get:t[n],enumerable:!0})},Oe=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Le(t))!_e.call(e,s)&&s!==n&&B(e,s,{get:()=>t[s],enumerable:!(r=Ce(t,s))||r.enumerable});return e};var De=e=>Oe(B({},"__esModule",{value:!0}),e);var ze={};be(ze,{pattern:()=>Q,regex:()=>je,rewrite:()=>qe});var E=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function N(e,t,n,r){let s=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),a=[!1],o=0,i="";for(let u of e.matchAll(s)){let{0:c,groups:{$skip:p}}=u;if(!p&&(!r||r===E.DEFAULT==!o)){n instanceof Function?i+=n(u,{context:o?E.CHAR_CLASS:E.DEFAULT,negated:a[a.length-1]}):i+=n;continue}c[0]==="["?(o++,a.push(c[1]==="^")):c==="]"&&o&&(o--,a.pop()),i+=c}return i}function x(e,t,n,r){N(e,t,n,r)}function v(e,t,n=0,r){if(!new RegExp(t,"su").test(e))return null;let s=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");s.lastIndex=n;let a=0,o;for(;o=s.exec(e);){let{0:i,groups:{$skip:u}}=o;if(!u&&(!r||r===E.DEFAULT==!a))return o;i==="["?a++:i==="]"&&a&&a--,s.lastIndex==o.index&&s.lastIndex++}return null}function V(e,t,n){return!!v(e,t,0,n)}function W(e,t){let n=/\\?./gsu;n.lastIndex=t;let r=e.length,s=0,a=1,o;for(;o=n.exec(e);){let[i]=o;if(i==="[")s++;else if(s)i==="]"&&s--;else if(i==="(")a++;else if(i===")"&&(a--,!a)){r=o.index;break}}return e.slice(t,r)}var $=class{#e;constructor(t){this.#e=t}toString(){return String(this.#e)}};function Q(e,...t){if(Array.isArray(e?.raw))return new $(e.raw.flatMap((n,r)=>r<e.raw.length-1?[n,t[r]]:n).join(""));if(!t.length)return new $(e??"");throw new Error(`Unexpected arguments: ${JSON.stringify([e,...t])}`)}var f={DEFAULT:"R_DEFAULT",CHAR_CLASS:"R_CHAR_CLASS",GROUP_NAME:"R_GROUP_NAME",ENCLOSED_TOKEN:"R_ENCLOSED_TOKEN",INTERVAL_QUANTIFIER:"R_INTERVAL_QUANTIFIER",INVALID_INCOMPLETE_TOKEN:"R_INVALID_INCOMPLETE_TOKEN"},g={DEFAULT:"CC_DEFAULT",RANGE:"CC_RANGE",ENCLOSED_TOKEN:"CC_ENCLOSED_TOKEN",Q_TOKEN:"CC_Q_TOKEN",INVALID_INCOMPLETE_TOKEN:"CC_INVALID_INCOMPLETE_TOKEN"},G=(()=>{try{new RegExp("(?i:)")}catch{return!1}return!0})(),oe=(()=>{try{new RegExp("","v")}catch{return!1}return!0})(),b="&!#$%*+,.:;<=>?@^`~",I="$E$",j=String.raw`\(\?<(?![=!])(?<captureName>[^>]+)>`,O=String.raw`\((?!\?)(?!(?<=\(\?\()DEFINE\))|${j}`,D=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function z(e,t){return t===E.CHAR_CLASS?e.replace(new RegExp(String.raw`[()\[\]{}|\\/\-${b}]`,"g"),"\\$&"):e.replace(/[()\[\]{}|\\^$*+?.]/g,"\\$&")}function q(e){return e.replace(new RegExp(`^([${b}])(?!\\1)`),(t,n,r)=>`\\${t}${r+1===e.length?"":t}`)}function ie(e){return e.replace(/^\^/,"\\^^")}function M(e,t){return N(e,String.raw`\\0(?!\d)`,"\\x00",t)}function re(e,t,n){let r=0;for(let[s]of e.matchAll(new RegExp(`[${z(t+n,E.CHAR_CLASS)}]`,"g")))if(r+=s===t?1:-1,r<0)return n;return r>0?t:""}function ae(e,t,n){let r=e.replace(/\\./gsu,"");if(r.endsWith("\\"))return"\\";if(t===f.DEFAULT)return re(r,"(",")");if(t===f.CHAR_CLASS&&!(n===g.ENCLOSED_TOKEN||n===g.Q_TOKEN))return re(r,"[","]");if(t===f.ENCLOSED_TOKEN||t===f.INTERVAL_QUANTIFIER||n===g.ENCLOSED_TOKEN||n===g.Q_TOKEN){if(r.includes("}"))return"}"}else if(t===f.GROUP_NAME&&r.includes(">"))return">";return""}var se=new RegExp(String.raw` | ||
var Regex=(()=>{var B=Object.defineProperty;var Ce=Object.getOwnPropertyDescriptor;var Le=Object.getOwnPropertyNames;var _e=Object.prototype.hasOwnProperty;var be=(e,t)=>{for(var n in t)B(e,n,{get:t[n],enumerable:!0})},Oe=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Le(t))!_e.call(e,s)&&s!==n&&B(e,s,{get:()=>t[s],enumerable:!(r=Ce(t,s))||r.enumerable});return e};var De=e=>Oe(B({},"__esModule",{value:!0}),e);var ze={};be(ze,{pattern:()=>Q,regex:()=>je,rewrite:()=>qe});var E=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function N(e,t,n,r){let s=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),i=[!1],o=0,a="";for(let u of e.matchAll(s)){let{0:c,groups:{$skip:p}}=u;if(!p&&(!r||r===E.DEFAULT==!o)){n instanceof Function?a+=n(u,{context:o?E.CHAR_CLASS:E.DEFAULT,negated:i[i.length-1]}):a+=n;continue}c[0]==="["?(o++,i.push(c[1]==="^")):c==="]"&&o&&(o--,i.pop()),a+=c}return a}function x(e,t,n,r){N(e,t,n,r)}function v(e,t,n=0,r){if(!new RegExp(t,"su").test(e))return null;let s=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");s.lastIndex=n;let i=0,o;for(;o=s.exec(e);){let{0:a,groups:{$skip:u}}=o;if(!u&&(!r||r===E.DEFAULT==!i))return o;a==="["?i++:a==="]"&&i&&i--,s.lastIndex==o.index&&s.lastIndex++}return null}function V(e,t,n){return!!v(e,t,0,n)}function W(e,t){let n=/\\?./gsu;n.lastIndex=t;let r=e.length,s=0,i=1,o;for(;o=n.exec(e);){let[a]=o;if(a==="[")s++;else if(s)a==="]"&&s--;else if(a==="(")i++;else if(a===")"&&(i--,!i)){r=o.index;break}}return e.slice(t,r)}var $=class{#e;constructor(t){this.#e=t}toString(){return String(this.#e)}};function Q(e,...t){if(Array.isArray(e?.raw))return new $(e.raw.flatMap((n,r)=>r<e.raw.length-1?[n,t[r]]:n).join(""));if(!t.length)return new $(e??"");throw new Error(`Unexpected arguments: ${JSON.stringify([e,...t])}`)}var f={DEFAULT:"R_DEFAULT",CHAR_CLASS:"R_CHAR_CLASS",GROUP_NAME:"R_GROUP_NAME",ENCLOSED_TOKEN:"R_ENCLOSED_TOKEN",INTERVAL_QUANTIFIER:"R_INTERVAL_QUANTIFIER",INVALID_INCOMPLETE_TOKEN:"R_INVALID_INCOMPLETE_TOKEN"},g={DEFAULT:"CC_DEFAULT",RANGE:"CC_RANGE",ENCLOSED_TOKEN:"CC_ENCLOSED_TOKEN",Q_TOKEN:"CC_Q_TOKEN",INVALID_INCOMPLETE_TOKEN:"CC_INVALID_INCOMPLETE_TOKEN"},G=(()=>{try{new RegExp("(?i:)")}catch{return!1}return!0})(),oe=(()=>{try{new RegExp("","v")}catch{return!1}return!0})(),b="&!#$%*+,.:;<=>?@^`~",I="$E$",j=String.raw`\(\?<(?![=!])(?<captureName>[^>]+)>`,O=String.raw`\((?!\?)(?!(?<=\(\?\()DEFINE\))|${j}`,D=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function z(e,t){return t===E.CHAR_CLASS?e.replace(new RegExp(String.raw`[()\[\]{}|\\/\-${b}]`,"g"),"\\$&"):e.replace(/[()\[\]{}|\\^$*+?.]/g,"\\$&")}function q(e){return e.replace(new RegExp(`^([${b}])(?!\\1)`),(t,n,r)=>`\\${t}${r+1===e.length?"":t}`)}function ie(e){return e.replace(/^\^/,"\\^^")}function M(e,t){return N(e,String.raw`\\0(?!\d)`,"\\x00",t)}function re(e,t,n){let r=0;for(let[s]of e.matchAll(new RegExp(`[${z(t+n,E.CHAR_CLASS)}]`,"g")))if(r+=s===t?1:-1,r<0)return n;return r>0?t:""}function ae(e,t,n){let r=e.replace(/\\./gsu,"");if(r.endsWith("\\"))return"\\";if(t===f.DEFAULT)return re(r,"(",")");if(t===f.CHAR_CLASS&&!(n===g.ENCLOSED_TOKEN||n===g.Q_TOKEN))return re(r,"[","]");if(t===f.ENCLOSED_TOKEN||t===f.INTERVAL_QUANTIFIER||n===g.ENCLOSED_TOKEN||n===g.Q_TOKEN){if(r.includes("}"))return"}"}else if(t===f.GROUP_NAME&&r.includes(">"))return">";return""}var se=new RegExp(String.raw` | ||
(?<groupN>\(\?<(?![=!])|\\[gk]<) | ||
@@ -14,3 +14,3 @@ | (?<enclosedT>\\[pPu]\{) | ||
| \\?. | ||
`.replace(/\s+/g,""),"gsu");function R(e,{regexContext:t=f.DEFAULT,charClassContext:n=g.DEFAULT,charClassDepth:r=0,lastPos:s=0}={}){se.lastIndex=s;let a;for(;a=se.exec(e);){let{0:o,groups:{groupN:i,enclosedT:u,qT:c,intervalQ:p,incompleteT:m}}=a;o==="["?(r++,t=f.CHAR_CLASS,n=g.DEFAULT):o==="]"&&t===f.CHAR_CLASS?(r&&r--,r||(t=f.DEFAULT),n=g.DEFAULT):t===f.CHAR_CLASS?m?n=g.INVALID_INCOMPLETE_TOKEN:o==="-"?n=g.RANGE:u?n=g.ENCLOSED_TOKEN:c?n=g.Q_TOKEN:(o==="}"&&(n===g.ENCLOSED_TOKEN||n===g.Q_TOKEN)||n===g.INVALID_INCOMPLETE_TOKEN||n===g.RANGE)&&(n=g.DEFAULT):m?t=f.INVALID_INCOMPLETE_TOKEN:i?t=f.GROUP_NAME:u?t=f.ENCLOSED_TOKEN:p?t=f.INTERVAL_QUANTIFIER:(o===">"&&t===f.GROUP_NAME||o==="}"&&(t===f.ENCLOSED_TOKEN||t===f.INTERVAL_QUANTIFIER)||t===f.INVALID_INCOMPLETE_TOKEN)&&(t=f.DEFAULT)}return{regexContext:t,charClassContext:n,charClassDepth:r,lastPos:e.length}}function U(e){let t=0;return x(e,O,()=>t++,E.DEFAULT),t}function ue(e,t){return N(e,String.raw`\\(?<num>[1-9]\d*)`,({groups:{num:n}})=>`\\${+n+t}`,E.DEFAULT)}function F(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}var Re=["Basic_Emoji","Emoji_Keycap_Sequence","RGI_Emoji_Modifier_Sequence","RGI_Emoji_Flag_Sequence","RGI_Emoji_Tag_Sequence","RGI_Emoji_ZWJ_Sequence","RGI_Emoji"].join("|"),Ue=new RegExp(String.raw` | ||
`.replace(/\s+/g,""),"gsu");function R(e,{regexContext:t=f.DEFAULT,charClassContext:n=g.DEFAULT,charClassDepth:r=0,lastPos:s=0}={}){se.lastIndex=s;let i;for(;i=se.exec(e);){let{0:o,groups:{groupN:a,enclosedT:u,qT:c,intervalQ:p,incompleteT:m}}=i;o==="["?(r++,t=f.CHAR_CLASS,n=g.DEFAULT):o==="]"&&t===f.CHAR_CLASS?(r&&r--,r||(t=f.DEFAULT),n=g.DEFAULT):t===f.CHAR_CLASS?m?n=g.INVALID_INCOMPLETE_TOKEN:o==="-"?n=g.RANGE:u?n=g.ENCLOSED_TOKEN:c?n=g.Q_TOKEN:(o==="}"&&(n===g.ENCLOSED_TOKEN||n===g.Q_TOKEN)||n===g.INVALID_INCOMPLETE_TOKEN||n===g.RANGE)&&(n=g.DEFAULT):m?t=f.INVALID_INCOMPLETE_TOKEN:a?t=f.GROUP_NAME:u?t=f.ENCLOSED_TOKEN:p?t=f.INTERVAL_QUANTIFIER:(o===">"&&t===f.GROUP_NAME||o==="}"&&(t===f.ENCLOSED_TOKEN||t===f.INTERVAL_QUANTIFIER)||t===f.INVALID_INCOMPLETE_TOKEN)&&(t=f.DEFAULT)}return{regexContext:t,charClassContext:n,charClassDepth:r,lastPos:e.length}}function U(e){let t=0;return x(e,O,()=>t++,E.DEFAULT),t}function ue(e,t){return N(e,String.raw`\\(?<num>[1-9]\d*)`,({groups:{num:n}})=>`\\${+n+t}`,E.DEFAULT)}function F(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}var Re=["Basic_Emoji","Emoji_Keycap_Sequence","RGI_Emoji_Modifier_Sequence","RGI_Emoji_Flag_Sequence","RGI_Emoji_Tag_Sequence","RGI_Emoji_ZWJ_Sequence","RGI_Emoji"].join("|"),Ue=new RegExp(String.raw` | ||
\\(?: c[A-Za-z] | ||
@@ -27,3 +27,3 @@ | p\{(?<pStrProp>${Re})\} | ||
| . | ||
`.replace(/\s+/g,""),"gsu");function Z(e){let t=!1,n;for(let{0:r,groups:s}of e.matchAll(Ue)){if(s.pStrProp||s.qStrProp||r==="["&&t)return!0;if(["-","--","&&"].includes(r))t=!1;else if(r!=="["&&r!=="]"){if(t||n==="]")return!0;t=!0}n=r}return!1}function le(e,t,n,r){let s={raw:[]},a=[],o;return e.raw.forEach((i,u)=>{let c=n(i,{...o,lastPos:0},r);if(s.raw.push(c.transformed),o=c.runningContext,u<e.raw.length-1){let p=t[u];if(p instanceof $){let m=n(p,{...o,lastPos:0},r);a.push(Q(m.transformed)),o=m.runningContext}else a.push(p)}}),{template:s,substitutions:a}}var Fe=new RegExp(String.raw` | ||
`.replace(/\s+/g,""),"gsu");function Z(e){let t=!1,n;for(let{0:r,groups:s}of e.matchAll(Ue)){if(s.pStrProp||s.qStrProp||r==="["&&t)return!0;if(["-","--","&&"].includes(r))t=!1;else if(r!=="["&&r!=="]"){if(t||n==="]")return!0;t=!0}n=r}return!1}function le(e,t,n,r){let s={raw:[]},i=[],o;return e.raw.forEach((a,u)=>{let c=n(a,{...o,lastPos:0},r);if(s.raw.push(c.transformed),o=c.runningContext,u<e.raw.length-1){let p=t[u];if(p instanceof $){let m=n(p,{...o,lastPos:0},r);i.push(Q(m.transformed)),o=m.runningContext}else i.push(p)}}),{template:s,substitutions:i}}var Fe=new RegExp(String.raw` | ||
${D} | ||
@@ -33,3 +33,3 @@ | \(\?< | ||
| \\?. | ||
`.replace(/\s+/g,""),"gsu");function ce(e,t){e=String(e);let n="",r="";for(let{0:s,groups:{backrefNum:a}}of e.matchAll(Fe)){n+=s,t=R(n,t);let{regexContext:o}=t;if(o===f.DEFAULT)if(s==="(")r+="(?:";else{if(a)throw new Error(`Invalid decimal escape "${s}" with implicit flag n; replace with named backreference`);r+=s}else r+=s}return{transformed:r,runningContext:t}}var fe=/^\s$/,Pe=/^\\[\s#]$/,J=/^[ \t]$/,ke=/^\\[ \t]$/,xe=new RegExp(String.raw` | ||
`.replace(/\s+/g,""),"gsu");function ce(e,t){e=String(e);let n="",r="";for(let{0:s,groups:{backrefNum:i}}of e.matchAll(Fe)){n+=s,t=R(n,t);let{regexContext:o}=t;if(o===f.DEFAULT)if(s==="(")r+="(?:";else{if(i)throw new Error(`Invalid decimal escape "${s}" with implicit flag n; replace with named backreference`);r+=s}else r+=s}return{transformed:r,runningContext:t}}var fe=/^\s$/,Pe=/^\\[\s#]$/,J=/^[ \t]$/,ke=/^\\[ \t]$/,xe=new RegExp(String.raw` | ||
\\(?: [gk]< | ||
@@ -48,4 +48,4 @@ | [pPu]\{ | ||
| \\?. | ||
`.replace(/\s+/g,""),"gsu");function pe(e,t,n){e=String(e);let r=!1,s=!1,a=!1,o="",i="",u="",c="",p=!1,m=(l,{prefix:d=!0,postfix:A=!1}={})=>(l=(p&&d?"(?:)":"")+l+(A?"(?:)":""),p=!1,l);for(let{0:l,index:d}of e.matchAll(xe)){if(a){l===` | ||
`&&(a=!1,p=!0);continue}if(r){if(fe.test(l))continue;r=!1,p=!0}else if(s){if(J.test(l))continue;s=!1}o+=l,t=R(o,t);let{regexContext:A,charClassContext:h}=t;if(l==="-"&&A===f.CHAR_CLASS&&c===g.RANGE&&(n.flags.includes("v")||n.unicodeSetsPlugin))throw new Error("Invalid unescaped hyphen as the end value for a range");if(A===f.DEFAULT&&/^(?:[?*+]|\?\?)$/.test(l)||A===f.INTERVAL_QUANTIFIER&&l==="{")i+=m(l,{prefix:!1,postfix:u==="("&&l==="?"});else if(A===f.DEFAULT)fe.test(l)?r=!0:l.startsWith("#")?a=!0:Pe.test(l)?i+=m(l[1],{prefix:!1}):i+=m(l);else if(A===f.CHAR_CLASS&&l!=="["&&l!=="[^")if(J.test(l)&&(h===g.DEFAULT||h===g.RANGE||h===g.Q_TOKEN))s=!0;else{if(h===g.INVALID_INCOMPLETE_TOKEN)throw new Error(`Invalid incomplete token in character class: "${l}"`);if(ke.test(l)&&(h===g.DEFAULT||h===g.Q_TOKEN))i+=m(l[1],{prefix:!1});else if(h===g.DEFAULT){let T=e[d+1]??"",S=M(l);(J.test(T)||l==="^")&&(S=q(S)),i+=m(S)}else i+=m(l)}else i+=m(l);r||s||a||(u=l,c=h)}return{transformed:i,runningContext:t}}function de(e){let t=String.raw`\(\?:\)`;e=N(e,`(?:${t}){2,}`,"(?:)",E.DEFAULT);let n=I.replace(/\$/g,"\\$");return e=N(e,String.raw`(?:${t}(?=[)|.[$\\]|\((?!DEFINE)|$)|(?<=[()|.\]^>]|\\[bBdDfnrsStvwW]|\(\?(?:[:=!]|<[=!])|^)${t}(?![?*+{]))(?!${n})`,"",E.DEFAULT),e}var Ee=new RegExp(String.raw`(?<noncapturingStart>${D})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function ge(e,t){if(!/\(\?>/.test(e))return e;let n="(?>",r=`(?:(?=(${t.useEmulationGroups?I:""}`,s=[0],a=0,o=0,i=NaN,u;do{u=!1;let c=0,p=0,m=!1,l;for(Ee.lastIndex=Number.isNaN(i)?0:i+r.length;l=Ee.exec(e);){let{0:d,index:A,groups:{capturingStart:h,noncapturingStart:T}}=l;if(d==="[")c++;else if(c)d==="]"&&c--;else if(d===n&&!m)i=A,m=!0;else if(m&&T)p++;else if(h)m?p++:(a++,s.push(a+o));else if(d===")"&&m){if(!p){o++,e=`${e.slice(0,i)}${r}${e.slice(i+n.length,A)}))<$$${o+a}>)${e.slice(A+1)}`,u=!0;break}p--}}}while(u);return e=N(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:c,groups:{backrefNum:p,wrappedBackrefNum:m}})=>{if(p){let l=+p;if(l>s.length-1)throw new Error(`Backref "${c}" greater than number of captures`);return`\\${s[l]}`}return`\\${m}`},E.DEFAULT),e}var me=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,X=new RegExp(String.raw` | ||
`.replace(/\s+/g,""),"gsu");function pe(e,t,n){e=String(e);let r=!1,s=!1,i=!1,o="",a="",u="",c="",p=!1,m=(l,{prefix:d=!0,postfix:A=!1}={})=>(l=(p&&d?"(?:)":"")+l+(A?"(?:)":""),p=!1,l);for(let{0:l,index:d}of e.matchAll(xe)){if(i){l===` | ||
`&&(i=!1,p=!0);continue}if(r){if(fe.test(l))continue;r=!1,p=!0}else if(s){if(J.test(l))continue;s=!1}o+=l,t=R(o,t);let{regexContext:A,charClassContext:h}=t;if(l==="-"&&A===f.CHAR_CLASS&&c===g.RANGE&&(n.flags.includes("v")||n.unicodeSetsPlugin))throw new Error("Invalid unescaped hyphen as the end value for a range");if(A===f.DEFAULT&&/^(?:[?*+]|\?\?)$/.test(l)||A===f.INTERVAL_QUANTIFIER&&l==="{")a+=m(l,{prefix:!1,postfix:u==="("&&l==="?"});else if(A===f.DEFAULT)fe.test(l)?r=!0:l.startsWith("#")?i=!0:Pe.test(l)?a+=m(l[1],{prefix:!1}):a+=m(l);else if(A===f.CHAR_CLASS&&l!=="["&&l!=="[^")if(J.test(l)&&(h===g.DEFAULT||h===g.RANGE||h===g.Q_TOKEN))s=!0;else{if(h===g.INVALID_INCOMPLETE_TOKEN)throw new Error(`Invalid incomplete token in character class: "${l}"`);if(ke.test(l)&&(h===g.DEFAULT||h===g.Q_TOKEN))a+=m(l[1],{prefix:!1});else if(h===g.DEFAULT){let T=e[d+1]??"",S=M(l);(J.test(T)||l==="^")&&(S=q(S)),a+=m(S)}else a+=m(l)}else a+=m(l);r||s||i||(u=l,c=h)}return{transformed:a,runningContext:t}}function de(e){let t=String.raw`\(\?:\)`;e=N(e,`(?:${t}){2,}`,"(?:)",E.DEFAULT);let n=I.replace(/\$/g,"\\$");return e=N(e,String.raw`(?:${t}(?=[)|.[$\\]|\((?!DEFINE)|$)|(?<=[()|.\]^>]|\\[bBdDfnrsStvwW]|\(\?(?:[:=!]|<[=!])|^)${t}(?![?*+{]))(?!${n})`,"",E.DEFAULT),e}var Ee=new RegExp(String.raw`(?<noncapturingStart>${D})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function ge(e,t){if(!/\(\?>/.test(e))return e;let n="(?>",r=`(?:(?=(${t.useEmulationGroups?I:""}`,s=[0],i=0,o=0,a=NaN,u;do{u=!1;let c=0,p=0,m=!1,l;for(Ee.lastIndex=Number.isNaN(a)?0:a+r.length;l=Ee.exec(e);){let{0:d,index:A,groups:{capturingStart:h,noncapturingStart:T}}=l;if(d==="[")c++;else if(c)d==="]"&&c--;else if(d===n&&!m)a=A,m=!0;else if(m&&T)p++;else if(h)m?p++:(i++,s.push(i+o));else if(d===")"&&m){if(!p){o++,e=`${e.slice(0,a)}${r}${e.slice(a+n.length,A)}))<$$${o+i}>)${e.slice(A+1)}`,u=!0;break}p--}}}while(u);return e=N(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:c,groups:{backrefNum:p,wrappedBackrefNum:m}})=>{if(p){let l=+p;if(l>s.length-1)throw new Error(`Backref "${c}" greater than number of captures`);return`\\${s[l]}`}return`\\${m}`},E.DEFAULT),e}var me=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,X=new RegExp(String.raw` | ||
\\(?: \d+ | ||
@@ -65,3 +65,3 @@ | c[A-Za-z] | ||
| \\?. | ||
`.replace(/\s+/g,""),"gsu");function he(e){if(!new RegExp(`${me}\\+`).test(e))return e;let t=[],n=null,r=null,s="",a=0,o;for(X.lastIndex=0;o=X.exec(e);){let{0:i,index:u,groups:{qBase:c,qMod:p,invalidQ:m}}=o;if(i==="[")a||(r=u),a++;else if(i==="]")a?a--:r=null;else if(p==="+"&&s&&!s.startsWith("(")){if(m)throw new Error(`Invalid quantifier "${i}"`);let l=-1;if(/^\{\d+\}$/.test(c))e=F(e,u+c.length,p,"");else{if(s===")"||s==="]"){let d=s===")"?n:r;if(d===null)throw new Error(`Invalid unmatched "${s}"`);e=`${e.slice(0,d)}(?>${e.slice(d,u)}${c})${e.slice(u+i.length)}`}else e=`${e.slice(0,u-s.length)}(?>${s}${c})${e.slice(u+i.length)}`;l+=4}X.lastIndex+=l}else i[0]==="("?t.push(u):i===")"&&(n=t.length?t.pop():null);s=i}return e}function Ae(e,t){let n=we(e,{includeContents:!0}),r=Me(e,n,t.useEmulationGroups);return Ke(r,n)}var Ge=String.raw`\\g<(?<subroutineName>[^>&]+)>`,K=new RegExp(String.raw` | ||
`.replace(/\s+/g,""),"gsu");function he(e){if(!new RegExp(`${me}\\+`).test(e))return e;let t=[],n=null,r=null,s="",i=0,o;for(X.lastIndex=0;o=X.exec(e);){let{0:a,index:u,groups:{qBase:c,qMod:p,invalidQ:m}}=o;if(a==="[")i||(r=u),i++;else if(a==="]")i?i--:r=null;else if(!i)if(p==="+"&&s&&!s.startsWith("(")){if(m)throw new Error(`Invalid quantifier "${a}"`);let l=-1;if(/^\{\d+\}$/.test(c))e=F(e,u+c.length,p,"");else{if(s===")"||s==="]"){let d=s===")"?n:r;if(d===null)throw new Error(`Invalid unmatched "${s}"`);e=`${e.slice(0,d)}(?>${e.slice(d,u)}${c})${e.slice(u+a.length)}`}else e=`${e.slice(0,u-s.length)}(?>${s}${c})${e.slice(u+a.length)}`;l+=4}X.lastIndex+=l}else a[0]==="("?t.push(u):a===")"&&(n=t.length?t.pop():null);s=a}return e}function Ae(e,t){let n=we(e,{includeContents:!0}),r=Me(e,n,t.useEmulationGroups);return Ke(r,n)}var Ge=String.raw`\\g<(?<subroutineName>[^>&]+)>`,K=new RegExp(String.raw` | ||
${Ge} | ||
@@ -72,3 +72,3 @@ | (?<capturingStart>${O}) | ||
| \\?. | ||
`.replace(/\s+/g,""),"gsu");function Me(e,t,n){if(!/\\g</.test(e))return e;let r=V(e,"\\\\(?:[1-9]|k<[^>]+>)",E.DEFAULT),s=r?`(${n?I:""}`:"(?:",a=new Map,o=[],i=[0],u=0,c=0,p=0,m=0,l=0,d=e,A;for(K.lastIndex=0;A=K.exec(d);){let{0:h,index:T,groups:{subroutineName:S,capturingStart:H,backrefNum:P,backrefName:y}}=A;if(h==="[")l++;else if(l)h==="]"&&l--;else if(S){if(!t.has(S))throw new Error(`Invalid named capture referenced by subroutine ${h}`);if(a.has(S))throw new Error(`Subroutine ${h} followed a recursive reference`);let w=t.get(S).contents,L=`${s}${w})`;r&&(p=0,c++),a.set(S,{unclosedGroupCount:ye(L)}),o.push(S),d=F(d,T,h,L),K.lastIndex-=h.length-s.length}else if(H)a.size?(r&&(p++,c++),h!=="("&&(d=F(d,T,h,s),K.lastIndex-=h.length-s.length)):r&&(i.push(ee(i)+1+c-m),m=c,u++);else if((P||y)&&a.size){let w=P?+P:t.get(y)?.groupNum,L=!1;for(let C of o){let _=t.get(C);if(w>=_.groupNum&&w<=_.groupNum+_.numCaptures){L=!0;break}}if(L){let C=t.get(ee(o)),_=u+c-p,k=`\\k<$$b${w}s${_}r${C.groupNum}c${C.numCaptures}>`;d=F(d,T,h,k),K.lastIndex+=k.length-h.length}}else if(h===")"&&a.size){let w=a.get(ee(o));w.unclosedGroupCount--,w.unclosedGroupCount||a.delete(o.pop())}}return r&&(d=N(d,String.raw`\\(?:(?<bNum>[1-9]\d*)|k<\$\$b(?<bNumSub>\d+)s(?<subNum>\d+)r(?<refNum>\d+)c(?<refCaps>\d+)>)`,({0:h,groups:{bNum:T,bNumSub:S,subNum:H,refNum:P,refCaps:y}})=>{if(T){let k=+T;if(k>i.length-1)throw new Error(`Backref "${h}" greater than number of captures`);return`\\${i[k]}`}let w=+S,L=+H,C=+P,_=+y;return w<C||w>C+_?`\\${i[w]}`:`\\${L-C+w}`},E.DEFAULT)),d}var Y=new RegExp(String.raw`${j}|\(\?:\)|(?<invalid>\\?.)`,"gsu");function Ke(e,t){let n=v(e,String.raw`\(\?\(DEFINE\)`,0,E.DEFAULT);if(!n)return e;let r=Ne(e,n);if(r.afterPos<e.length)throw new Error("DEFINE group allowed only at the end of a regex");if(r.afterPos>e.length)throw new Error("DEFINE group is unclosed");let s;for(Y.lastIndex=0;s=Y.exec(r.contents);){let{captureName:a,invalid:o}=s.groups;if(a){let i=Ne(r.contents,s),u;if(!t.get(a).isUnique)u=a;else{let c=we(i.contents);for(let p of c.keys())if(!t.get(p).isUnique){u=p;break}}if(u)throw new Error(`Duplicate group name "${u}" within DEFINE`);Y.lastIndex=i.afterPos}else if(o)throw new Error("DEFINE group includes unsupported syntax at top level")}return e.slice(0,n.index)}function ye(e){let t=0;return x(e,"\\(",()=>t++,E.DEFAULT),t}function ve(e,t){let n=0,r=0,s;for(;s=v(e,O,r,E.DEFAULT);){let{0:a,index:o,groups:{captureName:i}}=s;if(n++,i===t)break;r=o+a.length}return n}function Ne(e,t){let n=t.index+t[0].length,r=W(e,n),s=n+r.length+1;return{contents:r,afterPos:s}}function we(e,{includeContents:t}={}){let n=new Map;return x(e,j,({0:r,index:s,groups:{captureName:a}})=>{if(n.has(a))n.get(a).isUnique=!1;else{let o={isUnique:!0};if(t){let i=W(e,s+r.length);Object.assign(o,{contents:i,groupNum:ve(e,a),numCaptures:U(i)})}n.set(a,o)}},E.DEFAULT),n}function ee(e){return e[e.length-1]}var Ve="&!#%,:;<=>@`~",Qe=new RegExp(String.raw` | ||
`.replace(/\s+/g,""),"gsu");function Me(e,t,n){if(!/\\g</.test(e))return e;let r=V(e,"\\\\(?:[1-9]|k<[^>]+>)",E.DEFAULT),s=r?`(${n?I:""}`:"(?:",i=new Map,o=[],a=[0],u=0,c=0,p=0,m=0,l=0,d=e,A;for(K.lastIndex=0;A=K.exec(d);){let{0:h,index:T,groups:{subroutineName:S,capturingStart:H,backrefNum:P,backrefName:y}}=A;if(h==="[")l++;else if(l)h==="]"&&l--;else if(S){if(!t.has(S))throw new Error(`Invalid named capture referenced by subroutine ${h}`);if(i.has(S))throw new Error(`Subroutine ${h} followed a recursive reference`);let w=t.get(S).contents,L=`${s}${w})`;r&&(p=0,c++),i.set(S,{unclosedGroupCount:ye(L)}),o.push(S),d=F(d,T,h,L),K.lastIndex-=h.length-s.length}else if(H)i.size?(r&&(p++,c++),h!=="("&&(d=F(d,T,h,s),K.lastIndex-=h.length-s.length)):r&&(a.push(ee(a)+1+c-m),m=c,u++);else if((P||y)&&i.size){let w=P?+P:t.get(y)?.groupNum,L=!1;for(let C of o){let _=t.get(C);if(w>=_.groupNum&&w<=_.groupNum+_.numCaptures){L=!0;break}}if(L){let C=t.get(ee(o)),_=u+c-p,k=`\\k<$$b${w}s${_}r${C.groupNum}c${C.numCaptures}>`;d=F(d,T,h,k),K.lastIndex+=k.length-h.length}}else if(h===")"&&i.size){let w=i.get(ee(o));w.unclosedGroupCount--,w.unclosedGroupCount||i.delete(o.pop())}}return r&&(d=N(d,String.raw`\\(?:(?<bNum>[1-9]\d*)|k<\$\$b(?<bNumSub>\d+)s(?<subNum>\d+)r(?<refNum>\d+)c(?<refCaps>\d+)>)`,({0:h,groups:{bNum:T,bNumSub:S,subNum:H,refNum:P,refCaps:y}})=>{if(T){let k=+T;if(k>a.length-1)throw new Error(`Backref "${h}" greater than number of captures`);return`\\${a[k]}`}let w=+S,L=+H,C=+P,_=+y;return w<C||w>C+_?`\\${a[w]}`:`\\${L-C+w}`},E.DEFAULT)),d}var Y=new RegExp(String.raw`${j}|\(\?:\)|(?<invalid>\\?.)`,"gsu");function Ke(e,t){let n=v(e,String.raw`\(\?\(DEFINE\)`,0,E.DEFAULT);if(!n)return e;let r=Ne(e,n);if(r.afterPos<e.length)throw new Error("DEFINE group allowed only at the end of a regex");if(r.afterPos>e.length)throw new Error("DEFINE group is unclosed");let s;for(Y.lastIndex=0;s=Y.exec(r.contents);){let{captureName:i,invalid:o}=s.groups;if(i){let a=Ne(r.contents,s),u;if(!t.get(i).isUnique)u=i;else{let c=we(a.contents);for(let p of c.keys())if(!t.get(p).isUnique){u=p;break}}if(u)throw new Error(`Duplicate group name "${u}" within DEFINE`);Y.lastIndex=a.afterPos}else if(o)throw new Error("DEFINE group includes unsupported syntax at top level")}return e.slice(0,n.index)}function ye(e){let t=0;return x(e,"\\(",()=>t++,E.DEFAULT),t}function ve(e,t){let n=0,r=0,s;for(;s=v(e,O,r,E.DEFAULT);){let{0:i,index:o,groups:{captureName:a}}=s;if(n++,a===t)break;r=o+i.length}return n}function Ne(e,t){let n=t.index+t[0].length,r=W(e,n),s=n+r.length+1;return{contents:r,afterPos:s}}function we(e,{includeContents:t}={}){let n=new Map;return x(e,j,({0:r,index:s,groups:{captureName:i}})=>{if(n.has(i))n.get(i).isUnique=!1;else{let o={isUnique:!0};if(t){let a=W(e,s+r.length);Object.assign(o,{contents:a,groupNum:ve(e,i),numCaptures:U(a)})}n.set(i,o)}},E.DEFAULT),n}function ee(e){return e[e.length-1]}var Ve="&!#%,:;<=>@`~",Qe=new RegExp(String.raw` | ||
\[\^?-? | ||
@@ -81,3 +81,3 @@ | --?\] | ||
| \\?. | ||
`.replace(/\s+/g,""),"gsu");function Se(e){let t='Invalid unescaped "-" in character class',n=!1,r="";for(let{0:s,groups:{dp:a,vOnlyEscape:o}}of e.matchAll(Qe)){if(s[0]==="["){if(n)throw new Error("Invalid nested character class when flag v not supported; possibly from interpolation");if(s.endsWith("-"))throw new Error(t);n=!0}else if(s.endsWith("]")){if(s[0]==="-")throw new Error(t);n=!1}else if(n){if(s==="&&"||s==="--")throw new Error(`Invalid set operator "${s}" when flag v not supported`);if(a)throw new Error(`Invalid double punctuator "${s}", reserved by flag v`);if("(){}/|".includes(s))throw new Error(`Invalid unescaped "${s}" in character class`);if(o){r+=o;continue}}r+=s}return r}var je=(e,...t)=>{if(Array.isArray(e?.raw))return te({},e,...t);if((typeof e=="string"||e===void 0)&&!t.length)return te.bind(null,{flags:e??""});if({}.toString.call(e)==="[object Object]"&&!t.length)return te.bind(null,e);throw new Error(`Unexpected arguments: ${JSON.stringify([e,...t])}`)},te=(e,t,...n)=>{let r=Te(e),s=$e(t,n,r),a=0,o="",i;if(s.template.raw.forEach((u,c)=>{let p=!!(s.template.raw[c]||s.template.raw[c+1]);a+=U(u),o+=M(u,E.CHAR_CLASS),i=R(o,i);let{regexContext:m,charClassContext:l}=i;if(c<s.template.raw.length-1){let d=s.substitutions[c];o+=He(d,r.flags,m,l,p,a),d instanceof RegExp?a+=U(d.source):d instanceof $&&(a+=U(String(d)))}}),o=Ie(o,r),r.subclass){let u=We(o);return new ne(u.expression,r.flags,{captureMap:u.captureMap})}return new RegExp(o,r.flags)};function qe(e="",t={}){let n=Te(t);if(n.subclass)throw new Error("Cannot use option subclass");return{expression:Ie($e({raw:[e]},[],n).template.raw[0],n),flags:n.flags}}function Te(e){let t={flags:"",subclass:!1,plugins:[],unicodeSetsPlugin:Se,disable:{},force:{},...e};if(/[nuvx]/.test(t.flags))throw new Error("Implicit flags v/u/x/n cannot be explicitly added");let n=t.force.v||(t.disable.v?!1:oe);return t.flags+=n?"v":"u",n&&(t.unicodeSetsPlugin=null),t}function $e(e,t,n){let r=[];n.disable.x||r.push(pe),n.disable.n||r.push(ce);for(let s of r)({template:e,substitutions:t}=le(e,t,s,n));return{template:e,substitutions:t}}function Ie(e,t){let{flags:n,plugins:r,unicodeSetsPlugin:s,disable:a,subclass:o}=t;return[...r,...a.subroutines?[]:[Ae],...a.atomic?[]:[he,ge],...a.x?[]:[de],...s?[s]:[]].forEach(i=>e=i(e,{flags:n,useEmulationGroups:o})),e}var ne=class e extends RegExp{#e;constructor(t,n,r){super(t,n),r?this.#e=r.captureMap:t instanceof e&&(this.#e=t.#e)}exec(t){let n=RegExp.prototype.exec.call(this,t);if(!n||!this.#e)return n;let r=[...n];n.length=1;for(let s=1;s<r.length;s++)this.#e[s]&&n.push(r[s]);return n}};function He(e,t,n,r,s,a){if(e instanceof RegExp&&n!==f.DEFAULT)throw new Error("Cannot interpolate a RegExp at this position because the syntax context does not match");if(n===f.INVALID_INCOMPLETE_TOKEN||r===g.INVALID_INCOMPLETE_TOKEN)throw new Error("Interpolation preceded by invalid incomplete token");let o=e instanceof $,i="";if(!(e instanceof RegExp)){e=String(e),o||(i=z(e,n===f.CHAR_CLASS?E.CHAR_CLASS:E.DEFAULT));let u=ae(i||e,n,r);if(u)throw new Error(`Unescaped stray "${u}" in the interpolated value would have side effects outside it`)}if(n===f.ENCLOSED_TOKEN||n===f.INTERVAL_QUANTIFIER||n===f.GROUP_NAME||r===g.ENCLOSED_TOKEN||r===g.Q_TOKEN)return o?String(e):i;if(n===f.CHAR_CLASS){if(o){if(V(String(e),"^-|^&&|-$|&&$"))throw new Error("Cannot use range or set operator at boundary of interpolated pattern; move the operation into the pattern or the operator outside of it");let u=ie(q(e));return Z(e)?`[${u}]`:M(u)}return Z(i)?`[${i}]`:i}if(e instanceof RegExp){let u=Be(e,t),c=ue(u.value,a);return u.usedModifier?c:`(?:${c})`}return o?`(?:${e})`:s?`(?:${i})`:i}function Be(e,t){let n={i:null,m:null,s:null},r="\\n\\r\\u2028\\u2029",s=e.source;if(e.ignoreCase!==t.includes("i"))if(G)n.i=e.ignoreCase;else throw new Error("Pattern modifiers not supported, so flag i on the outer and interpolated regex must match");if(e.dotAll!==t.includes("s")&&(G?n.s=e.dotAll:s=N(s,"\\.",e.dotAll?"[^]":`[^${r}]`,E.DEFAULT)),e.multiline!==t.includes("m")&&(G?n.m=e.multiline:(s=N(s,"\\^",e.multiline?`(?<=^|[${r}])`:"(?<![^])",E.DEFAULT),s=N(s,"\\$",e.multiline?`(?=$|[${r}])`:"(?![^])",E.DEFAULT))),G){let a=Object.keys(n),o=a.filter(u=>n[u]===!0).join(""),i=a.filter(u=>n[u]===!1).join("");if(i&&(o+=`-${i}`),o)return{value:`(?${o}:${s})`,usedModifier:!0}}return{value:s}}function We(e){let t=I.replace(/\$/g,"\\$"),n=[!0];return e=N(e,`(?:${O})(?<mark>${t})?`,({0:r,groups:{mark:s}})=>s?(n.push(!1),r.slice(0,-I.length)):(n.push(!0),r),E.DEFAULT),{captureMap:n,expression:e}}return De(ze);})(); | ||
`.replace(/\s+/g,""),"gsu");function Se(e){let t='Invalid unescaped "-" in character class',n=!1,r="";for(let{0:s,groups:{dp:i,vOnlyEscape:o}}of e.matchAll(Qe)){if(s[0]==="["){if(n)throw new Error("Invalid nested character class when flag v not supported; possibly from interpolation");if(s.endsWith("-"))throw new Error(t);n=!0}else if(s.endsWith("]")){if(s[0]==="-")throw new Error(t);n=!1}else if(n){if(s==="&&"||s==="--")throw new Error(`Invalid set operator "${s}" when flag v not supported`);if(i)throw new Error(`Invalid double punctuator "${s}", reserved by flag v`);if("(){}/|".includes(s))throw new Error(`Invalid unescaped "${s}" in character class`);if(o){r+=o;continue}}r+=s}return r}var je=(e,...t)=>{if(Array.isArray(e?.raw))return te({},e,...t);if((typeof e=="string"||e===void 0)&&!t.length)return te.bind(null,{flags:e??""});if({}.toString.call(e)==="[object Object]"&&!t.length)return te.bind(null,e);throw new Error(`Unexpected arguments: ${JSON.stringify([e,...t])}`)},te=(e,t,...n)=>{let r=Te(e),s=$e(t,n,r),i=0,o="",a;if(s.template.raw.forEach((u,c)=>{let p=!!(s.template.raw[c]||s.template.raw[c+1]);i+=U(u),o+=M(u,E.CHAR_CLASS),a=R(o,a);let{regexContext:m,charClassContext:l}=a;if(c<s.template.raw.length-1){let d=s.substitutions[c];o+=He(d,r.flags,m,l,p,i),d instanceof RegExp?i+=U(d.source):d instanceof $&&(i+=U(String(d)))}}),o=Ie(o,r),r.subclass){let u=We(o);return new ne(u.expression,r.flags,{captureMap:u.captureMap})}return new RegExp(o,r.flags)};function qe(e="",t={}){let n=Te(t);if(n.subclass)throw new Error("Cannot use option subclass");return{expression:Ie($e({raw:[e]},[],n).template.raw[0],n),flags:n.flags}}function Te(e){let t={flags:"",subclass:!1,plugins:[],unicodeSetsPlugin:Se,disable:{},force:{},...e};if(/[nuvx]/.test(t.flags))throw new Error("Implicit flags v/u/x/n cannot be explicitly added");let n=t.force.v||(t.disable.v?!1:oe);return t.flags+=n?"v":"u",n&&(t.unicodeSetsPlugin=null),t}function $e(e,t,n){let r=[];n.disable.x||r.push(pe),n.disable.n||r.push(ce);for(let s of r)({template:e,substitutions:t}=le(e,t,s,n));return{template:e,substitutions:t}}function Ie(e,t){let{flags:n,plugins:r,unicodeSetsPlugin:s,disable:i,subclass:o}=t;return[...r,...i.subroutines?[]:[Ae],...i.atomic?[]:[he,ge],...i.x?[]:[de],...s?[s]:[]].forEach(a=>e=a(e,{flags:n,useEmulationGroups:o})),e}var ne=class e extends RegExp{#e;constructor(t,n,r){super(t,n),r?this.#e=r.captureMap:t instanceof e&&(this.#e=t.#e)}exec(t){let n=RegExp.prototype.exec.call(this,t);if(!n||!this.#e)return n;let r=[...n];n.length=1;for(let s=1;s<r.length;s++)this.#e[s]&&n.push(r[s]);return n}};function He(e,t,n,r,s,i){if(e instanceof RegExp&&n!==f.DEFAULT)throw new Error("Cannot interpolate a RegExp at this position because the syntax context does not match");if(n===f.INVALID_INCOMPLETE_TOKEN||r===g.INVALID_INCOMPLETE_TOKEN)throw new Error("Interpolation preceded by invalid incomplete token");let o=e instanceof $,a="";if(!(e instanceof RegExp)){e=String(e),o||(a=z(e,n===f.CHAR_CLASS?E.CHAR_CLASS:E.DEFAULT));let u=ae(a||e,n,r);if(u)throw new Error(`Unescaped stray "${u}" in the interpolated value would have side effects outside it`)}if(n===f.ENCLOSED_TOKEN||n===f.INTERVAL_QUANTIFIER||n===f.GROUP_NAME||r===g.ENCLOSED_TOKEN||r===g.Q_TOKEN)return o?String(e):a;if(n===f.CHAR_CLASS){if(o){if(V(String(e),"^-|^&&|-$|&&$"))throw new Error("Cannot use range or set operator at boundary of interpolated pattern; move the operation into the pattern or the operator outside of it");let u=ie(q(e));return Z(e)?`[${u}]`:M(u)}return Z(a)?`[${a}]`:a}if(e instanceof RegExp){let u=Be(e,t),c=ue(u.value,i);return u.usedModifier?c:`(?:${c})`}return o?`(?:${e})`:s?`(?:${a})`:a}function Be(e,t){let n={i:null,m:null,s:null},r="\\n\\r\\u2028\\u2029",s=e.source;if(e.ignoreCase!==t.includes("i"))if(G)n.i=e.ignoreCase;else throw new Error("Pattern modifiers not supported, so flag i on the outer and interpolated regex must match");if(e.dotAll!==t.includes("s")&&(G?n.s=e.dotAll:s=N(s,"\\.",e.dotAll?"[^]":`[^${r}]`,E.DEFAULT)),e.multiline!==t.includes("m")&&(G?n.m=e.multiline:(s=N(s,"\\^",e.multiline?`(?<=^|[${r}])`:"(?<![^])",E.DEFAULT),s=N(s,"\\$",e.multiline?`(?=$|[${r}])`:"(?![^])",E.DEFAULT))),G){let i=Object.keys(n),o=i.filter(u=>n[u]===!0).join(""),a=i.filter(u=>n[u]===!1).join("");if(a&&(o+=`-${a}`),o)return{value:`(?${o}:${s})`,usedModifier:!0}}return{value:s}}function We(e){let t=I.replace(/\$/g,"\\$"),n=[!0];return e=N(e,`(?:${O})(?<mark>${t})?`,({0:r,groups:{mark:s}})=>s?(n.push(!1),r.slice(0,-I.length)):(n.push(!0),r),E.DEFAULT),{captureMap:n,expression:e}}return De(ze);})(); | ||
//# sourceMappingURL=regex.min.js.map |
{ | ||
"name": "regex", | ||
"version": "4.3.1", | ||
"version": "4.3.2", | ||
"description": "Regex template tag with extended syntax, context-aware interpolation, and always-on best practices", | ||
@@ -43,3 +43,3 @@ "author": "Steven Levithan", | ||
"expect-type": "^0.20.0", | ||
"jasmine": "^5.2.0", | ||
"jasmine": "^5.3.0", | ||
"regex-utilities": "^2.3.0", | ||
@@ -46,0 +46,0 @@ "typescript": "^5.5.4" |
@@ -121,3 +121,3 @@ <div align="center"> | ||
<script type="module"> | ||
import {regex, pattern} from 'https://cdn.jsdelivr.net/npm/regex@4.3.1/+esm'; | ||
import {regex, pattern} from 'https://cdn.jsdelivr.net/npm/regex@4.3.2/+esm'; | ||
// … | ||
@@ -131,3 +131,3 @@ </script> | ||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/regex@4.3.1/dist/regex.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/regex@4.3.2/dist/regex.min.js"></script> | ||
<script> | ||
@@ -134,0 +134,0 @@ const {regex, pattern} = Regex; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
447581