PageSourceSearch

https://celinaedc.com/vendor/statamic/frontend/js/helpers.js

js celinaedc.com collected 2026-10-02 20:55:23 UTC 79,306 bytes, 47 lines download raw bytes

1(function(r){typeof define=="function"&&define.amd?define(r):r()})(function(){"use strict";var pt=Object.defineProperty;var ft=(r,e,t)=>e in r?pt(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var je=(r,e,t)=>(ft(r,typeof e!="symbol"?e+"":e,t),t);const KEYS=["if","if_any","show_when","show_when_any","unless","unless_any","hide_when","hide_when_any"],OPERATORS=["equals","not","contains","contains_any","===","!==",">",">=","<","<=","custom"],ALIASES={is:"equals","==":"equals",isnt:"not","!=":"not",includes:"contains",includes_any:"contains_any"};var VERSION="1.13.6",root=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||Function("return this")()||{},ArrayProto=Array.prototype,ObjProto=Object.prototype,push=ArrayProto.push,slice=ArrayProto.slice,toString=ObjProto.toString,hasOwnProperty=ObjProto.hasOwnProperty,nativeIsArray=Array.isArray,nativeKeys=Object.keys,_isNaN=isNaN,hasEnumBug=!{toString:null}.propertyIsEnumerable("toString"),nonEnumerableProps=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],MAX_ARRAY_INDEX=Math.pow(2,53)-1;function _(r){if(r instanceof _)return r;if(!(this instanceof _))return new _(r);this._wrapped=r}_.VERSION=VERSION,_.prototype.value=function(){return this._wrapped},_.prototype.valueOf=_.prototype.toJSON=_.prototype.value,_.prototype.toString=function(){return String(this._wrapped)};function identity(r){return r}function tagTester(r){var e="[object "+r+"]";return function(t){return toString.call(t)===e}}var isFunction=tagTester("Function"),nodelist=root.document&&root.document.childNodes;typeof/./!="function"&&typeof Int8Array!="object"&&typeof nodelist!="function"&&(isFunction=function(r){return typeof r=="function"||!1});const isFunction$1=isFunction;function isObject(r){var e=typeof r;return e==="function"||e==="object"&&!!r}const isArray=nativeIsArray||tagTester("Array");function createAssigner(r,e){return function(t){var n=arguments.length;if(e&&(t=Object(t)),n<2||t==null)return t;for(var s=1;s<n;s++)for(var o=arguments[s],l=r(o),c=l.length,p=0;p<c;p++){var g=l[p];(!e||t[g]===void 0)&&(t[g]=o[g])}return t}}function has(r,e){return r!=null&&hasOwnProperty.call(r,e)}function emulatedSet(r){for(var e={},t=r.length,n=0;n<t;++n)e[r[n]]=!0;return{contains:function(s){return e[s]===!0},push:function(s){return e[s]=!0,r.push(s)}}}function collectNonEnumProps(r,e){e=emulatedSet(e);var t=nonEnumerableProps.length,n=r.constructor,s=isFunction$1(n)&&n.prototype||ObjProto,o="constructor";for(has(r,o)&&!e.contains(o)&&e.push(o);t--;)o=nonEnumerableProps[t],o in r&&r[o]!==s[o]&&!e.contains(o)&&e.push(o)}function keys(r){if(!isObject(r))return[];if(nativeKeys)return nativeKeys(r);var e=[];for(var t in r)has(r,t)&&e.push(t);return hasEnumBug&&collectNonEnumProps(r,e),e}const extendOwn=createAssigner(keys);function isMatch(r,e){var t=keys(e),n=t.length;if(r==null)return!n;for(var s=Object(r),o=0;o<n;o++){var l=t[o];if(e[l]!==s[l]||!(l in s))return!1}return!0}function matcher(r){return r=extendOwn({},r),function(e){return isMatch(e,r)}}function deepGet(r,e){for(var t=e.length,n=0;n<t;n++){if(r==null)return;r=r[e[n]]}return t?r:void 0}function toPath$1(r){return isArray(r)?r:[r]}_.toPath=toPath$1;function toPath(r){return _.toPath(r)}function property(r){return r=toPath(r),function(e){return deepGet(e,r)}}function optimizeCb(r,e,t){if(e===void 0)return r;switch(t??3){case 1:return function(n){return r.call(e,n)};case 3:return function(n,s,o){return r.call(e,n,s,o)};case 4:return function(n,s,o,l){return r.call(e,n,s,o,l)}}return function(){return r.apply(e,arguments)}}function baseIteratee(r,e,t){return r==null?identity:isFunction$1(r)?optimizeCb(r,e,t):isObject(r)&&!isArray(r)?matcher(r):property(r)}function iteratee(r,e){return baseIteratee(r,e,1/0)}_.iteratee=iteratee;function cb(r,e,t){return _.iteratee!==iteratee?_.iteratee(r,e):baseIteratee(r,e,t)}function createSizePropertyCheck(r){return function(e){var t=r(e);return typeof t=="number"&&t>=0&&t<=MAX_ARRAY_INDEX}}function shallowProperty(r){return function(e){return e==null?void 0:e[r]}}const getLength=shallowProperty("length"),isArrayLike=createSizePropertyCheck(getLength);function map(r,e,t){e=cb(e,t);for(var n=!isArrayLike(r)&&keys(r),s=(n||r).length,o=Array(s),l=0;l<s;l++){var c=n?n[l]:l;o[l]=e(r[c],c,r)}return o}function each(r,e,t){e=optimizeCb(e,t);var n,s;if(isArrayLike(r))for(n=0,s=r.length;n<s;n++)e(r[n],n,r);else{var o=keys(r);for(n=0,s=o.length;n<s;n++)e(r[o[n]],o[n],r)}return r}function filter(r,e,t){var n=[];return e=cb(e,t),each(r,function(s,o,l){e(s,o,l)&&n.push(s)}),n}function chain(r){var e=_(r);return e._chain=!0,e}function functions(r){var e=[];for(var t in r)isFunction$1(r[t])&&e.push(t);return e.sort()}function chainResult(r,e){return r._chain?_(e).chain():e}function mixin(r){return each(functions(r),function(e){var t=_[e]=r[e];_.prototype[e]=function(){var n=[this._wrapped];return push.apply(n,arguments),chainResult(this,t.apply(_,n))}}),_}mixin({chain,filter,each});class Converter{fromBlueprint(e,t=null){return map(e,(n,s)=>this.splitRhs(s,n,t))}toBlueprint(e){let t={};return each(e,n=>{t[n.field]=this.combineRhs(n)}),t}splitRhs(e,t,n=null){return{field:this.getScopedFieldHandle(e,n),operator:this.getOperatorFromR
1hs(t),value:this.getValueFromRhs(t)}}getScopedFieldHandle(e,t){return e.startsWith("$root.")||e.startsWith("root.")||e.startsWith("$parent.")?e:t?t+e:e}getOperatorFromRhs(e){let t="==";return chain(this.getOperatorsAndAliases()).filter(n=>new RegExp(`^${n} [^=]`).test(this.normalizeConditionString(e))).each(n=>t=n),this.normalizeOperator(t)}normalizeOperator(e){return ALIASES[e]?ALIASES[e]:e}getValueFromRhs(e){let t=this.normalizeConditionString(e);return chain(this.getOperatorsAndAliases()).filter(n=>new RegExp(`^${n} [^=]`).test(t)).each(n=>t=t.replace(new RegExp(`^${n}[ ]*`),"")),t}combineRhs(e){let t=e.operator?e.operator.trim():"",n=e.value.trim();return`${t} ${n}`.trim()}getOperatorsAndAliases(){return OPERATORS.concat(Object.keys(ALIASES))}normalizeConditionString(e){return e===null?"null":e===""?"empty":e.toString()}}class ParentResolver{constructor(e){this.currentFieldPath=e}resolve(e){let t=this.getParentFieldPath(this.currentFieldPath,!0),n=this.removeOneParentKeyword(e);for(;n.startsWith("$parent.");)t=this.getParentFieldPath(t),n=this.removeOneParentKeyword(n);return`$root.${t?`${t}.${n}`:n}`}getParentFieldPath(e,t){const n=new RegExp("(.*?[^\\.]+)(\\.[0-9]+)*\\.[^\\.]*$");return(t||this.isAtSetLevel(e))&&(e=e.replace(n,"$1")),e.includes(".")?e.replace(n,"$1$2"):""}isAtSetLevel(e){return e.match(new RegExp("(\\.[0-9]+)$"))}removeOneParentKeyword(e){return e.replace(new RegExp("^\\$parent."),"")}}function getDefaults(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let defaults=getDefaults();function changeDefaults(r){defaults=r}const escapeTest=/[&<>"']/,escapeReplace=new RegExp(escapeTest.source,"g"),escapeTestNoEncode=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode=new RegExp(escapeTestNoEncode.source,"g"),escapeReplacements={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},getEscapeReplacement=r=>escapeReplacements[r];function escape(r,e){if(e){if(escapeTest.test(r))return r.replace(escapeReplace,getEscapeReplacement)}else if(escapeTestNoEncode.test(r))return r.replace(escapeReplaceNoEncode,getEscapeReplacement);return r}const unescapeTest=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function unescape(r){return r.replace(unescapeTest,(e,t)=>(t=t.toLowerCase(),t==="colon"?":":t.charAt(0)==="#"?t.charAt(1)==="x"?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const caret=/(^|[^\[])\^/g;function edit(r,e){r=typeof r=="string"?r:r.source,e=e||"";const t={replace:(n,s)=>(s=s.source||s,s=s.replace(caret,"$1"),r=r.replace(n,s),t),getRegex:()=>new RegExp(r,e)};return t}const nonWordAndColonTest=/[^\w:]/g,originIndependentUrl=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function cleanUrl(r,e,t){if(r){let n;try{n=decodeURIComponent(unescape(t)).replace(nonWordAndColonTest,"").toLowerCase()}catch{return null}if(n.indexOf("javascript:")===0||n.indexOf("vbscript:")===0||n.indexOf("data:")===0)return null}e&&!originIndependentUrl.test(t)&&(t=resolveUrl(e,t));try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const baseUrls={},justDomain=/^[^:]+:\/*[^/]*$/,protocol=/^([^:]+:)[\s\S]*$/,domain=/^([^:]+:\/*[^/]*)[\s\S]*$/;function resolveUrl(r,e){baseUrls[" "+r]||(justDomain.test(r)?baseUrls[" "+r]=r+"/":baseUrls[" "+r]=rtrim(r,"/",!0)),r=baseUrls[" "+r];const t=r.indexOf(":")===-1;return e.substring(0,2)==="//"?t?e:r.replace(protocol,"$1")+e:e.charAt(0)==="/"?t?e:r.replace(domain,"$1")+e:r+e}const noopTest={exec:function(){}};function splitCells(r,e){const t=r.replace(/\|/g,(o,l,c)=>{let p=!1,g=l;for(;--g>=0&&c[g]==="\\";)p=!p;return p?"|":" |"}),n=t.split(/ \|/);let s=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;s<n.length;s++)n[s]=n[s].trim().replace(/\\\|/g,"|");return n}function rtrim(r,e,t){const n=r.length;if(n===0)return"";let s=0;for(;s<n;){const o=r.charAt(n-s-1);if(o===e&&!t)s++;else if(o!==e&&t)s++;else break}return r.slice(0,n-s)}function findClosingBracket(r,e){if(r.indexOf(e[1])===-1)return-1;const t=r.length;let n=0,s=0;for(;s<t;s++)if(r[s]==="\\")s++;else if(r[s]===e[0])n++;else if(r[s]===e[1]&&(n--,n<0))return s;return-1}function checkSanitizeDeprecation(r){r&&r.sanitize&&!r.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function repeatString(r,e){if(e<1)return"";let t="";for(;e>1;)e&1&&(t+=r),e>>=1,r+=r;return t+r}function outputLink(r,e,t,n){const s=e.href,o=e.title?escape(e.title):null,l=r[1].replace(/\\([\[\]])/g,"$1");if(r[0].charAt(0)!=="!"){n.state.inLink=!0;const c={type:"link",raw:t,href:s,title:o,text:l,tokens:n.inlineTokens(l)};return n.state.inLink=!1,c}return{type:"image",raw:t,href:s,title:o,text:escape(l)}}function indentCodeCompensation(r,e){const t=r.match(/^(\s+)(?:```)/);if(t===null)return e;const n=t[1];return e.split(`
2`).map(s=>{const o=s.match(/^\s+/);if(o===null)return s;const[l]=o;return l.length>=n.length?s.slice(n.length):s}
vendor: 8,379 bytes, lines 2-13
2).join(`
3`)}class Tokenizer{constructor(e){this.options=e||defaults}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:rtrim(n,`
4`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const n=t[0],s=indentCodeCompensation(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:s}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(/#$/.test(n)){const s=rtrim(n,"#");(this.options.pedantic||!s||/ $/.test(s))&&(n=s.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const n=t[0].replace(/^ *>[ \t]?/gm,""),s=this.lexer.state.top;this.lexer.state.top=!0;const o=this.lexer.blockTokens(n);return this.lexer.state.top=s,{type:"blockquote",raw:t[0],tokens:o,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n,s,o,l,c,p,g,m,k,T,h,P,M=t[1].trim();const $=M.length>1,b={type:"list",raw:"",ordered:$,start:$?+M.slice(0,-1):"",loose:!1,items:[]};M=$?`\\d{1,9}\\${M.slice(-1)}`:`\\${M}`,this.options.pedantic&&(M=$?M:"[*+-]");const S=new RegExp(`^( {0,3}${M})((?:[	 ][^\\n]*)?(?:\\n|$))`);for(;e&&(P=!1,!(!(t=S.exec(e))||this.rules.block.hr.test(e)));){if(n=t[0],e=e.substring(n.length),m=t[2].split(`
5`,1)[0].replace(/^\t+/,y=>" ".repeat(3*y.length)),k=e.split(`
6`,1)[0],this.options.pedantic?(l=2,h=m.trimLeft()):(l=t[2].search(/[^ ]/),l=l>4?1:l,h=m.slice(l),l+=t[1].length),p=!1,!m&&/^ *$/.test(k)&&(n+=k+`
7`,e=e.substring(k.length+1),P=!0),!P){const y=new RegExp(`^ {0,${Math.min(3,l-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ 	][^\\n]*)?(?:\\n|$))`),v=new RegExp(`^ {0,${Math.min(3,l-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),N=new RegExp(`^ {0,${Math.min(3,l-1)}}(?:\`\`\`|~~~)`),G=new RegExp(`^ {0,${Math.min(3,l-1)}}#`);for(;e&&(T=e.split(`
8`,1)[0],k=T,this.options.pedantic&&(k=k.replace(/^ {1,4}(?=( {4})*[^ ])/g,"  ")),!(N.test(k)||G.test(k)||y.test(k)||v.test(e)));){if(k.search(/[^ ]/)>=l||!k.trim())h+=`
9`+k.slice(l);else{if(p||m.search(/[^ ]/)>=4||N.test(m)||G.test(m)||v.test(m))break;h+=`
10`+k}!p&&!k.trim()&&(p=!0),n+=T+`
11`,e=e.substring(T.length+1),m=k.slice(l)}}b.loose||(g?b.loose=!0:/\n *\n *$/.test(n)&&(g=!0)),this.options.gfm&&(s=/^\[[ xX]\] /.exec(h),s&&(o=s[0]!=="[ ] ",h=h.replace(/^\[[ xX]\] +/,""))),b.items.push({type:"list_item",raw:n,task:!!s,checked:o,loose:!1,text:h}),b.raw+=n}b.items[b.items.length-1].raw=n.trimRight(),b.items[b.items.length-1].text=h.trimRight(),b.raw=b.raw.trimRight();const z=b.items.length;for(c=0;c<z;c++)if(this.lexer.state.top=!1,b.items[c].tokens=this.lexer.blockTokens(b.items[c].text,[]),!b.loose){const y=b.items[c].tokens.filter(N=>N.type==="space"),v=y.length>0&&y.some(N=>/\n.*\n/.test(N.raw));b.loose=v}if(b.loose)for(c=0;c<z;c++)b.items[c].loose=!0;return b}}html(e){const t=this.rules.block.html.exec(e);if(t){const n={type:"html",raw:t[0],pre:!this.options.sanitizer&&(t[1]==="pre"||t[1]==="script"||t[1]==="style"),text:t[0]};if(this.options.sanitize){const s=this.options.sanitizer?this.options.sanitizer(t[0]):escape(t[0]);n.type="paragraph",n.text=s,n.tokens=this.lexer.inline(s)}return n}}def(e){const t=this.rules.block.def.exec(e);if(t){const n=t[1].toLowerCase().replace(/\s+/g," "),s=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",o=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline._escapes,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:s,title:o}}}table(e){const t=this.rules.block.table.exec(e);if(t){const n={type:"table",header:splitCells(t[1]).map(s=>({text:s})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split(`
12`):[]};if(n.header.length===n.align.length){n.raw=t[0];let s=n.align.length,o,l,c,p;for(o=0;o<s;o++)/^ *-+: *$/.test(n.align[o])?n.align[o]="right":/^ *:-+: *$/.test(n.align[o])?n.align[o]="center":/^ *:-+ *$/.test(n.align[o])?n.align[o]="left":n.align[o]=null;for(s=n.rows.length,o=0;o<s;o++)n.rows[o]=splitCells(n.rows[o],n.header.length).map(g=>({text:g}));for(s=n.header.length,l=0;l<s;l++)n.header[l].tokens=this.lexer.inline(n.header[l].text);for(s=n.rows.length,l=0;l<s;l++)for(p=n.rows[l],c=0;c<p.length;c++)p[c].tokens=this.lexer.inline(p[c].text);return n}}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const n=t[1].charAt(t[1].length-1)===`
13`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:escape(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):escape(t[0]):t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const n=t[2].trim();if(!this.options.pedantic&&/^</.test(n)){if(!/>$/.test(n))return;const l=rtrim(n.slice(0,-1),"\\");if((n.length-l.length)%2===0)return}else{const l=findClosingBracket(t[2],"()");if(l>-1){const p=(t[0].indexOf("!")===0?5:4)+t[1].length+l;t[2]=t[2].substring(0,l),t[0]=t[0].substring(0,p).trim(),t[3]=""}}let s=t[2],o="";if(this.options.pedantic){const l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(s);l&&(s=l[1],o=l[3])}else o=t[3]?t[3].slice(1,-1):"";return s=s.trim(),/^</.test(s)&&(this.options.pedantic&&!/>$/.test(n)?s=s.slice(1):s=s.slice(1,-1)),outputLink(t,{href:s&&s.replace(this.rules.inline._escapes,"$1"),title:o&&o.replace(this.rules.inline._escapes,"$1")},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let s=(n[2]||n[1]).replace(/\s+/g," ");if(s=t[s.toLowerCase()],!s){const o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return outputLink(n,s,n[0],this.lexer)}}emStrong(e,t,n=""){let s=this.rules.inline.emStrong.lDelim.exec(e);if(!s||s[3]&&n.match(/[\p{L}\p{N}]/u))return;const o=s[1]||s[2]||"";if(!o||o&&(n===""||this.rules.inline.punctuation.exec(n))){const l=s[0].length-1;let c,p,g=l,m=0;const k=s[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(k.lastIndex=0,t=t.slice(-1*e.length+l);(s=k.exec(t))!=null;){if(c=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!c)continue;if(p=c.length,s[3]||s[4]){g+=p;continue}else if((s[5]||s[6])&&l%3&&!((l+p)%3)){m+=p;continue}if(g-=p,g>0)continue;p=Math.min(p,p+g+m);const T=e.slice(0,l+s.index+(s[0].length-c.length)+p);if(Math.min(l,p)%2){const P=T.slice(1,-1);return{type:"em",raw:T,text:P,tokens:this.lexer.inlineTokens(P)}}const h=T.slice(2,-2);return{type:"strong",raw:T,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(/\n/g," ");const s=/[^ ]/.test(n),o=/^ /.test(n)&&/ $/.test(n);return s&&o&&(n=n.substring(1,n.length-1)),n=escape(n,!0),{type:"codespan",raw:t[0],text:n}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e,t){const n=this.rules.inline.autolink.exec(e);if(n){let s,o;return n[2]==="@"?(s=escape(this.options.mangle?t(n[1]):n[1]),o="mailto:"+s):(s=escape(n[1]),o=s),{type:"link",raw:n[0],text:s,href:o,tokens:[{type:"text",raw:s,text:s}]}}}url(e,t){let n;if(n=this.rules.inline.url.exec(e)){let s,o;
vendor: 10,094 bytes, lines 13-14
13if(n[2]==="@")s=escape(this.options.mangle?t(n[0]):n[0]),o="mailto:"+s;else{let l;do l=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0];while(l!==n[0]);s=escape(n[0]),n[1]==="www."?o="http://"+n[0]:o=n[0]}return{type:"link",raw:n[0],text:s,href:o,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(e,t){const n=this.rules.inline.text.exec(e);if(n){let s;return this.lexer.state.inRawBlock?s=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):escape(n[0]):n[0]:s=escape(this.options.smartypants?t(n[0]):n[0]),{type:"text",raw:n[0],text:s}}}}const block={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:noopTest,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};block._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/,block._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,block.def=edit(block.def).replace("label",block._label).replace("title",block._title).getRegex(),block.bullet=/(?:[*+-]|\d{1,9}[.)])/,block.listItemStart=edit(/^( *)(bull) */).replace("bull",block.bullet).getRegex(),block.list=edit(block.list).replace(/bull/g,block.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+block.def.source+")").getRegex(),block._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",block._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,block.html=edit(block.html,"i").replace("comment",block._comment).replace("tag",block._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),block.paragraph=edit(block._paragraph).replace("hr",block.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",block._tag).getRegex(),block.blockquote=edit(block.blockquote).replace("paragraph",block.paragraph).getRegex(),block.normal={...block},block.gfm={...block.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"},block.gfm.table=edit(block.gfm.table).replace("hr",block.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",block._tag).getRegex(),block.gfm.paragraph=edit(block._paragraph).replace("hr",block.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",block.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",block._tag).getRegex(),block.pedantic={...block.normal,html:edit(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",block._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:noopTest,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:edit(block.normal._paragraph).replace("hr",block.hr).replace("heading",` *#{1,6} *[^
14]`).replace("lheading",block.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const inline={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:noopTest,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:noopTest,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};inline._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",inline.punctuation=edit(inline.punctuation).replace(/punctuation/g,inline._punctuation).getRegex(),inline.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,inline.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,inline._comment=edit(block._comment).replace("(?:-->|$)","-->").getRegex(),inline.emStrong.lDelim=edit(inline.emStrong.lDelim).replace(/punct/g,inline._punctuation).getRegex(),inline.emStrong.rDelimAst=edit(inline.emStrong.rDelimAst,"g").replace(/punct/g,inline._punctuation).getRegex(),inline.emStrong.rDelimUnd=edit(inline.emStrong.rDelimUnd,"g").replace(/punct/g,inline._punctuation).getRegex(),inline._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,inline._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,inline._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,inline.autolink=edit(inline.autolink).replace("scheme",inline._scheme).replace("email",inline._email).getRegex(),inline._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,inline.tag=edit(inline.tag).replace("comment",inline._comment).replace("attribute",inline._attribute).getRegex(),inline._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,inline._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,inline._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,inline.link=edit(inline.link).replace("label",inline._label).replace("href",inline._href).replace("title",inline._title).getRegex(),inline.reflink=edit(inline.reflink).replace("label",inline._label).replace("ref",block._label).getRegex(),inline.nolink=edit(inline.nolink).replace("ref",block._label).getRegex(),inline.reflinkSearch=edit(inline.reflinkSearch,"g").replace("reflink",inline.reflink).replace("nolink",inline.nolink).getRegex(),inline.normal={...inline},inline.pedantic={...inline.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:edit(/^!?\[(label)\]\((.*?)\)/).replace("label",inline._label).getRegex(),reflink:edit(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",inline._label).getRegex()},inline.gfm={...inline.normal,escape:edit(inline.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},inline.gfm.url=edit(inline.gfm.url,"i").replace("email",inline.gfm._extended_email).getRegex(),inline.breaks={...inline.gfm,br:edit(inline.br).replace("{2,}","*").getRegex(),text:edit(inline.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};function smartypants(r){return r.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function mangle(r){let e="",t,n;const s=r.length;for(t=0;t<s;t++)n=r.charCodeAt(t),Math.random()>.5&&(n="x"+n.toString(16)),e+="&#"+n+";";return e}
vendor: 11,372 bytes, lines 14-45
14class Lexer{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||defaults,this.options.tokenizer=this.options.tokenizer||new Tokenizer,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:block.normal,inline:inline.normal};this.options.pedantic?(t.block=block.pedantic,t.inline=inline.pedantic):this.options.gfm&&(t.block=block.gfm,this.options.breaks?t.inline=inline.breaks:t.inline=inline.gfm),this.tokenizer.rules=t}static get rules(){return{block,inline}}static lex(e,t){return new Lexer(t).lex(e)}static lexInline(e,t){return new Lexer(t).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,`
15`),this.blockTokens(e,this.tokens);let t;for(;t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens}blockTokens(e,t=[]){this.options.pedantic?e=e.replace(/\t/g,"    ").replace(/^ +$/gm,""):e=e.replace(/^( *)(\t+)/gm,(c,p,g)=>p+"    ".repeat(g.length));let n,s,o,l;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(c=>(n=c.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))){if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length),n.raw.length===1&&t.length>0?t[t.length-1].raw+=`
16`:t.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length),s=t[t.length-1],s&&(s.type==="paragraph"||s.type==="text")?(s.raw+=`
17`+n.raw,s.text+=`
18`+n.text,this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n);continue}if(n=this.tokenizer.fences(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.heading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.hr(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.blockquote(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.list(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.html(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.def(e)){e=e.substring(n.raw.length),s=t[t.length-1],s&&(s.type==="paragraph"||s.type==="text")?(s.raw+=`
19`+n.raw,s.text+=`
20`+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=s.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if(n=this.tokenizer.table(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.lheading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(o=e,this.options.extensions&&this.options.extensions.startBlock){let c=1/0;const p=e.slice(1);let g;this.options.extensions.startBlock.forEach(function(m){g=m.call({lexer:this},p),typeof g=="number"&&g>=0&&(c=Math.min(c,g))}),c<1/0&&c>=0&&(o=e.substring(0,c+1))}if(this.state.top&&(n=this.tokenizer.paragraph(o))){s=t[t.length-1],l&&s.type==="paragraph"?(s.raw+=`
21`+n.raw,s.text+=`
22`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n),l=o.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length),s=t[t.length-1],s&&s.type==="text"?(s.raw+=`
23`+n.raw,s.text+=`
24`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n);continue}if(e){const c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,s,o,l=e,c,p,g;if(this.tokens.links){const m=Object.keys(this.tokens.links);if(m.length>0)for(;(c=this.tokenizer.rules.inline.reflinkSearch.exec(l))!=null;)m.includes(c[0].slice(c[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,c.index)+"["+repeatString("a",c[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(c=this.tokenizer.rules.inline.blockSkip.exec(l))!=null;)l=l.slice(0,c.index)+"["+repeatString("a",c[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(c=this.tokenizer.rules.inline.escapedEmSt.exec(l))!=null;)l=l.slice(0,c.index+c[0].length-2)+"++"+l.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e;)if(p||(g=""),p=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(m=>(n=m.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))){if(n=this.tokenizer.escape(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.tag(e)){e=e.substring(n.raw.length),s=t[t.length-1],s&&n.type==="text"&&s.type==="text"?(s.raw+=n.raw,s.text+=n.text):t.push(n);continue}if(n=this.tokenizer.link(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length),s=t[t.length-1],s&&n.type==="text"&&s.type==="text"?(s.raw+=n.raw,s.text+=n.text):t.push(n);continue}if(n=this.tokenizer.emStrong(e,l,g)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.codespan(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.br(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.del(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.autolink(e,mangle)){e=e.substring(n.raw.length),t.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(e,mangle))){e=e.substring(n.raw.length),t.push(n);continue}if(o=e,this.options.extensions&&this.options.extensions.startInline){let m=1/0;const k=e.slice(1);let T;this.options.extensions.startInline.forEach(function(h){T=h.call({lexer:this},k),typeof T=="number"&&T>=0&&(m=Math.min(m,T))}),m<1/0&&m>=0&&(o=e.substring(0,m+1))}if(n=this.tokenizer.inlineText(o,smartypants)){e=e.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(g=n.raw.slice(-1)),p=!0,s=t[t.length-1],s&&s.type==="text"?(s.raw+=n.raw,s.text+=n.text):t.push(n);continue}if(e){const m="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(m);break}else throw new Error(m)}}return t}}class Renderer{constructor(e){this.options=e||defaults}code(e,t,n){const s=(t||"").match(/\S*/)[0];if(this.options.highlight){const o=this.options.highlight(e,s);o!=null&&o!==e&&(n=!0,e=o)}return e=e.replace(/\n$/,"")+`
25`,s?'<pre><code class="'+this.options.langPrefix+escape(s)+'">'+(n?e:escape(e,!0))+`</code></pre>
26`:"<pre><code>"+(n?e:escape(e,!0))+`</code></pre>
27`}blockquote(e){return`<blockquote>
28${e}</blockquote>
29`}html(e){return e}heading(e,t,n,s){if(this.options.headerIds){const o=this.options.headerPrefix+s.slug(n);return`<h${t} id="${o}">${e}</h${t}>
30`}return`<h${t}>${e}</h${t}>
31`}hr(){return this.options.xhtml?`<hr/>
32`:`<hr>
33`}list(e,t,n){const s=t?"ol":"ul",o=t&&n!==1?' start="'+n+'"':"";return"<"+s+o+`>
34`+e+"</"+s+`>
35`}listitem(e){return`<li>${e}</li>
36`}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(e){return`<p>${e}</p>
37`}table(e,t){return t&&(t=`<tbody>${t}</tbody>`),`<table>
38<thead>
39`+e+`</thead>
40`+t+`</table>
41`}tablerow(e){return`<tr>
42${e}</tr>
43`}tablecell(e,t){const n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
44`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return this.options.xhtml?"<br/>":"<br>"}del(e){return`<del>${e}</del>`}link(e,t,n){if(e=cleanUrl(this.options.sanitize,this.options.baseUrl,e),e===null)return n;let s='<a href="'+e+'"';return t&&(s+=' title="'+t+'"'),s+=">"+n+"</a>",s}image(e,t,n){if(e=cleanUrl(this.options.sanitize,this.options.baseUrl,e),e===null)return n;let s=`<img src="${e}" alt="${n}"`;return t&&(s+=` title="${t}"`),s+=this.options.xhtml?"/>":">",s}text(e){return e}}class TextRenderer{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class Slugger{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let n=e,s=0;if(this.seen.hasOwnProperty(n)){s=this.seen[e];do s++,n=e+"-"+s;while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=s,this.seen[n]=0),n}slug(e,t={}){const n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}}class Parser{constructor(e){this.options=e||defaults,this.options.renderer=this.options.renderer||new Renderer,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new TextRenderer,this.slugger=new Slugger}static parse(e,t){return new Parser(t).parse(e)}static parseInline(e,t){return new Parser(t).parseInline(e)}parse(e,t=!0){let n="",s,o,l,c,p,g,m,k,T,h,P,M,$,b,S,z,y,v,N;const G=e.length;for(s=0;s<G;s++){if(h=e[s],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[h.type]&&(N=this.options.extensions.renderers[h.type].call({parser:this},h),N!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(h.type))){n+=N||"";continue}switch(h.type){case"space":continue;case"hr":{n+=this.renderer.hr();continue}case"heading":{n+=this.renderer.heading(this.parseInline(h.tokens),h.depth,unescape(this.parseInline(h.tokens,this.textRenderer)),this.slugger);continue}case"code":{n+=this.renderer.code(h.text,h.lang,h.escaped);continue}case"table":{for(k="",m="",c=h.header.length,o=0;o<c;o++)m+=this.renderer.tablecell(this.parseInline(h.header[o].tokens),{header:!0,align:h.align[o]});for(k+=this.renderer.tablerow(m),T="",c=h.rows.length,o=0;o<c;o++){for(g=h.rows[o],m="",p=g.length,l=0;l<p;l++)m+=this.renderer.tablecell(this.parseInline(g[l].tokens),{header:!1,align:h.align[l]});T+=this.renderer.tablerow(m)}n+=this.renderer.table(k,T);continue}case"blockquote":{T=this.parse(h.tokens),n+=this.renderer.blockquote(T);continue}case"list":{for(P=h.ordered,M=h.start,$=h.loose,c=h.items.length,T="",o=0;o<c;o++)S=h.items[o],z=S.checked,y=S.task,b="",S.task&&(v=this.renderer.checkbox(z),$?S.tokens.length>0&&S.tokens[0].type==="paragraph"?(S.tokens[0].text=v+" "+S.tokens[0].text,S.tokens[0].tokens&&S.tokens[0].tokens.length>0&&S.tokens[0].tokens[0].type==="text"&&(S.tokens[0].tokens[0].text=v+" "+S.tokens[0].tokens[0].text)):S.tokens.unshift({type:"text",text:v}):b+=v),b+=this.parse(S.tokens,$),T+=this.renderer.listitem(b,y,z);n+=this.renderer.list(T,P,M);continue}case"html":{n+=this.renderer.html(h.text);continue}case"paragraph":{n+=this.renderer.paragraph(this.parseInline(h.tokens));continue}case"text":{for(T=h.tokens?this.parseInline(h.tokens):h.text;s+1<G&&e[s+1].type==="text";)h=e[++s],T+=`
45`+(h.tokens?this.parseInline(h.tokens):h.text);n+=t?this.renderer.paragraph(T):T;continue}default:{const re='Token with "'+h.type+'" type was not found.';if(this.options.silent){console.error(re);return}else throw new Error(re)}}}return n}parseInline(e,t){t=t||this.renderer;let n="",s,o,l;const c=e.length;for(s=0;s<c;s++){if(o=e[s],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]&&(l=this.options.extensions.renderers[o.type].call({parser:this},o),l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type))){n+=l||"";continue}
vendor: 6,208 bytes, lines 45-46
45switch(o.type){case"escape":{n+=t.text(o.text);break}case"html":{n+=t.html(o.text);break}case"link":{n+=t.link(o.href,o.title,this.parseInline(o.tokens,t));break}case"image":{n+=t.image(o.href,o.title,o.text);break}case"strong":{n+=t.strong(this.parseInline(o.tokens,t));break}case"em":{n+=t.em(this.parseInline(o.tokens,t));break}case"codespan":{n+=t.codespan(o.text);break}case"br":{n+=t.br();break}case"del":{n+=t.del(this.parseInline(o.tokens,t));break}case"text":{n+=t.text(o.text);break}default:{const p='Token with "'+o.type+'" type was not found.';if(this.options.silent){console.error(p);return}else throw new Error(p)}}}return n}}class Hooks{constructor(e){this.options=e||defaults}preprocess(e){return e}postprocess(e){return e}}je(Hooks,"passThroughHooks",new Set(["preprocess","postprocess"]));function onError(r,e,t){return n=>{if(n.message+=`
46Please report this to https://github.com/markedjs/marked.`,r){const s="<p>An error occurred:</p><pre>"+escape(n.message+"",!0)+"</pre>";if(e)return Promise.resolve(s);if(t){t(null,s);return}return s}if(e)return Promise.reject(n);if(t){t(n);return}throw n}}function parseMarkdown(r,e){return(t,n,s)=>{typeof n=="function"&&(s=n,n=null);const o={...n};n={...marked.defaults,...o};const l=onError(n.silent,n.async,s);if(typeof t>"u"||t===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(checkSanitizeDeprecation(n),n.hooks&&(n.hooks.options=n),s){const c=n.highlight;let p;try{n.hooks&&(t=n.hooks.preprocess(t)),p=r(t,n)}catch(k){return l(k)}const g=function(k){let T;if(!k)try{n.walkTokens&&marked.walkTokens(p,n.walkTokens),T=e(p,n),n.hooks&&(T=n.hooks.postprocess(T))}catch(h){k=h}return n.highlight=c,k?l(k):s(null,T)};if(!c||c.length<3||(delete n.highlight,!p.length))return g();let m=0;marked.walkTokens(p,function(k){k.type==="code"&&(m++,setTimeout(()=>{c(k.text,k.lang,function(T,h){if(T)return g(T);h!=null&&h!==k.text&&(k.text=h,k.escaped=!0),m--,m===0&&g()})},0))}),m===0&&g();return}if(n.async)return Promise.resolve(n.hooks?n.hooks.preprocess(t):t).then(c=>r(c,n)).then(c=>n.walkTokens?Promise.all(marked.walkTokens(c,n.walkTokens)).then(()=>c):c).then(c=>e(c,n)).then(c=>n.hooks?n.hooks.postprocess(c):c).catch(l);try{n.hooks&&(t=n.hooks.preprocess(t));const c=r(t,n);n.walkTokens&&marked.walkTokens(c,n.walkTokens);let p=e(c,n);return n.hooks&&(p=n.hooks.postprocess(p)),p}catch(c){return l(c)}}}function marked(r,e,t){return parseMarkdown(Lexer.lex,Parser.parse)(r,e,t)}marked.options=marked.setOptions=function(r){return marked.defaults={...marked.defaults,...r},changeDefaults(marked.defaults),marked},marked.getDefaults=getDefaults,marked.defaults=defaults,marked.use=function(...r){const e=marked.defaults.extensions||{renderers:{},childTokens:{}};r.forEach(t=>{const n={...t};if(n.async=marked.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if(s.renderer){const o=e.renderers[s.name];o?e.renderers[s.name]=function(...l){let c=s.renderer.apply(this,l);return c===!1&&(c=o.apply(this,l)),c}:e.renderers[s.name]=s.renderer}if(s.tokenizer){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");e[s.level]?e[s.level].unshift(s.tokenizer):e[s.level]=[s.tokenizer],s.start&&(s.level==="block"?e.startBlock?e.startBlock.push(s.start):e.startBlock=[s.start]:s.level==="inline"&&(e.startInline?e.startInline.push(s.start):e.startInline=[s.start]))}s.childTokens&&(e.childTokens[s.name]=s.childTokens)}),n.extensions=e),t.renderer){const s=marked.defaults.renderer||new Renderer;for(const o in t.renderer){const l=s[o];s[o]=(...c)=>{let p=t.renderer[o].apply(s,c);return p===!1&&(p=l.apply(s,c)),p}}n.renderer=s}if(t.tokenizer){const s=marked.defaults.tokenizer||new Tokenizer;for(const o in t.tokenizer){const l=s[o];s[o]=(...c)=>{let p=t.tokenizer[o].apply(s,c);return p===!1&&(p=l.apply(s,c)),p}}n.tokenizer=s}if(t.hooks){const s=marked.defaults.hooks||new Hooks;for(const o in t.hooks){const l=s[o];Hooks.passThroughHooks.has(o)?s[o]=c=>{if(marked.defaults.async)return Promise.resolve(t.hooks[o].call(s,c)).then(g=>l.call(s,g));const p=t.hooks[o].call(s,c);return l.call(s,p)}:s[o]=(...c)=>{let p=t.hooks[o].apply(s,c);return p===!1&&(p=l.apply(s,c)),p}}n.hooks=s}if(t.walkTokens){const s=marked.defaults.walkTokens;n.walkTokens=function(o){let l=[];return l.push(t.walkTokens.call(this,o)),s&&(l=l.concat(s.call(this,o))),l}}marked.setOptions(n)})},marked.walkTokens=function(r,e){let t=[];for(const n of r)switch(t=t.concat(e.call(marked,n)),n.type){case"table":{for(const s of n.header)t=t.concat(marked.walkTokens(s.tokens,e));for(const s of n.rows)for(const o of s)t=t.concat(marked.walkTokens(o.tokens,e));break}case"list":{t=t.concat(marked.walkTokens(n.items,e));break}default:marked.defaults.extensions&&marked.defaults.extensions.childTokens&&marked.defaults.extensions.childTokens[n.type]?marked.defaults.extensions.childTokens[n.type].forEach(function(s){t=t.concat(marked.walkTokens(n[s],e))}):n.tokens&&(t=t.concat(marked.walkTokens(n.tokens,e)))}return t},marked.parseInline=parseMarkdown(Lexer.lexInline,Parser.parseInline),marked.Parser=Parser,marked.parser=Parser.parse,marked.Renderer=Renderer,marked.TextRenderer=TextRenderer,marked.Lexer=Lexer,marked.lexer=Lexer.lex,marked.Tokenizer=Tokenizer,marked.Slugger=Slugger,marked.Hooks=Hooks,marked.parse=marked,marked.options,marked.setOptions,marked.use,marked.walkTokens,marked.parseInline,Parser.parse,Lexer.lex;/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */const{entries,setPrototypeOf,isFrozen,getPrototypeOf,getOwnPropertyDescriptor}=Object;let{freeze,seal,create}=Object,{apply,construct}=typeof Reflect<"u"&&Reflect;freeze||(freeze=function(e){return e}),seal||(seal=function(e){return e}),apply||(apply=function(e,t){for(var n=arguments.length,s=new Array(n>2?n-2:0),o=2;o<n;o++)s[o-2]=arguments[o];return e.apply(t,s)}
vendor: 5,409 bytes, line 46
46),construct||(construct=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];return new e(...n)});const arrayForEach=unapply(Array.prototype.forEach),arrayLastIndexOf=unapply(Array.prototype.lastIndexOf),arrayPop=unapply(Array.prototype.pop),arrayPush=unapply(Array.prototype.push),arraySplice=unapply(Array.prototype.splice),stringToLowerCase=unapply(String.prototype.toLowerCase),stringToString=unapply(String.prototype.toString),stringMatch=unapply(String.prototype.match),stringReplace=unapply(String.prototype.replace),stringIndexOf=unapply(String.prototype.indexOf),stringTrim=unapply(String.prototype.trim),objectHasOwnProperty=unapply(Object.prototype.hasOwnProperty),regExpTest=unapply(RegExp.prototype.test),typeErrorCreate=unconstruct(TypeError);function unapply(r){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];return apply(r,e,n)}}function unconstruct(r){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return construct(r,t)}}function addToSet(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:stringToLowerCase;setPrototypeOf&&setPrototypeOf(r,null);let n=e.length;for(;n--;){let s=e[n];if(typeof s=="string"){const o=t(s);o!==s&&(isFrozen(e)||(e[n]=o),s=o)}r[s]=!0}return r}function cleanArray(r){for(let e=0;e<r.length;e++)objectHasOwnProperty(r,e)||(r[e]=null);return r}function clone(r){const e=create(null);for(const[t,n]of entries(r))objectHasOwnProperty(r,t)&&(Array.isArray(n)?e[t]=cleanArray(n):n&&typeof n=="object"&&n.constructor===Object?e[t]=clone(n):e[t]=n);return e}function lookupGetter(r,e){for(;r!==null;){const n=getOwnPropertyDescriptor(r,e);if(n){if(n.get)return unapply(n.get);if(typeof n.value=="function")return unapply(n.value)}r=getPrototypeOf(r)}function t(){return null}return t}const html$1=freeze(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),svg$1=freeze(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),svgFilters=freeze(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),svgDisallowed=freeze(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),mathMl$1=freeze(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),mathMlDisallowed=freeze(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),text=freeze(["#text"]),html=freeze(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
vendor: 4,194 bytes, line 46
46spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),svg=freeze(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),mathMl=freeze(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),xml=freeze(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),MUSTACHE_EXPR=seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ERB_EXPR=seal(/<%[\w\W]*|[\w\W]*%>/gm),TMPLIT_EXPR=seal(/\$\{[\w\W]*/gm),DATA_ATTR=seal(/^data-[\-\w.\u00B7-\uFFFF]+$/),ARIA_ATTR=seal(/^aria-[\-\w]+$/),IS_ALLOWED_URI=seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),IS_SCRIPT_OR_DATA=seal(/^(?:\w+script|data):/i),ATTR_WHITESPACE=seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),DOCTYPE_NAME=seal(/^html$/i),CUSTOM_ELEMENT=seal(/^[a-z][.\w]*(-[.\w]+)+$/i);var EXPRESSIONS=Object.freeze({__proto__:null,ARIA_ATTR,ATTR_WHITESPACE,CUSTOM_ELEMENT,DATA_ATTR,DOCTYPE_NAME,ERB_EXPR,IS_ALLOWED_URI,IS_SCRIPT_OR_DATA,MUSTACHE_EXPR,TMPLIT_EXPR});const NODE_TYPE={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},getGlobal=function(){return typeof window>"u"?null:window},_createTrustedTypesPolicy=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;
vendor: 2,167 bytes, line 46
46const s="data-tt-policy-suffix";t&&t.hasAttribute(s)&&(n=t.getAttribute(s));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},_createHooksMap=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function createDOMPurify(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:getGlobal();const e=d=>createDOMPurify(d);if(e.version="3.3.1",e.removed=[],!r||!r.document||r.document.nodeType!==NODE_TYPE.document||!r.Element)return e.isSupported=!1,e;let{document:t}=r;const n=t,s=n.currentScript,{DocumentFragment:o,HTMLTemplateElement:l,Node:c,Element:p,NodeFilter:g,NamedNodeMap:m=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:k,DOMParser:T,trustedTypes:h}=r,P=p.prototype,M=lookupGetter(P,"cloneNode"),$=lookupGetter(P,"remove"),b=lookupGetter(P,"nextSibling"),S=lookupGetter(P,"childNodes"),z=lookupGetter(P,"parentNode");if(typeof l=="function"){const d=t.createElement("template");d.content&&d.content.ownerDocument&&(t=d.content.ownerDocument)}let y,v="";const{implementation:N,createNodeIterator:G,createDocumentFragment:re,getElementsByTagName:Ke}=t,{importNode:Qe}=n;let L=_createHooksMap();e.isSupported=typeof entries=="function"&&typeof z=="function"&&N&&N.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:pe,ERB_EXPR:fe,TMPLIT_EXPR:he,DATA_ATTR:Je,ARIA_ATTR:et,IS_SCRIPT_OR_DATA:tt,ATTR_WHITESPACE:Ae,CUSTOM_ELEMENT:nt}=EXPRESSIONS;let{IS_ALLOWED_URI:Re}=EXPRESSIONS,R=null;const Oe=addToSet({},[...html$1,...svg$1,...svgFilters,...mathMl$1,...text]);let O=null;const Ce=addToSet({},[...html,...svg,...mathMl,...xml]);let E=Object.seal(create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ee=null,de=null;
vendor: 12,438 bytes, lines 46-47
46const X=Object.seal(create(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ve=!0,ge=!0,Ie=!1,Pe=!0,Z=!1,ie=!0,q=!1,me=!1,ke=!1,V=!1,se=!1,oe=!1,Le=!0,Ne=!1;const rt="user-content-";let _e=!0,te=!1,j={},F=null;const Te=addToSet({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let De=null;const Me=addToSet({},["audio","video","img","source","image","track"]);let be=null;const ze=addToSet({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ae="http://www.w3.org/1998/Math/MathML",le="http://www.w3.org/2000/svg",H="http://www.w3.org/1999/xhtml";let K=H,ye=!1,we=null;const it=addToSet({},[ae,le,H],stringToString);let ce=addToSet({},["mi","mo","mn","ms","mtext"]),ue=addToSet({},["annotation-xml"]);const st=addToSet({},["title","style","font","a","script"]);let ne=null;const ot=["application/xhtml+xml","text/html"],at="text/html";let A=null,Q=null;const lt=t.createElement("form"),$e=function(a){return a instanceof RegExp||a instanceof Function},Ee=function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Q&&Q===a)){if((!a||typeof a!="object")&&(a={}),a=clone(a),ne=ot.indexOf(a.PARSER_MEDIA_TYPE)===-1?at:a.PARSER_MEDIA_TYPE,A=ne==="application/xhtml+xml"?stringToString:stringToLowerCase,R=objectHasOwnProperty(a,"ALLOWED_TAGS")?addToSet({},a.ALLOWED_TAGS,A):Oe,O=objectHasOwnProperty(a,"ALLOWED_ATTR")?addToSet({},a.ALLOWED_ATTR,A):Ce,we=objectHasOwnProperty(a,"ALLOWED_NAMESPACES")?addToSet({},a.ALLOWED_NAMESPACES,stringToString):it,be=objectHasOwnProperty(a,"ADD_URI_SAFE_ATTR")?addToSet(clone(ze),a.ADD_URI_SAFE_ATTR,A):ze,De=objectHasOwnProperty(a,"ADD_DATA_URI_TAGS")?addToSet(clone(Me),a.ADD_DATA_URI_TAGS,A):Me,F=objectHasOwnProperty(a,"FORBID_CONTENTS")?addToSet({},a.FORBID_CONTENTS,A):Te,ee=objectHasOwnProperty(a,"FORBID_TAGS")?addToSet({},a.FORBID_TAGS,A):clone({}),de=objectHasOwnProperty(a,"FORBID_ATTR")?addToSet({},a.FORBID_ATTR,A):clone({}),j=objectHasOwnProperty(a,"USE_PROFILES")?a.USE_PROFILES:!1,ve=a.ALLOW_ARIA_ATTR!==!1,ge=a.ALLOW_DATA_ATTR!==!1,Ie=a.ALLOW_UNKNOWN_PROTOCOLS||!1,Pe=a.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Z=a.SAFE_FOR_TEMPLATES||!1,ie=a.SAFE_FOR_XML!==!1,q=a.WHOLE_DOCUMENT||!1,V=a.RETURN_DOM||!1,se=a.RETURN_DOM_FRAGMENT||!1,oe=a.RETURN_TRUSTED_TYPE||!1,ke=a.FORCE_BODY||!1,Le=a.SANITIZE_DOM!==!1,Ne=a.SANITIZE_NAMED_PROPS||!1,_e=a.KEEP_CONTENT!==!1,te=a.IN_PLACE||!1,Re=a.ALLOWED_URI_REGEXP||IS_ALLOWED_URI,K=a.NAMESPACE||H,ce=a.MATHML_TEXT_INTEGRATION_POINTS||ce,ue=a.HTML_INTEGRATION_POINTS||ue,E=a.CUSTOM_ELEMENT_HANDLING||{},a.CUSTOM_ELEMENT_HANDLING&&$e(a.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(E.tagNameCheck=a.CUSTOM_ELEMENT_HANDLING.tagNameCheck),a.CUSTOM_ELEMENT_HANDLING&&$e(a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(E.attributeNameCheck=a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),a.CUSTOM_ELEMENT_HANDLING&&typeof a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(E.allowCustomizedBuiltInElements=a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Z&&(ge=!1),se&&(V=!0),j&&(R=addToSet({},text),O=[],j.html===!0&&(addToSet(R,html$1),addToSet(O,html)),j.svg===!0&&(addToSet(R,svg$1),addToSet(O,svg),addToSet(O,xml)),j.svgFilters===!0&&(addToSet(R,svgFilters),addToSet(O,svg),addToSet(O,xml)),j.mathMl===!0&&(addToSet(R,mathMl$1),addToSet(O,mathMl),addToSet(O,xml))),a.ADD_TAGS&&(typeof a.ADD_TAGS=="function"?X.tagCheck=a.ADD_TAGS:(R===Oe&&(R=clone(R)),addToSet(R,a.ADD_TAGS,A))),a.ADD_ATTR&&(typeof a.ADD_ATTR=="function"?X.attributeCheck=a.ADD_ATTR:(O===Ce&&(O=clone(O)),addToSet(O,a.ADD_ATTR,A))),a.ADD_URI_SAFE_ATTR&&addToSet(be,a.ADD_URI_SAFE_ATTR,A),a.FORBID_CONTENTS&&(F===Te&&(F=clone(F)),addToSet(F,a.FORBID_CONTENTS,A)),a.ADD_FORBID_CONTENTS&&(F===Te&&(F=clone(F)),addToSet(F,a.ADD_FORBID_CONTENTS,A)),_e&&(R["#text"]=!0),q&&addToSet(R,["html","head","body"]),R.table&&(addToSet(R,["tbody"]),delete ee.tbody),a.TRUSTED_TYPES_POLICY){if(typeof a.TRUSTED_TYPES_POLICY.createHTML!="function")throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof a.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');y=a.TRUSTED_TYPES_POLICY,v=y.createHTML("")}else y===void 0&&(y=_createTrustedTypesPolicy(h,s)),y!==null&&typeof v=="string"&&(v=y.createHTML(""));freeze&&freeze(a),Q=a}},Fe=addToSet({},[...svg$1,...svgFilters,...svgDisallowed]),Ue=addToSet({},[...mathMl$1,...mathMlDisallowed]),ct=function(a){let u=z(a);(!u||!u.tagName)&&(u={namespaceURI:K,tagName:"template"});const f=stringToLowerCase(a.tagName),w=stringToLowerCase(u.tagName);return we[a.namespaceURI]?a.namespaceURI===le?u.namespaceURI===H?f==="svg":u.namespaceURI===ae?f==="svg"&&(w==="annotation-xml"||ce[w]):!!Fe[f]:a.namespaceURI===ae?u.namespaceURI===H?f==="math":u.namespaceURI===le?f==="math"&&ue[w]:!!Ue[f]:a.namespaceURI===H?u.namespaceURI===le&&!ue[w]||u.namespaceURI===ae&&!ce[w]?!1:!Ue[f]&&(st[f]||!Fe[f]):!!(ne==="application/xhtml+xml"&&we[a.namespaceURI]):!1},U=function(a){arrayPush(e.removed,{element:a});try{z(a).removeChild(a)}catch{$(a)}},Y=function(a,u){try{arrayPush(e.removed,{attribute:u.getAttributeNode(a),from:u})}catch{arrayPush(e.removed,{attribute:null,from:u})}if(u.removeAttribute(a),a==="is")if(V||se)try{U(u)}catch{}else try{u.setAttribute(a,"")}catch{}},He=function(a){let u=null,f=null;if(ke)a="<remove></remove>"+a;else{const x=stringMatch(a,/^[\r\n\t ]+/);f=x&&x[0]}ne==="application/xhtml+xml"&&K===H&&(a='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+a+"</body></html>");const w=y?y.createHTML(a):a;if(K===H)try{u=new T().parseFromString(w,ne)}catch{}if(!u||!u.documentElement){u=N.createDocument(K,"template",null);try{u.documentElement.innerHTML=ye?v:w}catch{}}const I=u.body||u.documentElement;return a&&f&&I.insertBefore(t.createTextNode(f),I.childNodes[0]||null),K===H?Ke.call(u,q?"html":"body")[0]:q?u.documentElement:I},Be=function(a){return G.call(a.ownerDocument||a,a,g.SHOW_ELEMENT|g.SHOW_COMMENT|g.SHOW_TEXT|g.SHOW_PROCESSING_INSTRUCTION|g.SHOW_CDATA_SECTION,null)},xe=function(a){return a instanceof k&&(typeof a.nodeName!="string"||typeof a.textContent!="string"||typeof a.removeChild!="function"||!(a.attributes instanceof m)||typeof a.removeAttribute!="function"||typeof a.setAttribute!="function"||typeof a.namespaceURI!="string"||typeof a.insertBefore!="function"||typeof a.hasChildNodes!="function")},We=function(a){return typeof c=="function"&&a instanceof c};function B(d,a,u){arrayForEach(d,f=>{f.call(e,a,u,Q)})}const Ge=function(a){let u=null;if(B(L.beforeSanitizeElements,a,null),xe(a))return U(a),!0;const f=A(a.nodeName);if(B(L.uponSanitizeElement,a,{tagName:f,allowedTags:R}),ie&&a.hasChildNodes()&&!We(a.firstElementChild)&&regExpTest(/<[/\w!]/g,a.innerHTML)&&regExpTest(/<[/\w!]/g,a.textContent)||a.nodeType===NODE_TYPE.progressingInstruction||ie&&a.nodeType===NODE_TYPE.comment&&regExpTest(/<[/\w]/g,a.data))return U(a),!0;if(!(X.tagCheck instanceof Function&&X.tagCheck(f))&&(!R[f]||ee[f])){if(!ee[f]&&Ye(f)&&(E.tagNameCheck instanceof RegExp&&regExpTest(E.tagNameCheck,f)||E.tagNameCheck instanceof Function&&E.tagNameCheck(f)))return!1;if(_e&&!F[f]){const w=z(a)||a.parentNode,I=S(a)||a.childNodes;if(I&&w){const x=I.length;for(let D=x-1;D>=0;--D){const W=M(I[D],!0);W.__removalCount=(a.__removalCount||0)+1,w.insertBefore(W,b(a))}}}return U(a),!0}return a instanceof p&&!ct(a)||(f==="noscript"||f==="noembed"||f==="noframes")&&regExpTest(/<\/no(script|embed|frames)/i,a.innerHTML)?(U(a),!0):(Z&&a.nodeType===NODE_TYPE.text&&(u=a.textContent,arrayForEach([pe,fe,he],w=>{u=stringReplace(u,w," ")}),a.textContent!==u&&(arrayPush(e.removed,{element:a.cloneNode()}),a.textContent=u)),B(L.afterSanitizeElements,a,null),!1)},qe=function(a,u,f){if(Le&&(u==="id"||u==="name")&&(f in t||f in lt))return!1;if(!(ge&&!de[u]&&regExpTest(Je,u))){if(!(ve&&regExpTest(et,u))){if(!(X.attributeCheck instanceof Function&&X.attributeCheck(u,a))){if(!O[u]||de[u]){if(!(Ye(a)&&(E.tagNameCheck instanceof RegExp&&regExpTest(E.tagNameCheck,a)||E.tagNameCheck instanceof Function&&E.tagNameCheck(a))&&(E.attributeNameCheck instanceof RegExp&&regExpTest(E.attributeNameCheck,u)||E.attributeNameCheck instanceof Function&&E.attributeNameCheck(u,a))||u==="is"&&E.allowCustomizedBuiltInElements&&(E.tagNameCheck instanceof RegExp&&regExpTest(E.tagNameCheck,f)||E.tagNameCheck instanceof Function&&E.tagNameCheck(f))))return!1}else if(!be[u]){if(!regExpTest(Re,stringReplace(f,Ae,""))){if(!((u==="src"||u==="xlink:href"||u==="href")&&a!=="script"&&stringIndexOf(f,"data:")===0&&De[a])){if(!(Ie&&!regExpTest(tt,stringReplace(f,Ae,"")))){if(f)return!1}}}}}}}return!0},Ye=function(a){return a!=="annotation-xml"&&stringMatch(a,nt)},Xe=function(a){B(L.beforeSanitizeAttributes,a,null);const{attributes:u}=a;if(!u||xe(a))return;const f={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:O,forceKeepAttr:void 0};let w=u.length;for(;w--;){const I=u[w],{name:x,namespaceURI:D,value:W}=I,J=A(x),Se=W;let C=x==="value"?Se:stringTrim(Se);if(f.attrName=J,f.attrValue=C,f.keepAttr=!0,f.forceKeepAttr=void 0,B(L.uponSanitizeAttribute,a,f),C=f.attrValue,Ne&&(J==="id"||J==="name")&&(Y(x,a),C=rt+C),ie&&regExpTest(/((--!?|])>)|<\/(style|title|textarea)/i,C)){Y(x,a);continue}if(J==="attributename"&&stringMatch(C,"href")){Y(x,a);continue}if(f.forceKeepAttr)continue;if(!f.keepAttr){Y(x,a);continue}if(!Pe&&regExpTest(/\/>/i,C)){Y(x,a);continue}Z&&arrayForEach([pe,fe,he],Ve=>{C=stringReplace(C,Ve," ")});const Ze=A(a.nodeName);if(!qe(Ze,J,C)){Y(x,a);continue}if(y&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!D)switch(h.getAttributeType(Ze,J)){case"TrustedHTML":{C=y.createHTML(C);break}case"TrustedScriptURL":{C=y.createScriptURL(C);break}}if(C!==Se)try{D?a.setAttributeNS(D,x,C):a.setAttribute(x,C),xe(a)?U(a):arrayPop(e.removed)}catch{Y(x,a)}}B(L.afterSanitizeAttributes,a,null)},ut=function d(a){let u=null;const f=Be(a);for(B(L.beforeSanitizeShadowDOM,a,null);u=f.nextNode();)B(L.uponSanitizeShadowNode,u,null),Ge(u),Xe(u),u.content instanceof o&&d(u.content);B(L.afterSanitizeShadowDOM,a,null)};return e.sanitize=function(d){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=null,f=null,w=null,I=null;if(ye=!d,ye&&(d="<!-->"),typeof d!="string"&&!We(d))if(typeof d.toString=="function"){if(d=d.toString(),typeof d!="string")throw typeErrorCreate("dirty is not a string, aborting")}else throw typeErrorCreate("toString is not a function");if(!e.isSupported)return d;if(me||Ee(a),e.removed=[],typeof d=="string"&&(te=!1),te){if(d.nodeName){const W=A(d.nodeName);if(!R[W]||ee[W])throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place")}}else if(d instanceof c)u=He("<!---->"),f=u.ownerDocument.importNode(d,!0),f.nodeType===NODE_TYPE.element&&f.nodeName==="BODY"||f.nodeName==="HTML"?u=f:u.appendChild(f);else{if(!V&&!Z&&!q&&d.indexOf("<")===-1)return y&&oe?y.createHTML(d):d;if(u=He(d),!u)return V?null:oe?v:""}u&&ke&&U(u.firstChild);const x=Be(te?d:u);for(;w=x.nextNode();)Ge(w),Xe(w),w.content instanceof o&&ut(w.content);if(te)return d;if(V){if(se)for(I=re.call(u.ownerDocument);u.firstChild;)I.appendChild(u.firstChild);else I=u;return(O.shadowroot||O.shadowrootmode)&&(I=Qe.call(n,I,!0)),I}let D=q?u.outerHTML:u.innerHTML;return q&&R["!doctype"]&&u.ownerDocument&&u.ownerDocument.doctype&&u.ownerDocument.doctype.name&&regExpTest(DOCTYPE_NAME,u.ownerDocument.doctype.name)&&(D="<!DOCTYPE "+u.ownerDocument.doctype.name+`>
47`+D),Z&&arrayForEach([pe,fe,he],W=>{D=stringReplace(D,W," ")}),y&&oe?y.createHTML(D):D},e.setConfig=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ee(d),me=!0},e.clearConfig=function(){Q=null,me=!1},e.isValidAttribute=function(d,a,u){Q||Ee({});const f=A(d),w=A(a);return qe(f,w,u)},e.addHook=function(d,a){typeof a=="function"&&arrayPush(L[d],a)},e.removeHook=function(d,a){if(a!==void 0){const u=arrayLastIndexOf(L[d],a);return u===-1?void 0:arraySplice(L[d],u,1)[0]}return arrayPop(L[d])},e.removeHooks=function(d){L[d]=[]},e.removeAllHooks=function(){L=_createHooksMap()},e}createDOMPurify();
vendor: 1,207 bytes, line 47
47function getAugmentedNamespace(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var s=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return r[n]}})}),t}function commonjsRequire(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var uniqid={exports:{}};const __viteBrowserExternal={},__viteBrowserExternal$1=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(__viteBrowserExternal$1);var pid=typeof process<"u"&&process.pid?process.pid.toString(36):"",address="";if(typeof __webpack_require__!="function"&&typeof commonjsRequire<"u"){var mac="",os=require$$0;if(os.networkInterfaces)var networkInterfaces=os.networkInterfaces();
47if(networkInterfaces){e:for(let r in networkInterfaces){const e=networkInterfaces[r],t=e.length;for(var i=0;i<t;i++)if(e[i]!==void 0&&e[i].mac&&e[i].mac!="00:00:00:00:00:00"){mac=e[i].mac;break e}}address=mac?parseInt(mac.replace(/\:|\D+/gi,"")).toString(36):""}}uniqid.exports=uniqid.exports.default=function(r,e){return(r||"")+address+pid+now().toString(36)+(e||"")},uniqid.exports.process=function(r,e){return(r||"")+pid+now().toString(36)+(e||"")},uniqid.exports.time=function(r,e){return(r||"")+now().toString(36)+(e||"")};function now(){var r=Date.now(),e=now.last||r;return now.last=r>e?r:e+1}function data_get(r,e,t=null){var n=Array.isArray(e)?e:e.split("."),s=n.reduce((o,l)=>o&&o[l],r);return s!==void 0?s:t}const isString=tagTester("String");var isArguments=tagTester("Arguments");(function(){isArguments(arguments)||(isArguments=function(r){return has(r,"callee")})})();const isArguments$1=isArguments;function isEmpty(r){if(r==null)return!0;var e=getLength(r);return typeof e=="number"&&(isArray(r)||isString(r)||isArguments$1(r))?e===0:getLength(keys(r))===0}function values(r){for(var e=keys(r),t=e.length,n=Array(t),s=0;s<t;s++)n[s]=r[e[s]];return n}function sortedIndex(r,e,t,n){t=cb(t,n,1);for(var s=t(e),o=0,l=getLength(r);o<l;){var c=Math.floor((o+l)/2);t(r[c])<s?o=c+1:l=c}return o}function createPredicateIndexFinder(r){return function(e,t,n){t=cb(t,n);for(var s=getLength(e),o=r>0?0:s-1;o>=0&&o<s;o+=r)if(t(e[o],o,e))return o;return-1}}const findIndex=createPredicateIndexFinder(1),isNumber=tagTester("Number");function isNaN$1(r){return isNumber(r)&&_isNaN(r)}function createIndexFinder(r,e,t){return function(n,s,o){var l=0,c=getLength(n);if(typeof o=="number")r>0?l=o>=0?o:Math.max(o+c,l):c=o>=0?Math.min(o+1,c):o+c+1;else if(t&&o&&c)return o=t(n,s),n[o]===s?o:-1;if(s!==s)return o=e(slice.call(n,l,c),isNaN$1),o>=0?o+l:-1;for(o=r>0?l:c-1;o>=0&&o<c;o+=r)if(n[o]===s)return o;return-1}}const indexOf=createIndexFinder(1,findIndex,sortedIndex);function contains(r,e,t,n){return isArrayLike(r)||(r=values(r)),(typeof t!="number"||n)&&(t=0),indexOf(r,e,t)>=0}function intersection(r){for(var e=[],t=arguments.length,n=0,s=getLength(r);n<s;n++){var o=r[n];if(!contains(e,o)){var l;for(l=1;l<t&&contains(arguments[l],o);l++);l===t&&e.push(o)}}return e}function negate(r){return function(){return!r.apply(this,arguments)}}function reject(r,e,t){return filter(r,negate(cb(e)),t)}function initial(r,e,t){return slice.call(r,0,Math.max(0,r.length-(e==null||t?1:e)))}function first(r,e,t){return r==null||r.length<1?e==null||t?void 0:[]:e==null||t?r[0]:initial(r,r.length-e)}mixin({chain,map,each,filter,reject,first,isEmpty});const NUMBER_SPECIFIC_COMPARISONS=[">",">=","<","<="];class Validator{constructor(r,e,t,n,s){this.field=r,this.values=e,this.dottedFieldPath=t,this.store=n,this.storeName=s,this.rootValues=n?n.state.publish[s].values:!1,this.passOnAny=!1,this.showOnPass=!0,this.converter=new Converter}passesConditions(r){let e=r||this.getConditions();if(e===void 0)return!0;if(this.isCustomConditionWithoutTarget(e))return this.passesCustomCondition(this.prepareCondition(e));let t=this.passOnAny?this.passesAnyConditions(e):this.passesAllConditions(e);return this.showOnPass?t:!t}getConditions(){let r=chain(KEYS).filter(t=>this.field[t]).first().value();if(!r)return;r.includes("any")&&(this.passOnAny=!0),(r.includes("unless")||r.includes("hide_when"))&&(this.showOnPass=!1);let e=this.field[r];return this.isCustomConditionWithoutTarget(e)?e:this.converter.fromBlueprint(e,this.field.prefix)}isCustomConditionWithoutTarget(r){return isString(r)}passesAllConditions(r){return chain(r).map(e=>this.prepareCondition(e)).reject(e=>this.passesCondition(e)).isEmpty().value()}passesAnyConditions(r){return!chain(r).map(e=>this.prepareCondition(e)).filter(e=>this.passesCondition(e)).isEmpty().value()}prepareCondition(r){if(isString(r)||r.operator==="custom")return this.prepareCustomCondition(r);let e=this.prepareOperator(r.operator),t=this.prepareLhs(r.field,e),n=this.prepareRhs(r.value,e);return{lhs:t,operator:e,rhs:n}}prepareOperator(r){switch(r){case null:case"":case"is":case"equals":return"==";case"isnt":case"not":case"¯\\_(ツ)_/¯":return"!=";case"includes":case"contains":return"includes";case"includes_any":case"contains_any":return"includes_any"}return r}prepareLhs(r,e){let t=this.getFieldValue(r);return NUMBER_SPECIFIC_COMPARISONS.includes(e)?Number(t):e==="includes"&&!isObject(t)?t?t.toString():"":(isString(t)&&isEmpty(t)&&(t=null),isString(t)?JSON.stringify(t.trim()):t)}prepareRhs(r,e){switch(r){case"null":return null;case"true":return!0;case"false":return!1}return NUMBER_SPECIFIC_COMPARISONS.includes(e)?Number(r):r==="empty"||e==="includes"||e==="includes_any"?r:isString(r)?JSON.stringify(r.trim()):r}prepareCustomCondition(r){let e=this.prepareFunctionName(r.value||r),t=this.prepareParams(r.value||r),n=r.field?this.getFieldValue(r.field):null,s=r.field;return{functionName:e,params:t,target:n,targetHandle:s}}prepareFunctionName(r){return r.replace(new RegExp("^custom "),"").split(":")[0]}prepareParams(r){let e=r.split(":")[1];return e?e.split(",").map(t=>t.trim()):[]}getFieldValue(r){return r.startsWith("$parent.")&&(r=new ParentResolver(this.dottedFieldPath).resolve(r)),r.startsWith("$root.")||r.startsWith("root.")?data_get(this.root
47Values,r.replace(new RegExp("^\\$?root\\."),"")):data_get(this.values,r)}passesCondition(condition){return condition.functionName?this.passesCustomCondition(condition):condition.operator==="includes"?this.passesIncludesCondition(condition):condition.operator==="includes_any"?this.passesIncludesAnyCondition(condition):(condition.rhs==="empty"&&(condition.lhs=isEmpty(condition.lhs),condition.rhs=!0),isObject(condition.lhs)?!1:eval(`${condition.lhs} ${condition.operator} ${condition.rhs}`))}passesIncludesCondition(r){return r.lhs.includes(r.rhs)}passesIncludesAnyCondition(r){let e=r.rhs.split(",").map(t=>t.trim());return Array.isArray(r.lhs)?intersection(r.lhs,e).length:new RegExp(e.join("|")).test(r.lhs)}passesCustomCondition(r){let e=data_get(this.store.state.statamic.conditions,r.functionName);if(typeof e!="function")return console.error(`Statamic field condition [${r.functionName}] was not properly defined.`),!1;let t=e({params:r.params,target:r.target,targetHandle:r.targetHandle,values:this.values,root:this.rootValues,store:this.store,storeName:this.storeName,fieldPath:this.dottedFieldPath});return this.showOnPass?t:!t}passesNonRevealerConditions(r){let e=this.getConditions();if(this.isCustomConditionWithoutTarget(e))return this.passesConditions(e);let t=data_get(this.store.state.publish[this.storeName],"revealerFields",[]),n=chain(this.getConditions()).reject(s=>t.includes(this.relativeLhsToAbsoluteFieldPath(s.field,r))).value();return this.passesConditions(n)}relativeLhsToAbsoluteFieldPath(r,e){return r.startsWith("$parent.")&&(r=new ParentResolver(this.dottedFieldPath).resolve(r)),r.startsWith("$root.")||r.startsWith("root.")?r.replace(new RegExp("^\\$?root\\."),""):e?e+"."+r:r}}class FieldConditions{showField(e,t){return new Validator(e,t).passesConditions()}}class Statamic{constructor(){this.$conditions=new FieldConditions}}window.Statamic=new Statamic});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.