@nocobase/app 2.0.0-alpha.21 → 2.0.0-alpha.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18,6 +18,6 @@
18
18
  </head>
19
19
  <body>
20
20
  <div id="root"></div>
21
- <script src="/umi.ac3fde7d.js"></script>
21
+ <script src="/umi.6b84c738.js"></script>
22
22
 
23
23
  </body></html>
@@ -18,6 +18,6 @@
18
18
  </head>
19
19
  <body>
20
20
  <div id="root"></div>
21
- <script src="/umi.ac3fde7d.js"></script>
21
+ <script src="/umi.6b84c738.js"></script>
22
22
 
23
23
  </body></html>
@@ -0,0 +1,13 @@
1
+ "use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[5269],{6829:function(Nn,Jt,Qt){Qt.d(Jt,{Kj:function(){return Be}});class O{constructor(e,s,i,r,n){this.kind=e,this.input=s,this.begin=i,this.end=r,this.file=n}getText(){return this.input.slice(this.begin,this.end)}getPosition(){let[e,s]=[1,1];for(let i=0;i<this.begin;i++)this.input[i]===`
2
+ `?(e++,s=1):s++;return[e,s]}size(){return this.end-this.begin}}class ${liquidMethodMissing(e,s){}}const Zt=Object.prototype.toString,Ue=String.prototype.toLowerCase,Te=Object.hasOwnProperty;function f(t){return typeof t=="string"}function k(t){return typeof t=="function"}function Gt(t){return t&&k(t.then)}function ne(t){return t&&k(t.next)&&k(t.throw)&&k(t.return)}function Xt(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function u(t){return t=p(t),f(t)?t:z(t)?"":x(t)?t.map(e=>u(e)).join(""):String(t)}function te(t){return t=p(t),x(t)?t:f(t)&&t.length>0?[t]:es(t)?Array.from(t):ae(t)?Object.keys(t).map(e=>[e,t[e]]):[]}function _(t){return t=p(t),z(t)?[]:x(t)?t:[t]}function p(t){return t instanceof $&&k(t.valueOf)?t.valueOf():t}function ke(t){return+p(t)||0}function oe(t){return typeof t=="number"}function He(t){return t&&k(t.toLiquid)?He(t.toLiquid()):t}function z(t){return t==null}function Kt(t){return t===void 0}function x(t){return Zt.call(t)==="[object Array]"}function We(t){return t&&oe(t.length)}function es(t){return ae(t)&&Symbol.iterator in t}function Ye(t,e){t=t||{};for(const s in t)if(Te.call(t,s)&&e(t[s],s,t)===!1)break;return t}function Je(t){return t[t.length-1]}function ae(t){const e=typeof t;return t!==null&&(e==="object"||e==="function")}function Qe(t,e,s=1){const i=[];for(let r=t;r<e;r+=s)i.push(r);return i}function se(t,e,s=" "){return Ze(t,e,s,(i,r)=>r+i)}function ts(t,e,s=" "){return Ze(t,e,s,(i,r)=>i+r)}function Ze(t,e,s,i){t=String(t);let r=e-t.length;for(;r-- >0;)t=i(t,s);return t}function Ge(t){return t}function ss(t){return[...t].some(s=>s>="a"&&s<="z")?t.toUpperCase():t.toLowerCase()}function is(t,e){return t.length>e?t.slice(0,e-3)+"...":t}function Xe(t,e){return t==null&&e==null?0:t==null?1:e==null||(t=Ue.call(t),e=Ue.call(e),t<e)?-1:t>e?1:0}function le(t){return function(...e){return t.call(this,...e.map(p))}}function N(t){return function(...e){return t.call(this,...e.map(ke))}}function ve(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function*ce(t){const e=new Set;for(const s of t){const i=JSON.stringify(s);e.has(i)||(e.add(i),yield s)}}const Ke="__liquidClass__";class I extends Error{constructor(e,s){super(typeof e=="string"?e:e.message),this.context="",typeof e!="string"&&Object.defineProperty(this,"originalError",{value:e,enumerable:!1}),Object.defineProperty(this,"token",{value:s,enumerable:!1}),Object.defineProperty(this,Ke,{value:"LiquidError",enumerable:!1})}update(){Object.defineProperty(this,"context",{value:hs(this.token),enumerable:!1}),this.message=us(this.message,this.token),this.stack=this.message+`
3
+ `+this.context+`
4
+ `+this.stack,this.originalError&&(this.stack+=`
5
+ From `+this.originalError.stack)}static is(e){return(e==null?void 0:e[Ke])==="LiquidError"}}class rs extends I{constructor(e,s){super(e,s),this.name="TokenizationError",super.update()}}class ns extends I{constructor(e,s){super(e,s),this.name="ParseError",this.message=e.message,super.update()}}class os extends I{constructor(e,s){super(e,s.token),this.name="RenderError",this.message=e.message,super.update()}static is(e){return e.name==="RenderError"}}class et extends I{constructor(e){super(e[0],e[0].token),this.errors=e,this.name="LiquidErrors";const s=e.length>1?"s":"";this.message=`${e.length} error${s} found`,super.update()}static is(e){return e.name==="LiquidErrors"}}class as extends I{constructor(e,s){super(e,s),this.name="UndefinedVariableError",this.message=e.message,super.update()}}class ls extends Error{constructor(e){super(`undefined variable: ${e}`),this.name="InternalUndefinedVariableError",this.variableName=e}}class cs extends Error{constructor(e){super(e),this.name="AssertionError",this.message=e+""}}function hs(t){const[e,s]=t.getPosition(),i=t.input.split(`
6
+ `),r=Math.max(e-2,1),n=Math.min(e+3,i.length);return Qe(r,n+1).map(a=>{const l=a===e?">> ":" ",h=se(String(a),String(n).length);let c=`${l}${h}| `;const d=a===e?`
7
+ `+se("^",s+c.length):"";return c+=i[a-1],c+=d,c}).join(`
8
+ `)}function us(t,e){e.file&&(t+=`, file:${e.file}`);const[s,i]=e.getPosition();return t+=`, line:${s}, col:${i}`,t}const m=[0,0,0,0,0,0,0,0,0,20,4,4,4,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,2,8,0,0,0,0,8,0,0,0,64,0,65,0,0,33,33,33,33,33,33,33,33,33,33,0,0,2,2,2,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],fs=1,Z=4,tt=8,st=16,ds=32,ps=64,gs=128;function he(t){const e=t.charCodeAt(0);return e>=128?!m[e]:!!(m[e]&fs)}m[160]=m[5760]=m[6158]=m[8192]=m[8193]=m[8194]=m[8195]=m[8196]=m[8197]=m[8198]=m[8199]=m[8200]=m[8201]=m[8202]=m[8232]=m[8233]=m[8239]=m[8287]=m[12288]=Z,m[8220]=m[8221]=gs;function S(t,e){if(!t){const s=typeof e=="function"?e():e||`expect ${t} to be true`;throw new cs(s)}}function ue(t,e=`unexpected ${JSON.stringify(t)}`){S(!t,e)}class ms extends ${equals(e){return z(p(e))}gt(){return!1}geq(){return!1}lt(){return!1}leq(){return!1}valueOf(){return null}}class G extends ${equals(e){return e instanceof G?!1:(e=p(e),f(e)||x(e)?e.length===0:ae(e)?Object.keys(e).length===0:!1)}gt(){return!1}geq(){return!1}lt(){return!1}leq(){return!1}valueOf(){return""}static is(e){return e instanceof G}}class _e extends G{equals(e){return e===!1||z(p(e))?!0:f(e)?/^\s*$/.test(e):super.equals(e)}static is(e){return e instanceof _e}}class xe extends ${constructor(e,s,i){super(),this.i=0,this.length=e,this.name=`${i}-${s}`}next(){this.i++}index0(){return this.i}index(){return this.i+1}first(){return this.i===0}last(){return this.i===this.length-1}rindex(){return this.length-this.i}rindex0(){return this.length-this.i-1}valueOf(){return JSON.stringify(this)}}class it{constructor(){this.buffer=""}write(e){this.buffer+=u(e)}}class ys{constructor(){throw this.buffer="",this.stream=null,new Error("streaming not supported in browser")}}class ws{constructor(){this.buffer=""}write(e){e=p(e),typeof e!="string"&&this.buffer===""?this.buffer=e:this.buffer=u(this.buffer)+u(e)}}class rt extends ${constructor(e=()=>""){super(),this.superBlockRender=e}*super(){const e=new it;return yield this.superBlockRender(e),e.buffer}}function A(t){return t&&k(t.equals)&&k(t.gt)&&k(t.geq)&&k(t.lt)&&k(t.leq)}const nt=new ms,ot={true:!0,false:!1,nil:nt,null:nt,empty:new G,blank:new _e};function at(t){const e={};for(const[s,i]of Object.entries(t)){let r=e;for(let n=0;n<s.length;n++){const o=s[n];r[o]=r[o]||{},n===s.length-1&&he(s[n])&&(r[o].needBoundary=!0),r=r[o]}r.data=i,r.end=!0}return e}var fe=function(){return fe=Object.assign||function(e){for(var s,i=1,r=arguments.length;i<r;i++){s=arguments[i];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},fe.apply(this,arguments)};function v(t,e,s,i){function r(n){return n instanceof s?n:new s(function(o){o(n)})}return new(s||(s=Promise))(function(n,o){function a(c){try{h(i.next(c))}catch(d){o(d)}}function l(c){try{h(i.throw(c))}catch(d){o(d)}}function h(c){c.done?n(c.value):r(c.value).then(a,l)}h((i=i.apply(t,e||[])).next())})}function M(t){return v(this,void 0,void 0,function*(){if(!ne(t))return t;let e,s=!1,i="next";do{const r=t[i](e);s=r.done,e=r.value,i="next";try{ne(e)&&(e=M(e)),Gt(e)&&(e=yield e)}catch(n){i="throw",e=n}}while(!s);return e})}function V(t){if(!ne(t))return t;let e,s=!1,i="next";do{const r=t[i](e);if(s=r.done,e=r.value,i="next",ne(e))try{e=V(e)}catch(n){i="throw",e=n}}while(!s);return e}const bs=/%([-_0^#:]+)?(\d+)?([EO])?(.)/;function Ts(t){return[31,ks(t)?29:28,31,30,31,30,31,31,30,31,30,31]}function lt(t){let e=0;for(let s=0;s<t.getMonth();++s)e+=Ts(t)[s];return e+t.getDate()}function ct(t,e){const s=lt(t)+(e-t.getDay()),r=7-new Date(t.getFullYear(),0,1).getDay()+e;return String(Math.floor((s-r)/7)+1)}function ks(t){const e=t.getFullYear();return!!(!(e&3)&&(e%100||e%400===0&&e))}function vs(t){const e=t.getDate();if([11,12,13].includes(e))return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}function _s(t){return parseInt(t.getFullYear().toString().substring(0,2),10)}const xs={d:2,e:2,H:2,I:2,j:3,k:2,l:2,L:3,m:2,M:2,S:2,U:2,W:2},Ss=new Set("aAbBceklpP");function ht(t,e){const s=Math.abs(t.getTimezoneOffset()),i=Math.floor(s/60),r=s%60;return(t.getTimezoneOffset()>0?"-":"+")+se(i,2,"0")+(e.flags[":"]?":":"")+se(r,2,"0")}const Se={a:t=>t.getShortWeekdayName(),A:t=>t.getLongWeekdayName(),b:t=>t.getShortMonthName(),B:t=>t.getLongMonthName(),c:t=>t.toLocaleString(),C:t=>_s(t),d:t=>t.getDate(),e:t=>t.getDate(),H:t=>t.getHours(),I:t=>String(t.getHours()%12||12),j:t=>lt(t),k:t=>t.getHours(),l:t=>String(t.getHours()%12||12),L:t=>t.getMilliseconds(),m:t=>t.getMonth()+1,M:t=>t.getMinutes(),N:(t,e)=>{const s=Number(e.width)||9,i=String(t.getMilliseconds()).slice(0,s);return ts(i,s,"0")},p:t=>t.getHours()<12?"AM":"PM",P:t=>t.getHours()<12?"am":"pm",q:t=>vs(t),s:t=>Math.round(t.getTime()/1e3),S:t=>t.getSeconds(),u:t=>t.getDay()||7,U:t=>ct(t,0),w:t=>t.getDay(),W:t=>ct(t,1),x:t=>t.toLocaleDateString(),X:t=>t.toLocaleTimeString(),y:t=>t.getFullYear().toString().slice(2,4),Y:t=>t.getFullYear(),z:ht,Z:(t,e)=>t.getTimeZoneName()||ht(t,e),t:()=>" ",n:()=>`
9
+ `,"%":()=>"%"};Se.h=Se.b;function de(t,e){let s="",i=e,r;for(;r=bs.exec(i);)s+=i.slice(0,r.index),i=i.slice(r.index+r[0].length),s+=Fs(t,r);return s+i}function Fs(t,e){const[s,i="",r,n,o]=e,a=Se[o];if(!a)return s;const l={};for(const g of i)l[g]=!0;let h=String(a(t,{flags:l,width:r,modifier:n})),c=Ss.has(o)?" ":"0",d=r||xs[o]||0;return l["^"]?h=h.toUpperCase():l["#"]&&(h=ss(h)),l._?c=" ":l[0]&&(c="0"),l["-"]&&(d=0),se(h,d,c)}function ut(){return typeof Intl<"u"?Intl.DateTimeFormat:void 0}const Ls=6e4,Os=/([zZ]|([+-])(\d{2}):?(\d{2}))$/,ft=["January","February","March","April","May","June","July","August","September","October","November","December"],zs=ft.map(t=>t.slice(0,3)),dt=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Rs=dt.map(t=>t.slice(0,3));class E{constructor(e,s,i){this.locale=s,this.DateTimeFormat=ut(),this.date=new Date(e),this.timezoneFixed=i!==void 0,i===void 0&&(i=this.date.getTimezoneOffset()),this.timezoneOffset=f(i)?E.getTimezoneOffset(i,this.date):i,this.timezoneName=f(i)?i:"";const r=(this.date.getTimezoneOffset()-this.timezoneOffset)*Ls,n=this.date.getTime()+r;this.displayDate=new Date(n)}getTime(){return this.displayDate.getTime()}getMilliseconds(){return this.displayDate.getMilliseconds()}getSeconds(){return this.displayDate.getSeconds()}getMinutes(){return this.displayDate.getMinutes()}getHours(){return this.displayDate.getHours()}getDay(){return this.displayDate.getDay()}getDate(){return this.displayDate.getDate()}getMonth(){return this.displayDate.getMonth()}getFullYear(){return this.displayDate.getFullYear()}toLocaleString(e,s){return s!=null&&s.timeZone?this.date.toLocaleString(e,s):this.displayDate.toLocaleString(e,s)}toLocaleTimeString(e){return this.displayDate.toLocaleTimeString(e)}toLocaleDateString(e){return this.displayDate.toLocaleDateString(e)}getTimezoneOffset(){return this.timezoneOffset}getTimeZoneName(){if(this.timezoneFixed)return this.timezoneName;if(this.DateTimeFormat)return this.DateTimeFormat().resolvedOptions().timeZone}getLongMonthName(){var e;return(e=this.format({month:"long"}))!==null&&e!==void 0?e:ft[this.getMonth()]}getShortMonthName(){var e;return(e=this.format({month:"short"}))!==null&&e!==void 0?e:zs[this.getMonth()]}getLongWeekdayName(){var e;return(e=this.format({weekday:"long"}))!==null&&e!==void 0?e:dt[this.displayDate.getDay()]}getShortWeekdayName(){var e;return(e=this.format({weekday:"short"}))!==null&&e!==void 0?e:Rs[this.displayDate.getDay()]}valid(){return!isNaN(this.getTime())}format(e){return this.DateTimeFormat&&this.DateTimeFormat(this.locale,e).format(this.displayDate)}static createDateFixedToTimezone(e,s){const i=e.match(Os);if(i&&i[1]==="Z")return new E(+new Date(e),s,0);if(i&&i[2]&&i[3]&&i[4]){const[,,r,n,o]=i,a=(r==="+"?-1:1)*(parseInt(n,10)*60+parseInt(o,10));return new E(+new Date(e),s,a)}return new E(e,s)}static getTimezoneOffset(e,s){const i=s.toLocaleString("en-US",{timeZone:e}),r=s.toLocaleString("en-US",{timeZone:"UTC"}),n=new Date(i);return(+new Date(r)-+n)/(60*1e3)}}class Fe{constructor(e,s){this.base=0,this.message=`${e} limit exceeded`,this.limit=s}use(e){e=+e||0,S(this.base+e<=this.limit,this.message),this.base+=e}check(e){e=+e||0,S(e<=this.limit,this.message)}}class Le extends O{constructor(e,[s,i],r,n,o,a,l,h){super(e,r,n,o,h),this.trimLeft=!1,this.trimRight=!1;const c=r[s]==="-",d=r[i-1]==="-";let g=c?s+1:s,w=d?i-1:i;for(;g<w&&m[r.charCodeAt(g)]&Z;)g++;for(;w>g&&m[r.charCodeAt(w-1)]&Z;)w--;this.contentRange=[g,w],this.trimLeft=c||a,this.trimRight=d||l}get content(){return this.input.slice(this.contentRange[0],this.contentRange[1])}}class pt extends Le{constructor(e,s,i,r,n){const{trimTagLeft:o,trimTagRight:a,tagDelimiterLeft:l,tagDelimiterRight:h}=r,[c,d]=[s+l.length,i-h.length];super(y.Tag,[c,d],e,s,i,o,a,n),this.tokenizer=new D(e,r.operators,n,this.contentRange),this.name=this.tokenizer.readTagName(),this.tokenizer.assert(this.name,"illegal tag syntax, tag name expected"),this.tokenizer.skipBlank(),this.args=this.tokenizer.input.slice(this.tokenizer.p,this.contentRange[1])}}class Es extends Le{constructor(e,s,i,r,n){const{trimOutputLeft:o,trimOutputRight:a,outputDelimiterLeft:l,outputDelimiterRight:h}=r,c=[s+l.length,i-h.length];super(y.Output,c,e,s,i,o,a,n)}}class gt extends O{constructor(e,s,i,r){super(y.HTML,e,s,i,r),this.input=e,this.begin=s,this.end=i,this.file=r,this.trimLeft=0,this.trimRight=0}getContent(){return this.input.slice(this.begin+this.trimLeft,this.end-this.trimRight)}}class Ns extends O{constructor(e,s,i,r){super(y.Number,e,s,i,r),this.input=e,this.begin=s,this.end=i,this.file=r,this.content=Number(this.getText())}}class Oe extends O{constructor(e,s,i,r){super(y.Word,e,s,i,r),this.input=e,this.begin=s,this.end=i,this.file=r,this.content=this.getText()}}class As extends O{constructor(e,s,i,r){super(y.Literal,e,s,i,r),this.input=e,this.begin=s,this.end=i,this.file=r,this.literal=this.getText(),this.content=ot[this.literal]}}const mt={"==":2,"!=":2,">":2,"<":2,">=":2,"<=":2,contains:2,not:1,and:0,or:0},Ds={"==":0,"!=":0,">":0,"<":0,">=":0,"<=":0,contains:0,not:1,and:0,or:0};class Ms extends O{constructor(e,s,i,r){super(y.Operator,e,s,i,r),this.input=e,this.begin=s,this.end=i,this.file=r,this.operator=this.getText()}getPrecedence(){const e=this.getText();return e in mt?mt[e]:1}}class yt extends O{constructor(e,s,i,r,n,o){super(y.PropertyAccess,i,r,n,o),this.variable=e,this.props=s}}class wt extends O{constructor(e,s,i,r,n,o){super(y.Filter,i,r,n,o),this.name=e,this.args=s}}class Vs extends O{constructor(e,s,i,r,n,o){super(y.Hash,e,s,i,o),this.input=e,this.begin=s,this.end=i,this.name=r,this.value=n,this.file=o}}const js=/[\da-fA-F]/,bt=/[0-7]/,Tt={b:"\b",f:"\f",n:`
10
+ `,r:"\r",t:" ",v:"\v"};function kt(t){const e=t.charCodeAt(0);return e>=97?e-87:e>=65?e-55:e-48}function qs(t){let e="";for(let s=1;s<t.length-1;s++){if(t[s]!=="\\"){e+=t[s];continue}if(Tt[t[s+1]]!==void 0)e+=Tt[t[++s]];else if(t[s+1]==="u"){let i=0,r=s+2;for(;r<=s+5&&js.test(t[r]);)i=i*16+kt(t[r++]);s=r-1,e+=String.fromCharCode(i)}else if(!bt.test(t[s+1]))e+=t[++s];else{let i=s+1,r=0;for(;i<=s+3&&bt.test(t[i]);)r=r*8+kt(t[i++]);s=i-1,e+=String.fromCharCode(r)}}return e}class Cs extends O{constructor(e,s,i,r){super(y.Quoted,e,s,i,r),this.input=e,this.begin=s,this.end=i,this.file=r,this.content=qs(this.getText())}}class Ps extends O{constructor(e,s,i,r,n,o){super(y.Range,e,s,i,o),this.input=e,this.begin=s,this.end=i,this.lhs=r,this.rhs=n,this.file=o}}class $s extends Le{constructor(e,s,i,r,n){super(y.Tag,[s,i],e,s,i,!1,!1,n),this.tokenizer=new D(e,r.operators,n,this.contentRange),this.name=this.tokenizer.readTagName(),this.tokenizer.assert(this.name,"illegal liquid tag syntax"),this.tokenizer.skipBlank()}get args(){return this.tokenizer.input.slice(this.tokenizer.p,this.contentRange[1])}}class Is extends O{constructor(e,s,i,r,n,o){super(y.FilteredValue,i,r,n,o),this.initial=e,this.filters=s,this.input=i,this.begin=r,this.end=n,this.file=o}}const Bs={now:()=>Date.now()};function vt(){return typeof global=="object"&&global.performance||typeof window=="object"&&window.performance||Bs}class Us{renderTemplatesToNodeStream(e,s){const i=new ys;return Promise.resolve().then(()=>M(this.renderTemplates(e,s,i))).then(()=>i.end(),r=>i.error(r)),i.stream}*renderTemplates(e,s,i){i||(i=s.opts.keepOutputType?new ws:new it);const r=[];for(const n of e){s.renderLimit.check(vt().now());try{const o=yield n.render(s,i);if(o&&i.write(o),s.breakCalled||s.continueCalled)break}catch(o){const a=I.is(o)?o:new os(o,n);if(s.opts.catchAllErrors)r.push(a);else throw a}}if(r.length)throw new et(r);return i.buffer}}class Hs{constructor(e){this.postfix=[...Qs(e)]}*evaluate(e,s){S(e,"unable to evaluate: context not defined");const i=[];for(const r of this.postfix)if(Ae(r)){const n=i.pop();let o;if(Ds[r.operator]===1)o=yield e.opts.operators[r.operator](n,e);else{const a=i.pop();o=yield e.opts.operators[r.operator](a,n,e)}i.push(o)}else i.push(yield T(r,e,s));return i[0]}valid(){return!!this.postfix.length}}function*T(t,e,s=!1){if(t){if("content"in t)return t.content;if(ie(t))return yield Ws(t,e,s);if(Ve(t))return yield Js(t,e)}}function*Ws(t,e,s){const i=[];for(const r of t.props)i.push(yield T(r,e,!1));try{if(t.variable){const r=yield T(t.variable,e,s);return yield e._getFromScope(r,i)}else return yield e._get(i)}catch(r){if(s&&r.name==="InternalUndefinedVariableError")return null;throw new as(r,t)}}function Ys(t){return t.content}function*Js(t,e){const s=yield T(t.lhs,e),i=yield T(t.rhs,e);return e.memoryLimit.use(i-s+1),Qe(+s,+i+1)}function*Qs(t){const e=[];for(const s of t)if(Ae(s)){for(;e.length&&e[e.length-1].getPrecedence()>s.getPrecedence();)yield e.pop();e.push(s)}else yield s;for(;e.length;)yield e.pop()}function B(t,e){return!pe(t,e)}function pe(t,e){return t=p(t),e.opts.jsTruthy?!t:t===!1||t===void 0||t===null}const Zs={"==":j,"!=":(t,e)=>!j(t,e),">":(t,e)=>A(t)?t.gt(e):A(e)?e.lt(t):p(t)>p(e),"<":(t,e)=>A(t)?t.lt(e):A(e)?e.gt(t):p(t)<p(e),">=":(t,e)=>A(t)?t.geq(e):A(e)?e.leq(t):p(t)>=p(e),"<=":(t,e)=>A(t)?t.leq(e):A(e)?e.geq(t):p(t)<=p(e),contains:(t,e)=>(t=p(t),x(t)?t.some(s=>j(s,e)):k(t==null?void 0:t.indexOf)?t.indexOf(p(e))>-1:!1),not:(t,e)=>pe(p(t),e),and:(t,e,s)=>B(p(t),s)&&B(p(e),s),or:(t,e,s)=>B(p(t),s)||B(p(e),s)};function j(t,e){return A(t)?t.equals(e):A(e)?e.equals(t):(t=p(t),e=p(e),x(t)?x(e)&&Gs(t,e):t===e)}function Gs(t,e){return t.length!==e.length?!1:!t.some((s,i)=>!j(s,e[i]))}function Xs(t,e){return t.some(s=>j(s,e))}class ze{constructor(e,s,i,r){this.key=e,this.value=s,this.next=i,this.prev=r}}class _t{constructor(e,s=0){this.limit=e,this.size=s,this.cache={},this.head=new ze("HEAD",null,null,null),this.tail=new ze("TAIL",null,null,null),this.head.next=this.tail,this.tail.prev=this.head}write(e,s){if(this.cache[e])this.cache[e].value=s;else{const i=new ze(e,s,this.head.next,this.head);this.head.next.prev=i,this.head.next=i,this.cache[e]=i,this.size++,this.ensureLimit()}}read(e){if(!this.cache[e])return;const{value:s}=this.cache[e];return this.remove(e),this.write(e,s),s}remove(e){const s=this.cache[e];s.prev.next=s.next,s.next.prev=s.prev,delete this.cache[e],this.size--}clear(){this.head.next=this.tail,this.tail.prev=this.head,this.size=0,this.cache={}}ensureLimit(){this.size>this.limit&&this.remove(this.tail.prev.key)}}function xt(t,e){const s=document.createElement("base");s.href=t;const i=document.getElementsByTagName("head")[0];i.insertBefore(s,i.firstChild);const r=document.createElement("a");r.href=e;const n=r.href;return i.removeChild(s),n}function Ks(t,e,s){return t.length&&Je(t)!=="/"&&(t+="/"),xt(t,e).replace(/^(\w+:\/\/[^/]+)(\/[^?]+)/,(r,n,o)=>{const a=o.split("/").pop();return/\.\w+$/.test(a)?r:n+o+s})}function ei(t){return v(this,void 0,void 0,function*(){return new Promise((e,s)=>{const i=new XMLHttpRequest;i.onload=()=>{i.status>=200&&i.status<300?e(i.responseText):s(new Error(i.statusText))},i.onerror=()=>{s(new Error("An error occurred whilst receiving the response."))},i.open("GET",t),i.send()})})}function ti(t){const e=new XMLHttpRequest;if(e.open("GET",t,!1),e.send(),e.status<200||e.status>=300)throw new Error(e.statusText);return e.responseText}function si(t){return v(this,void 0,void 0,function*(){return!0})}function ii(t){return!0}function ri(t){return xt(t,".")}var ni=Object.freeze({__proto__:null,resolve:Ks,readFile:ei,readFileSync:ti,exists:si,existsSync:ii,dirname:ri,sep:"/"});function oi(t,e,...s){return t=p(t),x(t)||f(t)?t.length?t:e:t===!1&&new Map(s).get("allow_false")?!1:pe(t,this.context)?e:t}function St(t,e=0){return JSON.stringify(t,null,e)}function ai(t,e=0){const s=[];return JSON.stringify(t,function(i,r){if(typeof r!="object"||r===null)return r;for(;s.length>0&&s[s.length-1]!==this;)s.pop();return s.includes(r)?"[Circular]":(s.push(r),r)},e)}function li(t){return Number(t)}var Ft={default:oi,raw:{raw:!0,handler:Ge},jsonify:St,to_integer:li,json:St,inspect:ai};const ci={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&#34;","'":"&#39;"},hi={"&amp;":"&","&lt;":"<","&gt;":">","&#34;":'"',"&#39;":"'"};function ge(t){return t=u(t),this.context.memoryLimit.use(t.length),t.replace(/&|<|>|"|'/g,e=>ci[e])}function ui(t){return ge.call(this,t)}function fi(t){return t=u(t),this.context.memoryLimit.use(t.length),t.replace(/&(amp|lt|gt|#34|#39);/g,e=>hi[e])}function di(t){return ge.call(this,fi.call(this,t))}function pi(t){const e=u(t);return this.context.memoryLimit.use(e.length),e.replace(/\r?\n/gm,`<br />
11
+ `)}function gi(t){const e=u(t);return this.context.memoryLimit.use(e.length),e.replace(/<script[\s\S]*?<\/script>|<style[\s\S]*?<\/style>|<.*?>|<!--[\s\S]*?-->/g,"")}var mi=Object.freeze({__proto__:null,escape:ge,xml_escape:ui,escape_once:di,newline_to_br:pi,strip_html:gi});class yi{constructor(e){this.mapping=e,this.sep="/"}exists(e){return v(this,void 0,void 0,function*(){return this.existsSync(e)})}existsSync(e){return!z(this.mapping[e])}readFile(e){return v(this,void 0,void 0,function*(){return this.readFileSync(e)})}readFileSync(e){const s=this.mapping[e];if(z(s))throw new Error(`ENOENT: ${e}`);return s}dirname(e){const s=e.split(this.sep);return s.pop(),s.join(this.sep)}resolve(e,s,i){if(s+=i,e===".")return s;const r=e.split(/\/+/);for(const n of s.split(this.sep))n==="."||n===""||(n===".."?(r.length>1||r[0]!=="")&&r.pop():r.push(n));return r.join(this.sep)}}const X={root:["."],layouts:["."],partials:["."],relativeReference:!0,jekyllInclude:!1,keyValueSeparator:":",cache:void 0,extname:"",fs:ni,dynamicPartials:!0,jsTruthy:!1,dateFormat:"%A, %B %-e, %Y at %-l:%M %P %z",locale:"",trimTagRight:!1,trimTagLeft:!1,trimOutputRight:!1,trimOutputLeft:!1,greedy:!0,tagDelimiterLeft:"{%",tagDelimiterRight:"%}",outputDelimiterLeft:"{{",outputDelimiterRight:"}}",preserveTimezones:!1,strictFilters:!1,strictVariables:!1,ownPropertyOnly:!0,lenientIf:!1,globals:{},keepOutputType:!1,operators:Zs,memoryLimit:1/0,parseLimit:1/0,renderLimit:1/0};function wi(t){var e,s;if(t.hasOwnProperty("root")&&(t.hasOwnProperty("partials")||(t.partials=t.root),t.hasOwnProperty("layouts")||(t.layouts=t.root)),t.hasOwnProperty("cache")){let i;typeof t.cache=="number"?i=t.cache>0?new _t(t.cache):void 0:typeof t.cache=="object"?i=t.cache:i=t.cache?new _t(1024):void 0,t.cache=i}return t=Object.assign(Object.assign(Object.assign({},X),t.jekyllInclude?{dynamicPartials:!1}:{}),t),(!t.fs.dirname||!t.fs.sep)&&t.relativeReference&&(console.warn("[LiquidJS] `fs.dirname` and `fs.sep` are required for relativeReference, set relativeReference to `false` to suppress this warning"),t.relativeReference=!1),t.root=me(t.root),t.partials=me(t.partials),t.layouts=me(t.layouts),t.outputEscape=t.outputEscape&&bi(t.outputEscape),t.locale||(t.locale=(s=(e=ut())===null||e===void 0?void 0:e().resolvedOptions().locale)!==null&&s!==void 0?s:"en-US"),t.templates&&(t.fs=new yi(t.templates),t.relativeReference=!0,t.root=t.partials=t.layouts="."),t}function bi(t){return t==="escape"?ge:t==="json"?Ft.json:(S(k(t),"`outputEscape` need to be of type string or function"),t)}function me(t){let e=[];return x(t)&&(e=t),f(t)&&(e=[t]),e}function Ti(t,e){let s=!1;for(let i=0;i<t.length;i++){const r=t[i];Dt(r)&&(!s&&r.trimLeft&&ki(t[i-1],e.greedy),P(r)&&(r.name==="raw"?s=!0:r.name==="endraw"&&(s=!1)),!s&&r.trimRight&&vi(t[i+1],e.greedy))}}function ki(t,e){if(!t||!we(t))return;const s=e?Z:st;for(;m[t.input.charCodeAt(t.end-1-t.trimRight)]&s;)t.trimRight++}function vi(t,e){if(!t||!we(t))return;const s=e?Z:st;for(;m[t.input.charCodeAt(t.begin+t.trimLeft)]&s;)t.trimLeft++;t.input.charAt(t.begin+t.trimLeft)===`
12
+ `&&t.trimLeft++}class D{constructor(e,s=X.operators,i,r){this.input=e,this.file=i,this.rawBeginAt=-1,this.p=r?r[0]:0,this.N=r?r[1]:e.length,this.opTrie=at(s),this.literalTrie=at(ot)}readExpression(){return new Hs(this.readExpressionTokens())}*readExpressionTokens(){for(;this.p<this.N;){const e=this.readOperator();if(e){yield e;continue}const s=this.readValue();if(s){yield s;continue}return}}readOperator(){this.skipBlank();const e=this.matchTrie(this.opTrie);if(e!==-1)return new Ms(this.input,this.p,this.p=e,this.file)}matchTrie(e){let s=e,i=this.p,r;for(;s[this.input[i]]&&i<this.N;)s=s[this.input[i++]],s.end&&(r=s);return!r||r.needBoundary&&he(this.peek(i-this.p))?-1:i}readFilteredValue(){const e=this.p,s=this.readExpression();this.assert(s.valid(),`invalid value expression: ${this.snapshot()}`);const i=this.readFilters();return new Is(s,i,this.input,e,this.p,this.file)}readFilters(){const e=[];for(;;){const s=this.readFilter();if(!s)return e;e.push(s)}}readFilter(){if(this.skipBlank(),this.end())return null;this.assert(this.read()==="|",'expected "|" before filter');const e=this.readIdentifier();if(!e.size())return this.assert(this.end(),"expected filter name"),null;const s=[];if(this.skipBlank(),this.peek()===":")do{++this.p;const i=this.readFilterArg();i&&s.push(i),this.skipBlank(),this.assert(this.end()||this.peek()===","||this.peek()==="|",()=>`unexpected character ${this.snapshot()}`)}while(this.peek()===",");else if(!(this.peek()==="|"||this.end()))throw this.error('expected ":" after filter name');return new wt(e.getText(),s,this.input,e.begin,this.p,this.file)}readFilterArg(){const e=this.readValue();if(!e)return;if(this.skipBlank(),this.peek()!==":")return e;++this.p;const s=this.readValue();return[e.getText(),s]}readTopLevelTokens(e=X){const s=[];for(;this.p<this.N;){const i=this.readTopLevelToken(e);s.push(i)}return Ti(s,e),s}readTopLevelToken(e){const{tagDelimiterLeft:s,outputDelimiterLeft:i}=e;return this.rawBeginAt>-1?this.readEndrawOrRawContent(e):this.match(s)?this.readTagToken(e):this.match(i)?this.readOutputToken(e):this.readHTMLToken([s,i])}readHTMLToken(e){const s=this.p;for(;this.p<this.N&&!e.some(i=>this.match(i));)++this.p;return new gt(this.input,s,this.p,this.file)}readTagToken(e){const{file:s,input:i}=this,r=this.p;if(this.readToDelimiter(e.tagDelimiterRight)===-1)throw this.error(`tag ${this.snapshot(r)} not closed`,r);const n=new pt(i,r,this.p,e,s);return n.name==="raw"&&(this.rawBeginAt=r),n}readToDelimiter(e,s=!1){for(this.skipBlank();this.p<this.N;){if(s&&this.peekType()&tt){this.readQuoted();continue}if(++this.p,this.rmatch(e))return this.p}return-1}readOutputToken(e=X){const{file:s,input:i}=this,{outputDelimiterRight:r}=e,n=this.p;if(this.readToDelimiter(r,!0)===-1)throw this.error(`output ${this.snapshot(n)} not closed`,n);return new Es(i,n,this.p,e,s)}readEndrawOrRawContent(e){const{tagDelimiterLeft:s,tagDelimiterRight:i}=e,r=this.p;let n=this.readTo(s)-s.length;for(;this.p<this.N;){if(this.readIdentifier().getText()!=="endraw"){n=this.readTo(s)-s.length;continue}for(;this.p<=this.N;){if(this.rmatch(i)){const o=this.p;return r===n?(this.rawBeginAt=-1,new pt(this.input,r,o,e,this.file)):(this.p=n,new gt(this.input,r,n,this.file))}if(this.rmatch(s))break;this.p++}}throw this.error(`raw ${this.snapshot(this.rawBeginAt)} not closed`,r)}readLiquidTagTokens(e=X){const s=[];for(;this.p<this.N;){const i=this.readLiquidTagToken(e);i&&s.push(i)}return s}readLiquidTagToken(e){if(this.skipBlank(),this.end())return;const s=this.p;this.readToDelimiter(`
13
+ `);const i=this.p;return new $s(this.input,s,i,e,this.file)}error(e,s=this.p){return new rs(e,new Oe(this.input,s,this.N,this.file))}assert(e,s,i){if(!e)throw this.error(typeof s=="function"?s():s,i)}snapshot(e=this.p){return JSON.stringify(is(this.input.slice(e,this.N),32))}readWord(){return this.readIdentifier()}readIdentifier(){this.skipBlank();const e=this.p;for(;!this.end()&&he(this.peek());)++this.p;return new Oe(this.input,e,this.p,this.file)}readNonEmptyIdentifier(){const e=this.readIdentifier();return e.size()?e:void 0}readTagName(){return this.skipBlank(),this.input[this.p]==="#"?this.input.slice(this.p,++this.p):this.readIdentifier().getText()}readHashes(e){const s=[];for(;;){const i=this.readHash(e);if(!i)return s;s.push(i)}}readHash(e){this.skipBlank(),this.peek()===","&&++this.p;const s=this.p,i=this.readNonEmptyIdentifier();if(!i)return;let r;this.skipBlank();const n=f(e)?e:e?"=":":";return this.peek()===n&&(++this.p,r=this.readValue()),new Vs(this.input,s,this.p,i,r,this.file)}remaining(){return this.input.slice(this.p,this.N)}advance(e=1){this.p+=e}end(){return this.p>=this.N}read(){return this.input[this.p++]}readTo(e){for(;this.p<this.N;)if(++this.p,this.rmatch(e))return this.p;return-1}readValue(){this.skipBlank();const e=this.p,s=this.readLiteral()||this.readQuoted()||this.readRange()||this.readNumber(),i=this.readProperties(!s);return i.length?new yt(s,i,this.input,e,this.p):s}readScopeValue(){this.skipBlank();const e=this.p,s=this.readProperties();if(s.length)return new yt(void 0,s,this.input,e,this.p)}readProperties(e=!0){const s=[];for(;;){if(this.peek()==="["){this.p++;const i=this.readValue()||new Oe(this.input,this.p,this.p,this.file);this.assert(this.readTo("]")!==-1,"[ not closed"),s.push(i);continue}if(e&&!s.length){const i=this.readNonEmptyIdentifier();if(i){s.push(i);continue}}if(this.peek()==="."&&this.peek(1)!=="."){this.p++;const i=this.readNonEmptyIdentifier();if(!i)break;s.push(i);continue}break}return s}readNumber(){this.skipBlank();let e=!1,s=!1,i=0;for(this.peekType()&ps&&i++;this.p+i<=this.N;)if(this.peekType(i)&ds)s=!0,i++;else if(this.peek(i)==="."&&this.peek(i+1)!=="."){if(e||!s)return;e=!0,i++}else break;if(s&&!he(this.peek(i))){const r=new Ns(this.input,this.p,this.p+i,this.file);return this.advance(i),r}}readLiteral(){this.skipBlank();const e=this.matchTrie(this.literalTrie);if(e===-1)return;const s=new As(this.input,this.p,e,this.file);return this.p=e,s}readRange(){this.skipBlank();const e=this.p;if(this.peek()!=="(")return;++this.p;const s=this.readValueOrThrow();this.skipBlank(),this.assert(this.read()==="."&&this.read()===".","invalid range syntax");const i=this.readValueOrThrow();return this.skipBlank(),this.assert(this.read()===")","invalid range syntax"),new Ps(this.input,e,this.p,s,i,this.file)}readValueOrThrow(){const e=this.readValue();return this.assert(e,()=>`unexpected token ${this.snapshot()}, value expected`),e}readQuoted(){this.skipBlank();const e=this.p;if(!(this.peekType()&tt))return;++this.p;let s=!1;for(;this.p<this.N&&(++this.p,!(this.input[this.p-1]===this.input[e]&&!s));)s?s=!1:this.input[this.p-1]==="\\"&&(s=!0);return new Cs(this.input,e,this.p,this.file)}*readFileNameTemplate(e){const{outputDelimiterLeft:s}=e,i=[","," ",s],r=new Set(i);for(;this.p<this.N&&!r.has(this.peek());)yield this.match(s)?this.readOutputToken(e):this.readHTMLToken(i)}match(e){for(let s=0;s<e.length;s++)if(e[s]!==this.input[this.p+s])return!1;return!0}rmatch(e){for(let s=0;s<e.length;s++)if(e[e.length-1-s]!==this.input[this.p-1-s])return!1;return!0}peekType(e=0){return this.p+e>=this.N?0:m[this.input.charCodeAt(this.p+e)]}peek(e=0){return this.p+e>=this.N?"":this.input[this.p+e]}skipBlank(){for(;this.peekType()&Z;)++this.p}}class _i{constructor(e,s){this.handlers={},this.stopRequested=!1,this.tokens=e,this.parseToken=s}on(e,s){return this.handlers[e]=s,this}trigger(e,s){const i=this.handlers[e];return i?(i.call(this,s),!0):!1}start(){this.trigger("start");let e;for(;!this.stopRequested&&(e=this.tokens.shift());){if(this.trigger("token",e)||P(e)&&this.trigger(`tag:${e.name}`,e))continue;const s=this.parseToken(e,this.tokens);this.trigger("template",s)}return this.stopRequested||this.trigger("end"),this}stop(){return this.stopRequested=!0,this}}class Re{constructor(e){this.token=e}}class b extends Re{constructor(e,s,i){super(e),this.name=e.name,this.liquid=i,this.tokenizer=e.tokenizer}}class K{constructor(e,s){this.hash={};const i=e instanceof D?e:new D(e,{});for(const r of i.readHashes(s))this.hash[r.name.content]=r.value}*render(e){const s={};for(const i of Object.keys(this.hash))s[i]=this.hash[i]===void 0?!0:yield T(this.hash[i],e);return s}}function xi(t){return class extends b{constructor(e,s,i){super(e,s,i),k(t.parse)&&t.parse.call(this,e,s)}*render(e,s){const i=yield new K(this.token.args,e.opts.keyValueSeparator).render(e);return yield t.render.call(this,e,s,i)}}}function Lt(t){return x(t)}class Ot{constructor(e,s,i){this.token=e,this.name=e.name,this.handler=k(s)?s:k(s==null?void 0:s.handler)?s.handler:Ge,this.raw=!k(s)&&!!(s!=null&&s.raw),this.args=e.args,this.liquid=i}*render(e,s){const i=[];for(const r of this.args)Lt(r)?i.push([r[0],yield T(r[1],s)]):i.push(yield T(r,s));return yield this.handler.apply({context:s,token:this.token,liquid:this.liquid},[e,...i])}}class L{constructor(e,s){this.filters=[];const i=typeof e=="string"?new D(e,s.options.operators).readFilteredValue():e;this.initial=i.initial,this.filters=i.filters.map(r=>new Ot(r,this.getFilter(s,r.name),s))}*value(e,s){s=s||e.opts.lenientIf&&this.filters.length>0&&this.filters[0].name==="default";let i=yield this.initial.evaluate(e,s);for(const r of this.filters)i=yield r.render(i,e);return i}getFilter(e,s){const i=e.filters[s];return S(i||!e.options.strictFilters,()=>`undefined filter: ${s}`),i}}class Si extends Re{constructor(e,s){var i;super(e);const r=new D(e.input,s.options.operators,e.file,e.contentRange);this.value=new L(r.readFilteredValue(),s);const n=this.value.filters,o=s.options.outputEscape;if(!(!((i=n[n.length-1])===null||i===void 0)&&i.raw)&&o){const a=new wt(toString.call(o),[],"",0,0);n.push(new Ot(a,o,s))}}*render(e,s){const i=yield this.value.value(e,!1);s.write(i)}*arguments(){yield this.value}}class Fi extends Re{constructor(e){super(e),this.str=e.getContent()}*render(e,s){s.write(this.str)}}class U{constructor(e,s){this.segments=e,this.location=s}toString(){return ye(this.segments,!0)}toArray(){function*e(...s){for(const i of s)i instanceof U?yield Array.from(e(...i.segments)):yield i}return Array.from(e(...this.segments))}}class Ee{constructor(){this.map=new Map}get(e){const s=ye([e.segments[0]]);return this.map.has(s)||this.map.set(s,[]),this.map.get(s)}has(e){return this.map.has(ye([e.segments[0]]))}push(e){this.get(e).push(e)}asObject(){return Object.fromEntries(this.map)}}const zt={partials:!0};function*Rt(t,e,s){const i=new Ee,r=new Ee,n=new Ee,o=new Et(new Set),a=new Set;function l(c,d){i.push(c);const g=d.alias(c);if(g!==void 0){const w=g.segments[0];f(w)&&!o.has(w)&&r.push(g)}else{const w=c.segments[0];f(w)&&!d.has(w)&&r.push(c)}for(const w of c.segments)w instanceof U&&l(w,d)}function*h(c,d){if(c.arguments)for(const g of c.arguments())for(const w of Nt(g))l(w,d);if(c.localScope)for(const g of c.localScope()){d.add(g.content),d.deleteAlias(g.content);const[w,re]=g.getPosition();n.push(new U([g.content],{row:w,col:re,file:g.file}))}if(c.children)if(c.partialScope){const g=c.partialScope();if(g===void 0){for(const Q of yield c.children(e,s))yield h(Q,d);return}if(a.has(g.name))return;const w=new Set,re=g.isolated?new Et(w):d.push(w);for(const Q of g.scope)if(f(Q))w.add(Q);else{const[Wt,En]=Q;w.add(Wt);const Yt=Array.from(Nt(En));Yt.length&&re.setAlias(Wt,Yt[0].segments)}for(const Q of yield c.children(e,s))yield h(Q,re),a.add(g.name);re.pop()}else{c.blockScope&&d.push(new Set(c.blockScope()));for(const g of yield c.children(e,s))yield h(g,d);c.blockScope&&d.pop()}}for(const c of t)yield h(c,o);return{variables:i.asObject(),globals:r.asObject(),locals:n.asObject()}}function q(t,e={}){const s=Object.assign(Object.assign({},zt),e);return M(Rt(t,s.partials,!1))}function C(t,e={}){const s=Object.assign(Object.assign({},zt),e);return V(Rt(t,s.partials,!0))}class Et{constructor(e){this.stack=[{names:e,aliases:new Map}]}has(e){for(const s of this.stack)if(s.names.has(e))return!0;return!1}push(e){return this.stack.push({names:e,aliases:new Map}),this}pop(){var e;return(e=this.stack.pop())===null||e===void 0?void 0:e.names}add(e){this.stack[0].names.add(e)}alias(e){const s=e.segments[0];if(!f(s))return;const i=this.getAlias(s);if(i!==void 0)return new U([...i,...e.segments.slice(1)],e.location)}setAlias(e,s){this.stack[this.stack.length-1].aliases.set(e,s)}deleteAlias(e){this.stack[this.stack.length-1].aliases.delete(e)}getAlias(e){for(const s of this.stack){if(s.aliases.has(e))return s.aliases.get(e);if(s.names.has(e))return}}}function*Nt(t){F(t)?yield*ee(t):t instanceof L&&(yield*Li(t))}function*Li(t){for(const e of t.initial.postfix)F(e)&&(yield*ee(e));for(const e of t.filters)for(const s of e.args)Lt(s)&&s[1]?yield*ee(s[1]):F(s)&&(yield*ee(s))}function*ee(t){Ve(t)?(yield*ee(t.lhs),yield*ee(t.rhs)):ie(t)&&(yield Ne(t))}function Ne(t){const e=[];let s=t.file;const i=t.props[0];s=s||i.file,be(i)||De(i)||Me(i)?e.push(i.content):ie(i)&&e.push(...Ne(i).segments);for(const o of t.props.slice(1))s=s||o.file,be(o)||De(o)||Me(o)?e.push(o.content):ie(o)&&e.push(Ne(o));const[r,n]=t.getPosition();return new U(e,{row:r,col:n,file:s})}const At=/^[\u0080-\uFFFFa-zA-Z_][\u0080-\uFFFFa-zA-Z0-9_-]*$/;function ye(t,e=!1){const s=[],i=t[0];f(i)&&(!e||i.match(At)?s.push(`${i}`):s.push(`['${i}']`));for(const r of t.slice(1))r instanceof U?s.push(`[${ye(r.segments)}]`):f(r)?r.match(At)?s.push(`.${r}`):s.push(`['${r}']`):s.push(`[${r}]`);return s.join("")}var H;(function(t){t.Partials="partials",t.Layouts="layouts",t.Root="root"})(H||(H={}));class Oi{constructor(e){if(this.options=e,e.relativeReference){const s=e.fs.sep;S(s,"`fs.sep` is required for relative reference");const i=new RegExp(["."+s,".."+s,"./","../"].map(r=>Xt(r)).join("|"));this.shouldLoadRelative=r=>i.test(r)}else this.shouldLoadRelative=s=>!1;this.contains=this.options.fs.contains||(()=>!0)}*lookup(e,s,i,r){const{fs:n}=this.options,o=this.options[s];for(const a of this.candidates(e,o,r,s!==H.Root))if(i?n.existsSync(a):yield n.exists(a))return a;throw this.lookupError(e,o)}*candidates(e,s,i,r){const{fs:n,extname:o}=this.options;if(this.shouldLoadRelative(e)&&i){const a=n.resolve(this.dirname(i),e,o);for(const l of s)if(!r||this.contains(l,a)){yield a;break}}for(const a of s){const l=n.resolve(a,e,o);(!r||this.contains(a,l))&&(yield l)}if(n.fallback!==void 0){const a=n.fallback(e);a!==void 0&&(yield a)}}dirname(e){const s=this.options.fs;return S(s.dirname,"`fs.dirname` is required for relative reference"),s.dirname(e)}lookupError(e,s){const i=new Error("ENOENT");return i.message=`ENOENT: Failed to lookup "${e}" in "${s}"`,i.code="ENOENT",i}}class W{constructor(e){this.liquid=e,this.cache=this.liquid.options.cache,this.fs=this.liquid.options.fs,this.parseFile=this.cache?this._parseFileCached:this._parseFile,this.loader=new Oi(this.liquid.options),this.parseLimit=new Fe("parse length",e.options.parseLimit)}parse(e,s){e=String(e),this.parseLimit.use(e.length);const r=new D(e,this.liquid.options.operators,s).readTopLevelTokens(this.liquid.options);return this.parseTokens(r)}parseTokens(e){let s;const i=[],r=[];for(;s=e.shift();)try{i.push(this.parseToken(s,e))}catch(n){if(this.liquid.options.catchAllErrors)r.push(n);else throw n}if(r.length)throw new et(r);return i}parseToken(e,s){try{if(P(e)){const i=this.liquid.tags[e.name];return S(i,`tag "${e.name}" not found`),new i(e,s,this.liquid,this)}return Mt(e)?new Si(e,this.liquid):new Fi(e)}catch(i){throw I.is(i)?i:new ns(i,e)}}parseStream(e){return new _i(e,(s,i)=>this.parseToken(s,i))}*_parseFileCached(e,s,i=H.Root,r){const n=this.cache,o=this.loader.shouldLoadRelative(e)?r+","+e:i+":"+e,a=yield n.read(o);if(a)return a;const l=this._parseFile(e,s,i,r),h=s?yield l:M(l);n.write(o,h);try{return yield h}catch(c){throw n.remove(o),c}}*_parseFile(e,s,i=H.Root,r){const n=yield this.loader.lookup(e,i,s,r);return this.parse(s?this.fs.readFileSync(n):yield this.fs.readFile(n),n)}}var y;(function(t){t[t.Number=1]="Number",t[t.Literal=2]="Literal",t[t.Tag=4]="Tag",t[t.Output=8]="Output",t[t.HTML=16]="HTML",t[t.Filter=32]="Filter",t[t.Hash=64]="Hash",t[t.PropertyAccess=128]="PropertyAccess",t[t.Word=256]="Word",t[t.Range=512]="Range",t[t.Quoted=1024]="Quoted",t[t.Operator=2048]="Operator",t[t.FilteredValue=4096]="FilteredValue",t[t.Delimited=12]="Delimited"})(y||(y={}));function Dt(t){return!!(R(t)&y.Delimited)}function Ae(t){return R(t)===y.Operator}function we(t){return R(t)===y.HTML}function Mt(t){return R(t)===y.Output}function P(t){return R(t)===y.Tag}function be(t){return R(t)===y.Quoted}function zi(t){return R(t)===y.Literal}function De(t){return R(t)===y.Number}function ie(t){return R(t)===y.PropertyAccess}function Me(t){return R(t)===y.Word}function Ve(t){return R(t)===y.Range}function F(t){return(R(t)&1667)>0}function R(t){return t?t.kind:-1}var Mn=Object.freeze({__proto__:null,isDelimitedToken:Dt,isOperatorToken:Ae,isHTMLToken:we,isOutputToken:Mt,isTagToken:P,isQuotedToken:be,isLiteralToken:zi,isNumberToken:De,isPropertyAccessToken:ie,isWordToken:Me,isRangeToken:Ve,isValueToken:F});class Y{constructor(e={},s=X,i={},{memoryLimit:r,renderLimit:n}={}){var o,a,l,h,c;this.scopes=[{}],this.registers={},this.breakCalled=!1,this.continueCalled=!1,this.sync=!!i.sync,this.opts=s,this.globals=(o=i.globals)!==null&&o!==void 0?o:s.globals,this.environments=ae(e)?e:Object(e),this.strictVariables=(a=i.strictVariables)!==null&&a!==void 0?a:this.opts.strictVariables,this.ownPropertyOnly=(l=i.ownPropertyOnly)!==null&&l!==void 0?l:s.ownPropertyOnly,this.memoryLimit=r??new Fe("memory alloc",(h=i.memoryLimit)!==null&&h!==void 0?h:s.memoryLimit),this.renderLimit=n??new Fe("template render",vt().now()+((c=i.renderLimit)!==null&&c!==void 0?c:s.renderLimit))}getRegister(e){return this.registers[e]=this.registers[e]||{}}setRegister(e,s){return this.registers[e]=s}saveRegister(...e){return e.map(s=>[s,this.getRegister(s)])}restoreRegister(e){return e.forEach(([s,i])=>this.setRegister(s,i))}getAll(){return[this.globals,this.environments,...this.scopes].reduce((e,s)=>fe(e,s),{})}get(e){return this.getSync(e)}getSync(e){return V(this._get(e))}*_get(e){const s=this.findScope(e[0]);return yield this._getFromScope(s,e)}getFromScope(e,s){return V(this._getFromScope(e,s))}*_getFromScope(e,s,i=this.strictVariables){f(s)&&(s=s.split("."));for(let r=0;r<s.length;r++)if(e=yield this.readProperty(e,s[r]),i&&Kt(e))throw new ls(s.slice(0,r+1).join("."));return e}push(e){return this.scopes.push(e)}pop(){return this.scopes.pop()}bottom(){return this.scopes[0]}spawn(e={}){return new Y(e,this.opts,{sync:this.sync,globals:this.globals,strictVariables:this.strictVariables},{renderLimit:this.renderLimit,memoryLimit:this.memoryLimit})}findScope(e){for(let s=this.scopes.length-1;s>=0;s--){const i=this.scopes[s];if(e in i)return i}return e in this.environments?this.environments:this.globals}readProperty(e,s){if(e=He(e),s=p(s),z(e))return e;if(x(e)&&s<0)return e[e.length+ +s];const i=Ri(e,s,this.ownPropertyOnly);return i===void 0&&e instanceof $?e.liquidMethodMissing(s,this):k(i)?i.call(e):s==="size"?Ai(e):s==="first"?Ei(e):s==="last"?Ni(e):i}}function Ri(t,e,s){if(!(s&&!Te.call(t,e)&&!(t instanceof $)))return t[e]}function Ei(t){return x(t)?t[0]:t.first}function Ni(t){return x(t)?t[t.length-1]:t.last}function Ai(t){if(Te.call(t,"size")||t.size!==void 0)return t.size;if(x(t)||f(t))return t.length;if(typeof t=="object")return Object.keys(t).length}var J;(function(t){t[t.OUTPUT=0]="OUTPUT",t[t.STORE=1]="STORE"})(J||(J={}));const Di=N(Math.abs),Mi=N(Math.max),Vi=N(Math.min),ji=N(Math.ceil),qi=N((t,e,s=!1)=>s?Math.floor(t/e):t/e),Ci=N(Math.floor),Pi=N((t,e)=>t-e),$i=N((t,e)=>t+e),Ii=N((t,e)=>t%e),Bi=N((t,e)=>t*e);function Ui(t,e=0){t=ke(t),e=ke(e);const s=Math.pow(10,e);return Math.round(t*s)/s}var Hi=Object.freeze({__proto__:null,abs:Di,at_least:Mi,at_most:Vi,ceil:ji,divided_by:qi,floor:Ci,minus:Pi,plus:$i,modulo:Ii,times:Bi,round:Ui});const Wi=t=>decodeURIComponent(u(t)).replace(/\+/g," "),Yi=t=>encodeURIComponent(u(t)).replace(/%20/g,"+"),Ji=t=>encodeURIComponent(u(t)).replace(/%20/g,"+").replace(/[!'()*]/g,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()),Qi=t=>encodeURI(u(t)).replace(/%5B/g,"[").replace(/%5D/g,"]"),Vt=/[^\p{M}\p{L}\p{Nd}]+/ug,Zi={raw:/\s+/g,default:Vt,pretty:/[^\p{M}\p{L}\p{Nd}._~!$&'()+,;=@]+/ug,ascii:/[^A-Za-z0-9]+/g,latin:Vt,none:null};function Gi(t,e="default",s=!1){t=u(t);const i=Zi[e];return i&&(e==="latin"&&(t=Xi(t)),t=t.replace(i,"-").replace(/^-|-$/g,"")),s?t:t.toLowerCase()}function Xi(t){return t.replace(/[àáâãäå]/g,"a").replace(/[æ]/g,"ae").replace(/[ç]/g,"c").replace(/[èéêë]/g,"e").replace(/[ìíîï]/g,"i").replace(/[ð]/g,"d").replace(/[ñ]/g,"n").replace(/[òóôõöø]/g,"o").replace(/[ùúûü]/g,"u").replace(/[ýÿ]/g,"y").replace(/[ß]/g,"ss").replace(/[œ]/g,"oe").replace(/[þ]/g,"th").replace(/[ẞ]/g,"SS").replace(/[Œ]/g,"OE").replace(/[Þ]/g,"TH")}var Ki=Object.freeze({__proto__:null,url_decode:Wi,url_encode:Yi,cgi_escape:Ji,uri_escape:Qi,slugify:Gi});const er=le(function(t,e){const s=_(t),i=z(e)?" ":u(e),r=s.length*(1+i.length);return this.context.memoryLimit.use(r),s.join(i)}),tr=le(t=>We(t)?Je(t):""),sr=le(t=>We(t)?t[0]:""),ir=le(function(t){const e=_(t);return this.context.memoryLimit.use(e.length),[...e].reverse()});function*rr(t,e){const s=[],i=_(t);this.context.memoryLimit.use(i.length);for(const r of i)s.push([r,e?yield this.context._getFromScope(r,u(e).split("."),!1):r]);return s.sort((r,n)=>{const o=r[1],a=n[1];return o<a?-1:o>a?1:0}).map(r=>r[0])}function nr(t,e){const s=u(e),i=e===void 0?Xe:(n,o)=>Xe(n[s],o[s]),r=_(t);return this.context.memoryLimit.use(r.length),[...r].sort(i)}const or=t=>t&&t.length||0;function*ar(t,e){const s=[],i=_(t);this.context.memoryLimit.use(i.length);for(const r of i)s.push(yield this.context._getFromScope(r,u(e),!1));return s}function*lr(t,e){let s=0;const i=_(t);for(const r of i){const n=Number(e?yield this.context._getFromScope(r,u(e),!1):r);s+=Number.isNaN(n)?0:n}return s}function cr(t){const e=_(t);return this.context.memoryLimit.use(e.length),e.filter(s=>!z(p(s)))}function jt(t,e=[]){const s=_(t),i=_(e);return this.context.memoryLimit.use(s.length+i.length),s.concat(i)}function hr(t,e){return jt.call(this,t,[e])}function ur(t,e){const s=_(t);this.context.memoryLimit.use(s.length);const i=[...s];return i.unshift(e),i}function fr(t){const e=[..._(t)];return e.pop(),e}function dr(t){const e=_(t);this.context.memoryLimit.use(e.length);const s=[...e];return s.shift(),s}function pr(t,e,s=1){return t=p(t),z(t)?[]:(x(t)||(t=u(t)),e=e<0?t.length+e:e,this.context.memoryLimit.use(s),t.slice(e,e+s))}function qt(t){return this.context.opts.jekyllWhere?e=>G.is(t)?j(e,t):x(e)?Xs(e,t):j(e,t):t===void 0?e=>B(e,this.context):e=>j(e,t)}function*Ct(t,e,s,i){const r=[];e=_(e),this.context.memoryLimit.use(e.length);const n=new D(u(s)).readScopeValue();for(const a of e)r.push(yield T(n,this.context.spawn(a)));const o=qt.call(this,i);return e.filter((a,l)=>o(r[l])===t)}function*Pt(t,e,s,i){const r=[],n=new L(u(i),this.liquid),o=_(e);this.context.memoryLimit.use(o.length);for(const a of o){this.context.push({[s]:a});const l=yield n.value(this.context);this.context.pop(),l===t&&r.push(a)}return r}function*gr(t,e,s){return yield*Ct.call(this,!0,t,e,s)}function*mr(t,e,s){return yield*Ct.call(this,!1,t,e,s)}function*yr(t,e,s){return yield*Pt.call(this,!0,t,e,s)}function*wr(t,e,s){return yield*Pt.call(this,!1,t,e,s)}function*br(t,e){const s=new Map;t=te(t);const i=new D(u(e)).readScopeValue();this.context.memoryLimit.use(t.length);for(const r of t){const n=yield T(i,this.context.spawn(r));s.has(n)||s.set(n,[]),s.get(n).push(r)}return[...s.entries()].map(([r,n])=>({name:r,items:n}))}function*Tr(t,e,s){const i=new Map,r=new L(u(s),this.liquid);t=te(t),this.context.memoryLimit.use(t.length);for(const n of t){this.context.push({[e]:n});const o=yield r.value(this.context);this.context.pop(),i.has(o)||i.set(o,[]),i.get(o).push(n)}return[...i.entries()].map(([n,o])=>({name:n,items:o}))}function*je(t,e,s){const i=new D(u(e)).readScopeValue(),r=_(t),n=qt.call(this,s);for(let o=0;o<r.length;o++){const a=yield T(i,this.context.spawn(r[o]));if(n(a))return[o,r[o]]}}function*qe(t,e,s){const i=new L(u(s),this.liquid),r=_(t);for(let n=0;n<r.length;n++){this.context.push({[e]:r[n]});const o=yield i.value(this.context);if(this.context.pop(),o)return[n,r[n]]}}function*kr(t,e,s){return!!(yield*je.call(this,t,e,s))}function*vr(t,e,s){return!!(yield*qe.call(this,t,e,s))}function*_r(t,e,s){const i=yield*je.call(this,t,e,s);return i?i[0]:void 0}function*xr(t,e,s){const i=yield*qe.call(this,t,e,s);return i?i[0]:void 0}function*Sr(t,e,s){const i=yield*je.call(this,t,e,s);return i?i[1]:void 0}function*Fr(t,e,s){const i=yield*qe.call(this,t,e,s);return i?i[1]:void 0}function Lr(t){return t=_(t),this.context.memoryLimit.use(t.length),[...new Set(t)]}function Or(t,e=1){if(t=p(t),z(t))return[];x(t)||(t=u(t)),this.context.memoryLimit.use(e);const s=[...t].sort(()=>Math.random()-.5);return e===1?s[0]:s.slice(0,e)}var zr=Object.freeze({__proto__:null,join:er,last:tr,first:sr,reverse:ir,sort:rr,sort_natural:nr,size:or,map:ar,sum:lr,compact:cr,concat:jt,push:hr,unshift:ur,pop:fr,shift:dr,slice:pr,where:gr,reject:mr,where_exp:yr,reject_exp:wr,group_by:br,group_by_exp:Tr,has:kr,has_exp:vr,find_index:_r,find_index_exp:xr,find:Sr,find_exp:Fr,uniq:Lr,sample:Or});function Ce(t,e,s){var i,r,n;const o=((i=t==null?void 0:t.length)!==null&&i!==void 0?i:0)+((r=e==null?void 0:e.length)!==null&&r!==void 0?r:0)+((n=s==null?void 0:s.length)!==null&&n!==void 0?n:0);this.context.memoryLimit.use(o);const a=It(t,this.context.opts,s);return a?(e=p(e),e=z(e)?this.context.opts.dateFormat:u(e),de(a,e)):t}function Rr(t){return Ce.call(this,t,"%Y-%m-%dT%H:%M:%S%:z")}function Er(t){return Ce.call(this,t,"%a, %d %b %Y %H:%M:%S %z")}function Nr(t,e,s){return $t.call(this,t,"%b",e,s)}function Ar(t,e,s){return $t.call(this,t,"%B",e,s)}function $t(t,e,s,i){const r=It(t,this.context.opts);if(!r)return t;if(s==="ordinal"){const n=r.getDate();return i==="US"?de(r,`${e} ${n}%q, %Y`):de(r,`${n}%q ${e} %Y`)}return de(r,`%d ${e} %Y`)}function It(t,e,s){let i;const r=s??e.timezoneOffset,n=e.locale;return t=p(t),t==="now"||t==="today"?i=new E(Date.now(),n,r):oe(t)?i=new E(t*1e3,n,r):f(t)?/^\d+$/.test(t)?i=new E(+t*1e3,n,r):e.preserveTimezones&&s===void 0?i=E.createDateFixedToTimezone(t,n):i=new E(t,n,r):i=new E(t,n,r),i.valid()?i:void 0}var Dr=Object.freeze({__proto__:null,date:Ce,date_to_xmlschema:Rr,date_to_rfc822:Er,date_to_string:Nr,date_to_long_string:Ar});const Pe=/[\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF]/gu,Bt=/[^\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF\s]+/gu;function Mr(t,e){S(arguments.length===2,"append expect 2 arguments");const s=u(t),i=u(e);return this.context.memoryLimit.use(s.length+i.length),s+i}function Vr(t,e){S(arguments.length===2,"prepend expect 2 arguments");const s=u(t),i=u(e);return this.context.memoryLimit.use(s.length+i.length),i+s}function jr(t,e){const s=u(t);return this.context.memoryLimit.use(s.length),e?(e=ve(u(e)),s.replace(new RegExp(`^[${e}]+`,"g"),"")):s.replace(/^\s+/,"")}function qr(t){const e=u(t);return this.context.memoryLimit.use(e.length),e.toLowerCase()}function Cr(t){const e=u(t);return this.context.memoryLimit.use(e.length),u(e).toUpperCase()}function Pr(t,e){const s=u(t);return this.context.memoryLimit.use(s.length),s.split(u(e)).join("")}function $r(t,e){const s=u(t);return this.context.memoryLimit.use(s.length),s.replace(u(e),"")}function Ir(t,e){const s=u(t);this.context.memoryLimit.use(s.length);const i=u(e),r=s.lastIndexOf(i);return r===-1?s:s.substring(0,r)+s.substring(r+i.length)}function Br(t,e){return t=u(t),this.context.memoryLimit.use(t.length),e?(e=ve(u(e)),t.replace(new RegExp(`[${e}]+$`,"g"),"")):t.replace(/\s+$/,"")}function Ur(t,e){const s=u(t);this.context.memoryLimit.use(s.length);const i=s.split(u(e));for(;i.length&&i[i.length-1]==="";)i.pop();return i}function Hr(t,e){const s=u(t);return this.context.memoryLimit.use(s.length),e?(e=ve(u(e)),s.replace(new RegExp(`^[${e}]+`,"g"),"").replace(new RegExp(`[${e}]+$`,"g"),"")):s.trim()}function Wr(t){const e=u(t);return this.context.memoryLimit.use(e.length),e.replace(/\r?\n/gm,"")}function Yr(t){return t=u(t),this.context.memoryLimit.use(t.length),t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}function Jr(t,e,s){const i=u(t);return this.context.memoryLimit.use(i.length),i.split(u(e)).join(s)}function Qr(t,e,s){const i=u(t);return this.context.memoryLimit.use(i.length),i.replace(u(e),s)}function Zr(t,e,s){const i=u(t);this.context.memoryLimit.use(i.length);const r=u(e),n=i.lastIndexOf(r);if(n===-1)return i;const o=u(s);return i.substring(0,n)+o+i.substring(n+r.length)}function Gr(t,e=50,s="..."){const i=u(t);return this.context.memoryLimit.use(i.length),i.length<=e?t:i.substring(0,e-s.length)+s}function Xr(t,e=15,s="..."){const i=u(t);this.context.memoryLimit.use(i.length);const r=i.split(/\s+/);e<=0&&(e=1);let n=r.slice(0,e).join(" ");return r.length>=e&&(n+=s),n}function Kr(t){const e=u(t);return this.context.memoryLimit.use(e.length),e.replace(/\s+/g," ")}function en(t,e){const s=u(t);if(this.context.memoryLimit.use(s.length),t=s.trim(),!t)return 0;switch(e){case"cjk":return(t.match(Pe)||[]).length+(t.match(Bt)||[]).length;case"auto":return Pe.test(t)?t.match(Pe).length+(t.match(Bt)||[]).length:t.split(/\s+/).length;default:return t.split(/\s+/).length}}function tn(t,e="and"){switch(this.context.memoryLimit.use(t.length),t.length){case 0:return"";case 1:return t[0];case 2:return`${t[0]} ${e} ${t[1]}`;default:return`${t.slice(0,-1).join(", ")}, ${e} ${t[t.length-1]}`}}var sn=Object.freeze({__proto__:null,append:Mr,prepend:Vr,lstrip:jr,downcase:qr,upcase:Cr,remove:Pr,remove_first:$r,remove_last:Ir,rstrip:Br,split:Ur,strip:Hr,strip_newlines:Wr,capitalize:Yr,replace:Jr,replace_first:Qr,replace_last:Zr,truncate:Gr,truncatewords:Xr,normalize_whitespace:Kr,number_of_words:en,array_to_sentence_string:tn});const rn=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},mi),Hi),Ki),zr),Dr),sn),Ft);class nn extends b{constructor(e,s,i){super(e,s,i),this.identifier=this.tokenizer.readIdentifier(),this.key=this.identifier.content,this.tokenizer.assert(this.key,"expected variable name"),this.tokenizer.skipBlank(),this.tokenizer.assert(this.tokenizer.peek()==="=",'expected "="'),this.tokenizer.advance(),this.value=new L(this.tokenizer.readFilteredValue(),this.liquid)}*render(e){e.bottom()[this.key]=yield this.value.value(e,this.liquid.options.lenientIf)}*arguments(){yield this.value}*localScope(){yield this.identifier}}const Ut=["offset","limit","reversed"];class on extends b{constructor(e,s,i,r){super(e,s,i);const n=this.tokenizer.readIdentifier(),o=this.tokenizer.readIdentifier(),a=this.tokenizer.readValue();if(!n.size()||o.content!=="in"||!a)throw new Error(`illegal tag: ${e.getText()}`);this.variable=n.content,this.collection=a,this.hash=new K(this.tokenizer,i.options.keyValueSeparator),this.templates=[],this.elseTemplates=[];let l;const h=r.parseStream(s).on("start",()=>l=this.templates).on("tag:else",c=>{ue(c.args),l=this.elseTemplates}).on("tag:endfor",c=>{ue(c.args),h.stop()}).on("template",c=>l.push(c)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});h.start()}*render(e,s){const i=this.liquid.renderer;let r=te(yield T(this.collection,e));if(!r.length){yield i.renderTemplates(this.elseTemplates,e,s);return}const n="continue-"+this.variable+"-"+this.collection.getText();e.push({continue:e.getRegister(n)});const o=yield this.hash.render(e);e.pop(),r=(this.liquid.options.orderedFilterParameters?Object.keys(o).filter(h=>Ut.includes(h)):Ut.filter(h=>o[h]!==void 0)).reduce((h,c)=>c==="offset"?ln(h,o.offset):c==="limit"?cn(h,o.limit):an(h),r),e.setRegister(n,(o.offset||0)+r.length);const l={forloop:new xe(r.length,this.collection.getText(),this.variable)};e.push(l);for(const h of r){if(l[this.variable]=h,e.continueCalled=e.breakCalled=!1,yield i.renderTemplates(this.templates,e,s),e.breakCalled)break;l.forloop.next()}e.continueCalled=e.breakCalled=!1,e.pop()}*children(){const e=this.templates.slice();return this.elseTemplates&&e.push(...this.elseTemplates),e}*arguments(){yield this.collection;for(const e of Object.values(this.hash.hash))F(e)&&(yield e)}blockScope(){return[this.variable,"forloop"]}}function an(t){return[...t].reverse()}function ln(t,e){return t.slice(e)}function cn(t,e){return t.slice(0,e)}class hn extends b{constructor(e,s,i,r){for(super(e,s,i),this.templates=[],this.identifier=this.readVariable(),this.variable=this.identifier.content;s.length;){const n=s.shift();if(P(n)&&n.name==="endcapture")return;this.templates.push(r.parseToken(n,s))}throw new Error(`tag ${e.getText()} not closed`)}readVariable(){let e=this.tokenizer.readIdentifier();if(e.content||(e=this.tokenizer.readQuoted(),e))return e;throw this.tokenizer.error("invalid capture name")}*render(e){const i=yield this.liquid.renderer.renderTemplates(this.templates,e);e.bottom()[this.variable]=i}*children(){return this.templates}*localScope(){yield this.identifier}}class un extends b{constructor(e,s,i,r){super(e,s,i),this.branches=[],this.elseTemplates=[],this.value=new L(this.tokenizer.readFilteredValue(),this.liquid),this.elseTemplates=[];let n=[],o=0;const a=r.parseStream(s).on("tag:when",l=>{if(o>0)return;n=[];const h=[];for(;!l.tokenizer.end();)h.push(l.tokenizer.readValueOrThrow()),l.tokenizer.skipBlank(),l.tokenizer.peek()===","?l.tokenizer.readTo(","):l.tokenizer.readTo("or");this.branches.push({values:h,templates:n})}).on("tag:else",()=>{o++,n=this.elseTemplates}).on("tag:endcase",()=>a.stop()).on("template",l=>{(n!==this.elseTemplates||o===1)&&n.push(l)}).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});a.start()}*render(e,s){const i=this.liquid.renderer,r=p(yield this.value.value(e,e.opts.lenientIf));let n=!1;for(const o of this.branches)for(const a of o.values){const l=yield T(a,e,e.opts.lenientIf);if(j(r,l)){yield i.renderTemplates(o.templates,e,s),n=!0;break}}n||(yield i.renderTemplates(this.elseTemplates,e,s))}*arguments(){yield this.value,yield*this.branches.flatMap(e=>e.values)}*children(){const e=this.branches.flatMap(s=>s.templates);return this.elseTemplates&&e.push(...this.elseTemplates),e}}class fn extends b{constructor(e,s,i){for(super(e,s,i);s.length;){const r=s.shift();if(P(r)&&r.name==="endcomment")return}throw new Error(`tag ${e.getText()} not closed`)}render(){}}class dn extends b{constructor(e,s,i,r){super(e,s,i);const n=this.tokenizer;for(this.file=$e(n,this.liquid,r),this.currentFile=e.file;!n.end();){n.skipBlank();const o=n.p,a=n.readIdentifier();if((a.content==="with"||a.content==="for")&&(n.skipBlank(),n.peek()!==":")){const l=n.readValue();if(l){const h=n.p,c=n.readIdentifier();let d;c.content==="as"?d=n.readIdentifier():n.p=h,this[a.content]={value:l,alias:d&&d.content},n.skipBlank(),n.peek()===","&&n.advance();continue}}n.p=o;break}this.hash=new K(n,i.options.keyValueSeparator)}*render(e,s){const{liquid:i,hash:r}=this,n=yield Ie(this.file,e,i);S(n,()=>`illegal file path "${n}"`);const o=e.spawn(),a=o.bottom();if(fe(a,yield r.render(e)),this.with){const{value:l,alias:h}=this.with;a[h||n]=yield T(l,e)}if(this.for){const{value:l,alias:h}=this.for,c=te(yield T(l,e));a.forloop=new xe(c.length,l.getText(),h);for(const d of c){a[h]=d;const g=yield i._parsePartialFile(n,o.sync,this.currentFile);yield i.renderer.renderTemplates(g,o,s),a.forloop.next()}}else{const l=yield i._parsePartialFile(n,o.sync,this.currentFile);yield i.renderer.renderTemplates(l,o,s)}}*children(e,s){return e&&f(this.file)?yield this.liquid._parsePartialFile(this.file,s,this.currentFile):[]}partialScope(){if(f(this.file)){const e=Object.keys(this.hash.hash);if(this.with){const{value:s,alias:i}=this.with;f(i)?e.push([i,s]):f(this.file)&&e.push([this.file,s])}if(this.for){const{value:s,alias:i}=this.for;f(i)?e.push([i,s]):f(this.file)&&e.push([this.file,s])}return{name:this.file,isolated:!0,scope:e}}}*arguments(){for(const e of Object.values(this.hash.hash))F(e)&&(yield e);if(this.with){const{value:e}=this.with;F(e)&&(yield e)}if(this.for){const{value:e}=this.for;F(e)&&(yield e)}}}function $e(t,e,s){if(e.options.dynamicPartials){const n=t.readValue();if(t.assert(n,"illegal file path"),n.getText()==="none")return;if(be(n)){const o=s.parse(Ys(n));return Ht(o)}return n}const i=[...t.readFileNameTemplate(e.options)],r=Ht(s.parseTokens(i));return r==="none"?void 0:r}function Ht(t){return t.length===1&&we(t[0].token)?t[0].token.getContent():t}function*Ie(t,e,s){return typeof t=="string"?t:Array.isArray(t)?s.renderer.renderTemplates(t,e):yield T(t,e)}class pn extends b{constructor(e,s,i,r){super(e,s,i);const{tokenizer:n}=e;this.file=$e(n,this.liquid,r),this.currentFile=e.file;const o=n.p;n.readIdentifier().content==="with"?(n.skipBlank(),n.peek()!==":"?this.withVar=n.readValue():n.p=o):n.p=o,this.hash=new K(n,i.options.jekyllInclude||i.options.keyValueSeparator)}*render(e,s){const{liquid:i,hash:r,withVar:n}=this,{renderer:o}=i,a=yield Ie(this.file,e,i);S(a,()=>`illegal file path "${a}"`);const l=e.saveRegister("blocks","blockMode");e.setRegister("blocks",{}),e.setRegister("blockMode",J.OUTPUT);const h=yield r.render(e);n&&(h[a]=yield T(n,e));const c=yield i._parsePartialFile(a,e.sync,this.currentFile);e.push(e.opts.jekyllInclude?{include:h}:h),yield o.renderTemplates(c,e,s),e.pop(),e.restoreRegister(l)}*children(e,s){return e&&f(this.file)?yield this.liquid._parsePartialFile(this.file,s,this.currentFile):[]}partialScope(){if(f(this.file)){let e;return this.liquid.options.jekyllInclude?e=["include"]:(e=Object.keys(this.hash.hash),this.withVar&&e.push([this.file,this.withVar])),{name:this.file,isolated:!1,scope:e}}}*arguments(){yield*Object.values(this.hash.hash).filter(F),F(this.file)&&(yield this.file),F(this.withVar)&&(yield this.withVar)}}class gn extends b{constructor(e,s,i){super(e,s,i),this.identifier=this.tokenizer.readIdentifier(),this.variable=this.identifier.content}render(e,s){const i=e.environments;oe(i[this.variable])||(i[this.variable]=0),s.write(u(--i[this.variable]))}*localScope(){yield this.identifier}}class mn extends b{constructor(e,s,i){super(e,s,i),this.candidates=[];const r=this.tokenizer.readValue();for(this.tokenizer.skipBlank(),r&&(this.tokenizer.peek()===":"?(this.group=r,this.tokenizer.advance()):this.candidates.push(r));!this.tokenizer.end();){const n=this.tokenizer.readValue();n&&this.candidates.push(n),this.tokenizer.readTo(",")}this.tokenizer.assert(this.candidates.length,()=>`empty candidates: "${e.getText()}"`)}*render(e,s){const r=`cycle:${yield T(this.group,e)}:`+this.candidates.join(","),n=e.getRegister("cycle");let o=n[r];o===void 0&&(o=n[r]=0);const a=this.candidates[o];return o=(o+1)%this.candidates.length,n[r]=o,yield T(a,e)}*arguments(){yield*this.candidates,this.group&&(yield this.group)}}class yn extends b{constructor(e,s,i,r){super(e,s,i),this.branches=[];let n=[];r.parseStream(s).on("start",()=>this.branches.push({value:new L(e.tokenizer.readFilteredValue(),this.liquid),templates:n=[]})).on("tag:elsif",o=>{S(!this.elseTemplates,"unexpected elsif after else"),this.branches.push({value:new L(o.tokenizer.readFilteredValue(),this.liquid),templates:n=[]})}).on("tag:else",o=>{ue(o.args),S(!this.elseTemplates,"duplicated else"),n=this.elseTemplates=[]}).on("tag:endif",function(o){ue(o.args),this.stop()}).on("template",o=>n.push(o)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)}).start()}*render(e,s){const i=this.liquid.renderer;for(const{value:r,templates:n}of this.branches){const o=yield r.value(e,e.opts.lenientIf);if(B(o,e)){yield i.renderTemplates(n,e,s);return}}yield i.renderTemplates(this.elseTemplates||[],e,s)}*children(){const e=this.branches.flatMap(s=>s.templates);return this.elseTemplates&&e.push(...this.elseTemplates),e}arguments(){return this.branches.map(e=>e.value)}}class wn extends b{constructor(e,s,i){super(e,s,i),this.identifier=this.tokenizer.readIdentifier(),this.variable=this.identifier.content}render(e,s){const i=e.environments;oe(i[this.variable])||(i[this.variable]=0);const r=i[this.variable];i[this.variable]++,s.write(u(r))}*localScope(){yield this.identifier}}class bn extends b{constructor(e,s,i,r){super(e,s,i),this.file=$e(this.tokenizer,this.liquid,r),this.currentFile=e.file,this.args=new K(this.tokenizer,i.options.keyValueSeparator),this.templates=r.parseTokens(s)}*render(e,s){const{liquid:i,args:r,file:n}=this,{renderer:o}=i;if(n===void 0){e.setRegister("blockMode",J.OUTPUT),yield o.renderTemplates(this.templates,e,s);return}const a=yield Ie(this.file,e,i);S(a,()=>`illegal file path "${a}"`);const l=yield i._parseLayoutFile(a,e.sync,this.currentFile);e.setRegister("blockMode",J.STORE);const h=yield o.renderTemplates(this.templates,e),c=e.getRegister("blocks");c[""]===void 0&&(c[""]=(d,g)=>g.write(h)),e.setRegister("blockMode",J.OUTPUT),e.push(yield r.render(e)),yield o.renderTemplates(l,e,s),e.pop()}*children(e){const s=this.templates.slice();return e&&f(this.file)&&s.push(...yield this.liquid._parsePartialFile(this.file,!0,this.currentFile)),s}*arguments(){for(const e of Object.values(this.args.hash))F(e)&&(yield e);F(this.file)&&(yield this.file)}partialScope(){if(f(this.file))return{name:this.file,isolated:!1,scope:Object.keys(this.args.hash)}}}class Tn extends b{constructor(e,s,i,r){super(e,s,i),this.templates=[];const n=/\w+/.exec(e.args);for(this.block=n?n[0]:"";s.length;){const o=s.shift();if(P(o)&&o.name==="endblock")return;const a=r.parseToken(o,s);this.templates.push(a)}throw new Error(`tag ${e.getText()} not closed`)}*render(e,s){const i=this.getBlockRender(e);e.getRegister("blockMode")===J.STORE?e.getRegister("blocks")[this.block]=i:yield i(new rt,s)}getBlockRender(e){const{liquid:s,templates:i}=this,r=e.getRegister("blocks")[this.block],n=function*(o,a){e.push({block:o}),yield s.renderer.renderTemplates(i,e,a),e.pop()};return r?(o,a)=>r(new rt(l=>n(o,l)),a):n}*children(){return this.templates}blockScope(){return["block"]}}class kn extends b{constructor(e,s,i){for(super(e,s,i),this.tokens=[];s.length;){const r=s.shift();if(P(r)&&r.name==="endraw")return;this.tokens.push(r)}throw new Error(`tag ${e.getText()} not closed`)}render(){return this.tokens.map(e=>e.getText()).join("")}}class vn extends xe{constructor(e,s,i,r){super(e,i,r),this.length=e,this.cols=s}row(){return Math.floor(this.i/this.cols)+1}col0(){return this.i%this.cols}col(){return this.col0()+1}col_first(){return this.col0()===0}col_last(){return this.col()===this.cols}}class _n extends b{constructor(e,s,i,r){super(e,s,i);const n=this.tokenizer.readIdentifier();this.tokenizer.skipBlank();const o=this.tokenizer.readIdentifier(),a=this.tokenizer.readValue();if(o.content!=="in"||!a)throw new Error(`illegal tag: ${e.getText()}`);this.variable=n.content,this.collection=a,this.args=new K(this.tokenizer,i.options.keyValueSeparator),this.templates=[];let l;const h=r.parseStream(s).on("start",()=>l=this.templates).on("tag:endtablerow",()=>h.stop()).on("template",c=>l.push(c)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});h.start()}*render(e,s){let i=te(yield T(this.collection,e));const r=yield this.args.render(e),n=r.offset||0,o=r.limit===void 0?i.length:r.limit;i=i.slice(n,n+o);const a=r.cols||i.length,l=this.liquid.renderer,h=new vn(i.length,a,this.collection.getText(),this.variable),c={tablerowloop:h};e.push(c);for(let d=0;d<i.length;d++,h.next())c[this.variable]=i[d],h.col0()===0&&(h.row()!==1&&s.write("</tr>"),s.write(`<tr class="row${h.row()}">`)),s.write(`<td class="col${h.col()}">`),yield l.renderTemplates(this.templates,e,s),s.write("</td>");i.length&&s.write("</tr>"),e.pop()}*children(){return this.templates}*arguments(){yield this.collection;for(const e of Object.values(this.args.hash))F(e)&&(yield e)}blockScope(){return[this.variable,"tablerowloop"]}}class xn extends b{constructor(e,s,i,r){super(e,s,i),this.branches=[],this.elseTemplates=[];let n=[],o=0;r.parseStream(s).on("start",()=>this.branches.push({value:new L(e.tokenizer.readFilteredValue(),this.liquid),test:pe,templates:n=[]})).on("tag:elsif",a=>{if(o>0){n=[];return}this.branches.push({value:new L(a.tokenizer.readFilteredValue(),this.liquid),test:B,templates:n=[]})}).on("tag:else",()=>{o++,n=this.elseTemplates}).on("tag:endunless",function(){this.stop()}).on("template",a=>{(n!==this.elseTemplates||o===1)&&n.push(a)}).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)}).start()}*render(e,s){const i=this.liquid.renderer;for(const{value:r,test:n,templates:o}of this.branches){const a=yield r.value(e,e.opts.lenientIf);if(n(a,e)){yield i.renderTemplates(o,e,s);return}}yield i.renderTemplates(this.elseTemplates,e,s)}*children(){const e=this.branches.flatMap(s=>s.templates);return this.elseTemplates&&e.push(...this.elseTemplates),e}arguments(){return this.branches.map(e=>e.value)}}class Sn extends b{render(e,s){e.breakCalled=!0}}class Fn extends b{render(e,s){e.continueCalled=!0}}class Ln extends b{constructor(e,s,i){super(e,s,i),this.tokenizer.skipBlank(),this.tokenizer.end()||(this.value=new L(this.tokenizer.readFilteredValue(),this.liquid))}*render(e,s){if(!this.value)return;const i=yield this.value.value(e,!1);s.write(i)}*arguments(){this.value&&(yield this.value)}}class On extends b{constructor(e,s,i,r){super(e,s,i);const n=this.tokenizer.readLiquidTagTokens(this.liquid.options);this.templates=r.parseTokens(n)}*render(e,s){yield this.liquid.renderer.renderTemplates(this.templates,e,s)}*children(){return this.templates}}class zn extends b{constructor(e,s,i){if(super(e,s,i),e.args.search(/\n\s*[^#\s]/g)!==-1)throw new Error("every line of an inline comment must start with a '#' character")}render(){}}const Rn={assign:nn,for:on,capture:hn,case:un,comment:fn,include:pn,render:dn,decrement:gn,increment:wn,cycle:mn,if:yn,layout:bn,block:Tn,raw:kn,tablerow:_n,unless:xn,break:Sn,continue:Fn,echo:Ln,liquid:On,"#":zn};class Be{constructor(e={}){this.renderer=new Us,this.filters={},this.tags={},this.options=wi(e),this.parser=new W(this),Ye(Rn,(s,i)=>this.registerTag(i,s)),Ye(rn,(s,i)=>this.registerFilter(i,s))}parse(e,s){return new W(this).parse(e,s)}_render(e,s,i){const r=s instanceof Y?s:new Y(s,this.options,i);return this.renderer.renderTemplates(e,r)}render(e,s,i){return v(this,void 0,void 0,function*(){return M(this._render(e,s,Object.assign(Object.assign({},i),{sync:!1})))})}renderSync(e,s,i){return V(this._render(e,s,Object.assign(Object.assign({},i),{sync:!0})))}renderToNodeStream(e,s,i={}){const r=new Y(s,this.options,i);return this.renderer.renderTemplatesToNodeStream(e,r)}_parseAndRender(e,s,i){const r=this.parse(e);return this._render(r,s,i)}parseAndRender(e,s,i){return v(this,void 0,void 0,function*(){return M(this._parseAndRender(e,s,Object.assign(Object.assign({},i),{sync:!1})))})}parseAndRenderSync(e,s,i){return V(this._parseAndRender(e,s,Object.assign(Object.assign({},i),{sync:!0})))}_parsePartialFile(e,s,i){return new W(this).parseFile(e,s,H.Partials,i)}_parseLayoutFile(e,s,i){return new W(this).parseFile(e,s,H.Layouts,i)}_parseFile(e,s,i,r){return new W(this).parseFile(e,s,i,r)}parseFile(e,s){return v(this,void 0,void 0,function*(){return M(new W(this).parseFile(e,!1,s))})}parseFileSync(e,s){return V(new W(this).parseFile(e,!0,s))}*_renderFile(e,s,i){const r=yield this._parseFile(e,i.sync,i.lookupType);return yield this._render(r,s,i)}renderFile(e,s,i){return v(this,void 0,void 0,function*(){return M(this._renderFile(e,s,Object.assign(Object.assign({},i),{sync:!1})))})}renderFileSync(e,s,i){return V(this._renderFile(e,s,Object.assign(Object.assign({},i),{sync:!0})))}renderFileToNodeStream(e,s,i){return v(this,void 0,void 0,function*(){const r=yield this.parseFile(e);return this.renderToNodeStream(r,s,i)})}_evalValue(e,s){const i=new L(e,this),r=s instanceof Y?s:new Y(s,this.options);return i.value(r)}evalValue(e,s){return v(this,void 0,void 0,function*(){return M(this._evalValue(e,s))})}evalValueSync(e,s){return V(this._evalValue(e,s))}registerFilter(e,s){this.filters[e]=s}registerTag(e,s){this.tags[e]=k(s)?s:xi(s)}plugin(e){return e.call(this,Be)}express(){const e=this;let s=!0;return function(i,r,n){if(s){s=!1;const o=me(this.root);e.options.root.unshift(...o),e.options.layouts.unshift(...o),e.options.partials.unshift(...o)}e.renderFile(i,r).then(o=>n(null,o),n)}}analyze(e,s={}){return v(this,void 0,void 0,function*(){return q(e,s)})}analyzeSync(e,s={}){return C(e,s)}parseAndAnalyze(e,s,i={}){return v(this,void 0,void 0,function*(){return q(this.parse(e,s),i)})}parseAndAnalyzeSync(e,s,i={}){return C(this.parse(e,s),i)}variables(e,s={}){return v(this,void 0,void 0,function*(){const i=yield q(f(e)?this.parse(e):e,s);return Object.keys(i.variables)})}variablesSync(e,s={}){const i=C(f(e)?this.parse(e):e,s);return Object.keys(i.variables)}fullVariables(e,s={}){return v(this,void 0,void 0,function*(){const i=yield q(f(e)?this.parse(e):e,s);return Array.from(new Set(Object.values(i.variables).flatMap(r=>r.map(n=>String(n)))))})}fullVariablesSync(e,s={}){const i=C(f(e)?this.parse(e):e,s);return Array.from(new Set(Object.values(i.variables).flatMap(r=>r.map(n=>String(n)))))}variableSegments(e,s={}){return v(this,void 0,void 0,function*(){const i=yield q(f(e)?this.parse(e):e,s);return Array.from(ce(Object.values(i.variables).flatMap(r=>r.map(n=>n.toArray()))))})}variableSegmentsSync(e,s={}){const i=C(f(e)?this.parse(e):e,s);return Array.from(ce(Object.values(i.variables).flatMap(r=>r.map(n=>n.toArray()))))}globalVariables(e,s={}){return v(this,void 0,void 0,function*(){const i=yield q(f(e)?this.parse(e):e,s);return Object.keys(i.globals)})}globalVariablesSync(e,s={}){const i=C(f(e)?this.parse(e):e,s);return Object.keys(i.globals)}globalFullVariables(e,s={}){return v(this,void 0,void 0,function*(){const i=yield q(f(e)?this.parse(e):e,s);return Array.from(new Set(Object.values(i.globals).flatMap(r=>r.map(n=>String(n)))))})}globalFullVariablesSync(e,s={}){const i=C(f(e)?this.parse(e):e,s);return Array.from(new Set(Object.values(i.globals).flatMap(r=>r.map(n=>String(n)))))}globalVariableSegments(e,s={}){return v(this,void 0,void 0,function*(){const i=yield q(f(e)?this.parse(e):e,s);return Array.from(ce(Object.values(i.globals).flatMap(r=>r.map(n=>n.toArray()))))})}globalVariableSegmentsSync(e,s={}){const i=C(f(e)?this.parse(e):e,s);return Array.from(ce(Object.values(i.globals).flatMap(r=>r.map(n=>n.toArray()))))}}const Vn="[VI]{version}[/VI]"}}]);