UNPKG

@liquify/prettify

Version:

Prettify 🎀 ~ Language beautification support for multiple languages with the Sparser lexing algorithm.

1 lines • 205 kB
var Pt=Object.defineProperty;var Bt=(i,u)=>{for(var h in u)Pt(i,h,{get:u[h],enumerable:true});};var $=function(){const i=typeof process!=="undefined"&&process.versions!=null?"node":"browser";let u="";return {env:i,mode:"beautify",end:0,iterator:0,start:0,scopes:[],beautify:{},lexers:{},get source(){return i==="node"&&Buffer.isBuffer(u)?u.toString():u},set source(h){u=i==="node"?Buffer.isBuffer(h)?h:Buffer.from(h):h;},data:{begin:[],ender:[],lexer:[],lines:[],stack:[],token:[],types:[]},hooks:{before:[],language:[],rules:[],after:[]},stats:{chars:-1,time:-1,size:"",language:""},options:{grammar:{},lexer:"markup",language:"liquid",languageName:"Liquid",mode:"beautify",indentLevel:0,crlf:false,endNewline:false,indentChar:" ",indentSize:2,preserveLine:2,wrap:0,liquid:{commentNewline:false,commentIndent:true,delimiterTrims:"preserve",ignoreTagList:[],lineBreakSeparator:"default",normalizeSpacing:true,preserveComment:false,quoteConvert:"none",valueForce:"intent"},markup:{correct:false,commentNewline:false,commentIndent:true,attributeCasing:"preserve",attributeSort:false,attributeSortList:[],forceAttribute:3,forceLeadAttribute:true,forceIndent:false,ignoreStyles:false,ignoreScripts:false,preserveComment:false,preserveText:false,preserveAttributes:false,selfCloseSpace:true,quoteConvert:"none"},style:{correct:false,atRuleSpace:true,compressCSS:false,classPadding:false,noLeadZero:false,sortSelectors:false,sortProperties:false,quoteConvert:"none",forceValue:"preserve"},script:{arrayFormat:"default",braceNewline:false,bracePadding:false,braceStyle:"none",braceAllman:false,caseSpace:false,commentIndent:false,commentNewline:false,correct:false,elseNewline:false,endComma:"never",functionNameSpace:false,functionSpace:false,methodChain:4,neverFlatten:false,noCaseIndent:false,noSemicolon:false,objectSort:false,objectIndent:"default",preserveComment:false,quoteConvert:"none",styleGuide:"none",ternaryLine:false,variableList:"none",vertical:false},json:{useStringify:false,arrayFormat:"default",braceAllman:false,bracePadding:false,objectIndent:"default",objectSort:false}}}}();var qe=Object.assign;var it=Object.create;var He=Object.keys;var rt=Object.defineProperty;var Re=Array.isArray;var g="";var oe=" ";var he="\n";function Ee(i){return new Set(i)}function ot(...i){return i.join(he)}function _e(i,u=oe){if(i===0)return u;let h=g;let f=1;do{h+=u;}while(f++<i);return h}var c=(i,u)=>i?i.charCodeAt(0)===u:false;c.last=(i,u)=>c(i[i.length-1],u);var te=(i,u)=>c(i,u)===false;te.last=(i,u)=>c.last(i,u)===false;function de(i){return /\s/.test(i)}function yt(i){const u=1024;const h=1048576;const f=1073741824;if(i<u)return i+" B";else if(i<h)return (i/u).toFixed(1)+" KB";else if(i<f)return (i/h).toFixed(1)+" MB";else return (i/f).toFixed(1)+" GB"}function ct(i){return `\\${i}`}function Be(i,u=NaN){if(typeof i!=="string")return g;if(te(i,60)&&te(i,123))return i;if(c(i,60)){const n=i.search(/[\s>]/);const e=i.slice(c(i[1],47)?2:1,n);return c(e,63)&&c.last(e,63)?"xml":isNaN(u)?e.toLowerCase():e.slice(u).toLowerCase()}const h=c(i[2],45)?i.slice(3).trimStart():i.slice(2).trimStart();const f=h.slice(0,h.search(/[\s=|!<>,.[]|-?[%}]}/)).toLowerCase();return isNaN(u)?f:f.slice(u)}function xt(i){const u=i.indexOf("{");if(c(i[u+1],37)){let h;h=i.slice(u+(c(i[u+2],45)?3:2)).trimStart();h=h.slice(0,h.search(/[\s=|!<>,.[]|-?[%}]}/));return h.startsWith("end")?false:pe.liquid.control.has(h)}return false}function wt(i){const u=i.indexOf("{");if(c(i[u+1],37)){let h;h=i.slice(u+(c(i[u+2],45)?3:2)).trimStart();h=h.slice(0,h.search(/[\s=|!<>,.[]|-?[%}]}/));return h.startsWith("end")?false:pe.liquid.else.has(h)}return false}function St(i){const u=i.indexOf("=");if(u>-1){if(c(i[u+1],34)||c(i[u+1],39)){return /{%-?\s*end\w+/.test(i.slice(u,i.lastIndexOf(i[u+1])))}}return false}function ut(i){if(Ge(i))return /{%-?\s*end\w+/.test(i);return false}function Ge(i,u=false){let h;if(u){if(c(i[0],123)&&c(i[1],37)&&c(i[i.length-2],37)&&c(i[i.length-1],125)){h=i.slice(c(i[2],45)?3:2).trimStart();if(c(h,34)||c(h,39))return false;h=h.slice(0,h.search(/[\s=|!<"'>,.[]|-?[%}]}/));return h.startsWith("end")?false:pe.liquid.tags.has(h)}return false}let f=i.indexOf("{");if(f===-1)return false;do{if(c(i[f+1],37)){h=i.slice(f+(c(i[f+2],45)?3:2)).trimStart();h=h.slice(0,h.search(/[\s=|!<>,.[]|-?[%}]}/));return h.startsWith("end")?false:pe.liquid.tags.has(h)}f=i.indexOf("{",f+1);}while(f>-1);return false}function tt(i){let u=i;if(Array.isArray(i))u=i.join("");const h=u.indexOf("{");if(c(u[h+1],37)){if(c(u[h+2],45))return u.slice(h+3).trimStart().startsWith("end");return u.slice(h+2).trimStart().startsWith("end")}return false}function Me(i,u){if(u===1){return c(i[0],123)&&(c(i[1],37)||c(i[1],123))}else if(u===6){return c(i[0],123)&&c(i[1],37)}else if(u===7){return c(i[0],123)&&c(i[1],123)}else if(u===8){return c(i[i.length-2],37)&&c(i[i.length-1],125)}else if(u===9){return c(i[i.length-2],125)&&c(i[i.length-1],125)}else if(u===4){return /{[{%]/.test(i)}else if(u===5){return /{[{%]/.test(i)&&/[%}]}/.test(i)}else if(u===2){const h=i.length;return c(i[h-1],125)&&(c(i[h-2],37)||c(i[h-2],125))}else if(u===3){const h=i.length;return c(i[0],123)&&(c(i[1],37)||c(i[1],123))&&(c(i[h-1],125)&&(c(i[h-2],37)||c(i[h-2],125)))}}function ft(i){let u=0;const h=i.length;const f=i;const n=()=>{let S=0;const P=f.length;if(S<P){do{if(Re(f[S])===true)f[S]=ft.apply(this,f[S]);S=S+1;}while(S<P)}};const e=S=>{let P=u;let _=0;let R=0;let b=0;let t=[];let o=f[u];let d="";const I=typeof o;if(P<h){do{d=typeof f[P];if(f[P]<o||d<I){o=f[P];t=[P];}else if(f[P]===o){t.push(P);}P=P+1;}while(P<h)}R=t.length;P=u;_=R+u;if(P<_){do{f[t[b]]=f[P];f[P]=o;b=b+1;P=P+1;}while(P<_)}u=u+R;if(u<h){e("");}else {if(this.recursive===true)n();i=f;}return S};e("");return i}function pt(i){let u=0;const h=i.length;const f=i;const n=()=>{let S=0;const P=f.length;if(S<P){do{if(Re(f[S]))f[S]=pt.apply(this,f[S]);S=S+1;}while(S<P)}};const e=S=>{let P=u;let _=0;let R=0;let b=0;let t=f[u];let o=[];let d="";const I=typeof t;if(P<h){do{d=typeof f[P];if(f[P]>t||d>I){t=f[P];o=[P];}else if(f[P]===t){o.push(P);}P=P+1;}while(P<h)}R=o.length;P=u;_=R+u;if(P<_){do{f[o[b]]=f[P];f[P]=t;b=b+1;P=P+1;}while(P<_)}u=u+R;if(u<h){e("");}else {if(this.recursive===true)n();i=f;}return S};e("");return i}function ht(i){let u=i;const h=[i[0]];const f=()=>{let e=0;const S=u.length;if(e<S){do{if(Re(u[e]))u[e]=ht.apply(this,u[e]);e=e+1;}while(e<S)}};const n=e=>{let S=0;const P=[];const _=u.length;if(S<_){do{if(u[S]!==e)P.push(u[S]);S=S+1;}while(S<_)}u=P;if(P.length>0){h.push(P[0]);n(P[0]);}else {if(this.recursive===true)f();i=u;}};n(this.array[0]);return i}var ke;var pe=new(ke=class{constructor(){this.script={};this.style={};this.html={embed:{}};this.liquid={embed:{}};this.script.keywords=Ee(ke.script.keywords);this.style.units=Ee(ke.style.units);this.style.atrules=Ee(ke.style.atrules);this.style.pseudoFunctions=Ee(ke.style.pseudo.functions);this.style.pseudoClasses=Ee(ke.style.pseudo.classes);this.style.pseudoElements=Ee(ke.style.pseudo.elements);this.style.webkitClasses=Ee(ke.style.webkit.classes);this.style.webkitElements=Ee(ke.style.webkit.elements);this.html.tags=Ee(ke.html.tags);this.html.voids=Ee(ke.html.voids);this.liquid.tags=Ee(ke.liquid.tags);this.liquid.control=Ee(ke.liquid.control);this.liquid.else=Ee(ke.liquid.else);this.liquid.singletons=Ee(ke.liquid.singletons);this.liquid.scripts=new Set;this.liquid.styles=new Set;this.defaults();}defaults(){for(const u in ke.html.embedded){this.html.embed[u]={};for(const{language:h,attribute:f=null}of ke.html.embedded[u]){this.html.embed[u].language=h;if(typeof f==="object"){for(const n in f){this.html.embed[u].attribute=n;if(Re(f[n])){this.html.embed[u].value=e=>new Set(f[n]).has(e);}else {this.html.embed[u].value=e=>new RegExp(f[n]).test(e);}}}else {this.html.embed[u].attribute=null;}}}for(const u in ke.liquid.embedded){this.liquid.embed[u]={end:h=>new RegExp(`^{%-?\\s*end${u}`).test(h)};for(const{language:h,argument:f}of ke.liquid.embedded[u]){this.liquid.embed[u].language=h;if(f){if(Re(f)){this.liquid.embed[u].attribute=n=>new Set(f).has(n);}else {this.liquid.embed[u].attribute=n=>new RegExp(f).test(n);}}else {this.liquid.embed[u].attribute=null;}}}}atrules(u){for(const h of ke.style.atrules)if(u.startsWith(h))return h;return u}embed(u,h){if(h in this[u].embed){return this[u].embed[h]}return false}extend(u){for(const h in u){if(h==="html"){if("tags"in u[h]&&Re(u[h].tags)){for(const f of u[h].tags){if(!this.html.tags.has(f)){ke.html.tags.push(f);this.html.tags.add(f);}}}if("voids"in u[h]&&Re(u[h].voids)){for(const f of u[h].voids){if(!this.html.voids.has(f)){ke.html.voids.push(f);this.html.voids.add(f);}}}if("embedded"in u[h]);}if(h==="liquid"){if("tags"in u[h]&&Re(u[h].tags)){for(const f of u[h].tags){if(!this.liquid.tags.has(f)){ke.liquid.tags.push(f);this.liquid.tags.add(f);}}}if("else"in u[h]&&Re(u[h].else)){for(const f of u[h].else){if(!this.liquid.else.has(f)){ke.liquid.else.push(f);this.liquid.else.add(f);}}}if("singletons"in u[h]&&Re(u[h].singletons)){for(const f of u[h].singletons){if(!this.liquid.singletons.has(f)){ke.liquid.singletons.push(f);this.liquid.singletons.add(f);}}}if("embedded"in u[h]&&typeof u[h].embedded==="object"){for(const f in u[h].embedded){if(!(f in this.liquid.embed)){this.liquid.embed[f]={end:n=>new RegExp(`{%-?\\s*end${f}`).test(n)};}for(const{language:n,argument:e}of u[h].embedded[f]){if(this.liquid.embed[f].language!==n){this.liquid.embed[f].language=n;}if(e){if(this.liquid.embed[f].attribute===null){if(Re(e)){this.liquid.embed[f].attribute=S=>Ee(e).has(S);}else {this.liquid.embed[f].attribute=S=>new RegExp(e).test(S);}}else {const S=[];for(const P of ke.liquid.embedded[f]){if(Re(P.argument)){for(const _ of P.argument){if(e!==_)S.push(e);else S.push(_);}this.liquid.embed[f].attribute=_=>Ee(S).has(_);}else {if(P.argument!==e){this.liquid.embed[f].attribute=_=>new RegExp(e).test(_);}}}}}}}}}if(h==="style"){if("units"in u[h]&&Re(u[h].units)){for(const f of u[h].units){if(!this.style.units.has(f)){ke.style.units.push(f);this.style.units.add(f);}}}if("atrules"in u[h]&&Re(u[h].atrules)){for(const f of u[h].atrules){if(!this.style.atrules.has(f)){ke.style.atrules.push(f);this.style.atrules.add(f);}}}if("webkit"in u[h]){if("classes"in u[h].webkit&&Re(u[h].webkit.classes)){for(const f of u[h].webkit.classes){if(!this.style.webkitClasses.has(f)){ke.style.webkit.classes.push(f);this.style.webkitClasses.add(f);}}}if("elements"in u[h].webkit&&Re(u[h].webkit.elements)){for(const f of u[h].webkit.elements){if(!this.style.webkitElements.has(f)){ke.style.webkit.elements.push(f);this.style.webkitElements.add(f);}}}}if("pseudo"in u[h]){if("classes"in u[h].pseudo&&Re(u[h].pseudo.classes)){for(const f of u[h].pseudo.classes){if(!this.style.pseudoClasses.has(f)){ke.style.pseudo.classes.push(f);this.style.pseudoClasses.add(f);}}}if("elements"in u[h].pseudo&&Re(u[h].pseudo.elements)){for(const f of u[h].pseudo.elements){if(!this.style.pseudoElements.has(f)){ke.style.pseudo.elements.push(f);this.style.pseudoElements.add(f);}}}}}if(h==="script"){if("keywords"in u[h]&&Re(u[h].keywords)){for(const f of u[h].keywords){if(!this.script.keywords.has(f)){ke.script.keywords.push(f);this.script.keywords.add(f);}}}}}}},ke.script={keywords:["ActiveXObject","ArrayBuffer","AudioContext","Canvas","CustomAnimation","DOMParser","DataView","Date","Error","EvalError","FadeAnimation","FileReader","Flash","Float32Array","Float64Array","FormField","Frame","Generator","HotKey","Image","Iterator","Intl","Int16Array","Int32Array","Int8Array","InternalError","Loader","Map","MenuItem","MoveAnimation","Notification","ParallelArray","Point","Promise","Proxy","RangeError","Rectangle","ReferenceError","Reflect","RegExp","ResizeAnimation","RotateAnimation","Set","SQLite","ScrollBar","Set","Shadow","StopIteration","Symbol","SyntaxError","Text","TextArea","Timer","TypeError","URL","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","URIError","WeakMap","WeakSet","Web","Window","XMLHttpRequest"]},ke.html={embedded:{script:[{language:"javascript"},{language:"json",attribute:{type:["application/json","application/ld+json"]}},{language:"jsx",attribute:{type:["text/jsx","application/jsx"]}}],style:[{language:"css"}]},voids:["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","path","source","track","use","wbr"],tags:["body","colgroup","dd","dt","head","html","li","option","tbody","td","tfoot","th","thead","tr"]},ke.liquid={embedded:{schema:[{language:"json"}],style:[{language:"css"}],stylesheet:[{language:"css"},{language:"scss",argument:/\s*['"]scss['"]/}],javascript:[{language:"javascript"}]},tags:["form","paginate","capture","case","comment","for","if","raw","tablerow","unless","schema","style","script","stylesheet","javascript"],control:["if","unless","case"],else:["else","elsif"],singletons:["include","layout","section","assign","liquid","break","continue","cycle","decrement","echo","increment","render","when"]},ke.style={units:["%","cap","ch","cm","deg","dpcm","dpi","dppx","em","ex","fr","grad","Hz","ic","in","kHz","lh","mm","ms","mS","pc","pt","px","Q","rad","rem","rlh","s","turn","vb","vh","vi","vmax","vmin","vw"],atrules:["@charset","@color-profile","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@supports"],webkit:{classes:["webkit-any","webkit-any-link*","webkit-autofill"],elements:["webkit-file-upload-button","webkit-inner-spin-button","webkit-input-placeholder","webkit-meter-bar","webkit-meter-even-less-good-value","webkit-meter-inner-element","webkit-meter-optimum-value","webkit-meter-suboptimum-value","webkit-outer-spin-button","webkit-progress-bar","webkit-progress-inner-element","webkit-progress-value","webkit-search-cancel-button","webkit-search-results-button","webkit-slider-runnable-track","webkit-slider-thumb"]},pseudo:{classes:["active","any-link","checked","default","defined","disabled","empty","enabled","first","first-child","first-of-type","fullscreen","focus","focus-visible","focus-within","host","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","modal","not","nth-child","nth-col","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","picture-in-picture","placeholder-shown","paused","playing","read-only","read-write","required","right","root","scope","target","valid","visited","where"],elements:["after","backdrop","before","cue","cue-region","first-letter","first-line","file-selector-button","marker","part","placeholder","selection","slotted"],functions:["after","before","first-letter","first-line","host","host-context","part","slotted","lang","not","nth-child","nth-col","nth-last-child","nth-last-of-type","nth-of-type","where"]}},ke);var lt={markup:"markup",html:"markup",liquid:"markup",xml:"markup",javascript:"script",typescript:"script",jsx:"script",tsx:"script",json:"script",less:"style",scss:"style",sass:"style",css:"style",text:"text"};var Ot={html:"HTML",xhtml:"XHTML",liquid:"Liquid",xml:"XML",jsx:"JSX",tsx:"TSX",json:"JSON",yaml:"YAML",css:"CSS",scss:"SCSS",sass:"SASS",less:"LESS",text:"Plain Text",javascript:"JavaScript",typescript:"TypeScript"};function nt(i){return typeof i!=="string"||i.indexOf("html")>-1||lt[i]===void 0?"markup":lt[i]}function dt(i){if(typeof i!=="string"||Ot[i]===void 0)return i.toUpperCase();return Ot[i]}function ve(i){const u={};if(i==="unknown"){u.language=i;u.languageName="Unknown";u.lexer="markup";}else if(i==="xhtml"||i==="markup"){u.language="xml";u.languageName="XHTML";u.lexer="markup";}else {u.language=i;u.languageName=dt(i);u.lexer=nt(i);}if($.hooks.language.length>0){for(const h of $.hooks.language){const f=h(u);if(typeof f==="object")qe(u,f);}}return u}Ve.reference=ve;Ve.listen=function(i){$.hooks.language.push(i);};function Ve(i){let u=[];let h=0;const f=/(((var)|(let)|(const)|(function)|(import))\s+(\w|\$)+[a-zA-Z0-9]*)/.test(i)&&/@import/.test(i)===false;const n=/((((final)|(public)|(private))\s+static)|(static\s+void))/.test(i);function e(){if(/\n\s*#+\s+/.test(i)||/^#+\s+/.test(i))return ve("markdown");if(/\$[a-zA-Z]/.test(i)||/\{\s*(\w|\.|\$|#)+\s*\{/.test(i)||/^[.#]?[\w][\w-]+\s+\{(?:\s+[a-z][a-z-]+:\s*\S+;)+\s+[&>+]?\s+[.#:]?[\w][\w-]\s+\{/.test(i)&&/:\s*@[a-zA-Z];/.test(i)===false)return ve("scss");if(/@[a-zA-Z]:/.test(i)||/\.[a-zA-Z]\(\);/.test(i))return ve("less");return ve("css")}function S(){let _=1;let R=g;let b=false;let t=false;const o=/((public)|(private))\s+(static\s+)?(((v|V)oid)|(class)|(final))/.test(i);function d(){if(i.indexOf("(")>-1||i.indexOf("=")>-1||i.indexOf(";")>-1&&i.indexOf("{")>-1){if(n===true||/\w<\w+(,\s+\w+)*>/.test(i))return ve("typescript");if(/(?:var|let|const)\s+\w+\s*:/.test(i)||/=\s*<\w+/.test(i))return ve("typescript");return ve("javascript")}return ve("unknown")}function I(){if(/:\s*(?:number|string|boolean|any|unknown)(?:\[\])?/.test(i)||/(?:public|private)\s+/.test(i)||/(?:export|declare)\s+type\s+\w+\s*=/.test(i)||/(?:namespace|interface|enum|implements|declare)\s+\w+/.test(i)||/(?:typeof|keyof|as)\s+\w+/.test(i)||/\w+\s+as\s+\w+/.test(i)||/\[\w+(?:(?::\s*\w+)|(?:\s+in\s+\w+))\]:/.test(i)||/\):\s*\w+(?:\[\])?\s*(?:=>|\{)\s+/.test(i)||/(var|const|let)\s+\w+:\s*(string|number|boolean|string|any)(\[\])?/.test(i))return ve("typescript");if(/\s(class|var|const|let)\s+\w/.test(i)===false&&/<[a-zA-Z](?:-[a-zA-Z])?/.test(i)&&/<\/[a-zA-Z-](?:-[a-zA-Z])?/.test(i)&&(/\s?\{%/.test(i)||/{{/.test(i)))return ve("liquid");if(/^(\s*[$@])/.test(i)===false&&/([}\]];?\s*)$/.test(i)){if(/^\s*import\s+\*\s+as\s+\w+\s+from\s+['"]/.test(i)||/module\.export\s+=\s+/.test(i)||/export\s+default\s+\{/.test(i)||/[?:]\s*[{[]/.test(i)||/^(?:\s*return;?(?:\s+[{[])?)/.test(i)){return ve("javascript")}}if(/{%/.test(i)&&/{{/.test(i)&&/<\w/.test(i))return ve("liquid");if(/{\s*(?:\w|\.|@|#)+\s*\{/.test(i))return ve("less");if(/\$(\w|-)/.test(i))return ve("scss");if(/[;{:]\s*@\w/.test(i)===true)return ve("less");return ve("css")}if(_<h){do{if(b===false){if(c(u[_],42)&&c(u[_-1],47)){u[_-1]=g;b=true;}else if(t===false&&_<h-6&&u[_].charCodeAt(0)===102&&u[_+1].charCodeAt(0)===105&&u[_+2].charCodeAt(0)===108&&u[_+3].charCodeAt(0)===116&&u[_+4].charCodeAt(0)===101&&u[_+5].charCodeAt(0)===114&&c(u[_+6],58)){t=true;}}else if(b===true&&c(u[_],42)&&_!==h-1&&c(u[_+1],47)){b=false;u[_]=g;u[_+1]=g;}else if(t===true&&c(u[_],59)){t=false;u[_]=g;}if(b===true||t===true)u[_]=g;_=_+1;}while(_<h)}R=u.join(g);if(/\s\/\//.test(i)===false&&/\/\/\s/.test(i)===false&&/^(\s*(\{|\[)(?!%))/.test(i)===true&&/((\]|\})\s*)$/.test(i)&&i.indexOf(",")!==-1)return ve("json");if(/((\}?(\(\))?\)*;?\s*)|([a-z0-9]("|')?\)*);?(\s*\})*)$/i.test(i)===true&&(f===true||o===true||/console\.log\(/.test(i)===true||/export\s+default\s+class\s+/.test(i)===true||/export\s+(const|var|let|class)s+/.test(i)===true||/document\.get/.test(i)===true||/((=|(\$\())\s*function)|(\s*function\s+(\w*\s+)?\()/.test(i)===true||i.indexOf("{")===-1||/^(\s*if\s+\()/.test(i)===true))return d();if(i.indexOf("{")>-1&&(/^(\s*[\u007b\u0024\u002e#@a-z0-9])/i.test(i)||/^(\s*\/(\*|\/))/.test(i)||/^(\s*\*\s*\{)/.test(i))&&/^(\s*if\s*\()/.test(i)===false&&/=\s*(\{|\[|\()/.test(R)===false&&(/(\+|-|=|\?)=/.test(R)===false||/\/\/\s*=+/.test(R)||/=+('|")?\)/.test(i)&&/;\s*base64/.test(i))&&/function(\s+\w+)*\s*\(/.test(R)===false)return I();return i.indexOf("{%")>-1?ve("liquid"):ve("unknown")}function P(){function _(){return /{%-?\s*(schema|for|if|unless|render|include)/.test(i)||/{%-?\s*end\w+/.test(i)||/{{-?\s*content_for/.test(i)||/{{-?\s*[a-zA-Z0-9_'".[\]]+\s*-?}}/.test(i)||/{%/.test(i)&&/%}/.test(i)&&/{{/.test(i)&&/}}/.test(i)?ve("liquid"):ve("html")}return /^(\s*<!doctype\s+html>)/i.test(i)||/^(\s*<html)/i.test(i)||/<form\s/i.test(i)&&/<label\s/i.test(i)&&/<input\s/i.test(i)||(/<img(\s+\w+=['"]?\S+['"]?)*\s+src\s*=/.test(i)||/<a(\s+\w+=['"]?\S+['"]?)*\s+href\s*=/.test(i))||/<ul\s/i.test(i)&&/<li\s/i.test(i)&&/<\/li>/i.test(i)&&/<\/ul>/i.test(i)||/<head\s*>/.test(i)&&/<\/head>/.test(i)||/^(\s*<!DOCTYPE\s+((html)|(HTML))\s+PUBLIC\s+)/.test(i)&&/XHTML\s+1\.1/.test(i)===false&&/XHTML\s+1\.0\s+(S|s)((trict)|(TRICT))/.test(i)===false?_():/\s?{[{%]-?/.test(i)?ve("liquid"):ve("xml")}if(i===null||i.replace(/\s+/g,g)===g)return ve("unknown");if((/\n\s*#{1,6}\s+/.test(i)||/\n\s*(?:\*|-|(?:\d+\.))\s/.test(i))&&(/\[( |x|X)\]/.test(i)||/\s[*_~]{1,2}\w+[*_~]{1,2}/.test(i)||/\n\s*```[a-zA-Z]*?\s+/.test(i)||/-+\|(-+\|)+/.test(i)))return ve("markdown");if(/^(\s*<!DOCTYPE\s+html>)/i.test(i))return P();if(/^\s*@(?:charset|import|include|keyframes|media|namespace|page)\b/.test(i))return e();if(n===false&&/=(>|=|-|\+|\*)/.test(i)===false&&/^(?:\s*((if)|(for)|(function))\s*\()/.test(i)===false&&/(?:\s|;|\})((if)|(for)|(function\s*\w*))\s*\(/.test(i)===false&&f===false&&/return\s*\w*\s*(;|\})/.test(i)===false&&(i===void 0||/^(?:\s*#(?!(!\/)))/.test(i)||/\n\s*(\.|@)\w+(\(|(\s*:))/.test(i)&&/>\s*<\w/.test(i)===false||(/^\s*:root\s*\{/.test(i)||/-{2}\w+\s*\{/.test(i)||/^\s*(?:body|button|hr|section|h[1-6]|p|strong|\*)\s+\{\s+/.test(i))))return e();u=i.replace(/\[[a-zA-Z][\w-]*=['"]?[a-zA-Z][\w-]*['"]?\]/g,g).split(g);h=u.length;if(/^(\s*({{|{%|<))/.test(i))return P();if(n===true||/^(?:[\s\w-]*<)/.test(i)===false&&/(?:>[\s\w-]*)$/.test(i)===false)return S();return (/^(?:\s*<\?xml)/.test(i)||/(?:>[\w\s:]*)?<(?:\/|!|#)?[\w\s:\-[]+/.test(i)||/^\s*</.test(i)&&/<\/\w+(\w|\d)+>\s*$/.test(i))&&(/^(?:[\s\w]*<)/.test(i)||/(?:>[\s\w]*)$/.test(i))||/^(?:\s*<s((cript)|(tyle)))/i.test(i)&&/(?:<\/s((cript)|(tyle))>\s*)$/i.test(i)?/^(?:[\s\w]*<)/.test(i)===false||/(?:>[\s\w]*)$/.test(i)===false?S():P():ve("unknown")}var s=new class cn{constructor(){this.data={begin:[],ender:[],lexer:[],lines:[],stack:[],token:[],types:[]};this.structure=[["global",-1]];this.attributes=new Map;this.references=[[]];this.count=-1;this.lineStart=0;this.lineNumber=0;this.linesSpace=0;this.error=g;this.diagnostic={};}get scope(){const[u,h]=this.structure[this.structure.length-1];return {token:u,index:h}}get current(){const{begin:u,ender:h,lexer:f,lines:n,stack:e,token:S,types:P}=this.data;return {begin:u[u.length-1],ender:h[h.length-1],lexer:f[f.length-1],lines:n[n.length-1],stack:e[e.length-1],token:S[u.length-1],types:P[u.length-1]}}get(u){return {begin:this.data.begin[u],ender:this.data.ender[u],lexer:this.data.lexer[u],lines:this.data.lines[u],stack:this.data.stack[u],token:this.data.token[u],types:this.data.types[u]}}full(){this.error=g;this.count=-1;this.linesSpace=0;this.lineNumber=1;this.references=[[]];this.data.begin=[];this.data.ender=[];this.data.lexer=[];this.data.lines=[];this.data.stack=[];this.data.token=[];this.data.types=[];this.structure=[["global",-1]];this.structure.pop=()=>{const u=this.structure.length-1;const h=this.structure[u];if(u>0)this.structure.splice(u,1);return h};return this.data}increment(){this.error=g;this.count=-1;this.linesSpace=0;this.lineNumber=0;this.references=[[]];this.data.begin=[];this.data.ender=[];this.data.lexer=[];this.data.lines=[];this.data.stack=[];this.data.token=[];this.data.types=[];this.structure=[["global",-1]];this.structure.pop=()=>{const u=this.structure.length-1;const h=this.structure[u];if(u>0)this.structure.splice(u,1);return h};return this.data}pushEnder(u){let h=this.count;const f=u.begin[h];if(u.lexer[h]==="style"&&$.options.style.sortProperties===true||u.lexer[h]==="script"&&($.options.script.objectSort===true||$.options.json.objectSort===true)){return}do{if(u.begin[h]===f||u.begin[u.begin[h]]===f&&u.types[h].indexOf("attribute")>-1&&u.types[h].indexOf("attribute_end")<0){u.ender[h]=this.count;}else {h=u.begin[h];}h=h-1;}while(h>f);if(h>-1)u.ender[h]=this.count;}lexer(u,h){const f=lt[h];const n=$.options.language;$.options.language=h;if(h==="json"){const e=qe({},$.options.json);const S=qe({},$.options.script);$.options.script=qe($.options.script,$.options.json,{quoteConvert:"double",endComma:"never",noSemicolon:true,vertical:false});$.lexers[f](u);if(h==="json"&&$.options.json.objectSort===true){this.sortCorrect(0,this.count+1);}$.options.language=n;$.options.json=e;$.options.script=S;}else {$.lexers[f](u);if(h==="javascript"&&$.options.script.objectSort===true||(h==="css"||h==="scss")&&$.options.style.sortProperties===true){this.sortCorrect(0,this.count+1);}$.options.language=n;}}beautify(u){$.options.indentLevel=u;const h=c(this.data.token[$.start],123)?"liquid":"html";const f=Be(this.data.stack[$.start]);const n=pe.embed(h,f);const e=$.options.language;if(n!==false){const P=this.data.lexer[$.start];$.options.language=n.language;if(n.language==="json"){const _=qe({},$.options.json);const R=qe({},$.options.script);$.options.script=qe($.options.script,$.options.json,{quoteConvert:"double",endComma:"never",noSemicolon:true,vertical:false});return {reset(){$.options.language=e;$.options.indentLevel=0;$.options.json=_;$.options.script=R;},get beautify(){return $.beautify[P]($.options)}}}return {reset(){$.options.language=e;$.options.indentLevel=0;},get beautify(){return $.beautify[P]($.options)}}}const S=this.data.lexer[$.start];return {reset(){$.options.language=e;$.options.indentLevel=0;},get beautify(){return $.beautify[S]($.options)}}}push(u,h,f=g){u.begin.push(h.begin);u.ender.push(h.ender);u.lexer.push(h.lexer);u.stack.push(h.stack);u.token.push(h.token);u.types.push(h.types);u.lines.push(h.lines);if(u===this.data){this.count=this.count+1;this.linesSpace=0;if(h.lexer!=="style"&&f.replace(/[{}@<>%#]/g,g)===g){f=h.types==="else"?"else":Be(h.token);}if(h.types==="start"||h.types.indexOf("_start")>0){this.structure.push([f,this.count]);}else if(h.types==="end"||h.types.indexOf("_end")>0){let n=0;const e=this.structure.length;if(this.structure.length>2&&(u.types[this.structure[e-1][1]]==="else"||u.types[this.structure[e-1][1]].indexOf("_else")>0)&&(u.types[this.structure[e-2][1]]==="start"||u.types[this.structure[e-2][1]].indexOf("_start")>0)&&(u.types[this.structure[e-2][1]+1]==="else"||u.types[this.structure[e-2][1]+1].indexOf("_else")>0)){this.structure.pop();u.begin[this.count]=this.structure[this.structure.length-1][1];u.stack[this.count]=this.structure[this.structure.length-1][0];u.ender[this.count-1]=this.count;n=u.ender[u.begin[this.count]+1];}this.pushEnder(u);if(n>0)u.ender[u.begin[this.count]+1]=n;this.structure.pop();}else if(h.types==="else"||h.types.indexOf("_else")>0){if(f===g)f="else";if(this.count>0&&(u.types[this.count-1]==="start"||u.types[this.count-1].indexOf("_start")>0)){this.structure.push([f,this.count]);}else {this.pushEnder(u);this.structure[this.structure.length-1]=f===g?["else",this.count]:[f,this.count];}}}}pop(u){const h={begin:u.begin.pop(),ender:u.ender.pop(),lexer:u.lexer.pop(),lines:u.lines.pop(),stack:u.stack.pop(),token:u.token.pop(),types:u.types.pop()};if(u===this.data)this.count=this.count-1;return h}concat(u,h){u.begin=u.begin.concat(h.begin);u.ender=u.ender.concat(h.ender);u.lexer=u.lexer.concat(h.lexer);u.stack=u.stack.concat(h.stack);u.token=u.token.concat(h.token);u.types=u.types.concat(h.types);u.lines=u.lines.concat(h.lines);if(u===this.data)this.count=u.token.length-1;}sortObject(u){let h=this.count;let f=this.structure[this.structure.length-1][1];let n=0;let e=0;let S=0;let P=0;let _=0;let R=0;let b=0;let t=true;const o=[];const d=f;const I=this.structure[this.structure.length-1][0];const r=this.linesSpace;const C=this.count;const W=$.options.language==="json";const l=u.lexer[h]==="style"&&I==="global";const ee=u.lexer[h]==="style";const J=ee===true?[";","separator"]:[",","separator"];const p=l===true?"global":I;const M={begin:[],ender:[],lexer:[],lines:[],stack:[],token:[],types:[]};const x=(Q,m)=>{let z=Q[0];let L=m[0];if(u.types[z]==="comment"){do z=z+1;while(z<C&&u.types[z]==="comment");if(u.token[z]===void 0)return 1}if(u.types[L]==="comment"){do L=L+1;while(L<C&&u.types[L]==="comment");if(u.token[L]===void 0)return 1}if(ee===true){if(u.token[z].indexOf("@import")===0||u.token[L].indexOf("@import")===0){return z<L?-1:1}if(u.types[z]!==u.types[L]){if(u.types[z]==="function")return 1;if(u.types[z]==="variable")return -1;if(u.types[z]==="selector")return 1;if(u.types[z]==="property"&&u.types[L]!=="variable")return -1;if(u.types[z]==="mixin"&&u.types[L]!=="property"&&u.types[L]!=="variable")return -1}}if(u.token[z].toLowerCase()>u.token[L].toLowerCase())return 1;return -1};P=h;do{if(u.begin[h]===f||l===true&&h<P&&c(u.token[h],125)&&u.begin[u.begin[h]]===-1){if(u.types[h].indexOf("template")>-1)return;if(u.token[h]===J[0]||ee===true&&c(u.token[h],125)&&te(u.token[h+1],59)){t=true;_=h+1;}else if(ee===true&&c(u.token[h-1],125)){t=true;_=h;}if(_===0&&u.types[0]==="comment"){do _=_+1;while(u.types[_]==="comment")}else if(u.types[_]==="comment"&&u.lines[_]<2){_=_+1;}if(t===true&&(u.token[h]===J[0]||ee===true&&c(u.token[h-1],125))&&_<=P){if(ee===true&&"};".indexOf(u.token[P])<0){P=P+1;}else if(ee===false&&te(u.token[P],44)){P=P+1;}o.push([_,P]);if(ee===true&&c(u.token[_],125)){P=_;}else {P=_-1;}}}h=h-1;}while(h>f);if(o.length>0&&o[o.length-1][0]>h+1){n=o[o.length-1][0]-1;if(u.types[n]==="comment"&&u.lines[n]>1){do n=n-1;while(n>0&&u.types[n]==="comment");o[o.length-1][0]=n+1;}if(u.types[h+1]==="comment"&&h===-1){do h=h+1;while(u.types[h+1]==="comment")}o.push([h+1,n]);}if(o.length>1){if(W===true||ee===true||c(u.token[h-1],61)||c(u.token[h-1],58)||c(u.token[h-1],40)||c(u.token[h-1],91)||c(u.token[h-1],44)||u.types[h-1]==="word"||h===0){o.sort(x);b=o.length;t=false;f=0;do{R=o[f][1];if(ee===true){S=R;if(u.types[S]==="comment")S=S-1;if(c(u.token[S],125)){R=R+1;J[0]="}";J[1]="end";}else {J[0]=";";J[1]="separator";}}n=o[f][0];if(ee===true&&u.types[R-1]!=="end"&&u.types[R]==="comment"&&u.types[R+1]!=="comment"&&f<b-1){R=R+1;}if(n<R){do{if(ee===false&&f===b-1&&n===R-2&&c(u.token[n],44)&&u.lexer[n]==="script"&&u.types[n+1]==="comment"){e=e+1;}else {this.push(M,{begin:u.begin[n],ender:u.ender[n],lexer:u.lexer[n],lines:u.lines[n],stack:u.stack[n],token:u.token[n],types:u.types[n]});e=e+1;}if(u.token[n]===J[0]&&(ee===true||u.begin[n]===u.begin[o[f][0]])){t=true;}else if(u.token[n]!==J[0]&&u.types[n]!=="comment"){t=false;}n=n+1;}while(n<R)}if(t===false&&M.token[M.token.length-1]!=="x;"&&(ee===true||f<b-1)){n=M.types.length-1;if(M.types[n]==="comment"){do n=n-1;while(n>0&&M.types[n]==="comment")}n=n+1;this.splice({data:M,howmany:0,index:n,record:{begin:d,stack:p,ender:this.count,lexer:M.lexer[n-1],lines:0,token:J[0],types:J[1]}});e=e+1;}f=f+1;}while(f<b);this.splice({data:u,howmany:e,index:h+1});this.linesSpace=r;this.concat(u,M);}}}sortSafe(u,h,f){if(Re(u)===false)return u;if(h==="normal")return ht.call({array:u,recursive:f},u);if(h==="descend")return pt.call({recursive:f},u);return ft.call({recursive:f},u)}sortCorrect(u,h){let f=u;let n=-1;const e=this.data;const S=[];const P=this.structure.length<2?[-1]:[this.structure[this.structure.length-2][1]];do{if(f>0&&e.types[f].indexOf("attribute")>-1&&e.types[f].indexOf("end")<0&&e.types[f-1].indexOf("start")<0&&e.types[f-1].indexOf("attribute")<0&&e.lexer[f]==="markup"){P.push(f-1);}if(f>0&&e.types[f-1].indexOf("attribute")>-1&&e.types[f].indexOf("attribute")<0&&e.lexer[P[P.length-1]]==="markup"&&e.types[P[P.length-1]].indexOf("start")<0){P.pop();}if(e.begin[f]!==P[P.length-1]){e.begin[f]=P.length>0?P[P.length-1]:-1;}if(e.types[f].indexOf("else")>-1){if(P.length>0){P[P.length-1]=f;}else {P.push(f);}}if(e.types[f].indexOf("end")>-1)P.pop();if(e.types[f].indexOf("start")>-1)P.push(f);f=f+1;}while(f<h);f=h;do{f=f-1;if(e.types[f].indexOf("end")>-1){S.push(f);n=n+1;}e.ender[f]=n>-1?S[n]:-1;if(e.types[f].indexOf("start")>-1){S.pop();n=n-1;}}while(f>u)}space(u,h){this.linesSpace=1;return f=>{do{if(c(u[f],10))this.lineNumber=this.lineNumber+1;if(de(u[f])===false)break;this.linesSpace=this.linesSpace+1;f=f+1;}while(f<h);return f}}spacer(u){this.linesSpace=1;do{if(u.array[u.index]===he){this.linesSpace=this.linesSpace+1;this.lineNumber=this.lineNumber+1;}if(de(u.array[u.index+1])===false)break;u.index=u.index+1;}while(u.index<u.end);return u.index}splice(u){const{data:h}=this;const f=[h.begin[this.count],h.token[this.count]];if(u.record!==void 0&&u.record.token!==g){u.data.begin.splice(u.index,u.howmany,u.record.begin);u.data.ender.splice(u.index,u.howmany,u.record.ender);u.data.token.splice(u.index,u.howmany,u.record.token);u.data.lexer.splice(u.index,u.howmany,u.record.lexer);u.data.stack.splice(u.index,u.howmany,u.record.stack);u.data.types.splice(u.index,u.howmany,u.record.types);u.data.lines.splice(u.index,u.howmany,u.record.lines);if(u.data===h){this.count=this.count-u.howmany+1;if(f[0]!==h.begin[this.count]||f[1]!==h.token[this.count]){this.linesSpace=0;}}return}u.data.begin.splice(u.index,u.howmany);u.data.ender.splice(u.index,u.howmany);u.data.token.splice(u.index,u.howmany);u.data.lexer.splice(u.index,u.howmany);u.data.stack.splice(u.index,u.howmany);u.data.types.splice(u.index,u.howmany);u.data.lines.splice(u.index,u.howmany);if(u.data===h){this.count=this.count-u.howmany;this.linesSpace=0;}}};var Xe=/^\s+/;var Te=/\s+$/;var Fe=/^[\t\v\f\r \u00a0\u2000-\u200b\u2028-\u2029\u3000]+/;var De=/[\t\v\f \u00a0\u2000-\u200b\u2028-\u2029\u3000]+$/;var gt=/[\t\v\r \u00a0\u2000-\u200b\u2028-\u2029\u3000]+/g;var Ct=/(\/[*/]|{%-?\s*(?:comment\s*-?%}|#)|<!-{2})\s*@prettify\s+/;var vt=/(\/[*/]|{%-?\s*(?:comment\s*-?%})|<!-{2})\s*@prettify-ignore\b/;var Lt=/(\/[*/]|{%-?\s*(?:comment\s*-?%}|#)|<!-{2})\s*@prettify-ignore-next\b/;var At=/{%-?\s*|\s*-?%}/g;var mt=/(\/|\\|\||\*|\[|\]|\{|\})/g;function Ye(i){const{options:u}=$;const h=[];const f=[];const n=u.crlf===true?"\r\n":he;const e=i.begin.replace(mt,ct);const S=c(i.begin[0],123)&&c(i.begin[1],37);const P=new RegExp(`^(${e}\\s*@prettify-ignore-start)`);const _=new RegExp(`(${e}\\s*)`);const R=S?new RegExp(`\\s*${i.ender.replace(At,j=>c(j,123)?"{%-?\\s*":"\\s*-?%}")}$`):new RegExp(i.ender.replace(mt,ct));let b=i.start;let t=0;let o=0;let d=0;let I=0;let r=[];let C=g;let W=g;let l=false;let ee=false;let J=false;let p=g;let M=i.ender.length-1;let x=i.ender.charAt(M);let Q=0;function m(){if(/^\s+$/.test(r[t+1])||r[t+1]===g){do t=t+1;while(t<I&&(/^\s+$/.test(r[t+1])||r[t+1]===g))}if(t<I-1)f.push(g);}function z(){let j=he;b=b+1;do{h.push(i.chars[b]);if(h.slice(h.length-20).join(g)==="@prettify-ignore-end"){if(S){const k=i.chars.indexOf("{",b);if(c(i.chars[k+1],37)){const w=i.chars.slice(k,i.chars.indexOf("}",k+1)+1).join(g);if(R.test(w))i.ender=w;}}b=b+1;break}b=b+1;}while(b<i.end);t=b;M=i.begin.length-1;x=i.begin.charAt(M);do{if(i.begin==="/*"&&c(i.chars[t-1],47)&&(c(i.chars[t],42)||c(i.chars[t],47))){break}if(i.begin!=="/*"&&i.chars[t]===x&&i.chars.slice(t-M,t+1).join(g)===i.begin){break}t=t-1;}while(t>i.start);if(i.begin==="/*"&&c(i.chars[t],42)){j="*/";}else if(i.begin!=="/*"){j=i.ender;}M=j.length-1;x=j.charAt(M);if(j!==he||i.chars[b]!==he){do{h.push(i.chars[b]);if(j===he&&i.chars[b+1]===he)break;if(i.chars[b]===x&&i.chars.slice(b-M,b+1).join(g)===j)break;b=b+1;}while(b<i.end)}if(i.chars[b]===he)b=b-1;p=h.join(g).replace(De,g);return [p,b]}do{h.push(i.chars[b]);if(i.chars[b]===he)s.lineNumber=s.lineNumber+1;if(i.chars[b]===x&&i.chars.slice(b-M,b+1).join(g)===i.ender)break;b=b+1;}while(b<i.end);p=h.join(g);if(P.test(p)===true)return z();if(S===true&&u.liquid.preserveComment===true||S===false&&u.markup.preserveComment===true||u.wrap<1||b===i.end||p.length<=u.wrap&&p.indexOf(he)<0||i.begin==="/*"&&p.indexOf(he)>0&&p.replace(he,g).indexOf(he)>0&&/\n(?!(\s*\*))/.test(p)===false){return [p,b]}t=i.start;if(t>0&&te(i.chars[t-1],10)&&de(i.chars[t-1])){do t=t-1;while(t>0&&te(i.chars[t-1],10)&&de(i.chars[t-1]))}C=i.chars.slice(t,i.start).join(g);const L=new RegExp(he+C,"g");r=p.replace(/\r\n/g,he).replace(L,he).split(he);I=r.length;r[0]=r[0].replace(_,g);r[I-1]=r[I-1].replace(R,g);if(I<2)r=r[0].split(oe);if(r[0]===g){r[0]=i.begin;}else {r.splice(0,0,i.begin);}I=r.length;t=0;do{W=t<I-1?r[t+1].replace(Fe,g):g;if(/^\s+$/.test(r[t])===true||r[t]===g){m();}else if(r[t].replace(Fe,g).length>u.wrap&&r[t].replace(Fe,g).indexOf(oe)>u.wrap){r[t]=r[t].replace(Fe,g);o=r[t].indexOf(oe);f.push(r[t].slice(0,o));r[t]=r[t].slice(o+1);t=t-1;}else {r[t]=i.begin==="/*"&&r[t].indexOf("/*")!==0?` ${r[t].replace(Fe,g).replace(De,g).replace(/\s+/g,oe)}`:`${r[t].replace(Fe,g).replace(De,g).replace(/\s+/g,oe)}`;Q=t<1?u.wrap-(i.begin.length+1):u.wrap;o=r[t].length;d=r[t].replace(Fe,g).indexOf(oe);if(o>Q&&d>0&&d<Q){o=Q;do{o=o-1;if(de(r[t].charAt(o))&&o<=u.wrap)break}while(o>0);if(/^\s*\d+\.\s/.test(r[t])===true&&/^\s*\d+\.\s/.test(r[t+1])===false){r.splice(t+1,0,"1. ");}if(/^\s+$/.test(r[t+1])===true||r[t+1]===g){f.push(r[t].slice(0,o));r[t]=r[t].slice(o+1);l=true;t=t-1;}else if(/^\s*[*-]\s/.test(r[t+1])){f.push(r[t].slice(0,o));r[t]=r[t].slice(o+1);ee=true;t=t-1;}else if(/^\s*\d+\.\s/.test(r[t+1])){f.push(r[t].slice(0,o));r[t]=r[t].slice(o+1);J=true;t=t-1;}else if(r[t].replace(Fe,g).indexOf(oe)<u.wrap){r[t+1]=r[t].length>u.wrap?r[t].slice(o+1)+n+r[t+1]:`${r[t].slice(o+1)} ${r[t+1]}`;}if(l===false&&ee===false&&J===false){r[t]=r[t].slice(0,o);}}else if(r[t+1]!==void 0&&(r[t].length+W.indexOf(oe)>u.wrap&&W.indexOf(oe)>0||r[t].length+W.length>u.wrap&&W.indexOf(oe)<0)){f.push(r[t]);t=t+1;}else if(r[t+1]!==void 0&&/^\s+$/.test(r[t+1])===false&&r[t+1]!==g&&/^\s*(?:[*-]|\d+\.)\s/.test(r[t+1])===false){f.push(r[t]);l=true;}else {f.push(r[t]);l=true;}ee=false;J=false;}t=t+1;}while(t<I);if(f.length>0){if(f[f.length-1].length>u.wrap-(i.ender.length+1)){f.push(i.ender);}else {f.push(i.ender);}p=f.join(n);}else {r[r.length-1]=r[r.length-1]+i.ender;p=r.join(n);}return [p,b]}function Ke(i){const{wrap:u}=$.options;const{preserveComment:h}=$.options[i.lexer];let f=i.start;let n=0;let e=g;let S=[];function P(){let R=g;do{n=n+1;if(c(i.chars[n+1],10))return}while(n<i.end&&de(i.chars[n]));if(i.chars[n]+i.chars[n+1]==="//"){S=[];do{S.push(i.chars[n]);n=n+1;}while(n<i.end&&te(i.chars[n],10));R=S.join(g);if(/^\/\/ (?:[*-]|\d+\.)/.test(R)===false&&/^\/\/\s*$/.test(R)===false){e=`${e} ${R.replace(/(^\/\/\s*)/,g).replace(De,g)}`;f=n-1;P();}}}function _(){const R=[];const b={ender:-1,types:"comment",lexer:i.lexer,lines:s.linesSpace};if(s.count>-1){b.begin=s.structure[s.structure.length-1][1];b.stack=s.structure[s.structure.length-1][0];b.token=s.data.token[s.count];}else {b.begin=-1;b.stack="global";b.token=g;}let t=0;let o=0;e=e.replace(/\s+/g,oe).replace(De,g);o=e.length;if(u>o)return;do{t=u;if(te(e[t],32)){do t=t-1;while(t>0&&te(e[t],32));if(t<3){t=u;do t=t+1;while(t<o-1&&te(e[t],32))}}R.push(e.slice(0,t));e=`// ${e.slice(t).replace(Fe,g)}`;o=e.length;}while(u<o);t=0;o=R.length;do{b.token=R[t];s.push(s.data,b,g);b.lines=2;s.linesSpace=2;t=t+1;}while(t<o)}do{S.push(i.chars[f]);f=f+1;}while(f<i.end&&te(i.chars[f],10));if(f===i.end){i.chars.push(he);}else {f=f-1;}e=S.join(g).replace(De,g);if(/^(\/\/\s*@prettify-ignore-start\b)/.test(e)===true){let R=he;f=f+1;do{S.push(i.chars[f]);f=f+1;}while(f<i.end&&(te(i.chars[f-1],100)||c(i.chars[f-1],100)&&S.slice(S.length-20).join(g)!=="@prettify-ignore-end"));n=f;do;while(n>i.start&&c(i.chars[n-1],47)&&(c(i.chars[n],42)||c(i.chars[n],47)));if(c(i.chars[n],42))R="*/";if(R!==he||te(i.chars[f],10)){do{S.push(i.chars[f]);if(R===he&&c(i.chars[f+1],10))break;f=f+1;}while(f<i.end&&(R===he||R==="*/"&&(c(i.chars[f-1],42)||c(i.chars[f],47))))}if(i.chars[f]===he)f=f-1;e=S.join(g).replace(De,g);return [e,f]}if(e==="//"||h===true)return [e,f];e=e.replace(/(\/\/\s*)/,"// ");if(u<1||f===i.end-1&&s.data.begin[s.count]<1)return [e,f];n=f+1;P();_();return [e,f]}$.lexers.style=function i(u){const{options:h}=$;const f=h.style;const{data:n}=s;const e=u.split(g);const S=u.length;const P=[];const _=[];let R=0;let b=g;let t=g;function o(M){s.push(n,{begin:s.structure[s.structure.length-1][1],ender:-1,lexer:"style",lines:s.linesSpace,stack:s.structure[s.structure.length-1][0],token:t,types:b},M);}function d(M){const x=M;do{M=M-1;}while(e[M]==="\\"&&M>0);return (x-M)%2===1}function I(M){const x=M.replace(/\s*!important/," !important").split(g);const Q=/-?transition$/.test(n.token[s.count-2]);const m=[];const z=/(\s|\(|,)-?0+\.?\d+([a-z]|\)|,|\s)/g;const L=/(\s|\(|,)-?\.?\d+([a-z]|\)|,|\s)/g;let j=0;let k=0;let w=g;let v=x.length;let E=[];const V=G=>{return G};function ne(G){G=G.replace(/\s*/g,g);return /\/\d/.test(G)&&M.indexOf("url(")===0?G:` ${G.charAt(0)} ${G.charAt(1)}`}function ce(G){if(f.noLeadZero===true){return G.replace(/^-?\D0+(\.|\d)/,ie=>ie.replace(/0+/,g))}else if(/0*\./.test(G)){return G.replace(/0*\./,"0.")}else if(/0+/.test(/\d+/.exec(G)[0])){return /^\D*0+\D*$/.test(G)?G.replace(/0+/,"0"):G.replace(/\d+/.exec(G)[0],/\d+/.exec(G)[0].replace(/^0+/,g))}return G}function U(G){return G.replace(",",", ")}function We(G){return `${G} `}function Ce(){const G=j-1;let ie=G;if(G<1)return true;do{ie=ie-1;}while(ie>0&&x[ie]==="\\");return (G-ie)%2===1}if(j<v){do{E.push(x[j]);if(x[j-1]!=="\\"||Ce()===false){if(w===g){if(c(x[j],34)){w='"';k=k+1;}else if(c(x[j],39)){w="'";k=k+1;}else if(c(x[j],40)){w=")";k=k+1;}else if(c(x[j],91)){w="]";k=k+1;}}else if(c(x[j],40)&&c(w,41)||c(x[j],91)&&c(w,93)){k=k+1;}else if(x[j]===w){k=k-1;if(k===0)w=g;}}if(w===g&&c(x[j],32)){E.pop();m.push(V(E.join(g)));E=[];}j=j+1;}while(j<v)}m.push(V(E.join(g)));v=m.length;j=0;if(j<v){do{if(f.noLeadZero===true&&/^-?0+\.\d+[a-z]/.test(m[j])===true){m[j]=m[j].replace(/0+\./,".");}else if(f.noLeadZero===false&&/^-?\.\d+[a-z]/.test(m[j])){m[j]=m[j].replace(".","0.");}else if(z.test(m[j])||L.test(m[j])){m[j]=m[j].replace(z,ce).replace(L,ce);}else if(/^(0+([a-z]{2,3}|%))$/.test(m[j])&&Q===false){m[j]="0";}else if(/^(0+)/.test(m[j])){m[j]=m[j].replace(/0+/,"0");if(/\d/.test(m[j].charAt(1)))m[j]=m[j].substr(1);}else if(/^url\((?!('|"))/.test(m[j])&&m[j].charCodeAt(m[j].length-1)===41){w=m[j].charAt(m[j].indexOf("url(")+4);if(w!=="@"&&te(w,40)&&te(w,60)){if(f.quoteConvert==="double"){m[j]=m[j].replace(/url\(/,'url("').replace(/\)$/,'")');}else {m[j]=m[j].replace(/url\(/,"url('").replace(/\)$/,"')");}}}if(/^(\+|-)?\d+(\.\d+)?(e-?\d+)?\D+$/.test(m[j])){if(!pe.style.units.has(m[j].replace(/(\+|-)?\d+(\.\d+)?(e-?\d+)?/,g))){m[j]=m[j].replace(/(\+|-)?\d+(\.\d+)?(e-?\d+)?/,We);}}if(/^\w+\(/.test(m[j])&&m[j].charAt(m[j].length-1)===")"&&(m[j].indexOf("url(")!==0||m[j].indexOf("url(")===0&&m[j].indexOf(oe)>0)){m[j]=m[j].replace(/,\S/g,U);}j=j+1;}while(j<v)}w=m.join(oe);return w.charAt(0)+w.slice(1).replace(/\s*(\/|\+|\*)\s*(\d|\$)/,ne)}function r(){const M=[];const x=[];const Q=f.quoteConvert;let m=R;let z=0;let L=g;let j=null;let k=false;function w(){x.push(e[m]);if(de(e[m+1]))do{m=m+1;}while(m<S&&de(e[m+1]))}if(m<S){do{if(c(e[m],34)||c(e[m],39)){if(j===null)j=false;if(M[M.length-1]===e[m]&&(e[m-1]!=="\\"||d(m-1)===false)){M.pop();if(Q==="double"){e[m]='"';}else if(Q==="single"){e[m]="'";}}else if(te(M[M.length-1],34)&&te(M[M.length-1],39)&&(te(e[m-1],92)||d(m-1)===false)){M.push(e[m]);if(Q==="double"){e[m]='"';}else if(Q==="single"){e[m]="'";}}else if(e[m-1]==="\\"&&Q!=="none"){if(d(m-1)===true){if(Q==="double"&&c(e[m],39)){x.pop();}else if(Q==="single"&&c(e[m],34)){x.pop();}}}else if(Q==="double"&&c(e[m],34)){e[m]='\\"';}else if(Q==="single"&&c(e[m],39)){e[m]="\\'";}x.push(e[m]);}else if(e[m-1]!=="\\"||d(m-1)===false){if(c(e[m],40)){if(j===null)j=true;M.push(")");w();}else if(c(e[m],91)){j=false;M.push("]");w();}else if((c(e[m],35)||c(e[m],64))&&c(e[m+1],123)){j=false;x.push(e[m]);m=m+1;M.push("}");w();}else if(e[m]===M[M.length-1]){x.push(e[m]);M.pop();}else {x.push(e[m]);}}else {x.push(e[m]);}if(s.structure[s.structure.length-1][0]==="map"&&M.length===0&&(c(e[m+1],44)||c(e[m+1],41))){if(c(e[m+1],41)&&c(n.token[s.count],40)){s.pop(n);s.structure.pop();x.splice(0,0,"(");}else {break}}if(c(e[m+1],58)){z=m;if(de(e[z])){do z=z-1;while(de(e[z]))}L=e.slice(z-6,z+1).join(g);if(L.indexOf("filter")===L.length-6||L.indexOf("progid")===L.length-6){L="filter";}}if(M.length===0){if(c(e[m+1],59)&&d(m+1)===true||c(e[m+1],58)&&te(e[m],58)&&te(e[m+2],58)&&L!=="filter"&&L!=="progid"||(c(e[m+1],123)||c(e[m+1],125))||c(e[m+1],47)&&(c(e[m+2],42)||c(e[m+2],47))){z=x.length-1;if(de(x[z])){do{z=z-1;m=m-1;x.pop();}while(de(x[z]))}break}if(c(e[m+1],44))break}m=m+1;}while(m<S)}R=m;if(s.structure[s.structure.length-1][0]==="map"&&c(x[0],40)){P[P.length-1]=P[P.length-1]-1;}t=x.join(g).replace(/\s+/g,oe).replace(/^\s/,g).replace(/\s$/,g);if(j===true){if(pe.style.atrules.has(pe.atrules(t))&&f.atRuleSpace===true){n.token[s.count]=n.token[s.count].replace(/\s*\(/g," (").replace(/\s*\)\s*/g,") ").replace(/,\(/g,", (");}else {t=t.replace(/\s+\(/g,"(").replace(/\s+\)/g,")").replace(/,\(/g,", (");}}if(b==="colon"&&n.types[s.count-1]==="start"){if(pe.style.pseudoClasses.has(t)){n.token[s.count]=t=":"+t;b="pseudo";k=true;}}else if(s.count>-1&&n.token[s.count].indexOf("extend(")===0){b="pseudo";}else if(j===true&&/\d/.test(t.charAt(0))===false&&/^rgba?\(/.test(t)===false&&t.indexOf("url(")!==0&&(t.indexOf(oe)<0||t.indexOf(oe)>t.indexOf("("))&&t.charAt(t.length-1)===")"){if(c(n.token[s.count],58)){b="value";}else {t=t.replace(/,\u0020?/g,", ");b="function";}t=I(t);}else if(s.count>-1&&`"'`.indexOf(n.token[s.count].charAt(0))>-1&&n.types[s.count]==="variable"){b="item";}else if(c(x[0],64)||x[0]==="$"){if(n.types[s.count]==="colon"&&h.language==="css"&&(n.types[s.count-1]==="property"||n.types[s.count-1]==="variable")){b="value";}else if(s.count>-1){b="item";L=n.token[s.count];m=L.indexOf("(");if(c(L[L.length-1],41)&&m>0){L=L.slice(m+1,L.length-1);n.token[s.count]=n.token[s.count].slice(0,m+1)+I(L)+")";}}t=I(t);}else {b="item";}if(k===false){o(g);}else {k=false;}}function C(M){let x=s.count;let Q=0;let m=g;const z=[];function L(){if(s.count<0)return;if(x>0&&(n.types[x]==="comment"||n.types[x]==="ignore")){do{x=x-1;z.push(n.token[x]);}while(x>0&&n.lexer[x]==="style"&&(n.types[x]==="comment"||n.types[x]==="ignore"))}Q=x-1;if(Q>0&&(n.types[Q]==="comment"||n.types[Q]==="ignore")){do Q=Q-1;while(Q>0&&n.lexer[x]==="style"&&(n.types[Q]==="comment"||n.types[Q]==="ignore"))}if(Q<0)Q=0;if(x<0)x=0;m=n.token[x][0];}function j(w){return w.replace(/\s*&/," &").replace(/\s*&\s*{/," & {").replace(/\s*>\s*/g," > ").replace(/\s*\+\s*/g," + ")}function k(w){let v=w;const E=n.begin[v];n.token[w]=n.token[w].replace(/\s*&/," &").replace(/\s*&\s*{/," & {").replace(/\s*>\s*/g," > ").replace(/\s*\+\s*/g," + ").replace(/:\s+/g,": ").replace(/^\s+/,g).replace(/\s+$/,g).replace(/\s+::\s+/,"::");if(te(n.token[v],44)&&n.types[v]!=="comment"){n.types[v]="selector";}if(c(n.token[v-1],44)||c(n.token[v-1],58)||n.types[v-1]==="comment"||n.types[v-1]==="pseudo"){if(n.types[v-1]==="colon"&&(n.types[v]==="selector"||n.types[v]==="at_rule")&&(n.types[v-2]==="template"||n.types[v-2]==="template_start"||n.types[v-2]==="template_else"||n.types[v-2]==="template_end")){n.token[v-1]=":"+n.token[v]+oe;n.types[v-1]="selector";s.splice({data:n,howmany:1,index:v});}else if(n.types[v-1]==="pseudo"){n.token[v-1]=`${n.token[v-1]}${n.token[v]}`;n.types[v-1]="selector";s.splice({data:n,howmany:1,index:v});}else if(n.types[v-2]==="comment"){n.token[v-1]=j(`${n.token[v-1]}${n.token[v]}`);n.types[v-1]="selector";s.splice({data:n,howmany:1,index:v});}else {do{v=v-1;if(n.begin[v]===E){if(c(n.token[v],59))break;if(te(n.token[v],44)&&n.types[v]!=="comment"){n.types[v]="selector";}if(n.token[v]===":"&&te(n.token[v-1],59)){n.token[v-1]=j(`${n.token[v-1]}:${n.token[v+1]}`);s.splice({data:n,howmany:2,index:v});}}else {break}}while(v>0)}}v=s.count;if(f.sortSelectors===true&&c(n.token[v-1],44)){const V=[n.token[v]];do{v=v-1;if(n.types[v]==="comment"||n.types[v]==="ignore"){do v=v-1;while(v>0&&(n.types[v]==="comment"||n.types[v]==="ignore"))}if(c(n.token[v],44))v=v-1;V.push(n.token[v]);}while(v>0&&(c(n.token[v-1],44)||n.types[v-1]==="selector"||n.types[v-1]==="comment"||n.types[v-1]==="ignore"));V.sort();v=s.count;n.token[v]=V.pop();do{v=v-1;if(n.types[v]==="comment"||n.types[v]==="ignore"){do v=v-1;while(v>0&&(n.types[v]==="comment"||n.types[v]==="ignore"))}if(c(n.token[v],44))v=v-1;n.token[v]=V.pop();}while(v>0&&(c(n.token[v-1],44)||n.types[v-1]==="selector"||n.types[v-1]==="comment"||n.types[v-1]==="ignore"))}x=s.count;L();}L();if(M==="start"&&(n.types[x]==="value"||n.types[x]==="variable")){n.types[x]="item";}if(n.lexer[s.count-1]!=="style"||Q<0){if(M==="colon"){if(c(m,36)||c(m,64)){n.types[x]="variable";}else if(n.stack[x]!=="global"&&(n.types[x]!=="comment"||n.types[x]!=="ignore")){n.types[x]="property";}}else if(n.lexer[x]==="style"){n.types[x]="selector";k(x);}}else if(M==="start"&&n.types[x]==="function"&&n.lexer[x]==="style"){n.types[x]="selector";k(x);}else if(n.types[x]==="item"&&n.lexer[x]==="style"){if(M==="start"){k(x);n.types[x]="selector";if(n.token[x]===":")n.types[Q]="selector";if(n.token[x].indexOf("=\u201C")>0){s.error=`Invalid Quote (\u201C, \\201c) used on line number ${s.lineNumber}`;}else if(n.token[x].indexOf("=\u201D")>0){s.error=`Invalid Quote (\u201D, \\201d) used on line number ${s.lineNumber}`;}}else if(M==="end"){if(c(m,36)||c(m,64)){n.types[x]="variable";}else {n.types[x]="value";}n.token[x]=I(n.token[x]);}else if(M==="separator"){if(n.types[Q]==="colon"||c(n.token[Q],44)||c(n.token[Q],123)){if(te(e[R],59)&&(n.types[Q]==="selector"||n.types[Q]==="at_rule"||c(n.token[Q],123))){n.types[x]="selector";k(x);}else if(c(n.token[x],36)||c(n.token[x],64)){n.types[x]="variable";}else {n.types[x]="value";}n.token[x]=I(n.token[x]);if(n.token[x].charAt(0)==="\u201C"){s.error=`Invalid Quote (\u201C, \\201c) used on line number ${s.lineNumber}`;}else if(n.token[x].charAt(0)==="\u201D"){s.error=`Invalid (\u201D, \\201d) used on line number ${s.lineNumber}`;}}else {if(c(m,36)||c(m,64)){n.types[x]="variable";}else if(n.types[Q]==="value"||n.types[Q]==="variable"){n.token[Q]=n.token[Q]+n.token[x];s.pop(n);}else {n.types[x]="value";}}}else if(M==="colon"){if(c(m,36)||c(m,64)){n.types[x]="variable";}else {n.types[x]="property";}}else if(c(n.token[Q],64)&&(n.types[Q-2]!=="variable"&&n.types[Q-2]!=="property"||n.types[Q-1]==="separator")){n.types[Q]="variable";b="variable";n.token[Q]=I(n.token[Q]);}else if(M===