mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
1253 lines
839 KiB
JavaScript
1253 lines
839 KiB
JavaScript
|
(()=>{var XE=Object.create;var Ga=Object.defineProperty;var ZE=Object.getOwnPropertyDescriptor;var JE=Object.getOwnPropertyNames;var e8=Object.getPrototypeOf,t8=Object.prototype.hasOwnProperty;var r8=(e,t,r)=>t in e?Ga(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var n8=(e,t)=>()=>(e&&(t=e(e=0)),t);var k=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),de=(e,t)=>{for(var r in t)Ga(e,r,{get:t[r],enumerable:!0})},i8=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of JE(t))!t8.call(e,i)&&i!==r&&Ga(e,i,{get:()=>t[i],enumerable:!(n=ZE(t,i))||n.enumerable});return e};var jr=(e,t,r)=>(r=e!=null?XE(e8(e)):{},i8(t||!e||!e.__esModule?Ga(r,"default",{value:e,enumerable:!0}):r,e));var g=(e,t,r)=>r8(e,typeof t!="symbol"?t+"":t,r);var h,l=n8(()=>{h=()=>Date.now()});var hi=k((po,zy)=>{l();(function(e,t){typeof po=="object"&&typeof zy<"u"?t(po):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.sourcemapCodec={}))})(po,function(e){"use strict";let n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=new Uint8Array(64),s=new Uint8Array(128);for(let I=0;I<n.length;I++){let B=n.charCodeAt(I);i[I]=B,s[B]=I}function a(I,B){let q=0,A=0,K=0;do{let F=I.next();K=s[F],q|=(K&31)<<A,A+=5}while(K&32);let ee=q&1;return q>>>=1,ee&&(q=-2147483648|-q),B+q}function u(I,B,q){let A=B-q;A=A<0?-A<<1|1:A<<1;do{let K=A&31;A>>>=5,A>0&&(K|=32),I.write(i[K])}while(A>0);return B}function o(I,B){return I.pos>=B?!1:I.peek()!==44}let c=1024*16,d=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(I){return Buffer.from(I.buffer,I.byteOffset,I.byteLength).toString()}}:{decode(I){let B="";for(let q=0;q<I.length;q++)B+=String.fromCharCode(I[q]);return B}};class p{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(c)}write(B){let{buffer:q}=this;q[this.pos++]=B,this.pos===c&&(this.out+=d.decode(q),this.pos=0)}flush(){let{buffer:B,out:q,pos:A}=this;return A>0?q+d.decode(B.subarray(0,A)):q}}class f{constructor(B){this.pos=0,this.buffer=B}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(B){let{buffer:q,pos:A}=this,K=q.indexOf(B,A);return K===-1?q.length:K}}let m=[];function y(I){let{length:B}=I,q=new f(I),A=[],K=[],ee=0;for(;q.pos<B;q.pos++){ee=a(q,ee);let F=a(q,0);if(!o(q,B)){let me=K.pop();me[2]=ee,me[3]=F;continue}let O=a(q,0),te=a(q,0)&1?[ee,F,0,0,O,a(q,0)]:[ee,F,0,0,O],oe=m;if(o(q,B)){oe=[];do{let me=a(q,0);oe.push(me)}while(o(q,B))}te.vars=oe,A.push(te),K.push(te)}return A}function w(I){let B=new p;for(let q=0;q<I.length;)q=b(I,q,B,[0]);return B.flush()}function b(I,B,q,A){let K=I[B],{0:ee,1:F,2:O,3:G,4:X,vars:te}=K;B>0&&q.write(44),A[0]=u(q,ee,A[0]),u(q,F,0),u(q,X,0);let oe=K.length===6?1:0;u(q,oe,0),K.length===6&&u(q,K[5],0);for(let me of te)u(q,me,0);for(B++;B<I.length;){let me=I[B],{0:ce,1:ge}=me;if(ce>O||ce===O&&ge>=G)break;B=b(I,B,q,A)}return q.write(44),A[0]=u(q,O,A[0]),u(q,G,0),B}function $(I){let{length:B}=I,q=new f(I),A=[],K=[],ee=0,F=0,O=0,G=0,X=0,te=0,oe=0,me=0;do{let ce=q.indexOf(";"),ge=0;for(;q.pos<ce;q.pos++){if(ge=a(q,ge),!o(q,ce)){let J=K.pop();J[2]=ee,J[3]=ge;continue}let Ne=a(q,0),Et=Ne&1,at=Ne&2,_t=Ne&4,z=null,Ce=m,Re;if(Et){let J=a(q,F);O=a(q,F===J?O:0),F=J,Re=[ee,ge,0,0,J,O]}else Re=[ee,ge,0,0];if(Re.isScope=!!_t,at){let J=G,ct=X;G=a(q,G);let We=J===G;X=a(q,We?X:0),te=a(q,We&&ct===X?te:0),z=[G,X,te]}if(Re.callsite=z,o(q,ce)){Ce=[];do{oe=ee,me=ge;let J=a(q,0),ct;if(J<-1){ct=[[a(q,0)]];for(let We=-1;We>J;We--){let Be=oe;oe=a(q,oe),me=a(q,oe===Be?me:0);let dt=a(q,0);ct.push([dt,oe,me])}}else ct=[[J]];Ce.push(ct)}while(o(q,ce))}Re.bindings=Ce,A.push(Re),K.push(Re)}ee++,q.pos=ce+1}while(q.pos<B);return A}function C(I){if(I.length===0)return"";let B=new p;for(let q=0;q<I.length;)q=R(I,q,B,[0,0,0,0,0,0,0]);return B.flush()}function R(I,B,q,A){let K=I[B],{0:ee,1:F,2:O,3:G,isScope:X,callsite:te,bindings:oe}=K;A[0]<ee?(E(q,A[0],ee),A[0]=ee,A[1]=0):B>0&&q.write(44),A[1]=u(q,K[1],A[1]);let me=(K.length===6?1:0)|(te?2:0)|(X?4:0);if(u(q,me,0),K.length===6){let{
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xM(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,s=!1,a,u;try{for(r=r.call(e);!(i=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));i=!0);}catch(o){s=!0,u=o}finally{try{!i&&r.return!=null&&r.return()}finally{if(s)throw u}}return n}}function wM(e){if(Array.isArray(e))return e}function kM(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Y0(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s=!0,a=!1,u;return{s:function(){r=r.call(e)},n:function(){var c=r.next();return s=c.done,c},e:function(c){a=!0,u=c},f:function(){try{!s&&r.return!=null&&r.return()}finally{if(a)throw u}}}}function Y0(e,t){if(e){if(typeof e=="string")return W0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return W0(e,t)}}function W0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Di=[["aria-activedescendant",{type:"id"}],["aria-atomic",{type:"boolean"}],["aria-autocomplete",{type:"token",values:["inline","list","both","none"]}],["aria-braillelabel",{type:"string"}],["aria-brailleroledescription",{type:"string"}],["aria-busy",{type:"boolean"}],["aria-checked",{type:"tristate"}],["aria-colcount",{type:"integer"}],["aria-colindex",{type:"integer"}],["aria-colspan",{type:"integer"}],["aria-controls",{type:"idlist"}],["aria-current",{type:"token",values:["page","step","location","date","time",!0,!1]}],["aria-describedby",{type:"idlist"}],["aria-description",{type:"string"}],["aria-details",{type:"id"}],["aria-disabled",{type:"boolean"}],["aria-dropeffect",{type:"tokenlist",values:["copy","execute","link","move","none","popup"]}],["aria-errormessage",{type:"id"}],["aria-expanded",{type:"boolean",allowundefined:!0}],["aria-flowto",{type:"idlist"}],["aria-grabbed",{type:"boolean",allowundefined:!0}],["aria-haspopup",{type:"token",values:[!1,!0,"menu","listbox","tree","grid","dialog"]}],["aria-hidden",{type:"boolean",allowundefined:!0}],["aria-invalid",{type:"token",values:["grammar",!1,"spelling",!0]}],["aria-keyshortcuts",{type:"string"}],["aria-label",{type:"string"}],["aria-labelledby",{type:"idlist"}],["aria-level",{type:"integer"}],["aria-live",{type:"token",values:["assertive","off","polite"]}],["aria-modal",{type:"boolean"}],["aria-multiline",{type:"boolean"}],["aria-multiselectable",{type:"boolean"}],["aria-orientation",{type:"token",values:["vertical","undefined","horizontal"]}],["aria-owns",{type:"idlist"}],["aria-placeholder",{type:"string"}],["aria-posinset",{type:"integer"}],["aria-pressed",{type:"tristate"}],["aria-readonly",{type:"boolean"}],["aria-relevant",{type:"tokenlist",values:["additions","all","removals","text"]}],["aria-required",{type:"boolean"}],["aria-roledescription",{type:"string"}],["aria-rowcount",{type:"integer"}],["aria-rowindex",{type:"integer"}],["aria-rowspan",{type:"integer"}],["aria-selected",{type:"boolean",allowundefined:!0}],["aria-setsize",{type:"integer"}],["aria-sort",{type:"token",values:["ascending","descending","none","other"]}],["aria-valuemax",{type:"number"}],["aria-valuemin",{type:"number"}],["aria-valuenow",{type:"number"}],["aria-valuetext",{type:"string"}]],qg={entries:function(){return Di},forEach:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,n=kM(Di),i;try{for(n.s();!(i=n.n()).done;){var s=Ag(i.value,2),a=s[0],u=s[1];t.call(r,u,a,Di)}}catch(o){n.e(o)}finally{n.f()}},get:function(t){var r=Di.find(function(n){return n[0]===t});return r&&r[1]},has:function(t){return!!qg.get(t)},keys:function(){return Di.map(function(t){var r=Ag(t,1),n=r[0];return n})},values:function(){return Di.map(function(t){var r=Ag(t,2),n=r[1];return n})}},$M=(0,vM.default)(qg,qg.entries());il.default=$M});var Z0=k(sl=>{"use strict";l();Object.defineProperty(sl,"__esModule",{value:!0});sl.default=void 0;var CM=SM(Ni());function SM(e){return e&&e.__esModule?e:{default:e}}function Tg(e,t){return PM(e)||RM(e,t)||X0(e,t)||EM()}function EM(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RM(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,s=!1,a,u;try{for(r=r.call(e);!(i=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));i=!0);}catch(o){s=!0,u=o}finally{try{!i&&r.return!=null&&r.return()}finally{if(s)throw u}}return n}}function PM(e){if(Array.isArray(e))return e}function AM(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=X0(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s=!0,a=!1,u;return{s:function(){r=r.call(e)},n:function(){var c=r.next();return s=c.done,c},e:function(c){a=!0,u=c},f:function(){try{!s&&r.return!=null&&r.return()}finally{if(a)throw u}}}}function X0(e,t){if(e){if(typeof e=="string")return Q0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Q0(e,t)}}function Q0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Bi=[["a",{reserved:!1}],["abbr",{reserved:!1}],["acronym",{reserved:!1}],["address",{reserved:!1}],["applet",{reserved:!1}],["area",{reserved:!1}],["article",{reserved:!1}],["aside",{reserved:!1}],["audio",{reserved:!1}],["b",{reserved:!1}],["base",{reserved:!0}],["bdi",{reserved:!1}],["bdo",{reserved:!1}],["big",{reserved:!1}],["blink",{reserved:!1}],["blockquote",{reserved:!1}],["body",{reserved:!1}],["br",{reserved:!1}],["button",{reserved:!1}],["canvas",{reserved:!1}],["caption",{reserved:!1}],["center",{reserved:!1}],["cite",{reserved:!1}],["code",{reserved:!1}],["col",{reserved:!0}],["colgroup",{reserved:!0}],["content",{reserved:!1}],["data",{reserved:!1}],["datalist",{reserved:!1}],["dd",{reserved:!1}],["del",{reserved:!1}],["details",{reserved:!1}],["dfn",{reserved:!1}],["dialog",{reserved:!1}],["dir",{reserved:!1}],["div",{reserved:!1}],["dl",{reserved:!1}],["dt",{reserved:!1}],["em",{reserved:!1}],["embed",{reserved:!1}],["fieldset",{reserved:!1}],["figcaption",{reserved:!1}],["figure",{reserved:!1}],["font",{reserved:!1}],["footer",{reserved:!1}],["form",{reserved:!1}],["frame",{reserved:!1}],["frameset",{reserved:!1}],["h1",{reserved:!1}],["h2",{reserved:!1}],["h3",{reserved:!1}],["h4",{reserved:!1}],["h5",{reserved:!1}],["h6",{reserved:!1}],["head",{reserved:!0}],["header",{reserved:!1}],["hgroup",{reserved:!1}],["hr",{reserved:!1}],["html",{reserved:!0}],["i",{reserved:!1}],["iframe",{reserved:!1}],["img",{reserved:!1}],["input",{reserved:!1}],["ins",{reserved:!1}],["kbd",{reserved:!1}],["keygen",{reserved:!1}],["label",{reserved:!1}],["legend",{reserved:!1}],["li",{reserved:!1}],["link",{reserved:!0}],["main",{reserved:!1}],["map",{reserved:!1}],["mark",{reserved:!1}],["marquee",{reserved:!1}],["menu",{reserved:!1}],["menuitem",{reserved:!1}],["meta",{reserved:!0}],["meter",{reserved:!1}],["nav",{reserved:!1}],["noembed",{reserved:!0}],["noscript",{reserved:!0}],["object",{reserved:!1}],["ol",{reserved:!1}],["optgroup",{reserved:!1}],["option",{reserved:!1}],["output",{reserved:!1}],["p",{reserved:!1}],["param",{reserved:!0}],["picture",{reserved:!0}],["pre",{reserved:!1}],["progress",{reserved:!1}],["q",{reserved:!1}],["rp",{reserved:!1}],["rt",{reserved:!1}],["rtc",{reserved:!1}],["ruby",{reserved:!1}],["s",{reserved:!1}],["samp",{reserved:!1}],["script",{reserved:!0}],["section",{reserved:!1}],["select",{reserved:!1}],["small",{reserved:!1}],["source",{reserved:!0}],["spacer",{reserved:!1}],["span",{reserved:!1}],["strike",{reserved:!1}],["strong",{reserved:!1}],["style",{reserved:!0}],["sub",{reserved:!1}],["summary",{reserved:!1}],["sup",{reserved:!1}],["table",{reserved:!1}],["tbody",{reserved:!1}],["td",{reserved:!1}],["textarea",{reserved:!1}],["tfoot",{reserved:!1}],["th",{reserved:!1}],["thead",{reserved:!1}],["time",{reserved:!1}],["title",{reserved:!0}],["tr",{reserved:!1}],["track",{reserved:!0}],["tt",{reserved:!1}],["u",{reserved:!1}],["ul",{reserved:!1}],["var",{reserved:!1}],["video",{reserved:!1}],["wbr",{reserved:!1}],["xmp",{reserved:!1}]],Lg={entries:function(){return Bi},forEach:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,n=AM(Bi),i;try{for(n.s();!(i=n.n()).done;){var s=Tg(i.value,2),a=s[0],u=s[1];t.call(r,u,a,Bi)}}catch(o){n.e(o)}finally{n.f()}},get:function(t){var r=Bi.find(function(n){return n[0]===t});return r&&r[1]},has:function(t){return!!Lg.get(t)},keys:function(){return
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s=!0,a=!1,u;return{s:function(){r=r.call(e)},n:function(){var c=r.next();return s=c.done,c},e:function(c){a=!0,u=c},f:function(){try{!s&&r.return!=null&&r.return()}finally{if(a)throw u}}}}function Qs(e,t){return E4(e)||S4(e,t)||Lk(e,t)||C4()}function C4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Lk(e,t){if(e){if(typeof e=="string")return Tk(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Tk(e,t)}}function Tk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function S4(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,s=!1,a,u;try{for(r=r.call(e);!(i=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));i=!0);}catch(o){s=!0,u=o}finally{try{!i&&r.return!=null&&r.return()}finally{if(s)throw u}}return n}}function E4(e){if(Array.isArray(e))return e}var _n=[].concat(y4.default,b4.default,x4.default,w4.default);_n.forEach(function(e){var t=Qs(e,2),r=t[1],n=Ig(r.superClass),i;try{for(n.s();!(i=n.n()).done;){var s=i.value,a=Ig(s),u;try{var o=function(){var d=u.value,p=_n.find(function(b){var $=Qs(b,1),C=$[0];return C===d});if(p)for(var f=p[1],m=0,y=Object.keys(f.props);m<y.length;m++){var w=y[m];Object.prototype.hasOwnProperty.call(r.props,w)||Object.assign(r.props,$4({},w,f.props[w]))}};for(a.s();!(u=a.n()).done;)o()}catch(c){a.e(c)}finally{a.f()}}}catch(c){n.e(c)}finally{n.f()}});var Og={entries:function(){return _n},forEach:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,n=Ig(_n),i;try{for(n.s();!(i=n.n()).done;){var s=Qs(i.value,2),a=s[0],u=s[1];t.call(r,u,a,_n)}}catch(o){n.e(o)}finally{n.f()}},get:function(t){var r=_n.find(function(n){return n[0]===t});return r&&r[1]},has:function(t){return!!Og.get(t)},keys:function(){return _n.map(function(t){var r=Qs(t,1),n=r[0];return n})},values:function(){return _n.map(function(t){var r=Qs(t,2),n=r[1];return n})}},R4=(0,k4.default)(Og,Og.entries());Bc.default=R4});var Ok=k(Ik=>{l();var Mk=Object.prototype.hasOwnProperty;function Ng(e,t){var r,n;if(e===t)return!0;if(e&&t&&(r=e.constructor)===t.constructor){if(r===Date)return e.getTime()===t.getTime();if(r===RegExp)return e.toString()===t.toString();if(r===Array){if((n=e.length)===t.length)for(;n--&&Ng(e[n],t[n]););return n===-1}if(!r||typeof e=="object"){n=0;for(r in e)if(Mk.call(e,r)&&++n&&!Mk.call(t,r)||!(r in t)||!Ng(e[r],t[r]))return!1;return Object.keys(t).length===n}}return e!==e&&t!==t}Ik.dequal=Ng});var Hk=k(zc=>{"use strict";l();Object.defineProperty(zc,"__esModule",{value:!0});zc.default=void 0;var Bk=Ok(),P4=jk(Ni()),Fk=jk(Fc());function jk(e){return e&&e.__esModule?e:{default:e}}function Dg(e,t){return T4(e)||q4(e,t)||Vk(e,t)||A4()}function A4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function q4(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,s=!1,a,u;try{for(r=r.call(e);!(i=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));i=!0);}catch(o){s=!0,u=o}finally{try{!i&&r.return!=null&&r.return()}finally{if(s)throw u}}return n}}function T4(e){if(Array.isArray(e))return e}function L4(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Vk(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s=!0,a=!1,u;return{s:function(){r=r.call(e)},n:function(){var c=r.next();return s=c.done,c},e:function(c){a=!0,u=c},f:function(){try{!s&&r.return!=null&&r.return()}finally{if(a)throw u}}}}function Vk(e,t){if(e){if(typeof e=="string")return Nk(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Nk(e,t)}}function Nk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var gn=[],Dk=Fk.default.keys();for(jc=0;jc<Dk.length;jc++)if(Vc=Dk[jc],Hc=Fk.default.get(Vc),Hc)for(Bg=[].concat(Hc.baseConcepts,Hc.relatedConcepts),Uc=0;Uc<Bg.length;Uc++)Fg=Bg[Uc],Fg.module==="HTML"&&function(){var e=Fg.concept;if(e){var t=gn.find(function(s){return(0,Bk.dequal)(s,e)}),r;t?r=t[1]:r=[];for(var n=!0,i=0;i<r.length;i++)if(r[i]===Vc){n=!1;break}n&&r.push(Vc),gn.push([e,r])}}();var Vc,Hc,Bg,Fg,Uc,jc,jg={entries:function(){return gn},forEach:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,n=L4(gn),i;try{for(n.s();!(i=n.n()).done;){var s=Dg(i.value,2),a=s[0],u=s[1];t.call(r,u,a,gn)}}catch(o){n.e(o)}finally{n.f()}},get:function(t){var r=gn.find(function(n){return t.name===n[0].name&&(0,Bk.dequal)(t.attributes,n[0].attributes)});return r&&r[1]},has:function(t){return!!jg.get(t)},keys:function(){return gn.map(function(t){var r=Dg(t,1),n=r[0];return n})},values:function(){return gn.map(function(t){var r=Dg(t,2),n=r[1];return n})}},M4=(0,P4.default)(jg,jg.entries());zc.default=M4});var Kk=k(Qc=>{"use strict";l();Object.defineProperty(Qc,"__esModule",{value:!0});Qc.default=void 0;var I4=Wk(Ni()),Gk=Wk(Fc());function Wk(e){return e&&e.__esModule?e:{default:e}}function Vg(e,t){return D4(e)||N4(e,t)||Yk(e,t)||O4()}function O4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N4(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,s=!1,a,u;try{for(r=r.call(e);!(i=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));i=!0);}catch(o){s=!0,u=o}finally{try{!i&&r.return!=null&&r.return()}finally{if(s)throw u}}return n}}function D4(e){if(Array.isArray(e))return e}function B4(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Yk(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s=!0,a=!1,u;return{s:function(){r=r.call(e)},n:function(){var c=r.next();return s=c.done,c},e:function(c){a=!0,u=c},f:function(){try{!s&&r.return!=null&&r.return()}finally{if(a)throw u}}}}function Yk(e,t){if(e){if(typeof e=="string")return Uk(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Uk(e,t)}}function Uk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Bn=[],zk=Gk.default.keys();for(Gc=0;Gc<zk.length;Gc++)if(Hg=zk[Gc],Wc=Gk.default.get(Hg),Yc=[],Wc){for(Ug=[].concat(Wc.baseConcepts,Wc.relatedConcepts),Kc=0;Kc<Ug.length;Kc++)zg=Ug[Kc],zg.module==="HTML"&&(Gg=zg.concept,Gg!=null&&Yc.push(Gg));Yc.length>0&&Bn.push([Hg,Yc])}var Hg,Wc,Yc,Ug,zg,Gg,Kc,Gc,Wg={entries:function(){return Bn},forEach:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,n=B4(Bn),i;try{for(n.s();!(i=n.n()).done;){var s=Vg(i.value,2),a=s[0],u=s[1];t.call(r,u,a,Bn)}}catch(o){n.e(o)}finally{n.f()}},get:function(t){var r=Bn.find(function(n){return n[0]===t});return r&&r[1]},has:function(t){return!!Wg.get(t)},keys:function(){return Bn.map(function(t){var r=Vg(t,1),n=r[0];return n})},values:function(){return Bn.map(function(t){var r=Vg(t,2),n=r[1];return n})}},F4=(0,I4.default)(Wg,Wg.entries());Qc.default=F4});var Yg=k(dr=>{"use strict";l();Object.defineProperty(dr,"__esModule",{value:!0});dr.roles=dr.roleElements=dr.elementRoles=dr.dom=dr.aria=void 0;var j4=Zs(K0()),V4=Zs(Z0()),H4=Zs(Fc()),U4=Zs(Hk()),z4=Zs(Kk());function Zs(e){return e&&e.__esModule?e:{default:e}}var G4=j4.default;dr.aria=G4;var W4=V4.default;dr.dom=W4;var Y4=H4.default;dr.roles=Y4;var K4=U4.default;dr.elementRoles=K4;var Q4=z4.default;dr.roleElements=Q4});var Qk=k(Xc=>{"use strict";l();Object.defineProperty(Xc,"__esModule",{value:!0});Xc.default=void 0;function X4(){var e=this,t=0,r={"@@iterator":function(){return r},next:function(){if(t<e.length){var i=e[t];return t=t+1,{done:!1,value:i}}else return{done:!0}}};return r}var Z4=X4;Xc.default=Z4});var Js=k(Qg=>{"use strict";l();Object.defineProperty(Qg,"__esModule",{value:!0});Qg.default=t5;var J4=e5(Qk());function e5(e){return e&&e.__esModule?e:{default:e}}function Kg(e){"@babel/helpers - typeof";return Kg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kg(e)}function t5(e,t){return typeof Symbol=="function"&&Kg(Symbol.iterator)==="symbol"&&Object.defineProperty(e,Symbol.iterator,{value:J4.default.bind(t)}),e}});var Xk=k(Zc=>{"use strict";l();Object.defineProperty(Zc,"__esModule",{value:!0});Zc.default=void 0;var r5={relatedConcepts:[{module:"HTML",concept:{name:"abbr"}}],type:"structure"},n5=r5;Zc.default=n5});var Zk=k(Jc=>{"use strict";l();Object.defineProperty(Jc,"__esModule",{value:!0});Jc.default=void 0;var i5={relatedConcepts:[{module:"ARIA",concept:{name:"alertdialog"}}],type:"window"},s5=i5;Jc.default=s5});var Jk=k(ed=>{"use strict";l();Object.defineProperty(ed,"__esModule",{value:!0});ed.default=void 0;var a5={relatedConcepts:[{module:"ARIA",concept:{name:"alert"}}],type:"structure"},o5=a5;ed.default=o5});var e$=k(td=>{"use strict";l();Object.defineProperty(td,"__esModule",{value:!0});td.default=void 0;var l5={relatedConcepts:[],type:"structure"},u5=l5;td.default=u5});var t$=k(rd=>{"use strict";l();Object.defineProperty(rd,"__esModule",{value:!0});rd.default=void 0;var c5={relatedConcepts:[{module:"ARIA",concept:{name:"application"}}],type:"window"},d5=c5;rd.default=d5});var r$=k(nd=>{"use strict";l();Object.defineProperty(nd,"__esModule",{value:!0});nd.default=void 0;var p5={relatedConcepts:[{module:"ARIA",concept:{name:"article"}},{module:"HTML",concept:{name:"article"}}],type:"structure"},h5=p5;nd.default=h5});var n$=k(id=>{"us
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZH(e,t){if(e){if(typeof e=="string")return hS(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return hS(e,t)}}function hS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function JH(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,s=!1,a,u;try{for(r=r.call(e);!(i=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));i=!0);}catch(o){s=!0,u=o}finally{try{!i&&r.return!=null&&r.return()}finally{if(s)throw u}}return n}}function eU(e){if(Array.isArray(e))return e}var Fi=[["AbbrRole",Ij.default],["AlertDialogRole",Oj.default],["AlertRole",Nj.default],["AnnotationRole",Dj.default],["ApplicationRole",Bj.default],["ArticleRole",Fj.default],["AudioRole",jj.default],["BannerRole",Vj.default],["BlockquoteRole",Hj.default],["BusyIndicatorRole",Uj.default],["ButtonRole",zj.default],["CanvasRole",Gj.default],["CaptionRole",Wj.default],["CellRole",Yj.default],["CheckBoxRole",Kj.default],["ColorWellRole",Qj.default],["ColumnHeaderRole",Xj.default],["ColumnRole",Zj.default],["ComboBoxRole",Jj.default],["ComplementaryRole",eV.default],["ContentInfoRole",tV.default],["DateRole",rV.default],["DateTimeRole",nV.default],["DefinitionRole",iV.default],["DescriptionListDetailRole",sV.default],["DescriptionListRole",aV.default],["DescriptionListTermRole",oV.default],["DetailsRole",lV.default],["DialogRole",uV.default],["DirectoryRole",cV.default],["DisclosureTriangleRole",dV.default],["DivRole",pV.default],["DocumentRole",hV.default],["EmbeddedObjectRole",fV.default],["FeedRole",mV.default],["FigcaptionRole",_V.default],["FigureRole",gV.default],["FooterRole",vV.default],["FormRole",yV.default],["GridRole",bV.default],["GroupRole",xV.default],["HeadingRole",wV.default],["IframePresentationalRole",kV.default],["IframeRole",$V.default],["IgnoredRole",CV.default],["ImageMapLinkRole",SV.default],["ImageMapRole",EV.default],["ImageRole",RV.default],["InlineTextBoxRole",PV.default],["InputTimeRole",AV.default],["LabelRole",qV.default],["LegendRole",TV.default],["LineBreakRole",LV.default],["LinkRole",MV.default],["ListBoxOptionRole",IV.default],["ListBoxRole",OV.default],["ListItemRole",NV.default],["ListMarkerRole",DV.default],["ListRole",BV.default],["LogRole",FV.default],["MainRole",jV.default],["MarkRole",VV.default],["MarqueeRole",HV.default],["MathRole",UV.default],["MenuBarRole",zV.default],["MenuButtonRole",GV.default],["MenuItemRole",WV.default],["MenuItemCheckBoxRole",YV.default],["MenuItemRadioRole",KV.default],["MenuListOptionRole",QV.default],["MenuListPopupRole",XV.default],["MenuRole",ZV.default],["MeterRole",JV.default],["NavigationRole",eH.default],["NoneRole",tH.default],["NoteRole",rH.default],["OutlineRole",nH.default],["ParagraphRole",iH.default],["PopUpButtonRole",sH.default],["PreRole",aH.default],["PresentationalRole",oH.default],["ProgressIndicatorRole",lH.default],["RadioButtonRole",uH.default],["RadioGroupRole",cH.default],["RegionRole",dH.default],["RootWebAreaRole",pH.default],["RowHeaderRole",hH.default],["RowRole",fH.default],["RubyRole",mH.default],["RulerRole",_H.default],["ScrollAreaRole",gH.default],["ScrollBarRole",vH.default],["SeamlessWebAreaRole",yH.default],["SearchRole",bH.default],["SearchBoxRole",xH.default],["SliderRole",wH.default],["SliderThumbRole",kH.default],["SpinButtonRole",$H.default],["SpinButtonPartRole",CH.default],["SplitterRole",SH.default],["StaticTextRole",EH.default],["StatusRole",RH.default],["SVGRootRole",PH.default],["SwitchRole",AH.default],["TabGroupRole",qH.default],["TabRole",TH.default],["TableHeaderContainerRole",LH.default],["TableRole",MH.default],["TabListRole",IH.default],["TabPanelRole",OH.default],["TermRole",NH.default],["TextAreaRole",DH.default],["TextFieldRole",BH.default],["TimeRole",FH.default],["TimerRo
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sU(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,s=!1,a,u;try{for(r=r.call(e);!(i=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));i=!0);}catch(o){s=!0,u=o}finally{try{!i&&r.return!=null&&r.return()}finally{if(s)throw u}}return n}}function aU(e){if(Array.isArray(e))return e}function oU(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=vS(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s=!0,a=!1,u;return{s:function(){r=r.call(e)},n:function(){var c=r.next();return s=c.done,c},e:function(c){a=!0,u=c},f:function(){try{!s&&r.return!=null&&r.return()}finally{if(a)throw u}}}}function vS(e,t){if(e){if(typeof e=="string")return fS(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return fS(e,t)}}function fS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Ir=[],mh=oU(nU.default.entries()),mS;try{for(_S=function(){var t=ta(mS.value,2),r=t[0],n=t[1],i=n.relatedConcepts;Array.isArray(i)&&i.forEach(function(s){if(s.module==="HTML"){var a=s.concept;if(a){var u=Ir.findIndex(function(o){var c=ta(o,1),d=c[0];return d===r});u===-1&&(Ir.push([r,[]]),u=Ir.length-1),Ir[u][1].push(a)}}})},mh.s();!(mS=mh.n()).done;)_S()}catch(e){mh.e(e)}finally{mh.f()}var _S,Jg={entries:function(){return Ir},forEach:function(t){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,n=0,i=Ir;n<i.length;n++){var s=ta(i[n],2),a=s[0],u=s[1];t.call(r,u,a,Ir)}},get:function(t){var r=Ir.find(function(n){return n[0]===t});return r&&r[1]},has:function(t){return!!Jg.get(t)},keys:function(){return Ir.map(function(t){var r=ta(t,1),n=r[0];return n})},values:function(){return Ir.map(function(t){var r=ta(t,2),n=r[1];return n})}},lU=(0,rU.default)(Jg,Jg.entries());_h.default=lU});var CS=k(vh=>{"use strict";l();Object.defineProperty(vh,"__esModule",{value:!0});vh.default=void 0;var uU=kS(Js()),cU=kS(ea());function kS(e){return e&&e.__esModule?e:{default:e}}function ra(e,t){return hU(e)||pU(e,t)||$S(e,t)||dU()}function dU(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pU(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,s=!1,a,u;try{for(r=r.call(e);!(i=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));i=!0);}catch(o){s=!0,u=o}finally{try{!i&&r.return!=null&&r.return()}finally{if(s)throw u}}return n}}function hU(e){if(Array.isArray(e))return e}function fU(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=$S(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s=!0,a=!1,u;return{s:function(){r=r.call(e)},n:function(){var c=r.next();return s=c.done,c},e:function(c){a=!0,u=c},f:function(){try{!s&&r.return!=null&&r.return()}finally{if(a)throw u}}}}function $S(e,t){if(e){if(typeof e=="string")return bS(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bS(e,t)}}function bS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Or=[],gh=fU(cU.default.entries()),xS;try{for(wS=function(){var t=ra(xS.value,2),r=t[0],n=t[1],i=n.relatedConcepts;Array.isArray(i)&&i.forEach(function(s){if(s.module==="ARIA"){var a=s.concept;if(a){var u=Or.findIndex(function(o){var c=ra(o,1),d=c[0];return d===r});u===-1&&(Or.push([r,[]]),u=Or.length-1),Or[u][1].push(a)}}})},gh.s();!(xS=gh.n()).done;)wS()}catch(e){gh.e(e)}finally{gh.f()}var wS,ev={entries:function(){return Or},forEach:function(t){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,n=0,i=Or;n<i.length;n++){var s=ra(i[n],2),a=s[0],u=s[1];t.call(r,u,a,Or)}},get:function(t){var r=Or.find(function(n){return n[0]===t});return r&&r[1]},has:function(t){return!!ev.get(t)},keys:function(){return Or.map(function(t){var r=ra(t,1),n=r[0];return n})},values:function(){return Or.map(function(t){var r=ra(t,2),n=r[1];return n})}},mU=(0,uU.default)(ev,ev.entries());vh.default=mU});var qS=k(xh=>{"use strict";l();Object.defineProperty(xh,"__esModule",{value:!0});xh.default=void 0;var _U=PS(ea()),gU=PS(Js());function PS(e){return e&&e.__esModule?e:{default:e}}function bh(e,t){return bU(e)||yU(e,t)||AS(e,t)||vU()}function vU(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yU(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,s=!1,a,u;try{for(r=r.call(e);!(i=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));i=!0);}catch(o){s=!0,u=o}finally{try{!i&&r.return!=null&&r.return()}finally{if(s)throw u}}return n}}function bU(e){if(Array.isArray(e))return e}function xU(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=AS(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s=!0,a=!1,u;return{s:function(){r=r.call(e)},n:function(){var c=r.next();return s=c.done,c},e:function(c){a=!0,u=c},f:function(){try{!s&&r.return!=null&&r.return()}finally{if(a)throw u}}}}function AS(e,t){if(e){if(typeof e=="string")return SS(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return SS(e,t)}}function SS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var pr=[],yh=xU(_U.default.entries()),ES;try{for(RS=function(){var t=bh(ES.value,2),r=t[0],n=t[1],i=n.relatedConcepts;Array.isArray(i)&&i.forEach(function(s){if(s.module==="HTML"){var a=s.concept;if(a!=null){for(var u=JSON.stringify(a),o,c=0;c<pr.length;c++){var d=pr[c][0];if(JSON.stringify(d)===u){o=pr[c][1];break}}Array.isArray(o)||(o=[]);var p=o.findIndex(function(f){return f===r});p===-1&&o.push(r),c<pr.length?pr.splice(c,1,[a,o]):pr.push([a,o])}}})},yh.s();!(ES=yh.n()).done;)RS()}catch(e){yh.e(e)}finally{yh.f()}var RS;function wU(e,t){if(e===void 0&&t!==void 0||e!==void 0&&t===void 0)return!1;if(e!==void 0&&t!==void 0){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(t[r].name!==e[r].name||t[r].value!==e[r].value)return!1}return!0}var tv={entries:function(){return pr},forEach:function(t){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,n=0,i=pr;n<i.length;n++){var s=bh(i[n],2),a=s[0],u=s[1];t.call(r,u,a,pr)}},get:function(t){var r=pr.find(function(n){return t.name===n[0].name&&wU(t.attributes,n[0].attributes)});return r&&r[1]},has:function(t){return!!tv.get(t)},keys:function(){return pr.map(function(t){var r=bh(t,1),n=r[0];return n})},values:function(){return pr.map(function(t){var r=bh(t,2),n=r[1];return n})}},kU=(0,gU.default)(tv,tv.entries());xh.default=kU});var TS=k(Nr=>{"use strict";l();Object.defineProperty(Nr,"__esModule",{value:!0});Nr.elementAXObjects=Nr.AXObjects=Nr.AXObjectRoles=Nr.AXObjectElements=void 0;var $U=wh(yS()),CU=wh(CS()),SU=wh(ea()),EU=wh(qS());function wh(e){return e&&e.__esModule?e:{default:e}}var RU=$U.default;Nr.AXObjectElements=RU;var PU=CU.default;Nr.AXObjectRoles=PU;var AU=SU.default;Nr.AXObjects=AU;var qU=EU.default;Nr.elementAXObjects=qU});var uE=k((pv,hv)=>{l();(function(e,t){typeof pv=="object"&&typeof hv<"u"?hv.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.resolveURI=t())})(pv,function(){"use strict";let e=/^[\w+.-]+:\/\//,t=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,r=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function n(b){return e.test(b)}function i(b){return b.startsWith("//")}function s(b){return b.startsWith("/")}function a(b){return b.startsWith("file:")}function u(b){return/^[.?#]/.test(b)}function o(b){let $=t.exec(b);return d($[1],$[2]||"",$[3],$[4]||"",$[5]||"/",$[6]||"",$[7]||"")}function c(b){let $=r.exec(b),C=$[2];return d("file:","",$[1]||"","",s(C)?C:"/"+C,$[3]||"",$[4]||"")}function d(b,$,C,R,E,H,Y){return{scheme:b,user:$,host:C,port:R,path:E,query:H,hash:Y,type:7}}function p(b){if(i(b)){let C=o("http:"+b);return C.scheme="",C.type=6,C}if(s(b)){let C=o("http://foo.com"+b);return C.scheme="",C.host="",C.type=5,C}if(a(b))return c(b);if(n(b))return o(b);let $=o("http://foo.com/"+b);return $.scheme="",$.host="",$.type=b?b.startsWith("?")?3:b.startsWith("#")?2:4:1,$}function f(b){if(b.endsWith("/.."))return b;let $=b.lastIndexOf("/");return b.slice(0,$+1)}function m(b,$){y($,$.type),b.path==="/"?b.path=$.path:b.path=f($.path)+b.path}function y(b,$){let C=$<=4,R=b.path.split("/"),E=1,H=0,Y=!1;for(let j=1;j<R.length;j++){let I=R[j];if(!I){Y=!0;continue}if(Y=!1,I!=="."){if(I===".."){H?(Y=!0,H--,E--):C&&(R[E++]=I);continue}R[E++]=I,H++}}let P="";for(let j=1;j<E;j++)P+="/"+R[j];(!P||Y&&!P.endsWith("/.."))&&(P+="/"),b.path=P}function w(b,$){if(!b&&!$)return"";let
|
||
|
Did you specify these with the most recent transformation maps first?`);let R=f(C,b,"",0);for(let E=$.length-1;E>=0;E--)R=a($[E],[R]);return R}function f(w,b,$,C){let{resolvedSources:R,sourcesContent:E,ignoreList:H}=w,Y=C+1,P=R.map((j,I)=>{let B={importer:$,depth:Y,source:j||"",content:void 0,ignore:void 0},q=b(B.source,B),{source:A,content:K,ignore:ee}=B;if(q)return f(new e.TraceMap(q,A),b,A,Y);let F=K!==void 0?K:E?E[I]:null,O=ee!==void 0?ee:H?H.includes(I):!1;return u(A,F,O)});return a(w,P)}class m{constructor(b,$){let C=$.decodedMappings?t.toDecodedMap(b):t.toEncodedMap(b);this.version=C.version,this.file=C.file,this.mappings=C.mappings,this.names=C.names,this.ignoreList=C.ignoreList,this.sourceRoot=C.sourceRoot,this.sources=C.sources,$.excludeContent||(this.sourcesContent=C.sourcesContent)}toString(){return JSON.stringify(this)}}function y(w,b,$){let C=typeof $=="object"?$:{excludeContent:!!$,decodedMappings:!1},R=p(w,b);return new m(o(R),C)}return y})});l();l();function Nv(e){let r=[],n=new Uint8Array(1024);for(;;){let s=0;try{s=Javy.IO.readSync(0,n)}catch(u){if(u.message.includes("os error 29"))break;throw new Error("Error reading from stdin")}if(s<0)throw new Error("Error reading from stdin");if(s===0)break;if(r=[...r,...n.subarray(0,s)],!r.includes(10))continue;let a=0;for(let u=0;a<r.length;a++)if(r[a]===10){let o=r.splice(u,a+1),c=new Uint8Array(o),d;try{d=JSON.parse(new TextDecoder().decode(c))}catch(p){throw new Error(`Error parsing JSON '${new TextDecoder().decode(c)}' from stdin: ${p.message}`)}e(d),u=a+1}r=r.slice(a)}}function Qh(e){let t=new TextEncoder().encode(JSON.stringify(e)+`
|
||
|
`),r=new Uint8Array(t);Javy.IO.writeSync(1,r)}l();l();l();var Wa=()=>h();function Dv(e){let t={};return e.forEach(r=>{t[r.label]=Object.assign({total:r.end-r.start},r.children&&Dv(r.children))}),t}var zi=class{constructor(){g(this,"start_time");g(this,"current_timing");g(this,"current_children");g(this,"timings");g(this,"stack");this.start_time=Wa(),this.stack=[],this.current_children=this.timings=[]}start(t){let r={label:t,start:Wa(),end:null,children:[]};this.current_children.push(r),this.stack.push(r),this.current_timing=r,this.current_children=r.children}stop(t){if(t!==this.current_timing.label)throw new Error(`Mismatched timing labels (expected ${this.current_timing.label}, got ${t})`);this.current_timing.end=Wa(),this.stack.pop(),this.current_timing=this.stack[this.stack.length-1],this.current_children=this.current_timing?this.current_timing.children:this.timings}render(){return{timings:Object.assign({total:Wa()-this.start_time},Dv(this.timings))}}};l();l();var s8=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239],Uv=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],a8="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0
|
||
|
Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),Bv(t.onToken)){var n=t.onToken;t.onToken=function(i){return n.push(i)}}return Bv(t.onComment)&&(t.onComment=_8(t,t.onComment)),t}function _8(e,t){return function(r,n,i,s,a,u){var o={type:r?"Block":"Line",value:n,start:i,end:s};e.locations&&(o.loc=new Ja(this,a,u)),e.ranges&&(o.range=[i,s]),t.push(o)}}var Yi=1,oi=2,af=4,Qv=8,Xv=16,Zv=32,of=64,Jv=128,Qi=256,lf=Yi|oi|Qi;function uf(e,t){return oi|(e?af:0)|(t?Qv:0)}var Ka=0,cf=1,Hr=2,ey=3,ty=4,ry=5,ot=function(t,r,n){this.options=t=m8(t),this.sourceFile=t.sourceFile,this.keywords=on(o8[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var i="";t.allowReserved!==!0&&(i=Xh[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(i+=" await")),this.reservedWords=on(i);var s=(i?i+" ":"")+Xh.strict;this.reservedWordsStrict=on(s),this.reservedWordsStrictBind=on(s+" "+Xh.strictBind),this.input=String(r),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf(`
|
||
|
`,n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(ir).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=x.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(Yi),this.regexpState=null,this.privateNameStack=[]},Er={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};ot.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};Er.inFunction.get=function(){return(this.currentVarScope().flags&oi)>0};Er.inGenerator.get=function(){return(this.currentVarScope().flags&Qv)>0&&!this.currentVarScope().inClassFieldInit};Er.inAsync.get=function(){return(this.currentVarScope().flags&af)>0&&!this.currentVarScope().inClassFieldInit};Er.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||t.flags&Qi)return!1;if(t.flags&oi)return(t.flags&af)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};Er.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,r=e.inClassFieldInit;return(t&of)>0||r||this.options.allowSuperOutsideMethod};Er.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Jv)>0};Er.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};Er.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,r=e.inClassFieldInit;return(t&(oi|Qi))>0||r};Er.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Qi)>0};ot.extend=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];for(var n=this,i=0;i<t.length;i++)n=t[i](n);return n};ot.parse=function(t,r){return new this(r,t).parse()};ot.parseExpressionAt=function(t,r,n){var i=new this(n,t,r);return i.nextToken(),i.parseExpression()};ot.tokenizer=function(t,r){return new this(r,t)};Object.defineProperties(ot.prototype,Er);var At=ot.prototype,g8=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;At.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){rr.lastIndex=e,e+=rr.exec(this.input)[0].length;var t=g8.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){rr.lastIndex=e+t[0].length;var r=rr.exec(this.input),n=r.index+r[0].length,i=this.input.charAt(n);return i===";"||i==="}"||ir.test(r[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||i==="!"&&this.input.charAt(n+1)==="=")}e+=t[0].length,rr.lastIndex=e,e+=rr.exec(this.input)[0].length,this.input[e]===";"&&e++}};At.eat=function(e){return this.type===e?(this.next(),!0):!1};At.isContextual=function(e){return this.type===x.name&&this.value===e&&!this.containsEsc};At.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};At.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};At.canInsertSemicolon=function(){return this.type===x.eof||this.type===x.braceR||ir.test(this.input.slice(this.lastTokEnd,this.start))};At.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};At.semicolon=function(){!this.eat(x.semi)&&!this.insertSemicolon()&&this.unexpected()};At.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokSta
|
||
|
`),cooked:null}):r.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
|
||
|
`),cooked:this.value},this.next(),r.tail=this.type===x.backQuote,this.finishNode(r,"TemplateElement")};be.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var r=this.startNode();this.next(),r.expressions=[];var n=this.parseTemplateElement({isTagged:t});for(r.quasis=[n];!n.tail;)this.type===x.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(x.dollarBraceL),r.expressions.push(this.parseExpression()),this.expect(x.braceR),r.quasis.push(n=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(r,"TemplateLiteral")};be.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===x.name||this.type===x.num||this.type===x.string||this.type===x.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===x.star)&&!ir.test(this.input.slice(this.lastTokEnd,this.start))};be.parseObj=function(e,t){var r=this.startNode(),n=!0,i={};for(r.properties=[],this.next();!this.eat(x.braceR);){if(n)n=!1;else if(this.expect(x.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(x.braceR))break;var s=this.parseProperty(e,t);e||this.checkPropClash(s,i,t),r.properties.push(s)}return this.finishNode(r,e?"ObjectPattern":"ObjectExpression")};be.parseProperty=function(e,t){var r=this.startNode(),n,i,s,a;if(this.options.ecmaVersion>=9&&this.eat(x.ellipsis))return e?(r.argument=this.parseIdent(!1),this.type===x.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(r,"RestElement")):(r.argument=this.parseMaybeAssign(!1,t),this.type===x.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(r,"SpreadElement"));this.options.ecmaVersion>=6&&(r.method=!1,r.shorthand=!1,(e||t)&&(s=this.start,a=this.startLoc),e||(n=this.eat(x.star)));var u=this.containsEsc;return this.parsePropertyName(r),!e&&!u&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(r)?(i=!0,n=this.options.ecmaVersion>=9&&this.eat(x.star),this.parsePropertyName(r)):i=!1,this.parsePropertyValue(r,e,n,i,s,a,t,u),this.finishNode(r,"Property")};be.parseGetterSetter=function(e){e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var t=e.kind==="get"?0:1;if(e.value.params.length!==t){var r=e.value.start;e.kind==="get"?this.raiseRecoverable(r,"getter should have no params"):this.raiseRecoverable(r,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};be.parsePropertyValue=function(e,t,r,n,i,s,a,u){(r||n)&&this.type===x.colon&&this.unexpected(),this.eat(x.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,a),e.kind="init"):this.options.ecmaVersion>=6&&this.type===x.parenL?(t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(r,n)):!t&&!u&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==x.comma&&this.type!==x.braceR&&this.type!==x.eq?((r||n)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((r||n)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=i),e.kind="init",t?e.value=this.parseMaybeDefault(i,s,this.copyNode(e.key)):this.type===x.eq&&a?(a.shorthandAssign<0&&(a.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,s,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected()};be.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(x.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(x.bracketR),e.key;e.computed=!1}return e.key=this.type===x.num||this.type===x.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};be.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};be.parseMethod=function(e,t,r){var n=this.startNode
|
||
|
`;break;default:e+=String.fromCharCode(r);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};Pe.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(x.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
|
||
|
`&&++this.pos;case`
|
||
|
`:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};Pe.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
|
||
|
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return ln(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var r=this.pos-1;this.invalidStringToken(r,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(n,8);return i>255&&(n=n.slice(0,-1),i=parseInt(n,8)),this.pos+=n.length-1,t=this.input.charCodeAt(this.pos),(n!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-n.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(i)}return ai(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}};Pe.readHexChar=function(e){var t=this.pos,r=this.readInt(16,e);return r===null&&this.invalidStringToken(t,"Bad character escape sequence"),r};Pe.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,r=this.pos,n=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(Sr(i,n))this.pos+=i<=65535?1:2;else if(i===92){this.containsEsc=!0,e+=this.input.slice(r,this.pos);var s=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var a=this.readCodePoint();(t?Pt:Sr)(a,n)||this.invalidStringToken(s,"Invalid Unicode escape"),e+=ln(a),r=this.pos}else break;t=!1}return e+this.input.slice(r,this.pos)};Pe.readWord=function(){var e=this.readWord1(),t=x.name;return this.keywords.test(e)&&(t=sf[e]),this.finishToken(t,e)};var F8="8.12.1";ot.acorn={Parser:ot,version:F8,defaultOptions:tf,Position:Wi,SourceLocation:Ja,getLineInfo:Kv,Node:to,TokenType:Me,tokTypes:x,keywordTypes:sf,TokContext:fr,tokContexts:Xe,isIdentifierChar:Sr,isIdentifierStart:Pt,Token:pf,isNewLine:ai,lineBreak:ir,lineBreakG:d8,nonASCIIwhitespace:Wv};function hf(e,t){return ot.parse(e,t)}function no(e,t,r){return ot.parseExpressionAt(e,t,r)}l();l();l();l();function $n(e,t=[]){for(let r=0;r<e.length;r+=1){let n=e[r];Array.isArray(n)?$n(n,t):t.push(n)}return t}l();var Bt=/\s/,Sy=/\s+/,ui=/^\s/,Ey=/^[ \t\r\n]*/,ff=/\s$/,Ry=/[ \t\r\n]*$/,io=/^[ \t\n\r\f]+$/,Py=/\s/g,ci=/\S/,cn=/^\r?\n/,so=/[^\n]/g,ao=/"/g,Ay=/\\/g,qy=/^_/,Ty=/_$/;var di=/^(?:offset|client)(?:Width|Height)$/,Ly=/^(?:contentRect)$/,My=/^(?:contentBoxSize)$/,Iy=/^(?:borderBoxSize)$/,Oy=/^(?:devicePixelContentBoxSize)$/,pi=/^(?:contentRect|contentBoxSize|borderBoxSize|devicePixelContentBoxSize)$/;var V8=/^\s*svelte-ignore\s+([\s\S]+)\s*$/m;function mf(e){let t=V8.exec(e);return t?t[1].split(Bt).map(r=>r.trim()).filter(Boolean):[]}function _f(e){return $n((e.leadingComments||[]).map(t=>mf(t.value)))}function Zi(e,t){let r=t.findIndex(n=>n.end===e);if(r===-1)return[];for(let n=r;n>=0;n--){let i=t[n];if(i.type!=="Comment"&&i.type!=="Text")return[];if(i.type==="Comment"&&i.ignores.length)return i.ignores}return[]}function Ny(e){let t=e.prev;for(;t;){if(t.type!=="Comment"&&t.type!=="Text")return[];if(t.type==="Comment"&&t.ignores.length)return t.ignores;t=t.prev}return[]}l();function qt(e,t){let n=new yf(t).get(e);return n&&n[0]&&n[0][0]>.7?n[0][1]:null}var gf=2,vf=3;function H8(e,t){if(e===null&&t===null)throw"Trying to compare two null values";return e===null||t===null?0:(e=String(e),t=String(t),1-U8(e,t)/Math.max(e.length,t.length))}function U8(e,t){let r=[],n,i;for(let s=0;s<=t.length;s++)for(let a=0;a<=e.length;a++)s&&a?e.charAt(a-1)===t.charAt(s-1)?i=n:i=Math.min(r[a],r[a-1],n)+1:i=s+a,n=r[a],r[a]=i;return r.pop()}var z8=/[^\w, ]+/;function G8(e,t=2){let r="-"+e.toLowerCase().replace(z8,"")+"-",n=t-r.length,i=[];if(n>0)for(let s=0;s<n;++s)e+="-";for(let s=0;s<r.length-t+1;++s)i.push(r.slice(s,s+t));return i}function Dy(e,t=2){let r={},n=G8(e,t),i=0;for(i;i<n.length;++i)n[i]in r?r[n[i]]+=1:r[n[
|
||
|
`;)a-=1;let u=a;for(;/[ \t]/.test(t[u]);)u+=1;let o=t.slice(a,u);n=n.replace(new RegExp(`^${o}`,"gm"),"")}e.push({type:r?"Block":"Line",value:n,start:i,end:s})},enter(r){let n;for(;e[0]&&e[0].start<r.start;){n=e.shift(),n.value=n.value.replace(Ft,(s,a,u,o,c)=>o?`#${c}`:u?`@${c}`:s);let i=e[0]||r;n.has_trailing_newline=n.type==="Line"||/\n/.test(t.slice(n.end,i.start)),(r.leadingComments||(r.leadingComments=[])).push(n)}},leave(r){if(e[0]){let n=t.slice(r.end,e[0].start);/^[,) \t]*$/.test(n)&&(r.trailingComments=[e.shift()])}}});l();l();l();function pt(e,t){if(e.type==="MemberExpression")return!e.computed&&pt(e.object,e);if(e.type==="Identifier"){if(!t)return!0;switch(t.type){case"MemberExpression":return t.computed||e===t.object;case"MethodDefinition":return t.computed;case"PropertyDefinition":return t.computed||e===t.value;case"Property":return t.computed||e===t.value;case"ExportSpecifier":case"ImportSpecifier":return e===t.local;case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return!1;default:return!0}}return!1}function uo(e){let t=new WeakMap,r=new Map,n=new zr(null,!1),i=[],s=n;we(e,{enter(a,u){switch(a.type){case"Identifier":u&&pt(a,u)&&i.push([s,a]);break;case"ImportDeclaration":a.specifiers.forEach(o=>{s.declarations.set(o.local.name,o)});break;case"FunctionExpression":case"FunctionDeclaration":case"ArrowFunctionExpression":a.type==="FunctionDeclaration"?(a.id&&s.declarations.set(a.id.name,a),t.set(a,s=new zr(s,!1))):(t.set(a,s=new zr(s,!1)),a.type==="FunctionExpression"&&a.id&&s.declarations.set(a.id.name,a)),a.params.forEach(o=>{Ye(o).forEach(c=>{s.declarations.set(c,a)})});break;case"ForStatement":case"ForInStatement":case"ForOfStatement":t.set(a,s=new zr(s,!0));break;case"BlockStatement":t.set(a,s=new zr(s,!0));break;case"ClassDeclaration":case"VariableDeclaration":s.add_declaration(a);break;case"CatchClause":t.set(a,s=new zr(s,!0)),a.param&&Ye(a.param).forEach(o=>{a.param&&s.declarations.set(o,a.param)});break}},leave(a){t.has(a)&&s!==null&&s.parent&&(s=s.parent)}});for(let a=i.length-1;a>=0;--a){let[u,o]=i[a];u.references.has(o.name)||Vy(u,o.name),u.find_owner(o.name)||r.set(o.name,o)}return{map:t,scope:n,globals:r}}function Vy(e,t){e.references.add(t),e.parent&&Vy(e.parent,t)}var zr=class{constructor(t,r){this.parent=t,this.block=r,this.declarations=new Map,this.initialised_declarations=new Set,this.references=new Set}add_declaration(t){if(t.type==="VariableDeclaration")if(t.kind==="var"&&this.block&&this.parent)this.parent.add_declaration(t);else{let r=n=>{Ye(n.id).forEach(i=>{this.declarations.set(i,t),n.init&&this.initialised_declarations.add(i)})};t.declarations.forEach(r)}else t.id&&this.declarations.set(t.id.name,t)}find_owner(t){return this.declarations.has(t)?this:this.parent&&this.parent.find_owner(t)}has(t){return this.declarations.has(t)||!!this.parent&&this.parent.has(t)}};function Ye(e){return _r(e).map(t=>t.name)}function _r(e,t=[]){switch(e.type){case"Identifier":t.push(e);break;case"MemberExpression":let r=e;for(;r.type==="MemberExpression";)r=r.object;t.push(r);break;case"ObjectPattern":let n=s=>{s.type==="RestElement"?_r(s.argument,t):_r(s.value,t)};e.properties.forEach(n);break;case"ArrayPattern":let i=s=>{s&&_r(s,t)};e.elements.forEach(s=>{s&&i(s)});break;case"RestElement":_r(e.argument,t);break;case"AssignmentPattern":_r(e.left,t);break}return t}l();l();function Q(e,t){for(let r=0;r<t.length;r++)e.push(t[r])}function N(e,t){let r=ht[e.type];if(!r)throw new Error(`Not implemented ${e.type}`);let n=r(e,t);return e.leadingComments&&n.unshift(S(e.leadingComments.map(i=>i.type==="Block"?`/*${i.value}*/${i.has_trailing_newline?`
|
||
|
${t.indent}`:" "}`:`//${i.value}${i.has_trailing_newline?`
|
||
|
${t.indent}`:" "}`).join(""))),e.trailingComments&&t.comments.push(e.trailingComments[0]),n}function S(e,t){return{content:e,loc:t&&t.loc,has_newline:/\n/.test(e)}}var co={"||":2,"&&":3,"??":4,"|":5,"^":6,"&":7,"==":8,"!=":8,"===":8,"!==":8,"<":9,">":9,"<=":9,">=":9,in:9,instanceof:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"%":12,"/":12,"**":13},jt={ArrayExpression:20,TaggedTemplateExpression:20,ThisExpression:20,Identifier:20,Literal:18,TemplateLiteral:20,Super:20,SequenceExpression:20,MemberExpression:19,CallExpression:19,NewExpression:19,AwaitExpression:17,ClassExpression:17,FunctionExpression:17,ObjectExpression:17,UpdateExpression:16,UnaryExpression:15,BinaryExpression:14,LogicalExpression:13,ConditionalExpression:4,ArrowFunctionExpression:3,AssignmentExpression:3,YieldExpression:2,RestElement:1};function Hy(e,t,r){if(e.type==="LogicalExpression"&&t.type==="LogicalExpression"&&(t.operator==="??"&&e.operator!=="??"||t.operator!=="??"&&e.operator==="??"))return!0;let n=jt[e.type],i=jt[t.type];return n!==i?!r&&n===15&&i===14&&t.operator==="**"||n<i:n!==13&&n!==14?!1:e.operator==="**"&&t.operator==="**"?!r:r?co[e.operator]<=co[t.operator]:co[e.operator]<co[t.operator]}function X8(e){for(;e;){if(e.type[0]==="CallExpression")return!0;if(e.type==="MemberExpression")e=e.object;else return!1}}var Gr=e=>{for(let t=0;t<e.length;t+=1)if(e[t].has_newline)return!0;return!1},gr=e=>{let t=0;for(let r=0;r<e.length;r+=1)t+=e[r].content.length;return t},ns=(e,t)=>e+t,Tt=(e,t)=>{if(e.length===0)return[];let r=[...e[0]];for(let n=1;n<e.length;n+=1)r.push(t),Q(r,e[n]);return r},rs=e=>(r,n)=>e(r,{...n,scope:n.scope_map.get(r)}),Z8=(e,t)=>{let r=e,n=1;for(;t.has(e);)e=`${r}$${n++}`;return e},Uy=(e,t)=>{let r=[],n=e.map(s=>{let a=N(s,{...t,indent:t.indent}),u=!1;for(;t.comments.length;){let o=t.comments.shift(),c=u?`
|
||
|
${t.indent}`:" ";a.push(S(o.type==="Block"?`${c}/*${o.value}*/`:`${c}//${o.value}`)),u=o.type==="Line"}return a}),i=!1;for(let s=0;s<n.length;s+=1){let a=Gr(n[s]);s>0&&r.push(S(a||i?`
|
||
|
|
||
|
${t.indent}`:`
|
||
|
${t.indent}`)),Q(r,n[s]),i=a}return r},bf=(e,t)=>{let r=[S(`${e.kind} `)],n=e.declarations.map(a=>N(a,{...t,indent:t.indent+(e.declarations.length===1?"":" ")})),i=n.some(Gr)||n.map(gr).reduce(ns,0)+(t.indent.length+n.length-1)*2>80,s=S(i?`,
|
||
|
${t.indent} `:", ");return Q(r,Tt(n,s)),r},ht={Program(e,t){return Uy(e.body,t)},BlockStatement:rs((e,t)=>[S(`{
|
||
|
${t.indent} `),...Uy(e.body,{...t,indent:t.indent+" "}),S(`
|
||
|
${t.indent}}`)]),EmptyStatement(e,t){return[S(";")]},ParenthesizedExpression(e,t){return N(e.expression,t)},ExpressionStatement(e,t){return e.expression.type==="AssignmentExpression"&&e.expression.left.type==="ObjectPattern"?[S("("),...N(e.expression,t),S(");")]:[...N(e.expression,t),S(";")]},IfStatement(e,t){let r=[S("if ("),...N(e.test,t),S(") "),...N(e.consequent,t)];return e.alternate&&(r.push(S(" else ")),Q(r,N(e.alternate,t))),r},LabeledStatement(e,t){return[...N(e.label,t),S(": "),...N(e.body,t)]},BreakStatement(e,t){return e.label?[S("break "),...N(e.label,t),S(";")]:[S("break;")]},ContinueStatement(e,t){return e.label?[S("continue "),...N(e.label,t),S(";")]:[S("continue;")]},WithStatement(e,t){return[S("with ("),...N(e.object,t),S(") "),...N(e.body,t)]},SwitchStatement(e,t){let r=[S("switch ("),...N(e.discriminant,t),S(") {")];return e.cases.forEach(n=>{n.test?(r.push(S(`
|
||
|
${t.indent} case `)),Q(r,N(n.test,{...t,indent:`${t.indent} `})),r.push(S(":"))):r.push(S(`
|
||
|
${t.indent} default:`)),n.consequent.forEach(i=>{r.push(S(`
|
||
|
${t.indent} `)),Q(r,N(i,{...t,indent:`${t.indent} `}))})}),r.push(S(`
|
||
|
${t.indent}}`)),r},ReturnStatement(e,t){if(e.argument){let r=e.argument.leadingComments&&e.argument.leadingComments.some(n=>n.has_trailing_newline);return[S(r?"return (":"return "),...N(e.argument,t),S(r?");":";")]}else return[S("return;")]},ThrowStatement(e,t){return[S("throw "),...N(e.argument,t),S(";")]},TryStatement(e,t){let r=[S("try "),...N(e.block,t)];return e.handler&&(e.handler.param?(r.push(S(" catch(")),Q(r,N(e.handler.param,t)),r.push(S(") "))):r.push(S(" catch ")),Q(r,N(e.handler.body,t))),e.finalizer&&(r.push(S(" finally ")),Q(r,N(e.finalizer,t))),r},WhileStatement(e,t){return[S("while ("),...N(e.test,t),S(") "),...N(e.body,t)]},DoWhileStatement(e,t){return[S("do "),...N(e.body,t),S(" while ("),...N(e.test,t),S(");")]},ForStatement:rs((e,t)=>{let r=[S("for (")];return e.init&&(e.init.type==="VariableDeclaration"?Q(r,bf(e.init,t)):Q(r,N(e.init,t))),r.push(S("; ")),e.test&&Q(r,N(e.test,t)),r.push(S("; ")),e.update&&Q(r,N(e.update,t)),r.push(S(") ")),Q(r,N(e.body,t)),r}),ForInStatement:rs((e,t)=>{let r=[S(`for ${e.await?"await ":""}(`)];return e.left.type==="VariableDeclaration"?Q(r,bf(e.left,t)):Q(r,N(e.left,t)),r.push(S(e.type==="ForInStatement"?" in ":" of ")),Q(r,N(e.right,t)),r.push(S(") ")),Q(r,N(e.body,t)),r}),DebuggerStatement(e,t){return[S("debugger",e),S(";")]},FunctionDeclaration:rs((e,t)=>{let r=[];e.async&&r.push(S("async ")),r.push(S(e.generator?"function* ":"function ")),e.id&&Q(r,N(e.id,t)),r.push(S("("));let n=e.params.map(a=>N(a,{...t,indent:t.indent+" "})),i=n.some(Gr)||n.map(gr).reduce(ns,0)+(t.indent.length+n.length-1)*2>80,s=S(i?`,
|
||
|
${t.indent}`:", ");return i?(r.push(S(`
|
||
|
${t.indent} `)),Q(r,Tt(n,s)),r.push(S(`
|
||
|
${t.indent}`))):Q(r,Tt(n,s)),r.push(S(") ")),Q(r,N(e.body,t)),r}),VariableDeclaration(e,t){return bf(e,t).concat(S(";"))},VariableDeclarator(e,t){return e.init?[...N(e.id,t),S(" = "),...N(e.init,t)]:N(e.id,t)},ClassDeclaration(e,t){let r=[S("class ")];return e.id&&(Q(r,N(e.id,t)),r.push(S(" "))),e.superClass&&(r.push(S("extends ")),Q(r,N(e.superClass,t)),r.push(S(" "))),Q(r,N(e.body,t)),r},ImportDeclaration(e,t){let r=[S("import ")],{length:n}=e.specifiers,i=N(e.source,t);if(n>0){let s=0;for(;s<n;){s>0&&r.push(S(", "));let a=e.specifiers[s];if(a.type==="ImportDefaultSpecifier")r.push(S(a.local.name,a)),s+=1;else if(a.type==="ImportNamespaceSpecifier")r.push(S("* as "+a.local.name,a)),s+=1;else break}if(s<n){let a=e.specifiers.slice(s).map(o=>{let c=N(o.imported,t)[0],d=N(o.local,t)[0];return c.content===d.content?[d]:[c,S(" as "),d]});gr(r)+a.map(gr).reduce(ns,0)+2*a.length+6+gr(i)>80?(r.push(S(`{
|
||
|
`)),Q(r,Tt(a,S(`,
|
||
|
`))),r.push(S(`
|
||
|
}`))):(r.push(S("{ ")),Q(r,Tt(a,S(", "))),r.push(S(" }")))}r.push(S(" from "))}return Q(r,i),r.push(S(";")),r},ImportExpression(e,t){return[S("import("),...N(e.source,t),S(")")]},ExportDefaultDeclaration(e,t){let r=[S("export default "),...N(e.declaration,t)];return e.declaration.type!=="FunctionDeclaration"&&r.push(S(";")),r},ExportNamedDeclaration(e,t){let r=[S("export ")];if(e.declaration)Q(r,N(e.declaration,t));else{let n=e.specifiers.map(s=>{let a=N(s.local,t)[0],u=N(s.exported,t)[0];return a.content===u.content?[a]:[a,S(" as "),u]});7+n.map(gr).reduce(ns,0)+2*n.length>80?(r.push(S(`{
|
||
|
`)),Q(r,Tt(n,S(`,
|
||
|
`))),r.push(S(`
|
||
|
}`))):(r.push(S("{ ")),Q(r,Tt(n,S(", "))),r.push(S(" }"))),e.source&&(r.push(S(" from ")),Q(r,N(e.source,t)))}return r.push(S(";")),r},ExportAllDeclaration(e,t){return[S("export * from "),...N(e.source,t),S(";")]},MethodDefinition(e,t){let r=[];e.static&&r.push(S("static ")),(e.kind==="get"||e.kind==="set")&&r.push(S(e.kind+" ")),e.value.async&&r.push(S("async ")),e.value.generator&&r.push(S("*")),e.computed?(r.push(S("[")),Q(r,N(e.key,t)),r.push(S("]"))):Q(r,N(e.key,t)),r.push(S("("));let{params:n}=e.value;for(let i=0;i<n.length;i+=1)Q(r,N(n[i],t)),i<n.length-1&&r.push(S(", "));return r.push(S(") ")),Q(r,N(e.value.body,t)),r},ArrowFunctionExpression:rs((e,t)=>{let r=[];if(e.async&&r.push(S("async ")),e.params.length===1&&e.params[0].type==="Identifier")Q(r,N(e.params[0],t));else{let n=e.params.map(i=>N(i,{...t,indent:t.indent+" "}));r.push(S("(")),Q(r,Tt(n,S(", "))),r.push(S(")"))}return r.push(S(" => ")),e.body.type==="ObjectExpression"||e.body.type==="AssignmentExpression"&&e.body.left.type==="ObjectPattern"?(r.push(S("(")),Q(r,N(e.body,t)),r.push(S(")"))):Q(r,N(e.body,t)),r}),ThisExpression(e,t){return[S("this",e)]},Super(e,t){return[S("super",e)]},RestElement(e,t){return[S("..."),...N(e.argument,t)]},YieldExpression(e,t){return e.argument?[S(e.delegate?"yield* ":"yield "),...N(e.argument,t)]:[S(e.delegate?"yield*":"yield")]},AwaitExpression(e,t){if(e.argument){let r=jt[e.argument.type];return r&&r<jt.AwaitExpression?[S("await ("),...N(e.argument,t),S(")")]:[S("await "),...N(e.argument,t)]}return[S("await")]},TemplateLiteral(e,t){let r=[S("`")],{quasis:n,expressions:i}=e;for(let s=0;s<i.length;s++)r.push(S(n[s].value.raw),S("${")),Q(r,N(i[s],t)),r.push(S("}"));return r.push(S(n[n.length-1].value.raw),S("`")),r},TaggedTemplateExpression(e,t){return N(e.tag,t).concat(N(e.quasi,t))},ArrayExpression(e,t){let r=[S("[")],n=[],i=[];for(let a=0;a<e.elements.length;a+=1){let u=e.elements[a];u?(n.push([...i,...N(u,{...t,indent:t.indent+" "})]),i=[]):i.push(S(","))}return n.some(Gr)||n.map(gr).reduce(ns,0)+(t.indent.length+n.length-1)*2>80?(r.push(S(`
|
||
|
${t.indent} `)),Q(r,Tt(n,S(`,
|
||
|
${t.indent} `))),r.push(S(`
|
||
|
${t.indent}`)),Q(r,i)):(Q(r,Tt(n,S(", "))),Q(r,i)),r.push(S("]")),r},ObjectExpression(e,t){if(e.properties.length===0)return[S("{}")];let r=!1,n=[],i=S(", ");e.properties.forEach((a,u)=>{if(Q(n,N(a,{...t,indent:t.indent+" "})),t.comments.length)for(n.push(S(", "));t.comments.length;){let o=t.comments.shift();n.push(S(o.type==="Block"?`/*${o.value}*/
|
||
|
${t.indent} `:`//${o.value}
|
||
|
${t.indent} `)),o.type==="Line"&&(r=!0)}else u<e.properties.length-1&&n.push(i)});let s=r||Gr(n)||gr(n)>40;return s&&(i.content=`,
|
||
|
${t.indent} `),[S(s?`{
|
||
|
${t.indent} `:"{ "),...n,S(s?`
|
||
|
${t.indent}}`:" }")]},Property(e,t){let r=N(e.value,t);if(e.key===e.value||!e.computed&&e.value.type==="AssignmentPattern"&&e.value.left.type==="Identifier"&&e.value.left.name===e.key.name||!e.computed&&e.value.type==="Identifier"&&(e.key.type==="Identifier"&&e.key.name===r[0].content||e.key.type==="Literal"&&e.key.value===r[0].content))return r;let n=N(e.key,t);if(e.value.type==="FunctionExpression"&&!e.value.id){t={...t,scope:t.scope_map.get(e.value)};let i=e.kind!=="init"?[S(`${e.kind} `)]:[];return e.value.async&&i.push(S("async ")),e.value.generator&&i.push(S("*")),Q(i,e.computed?[S("["),...n,S("]")]:n),i.push(S("(")),Q(i,Tt(e.value.params.map(s=>N(s,t)),S(", "))),i.push(S(") ")),Q(i,N(e.value.body,t)),i}return e.computed?[S("["),...n,S("]: "),...r]:[...n,S(": "),...r]},ObjectPattern(e,t){let r=[S("{ ")];for(let n=0;n<e.properties.length;n+=1)Q(r,N(e.properties[n],t)),n<e.properties.length-1&&r.push(S(", "));return r.push(S(" }")),r},SequenceExpression(e,t){let r=e.expressions.map(n=>N(n,t));return[S("("),...Tt(r,S(", ")),S(")")]},UnaryExpression(e,t){let r=[S(e.operator)];return e.operator.length>1&&r.push(S(" ")),jt[e.argument.type]<jt.UnaryExpression?(r.push(S("(")),Q(r,N(e.argument,t)),r.push(S(")"))):Q(r,N(e.argument,t)),r},UpdateExpression(e,t){return e.prefix?[S(e.operator),...N(e.argument,t)]:[...N(e.argument,t),S(e.operator)]},AssignmentExpression(e,t){return[...N(e.left,t),S(` ${e.operator||"="} `),...N(e.right,t)]},BinaryExpression(e,t){let r=[];return Hy(e.left,e,!1)?(r.push(S("(")),Q(r,N(e.left,t)),r.push(S(")"))):Q(r,N(e.left,t)),r.push(S(` ${e.operator} `)),Hy(e.right,e,!0)?(r.push(S("(")),Q(r,N(e.right,t)),r.push(S(")"))):Q(r,N(e.right,t)),r},ConditionalExpression(e,t){let r=[];jt[e.test.type]>jt.ConditionalExpression?Q(r,N(e.test,t)):(r.push(S("(")),Q(r,N(e.test,t)),r.push(S(")")));let n={...t,indent:t.indent+" "},i=N(e.consequent,n),s=N(e.alternate,n);return Gr(i)||Gr(s)||gr(r)+gr(i)+gr(s)>50?(r.push(S(`
|
||
|
${t.indent}? `)),Q(r,i),r.push(S(`
|
||
|
${t.indent}: `)),Q(r,s)):(r.push(S(" ? ")),Q(r,i),r.push(S(" : ")),Q(r,s)),r},NewExpression(e,t){let r=[S("new ")];jt[e.callee.type]<jt.CallExpression||X8(e.callee)?(r.push(S("(")),Q(r,N(e.callee,t)),r.push(S(")"))):Q(r,N(e.callee,t));let n=e.arguments.map(s=>N(s,{...t,indent:t.indent+" "})),i=n.some(Gr)?S(`,
|
||
|
`+t.indent):S(", ");return r.push(S("(")),Q(r,Tt(n,i)),r.push(S(")")),r},ChainExpression(e,t){return N(e.expression,t)},CallExpression(e,t){let r=[];jt[e.callee.type]<jt.CallExpression?(r.push(S("(")),Q(r,N(e.callee,t)),r.push(S(")"))):Q(r,N(e.callee,t)),e.optional&&r.push(S("?."));let n=!1,i=[];e:for(let a of e.arguments){let u=[];for(;t.comments.length;){let o=t.comments.shift();if(o.type==="Line"){n=!0;break e}u.push(S(o.type==="Block"?`/*${o.value}*/ `:`//${o.value}`))}Q(u,N(a,t)),i.push(u)}if(n||i.slice(0,-1).some(Gr)){let a=e.arguments.map((u,o)=>{let c=N(u,{...t,indent:`${t.indent} `});for(o<e.arguments.length-1&&c.push(S(","));t.comments.length;){let d=t.comments.shift();c.push(S(d.type==="Block"?` /*${d.value}*/ `:` //${d.value}`))}return c});r.push(S(`(
|
||
|
${t.indent} `)),Q(r,Tt(a,S(`
|
||
|
${t.indent} `))),r.push(S(`
|
||
|
${t.indent})`))}else r.push(S("(")),Q(r,Tt(i,S(", "))),r.push(S(")"));return r},MemberExpression(e,t){let r=[];return jt[e.object.type]<jt.MemberExpression?(r.push(S("(")),Q(r,N(e.object,t)),r.push(S(")"))):Q(r,N(e.object,t)),e.computed?(e.optional&&r.push(S("?.")),r.push(S("[")),Q(r,N(e.property,t)),r.push(S("]"))):(r.push(S(e.optional?"?.":".")),Q(r,N(e.property,t))),r},MetaProperty(e,t){return[...N(e.meta,t),S("."),...N(e.property,t)]},Identifier(e,t){let r=e.name;if(r[0]==="@")r=t.getName(r.slice(1));else if(e.name[0]==="#"){let n=t.scope.find_owner(e.name);if(!n)throw new Error("Could not find owner for node");t.deconflicted.has(n)||t.deconflicted.set(n,new Map);let i=t.deconflicted.get(n);i.has(e.name)||i.set(e.name,Z8(e.name.slice(1),n.references)),r=i.get(e.name)}return[S(r,e)]},Literal(e,t){return typeof e.value=="string"?[S((e.raw||JSON.stringify(e.value)).replace(Ft,(r,n,i,s,a)=>{if(i)return"@"+a;if(s)return"#"+a;throw new Error("this shouldn't happen")}),e)]:[S(e.raw||String(e.value),e)]},PropertyDefinition(e,t){let r=[];return e.static&&r.push(S("static ")),e.computed?r.push(S("["),...N(e.key,t),S("]")):r.push(...N(e.key,t)),e.value&&(r.push(S(" = ")),r.push(...N(e.value,t))),r.push(S(";")),r},StaticBlock(e,t){let r=[S("static ")];return Q(r,ht.BlockStatement(e,t)),r},PrivateIdentifier(e,t){let r=[S("#")];return Q(r,[S(e.name,e)]),r}};ht.ForOfStatement=ht.ForInStatement;ht.FunctionExpression=ht.FunctionDeclaration;ht.ClassExpression=ht.ClassDeclaration;ht.ClassBody=ht.BlockStatement;ht.SpreadElement=ht.RestElement;ht.ArrayPattern=ht.ArrayExpression;ht.LogicalExpression=ht.BinaryExpression;ht.AssignmentPattern=ht.AssignmentExpression;var Gy=jr(hi(),1),xf=()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")};typeof window<"u"&&typeof window.btoa=="function"?xf=e=>window.btoa(unescape(encodeURIComponent(e))):typeof Buffer=="function"&&(xf=e=>Buffer.from(e,"utf-8").toString("base64"));function is(e,t={}){if(Array.isArray(e))return is({type:"Program",body:e,sourceType:"module"},t);let{getName:r=f=>{throw new Error(`Unhandled sigil @${f}`)}}=t,{map:n,scope:i}=uo(e),a=N(e,{indent:"",getName:r,scope:i,scope_map:n,deconflicted:new WeakMap,comments:[]}),u="",o=0,c=[],d=[];for(let f=0;f<a.length;f+=1){let m=a[f];u+=m.content,m.loc&&d.push([o,0,m.loc.start.line-1,m.loc.start.column]);for(let y=0;y<m.content.length;y+=1)m.content[y]===`
|
||
|
`?(c.push(d),d=[],o=0):o+=1;m.loc&&d.push([o,0,m.loc.end.line-1,m.loc.end.column])}c.push(d);let p={version:3,names:[],sources:[t.sourceMapSource||null],sourcesContent:[t.sourceMapContent||null],mappings:t.sourceMapEncodeMappings==null||t.sourceMapEncodeMappings?(0,Gy.encode)(c):c};return Object.defineProperties(p,{toString:{enumerable:!1,value:function(){return JSON.stringify(this)}},toUrl:{enumerable:!1,value:function(){return"data:application/json;charset=utf-8;base64,"+xf(this.toString())}}}),{code:u,map:p}}var J8={"@":"AT","#":"HASH"},kf=e=>{let t=e[0];for(let r=1;r<e.length;r+=1)t+=`_${lo}_${r-1}_${e[r]}`;return t.replace(/([@#])(\w+)/g,(r,n,i)=>`_${lo}_${J8[n]}_${i}`)},wf=(e,t)=>{for(let r=0;r<e.length;r+=1){let n=e[r];if(Array.isArray(n)){wf(n,t);continue}if(n.type==="ExpressionStatement"){if(n.expression===Cn)continue;if(Array.isArray(n.expression)){let i=n.expression[0];for(;Array.isArray(i);)i=i[0];i&&(i.leadingComments=n.leadingComments),wf(n.expression,t);continue}if(/(Expression|Literal)$/.test(n.expression.type)){t.push(n);continue}n.leadingComments&&(n.expression.leadingComments=n.leadingComments),n.trailingComments&&(n.expression.trailingComments=n.trailingComments),t.push(n.expression);continue}t.push(n)}return t},Wy=(e,t)=>{for(let r=0;r<e.length;r+=1){let n=e[r];if(n.value!==Cn){if(n.key===n.value&&Array.isArray(n.key)){Wy(n.key,t);continue}t.push(n)}}return t},ss=(e,t)=>{for(let r=0;r<e.length;r+=1){let n=e[r];if(n!==Cn){if(Array.isArray(n)){ss(n,t);continue}t.push(n)}}return t},Cn={type:"Empty"},$f=(e,t)=>{let{onComment:r}=ts(e,t);return{ecmaVersion:2022,sourceType:"module",allowAwaitOutsideFunction:!0,allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,onComment:r}},Cf=(e,t,r,n)=>{n.forEach(a=>{a.value=a.value.replace(Ft,(u,o)=>+o in r?r[+o]:u)});let{enter:i,leave:s}=ts(n,e);return we(t,{enter:i,leave(a){if(a.type==="Identifier"){Ft.lastIndex=0;let u=Ft.exec(a.name);if(u)if(u[1]){if(+u[1]in r){let o=r[+u[1]];typeof o=="string"?o={type:"Identifier",name:o,leadingComments:a.leadingComments,trailingComments:a.trailingComments}:typeof o=="number"&&(o={type:"Literal",value:o,leadingComments:a.leadingComments,trailingComments:a.trailingComments}),this.replace(o||Cn)}}else a.name=`${u[2]?"@":"#"}${u[4]}`}if(a.type==="Literal"&&typeof a.value=="string"){Ft.lastIndex=0;let u=a.value.replace(Ft,(c,d)=>+d in r?r[+d]:c),o=u!==a.value;a.value=u,o&&a.raw&&(a.raw=`${a.raw[0]}${JSON.stringify(a.value).slice(1,-1)}${a.raw[a.raw.length-1]}`)}a.type==="TemplateElement"&&(Ft.lastIndex=0,a.value.raw=a.value.raw.replace(Ft,(u,o)=>+o in r?r[+o]:u)),(a.type==="Program"||a.type==="BlockStatement")&&(a.body=wf(a.body,[])),(a.type==="ObjectExpression"||a.type==="ObjectPattern")&&(a.properties=Wy(a.properties,[])),(a.type==="ArrayExpression"||a.type==="ArrayPattern")&&(a.elements=ss(a.elements,[])),(a.type==="FunctionExpression"||a.type==="FunctionDeclaration"||a.type==="ArrowFunctionExpression")&&(a.params=ss(a.params,[])),(a.type==="CallExpression"||a.type==="NewExpression")&&(a.arguments=ss(a.arguments,[])),(a.type==="ImportDeclaration"||a.type==="ExportNamedDeclaration")&&(a.specifiers=ss(a.specifiers,[])),a.type==="ForStatement"&&(a.init=a.init===Cn?null:a.init,a.test=a.test===Cn?null:a.test,a.update=a.update===Cn?null:a.update),s(a)}})};function _(e,...t){let r=kf(e),n=[];try{let i=hf(r,$f(n,r));return i=Cf(r,i,t,n),i.body}catch(i){Sf(r,i)}}function v(e,...t){let r=kf(e),n=[];try{let i=no(r,0,$f(n,r)),s=/\S+/.exec(r.slice(i.end));if(s)throw new Error(`Unexpected token '${s[0]}'`);return i=Cf(r,i,t,n),i}catch(i){Sf(r,i)}}function qe(e,...t){let r=`{${kf(e)}}`,n=[];try{let i=no(r,0,$f(n,r));return i=Cf(r,i,t,n),i.properties[0]}catch(i){Sf(r,i)}}function Sf(e,t){throw Ft.lastIndex=0,e=e.replace(Ft,(r,n,i,s,a)=>i?`@${a}`:s?`#${a}`:"${...}"),console.log(`failed to parse:
|
||
|
${e}`),t}var Yy=(e,t)=>{let r=[],{onComment:n,enter:i,leave:s}=ts(r,e),a=hf(e,{onComment:n,...t});return we(a,{enter:i,leave:s}),a},Ky=(e,t,r)=>{let n=[],{onComment:i,enter:s,leave:a}=ts(n,e),u=no(e,t,{onComment:i,...r});return we(u,{enter:s,leave:a}),u};var Qy=e=>Yy(e,{sourceType:"module",ecmaVersion:13,locations:!0}),ho=(e,t)=>Ky(e,t,{sourceType:"module",ecmaVersion:13,locations:!0});function ar(e){try{let t=ho(e.template,e.index),r=0;for(let i=e.index;i<t.start;i+=1)e.template[i]==="("&&(r+=1);let n=t.end;for(;r>0;){let i=e.template[n];i===")"?r-=1:Bt.test(i)||e.error(ie.unexpected_token(")"),n),n+=1}return e.index=n,t}catch(t){e.acorn_error(t)}}l();var rR=/<\/script\s*>/,nR=/^<\/script\s*>/;function iR(e,t,r){let n=t.find(s=>s.name==="context");if(!n)return"default";(n.value.length!==1||n.value[0].type!=="Text")&&e.error(ie.invalid_script_context_attribute,r);let i=n.value[0].data;return i!=="module"&&e.error(ie.invalid_script_context_value,n.start),i}function Ef(e,t,r){let n=e.index,i=e.read_until(rR,ie.unclosed_script);e.index>=e.template.length&&e.error(ie.unclosed_script);let s=e.template.slice(0,n).replace(so," ")+i;e.read(nR);let a;try{a=Qy(s)}catch(u){e.acorn_error(u)}return a.start=n,{type:"Script",start:t,end:e.index,context:iR(e,r,t),content:a}}l();l();l();l();l();l();l();l();function Ze(e){return e>=48&&e<=57}function Vt(e){return Ze(e)||e>=65&&e<=70||e>=97&&e<=102}function _o(e){return e>=65&&e<=90}function sR(e){return e>=97&&e<=122}function aR(e){return _o(e)||sR(e)}function oR(e){return e>=128}function mo(e){return aR(e)||oR(e)||e===95}function as(e){return mo(e)||Ze(e)||e===45}function lR(e){return e>=0&&e<=8||e===11||e>=14&&e<=31||e===127}function os(e){return e===10||e===13||e===12}function Pr(e){return os(e)||e===32||e===9}function Lt(e,t){return!(e!==92||os(t)||t===0)}function fi(e,t,r){return e===45?mo(t)||t===45||Lt(t,r):mo(e)?!0:e===92?Lt(e,t):!1}function go(e,t,r){return e===43||e===45?Ze(t)?2:t===46&&Ze(r)?3:0:e===46?Ze(t)?2:0:Ze(e)?1:0}function vo(e){return e===65279||e===65534?1:0}var Rf=new Array(128),uR=128,ls=130,Pf=131,yo=132,Af=133;for(let e=0;e<Rf.length;e++)Rf[e]=Pr(e)&&ls||Ze(e)&&Pf||mo(e)&&yo||lR(e)&&Af||e||uR;function bo(e){return e<128?Rf[e]:yo}l();function mi(e,t){return t<e.length?e.charCodeAt(t):0}function xo(e,t,r){return r===13&&mi(e,t+1)===10?2:1}function Wr(e,t,r){let n=e.charCodeAt(t);return _o(n)&&(n=n|32),n===r}function Yr(e,t,r,n){if(r-t!==n.length||t<0||r>e.length)return!1;for(let i=t;i<r;i++){let s=n.charCodeAt(i-t),a=e.charCodeAt(i);if(_o(a)&&(a=a|32),a!==s)return!1}return!0}function Xy(e,t){for(;t>=0&&Pr(e.charCodeAt(t));t--);return t+1}function us(e,t){for(;t<e.length&&Pr(e.charCodeAt(t));t++);return t}function qf(e,t){for(;t<e.length&&Ze(e.charCodeAt(t));t++);return t}function Ar(e,t){if(t+=2,Vt(mi(e,t-1))){for(let n=Math.min(e.length,t+5);t<n&&Vt(mi(e,t));t++);let r=mi(e,t);Pr(r)&&(t+=xo(e,t,r))}return t}function cs(e,t){for(;t<e.length;t++){let r=e.charCodeAt(t);if(!as(r)){if(Lt(r,mi(e,t+1))){t=Ar(e,t)-1;continue}break}}return t}function Sn(e,t){let r=e.charCodeAt(t);if((r===43||r===45)&&(r=e.charCodeAt(t+=1)),Ze(r)&&(t=qf(e,t+1),r=e.charCodeAt(t)),r===46&&Ze(e.charCodeAt(t+1))&&(t+=2,t=qf(e,t)),Wr(e,t,101)){let n=0;r=e.charCodeAt(t+1),(r===45||r===43)&&(n=1,r=e.charCodeAt(t+2)),Ze(r)&&(t=qf(e,t+1+n+1))}return t}function wo(e,t){for(;t<e.length;t++){let r=e.charCodeAt(t);if(r===41){t++;break}Lt(r,mi(e,t+1))&&(t=Ar(e,t))}return t}function ds(e){if(e.length===1&&!Vt(e.charCodeAt(0)))return e[0];let t=parseInt(e,16);return(t===0||t>=55296&&t<=57343||t>1114111)&&(t=65533),String.fromCodePoint(t)}l();var _i=["EOF-token","ident-token","function-token","at-keyword-token","hash-token","string-token","bad-string-token","url-token","bad-url-token","delim-token","number-token","percentage-token","dimension-token","whitespace-token","CDO-token","CDC-token","colon-token","semicolon-token","comma-token","[-token","]-token","(-token",")-token","{-token","}-token"];l();l();function gi(e=null,t){return e===null||e.length<t?new Uint32Array(Math.max(t+1024,16384)):e}var Zy=10,cR
|
||
|
`)}})}var Tf=100,tb=60,rb=" ";function nb({source:e,line:t,column:r},n){function i(d,p){return s.slice(d,p).map((f,m)=>String(d+m+1).padStart(o)+" |"+f).join(`
|
||
|
`)}let s=e.split(/\r\n?|\n|\f/),a=Math.max(1,t-n)-1,u=Math.min(t+n,s.length+1),o=Math.max(4,String(u).length)+1,c=0;r+=(rb.length-1)*(s[t-1].substr(0,r-1).match(/\t/g)||[]).length,r>Tf&&(c=r-tb+3,r=tb-2);for(let d=a;d<=u;d++)d>=0&&d<s.length&&(s[d]=s[d].replace(/\t/g,rb),s[d]=(c>0&&s[d].length>c?"\u2026":"")+s[d].substr(c,Tf-2)+(s[d].length>c+Tf-1?"\u2026":""));return[i(a,t),new Array(r+o+2).join("-")+"^",i(t,u)].filter(Boolean).join(`
|
||
|
`)}function Lf(e,t,r,n,i){return Object.assign(En("SyntaxError",e),{source:t,offset:r,line:n,column:i,sourceFragment(a){return nb({source:t,line:n,column:i},isNaN(a)?0:a)},get formattedMessage(){return`Parse error: ${e}
|
||
|
`+nb({source:t,line:n,column:i},2)}})}l();function ib(e){let t=this.createList(),r=!1,n={recognizer:e};for(;!this.eof;){switch(this.tokenType){case 25:this.next();continue;case 13:r=!0,this.next();continue}let i=e.getNode.call(this,n);if(i===void 0)break;r&&(e.onWhiteSpace&&e.onWhiteSpace.call(this,i,t,n),r=!1),t.push(i)}return r&&e.onWhiteSpace&&e.onWhiteSpace.call(this,null,t,n),t}var sb=()=>{},pR=33,hR=35,Mf=59,ab=123,ob=0;function fR(e){return function(){return this[e]()}}function If(e){let t=Object.create(null);for(let r in e){let n=e[r],i=n.parse||n;i&&(t[r]=i)}return t}function mR(e){let t={context:Object.create(null),scope:Object.assign(Object.create(null),e.scope),atrule:If(e.atrule),pseudo:If(e.pseudo),node:If(e.node)};for(let r in e.parseContext)switch(typeof e.parseContext[r]){case"function":t.context[r]=e.parseContext[r];break;case"string":t.context[r]=fR(e.parseContext[r]);break}return{config:t,...t,...t.node}}function lb(e){let t="",r="<unknown>",n=!1,i=sb,s=!1,a=new ko,u=Object.assign(new hs,mR(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:ib,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(c){return c===ab?1:0},consumeUntilLeftCurlyBracketOrSemicolon(c){return c===ab||c===Mf?1:0},consumeUntilExclamationMarkOrSemicolon(c){return c===pR||c===Mf?1:0},consumeUntilSemicolonIncluded(c){return c===Mf?2:0},createList(){return new Mt},createSingleNodeList(c){return new Mt().appendData(c)},getFirstListNode(c){return c&&c.first},getLastListNode(c){return c&&c.last},parseWithFallback(c,d){let p=this.tokenIndex;try{return c.call(this)}catch(f){if(s)throw f;let m=d.call(this,p);return s=!0,i(f,m),s=!1,m}},lookupNonWSType(c){let d;do if(d=this.lookupType(c++),d!==13)return d;while(d!==ob);return ob},charCodeAt(c){return c>=0&&c<t.length?t.charCodeAt(c):0},substring(c,d){return t.substring(c,d)},substrToCursor(c){return this.source.substring(c,this.tokenStart)},cmpChar(c,d){return Wr(t,c,d)},cmpStr(c,d,p){return Yr(t,c,d,p)},consume(c){let d=this.tokenStart;return this.eat(c),this.substrToCursor(d)},consumeFunctionName(){let c=t.substring(this.tokenStart,this.tokenEnd-1);return this.eat(2),c},consumeNumber(c){let d=t.substring(this.tokenStart,Sn(t,this.tokenStart));return this.eat(c),d},eat(c){if(this.tokenType!==c){let d=_i[c].slice(0,-6).replace(/-/g," ").replace(/^./,m=>m.toUpperCase()),p=`${/[[\](){}]/.test(d)?`"${d}"`:d} is expected`,f=this.tokenStart;switch(c){case 1:this.tokenType===2||this.tokenType===7?(f=this.tokenEnd-1,p="Identifier is expected but function found"):p="Identifier is expected";break;case 4:this.isDelim(hR)&&(this.next(),f++,p="Name is expected");break;case 11:this.tokenType===10&&(f=this.tokenEnd,p="Percent sign is expected");break}this.error(p,f)}this.next()},eatIdent(c){(this.tokenType!==1||this.lookupValue(0,c)===!1)&&this.error(`Identifier "${c}" is expected`),this.next()},eatDelim(c){this.isDelim(c)||this.error(`Delim "${String.fromCharCode(c)}" is expected`),this.next()},getLocation(c,d){return n?a.getLocationRange(c,d,r):null},getLocationFromList(c){if(n){let d=this.getFirstListNode(c),p=this.getLastListNode(c);return a.getLocationRange(d!==null?d.loc.start.offset-a.startOffset:this.tokenStart,p!==null?p.loc.end.offset-a.startOffset:this.tokenStart,r)}return null},error(c,d){let p=typeof d<"u"&&d<t.length?a.getLocation(d):this.eof?a.getLocation(Xy(t,t.length-1)):a.getLocation(this.tokenStart);throw new Lf(c||"Unexpected input",t,p.offset,p.line,p.column)}});return Object.assign(function(c,d){t=c,d=d||{},u.setSource(t,hn),a.setSource(t,d.offset,d.line,d.column),r=d.filename||"<unknown>",n=!!d.positions,i=typeof d.onParseError=="function"?d.onParseError:sb,s=!1,u.parseAtrulePrelude="parseAtrulePrelude"in d?!!d.parseAtrulePrelude:!0,u.parseRulePrelude="parseRulePrelude"in d?!!d.parseRulePrelude:!0,u.parseValue="parseValue"in d?!!d.parseValue:!0,u.parseCustomProperty="parseCustomProperty"in d?!!d.parseCustomProperty:!1;let{context:p="default",onComment:f}=d;if(!(p in u.context))throw new Error("Unknown context `"+p+"`");typeof f
|
||
|
`,13,!0)},emit(o){i+=o},result(){return i}};n&&(typeof n.decorator=="function"&&(a=n.decorator(a)),n.sourceMap&&(a=Ab(a)),n.mode in Eo&&(a.tokenBefore=Eo[n.mode]));let u={node:o=>a.node(o),children:BR,token:(o,c)=>a.token(o,c),tokenize:FR};return a.node(r),a.result()}}l();function Mb(e){return{fromPlainObject(t){return e(t,{enter(r){r.children&&!(r.children instanceof Mt)&&(r.children=new Mt().fromArray(r.children))}}),t},toPlainObject(t){return e(t,{leave(r){r.children&&r.children instanceof Mt&&(r.children=r.children.toArray())}}),t}}}l();var{hasOwnProperty:Uf}=Object.prototype,gs=function(){};function Ib(e){return typeof e=="function"?e:gs}function Ob(e,t){return function(r,n,i){r.type===t&&e.call(this,r,n,i)}}function jR(e,t){let r=t.structure,n=[];for(let i in r){if(Uf.call(r,i)===!1)continue;let s=r[i],a={name:i,type:!1,nullable:!1};Array.isArray(s)||(s=[s]);for(let u of s)u===null?a.nullable=!0:typeof u=="string"?a.type="node":Array.isArray(u)&&(a.type="list");a.type&&n.push(a)}return n.length?{context:t.walkContext,fields:n}:null}function VR(e){let t={};for(let r in e.node)if(Uf.call(e.node,r)){let n=e.node[r];if(!n.structure)throw new Error("Missed `structure` field in `"+r+"` node type definition");t[r]=jR(r,n)}return t}function Nb(e,t){let r=e.fields.slice(),n=e.context,i=typeof n=="string";return t&&r.reverse(),function(s,a,u,o){let c;i&&(c=a[n],a[n]=s);for(let d of r){let p=s[d.name];if(!d.nullable||p){if(d.type==="list"){if(t?p.reduceRight(o,!1):p.reduce(o,!1))return!0}else if(u(p))return!0}}i&&(a[n]=c)}}function Db({StyleSheet:e,Atrule:t,Rule:r,Block:n,DeclarationList:i}){return{Atrule:{StyleSheet:e,Atrule:t,Rule:r,Block:n},Rule:{StyleSheet:e,Atrule:t,Rule:r,Block:n},Declaration:{StyleSheet:e,Atrule:t,Rule:r,Block:n,DeclarationList:i}}}function Bb(e){let t=VR(e),r={},n={},i=Symbol("break-walk"),s=Symbol("skip-node");for(let c in t)Uf.call(t,c)&&t[c]!==null&&(r[c]=Nb(t[c],!1),n[c]=Nb(t[c],!0));let a=Db(r),u=Db(n),o=function(c,d){function p($,C,R){let E=f.call(b,$,C,R);return E===i?!0:E===s?!1:!!(y.hasOwnProperty($.type)&&y[$.type]($,b,p,w)||m.call(b,$,C,R)===i)}let f=gs,m=gs,y=r,w=($,C,R,E)=>$||p(C,R,E),b={break:i,skip:s,root:c,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if(typeof d=="function")f=d;else if(d&&(f=Ib(d.enter),m=Ib(d.leave),d.reverse&&(y=n),d.visit)){if(a.hasOwnProperty(d.visit))y=d.reverse?u[d.visit]:a[d.visit];else if(!t.hasOwnProperty(d.visit))throw new Error("Bad value `"+d.visit+"` for `visit` option (should be: "+Object.keys(t).sort().join(", ")+")");f=Ob(f,d.visit),m=Ob(m,d.visit)}if(f===gs&&m===gs)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");p(c)};return o.break=i,o.skip=s,o.find=function(c,d){let p=null;return o(c,function(f,m,y){if(d.call(this,f,m,y))return p=f,i}),p},o.findLast=function(c,d){let p=null;return o(c,{reverse:!0,enter(f,m,y){if(d.call(this,f,m,y))return p=f,i}}),p},o.findAll=function(c,d){let p=[];return o(c,function(f,m,y){d.call(this,f,m,y)&&p.push(f)}),p},o}l();l();l();function HR(e){return e}function UR(e){let{min:t,max:r,comma:n}=e;return t===0&&r===0?n?"#?":"*":t===0&&r===1?"?":t===1&&r===0?n?"#":"+":t===1&&r===1?"":(n?"#":"")+(t===r?"{"+t+"}":"{"+t+","+(r!==0?r:"")+"}")}function zR(e){switch(e.type){case"Range":return" ["+(e.min===null?"-\u221E":e.min)+","+(e.max===null?"\u221E":e.max)+"]";default:throw new Error("Unknown node type `"+e.type+"`")}}function GR(e,t,r,n){let i=e.combinator===" "||n?e.combinator:" "+e.combinator+" ",s=e.terms.map(a=>zf(a,t,r,n)).join(i);return e.explicit||r?(n||s[0]===","?"[":"[ ")+s+(n?"]":" ]"):s}function zf(e,t,r,n){let i;switch(e.type){case"Group":i=GR(e,t,r,n)+(e.disallowEmpty?"!":"");break;case"Multiplier":return zf(e.term,t,r,n)+t(UR(e),e);case"Type":i="<"+e.name+(e.opts?t(zR(e.opts),e.opts):"")+">";break;case"Property":i="<'"+e.name+"'>";break;case"Keyword":i=e.name;break;case"AtKeyword":i="@"+e.name;break;case"Function":i=e.name+"(";break;case"String":case"Token":i=e.value;break;case"Comma":i=",";break;def
|
||
|
syntax: `+i.syntax+`
|
||
|
value: `+(s||"<empty string>")+`
|
||
|
--------`+new Array(i.mismatchOffset+1).join("-")+"^",Object.assign(i,o),i.loc={source:r&&r.loc&&r.loc.source||"<unknown>",start:o,end:c},i};l();var Po=new Map,wi=new Map,Ao=45,qo=YR,Gf=KR;function To(e,t){return t=t||0,e.length-t>=2&&e.charCodeAt(t)===Ao&&e.charCodeAt(t+1)===Ao}function Vb(e,t){if(t=t||0,e.length-t>=3&&e.charCodeAt(t)===Ao&&e.charCodeAt(t+1)!==Ao){let r=e.indexOf("-",t+2);if(r!==-1)return e.substring(t,r+1)}return""}function YR(e){if(Po.has(e))return Po.get(e);let t=e.toLowerCase(),r=Po.get(t);if(r===void 0){let n=To(t,0),i=n?"":Vb(t,0);r=Object.freeze({basename:t.substr(i.length),name:t,prefix:i,vendor:i,custom:n})}return Po.set(e,r),r}function KR(e){if(wi.has(e))return wi.get(e);let t=e,r=e[0];r==="/"?r=e[1]==="/"?"//":"/":r!=="_"&&r!=="*"&&r!=="$"&&r!=="#"&&r!=="+"&&r!=="&"&&(r="");let n=To(t,r.length);if(!n&&(t=t.toLowerCase(),wi.has(t))){let u=wi.get(t);return wi.set(e,u),u}let i=n?"":Vb(t,r.length),s=t.substr(0,r.length+i.length),a=Object.freeze({basename:t.substr(s.length),name:t.substr(r.length),hack:r,vendor:i,prefix:s,custom:n});return wi.set(e,a),a}l();var Lo=["initial","inherit","unset","revert","revert-layer"];l();l();var bs=43,qr=45,Wf=110,ki=!0,XR=!1;function Kf(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function ys(e,t,r){for(;e!==null&&(e.type===13||e.type===25);)e=r(++t);return t}function fn(e,t,r,n){if(!e)return 0;let i=e.value.charCodeAt(t);if(i===bs||i===qr){if(r)return 0;t++}for(;t<e.value.length;t++)if(!Ze(e.value.charCodeAt(t)))return 0;return n+1}function Yf(e,t,r){let n=!1,i=ys(e,t,r);if(e=r(i),e===null)return t;if(e.type!==10)if(Kf(e,bs)||Kf(e,qr)){if(n=!0,i=ys(r(++i),i,r),e=r(i),e===null||e.type!==10)return 0}else return t;if(!n){let s=e.value.charCodeAt(0);if(s!==bs&&s!==qr)return 0}return fn(e,n?0:1,n,i)}function Qf(e,t){let r=0;if(!e)return 0;if(e.type===10)return fn(e,0,XR,r);if(e.type===1&&e.value.charCodeAt(0)===qr){if(!Wr(e.value,1,Wf))return 0;switch(e.value.length){case 2:return Yf(t(++r),r,t);case 3:return e.value.charCodeAt(2)!==qr?0:(r=ys(t(++r),r,t),e=t(r),fn(e,0,ki,r));default:return e.value.charCodeAt(2)!==qr?0:fn(e,3,ki,r)}}else if(e.type===1||Kf(e,bs)&&t(r+1).type===1){if(e.type!==1&&(e=t(++r)),e===null||!Wr(e.value,0,Wf))return 0;switch(e.value.length){case 1:return Yf(t(++r),r,t);case 2:return e.value.charCodeAt(1)!==qr?0:(r=ys(t(++r),r,t),e=t(r),fn(e,0,ki,r));default:return e.value.charCodeAt(1)!==qr?0:fn(e,2,ki,r)}}else if(e.type===12){let n=e.value.charCodeAt(0),i=n===bs||n===qr?1:0,s=i;for(;s<e.value.length&&Ze(e.value.charCodeAt(s));s++);return s===i||!Wr(e.value,s,Wf)?0:s+1===e.value.length?Yf(t(++r),r,t):e.value.charCodeAt(s+1)!==qr?0:s+2===e.value.length?(r=ys(t(++r),r,t),e=t(r),fn(e,0,ki,r)):fn(e,s+2,ki,r)}return 0}l();var ZR=43,Hb=45,Ub=63,JR=117;function Xf(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function e2(e,t){return e.value.charCodeAt(0)===t}function xs(e,t,r){let n=0;for(let i=t;i<e.value.length;i++){let s=e.value.charCodeAt(i);if(s===Hb&&r&&n!==0)return xs(e,t+n+1,!1),6;if(!Vt(s)||++n>6)return 0}return n}function Mo(e,t,r){if(!e)return 0;for(;Xf(r(t),Ub);){if(++e>6)return 0;t++}return t}function Zf(e,t){let r=0;if(e===null||e.type!==1||!Wr(e.value,0,JR)||(e=t(++r),e===null))return 0;if(Xf(e,ZR))return e=t(++r),e===null?0:e.type===1?Mo(xs(e,0,!0),++r,t):Xf(e,Ub)?Mo(1,++r,t):0;if(e.type===10){let n=xs(e,1,!0);return n===0?0:(e=t(++r),e===null?r:e.type===12||e.type===10?!e2(e,Hb)||!xs(e,1,!1)?0:r+1:Mo(n,r,t))}return e.type===12?Mo(xs(e,1,!0),++r,t):0}var t2=["calc(","-moz-calc(","-webkit-calc("],Jf=new Map([[2,22],[21,22],[19,20],[23,24]]);function vr(e,t){return t<e.length?e.charCodeAt(t):0}function zb(e,t){return Yr(e,0,e.length,t)}function Gb(e,t){for(let r=0;r<t.length;r++)if(zb(e,t[r]))return!0;return!1}function Wb(e,t){return t!==e.length-2?!1:vr(e,t)===92&&Ze(vr(e,t+1))}function Io(e,t,r){if(e&&e.type==="Range"){let n=Number(r!==void 0&&r!==t.length?t.substr(0,r):t);if(isNaN(n)||e.min!==null&&n<e.min&&typeof e.min!="string"||e.max!==null&&n>e.max&&typeof e.max!="string")return!0}return!1}function
|
||
|
`+t+`
|
||
|
--`+new Array((r||t.length)+1).join("-")+"^"})}l();l();var k2=9,$2=10,C2=12,S2=13,E2=32,No=class{constructor(t){this.str=t,this.pos=0}charCodeAt(t){return t<this.str.length?this.str.charCodeAt(t):0}charCode(){return this.charCodeAt(this.pos)}nextCharCode(){return this.charCodeAt(this.pos+1)}nextNonWsCode(t){return this.charCodeAt(this.findWsEnd(t))}findWsEnd(t){for(;t<this.str.length;t++){let r=this.str.charCodeAt(t);if(r!==S2&&r!==$2&&r!==C2&&r!==E2&&r!==k2)break}return t}substringToPos(t){return this.str.substring(this.pos,this.pos=t)}eat(t){this.charCode()!==t&&this.error("Expect `"+String.fromCharCode(t)+"`"),this.pos++}peek(){return this.pos<this.str.length?this.str.charAt(this.pos++):""}error(t){throw new em(t,this.str,this.pos)}};var R2=9,P2=10,A2=12,q2=13,T2=32,nx=33,nm=35,Qb=38,Do=39,ix=40,L2=41,sx=42,im=43,sm=44,Xb=45,am=60,ax=62,rm=63,M2=64,Vo=91,om=93,Bo=123,Zb=124,Jb=125,ex=8734,ws=new Uint8Array(128).map((e,t)=>/[a-zA-Z0-9\-]/.test(String.fromCharCode(t))?1:0),tx={" ":1,"&&":2,"||":3,"|":4};function Fo(e){return e.substringToPos(e.findWsEnd(e.pos))}function $i(e){let t=e.pos;for(;t<e.str.length;t++){let r=e.str.charCodeAt(t);if(r>=128||ws[r]===0)break}return e.pos===t&&e.error("Expect a keyword"),e.substringToPos(t)}function jo(e){let t=e.pos;for(;t<e.str.length;t++){let r=e.str.charCodeAt(t);if(r<48||r>57)break}return e.pos===t&&e.error("Expect a number"),e.substringToPos(t)}function I2(e){let t=e.str.indexOf("'",e.pos+1);return t===-1&&(e.pos=e.str.length,e.error("Expect an apostrophe")),e.substringToPos(t+1)}function rx(e){let t=null,r=null;return e.eat(Bo),t=jo(e),e.charCode()===sm?(e.pos++,e.charCode()!==Jb&&(r=jo(e))):r=t,e.eat(Jb),{min:Number(t),max:r?Number(r):0}}function O2(e){let t=null,r=!1;switch(e.charCode()){case sx:e.pos++,t={min:0,max:0};break;case im:e.pos++,t={min:1,max:0};break;case rm:e.pos++,t={min:0,max:1};break;case nm:e.pos++,r=!0,e.charCode()===Bo?t=rx(e):e.charCode()===rm?(e.pos++,t={min:0,max:0}):t={min:1,max:0};break;case Bo:t=rx(e);break;default:return null}return{type:"Multiplier",comma:r,min:t.min,max:t.max,term:null}}function Ci(e,t){let r=O2(e);return r!==null?(r.term=t,e.charCode()===nm&&e.charCodeAt(e.pos-1)===im?Ci(e,r):r):t}function tm(e){let t=e.peek();return t===""?null:{type:"Token",value:t}}function N2(e){let t;return e.eat(am),e.eat(Do),t=$i(e),e.eat(Do),e.eat(ax),Ci(e,{type:"Property",name:t})}function D2(e){let t=null,r=null,n=1;return e.eat(Vo),e.charCode()===Xb&&(e.peek(),n=-1),n==-1&&e.charCode()===ex?e.peek():(t=n*Number(jo(e)),ws[e.charCode()]!==0&&(t+=$i(e))),Fo(e),e.eat(sm),Fo(e),e.charCode()===ex?e.peek():(n=1,e.charCode()===Xb&&(e.peek(),n=-1),r=n*Number(jo(e)),ws[e.charCode()]!==0&&(r+=$i(e))),e.eat(om),{type:"Range",min:t,max:r}}function B2(e){let t,r=null;return e.eat(am),t=$i(e),e.charCode()===ix&&e.nextCharCode()===L2&&(e.pos+=2,t+="()"),e.charCodeAt(e.findWsEnd(e.pos))===Vo&&(Fo(e),r=D2(e)),e.eat(ax),Ci(e,{type:"Type",name:t,opts:r})}function F2(e){let t=$i(e);return e.charCode()===ix?(e.pos++,{type:"Function",name:t}):Ci(e,{type:"Keyword",name:t})}function j2(e,t){function r(i,s){return{type:"Group",terms:i,combinator:s,disallowEmpty:!1,explicit:!1}}let n;for(t=Object.keys(t).sort((i,s)=>tx[i]-tx[s]);t.length>0;){n=t.shift();let i=0,s=0;for(;i<e.length;i++){let a=e[i];a.type==="Combinator"&&(a.value===n?(s===-1&&(s=i-1),e.splice(i,1),i--):(s!==-1&&i-s>1&&(e.splice(s,i-s,r(e.slice(s,i),n)),i=s+1),s=-1))}s!==-1&&t.length&&e.splice(s,i-s,r(e.slice(s,i),n))}return n}function ox(e){let t=[],r={},n,i=null,s=e.pos;for(;n=H2(e);)n.type!=="Spaces"&&(n.type==="Combinator"?((i===null||i.type==="Combinator")&&(e.pos=s,e.error("Unexpected combinator")),r[n.value]=!0):i!==null&&i.type!=="Combinator"&&(r[" "]=!0,t.push({type:"Combinator",value:" "})),t.push(n),i=n,s=e.pos);return i!==null&&i.type==="Combinator"&&(e.pos-=s,e.error("Unexpected combinator")),{type:"Group",terms:t,combinator:j2(t,r)||" ",disallowEmpty:!1,explicit:!1}}function V2(e){let t;return e.eat(Vo),t=ox(e),e.eat(om),t.explicit=!0,e.charCode()===nx&&(e.pos++,t.disallowEmpty=!0),t}function H2(e)
|
||
|
`).map((o,c)=>{let d=i+o.length+1,p={start:i,end:d,line:c};return i=d,p}),a=0;function u(o,c){if(typeof o=="string"&&(o=e.indexOf(o,c??0)),o===-1)return;let d=s[a],p=o>=d.end?1:-1;for(;d;){if(GL(d,o))return{line:r+d.line,column:n+o-d.start,character:o};a+=p,d=s[a]}}return u}function xg(e,t,r){return Jo(e,r)(t,r&&r.startIndex)}l();var WL=/^\t+/;function wg(e){return e.replace(WL,t=>t.split(" ").join(" "))}function Ms(e,t,r){let n=e.split(`
|
||
|
`),i=Math.max(0,t-2),s=Math.min(t+3,n.length),a=String(s+1).length;return n.slice(i,s).map((u,o)=>{let c=i+o===t,d=String(o+i+1).padStart(a," ");if(c){let p=" ".repeat(a+2+wg(u.slice(0,r)).length)+"^";return`${d}: ${wg(u)}
|
||
|
${p}`}return`${d}: ${wg(u)}`}).join(`
|
||
|
`)}var kg=class extends Error{constructor(){super(...arguments);g(this,"code");g(this,"start");g(this,"end");g(this,"pos");g(this,"filename");g(this,"frame")}toString(){return`${this.message} (${this.start.line}:${this.start.column})
|
||
|
${this.frame}`}};function Is(e,t){let r=new kg(e);r.name=t.name;let n=xg(t.source,t.start,{offsetLine:1}),i=xg(t.source,t.end||t.start,{offsetLine:1});throw r.code=t.code,r.start=n,r.end=i,r.pos=t.start,r.filename=t.filename,r.frame=Ms(t.source,n.line-1,n.column),r}var YL=/ \(\d+:\d+\)$/,$g=class{constructor(t,r){g(this,"template");g(this,"filename");g(this,"customElement");g(this,"css_mode");g(this,"index",0);g(this,"stack",[]);g(this,"html");g(this,"css",[]);g(this,"js",[]);g(this,"meta_tags",{});g(this,"last_auto_closed_tag");if(typeof t!="string")throw new TypeError("Template must be a string");this.template=t.trimRight(),this.filename=r.filename,this.customElement=r.customElement,this.css_mode=r.css,this.html={start:null,end:null,type:"Fragment",children:[]},this.stack.push(this.html);let n=Ts;for(;this.index<this.template.length;)n=n(this)||Ts;if(this.stack.length>1){let i=this.current(),s=i.type==="Element"?`<${i.name}>`:"Block",a=i.type==="Element"?"element":"block";this.error({code:`unclosed-${a}`,message:`${s} was left open`},i.start)}if(n!==Ts&&this.error({code:"unexpected-eof",message:"Unexpected end of input"}),this.html.children.length){let i=this.html.children[0].start;for(;Bt.test(t[i]);)i+=1;let s=this.html.children[this.html.children.length-1].end;for(;Bt.test(t[s-1]);)s-=1;this.html.start=i,this.html.end=s}else this.html.start=this.html.end=null}current(){return this.stack[this.stack.length-1]}acorn_error(t){this.error({code:"parse-error",message:t.message.replace(YL,"")},t.pos)}error({code:t,message:r},n=this.index){Is(r,{name:"ParseError",code:t,source:this.template,start:n,filename:this.filename})}eat(t,r,n){return this.match(t)?(this.index+=t.length,!0):(r&&this.error(n||(this.index===this.template.length?ie.unexpected_eof_token(t):ie.unexpected_token(t))),!1)}match(t){return this.template.slice(this.index,this.index+t.length)===t}match_regex(t){let r=t.exec(this.template.slice(this.index));return!r||r.index!==0?null:r[0]}allow_whitespace(){for(;this.index<this.template.length&&Bt.test(this.template[this.index]);)this.index++}read(t){let r=this.match_regex(t);return r&&(this.index+=r.length),r}read_identifier(t=!1){let r=this.index,n=this.index,i=Zr(this.template,n);if(!Pt(i,!0))return null;for(n+=i<=65535?1:2;n<this.template.length;){let a=Zr(this.template,n);if(!Sr(a,!0))break;n+=a<=65535?1:2}let s=this.template.slice(this.index,this.index=n);return!t&&Ls.has(s)&&this.error({code:"unexpected-reserved-word",message:`'${s}' is a reserved word in JavaScript and cannot be used here`},r),s}read_until(t,r){this.index>=this.template.length&&this.error(r||{code:"unexpected-eof",message:"Unexpected end of input"});let n=this.index,i=t.exec(this.template.slice(n));return i?(this.index=n+i.index,this.template.slice(n,this.index)):(this.index=this.template.length,this.template.slice(n))}require_whitespace(){Bt.test(this.template[this.index])||this.error({code:"missing-whitespace",message:"Expected whitespace"}),this.allow_whitespace()}};function el(e,t={}){let r=new $g(e,t);r.css.length>1&&r.error(ie.duplicate_style,r.css[1].start);let n=r.js.filter(s=>s.context==="default"),i=r.js.filter(s=>s.context==="module");return n.length>1&&r.error(ie.invalid_script_instance,n[1].start),i.length>1&&r.error(ie.invalid_script_module,i[1].start),{html:r.html,css:r.css[0],instance:n[0],module:i[0]}}l();l();l();l();function Lr(e){return e&&e.type==="MemberExpression"&&e.object.name==="@_document"&&e.property.name==="head"}var Li=class e{constructor(t){g(this,"parent");g(this,"renderer");g(this,"name");g(this,"type");g(this,"comment");g(this,"wrappers");g(this,"key");g(this,"first");g(this,"dependencies",new Set);g(this,"bindings");g(this,"binding_group_initialised",new Set);g(this,"binding_groups",new Set);g(this,"chunks");g(this,"event_listeners",[]);g(this,"maintain_context");g(this,"has_animation");g(this,"has_intros");g(this,"has_outros");g(this,"has_intro_method");g(this,"has_outro_method");g(this,"outros");g(this,"aliases");g(this,"variables",new Map);g(this,"get_unique_name");g(this,"has_update_method",!1);g(this,
|
||
|
${this.chunks.create}
|
||
|
${o}
|
||
|
}`}if((this.renderer.options.hydratable||this.chunks.claim.length>0)&&(this.chunks.claim.length===0&&this.chunks.hydrate.length===0?n.claim=i:n.claim=v`function #claim(#nodes) {
|
||
|
${this.chunks.claim}
|
||
|
${this.renderer.options.hydratable&&this.chunks.hydrate.length>0&&_`this.h();`}
|
||
|
}`),this.renderer.options.hydratable&&this.chunks.hydrate.length>0&&(n.hydrate=v`function #hydrate() {
|
||
|
${this.chunks.hydrate}
|
||
|
}`),this.chunks.mount.length===0?n.mount=i:this.event_listeners.length===0?n.mount=v`function #mount(#target, #anchor) {
|
||
|
${this.chunks.mount}
|
||
|
}`:n.mount=v`function #mount(#target, #anchor) {
|
||
|
${this.chunks.mount}
|
||
|
}`,this.has_update_method||this.maintain_context)if(this.chunks.update.length===0&&!this.maintain_context)n.update=i;else{let o=this.maintain_context?v`#new_ctx`:v`#ctx`,c={type:"Identifier",name:"#dirty"};!this.renderer.context_overflow&&!this.parent&&(c={type:"ArrayPattern",elements:[c]}),n.update=v`function #update(${o}, ${c}) {
|
||
|
${this.maintain_context&&_`#ctx = ${o};`}
|
||
|
${this.chunks.update}
|
||
|
}`}if(this.has_animation&&(n.measure=v`function #measure() {
|
||
|
${this.chunks.measure}
|
||
|
}`,this.chunks.restore_measurements.length&&(n.restore_measurements=v`function #restore_measurements(#measurement) {
|
||
|
${this.chunks.restore_measurements}
|
||
|
}`),n.fix=v`function #fix() {
|
||
|
${this.chunks.fix}
|
||
|
}`,n.animate=v`function #animate() {
|
||
|
${this.chunks.animate}
|
||
|
}`),(this.has_intro_method||this.has_outro_method)&&(this.chunks.intro.length===0?n.intro=i:n.intro=v`function #intro(#local) {
|
||
|
${this.has_outros&&_`if (#current) return;`}
|
||
|
${this.chunks.intro}
|
||
|
}`,this.chunks.outro.length===0?n.outro=i:n.outro=v`function #outro(#local) {
|
||
|
${this.chunks.outro}
|
||
|
}`),this.chunks.destroy.length===0)n.destroy=i;else{let o=[],c=$n(this.chunks.destroy).filter(d=>d.type==="IfStatement"&&d.test.type==="Identifier"&&d.test.name==="detaching"?(o.push(d.consequent),!1):!0);n.destroy=v`function #destroy(detaching) {
|
||
|
${o.length?_`if (detaching) { ${o} }`:null}
|
||
|
${c}
|
||
|
}`}if(!this.renderer.component.compile_options.dev)for(let o in n){let c=n[o];c&&(c.id=null)}let s=v`{
|
||
|
key: ${n.key},
|
||
|
first: ${n.first},
|
||
|
c: ${n.create},
|
||
|
l: ${n.claim},
|
||
|
h: ${n.hydrate},
|
||
|
m: ${n.mount},
|
||
|
p: ${n.update},
|
||
|
r: ${n.measure},
|
||
|
s: ${n.restore_measurements},
|
||
|
f: ${n.fix},
|
||
|
a: ${n.animate},
|
||
|
i: ${n.intro},
|
||
|
o: ${n.outro},
|
||
|
d: ${n.destroy}
|
||
|
}`,a=r&&this.get_unique_name("block");return _`
|
||
|
${this.chunks.declarations}
|
||
|
|
||
|
${Array.from(this.variables.values()).map(({id:o,init:c})=>c?_`let ${o} = ${c}`:_`let ${o}`)}
|
||
|
|
||
|
${this.chunks.init}
|
||
|
|
||
|
${r?_`
|
||
|
const ${a} = ${s};
|
||
|
@dispatch_dev("SvelteRegisterBlock", {
|
||
|
block: ${a},
|
||
|
id: ${this.name||"create_fragment"}.name,
|
||
|
type: "${this.type}",
|
||
|
source: "${this.comment?this.comment.replace(ao,'\\"'):""}",
|
||
|
ctx: #ctx
|
||
|
});
|
||
|
return ${a};`:_`
|
||
|
return ${s};`}
|
||
|
`}has_content(){return!!this.first||this.event_listeners.length>0||this.chunks.intro.length>0||this.chunks.outro.length>0||this.chunks.create.length>0||this.chunks.hydrate.length>0||this.chunks.claim.length>0||this.chunks.mount.length>0||this.chunks.update.length>0||this.chunks.destroy.length>0||this.has_animation}render(){let t=this.key&&this.get_unique_name("key"),r=[v`#ctx`];t&&r.unshift(t);let n=_`function ${this.name}(${r}) {
|
||
|
${this.get_contents(t)}
|
||
|
}`;return this.comment?_`
|
||
|
// ${this.comment}
|
||
|
${n}`:n}render_listeners(t=""){if(this.event_listeners.length>0){this.add_variable({type:"Identifier",name:"#mounted"}),this.chunks.destroy.push(_`#mounted = false`);let r={type:"Identifier",name:`#dispose${t}`};this.add_variable(r),this.event_listeners.length===1?(this.chunks.mount.push(_`
|
||
|
if (!#mounted) {
|
||
|
${r} = ${this.event_listeners[0]};
|
||
|
#mounted = true;
|
||
|
}
|
||
|
`),this.chunks.destroy.push(_`${r}();`)):(this.chunks.mount.push(_`
|
||
|
if (!#mounted) {
|
||
|
${r} = [
|
||
|
${this.event_listeners}
|
||
|
];
|
||
|
#mounted = true;
|
||
|
}
|
||
|
`),this.chunks.destroy.push(_`@run_all(${r});`))}}render_binding_groups(){for(let t of this.binding_groups)t.render(this)}};l();l();l();var ke=class{constructor(t,r,n,i){g(this,"renderer");g(this,"parent");g(this,"node");g(this,"prev");g(this,"next");g(this,"var");this.node=i,Object.defineProperties(this,{renderer:{value:t},parent:{value:n}}),r.wrappers.push(this)}get_or_create_anchor(t,r,n){let i=this.next?!this.next.is_dom_node():!r||!this.parent.is_dom_node(),s=i?t.get_unique_name(`${this.var.name}_anchor`):this.next&&this.next.var||{type:"Identifier",name:"null"};return i&&t.add_element(s,v`@empty()`,n&&v`@empty()`,r),s}get_update_mount_node(t){return this.parent&&this.parent.is_dom_node()?this.parent.var:v`${t}.parentNode`}is_dom_node(){return this.node.type==="Element"||this.node.type==="Text"||this.node.type==="MustacheTag"}render(t,r,n,i=void 0){throw Error("Wrapper class is not renderable")}};l();function St(e,t){let{locate:r,source:n}=t,i=e.start;if(e.type==="ElseBlock"){for(;n[i-1]!=="{";)i-=1;for(;n[i-1]==="{";)i-=1}let s;if(e.type==="InlineComponent"||e.type==="Element"||e.type==="SlotTemplate")if(e.children.length)for(s=e.children[0].start;n[s-1]!==">";)s-=1;else{for(s=e.start;n[s]!==">";)s+=1;s+=1}else if(e.type==="Text"||e.type==="Comment")s=e.end;else{for(s=e.expression?e.expression.node.end:i;n[s]!=="}"&&s<=n.length;)s+=1;for(;n[s]==="}";)s+=1}let a=r(i);return`${`(${a.line}:${a.column})`} ${n.slice(i,s)}`.replace(Py," ")}l();l();l();var he=class{constructor(t,r,n,i){g(this,"start");g(this,"end");g(this,"component");g(this,"parent");g(this,"type");g(this,"prev");g(this,"next");g(this,"can_use_innerhtml");g(this,"is_static_content");g(this,"var");g(this,"attributes",[]);this.start=i.start,this.end=i.end,this.type=i.type,Object.defineProperties(this,{component:{value:t},parent:{value:r}}),this.can_use_innerhtml=!0,this.is_static_content=!0}cannot_use_innerhtml(){this.can_use_innerhtml!==!1&&(this.can_use_innerhtml=!1,this.parent&&this.parent.cannot_use_innerhtml())}not_static_content(){this.is_static_content=!1,this.parent&&this.parent.not_static_content()}find_nearest(t){if(t.test(this.type))return this;if(this.parent)return this.parent.find_nearest(t)}get_static_attribute_value(t){let r=this.attributes.find(n=>n.type==="Attribute"&&n.name.toLowerCase()===t);return r?r.is_true?!0:r.chunks.length===0?"":r.chunks.length===1&&r.chunks[0].type==="Text"?r.chunks[0].data:null:null}has_ancestor(t){return this.parent?this.parent.type===t||this.parent.has_ancestor(t):!1}};l();var ae={tag_option_deprecated:{code:"tag-option-deprecated",message:"'tag' option is deprecated \u2014 use 'customElement' instead"},unused_export_let:(e,t)=>({code:"unused-export-let",message:`${e} has unused export property '${t}'. If it is for external reference only, please consider using \`export const ${t}\``}),module_script_reactive_declaration:{code:"module-script-reactive-declaration",message:"$: has no effect in a module script"},non_top_level_reactive_declaration:{code:"non-top-level-reactive-declaration",message:"$: has no effect outside of the top-level"},module_script_variable_reactive_declaration:e=>({code:"module-script-reactive-declaration",message:`${e.map(t=>`"${t}"`).join(", ")} ${e.length>1?"are":"is"} declared in a module script and will not be reactive`}),missing_declaration:(e,t)=>({code:"missing-declaration",message:`'${e}' is not defined`+(t?"":`. Consider adding a <script> block with 'export let ${e}' to declare a prop`)}),missing_custom_element_compile_options:{code:"missing-custom-element-compile-options",message:"The 'customElement' option is used when generating a custom element. Did you forget the 'customElement: true' compile option?"},css_unused_selector:e=>({code:"css-unused-selector",message:`Unused CSS selector "${e}"`}),empty_block:{code:"empty-block",message:"Empty block"},reactive_component:e=>({code:"reactive-component",message:`<${e}/> will not be reactive if ${e} changes. Use <svelte:component this={${e}}/> if you want this reactivity.`}),component_name_lowercase:e=>({code:"component-name-lower
|
||
|
return ${Y}(${H}, ...args);
|
||
|
}`:_`function ${w}() {
|
||
|
return ${Y}(${H});
|
||
|
}`;return{deps:C,func_declaration:P}};if(u.type==="ConstTag")if(p.size===0){let C=o;we(m,{enter(R,E){if(s.has(R)&&(C=s.get(R)),R.type==="Identifier"&&pt(R,E)){if(C.has(R.name))return;this.replace(t.renderer.reference(R,r))}},leave(R){s.has(R)&&(C=C.parent)}})}else{let{func_declaration:C}=$();this.replace(C[0])}else if(d.size===0&&p.size===0)n.fully_hoisted.push(b),this.replace(w),n.add_var(m,{name:w.name,internal:!0,hoistable:!0,referenced:!0});else if(p.size===0)n.partly_hoisted.push(b),t.renderer.add_to_context(w.name),this.replace(t.renderer.reference(w));else{let{deps:C,func_declaration:R}=$();if(u.type==="Attribute"&&u.parent.name==="slot"){let E=new Set(C.map(P=>a.get_owner(P))),H=u.parent;for(;H&&!E.has(H);)H=H.parent;let Y=R[0];if(H.type==="SlotTemplate")this.replace(Y);else{let P=n.get_unique_name(w.name+"_func");t.renderer.add_to_context(P.name,!0),we(Y,{enter(j){j.type==="Identifier"&&j.name==="#ctx"&&(j.name="child_ctx")}}),a.get_owner(C[0]).contexts.push({type:"DestructuredVariable",key:P,modifier:()=>Y,default_modifier:j=>j}),this.replace(t.renderer.reference(P))}}else i.push(R)}c=null,d=null,p=null,y&&y.type==="Property"&&(y.method=!1)}if(m.type==="AssignmentExpression"||m.type==="UpdateExpression"){let w=m.type==="AssignmentExpression"?m.left:m.argument,b=rt(w).name;if(o.has(b))return;let $=new Set(Ye(w)),C=new Set;$.forEach(E=>{let H=a.dependencies_for_name.get(E);H?H.forEach(Y=>C.add(Y)):C.add(E)});let R=t.bindings.get(b);if(R){let{snippet:E,object:H,property:Y}=R,P=Os(w,E);m.type==="AssignmentExpression"?m.left=P:m.argument=P,p.add(H.name),p.add(Y.name)}this.replace(Ii(t.renderer,o,m,C))}}});return i.length>0&&(t.maintain_context=!0,i.forEach(m=>{t.chunks.init.push(m)})),this.manipulated=f}};function ZL(e,t){return t.type==="EventHandler"?`${t.name}_handler`:t.type==="Action"?`${t.name}_function`:"func"}l();function Wt({contexts:e,node:t,modifier:r=o=>o,default_modifier:n=o=>o,scope:i,component:s,context_rest_properties:a,in_rest_element:u=!1}){if(t){if(t.type==="Identifier")e.push({type:"DestructuredVariable",key:t,modifier:r,default_modifier:n}),u&&a.set(t.name,t),s.used_names.add(t.name);else if(t.type==="ArrayPattern")t.elements.forEach((o,c)=>{if(o)if(o.type==="RestElement")Wt({contexts:e,node:o.argument,modifier:d=>v`${r(d)}.slice(${c})`,default_modifier:n,scope:i,component:s,context_rest_properties:a,in_rest_element:!0});else if(o.type==="AssignmentPattern"){let d=e.length;q0(o.right,i,s),Wt({contexts:e,node:o.left,modifier:p=>v`${r(p)}[${c}]`,default_modifier:(p,f)=>v`${p} !== undefined ? ${p} : ${A0(e,d,o.right,f)}`,scope:i,component:s,context_rest_properties:a,in_rest_element:u})}else Wt({contexts:e,node:o,modifier:d=>v`${r(d)}[${c}]`,default_modifier:n,scope:i,component:s,context_rest_properties:a,in_rest_element:u});else return});else if(t.type==="ObjectPattern"){let o=[];t.properties.forEach(c=>{if(c.type==="RestElement")Wt({contexts:e,node:c.argument,modifier:d=>v`@object_without_properties(${r(d)}, [${o}])`,default_modifier:n,scope:i,component:s,context_rest_properties:a,in_rest_element:!0});else if(c.type==="Property"){let d=c.key,p=c.value,f;if(c.computed){let m=s.get_unique_name("computed_property");e.push({type:"ComputedProperty",property_name:m,key:d}),f=y=>v`${r(y)}[${m}]`,o.push(v`${m}`)}else if(d.type==="Identifier"){let m=d.name;f=y=>v`${r(y)}.${m}`,o.push(v`"${m}"`)}else if(d.type==="Literal"){let m=d.value;f=y=>v`${r(y)}["${m}"]`,o.push(v`"${m}"`)}if(p.type==="AssignmentPattern"){let m=e.length;q0(p.right,i,s),Wt({contexts:e,node:p.left,modifier:f,default_modifier:(y,w)=>v`${y} !== undefined ? ${y} : ${A0(e,m,p.right,w)}`,scope:i,component:s,context_rest_properties:a,in_rest_element:u})}else Wt({contexts:e,node:p,modifier:f,default_modifier:n,scope:i,component:s,context_rest_properties:a,in_rest_element:u})}})}}}function A0(e,t,r,n){let i=s=>{for(let a=t;a<e.length;a++){let u=e[a];if(u.type!=="DestructuredVariable")continue;let{key:o}=u;if(s.name===o.name)throw new Error(`Cannot access '${s.name}' before initialization`)}return n(s.name)};return r.type==="Identifier"?i
|
||
|
function ${i}(#ctx) {
|
||
|
${r}
|
||
|
${n}
|
||
|
}
|
||
|
`),this.block.chunks.declarations.push(_`${i}(#ctx)`),this.block.has_update_method&&this.block.chunks.update.unshift(_`${i}(#ctx)`)}},va=class extends ke{constructor(r,n,i,s,a,u){super(r,n,i,s);g(this,"pending");g(this,"then");g(this,"catch");g(this,"var",{type:"Identifier",name:"await_block"});n.add_dependencies(this.node.expression.dependencies);let o=!1,c=!1,d=!1;["pending","then","catch"].forEach(p=>{let f=this.node[p],m=new av(p,r,n,this,f,a,u);r.blocks.push(m.block),m.is_dynamic&&(o=!0,n.add_dependencies(m.block.dependencies)),m.block.has_intros&&(c=!0),m.block.has_outros&&(d=!0),this[p]=m}),["pending","then","catch"].forEach(p=>{this[p].block.has_update_method=o,this[p].block.has_intro_method=c,this[p].block.has_outro_method=d}),d&&n.add_outro()}render(r,n,i){let s=this.get_or_create_anchor(r,n,i),a=this.get_update_mount_node(s),u=this.node.expression.manipulate(r),o=r.get_unique_name("info"),c=r.get_unique_name("promise");r.add_variable(c),r.maintain_context=!0;let d=v`{
|
||
|
ctx: #ctx,
|
||
|
current: null,
|
||
|
token: null,
|
||
|
hasCatch: ${this.catch.node.start!==null?"true":"false"},
|
||
|
pending: ${this.pending.block.name},
|
||
|
then: ${this.then.block.name},
|
||
|
catch: ${this.catch.block.name},
|
||
|
value: ${this.then.value_index},
|
||
|
error: ${this.catch.value_index},
|
||
|
blocks: ${this.pending.block.has_outro_method&&v`[,,,]`}
|
||
|
}`;r.chunks.init.push(_`
|
||
|
let ${o} = ${d};
|
||
|
`),r.chunks.init.push(_`
|
||
|
@handle_promise(${c} = ${u}, ${o});
|
||
|
`),r.chunks.create.push(_`
|
||
|
${o}.block.c();
|
||
|
`),i&&this.renderer.options.hydratable&&r.chunks.claim.push(_`
|
||
|
${o}.block.l(${i});
|
||
|
`);let p=n||"#target",f=n?"null":"#anchor",m=this.pending.block.has_intro_method||this.pending.block.has_outro_method;r.chunks.mount.push(_`
|
||
|
${o}.block.m(${p}, ${o}.anchor = ${f});
|
||
|
${o}.mount = () => ${a};
|
||
|
${o}.anchor = ${s};
|
||
|
`),m&&r.chunks.intro.push(_`@transition_in(${o}.block);`);let y=this.node.expression.dynamic_dependencies(),w=_`@update_await_block_branch(${o}, #ctx, #dirty)`;if(y.length>0){let b=v`
|
||
|
${r.renderer.dirty(y)} &&
|
||
|
${c} !== (${c} = ${u}) &&
|
||
|
@handle_promise(${c}, ${o})`;r.chunks.update.push(_`${o}.ctx = #ctx;`),this.pending.block.has_update_method?r.chunks.update.push(_`
|
||
|
if (${b}) {
|
||
|
|
||
|
} else {
|
||
|
${w}
|
||
|
}
|
||
|
`):r.chunks.update.push(_`
|
||
|
${b}
|
||
|
`)}else this.pending.block.has_update_method&&r.chunks.update.push(_`
|
||
|
${w}
|
||
|
`);this.pending.block.has_outro_method&&r.chunks.outro.push(_`
|
||
|
for (let #i = 0; #i < 3; #i += 1) {
|
||
|
const block = ${o}.blocks[#i];
|
||
|
@transition_out(block);
|
||
|
}
|
||
|
`),r.chunks.destroy.push(_`
|
||
|
${o}.block.d(${n?null:"detaching"});
|
||
|
${o}.token = null;
|
||
|
${o} = null;
|
||
|
`),[this.pending,this.then,this.catch].forEach(b=>{b.render(b.block,null,v`#nodes`)})}};l();l();var Sh=v`true`,Eh=v`false`,Ot=class{constructor(t,r){g(this,"node");g(this,"parent");this.node=t,this.parent=r,t.expression||(this.parent.renderer.add_to_context(t.handler_name.name),this.parent.renderer.component.partly_hoisted.push(_`
|
||
|
function ${t.handler_name.name}(event) {
|
||
|
@bubble.call(this, $$self, event);
|
||
|
}
|
||
|
`))}get_snippet(t){let r=this.node.expression?this.node.expression.manipulate(t):t.renderer.reference(this.node.handler_name);return this.node.reassigned?(t.maintain_context=!0,v`function () { if (@is_function(${r})) ${r}.apply(this, arguments); }`):r}render(t,r){let n=this.get_snippet(t);this.node.modifiers.has("preventDefault")&&(n=v`@prevent_default(${n})`),this.node.modifiers.has("stopPropagation")&&(n=v`@stop_propagation(${n})`),this.node.modifiers.has("stopImmediatePropagation")&&(n=v`@stop_immediate_propagation(${n})`),this.node.modifiers.has("self")&&(n=v`@self(${n})`),this.node.modifiers.has("trusted")&&(n=v`@trusted(${n})`);let i=[],s=["nonpassive","passive","once","capture"].filter(a=>this.node.modifiers.has(a));s.length?s.length===1&&s[0]==="capture"?i.push(Sh):i.push(v`{ ${s.map(a=>a==="nonpassive"?qe`passive: false`:qe`${a}: true`)} }`):t.renderer.options.dev&&i.push(Eh),t.renderer.options.dev&&(i.push(this.node.modifiers.has("preventDefault")?Sh:Eh),i.push(this.node.modifiers.has("stopPropagation")?Sh:Eh),i.push(this.node.modifiers.has("stopImmediatePropagation")?Sh:Eh)),t.event_listeners.push(v`@listen(${r}, "${this.node.name}", ${n}, ${i})`)}};l();function zn(e,t,r){r.forEach(n=>ov(e,t,n))}function ov(e,t,r){r.render(e,t)}l();function Gn(e,t,r){r.forEach(n=>lv(e,t,n))}var hz=/[^a-zA-Z0-9_$]/g;function lv(e,t,r){let{expression:n,template_scope:i}=r,s,a;n&&(s=n.manipulate(e),a=n.dynamic_dependencies());let u=e.get_unique_name(`${r.name.replace(hz,"_")}_action`);e.add_variable(u);let[o,...c]=r.name.split("."),d=Ns(r.component,i,o)?e.renderer.reference(o):o;if(c.length){let p=c.reduce((f,m)=>v`${f}.${m}`,d);e.event_listeners.push(v`@action_destroyer(${u} = ${p}(${t}, ${s}))`)}else e.event_listeners.push(v`@action_destroyer(${u} = ${d}.call(null, ${t}, ${s}))`);if(a&&a.length>0){let p=v`${u} && @is_function(${u}.update)`;a.length>0&&(p=v`${p} && ${e.renderer.dirty(a)}`),e.chunks.update.push(_`if (${p}) ${u}.update.call(null, ${s});`)}}var ya=class extends ke{constructor(r,n,i,s){super(r,n,i,s);g(this,"handlers");this.handlers=this.node.handlers.map(a=>new Ot(a,this))}render(r,n,i){zn(r,v`@_document.body`,this.handlers),Gn(r,v`@_document.body`,this.node.actions)}};l();var ba=class extends ke{constructor(t,r,n,i,s,a){super(t,r,n,i)}render(t,r,n){let{renderer:i}=this,{component:s}=i;if(!i.options.dev)return;let{var_lookup:a}=s,u=s.locate(this.node.start+1),o={line:u.line,column:u.column+6},c={start:u,end:o},d={type:"DebuggerStatement",loc:c};if(this.node.expressions.length===0)t.chunks.create.push(d),t.chunks.update.push(d);else{let p={type:"Identifier",name:"log",loc:c},f=new Set;this.node.expressions.forEach(b=>{Je(f,b.dependencies)});let m=this.node.expressions.filter(b=>{let $=a.get(b.node.name);return!($&&$.hoistable)}).map(b=>b.node.name),y=this.node.expressions.map(b=>qe`${b.node.name}`),w=_`
|
||
|
${m.map(b=>_`const ${b} = ${i.reference(b)};`)}
|
||
|
@_console.${p}({ ${y} });
|
||
|
debugger;`;if(f.size){let b=i.dirty(Array.from(f));t.chunks.update.push(_`
|
||
|
if (${b}) {
|
||
|
${w}
|
||
|
}
|
||
|
`)}t.chunks.create.push(_`{
|
||
|
${w}
|
||
|
}`)}}};l();var fz={fullscreenElement:["fullscreenchange"],visibilityState:["visibilitychange"]},mz=new Set(["fullscreenElement","visibilityState"]),xa=class extends ke{constructor(r,n,i,s){super(r,n,i,s);g(this,"handlers");this.handlers=this.node.handlers.map(a=>new Ot(a,this))}render(r,n,i){let{renderer:s}=this,{component:a}=s,u={},o={};zn(r,v`@_document`,this.handlers),Gn(r,v`@_document`,this.node.actions),this.node.bindings.forEach(c=>{let d=c.expression.node.name;mz.has(c.name)&&s.readonly.add(d),o[c.name]=d;let p=fz[c.name],f=c.name;p.forEach(m=>{u[m]||(u[m]=[]),u[m].push({name:d,value:f})})}),Object.keys(u).forEach(c=>{let d=r.get_unique_name(`ondocument${c}`),p=u[c];s.add_to_context(d.name);let f=s.reference(d.name);p.forEach(m=>{s.meta_bindings.push(_`this._state.${m.name} = @_document.${m.value};`)}),r.event_listeners.push(v`
|
||
|
@listen(@_document, "${c}", ${f})
|
||
|
`),a.partly_hoisted.push(_`
|
||
|
function ${d}() {
|
||
|
${p.map(m=>s.invalidate(m.name,v`${m.name} = @_document.${m.value}`))}
|
||
|
}
|
||
|
`),r.chunks.init.push(_`
|
||
|
@add_render_callback(${f});
|
||
|
`),a.has_reactive_assignments=!0})}};l();var uv=class extends ke{constructor(r,n,i,s,a,u){super(r,n,i,s);g(this,"block");g(this,"fragment");g(this,"is_dynamic");g(this,"var",null);tn(r,this.node.const_tags),this.block=n.child({comment:St(s,this.renderer.component),name:this.renderer.component.get_unique_name("create_else_block"),type:"else"}),this.fragment=new nt(r,this.block,this.node.children,i,a,u),this.is_dynamic=this.block.dependencies.size>0}},wa=class extends ke{constructor(r,n,i,s,a,u){super(r,n,i,s);g(this,"block");g(this,"fragment");g(this,"else");g(this,"vars");g(this,"context_props");g(this,"index_name");g(this,"updates",[]);g(this,"dependencies");g(this,"var",{type:"Identifier",name:"each"});let{dependencies:o}=s.expression;n.add_dependencies(o),this.node.contexts.forEach(C=>{C.type==="DestructuredVariable"&&r.add_to_context(C.key.name,!0)}),tn(r,this.node.const_tags),this.block=n.child({comment:St(this.node,this.renderer.component),name:r.component.get_unique_name("create_each_block"),type:"each",key:s.key,bindings:new Map(n.bindings)}),this.block.has_animation=this.node.has_animation,this.index_name=this.node.index?{type:"Identifier",name:this.node.index}:r.component.get_unique_name(`${this.node.context}_index`);let c=s.expression.node.type==="ArrayExpression"&&s.expression.node.elements.every(C=>C.type!=="SpreadElement")?s.expression.node.elements.length:null,d=this.node.start+2;for(;r.component.source[d]!=="e";)d+=1;let p=r.component.locate(d),f={line:p.line,column:p.column+4},m={type:"Identifier",name:"length",loc:{start:p,end:f}},y=r.component.get_unique_name(`${this.var.name}_value`),w=n.get_unique_name(`${this.var.name}_blocks`);r.add_to_context(y.name,!0),r.add_to_context(this.index_name.name,!0),this.vars={create_each_block:this.block.name,each_block_value:y,get_each_context:r.component.get_unique_name(`get_${this.var.name}_context`),iterations:w,fixed_length:c,data_length:c===null?v`${y}.${m}`:c,view_length:c===null?v`${w}.length`:c};let b=rt(s.expression.node),$=b.type==="Identifier"&&b.name[0]==="$"?b.name.slice(1):null;s.contexts.forEach(C=>{C.type==="DestructuredVariable"&&this.block.bindings.set(C.key.name,{object:this.vars.each_block_value,property:this.index_name,modifier:C.modifier,snippet:C.modifier(v`${this.vars.each_block_value}[${this.index_name}]`),store:$})}),this.node.index&&this.block.get_unique_name(this.node.index),r.blocks.push(this.block),this.fragment=new nt(r,this.block,s.children,this,a,u),this.node.else&&(this.else=new uv(r,n,this,this.node.else,a,u),r.blocks.push(this.else.block),this.else.is_dynamic&&this.block.add_dependencies(this.else.block.dependencies)),n.add_dependencies(this.block.dependencies),(this.block.has_outros||this.else&&this.else.block.has_outros)&&n.add_outro()}render(r,n,i){if(this.fragment.nodes.length===0)return;let{renderer:s}=this,{component:a}=s,u=this.next?!this.next.is_dom_node():!n||!this.parent.is_dom_node(),o=v`@ensure_array_like(${this.node.expression.manipulate(r)})`;r.chunks.init.push(_`let ${this.vars.each_block_value} = ${o};`);let c={type:"Identifier",name:n?"null":"#anchor"},d=n||{type:"Identifier",name:"#target"},p=u?r.get_unique_name(`${this.var.name}_anchor`):this.next&&this.next.var||{type:"Identifier",name:"null"},f=this.get_update_mount_node(p),m={block:r,parent_node:n,parent_nodes:i,snippet:o,initial_anchor_node:c,initial_mount_node:d,update_anchor_node:p,update_mount_node:f},y=new Set(this.block.dependencies);if(this.node.expression.dynamic_dependencies().forEach(w=>{y.add(w)}),this.node.key&&this.node.key.dynamic_dependencies().forEach(w=>{y.add(w)}),this.dependencies=y,this.node.key?this.render_keyed(m):this.render_unkeyed(m),(this.block.has_intro_method||this.block.has_outro_method)&&r.chunks.intro.push(_`
|
||
|
for (let #i = 0; #i < ${this.vars.data_length}; #i += 1) {
|
||
|
@transition_in(${this.vars.iterations}[#i]);
|
||
|
}
|
||
|
`),u&&r.add_element(p,v`@empty()`,i&&v`@empty()`,n),this.else){let w=v`#ctx`;if(this.else.node.const_tags.length>0){let R=this.renderer.component.get_unique_name("get_else_ctx");this.renderer.blocks.push(_`
|
||
|
function ${R}(#ctx) {
|
||
|
const child_ctx = #ctx.slice();
|
||
|
${en(r,this.else.node.const_tags,"child_ctx")}
|
||
|
return child_ctx;
|
||
|
}
|
||
|
`),w=v`${R}(#ctx)`}let b=a.get_unique_name(`${this.var.name}_else`);r.chunks.init.push(_`let ${b} = null;`),r.chunks.init.push(_`
|
||
|
if (!${this.vars.data_length}) {
|
||
|
${b} = ${this.else.block.name}(${w});
|
||
|
}
|
||
|
`),r.chunks.create.push(_`
|
||
|
if (${b}) {
|
||
|
${b}.c();
|
||
|
}
|
||
|
`),this.renderer.options.hydratable&&r.chunks.claim.push(_`
|
||
|
if (${b}) {
|
||
|
${b}.l(${i});
|
||
|
}
|
||
|
`),r.chunks.mount.push(_`
|
||
|
if (${b}) {
|
||
|
${b}.m(${d}, ${c});
|
||
|
}
|
||
|
`);let $=!!(this.else.block.has_intro_method||this.else.block.has_outro_method),C=this.else.block.has_outro_method?_`
|
||
|
@group_outros();
|
||
|
@transition_out(${b}, 1, 1, () => {
|
||
|
${b} = null;
|
||
|
});
|
||
|
@check_outros();`:_`
|
||
|
${b}.d(1);
|
||
|
${b} = null;`;this.else.block.has_update_method?this.updates.push(_`
|
||
|
if (!${this.vars.data_length} && ${b}) {
|
||
|
${b}.p(${w}, #dirty);
|
||
|
} else if (!${this.vars.data_length}) {
|
||
|
${b} = ${this.else.block.name}(${w});
|
||
|
${b}.c();
|
||
|
${$&&_`@transition_in(${b}, 1);`}
|
||
|
${b}.m(${f}, ${p});
|
||
|
} else if (${b}) {
|
||
|
${C};
|
||
|
}
|
||
|
`):this.updates.push(_`
|
||
|
if (${this.vars.data_length}) {
|
||
|
if (${b}) {
|
||
|
${C};
|
||
|
}
|
||
|
} else if (!${b}) {
|
||
|
${b} = ${this.else.block.name}(${w});
|
||
|
${b}.c();
|
||
|
${$&&_`@transition_in(${b}, 1);`}
|
||
|
${b}.m(${f}, ${p});
|
||
|
}
|
||
|
`),r.chunks.destroy.push(_`
|
||
|
if (${b}) ${b}.d(${n?"":"detaching"});
|
||
|
`)}this.updates.length&&r.chunks.update.push(_`
|
||
|
if (${r.renderer.dirty(Array.from(y))}) {
|
||
|
${this.updates}
|
||
|
}
|
||
|
`),this.fragment.render(this.block,null,v`#nodes`),this.else&&this.else.fragment.render(this.else.block,null,v`#nodes`),this.context_props=this.node.contexts.map(w=>{if(w.type==="DestructuredVariable"){let b=$=>s.context_lookup.has($)?v`child_ctx[${s.context_lookup.get($).index}]`:{type:"Identifier",name:$};return _`child_ctx[${s.context_lookup.get(w.key.name).index}] = ${w.default_modifier(w.modifier(v`list[i]`),b)};`}else{let b=new ye(this.renderer.component,this.node,this.node.scope,w.key);return _`const ${w.property_name} = ${b.manipulate(r,"child_ctx")};`}}),this.node.has_binding&&this.context_props.push(_`child_ctx[${s.context_lookup.get(this.vars.each_block_value.name).index}] = list;`),(this.node.has_binding||this.node.has_index_binding||this.node.index)&&this.context_props.push(_`child_ctx[${s.context_lookup.get(this.index_name.name).index}] = i;`),s.blocks.push(_`
|
||
|
function ${this.vars.get_each_context}(#ctx, list, i) {
|
||
|
const child_ctx = #ctx.slice();
|
||
|
${this.context_props}
|
||
|
${en(this.block,this.node.const_tags,"child_ctx")}
|
||
|
return child_ctx;
|
||
|
}
|
||
|
`)}render_keyed({block:r,parent_node:n,parent_nodes:i,snippet:s,initial_anchor_node:a,initial_mount_node:u,update_anchor_node:o,update_mount_node:c}){let{create_each_block:d,iterations:p,data_length:f,view_length:m}=this.vars,y=r.get_unique_name("get_key"),w=r.get_unique_name(`${this.var.name}_lookup`);r.add_variable(p,v`[]`),r.add_variable(w,v`new @_Map()`),this.fragment.nodes[0].is_dom_node()?this.block.first=this.fragment.nodes[0].var:(this.block.first=this.block.get_unique_name("first"),this.block.add_element(this.block.first,v`@empty()`,i&&v`@empty()`,null)),r.chunks.init.push(_`
|
||
|
const ${y} = #ctx => ${this.node.key.manipulate(r)};
|
||
|
|
||
|
${this.renderer.options.dev&&_`@validate_each_keys(#ctx, ${this.vars.each_block_value}, ${this.vars.get_each_context}, ${y});`}
|
||
|
for (let #i = 0; #i < ${f}; #i += 1) {
|
||
|
let child_ctx = ${this.vars.get_each_context}(#ctx, ${this.vars.each_block_value}, #i);
|
||
|
let key = ${y}(child_ctx);
|
||
|
${w}.set(key, ${p}[#i] = ${d}(key, child_ctx));
|
||
|
}
|
||
|
`),r.chunks.create.push(_`
|
||
|
for (let #i = 0; #i < ${m}; #i += 1) {
|
||
|
${p}[#i].c();
|
||
|
}
|
||
|
`),i&&this.renderer.options.hydratable&&r.chunks.claim.push(_`
|
||
|
for (let #i = 0; #i < ${m}; #i += 1) {
|
||
|
${p}[#i].l(${i});
|
||
|
}
|
||
|
`),r.chunks.mount.push(_`
|
||
|
for (let #i = 0; #i < ${m}; #i += 1) {
|
||
|
if (${p}[#i]) {
|
||
|
${p}[#i].m(${u}, ${a});
|
||
|
}
|
||
|
}
|
||
|
`);let b=this.block.has_update_method,$=this.node.has_animation?this.block.has_outros?"@fix_and_outro_and_destroy_block":"@fix_and_destroy_block":this.block.has_outros?"@outro_and_destroy_block":"@destroy_block";this.dependencies.size&&(this.block.maintain_context=!0,this.updates.push(_`
|
||
|
${this.vars.each_block_value} = ${s};
|
||
|
|
||
|
${this.block.has_outros&&_`@group_outros();`}
|
||
|
${this.node.has_animation&&_`for (let #i = 0; #i < ${m}; #i += 1) ${p}[#i].r();`}
|
||
|
${this.renderer.options.dev&&_`@validate_each_keys(#ctx, ${this.vars.each_block_value}, ${this.vars.get_each_context}, ${y});`}
|
||
|
${p} = @update_keyed_each(${p}, #dirty, ${y}, ${b?1:0}, #ctx, ${this.vars.each_block_value}, ${w}, ${c}, ${$}, ${d}, ${o}, ${this.vars.get_each_context});
|
||
|
${this.node.has_animation&&_`for (let #i = 0; #i < ${m}; #i += 1) ${p}[#i].a();`}
|
||
|
${this.block.has_outros&&_`@check_outros();`}
|
||
|
`)),this.block.has_outros&&r.chunks.outro.push(_`
|
||
|
for (let #i = 0; #i < ${m}; #i += 1) {
|
||
|
@transition_out(${p}[#i]);
|
||
|
}
|
||
|
`),r.chunks.destroy.push(_`
|
||
|
for (let #i = 0; #i < ${m}; #i += 1) {
|
||
|
${p}[#i].d(${n?null:"detaching"});
|
||
|
}
|
||
|
`)}render_unkeyed({block:r,parent_nodes:n,snippet:i,initial_anchor_node:s,initial_mount_node:a,update_anchor_node:u,update_mount_node:o}){let{create_each_block:c,iterations:d,fixed_length:p,data_length:f,view_length:m}=this.vars;if(r.chunks.init.push(_`
|
||
|
let ${d} = [];
|
||
|
|
||
|
for (let #i = 0; #i < ${f}; #i += 1) {
|
||
|
${d}[#i] = ${c}(${this.vars.get_each_context}(#ctx, ${this.vars.each_block_value}, #i));
|
||
|
}
|
||
|
`),r.chunks.create.push(_`
|
||
|
for (let #i = 0; #i < ${m}; #i += 1) {
|
||
|
${d}[#i].c();
|
||
|
}
|
||
|
`),n&&this.renderer.options.hydratable&&r.chunks.claim.push(_`
|
||
|
for (let #i = 0; #i < ${m}; #i += 1) {
|
||
|
${d}[#i].l(${n});
|
||
|
}
|
||
|
`),r.chunks.mount.push(_`
|
||
|
for (let #i = 0; #i < ${m}; #i += 1) {
|
||
|
if (${d}[#i]) {
|
||
|
${d}[#i].m(${a}, ${s});
|
||
|
}
|
||
|
}
|
||
|
`),this.dependencies.size){let y=!!(this.block.has_intro_method||this.block.has_outro_method),w=this.block.has_update_method?_`
|
||
|
if (${d}[#i]) {
|
||
|
${d}[#i].p(child_ctx, #dirty);
|
||
|
${y&&_`@transition_in(${this.vars.iterations}[#i], 1);`}
|
||
|
} else {
|
||
|
${d}[#i] = ${c}(child_ctx);
|
||
|
${d}[#i].c();
|
||
|
${y&&_`@transition_in(${this.vars.iterations}[#i], 1);`}
|
||
|
${d}[#i].m(${o}, ${u});
|
||
|
}
|
||
|
`:y?_`
|
||
|
if (${d}[#i]) {
|
||
|
@transition_in(${this.vars.iterations}[#i], 1);
|
||
|
} else {
|
||
|
${d}[#i] = ${c}(child_ctx);
|
||
|
${d}[#i].c();
|
||
|
@transition_in(${this.vars.iterations}[#i], 1);
|
||
|
${d}[#i].m(${o}, ${u});
|
||
|
}
|
||
|
`:_`
|
||
|
if (!${d}[#i]) {
|
||
|
${d}[#i] = ${c}(child_ctx);
|
||
|
${d}[#i].c();
|
||
|
${d}[#i].m(${o}, ${u});
|
||
|
}
|
||
|
`,b=this.block.has_update_method?0:"#old_length",$;if(this.block.has_outros){let R=r.get_unique_name("out");r.chunks.init.push(_`
|
||
|
const ${R} = i => @transition_out(${d}[i], 1, 1, () => {
|
||
|
${d}[i] = null;
|
||
|
});
|
||
|
`),$=_`
|
||
|
@group_outros();
|
||
|
for (#i = ${f}; #i < ${m}; #i += 1) {
|
||
|
${R}(#i);
|
||
|
}
|
||
|
@check_outros();
|
||
|
`}else $=_`
|
||
|
for (${this.block.has_update_method?null:v`#i = ${f}`}; #i < ${this.block.has_update_method?m:"#old_length"}; #i += 1) {
|
||
|
${d}[#i].d(1);
|
||
|
}
|
||
|
${!p&&_`${m} = ${f};`}
|
||
|
`;let C=_`
|
||
|
${!this.block.has_update_method&&_`const #old_length = ${this.vars.each_block_value}.length;`}
|
||
|
${this.vars.each_block_value} = ${i};
|
||
|
|
||
|
let #i;
|
||
|
for (#i = ${b}; #i < ${f}; #i += 1) {
|
||
|
const child_ctx = ${this.vars.get_each_context}(#ctx, ${this.vars.each_block_value}, #i);
|
||
|
|
||
|
${w}
|
||
|
}
|
||
|
|
||
|
${$}
|
||
|
`;this.updates.push(C)}this.block.has_outros&&r.chunks.outro.push(_`
|
||
|
${d} = ${d}.filter(@_Boolean);
|
||
|
for (let #i = 0; #i < ${m}; #i += 1) {
|
||
|
@transition_out(${d}[#i]);
|
||
|
}
|
||
|
`),r.chunks.destroy.push(_`@destroy_each(${d}, detaching);`)}};l();l();var yn=class extends ke{constructor(r,n,i,s,a){super(r,n,i,s);g(this,"_data");g(this,"skip");g(this,"var");this.skip=this.node.should_skip(),this._data=a,this.var=this.skip?null:v`t`}use_space(){return this.node.use_space()}set data(r){this.node.data=this._data=r}get data(){return this._data}render(r,n,i){if(this.skip)return;let s=this.use_space(),a={type:"Literal",value:this.data,loc:{start:this.renderer.locate(this.node.start),end:this.renderer.locate(this.node.end)}};r.add_element(this.var,s?v`@space()`:v`@text(${a})`,i&&(s?v`@claim_space(${i})`:v`@claim_text(${i}, ${a})`),n)}};l();var _z="accent-height accumulate additive alignment-baseline allowReorder alphabetic amplitude arabic-form ascent attributeName attributeType autoReverse azimuth baseFrequency baseline-shift baseProfile bbox begin bias by calcMode cap-height class clip clipPathUnits clip-path clip-rule color color-interpolation color-interpolation-filters color-profile color-rendering contentScriptType contentStyleType cursor cx cy d decelerate descent diffuseConstant direction display divisor dominant-baseline dur dx dy edgeMode elevation enable-background end exponent externalResourcesRequired fill fill-opacity fill-rule filter filterRes filterUnits flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight format from fr fx fy g1 g2 glyph-name glyph-orientation-horizontal glyph-orientation-vertical glyphRef gradientTransform gradientUnits hanging height href horiz-adv-x horiz-origin-x id ideographic image-rendering in in2 intercept k k1 k2 k3 k4 kernelMatrix kernelUnitLength kerning keyPoints keySplines keyTimes lang lengthAdjust letter-spacing lighting-color limitingConeAngle local marker-end marker-mid marker-start markerHeight markerUnits markerWidth mask maskContentUnits maskUnits mathematical max media method min mode name numOctaves offset onabort onactivate onbegin onclick onend onerror onfocusin onfocusout onload onmousedown onmousemove onmouseout onmouseover onmouseup onrepeat onresize onscroll onunload opacity operator order orient orientation origin overflow overline-position overline-thickness panose-1 paint-order pathLength patternContentUnits patternTransform patternUnits pointer-events points pointsAtX pointsAtY pointsAtZ preserveAlpha preserveAspectRatio primitiveUnits r radius refX refY rendering-intent repeatCount repeatDur requiredExtensions requiredFeatures restart result rotate rx ry scale seed shape-rendering slope spacing specularConstant specularExponent speed spreadMethod startOffset stdDeviation stemh stemv stitchTiles stop-color stop-opacity strikethrough-position strikethrough-thickness string stroke stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width style surfaceScale systemLanguage tabindex tableValues target targetX targetY text-anchor text-decoration text-rendering textLength to transform type u1 u2 underline-position underline-thickness unicode unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical values version vert-adv-y vert-origin-x vert-origin-y viewBox viewTarget visibility width widths word-spacing writing-mode x x-height x1 x2 xChannelSelector xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type xml:base xml:lang xml:space y y1 y2 yChannelSelector z zoomAndPan".split(" "),tE=new Map;_z.forEach(e=>{tE.set(e.toLowerCase(),e)});function bn(e){return e=e.toLowerCase(),tE.get(e)||e}l();l();function ka(e,t){let{parent:r}=e;r.node.name==="select"&&(r.select_binding_dependencies=t,t.forEach(n=>{r.renderer.component.indirect_dependencies.set(n,new Set)}))}l();var gz=["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"],Wn=new Set([...gz]);var vz=
|
||
|
${f}
|
||
|
`)):this.is_src?(r.chunks.hydrate.push(_`if (!@src_url_equal(${n.var}.src, ${m})) ${o}(${n.var}, "${i}", ${this.last});`),f=_`${o}(${n.var}, "${i}", ${a?this.last:p});`):this.is_srcset?(r.chunks.hydrate.push(_`if (!@srcset_url_equal(${n.var}, ${m})) ${o}(${n.var}, "${i}", ${this.last});`),f=_`${o}(${n.var}, "${i}", ${a?this.last:p});`):s?(r.chunks.hydrate.push(_`${n.var}.${s} = ${m};`),f=r.renderer.options.dev?_`@prop_dev(${n.var}, "${s}", ${a?this.last:p});`:_`${n.var}.${s} = ${a?this.last:p};`):(r.chunks.hydrate.push(_`${o}(${n.var}, "${i}", ${m});`),f=_`${o}(${n.var}, "${i}", ${a?this.last:p});`),u){let y=_`@set_input_value(${n.var}, ${n.var}.__value);`;r.chunks.hydrate.push(y),f=_`
|
||
|
${f}
|
||
|
${y};
|
||
|
`}if(this.node.name==="value"&&d.length>0&&this.parent.bindings.some(y=>y.node.name==="group")&&(this.parent.dynamic_value_condition=r.get_unique_name("value_has_changed"),r.add_variable(this.parent.dynamic_value_condition,v`false`),f=_`
|
||
|
${f}
|
||
|
${this.parent.dynamic_value_condition} = true;
|
||
|
`),d.length>0){let y=this.get_dom_update_conditions(r,r.renderer.dirty(d));r.chunks.update.push(_`
|
||
|
if (${y}) {
|
||
|
${f}
|
||
|
}`)}i==="autofocus"&&(r.autofocus={element_var:n.var,condition_expression:this.node.is_true?void 0:p})}get_init(r,n){return this.last=this.should_cache&&r.get_unique_name(`${this.parent.var.name}_${this.name.replace(bz,"_")}_value`),this.should_cache&&r.add_variable(this.last),this.should_cache?v`${this.last} = ${n}`:n}get_dom_update_conditions(r,n){let{property_name:i,should_cache:s,last:a}=this,u=this.parent,o=this.get_value(r),c=n;if(s&&(c=this.is_src?v`${c} && (!@src_url_equal(${u.var}.src, (${a} = ${o})))`:v`${c} && (${a} !== (${a} = ${o}))`),this.is_input_value){let d=u.node.get_static_attribute_value("type");d!==!0&&!vz.has(d)&&(c=v`${c} && ${u.var}.${i} !== ${s?a:o}`)}return r.has_outros&&(c=v`!#current || ${c}`),c}get_dependencies(){let r=this.node.get_dependencies(),n=new Set(r);return r.forEach(i=>{let s=this.parent.renderer.component.indirect_dependencies.get(i);s&&s.forEach(a=>{n.add(a)})}),Array.from(n)}get_metadata(){if(this.parent.node.namespace)return null;let r=cv[this.name];return r&&r.applies_to&&!r.applies_to.includes(this.parent.node.name)?null:r}get_value(r){if(this.node.is_true)return this.metadata&&Wn.has(this.metadata.property_name.toLowerCase())?v`true`:v`""`;if(this.node.chunks.length===0)return v`""`;if(this.node.chunks.length===1)return this.node.chunks[0].type==="Text"?Qe(this.node.chunks[0].data):this.node.chunks[0].manipulate(r);let n=this.node.name==="class"?this.get_class_name_text(r):this.render_chunks(r).reduce((i,s)=>v`${i} + ${s}`);return this.node.chunks[0].type!=="Text"&&(n=v`"" + ${n}`),n}get_class_name_text(r){let n=this.node.chunks.some(s=>s.synthetic),i=this.render_chunks(r);return n&&i.length===2&&(i[0]=v`@null_to_empty(${i[0]})`),i.reduce((s,a)=>v`${s} + ${a}`)}render_chunks(r){return this.node.chunks.map(n=>n.type==="Text"?Qe(n.data):n.manipulate(r))}stringify(){if(this.node.is_true)return"";let r=this.node.chunks;return r.length===0?'=""':`="${r.map(n=>n.type==="Text"?n.data.replace(ao,'\\"'):`\${${n.manipulate()}}`).join("")}"`}},cv={allowfullscreen:{property_name:"allowFullscreen",applies_to:["iframe"]},allowpaymentrequest:{property_name:"allowPaymentRequest",applies_to:["iframe"]},async:{applies_to:["script"]},autofocus:{applies_to:["button","input","keygen","select","textarea"]},autoplay:{applies_to:["audio","video"]},checked:{applies_to:["input"]},controls:{applies_to:["audio","video"]},default:{applies_to:["track"]},defer:{applies_to:["script"]},disabled:{applies_to:["button","fieldset","input","keygen","optgroup","option","select","textarea"]},formnovalidate:{property_name:"formNoValidate",applies_to:["button","input"]},hidden:{},indeterminate:{applies_to:["input"]},inert:{},ismap:{property_name:"isMap",applies_to:["img"]},loop:{applies_to:["audio","bgsound","video"]},multiple:{applies_to:["input","select"]},muted:{applies_to:["audio","video"]},nomodule:{property_name:"noModule",applies_to:["script"]},novalidate:{property_name:"noValidate",applies_to:["form"]},open:{applies_to:["details","dialog"]},playsinline:{property_name:"playsInline",applies_to:["video"]},readonly:{property_name:"readOnly",applies_to:["input","textarea"]},required:{applies_to:["input","select","textarea"]},reversed:{applies_to:["ol"]},selected:{applies_to:["option"]},value:{applies_to:["button","option","input","li","meter","progress","param","select","textarea"]}};Object.keys(cv).forEach(e=>{let t=cv[e];t.property_name||(t.property_name=e)});function xz(e){return e.is_src||e.is_srcset||e.node.should_cache()}var wz=/checked|group/;function kz(e){let t=e.parent;return e.name==="value"&&(t.node.name==="option"||t.node.name==="input"&&t.node.bindings.some(r=>wz.test(r.name)))}l();var Ca=class extends Yn{render(t){let r=Cz(this.node.chunks);if(!r)return super.render(t);r.forEach(n=>{let i;if(Rz(n.value)){let s=new Set;if(i=n.value.map(a=>a.type==="Text"?Qe(a.data):(Je(s,a.dynamic_dependencies()),a.manipulate(t))).reduce((a,u)=>v`${a} + ${u}`),s.size){let a=t.renderer.dirty(Array.from(s));t.has_outros&&(a=v`!#current || ${a}`);let u=_`
|
||
|
if (${a}) {
|
||
|
@set_style(${this.parent.var}, "${n.key}", ${i}, ${n.important?1:null});
|
||
|
}`;t.chunks.update.push(u)}}else i=Qe(n.value[0].data);t.chunks.hydrate.push(_`@set_style(${this.parent.var}, "${n.key}", ${i}, ${n.important?1:null});`)})}},$z=/^\s*([\w-]+):\s*/;function Cz(e){let t=[],r=e.slice();for(;r.length;){let n=r[0];if(n.type!=="Text")return null;let i=$z.exec(n.data);if(!i)return null;let s=i[1],a=i.index+i[0].length,u=n.data.slice(a);u?r[0]={start:n.start+a,end:n.end,type:"Text",data:u}:r.shift();let o=Ez(r);t.push({key:s,value:o.value,important:o.important}),r=o.chunks}return t}var rE=/\s*!important\s*$/,Sz=/[;\s]/;function Ez(e){let t=[],r=!1,n=null,i=!1,s=!1;for(;e.length&&!s;){let o=e.shift();if(o.type==="Text"){let c=0;for(;c<o.data.length;){let p=o.data[c];if(i)i=!1;else if(p==="\\")i=!0;else if(p===n)n=null;else if(p==='"'||p==="'")n=p;else if(p===")"&&r)r=!1;else if(p==="u"&&o.data.slice(c,c+4)==="url(")r=!0;else if(p===";"&&!r&&!n){s=!0;break}c+=1}for(c>0&&t.push({type:"Text",start:o.start,end:o.start+c,data:o.data.slice(0,c)});Sz.test(o.data[c]);)c+=1;let d=o.data.slice(c);if(d){e.unshift({start:o.start+c,end:o.end,type:"Text",data:d});break}}else t.push(o)}let a=!1,u=t[t.length-1];return u&&u.type==="Text"&&rE.test(u.data)&&(a=!0,u.data=u.data.replace(rE,""),u.data||t.pop()),{chunks:e,value:t,important:a}}function Rz(e){return e.length>1||e[0].type!=="Text"}l();var rn=class extends $a{};l();l();function Sa(e,t){if(t.expression.references.forEach(r=>{let n=e.node.scope.get_owner(r);n&&(n.has_binding=!0)}),t.name==="group"){let r=n=>{let i=e.node.scope.get_owner(n);if(i.type==="EachBlock"){i.has_index_binding=!0;for(let s of i.expression.contextual_dependencies)r(s)}};for(let n of t.expression.contextual_dependencies)r(n)}}var nn=class{constructor(t,r,n){g(this,"node");g(this,"parent");g(this,"object");g(this,"handler");g(this,"snippet");g(this,"is_readonly");g(this,"needs_lock");g(this,"binding_group");this.node=r,this.parent=n;let{dependencies:i}=this.node.expression;t.add_dependencies(i),ka(this,i),r.is_contextual&&Sa(this.parent,this.node),this.object=rt(this.node.expression.node).name,this.node.name==="group"&&(this.binding_group=Pz(n.renderer,this,t)),this.handler=Az(this,n.renderer,t,this.object,this.node.raw_expression),this.snippet=this.node.expression.manipulate(t),this.is_readonly=this.node.is_readonly,this.needs_lock=this.node.name==="currentTime"}get_dependencies(){let t=new Set(this.node.expression.dependencies);return this.node.expression.dependencies.forEach(r=>{let n=this.parent.renderer.component.indirect_dependencies.get(r);n&&n.forEach(i=>{t.add(i)})}),this.binding_group&&this.binding_group.list_dependencies.forEach(r=>t.add(r)),t}get_update_dependencies(){let t=this.object,r=new Set;this.node.expression.template_scope.names.has(t)?this.node.expression.template_scope.dependencies_for_name.get(t).forEach(i=>r.add(i)):r.add(t);let n=new Set(r);return r.forEach(i=>{let s=this.parent.renderer.component.indirect_dependencies.get(i);s&&s.forEach(a=>{n.add(a)})}),n}is_readonly_media_attribute(){return this.node.is_readonly_media_attribute()}render(t,r){if(this.is_readonly)return;let{parent:n}=this,i=this.needs_lock?[v`!${r}`]:[],s=[],a=null,u=Array.from(this.get_dependencies());if(u.length>0&&i.push(t.renderer.dirty(u)),n.node.name==="input"){let d=n.node.get_static_attribute_value("type");d===null||d===""||d==="text"||d==="email"||d==="password"||d==="search"||d==="url"?i.push(v`${n.var}.${this.node.name} !== ${this.snippet}`):d==="number"&&i.push(v`@to_number(${n.var}.${this.node.name}) !== ${this.snippet}`)}let o=nE(n,this,!1),c=nE(n,this,!0);switch(this.node.name){case"group":{t.renderer.add_to_context("$$binding_groups"),this.binding_group.add_element(t,this.parent.var),this.parent.has_dynamic_value&&(a=this.parent.dynamic_value_condition);break}case"textContent":i.push(v`${this.snippet} !== ${n.var}.textContent`),s.push(v`${this.snippet} !== void 0`);break;case"innerText":i.push(v`${this.snippet} !== ${n.var}.innerText`),s.push(v`${this.snippet} !== void 0`);break;case"innerHTML":i.push(v`${this.snippet} !== ${n.var}.innerHTML`),s.push(v`${this.snippet} !==
|
||
|
if (${d}) {
|
||
|
${o}
|
||
|
}
|
||
|
`)}else t.chunks.update.push(o);if(c)if(s.length>0){let d=s.reduce((p,f)=>v`${p} && ${f}`);t.chunks.mount.push(_`
|
||
|
if (${d}) {
|
||
|
${c}
|
||
|
}
|
||
|
`)}else t.chunks.mount.push(c)}};function nE(e,t,r){let{node:n}=e;if(t.is_readonly_media_attribute()||t.node.name==="this")return null;if(n.name==="select")return n.get_static_attribute_value("multiple")===!0?_`@select_options(${e.var}, ${t.snippet})`:r?_`@select_option(${e.var}, ${t.snippet}, true)`:_`@select_option(${e.var}, ${t.snippet})`;if(t.node.name==="group"){let s=n.get_static_attribute_value("type")==="checkbox"?v`~(${t.snippet} || []).indexOf(${e.var}.__value)`:v`${e.var}.__value === ${t.snippet}`;return _`${e.var}.checked = ${s};`}return t.node.name==="value"?_`@set_input_value(${e.var}, ${t.snippet});`:_`${e.var}.${t.node.name} = ${t.snippet};`}function Pz(e,t,r){let n=t.node,{parts:i}=Ht(n.raw_expression),s=i.join("."),a=[],u=new Set,{template_scope:o}=n.expression,c=p=>{u.add(p);let f=o.get_owner(p);if(f.type==="EachBlock")for(let m of f.expression.contextual_dependencies)c(m)};for(let p of n.expression.contextual_dependencies)c(p);for(let p of u){let f=r.bindings.get(p),m,y;f?(m=f.object.name,y=f.property.name):(m=p,y=p),s=`${m}@${s}`,a.push(y)}if(!e.binding_groups.has(s)){let p=e.binding_groups.size,f=new Set,m=n.parent;for(;m;){if(m.type==="EachBlock")for(let w of m.expression.dynamic_dependencies())f.add(w);m=m.parent}let y=new Map;a.forEach(w=>{e.add_to_context(w,!0)}),e.binding_groups.set(s,{binding_group:()=>{let w=v`$$binding_groups[${p}]`;return a.length>0&&a.forEach(b=>{w=v`${w}[${b}]`}),w},contexts:a,list_dependencies:f,keypath:s,add_element(w,b){y.has(w)||y.set(w,[]),y.get(w).push(b)},render(w){let b=w.get_unique_name("binding_group"),$=w.renderer.reference("$$binding_groups");if(w.add_variable(b),a.length>0){let C={type:"ArrayExpression",elements:a.map(R=>w.renderer.reference(R))};w.chunks.init.push(_`${b} = @init_binding_group_dynamic(${$}[${p}], ${C})`),w.chunks.update.push(_`if (${w.renderer.dirty(Array.from(f))}) ${b}.u(${C})`)}else w.chunks.init.push(_`${b} = @init_binding_group(${$}[${p}])`);w.chunks.hydrate.push(_`${b}.p(${y.get(w)})`),w.chunks.destroy.push(_`${b}.r()`)}})}let d=e.binding_groups.get(s);return r.binding_groups.add(d),d}function Az(e,t,r,n,i){let s=new Set(e.node.expression.contextual_dependencies),a=r.bindings.get(n),u;if(a){let{object:d,property:p,store:f,snippet:m}=a;i=Os(i,m),s.add(d.name),s.add(p.name),s.delete(n),f&&(u=_`${f}.set(${`$${f}`});`)}else{let d=rt(i);if(d.name[0]==="$"){let p=d.name.slice(1);u=_`${p}.set(${d.name});`}}let o=qz(t,e.parent,e,s),c=_`
|
||
|
${i} = ${o};
|
||
|
${u}
|
||
|
`;return{uses_context:e.node.is_contextual||e.node.expression.uses_context,mutation:c,contextual_dependencies:s,lhs:i}}function qz(e,t,r,n){let{node:i}=t,{name:s}=r.node;if(s==="this")return v`$$value`;if(pi.test(s))return v`@ResizeObserverSingleton.entries.get(this)?.${s}`;if(i.name==="select")return i.get_static_attribute_value("multiple")===!0?v`@select_multiple_value(this)`:v`@select_value(this)`;let a=i.get_static_attribute_value("type");if(s==="group"){if(a==="checkbox"){let{binding_group:u,contexts:o}=r.binding_group;return Je(n,o),v`@get_binding_group_value(${u()}, this.__value, this.checked)`}return v`this.__value`}return a==="range"||a==="number"?v`@to_number(this.${s})`:s==="buffered"||s==="seekable"||s==="played"?v`@time_ranges_to_array(this.${s})`:v`this.${s}`}l();l();function Rh(e,t){if(e===t)return!0;if(!e||!t||e.type!==t.type)return!1;switch(e.type){case"Identifier":return e.name===t.name;case"MemberExpression":return Rh(e.object,t.object)&&Rh(e.property,t.property)&&e.computed===t.computed;case"Literal":return e.value===t.value}}function Ea(e,t,r,n){let i=e.get_unique_name(`${n.name}_binding`);t.renderer.add_to_context(i.name);let s=t.renderer.reference(i.name),{contextual_dependencies:a,mutation:u}=r.handler,o=r.get_update_dependencies(),c=_`
|
||
|
${u}
|
||
|
${Array.from(o).filter(d=>d[0]!=="$").filter(d=>!a.has(d)).map(d=>_`${t.renderer.invalidate(d)};`)}
|
||
|
`;if(a.size){let d=Array.from(a).map(b=>({type:"Identifier",name:b}));e.partly_hoisted.push(_`
|
||
|
function ${i}($$value, ${d}) {
|
||
|
@binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
||
|
${c}
|
||
|
});
|
||
|
}
|
||
|
`);let p=new Map,f=[];for(let b of d){let $=t.renderer.reference(b.name),C=!1;if(t.variables.has(b.name)){let R=b.name;for(let E=1;t.variables.has(R)&&!Rh(t.variables.get(R).init,$);R=`${b.name}_${E++}`);p.set(R,b.name),b={type:"Identifier",name:R},C=t.variables.has(R)}f.push(b),C||t.add_variable(b,$)}let m=t.get_unique_name(`assign_${n.name}`),y=t.get_unique_name(`unassign_${n.name}`);t.chunks.init.push(_`
|
||
|
const ${m} = () => ${s}(${n}, ${f});
|
||
|
const ${y} = () => ${s}(null, ${f});
|
||
|
`);let w=Array.from(f).map(b=>v`${b} !== ${t.renderer.reference(p.get(b.name)||b.name)}`).reduce((b,$)=>v`${b} || ${$}`);return t.chunks.update.push(_`
|
||
|
if (${w}) {
|
||
|
${y}();
|
||
|
${f.map(b=>_`${b} = ${t.renderer.reference(p.get(b.name)||b.name)}`)};
|
||
|
${m}();
|
||
|
}`),t.chunks.destroy.push(_`${y}();`),_`${m}();`}return e.partly_hoisted.push(_`
|
||
|
function ${i}($$value) {
|
||
|
@binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
||
|
${c}
|
||
|
});
|
||
|
}
|
||
|
`),t.chunks.destroy.push(_`${s}(null);`),_`${s}(${n});`}l();l();var Kn=class extends ke{constructor(t,r,n,i){super(t,r,n,i),r.add_dependencies(i.expression.dependencies)}rename_this_method(t,r){let n=this.node.expression.dynamic_dependencies(),i=this.node.expression.manipulate(t),s=this.node.should_cache&&t.get_unique_name(`${this.var.name}_value`),a=this.node.should_cache?s:i;if(i=v`${i} + ""`,this.node.should_cache&&t.add_variable(s,i),n.length>0){let u=t.renderer.dirty(n);t.has_outros&&(u=v`!#current || ${u}`);let o=v`${s} !== (${s} = ${i})`;this.node.should_cache&&(u=v`${u} && ${o}`),t.chunks.update.push(_`if (${u}) ${r(a)}`)}return{init:a}}};var Qn=class extends Kn{constructor(r,n,i,s){super(r,n,i,s);g(this,"var",{type:"Identifier",name:"t"})}render(r,n,i,s){let a=this.parent instanceof xn&&this.parent.attributes.filter(d=>d.node.name==="contenteditable"),u=this.parent instanceof xn&&this.parent.attributes.filter(d=>d.node.is_spread),o;if(a.length>0){let d=a[0];[!0,"true",""].includes(d.node.get_static_value())?o=!0:o=v`${d.get_value(r)}`}else u.length>0&&s.element_data_name&&(o=v`${s.element_data_name}['contenteditable']`);let{init:c}=this.rename_this_method(r,d=>o?o===!0?v`@set_data_contenteditable(${this.var}, ${d})`:v`@set_data_maybe_contenteditable(${this.var}, ${d}, ${o})`:v`@set_data(${this.var}, ${d})`);r.add_element(this.var,v`@text(${c})`,i&&v`@claim_text(${i}, ${c})`,n)}};l();var Xn=class extends Kn{constructor(r,n,i,s){super(r,n,i,s);g(this,"var",{type:"Identifier",name:"raw"})}render(r,n,i){let s=Lr(n);if(!s&&n&&!this.prev&&!this.next&&!this.renderer.options.hydratable){let u=c=>_`${n}.innerHTML = ${c};`[0],{init:o}=this.rename_this_method(r,c=>u(c));r.chunks.mount.push(u(o))}else{let u=s||(this.next?!this.next.is_dom_node():!this.parent||!this.parent.is_dom_node()),o=r.get_unique_name("html_tag"),c=u&&r.get_unique_name("html_anchor");r.add_variable(o);let{init:d}=this.rename_this_method(r,y=>v`${o}.p(${y})`),p=u?c:this.next?this.next.var:"null",f=this.node.find_nearest(/^Element/),m=f&&f.namespace===Ve.svg;r.chunks.create.push(_`${o} = new @HtmlTag(${m?"true":"false"});`),this.renderer.options.hydratable&&r.chunks.claim.push(_`${o} = @claim_html_tag(${i}, ${m?"true":"false"});`),r.chunks.hydrate.push(_`${o}.a = ${p};`),r.chunks.mount.push(_`${o}.m(${d}, ${n||"#target"}, ${n?null:"#anchor"});`),u&&r.add_element(c,v`@empty()`,v`@empty()`,n),(!n||s)&&r.chunks.destroy.push(_`if (detaching) ${o}.d();`)}}};l();var Zn=class extends ke{constructor(t,r,n,i){super(t,r,n,i),this.var=v`c`}render(t,r,n){if(!this.renderer.options.preserveComments)return;let i={type:"Literal",value:this.node.data,loc:{start:this.renderer.locate(this.node.start),end:this.renderer.locate(this.node.end)}};t.add_element(this.var,v`@comment(${i})`,n&&v`@claim_comment(${n}, ${i})`,r)}text(){return this.renderer.options.preserveComments?`<!--${this.node.data}-->`:""}};var Tz=/radio|checkbox|file/,Lz=/radio|checkbox|range|file/,Mz=[{event_names:["input"],filter:(e,t)=>e.name==="textarea"||e.name==="input"&&!Lz.test(e.get_static_attribute_value("type"))},{event_names:["input"],filter:(e,t)=>On(t)&&Ks(e)},{event_names:["change"],filter:(e,t)=>e.name==="select"||e.name==="input"&&Tz.test(e.get_static_attribute_value("type"))},{event_names:["change","input"],filter:(e,t)=>e.name==="input"&&e.get_static_attribute_value("type")==="range"},{event_names:["elementresize"],filter:(e,t)=>di.test(t)},{event_names:["elementresizecontentbox"],filter:(e,t)=>Ly.test(t)??My.test(t)},{event_names:["elementresizeborderbox"],filter:(e,t)=>Iy.test(t)},{event_names:["elementresizedevicepixelcontentbox"],filter:(e,t)=>Oy.test(t)},{event_names:["timeupdate"],filter:(e,t)=>e.is_media_node()&&(t==="currentTime"||t==="played"||t==="ended")},{event_names:["durationchange"],filter:(e,t)=>e.is_media_node()&&t==="duration"},{event_names:["play","pause"],filter:(e,t)=>e.is_media_node()&&t==="paused"},{event_names:["progress"],filter:(e,t)=>e.is_media_node()&&t==="buffered"},{event_names:["loadedmetadata"],filter:(e,t)=>e.is_media_node()&&(t==="buffered"||t==="seekable")}
|
||
|
${this.renderer.options.dev&&_`@validate_dynamic_element(${a});`}
|
||
|
${this.renderer.options.dev&&this.node.children.length>0&&_`@validate_void_dynamic_element(${a});`}
|
||
|
let ${this.var} = ${a} && ${this.child_dynamic_element_block.name}(#ctx);
|
||
|
`),r.chunks.create.push(_`
|
||
|
if (${this.var}) ${this.var}.c();
|
||
|
`),this.renderer.options.hydratable&&r.chunks.claim.push(_`
|
||
|
if (${this.var}) ${this.var}.l(${i});
|
||
|
`),r.chunks.mount.push(_`
|
||
|
if (${this.var}) ${this.var}.m(${n||"#target"}, ${n?"null":"#anchor"});
|
||
|
`),s){let u=r.get_unique_name("previous_tag");r.add_variable(u,a);let o=this.get_or_create_anchor(r,n,i),c=!!(this.node.intro||this.node.outro),d=this.renderer.component.component_options.immutable?v`@not_equal`:v`@safe_not_equal`,p=r.get_unique_name("tag_will_be_removed");c&&r.add_variable(p,v`false`),r.chunks.update.push(_`
|
||
|
if (${a}) {
|
||
|
if (!${u}) {
|
||
|
${this.var} = ${this.child_dynamic_element_block.name}(#ctx);
|
||
|
${u} = ${a};
|
||
|
${this.var}.c();
|
||
|
${c&&_`@transition_in(${this.var})`}
|
||
|
${this.var}.m(${this.get_update_mount_node(o)}, ${o});
|
||
|
} else if (${d}(${u}, ${a})) {
|
||
|
${this.var}.d(1);
|
||
|
${this.renderer.options.dev&&_`@validate_dynamic_element(${a});`}
|
||
|
${this.renderer.options.dev&&this.node.children.length>0&&_`@validate_void_dynamic_element(${a});`}
|
||
|
${this.var} = ${this.child_dynamic_element_block.name}(#ctx);
|
||
|
${u} = ${a};
|
||
|
${this.var}.c();
|
||
|
${c&&_`if (${p}) {
|
||
|
${p} = false;
|
||
|
@transition_in(${this.var})
|
||
|
}`}
|
||
|
${this.var}.m(${this.get_update_mount_node(o)}, ${o});
|
||
|
} else {
|
||
|
${c&&_`if (${p}) {
|
||
|
${p} = false;
|
||
|
@transition_in(${this.var})
|
||
|
}`}
|
||
|
${this.var}.p(#ctx, #dirty);
|
||
|
}
|
||
|
} else if (${u}) {
|
||
|
${c?_`
|
||
|
${p} = true;
|
||
|
@group_outros();
|
||
|
@transition_out(${this.var}, 1, 1, () => {
|
||
|
${this.var} = null;
|
||
|
${u} = ${a};
|
||
|
${p} = false;
|
||
|
});
|
||
|
@check_outros();
|
||
|
`:_`
|
||
|
${this.var}.d(1);
|
||
|
${this.var} = null;
|
||
|
${u} = ${a};
|
||
|
`}
|
||
|
}
|
||
|
`)}else r.chunks.update.push(_`
|
||
|
if (${a}) {
|
||
|
${this.var}.p(#ctx, #dirty);
|
||
|
}
|
||
|
`);if(this.child_dynamic_element_block.has_intros&&r.chunks.intro.push(_`@transition_in(${this.var}, #local);`),this.child_dynamic_element_block.has_outros&&r.chunks.outro.push(_`@transition_out(${this.var}, #local);`),r.chunks.destroy.push(_`if (${this.var}) ${this.var}.d(detaching)`),this.node.animation){let u=r.get_unique_name("measurements");r.add_variable(u),r.chunks.measure.push(_`${u} = ${this.var}.r()`),r.chunks.fix.push(_`${this.var}.f();`),r.chunks.animate.push(_`
|
||
|
${this.var}.s(${u});
|
||
|
${this.var}.a()
|
||
|
`)}}is_dom_node(){return super.is_dom_node()&&!this.child_dynamic_element}render_element(r,n,i){let{renderer:s}=this,a=s.options.hydratable;if(this.node.name==="noscript")return;let u=this.var,o=i&&r.get_unique_name(`${this.var.name}_nodes`),c=v`@children(${this.node.name==="template"?v`${u}.content`:u})`;r.add_variable(u);let d=this.get_render_statement(r);r.chunks.create.push(_`${u} = ${d};`);let{can_use_textcontent:p,can_optimise_to_html_string:f,can_optimise_hydration:m}=this.node;if(a&&(i?(r.chunks.claim.push(_`
|
||
|
${u} = ${this.get_claim_statement(r,i,m)};
|
||
|
`),!m&&!this.void&&this.node.children.length>0&&r.chunks.claim.push(_`
|
||
|
var ${o} = ${c};
|
||
|
`)):r.chunks.claim.push(_`${u} = ${d};`)),n){let w=_`@append(${n}, ${u});`;w[0].expression.callee.loc={start:this.renderer.locate(this.node.start),end:this.renderer.locate(this.node.end)},r.chunks.mount.push(w),Lr(n)&&r.chunks.destroy.push(_`@detach(${u});`)}else{let w=_`@insert(#target, ${u}, #anchor);`;w[0].expression.callee.loc={start:this.renderer.locate(this.node.start),end:this.renderer.locate(this.node.end)},r.chunks.mount.push(w),r.chunks.destroy.push(_`if (detaching) @detach(${u});`)}if(f&&(!a||m))if(this.fragment.nodes.length===1&&this.fragment.nodes[0].node.type==="Text"){let w=Qe(this.fragment.nodes[0].data);if(a){let b=r.get_unique_name("textContent");r.add_variable(b,w),w=b}r.chunks.create.push(_`${u}.textContent = ${w};`),a&&r.chunks.claim.push(_`if (@get_svelte_dataset(${u}) !== "${this.node.hash()}") ${u}.textContent = ${w};`)}else{let w={quasi:{type:"TemplateElement",value:{raw:""}}},b={type:"TemplateLiteral",expressions:[],quasis:[]},$=!this.node.can_use_innerhtml&&p;if(sE(this.fragment.nodes,r,b,w,$),b.quasis.push(w.quasi),a){let R=r.get_unique_name("textContent");r.add_variable(R,b),b=R}let C=this.node.can_use_innerhtml?"innerHTML":"textContent";r.chunks.create.push(_`${u}.${C} = ${b};`),a&&r.chunks.claim.push(_`if (@get_svelte_dataset(${u}) !== "${this.node.hash()}") ${u}.${C} = ${b};`)}else this.fragment.nodes.forEach(w=>{w.render(r,this.node.name==="template"?v`${u}.content`:u,o,{element_data_name:this.element_data_name})});if((this.bindings.some(w=>w.handler.uses_context)||this.node.handlers.some(w=>w.uses_context)||this.node.actions.some(w=>w.uses_context))&&(r.maintain_context=!0),this.node.is_dynamic_element?this.add_dynamic_element_attributes(r):this.add_attributes(r),this.add_directives_in_order(r),this.add_transitions(r),this.add_animation(r),this.add_classes(r),this.add_styles(r),this.add_manual_style_scoping(r),o&&a&&!this.void&&!m&&r.chunks.claim.push(_`${this.node.children.length>0?o:c}.forEach(@detach);`),s.options.dev){let w=s.meta_locate(this.node.start);r.chunks.hydrate.push(_`@add_location(${this.var}, ${s.file_var}, ${w.line-1}, ${w.column}, ${this.node.start});`)}r.renderer.dirty(this.node.tag_expr.dynamic_dependencies())}get_render_statement(r){let{name:n,namespace:i,tag_expr:s}=this.node,a=s.manipulate(r);if(i===Ve.svg)return v`@svg_element(${a})`;if(i)return v`@_document.createElementNS("${i}", "${n}")`;let u=this.attributes.find(o=>o.node.name==="is");return u?v`@element_is("${n}", ${u.render_chunks(r).reduce((o,c)=>v`${o} + ${c}`)})`:v`@element(${a})`}get_claim_statement(r,n,i){let s=this.attributes.filter(u=>!(u instanceof rn)&&!u.property_name).map(u=>qe`${u.name}: true`),a;return this.node.tag_expr.node.type==="Literal"?this.node.namespace?a=`"${this.node.tag_expr.node.value}"`:a=`"${(this.node.tag_expr.node.value||"").toUpperCase()}"`:this.node.namespace?a=v`${this.node.tag_expr.manipulate(r)}`:a=v`(${this.node.tag_expr.manipulate(r)} || 'null').toUpperCase()`,i&&s.push(qe`["data-svelte-h"]: true`),this.node.namespace===Ve.svg?v`@claim_svg_element(${n}, ${a}, { ${s} })`:v`@claim_element(${n}, ${a}, { ${s} })`}add_directives_in_order(r){let n=Mz.map(a=>({events:a.event_names,bindings:this.bindings.filter(u=>u.node.name!=="this").filter(u=>a.filter(this.node,u.node.name))})).filter(a=>a.bindings.length),i=this.bindings.find(a=>a.node.name==="this");function s(a){return a instanceof Ot||a instanceof nn?a.node.start:a instanceof Ut?a.start:a.bindings[0].node.start}[...n,...this.event_handlers,i,...this.node.actions].filter(Boolean).sort((a,u)=>s(a)-s(u)).forEach(a=>{a instanceof Ot?ov(r,this.var,a):a instanceof nn?this.add_this_binding(r,a):a instanceof Ut?lv(r,this.var,a):this.add_bindings(r,a)})}add_bindings(r,n){let{renderer:i}=this;if(n.bindings.length===0)return;i.component.has_reactive_assignments=!0;let s=n.bindings.some(b=>b.needs_lock)?r.get_unique_name(`${this.var.name}_updating`):null;s&&r.add_variable(s,v`false`);let a=i.component.get_unique_name(`${this.var.name}_${n.events.join("_")}_handler`);i.add_to_context(a.name);let u=n.bindings.some(b=>b.needs_lock
|
||
|
function ${a}() {
|
||
|
@_cancelAnimationFrame(${d});
|
||
|
if (!${this.var}.paused) {
|
||
|
${d} = @raf(${a});
|
||
|
${u&&_`${s} = true;`}
|
||
|
}
|
||
|
${f}.call(${this.var}, ${b});
|
||
|
}
|
||
|
`):r.chunks.init.push(_`
|
||
|
function ${a}() {
|
||
|
${u&&_`${s} = true;`}
|
||
|
${f}.call(${this.var}, ${b});
|
||
|
}
|
||
|
`),f=a}let m=Array.from(c).map(b=>({type:"Identifier",name:b}));this.renderer.component.partly_hoisted.push(_`
|
||
|
function ${a}(${m}) {
|
||
|
${n.bindings.map(b=>b.handler.mutation)}
|
||
|
${Array.from(o).filter(b=>b[0]!=="$").filter(b=>!c.has(b)).map(b=>_`${this.renderer.invalidate(b)};`)}
|
||
|
}
|
||
|
`),n.events.forEach(b=>{if(["elementresize","elementresizecontentbox","elementresizeborderbox","elementresizedevicepixelcontentbox"].indexOf(b)!==-1){let $=r.get_unique_name(`${this.var.name}_resize_listener`);switch(r.add_variable($),b){case"elementresize":r.chunks.mount.push(_`${$} = @add_iframe_resize_listener(${this.var}, ${f}.bind(${this.var}));`);break;case"elementresizecontentbox":r.chunks.mount.push(_`${$} = @resize_observer_content_box.observe(${this.var}, ${f}.bind(${this.var}));`);break;case"elementresizeborderbox":r.chunks.mount.push(_`${$} = @resize_observer_border_box.observe(${this.var}, ${f}.bind(${this.var}));`);break;case"elementresizedevicepixelcontentbox":r.chunks.mount.push(_`${$} = @resize_observer_device_pixel_content_box.observe(${this.var}, ${f}.bind(${this.var}));`);break}r.chunks.destroy.push(_`${$}();`)}else r.event_listeners.push(v`@listen(${this.var}, "${b}", ${f})`)});let y=n.bindings.map(b=>v`${b.snippet} === void 0`).reduce((b,$)=>v`${b} || ${$}`);if(this.node.name==="select"||n.bindings.find(b=>b.node.name==="indeterminate"||On(b.node.name)||b.is_readonly_media_attribute())){let b=p?a:v`() => ${f}.call(${this.var})`;r.chunks.hydrate.push(_`if (${y}) @add_render_callback(${b});`)}n.events[0]==="elementresize"&&r.chunks.hydrate.push(_`@add_render_callback(() => ${f}.call(${this.var}));`),s&&r.chunks.update.push(_`${s} = false;`)}add_this_binding(r,n){let{renderer:i}=this;i.component.has_reactive_assignments=!0;let s=Ea(i.component,r,n,this.var);r.chunks.mount.push(s)}add_attributes(r){if(this.attributes.forEach(n=>{if(n.node.name==="class"){let i=n.node.get_dependencies();hr(this.class_dependencies,i)}else n.node.name==="style"&&Je(this.dynamic_style_dependencies,n.node.get_dependencies())}),this.node.attributes.some(n=>n.is_spread)){this.add_spread_attributes(r);return}this.attributes.forEach(n=>{n.render(r)})}add_spread_attributes(r){let n=r.get_unique_name(`${this.var.name}_levels`),i=[],s=[];this.attributes.forEach(u=>{let o=u.node.get_dependencies(),c=o.length>0?r.renderer.dirty(o):null;if(u instanceof rn){let d=u.node.expression.manipulate(r);i.push(d),s.push(c?v`${c} && ${d}`:d)}else{let d=u.property_name||u.name;i.push(v`{ ${d}: ${u.get_init(r,u.get_value(r))} }`);let p=v`{ ${d}: ${u.should_cache?u.last:u.get_value(r)} }`;s.push(c?v`${u.get_dom_update_conditions(r,c)} && ${p}`:p)}}),r.chunks.init.push(_`
|
||
|
let ${n} = [${i}];
|
||
|
|
||
|
let ${this.element_data_name} = {};
|
||
|
for (let #i = 0; #i < ${n}.length; #i += 1) {
|
||
|
${this.element_data_name} = @assign(${this.element_data_name}, ${n}[#i]);
|
||
|
}
|
||
|
`);let a=this.node.namespace===Ve.svg?v`@set_svg_attributes`:this.node.is_dynamic_element?v`@set_dynamic_element_data(${this.node.tag_expr.manipulate(r)})`:v`@set_attributes`;if(r.chunks.hydrate.push(_`${a}(${this.var}, ${this.element_data_name});`),this.has_dynamic_attribute&&r.chunks.update.push(_`
|
||
|
${a}(${this.var}, ${this.element_data_name} = @get_spread_update(${n}, [
|
||
|
${s}
|
||
|
]));
|
||
|
`),this.node.name==="select"){let u=new Set;for(let o of this.attributes)for(let c of o.node.dependencies)u.add(c);r.chunks.mount.push(_`
|
||
|
'value' in ${this.element_data_name} && (${this.element_data_name}.multiple ? @select_options : @select_option)(${this.var}, ${this.element_data_name}.value);
|
||
|
`),r.chunks.update.push(_`
|
||
|
if (${r.renderer.dirty(Array.from(u))} && 'value' in ${this.element_data_name}) (${this.element_data_name}.multiple ? @select_options : @select_option)(${this.var}, ${this.element_data_name}.value);
|
||
|
`)}else if(this.node.name==="input"&&this.attributes.find(u=>u.node.name==="value")){let u=this.node.get_static_attribute_value("type");(u===null||u===""||u==="text"||u==="email"||u==="password")&&(r.chunks.mount.push(_`
|
||
|
if ('value' in ${this.element_data_name}) {
|
||
|
${this.var}.value = ${this.element_data_name}.value;
|
||
|
}
|
||
|
`),r.chunks.update.push(_`
|
||
|
if ('value' in ${this.element_data_name}) {
|
||
|
${this.var}.value = ${this.element_data_name}.value;
|
||
|
}
|
||
|
`))}["button","input","keygen","select","textarea"].includes(this.node.name)&&r.chunks.mount.push(_`
|
||
|
if (${this.var}.autofocus) ${this.var}.focus();
|
||
|
`)}add_dynamic_element_attributes(r){if(this.attributes.length===0)return;if(this.has_dynamic_attribute){this.add_spread_attributes(r);return}let n=[];this.attributes.forEach(s=>{if(s instanceof rn){let a={type:"SpreadElement",argument:s.node.expression.manipulate(r)};n.push(a)}else{let a=s.property_name||s.name;n.push(qe`${a}: ${s.get_value(r)}`)}});let i=this.node.namespace===Ve.svg?v`@set_svg_attributes`:this.node.is_dynamic_element?v`@set_dynamic_element_data(${this.node.tag_expr.manipulate(r)})`:v`@set_attributes`;r.chunks.hydrate.push(_`${i}(${this.var}, {${n}});`)}add_transitions(r){let{intro:n,outro:i}=this.node;if(!(!n&&!i)){if(n===i){let s=r.get_unique_name(`${this.var.name}_transition`),a=n.expression?n.expression.manipulate(r):v`{}`;r.add_variable(s);let u=this.renderer.reference(n.name),o=_`
|
||
|
@add_render_callback(() => {
|
||
|
if (!#current) return;
|
||
|
if (!${s}) ${s} = @create_bidirectional_transition(${this.var}, ${u}, ${a}, true);
|
||
|
${s}.run(1);
|
||
|
});
|
||
|
`,c=_`
|
||
|
if (!${s}) ${s} = @create_bidirectional_transition(${this.var}, ${u}, ${a}, false);
|
||
|
${s}.run(0);
|
||
|
`;n.is_local?(r.chunks.intro.push(_`
|
||
|
if (#local) {
|
||
|
${o}
|
||
|
}
|
||
|
`),r.chunks.outro.push(_`
|
||
|
if (#local) {
|
||
|
${c}
|
||
|
}
|
||
|
`)):(r.chunks.intro.push(o),r.chunks.outro.push(c)),r.chunks.destroy.push(_`if (detaching && ${s}) ${s}.end();`)}else{let s=n&&r.get_unique_name(`${this.var.name}_intro`),a=i&&r.get_unique_name(`${this.var.name}_outro`);if(n){r.add_variable(s);let u=n.expression?n.expression.manipulate(r):v`{}`,o=this.renderer.reference(n.name),c;i?(c=_`
|
||
|
@add_render_callback(() => {
|
||
|
if (!#current) return;
|
||
|
if (${a}) ${a}.end(1);
|
||
|
${s} = @create_in_transition(${this.var}, ${o}, ${u});
|
||
|
${s}.start();
|
||
|
});
|
||
|
`,r.chunks.outro.push(_`if (${s}) ${s}.invalidate();`)):c=_`
|
||
|
if (!${s}) {
|
||
|
@add_render_callback(() => {
|
||
|
${s} = @create_in_transition(${this.var}, ${o}, ${u});
|
||
|
${s}.start();
|
||
|
});
|
||
|
}
|
||
|
`,n.is_local&&(c=_`
|
||
|
if (#local) {
|
||
|
${c}
|
||
|
}
|
||
|
`),r.chunks.intro.push(c)}if(i){r.add_variable(a);let u=i.expression?i.expression.manipulate(r):v`{}`,o=this.renderer.reference(i.name);n||r.chunks.intro.push(_`
|
||
|
if (${a}) ${a}.end(1);
|
||
|
`);let c=_`
|
||
|
${a} = @create_out_transition(${this.var}, ${o}, ${u});
|
||
|
`;i.is_local&&(c=_`
|
||
|
if (#local) {
|
||
|
${c}
|
||
|
}
|
||
|
`),r.chunks.outro.push(c),r.chunks.destroy.push(_`if (detaching && ${a}) ${a}.end();`)}}(n&&n.expression&&n.expression.dependencies.size||i&&i.expression&&i.expression.dependencies.size)&&(r.maintain_context=!0)}}add_animation(r){if(!this.node.animation)return;let{outro:n}=this.node,i=r.get_unique_name("rect"),s=r.get_unique_name("stop_animation");r.add_variable(i),r.add_variable(s,v`@noop`),r.chunks.measure.push(_`
|
||
|
${i} = ${this.var}.getBoundingClientRect();
|
||
|
`),r.type===dv&&(r.chunks.measure.push(_`return ${i}`),r.chunks.restore_measurements.push(_`${i} = #measurement;`)),r.chunks.fix.push(_`
|
||
|
@fix_position(${this.var});
|
||
|
${s}();
|
||
|
${n&&_`@add_transform(${this.var}, ${i});`}
|
||
|
`);let a;if(this.node.animation.expression){if(a=this.node.animation.expression.manipulate(r),this.node.animation.expression.dynamic_dependencies().length){let o=r.get_unique_name("params");r.add_variable(o),r.chunks.measure.push(_`${o} = ${a};`),a=o}}else a=v`{}`;let u=this.renderer.reference(this.node.animation.name);r.chunks.animate.push(_`
|
||
|
${s}();
|
||
|
${s} = @create_animation(${this.var}, ${i}, ${u}, ${a});
|
||
|
`)}add_classes(r){let n=this.node.attributes.some(i=>i.is_spread);this.node.classes.forEach(i=>{let{expression:s,name:a}=i,u,o;s?(u=s.manipulate(r),o=s.dependencies):(u=a,o=new Set([a]));let c=_`@toggle_class(${this.var}, "${a}", ${u});`;if(r.chunks.hydrate.push(c),(this.node.is_dynamic_element||n)&&this.has_dynamic_attribute)r.chunks.update.push(c);else if(o&&o.size>0||this.class_dependencies.length){let d=this.class_dependencies.concat(...o),p=r.renderer.dirty(d);r.has_outros&&(p=v`!#current || ${p}`),d.some(m=>{let y=this.renderer.component.var_lookup.get(m);return!y||Mr(y)})&&r.chunks.update.push(_`
|
||
|
if (${p}) {
|
||
|
${c}
|
||
|
}
|
||
|
`)}})}add_styles(r){let n=this.node.attributes.some(a=>a.is_spread),i,s=()=>{if(!i&&this.dynamic_style_dependencies.size){i=r.get_unique_name("style_changed");let a=r.renderer.dirty([...this.dynamic_style_dependencies]);r.chunks.update.push(_`const ${i} = ${a};`)}};this.node.styles.forEach(a=>{let{name:u,expression:o,important:c,should_cache:d}=a,p=o.manipulate(r),f;d&&(f=r.get_unique_name(`style_${u.replace(Oz,"_")}`),r.add_variable(f,p));let m=_`@set_style(${this.var}, "${u}", ${d?f:p}, ${c?1:null})`;r.chunks.hydrate.push(m);let y=o.dynamic_dependencies(),w=new Set([...y,...this.dynamic_style_dependencies]),b=r.renderer.dirty([...w]);if(n)d&&w.size&&r.chunks.update.push(_`
|
||
|
if (${b}) {
|
||
|
${f} = ${p};
|
||
|
}`),r.chunks.update.push(m);else{if(w.size===0)return;d&&(b=v`${b} && ${f} !== (${f} = ${p})`),this.dynamic_style_dependencies.size>0&&(s(),b=v`${b} || ${i}`),r.chunks.update.push(_`
|
||
|
if (${b}) {
|
||
|
${m}
|
||
|
}
|
||
|
`)}})}add_manual_style_scoping(r){if(this.node.needs_manual_style_scoping){let n=_`@toggle_class(${this.var}, "${this.node.component.stylesheet.id}", true);`;r.chunks.hydrate.push(n),r.chunks.update.push(n)}}},Nz=/`/g,Dz=/\$/g;function sE(e,t,r,n,i){e.forEach(s=>{if(s instanceof Zn)n.quasi.value.raw+=s.text();else if(s instanceof yn){if(s.use_space()){n.quasi.value.raw+=" ";return}let a=s.node.parent,u=a&&(a.name==="script"||a.name==="style"||i);n.quasi.value.raw+=(u?s.data:Us(s.data)).replace(Ay,"\\\\").replace(Nz,"\\`").replace(Dz,"\\$")}else if(s instanceof Qn||s instanceof Xn)r.quasis.push(n.quasi),r.expressions.push(s.node.expression.manipulate(t)),n.quasi={type:"TemplateElement",value:{raw:""}};else if(s.node.name!=="noscript"){let a=s.node.name;n.quasi.value.raw+=`<${a}`;let u=a==="textarea"&&s.fragment.nodes.length===0;if(s.attributes.forEach(o=>{u&&o.node.name==="value"||(o instanceof rn?(r.quasis.push(n.quasi),r.expressions.push(v`@stringify_spread(${o.node.expression.manipulate(t)})`),n.quasi={type:"TemplateElement",value:{raw:""}}):(n.quasi.value.raw+=` ${bn(o.node.name)}="`,iE(o,t,r,n),n.quasi.value.raw+='"'))}),s.void)n.quasi.value.raw+="/>";else{if(n.quasi.value.raw+=">",a==="pre"){let o=s.fragment.nodes[0];o&&o.node.type==="Text"&&cn.test(o.node.data)&&(n.quasi.value.raw+=`
|
||
|
`)}if(u){let o=s.attributes.find(c=>c.node.name==="value");if(o){let c=o.node.chunks[0];c&&c.type==="Text"&&cn.test(c.data)&&(n.quasi.value.raw+=`
|
||
|
`),iE(o,t,r,n)}}sE(s.fragment.nodes,t,r,n),n.quasi.value.raw+=`</${a}>`}}})}function iE(e,t,r,n){e.node.chunks.forEach(i=>{i.type==="Text"?n.quasi.value.raw+=Us(i.data):(r.quasis.push(n.quasi),r.expressions.push(i.manipulate(t)),n.quasi={type:"TemplateElement",value:{raw:""}})})}l();var Ra=class extends ke{constructor(r,n,i,s,a,u){super(r,n,i,s);g(this,"fragment");this.fragment=new nt(r,n,s.children,this,a,u)}render(r,n,i){let s;this.renderer.options.hydratable&&this.fragment.nodes.length&&(s=r.get_unique_name("head_nodes"),r.chunks.claim.push(_`const ${s} = @head_selector('${this.node.id}', @_document.head);`)),this.fragment.render(r,v`@_document.head`,s),s&&this.renderer.options.hydratable&&r.chunks.claim.push(_`${s}.forEach(@detach);`)}};l();function Bz(e){return e&&e.children.length===1&&e.children[0].type==="IfBlock"}var Ph=class extends ke{constructor(r,n,i,s,a,u){super(r,n,i,s);g(this,"block");g(this,"fragment");g(this,"dependencies");g(this,"condition");g(this,"snippet");g(this,"is_dynamic");g(this,"var",null);g(this,"get_ctx_name");let{expression:o}=s,c=!o;if(o){this.dependencies=o.dynamic_dependencies();let d=!1;we(o.node,{enter(p){(p.type==="CallExpression"||p.type==="NewExpression")&&(d=!0)}}),d?(this.condition=n.get_unique_name("show_if"),this.snippet=o.manipulate(n)):this.condition=o.manipulate(n)}tn(r,this.node.const_tags),this.block=n.child({comment:St(s,i.renderer.component),name:i.renderer.component.get_unique_name(c?"create_else_block":"create_if_block"),type:s.expression?"if":"else"}),this.fragment=new nt(r,this.block,s.children,i,a,u),this.is_dynamic=this.block.dependencies.size>0,s.const_tags.length>0&&(this.get_ctx_name=i.renderer.component.get_unique_name(c?"get_else_ctx":"get_if_ctx"))}},Pa=class extends ke{constructor(r,n,i,s,a,u){super(r,n,i,s);g(this,"branches");g(this,"needs_update",!1);g(this,"var",{type:"Identifier",name:"if_block"});this.branches=[];let o=[],c=!1,d=!1,p=!1,f=m=>{let y=new Ph(r,n,this,m,a,u);if(this.branches.push(y),o.push(y.block),n.add_dependencies(m.expression.dependencies),y.block.dependencies.size>0&&(c=!0,n.add_dependencies(y.block.dependencies)),y.dependencies&&y.dependencies.length>0&&(this.needs_update=!0),y.block.has_intros&&(d=!0),y.block.has_outros&&(p=!0),Bz(m.else))f(m.else.children[0]);else if(m.else){let w=new Ph(r,n,this,m.else,a,u);this.branches.push(w),o.push(w.block),w.block.dependencies.size>0&&(c=!0,n.add_dependencies(w.block.dependencies)),w.block.has_intros&&(d=!0),w.block.has_outros&&(p=!0)}};f(this.node),o.forEach(m=>{m.has_update_method=c,m.has_intro_method=d,m.has_outro_method=p}),hr(r.blocks,o)}render(r,n,i){let s=this.var,a=this.next?!this.next.is_dom_node():!n||!this.parent.is_dom_node(),u=a?r.get_unique_name(`${this.var.name}_anchor`):this.next&&this.next.var||"null",o=!this.branches[this.branches.length-1].condition,c=o?null:s,d=this.branches[0].block.has_update_method,p=this.branches[0].block.has_intro_method,f=this.branches[0].block.has_outro_method,m=p||f;this.branches.forEach(b=>{b.get_ctx_name&&this.renderer.blocks.push(_`
|
||
|
function ${b.get_ctx_name}(#ctx) {
|
||
|
const child_ctx = #ctx.slice();
|
||
|
${en(r,b.node.const_tags,"child_ctx")}
|
||
|
return child_ctx;
|
||
|
}
|
||
|
`)});let y={name:s,anchor:u,if_exists_condition:c,has_else:o,has_transitions:m},w=n&&!Lr(n)?null:"detaching";this.node.else?(this.branches.forEach(b=>{b.snippet&&r.add_variable(b.condition)}),f?(this.render_compound_with_outros(r,n,i,d,y,w),r.chunks.outro.push(_`@transition_out(${s});`)):this.render_compound(r,n,i,d,y,w)):(this.render_simple(r,n,i,d,y,w),f&&r.chunks.outro.push(_`@transition_out(${s});`)),c?r.chunks.create.push(_`if (${c}) ${s}.c();`):r.chunks.create.push(_`${s}.c();`),i&&this.renderer.options.hydratable&&(c?r.chunks.claim.push(_`if (${c}) ${s}.l(${i});`):r.chunks.claim.push(_`${s}.l(${i});`)),(p||f)&&r.chunks.intro.push(_`@transition_in(${s});`),a&&r.add_element(u,v`@empty()`,i&&v`@empty()`,n),this.branches.forEach(b=>{b.fragment.render(b.block,null,v`#nodes`)})}render_compound(r,n,i,s,{name:a,anchor:u,has_else:o,if_exists_condition:c,has_transitions:d},p){let f=this.renderer.component.get_unique_name("select_block_type"),m=r.get_unique_name("current_block_type"),y=this.branches.some(E=>E.get_ctx_name),w=y?r.get_unique_name("select_block_ctx"):null,b=w?v`${w}(#ctx, ${m})`:v`#ctx`,$=o?v`${m}(${b})`:v`${m} && ${m}(${b})`;this.needs_update?r.chunks.init.push(_`
|
||
|
function ${f}(#ctx, #dirty) {
|
||
|
${this.branches.map(({dependencies:E,condition:H,snippet:Y})=>_`${Y&&E.length>0?_`if (${r.renderer.dirty(E)}) ${H} = null;`:null}`)}
|
||
|
${this.branches.map(({condition:E,snippet:H,block:Y})=>E?_`
|
||
|
${H&&_`if (${E} == null) ${E} = !!${H}`}
|
||
|
if (${E}) return ${Y.name};`:_`return ${Y.name};`)}
|
||
|
}
|
||
|
`):r.chunks.init.push(_`
|
||
|
function ${f}(#ctx, #dirty) {
|
||
|
${this.branches.map(({condition:E,snippet:H,block:Y})=>E?_`if (${H||E}) return ${Y.name};`:_`return ${Y.name};`)}
|
||
|
}
|
||
|
`),y&&(this.branches.every(E=>E.get_ctx_name)?r.chunks.init.push(_`
|
||
|
function ${w}(#ctx, #type) {
|
||
|
${this.branches.map(({condition:E,get_ctx_name:H,block:Y})=>E?_`if (#type === ${Y.name}) return ${H}(#ctx);`:_`return ${H}(#ctx);`).filter(Boolean)}
|
||
|
}
|
||
|
`):r.chunks.init.push(_`
|
||
|
function ${w}(#ctx, #type) {
|
||
|
${this.branches.map(({get_ctx_name:E,block:H})=>E?_`if (#type === ${H.name}) return ${E}(#ctx);`:null).filter(Boolean)}
|
||
|
return #ctx;
|
||
|
}
|
||
|
`)),r.chunks.init.push(_`
|
||
|
let ${m} = ${f}(#ctx, ${this.renderer.get_initial_dirty()});
|
||
|
let ${a} = ${$};
|
||
|
`);let C=n||"#target",R=n?"null":"#anchor";if(c?r.chunks.mount.push(_`if (${c}) ${a}.m(${C}, ${R});`):r.chunks.mount.push(_`${a}.m(${C}, ${R});`),this.needs_update){let E=this.get_update_mount_node(u),H=_`
|
||
|
${c?_`if (${c}) ${a}.d(1)`:_`${a}.d(1)`};
|
||
|
${a} = ${$};
|
||
|
if (${a}) {
|
||
|
${a}.c();
|
||
|
${d&&_`@transition_in(${a}, 1);`}
|
||
|
${a}.m(${E}, ${u});
|
||
|
}
|
||
|
`;s?r.chunks.update.push(_`
|
||
|
if (${m} === (${m} = ${f}(#ctx, #dirty)) && ${a}) {
|
||
|
${a}.p(${b}, #dirty);
|
||
|
} else {
|
||
|
${H}
|
||
|
}
|
||
|
`):r.chunks.update.push(_`
|
||
|
if (${m} !== (${m} = ${f}(#ctx, #dirty))) {
|
||
|
${H}
|
||
|
}
|
||
|
`)}else s&&(c?r.chunks.update.push(_`if (${c}) ${a}.p(${b}, #dirty);`):r.chunks.update.push(_`${a}.p(${b}, #dirty);`));c?r.chunks.destroy.push(_`
|
||
|
if (${c}) {
|
||
|
${a}.d(${p});
|
||
|
}
|
||
|
`):r.chunks.destroy.push(_`
|
||
|
${a}.d(${p});
|
||
|
`)}render_compound_with_outros(r,n,i,s,{name:a,anchor:u,has_else:o,has_transitions:c,if_exists_condition:d},p){let f=this.renderer.component.get_unique_name("select_block_type"),m=r.get_unique_name("current_block_type_index"),y=r.get_unique_name("previous_block_index"),w=r.get_unique_name("if_block_creators"),b=r.get_unique_name("if_blocks"),$=this.branches.some(P=>P.get_ctx_name),C=$?r.get_unique_name("select_block_ctx"):null,R=C?v`${C}(#ctx, ${m})`:v`#ctx`,E=o?P=>P:P=>_`if (~${m}) { ${P} }`;r.add_variable(m),r.add_variable(a),r.chunks.init.push(_`
|
||
|
const ${w} = [
|
||
|
${this.branches.map(P=>P.block.name)}
|
||
|
];
|
||
|
|
||
|
const ${b} = [];
|
||
|
|
||
|
${this.needs_update?_`
|
||
|
function ${f}(#ctx, #dirty) {
|
||
|
${this.branches.map(({dependencies:P,condition:j,snippet:I})=>_`${I&&P.length>0?_`if (${r.renderer.dirty(P)}) ${j} = null;`:null}`)}
|
||
|
${this.branches.map(({condition:P,snippet:j},I)=>P?_`
|
||
|
${j&&_`if (${P} == null) ${P} = !!${j}`}
|
||
|
if (${P}) return ${I};`:_`return ${I};`)}
|
||
|
${!o&&_`return -1;`}
|
||
|
}
|
||
|
`:_`
|
||
|
function ${f}(#ctx, #dirty) {
|
||
|
${this.branches.map(({condition:P,snippet:j},I)=>P?_`if (${j||P}) return ${I};`:_`return ${I};`)}
|
||
|
${!o&&_`return -1;`}
|
||
|
}
|
||
|
`}
|
||
|
`),$&&(this.branches.every(P=>P.get_ctx_name)?r.chunks.init.push(_`
|
||
|
function ${C}(#ctx, #index) {
|
||
|
${this.branches.map(({condition:P,get_ctx_name:j},I)=>P?_`if (#index === ${I}) return ${j}(#ctx);`:_`return ${j}(#ctx);`).filter(Boolean)}
|
||
|
}
|
||
|
`):r.chunks.init.push(_`
|
||
|
function ${C}(#ctx, #index) {
|
||
|
${this.branches.map(({get_ctx_name:P},j)=>P?_`if (#index === ${j}) return ${P}(#ctx);`:null).filter(Boolean)}
|
||
|
return #ctx;
|
||
|
}
|
||
|
`)),o?r.chunks.init.push(_`
|
||
|
${m} = ${f}(#ctx, ${this.renderer.get_initial_dirty()});
|
||
|
${a} = ${b}[${m}] = ${w}[${m}](${R});
|
||
|
`):r.chunks.init.push(_`
|
||
|
if (~(${m} = ${f}(#ctx, ${this.renderer.get_initial_dirty()}))) {
|
||
|
${a} = ${b}[${m}] = ${w}[${m}](${R});
|
||
|
}
|
||
|
`);let H=n||"#target",Y=n?"null":"#anchor";if(r.chunks.mount.push(E(_`${b}[${m}].m(${H}, ${Y});`)),this.needs_update){let P=this.get_update_mount_node(u),j=_`
|
||
|
@group_outros();
|
||
|
@transition_out(${b}[${y}], 1, 1, () => {
|
||
|
${b}[${y}] = null;
|
||
|
});
|
||
|
@check_outros();
|
||
|
`,I=_`
|
||
|
${a} = ${b}[${m}];
|
||
|
if (!${a}) {
|
||
|
${a} = ${b}[${m}] = ${w}[${m}](${R});
|
||
|
${a}.c();
|
||
|
} else {
|
||
|
${s&&_`${a}.p(${R}, #dirty);`}
|
||
|
}
|
||
|
${c&&_`@transition_in(${a}, 1);`}
|
||
|
${a}.m(${P}, ${u});
|
||
|
`,B=o?_`
|
||
|
${j}
|
||
|
|
||
|
${I}
|
||
|
`:_`
|
||
|
if (${a}) {
|
||
|
${j}
|
||
|
}
|
||
|
|
||
|
if (~${m}) {
|
||
|
${I}
|
||
|
} else {
|
||
|
${a} = null;
|
||
|
}
|
||
|
`;r.chunks.update.push(_`
|
||
|
let ${y} = ${m};
|
||
|
${m} = ${f}(#ctx, #dirty);
|
||
|
`),s?r.chunks.update.push(_`
|
||
|
if (${m} === ${y}) {
|
||
|
${E(_`${b}[${m}].p(${R}, #dirty);`)}
|
||
|
} else {
|
||
|
${B}
|
||
|
}
|
||
|
`):r.chunks.update.push(_`
|
||
|
if (${m} !== ${y}) {
|
||
|
${B}
|
||
|
}
|
||
|
`)}else s&&(d?r.chunks.update.push(_`if (${d}) ${a}.p(${R}, #dirty);`):r.chunks.update.push(_`${a}.p(${R}, #dirty);`));r.chunks.destroy.push(E(_`${b}[${m}].d(${p});`))}render_simple(r,n,i,s,{name:a,anchor:u,if_exists_condition:o,has_transitions:c},d){let p=this.branches[0],f=p.get_ctx_name?v`${p.get_ctx_name}(#ctx)`:v`#ctx`;p.snippet&&r.add_variable(p.condition,p.snippet),r.chunks.init.push(_`
|
||
|
let ${a} = ${p.condition} && ${p.block.name}(${f});
|
||
|
`);let m=n||"#target",y=n?"null":"#anchor";if(r.chunks.mount.push(_`if (${a}) ${a}.m(${m}, ${y});`),p.dependencies.length>0){let w=this.get_update_mount_node(u),b=_`
|
||
|
if (${a}) {
|
||
|
${s&&_`${a}.p(${f}, #dirty);`}
|
||
|
${c&&_`if (${r.renderer.dirty(p.dependencies)}) {
|
||
|
@transition_in(${a}, 1);
|
||
|
}`}
|
||
|
} else {
|
||
|
${a} = ${p.block.name}(${f});
|
||
|
${a}.c();
|
||
|
${c&&_`@transition_in(${a}, 1);`}
|
||
|
${a}.m(${w}, ${u});
|
||
|
}
|
||
|
`;p.snippet&&r.chunks.update.push(_`if (${r.renderer.dirty(p.dependencies)}) ${p.condition} = ${p.snippet}`),p.block.has_outro_method?r.chunks.update.push(_`
|
||
|
if (${p.condition}) {
|
||
|
${b}
|
||
|
} else if (${a}) {
|
||
|
@group_outros();
|
||
|
@transition_out(${a}, 1, 1, () => {
|
||
|
${a} = null;
|
||
|
});
|
||
|
@check_outros();
|
||
|
}
|
||
|
`):r.chunks.update.push(_`
|
||
|
if (${p.condition}) {
|
||
|
${b}
|
||
|
} else if (${a}) {
|
||
|
${a}.d(1);
|
||
|
${a} = null;
|
||
|
}
|
||
|
`)}else s&&r.chunks.update.push(_`
|
||
|
if (${p.condition}) ${a}.p(${f}, #dirty);
|
||
|
`);o?r.chunks.destroy.push(_`
|
||
|
if (${o}) ${a}.d(${d});
|
||
|
`):r.chunks.destroy.push(_`
|
||
|
${a}.d(${d});
|
||
|
`)}};l();var Aa=class extends ke{constructor(r,n,i,s,a,u){super(r,n,i,s);g(this,"fragment");g(this,"block");g(this,"dependencies");g(this,"var",{type:"Identifier",name:"key_block"});this.dependencies=s.expression.dynamic_dependencies(),this.dependencies.length&&(n=n.child({comment:St(s,r.component),name:r.component.get_unique_name("create_key_block"),type:"key"}),n.add_dependencies(s.expression.dependencies),r.blocks.push(n)),this.block=n,this.fragment=new nt(r,this.block,s.children,this,a,u)}render(r,n,i){this.dependencies.length===0?this.render_static_key(r,n,i):this.render_dynamic_key(r,n,i)}render_static_key(r,n,i){this.fragment.render(this.block,n,i)}render_dynamic_key(r,n,i){this.fragment.render(this.block,null,v`#nodes`);let s=!!(this.block.has_intro_method||this.block.has_outro_method),a=this.block.has_update_method,u=r.get_unique_name("previous_key"),o=this.node.expression.manipulate(r);r.add_variable(u,o);let c=this.renderer.component.component_options.immutable?v`@not_equal`:v`@safe_not_equal`,d=v`${this.renderer.dirty(this.dependencies)} && ${c}(${u}, ${u} = ${o})`;r.chunks.init.push(_`
|
||
|
let ${this.var} = ${this.block.name}(#ctx);
|
||
|
`),r.chunks.create.push(_`${this.var}.c();`),this.renderer.options.hydratable&&r.chunks.claim.push(_`${this.var}.l(${i});`),r.chunks.mount.push(_`${this.var}.m(${n||"#target"}, ${n?"null":"#anchor"});`);let p=this.get_or_create_anchor(r,n,i),f=_`
|
||
|
${s?_`
|
||
|
@group_outros();
|
||
|
@transition_out(${this.var}, 1, 1, @noop);
|
||
|
@check_outros();
|
||
|
`:_`${this.var}.d(1);`}
|
||
|
${this.var} = ${this.block.name}(#ctx);
|
||
|
${this.var}.c();
|
||
|
${s&&_`@transition_in(${this.var}, 1)`}
|
||
|
${this.var}.m(${this.get_update_mount_node(p)}, ${p});
|
||
|
`;a?r.chunks.update.push(_`
|
||
|
if (${d}) {
|
||
|
${f}
|
||
|
} else {
|
||
|
${this.var}.p(#ctx, #dirty);
|
||
|
}
|
||
|
`):r.chunks.update.push(_`
|
||
|
if (${d}) {
|
||
|
${f}
|
||
|
}
|
||
|
`),s&&(r.chunks.intro.push(_`@transition_in(${this.var})`),r.chunks.outro.push(_`@transition_out(${this.var})`)),r.chunks.destroy.push(_`${this.var}.d(detaching)`)}};l();l();function aE(e){let t=e.split("."),r={type:"Identifier",name:t[0]};for(let n=1;n<t.length;n++)r={type:"MemberExpression",object:r,property:{type:"Identifier",name:t[n]}};return r}l();l();function oE(e,t,r){if(r.length===0)return{block:e,scope:t};let n={type:"ObjectPattern",properties:r.map(f=>({type:"Property",kind:"init",key:f.name,value:f.value||f.name}))},i=[],s=new Map;r.forEach(f=>{let m;if(f.names.length>1){let y=e.get_unique_name(f.names.join("_")).name;s.set(f.value,y),m={type:"Identifier",name:y}}else m=f.value||f.name;i.push({type:"Property",kind:"init",key:f.name,value:m})});let a={type:"ObjectPattern",properties:i},u=new Set,o=new Map;r.forEach(f=>{f.names.forEach(m=>{u.add(m),s.has(f.value)&&o.set(m,s.get(f.value))})});let c={type:"ObjectExpression",properties:Array.from(u).map(f=>qe`${e.renderer.context_lookup.get(f).index}: ${f}`)},{context_lookup:d}=e.renderer,p={type:"ParenthesizedExpression",get expression(){if(e.renderer.context_overflow){let f=[];Array.from(u).forEach(y=>{let w=d.get(y).index.value,b=Math.floor(w/31),$=o.has(y)?o.get(y):y;f[b]||(f[b]=[]),f[b].push({name:$,n:w%31})});let m=[];for(let y=0;y<f.length;y+=1)m[y]=f[y]?f[y].map(({name:w,n:b})=>v`${w} ? ${1<<b} : 0`).reduce((w,b)=>v`${w} | ${b}`):v`0`;return{type:"ArrayExpression",elements:m}}return Array.from(u).map(f=>{let m=o.has(f)?o.get(f):f,y=d.get(f).index.value;return v`${m} ? ${1<<y} : 0`}).reduce((f,m)=>v`${f} | ${m}`)}};return{block:e,scope:t,get_context:v`${n} => ${c}`,get_changes:v`${a} => ${p}`}}var Jn=class extends ke{constructor(r,n,i,s,a,u){super(r,n,i,s);g(this,"fragment");g(this,"block");let{scope:o,lets:c,const_tags:d,slot_template_name:p}=this.node;c.forEach(f=>{Ye(f.value||f.name).forEach(m=>{r.add_to_context(m,!0)})}),tn(r,d),this.block=n.child({comment:St(this.node,this.renderer.component),name:this.renderer.component.get_unique_name(`create_${It(p)}_slot`),type:"slot"}),this.renderer.blocks.push(this.block),this.parent.set_slot(p,oE(this.block,o,c)),this.fragment=new nt(r,this.block,s.type==="SlotTemplate"?s.children:[s],this,a,u),this.block.parent.add_dependencies(this.block.dependencies)}render(){this.fragment.render(this.block,null,v`#nodes`),this.node.const_tags.length>0&&this.render_get_context()}render_get_context(){let r=this.block.renderer.component.get_unique_name("get_context");this.block.renderer.blocks.push(_`
|
||
|
function ${r}(#ctx) {
|
||
|
${en(this.block,this.node.const_tags,"#ctx")}
|
||
|
}
|
||
|
`),this.block.chunks.declarations.push(_`${r}(#ctx)`),this.block.has_update_method&&this.block.chunks.update.unshift(_`${r}(#ctx)`)}};var Fz=/[^a-zA-Z_$]/g,qa=class extends ke{constructor(r,n,i,s,a,u){super(r,n,i,s);g(this,"slots",new Map);g(this,"fragment");g(this,"children",[]);this.node.expression&&n.add_dependencies(this.node.expression.dependencies),this.node.attributes.forEach(o=>{n.add_dependencies(o.dependencies)}),this.node.bindings.forEach(o=>{o.is_contextual&&Sa(this,o),n.add_dependencies(o.expression.dependencies)}),this.node.handlers.forEach(o=>{o.expression&&n.add_dependencies(o.expression.dependencies)}),this.node.css_custom_properties.forEach(o=>{n.add_dependencies(o.dependencies)}),this.var={type:"Identifier",name:(this.node.name==="svelte:self"?r.component.name.name:this.node.name==="svelte:component"?"switch_instance":It(this.node.name)).toLowerCase()},this.node.children.length&&(this.children=this.node.children.map(o=>new Jn(r,n,this,o,a,u))),n.add_outro()}set_slot(r,n){if(this.slots.has(r))throw r==="default"?new Error('Found elements without slot attribute when using slot="default"'):new Error(`Duplicate slot name "${r}" in <${this.node.name}>`);this.slots.set(r,n)}warn_if_reactive(){let{name:r}=this.node,n=r.split(".")[0],i=this.renderer.component.var_lookup.get(n);if(!i)return;let s=Ny(this.node);this.renderer.component.push_ignores(s),(i.reassigned||i.export_name||i.mutated)&&this.renderer.component.warn(this.node,ae.reactive_component(r)),this.renderer.component.pop_ignores()}render(r,n,i){this.warn_if_reactive();let{renderer:s}=this,{component:a}=s,u=this.var;r.add_variable(u);let o=v`{}`,c=[],d=[];this.children.forEach(A=>{this.renderer.add_to_context("$$scope",!0),A.render(r,null,v`#nodes`)});let p,f=r.get_unique_name(`${u.name}_changes`),m=!!this.node.attributes.find(A=>A.is_spread);for(let A of this.slots.keys())this.slots.get(A).block.has_content()||(this.renderer.remove_block(this.slots.get(A).block),this.slots.delete(A));let y=this.node.css_custom_properties.length>0,w=this.node.namespace===Ve.svg,b=w?"g":"div",$=y?r.get_unique_name(b):null;y&&r.add_variable($);let C=this.slots.size>0?[qe`$$slots: {
|
||
|
${Array.from(this.slots).map(([A,K])=>qe`${A}: [${K.block.name}, ${K.get_context||null}, ${K.get_changes||null}]`)}
|
||
|
}`,qe`$$scope: {
|
||
|
ctx: #ctx
|
||
|
}`]:[],R=m?v`{ ${C} }`:v`{
|
||
|
${this.node.attributes.map(A=>qe`${A.name}: ${A.get_value(r)}`)},
|
||
|
${C}
|
||
|
}`;(this.node.attributes.length||this.node.bindings.length||C.length)&&(!m&&this.node.bindings.length===0?o.properties.push(qe`props: ${R}`):(p=r.get_unique_name(`${u.name}_props`),o.properties.push(qe`props: ${p}`))),a.compile_options.dev&&o.properties.push(qe`$$inline: true`);let E=new Set(this.slots.size?["$$scope"]:[]);this.slots.forEach(A=>{A.block.dependencies.forEach(K=>{let ee=A.scope.is_let(K),F=s.component.var_lookup.get(K);(ee||Mr(F))&&E.add(K)})});let H=this.node.attributes.filter(A=>A.get_dependencies().length>0);if(!m&&(H.length>0||this.node.bindings.length>0||E.size>0)&&d.push(_`const ${f} = {};`),this.node.attributes.length)if(m){let A=r.get_unique_name(`${this.var.name}_spread_levels`),K=[],ee=[],F=new Set;if(this.node.attributes.forEach(O=>{Je(F,O.dependencies)}),this.node.attributes.forEach((O,G)=>{let{name:X,dependencies:te}=O,oe=te.size>0&&te.size!==F.size?s.dirty(Array.from(te)):null,me=te.size===0,ce;if(O.is_spread){let ge=O.expression.manipulate(r);K.push(ge);let Ne=ge;O.expression.node.type!=="ObjectExpression"&&(Ne=v`@get_spread_object(${ge})`),ce=Ne}else{let ge=v`{ ${X}: ${O.get_value(r)} }`;K.push(ge),ce=ge}ee.push(me?v`${A}[${G}]`:oe?v`${oe} && ${ce}`:ce)}),r.chunks.init.push(_`
|
||
|
const ${A} = [
|
||
|
${K}
|
||
|
];
|
||
|
`),c.push(_`
|
||
|
for (let #i = 0; #i < ${A}.length; #i += 1) {
|
||
|
${p} = @assign(${p}, ${A}[#i]);
|
||
|
}
|
||
|
`),F.size){let O=s.dirty(Array.from(F));this.node.name==="svelte:component"&&(c[c.length-1]=_`
|
||
|
for (let #i = 0; #i < ${A}.length; #i += 1) {
|
||
|
${p} = @assign(${p}, ${A}[#i]);
|
||
|
}
|
||
|
if (#dirty !== undefined && ${O}) {
|
||
|
${p} = @assign(${p}, @get_spread_update(${A}, [
|
||
|
${ee}
|
||
|
]));
|
||
|
}
|
||
|
`),d.push(_`
|
||
|
const ${f} = ${O} ? @get_spread_update(${A}, [
|
||
|
${ee}
|
||
|
]) : {}
|
||
|
`)}else d.push(_`
|
||
|
const ${f} = {};
|
||
|
`)}else H.forEach(A=>{let K=A.get_dependencies();if(K.length>0){let ee=s.dirty(K);d.push(_`
|
||
|
if (${ee}) ${f}.${A.name} = ${A.get_value(r)};
|
||
|
`)}});E.size>0&&d.push(_`
|
||
|
if (${s.dirty(Array.from(E))}) {
|
||
|
${f}.$$scope = { dirty: #dirty, ctx: #ctx };
|
||
|
}`);let Y=this.node.bindings.map(A=>{if(a.has_reactive_assignments=!0,A.name==="this")return Ea(a,r,new nn(r,A,this),this.var);let K=a.get_unique_name(`${this.var.name}_${A.name}_binding`);s.add_to_context(K.name);let ee=s.reference(K),F=r.get_unique_name(`updating_${A.name}`);r.add_variable(F);let O=A.expression.manipulate(r);c.push(_`
|
||
|
if (${O} !== void 0) {
|
||
|
${p}.${A.name} = ${O};
|
||
|
}`),d.push(_`
|
||
|
if (!${F} && ${s.dirty(Array.from(A.expression.dependencies))}) {
|
||
|
${F} = true;
|
||
|
${f}.${A.name} = ${O};
|
||
|
@add_flush_callback(() => ${F} = false);
|
||
|
}
|
||
|
`);let G=Array.from(A.expression.contextual_dependencies),X=Array.from(A.expression.dependencies),te=A.raw_expression;if(A.is_contextual&&A.expression.node.type==="Identifier"){let{name:Ne}=A.expression.node,{object:Et,property:at,snippet:_t}=r.bindings.get(Ne);te=_t,G.push(Et.name,at.name)}let oe=[v`#value`],me=[v`#value`];G.length>0&&(G.forEach(Ne=>{oe.push({type:"Identifier",name:Ne}),s.add_to_context(Ne,!0),me.push(s.reference(Ne))}),r.maintain_context=!0),r.chunks.init.push(_`
|
||
|
function ${K}(#value) {
|
||
|
${ee}(${me});
|
||
|
}
|
||
|
`);let ce=_`
|
||
|
${te} = #value;
|
||
|
${s.invalidate(X[0])};
|
||
|
`;A.expression.node.type==="MemberExpression"&&(ce=_`
|
||
|
if ($$self.$$.not_equal(${te}, #value)) {
|
||
|
${ce}
|
||
|
}
|
||
|
`);let ge=_`
|
||
|
function ${K}(${oe}) {
|
||
|
${ce}
|
||
|
}
|
||
|
`;return a.partly_hoisted.push(ge),_`@binding_callbacks.push(() => @bind(${this.var}, '${A.name}', ${K}));`}),P=this.node.handlers.map(A=>{let ee=new Ot(A,this).get_snippet(r);return A.modifiers.has("once")&&(ee=v`@once(${ee})`),_`${u}.$on("${A.name}", ${ee});`}),j=y?$:n||"#target",I=y||n?"null":"#anchor",B=i&&this.renderer.options.hydratable,q=i;if(this.node.name==="svelte:component"){let A=r.get_unique_name("switch_value"),K=r.get_unique_name("switch_props"),ee=this.node.expression.manipulate(r),F=this.node.expression.dynamic_dependencies();y&&this.set_css_custom_properties(r,$,b,w),r.chunks.init.push(_`
|
||
|
var ${A} = ${ee};
|
||
|
|
||
|
function ${K}(#ctx, #dirty) {
|
||
|
${(this.node.attributes.length>0||this.node.bindings.length>0)&&_`
|
||
|
${p&&_`let ${p} = ${R};`}`}
|
||
|
${c}
|
||
|
return ${o};
|
||
|
}
|
||
|
|
||
|
if (${A}) {
|
||
|
${u} = @construct_svelte_component(${A}, ${K}(#ctx));
|
||
|
|
||
|
${Y}
|
||
|
${P}
|
||
|
}
|
||
|
`),r.chunks.create.push(_`if (${u}) @create_component(${u}.$$.fragment);`),$&&this.create_css_custom_properties_wrapper_mount_chunk(r,n,$),r.chunks.mount.push(_`if (${u}) @mount_component(${u}, ${j}, ${I});`),B&&($&&(q=this.create_css_custom_properties_wrapper_claim_chunk(r,q,$,b,w)),r.chunks.claim.push(_`if (${u}) @claim_component(${u}.$$.fragment, ${q});`));let O=this.get_or_create_anchor(r,n,i),G=y?"null":O,X=y?$:this.get_update_mount_node(O),te=$&&(O.name!=="null"?_`@insert(${O}.parentNode, ${$}, ${O});`:_`@insert(${n}, ${$}, ${O});`),oe=v`${A} !== (${A} = ${ee})`;F.length>0&&(oe=v`${r.renderer.dirty(F)} && ${oe}`),r.chunks.update.push(_`
|
||
|
if (${oe}) {
|
||
|
if (${u}) {
|
||
|
@group_outros();
|
||
|
const old_component = ${u};
|
||
|
@transition_out(old_component.$$.fragment, 1, 0, () => {
|
||
|
@destroy_component(old_component, 1);
|
||
|
${y?_`@detach(${X})`:null}
|
||
|
});
|
||
|
@check_outros();
|
||
|
}
|
||
|
|
||
|
if (${A}) {
|
||
|
${te}
|
||
|
${u} = @construct_svelte_component(${A}, ${K}(#ctx, #dirty));
|
||
|
|
||
|
${Y}
|
||
|
${P}
|
||
|
|
||
|
@create_component(${u}.$$.fragment);
|
||
|
@transition_in(${u}.$$.fragment, 1);
|
||
|
@mount_component(${u}, ${X}, ${G});
|
||
|
} else {
|
||
|
${u} = null;
|
||
|
}
|
||
|
} else if (${A}) {
|
||
|
${d}
|
||
|
${d.length>0&&_`${u}.$set(${f});`}
|
||
|
}
|
||
|
`),r.chunks.intro.push(_`
|
||
|
if (${u}) @transition_in(${u}.$$.fragment, #local);
|
||
|
`),r.chunks.outro.push(_`if (${u}) @transition_out(${u}.$$.fragment, #local);`),r.chunks.destroy.push(_`if (${u}) @destroy_component(${u}, ${n?null:"detaching"});`)}else{let A=this.node.name==="svelte:self"?a.name:this.renderer.reference(aE(this.node.name));r.chunks.init.push(_`
|
||
|
${(this.node.attributes.length>0||this.node.bindings.length>0)&&_`
|
||
|
${p&&_`let ${p} = ${R};`}`}
|
||
|
${c}
|
||
|
${u} = new ${A}(${o});
|
||
|
|
||
|
${Y}
|
||
|
${P}
|
||
|
`),y&&this.set_css_custom_properties(r,$,b,w),r.chunks.create.push(_`@create_component(${u}.$$.fragment);`),$&&this.create_css_custom_properties_wrapper_mount_chunk(r,n,$),r.chunks.mount.push(_`@mount_component(${u}, ${j}, ${I});`),B&&($&&(q=this.create_css_custom_properties_wrapper_claim_chunk(r,q,$,b,w)),r.chunks.claim.push(_`@claim_component(${u}.$$.fragment, ${q});`)),r.chunks.intro.push(_`
|
||
|
@transition_in(${u}.$$.fragment, #local);
|
||
|
`),d.length&&r.chunks.update.push(_`
|
||
|
${d}
|
||
|
${u}.$set(${f});
|
||
|
`),r.chunks.destroy.push(_`
|
||
|
@destroy_component(${u}, ${n?null:"detaching"});
|
||
|
`),r.chunks.outro.push(_`@transition_out(${u}.$$.fragment, #local);`)}}create_css_custom_properties_wrapper_mount_chunk(r,n,i){n?(r.chunks.mount.push(_`@append(${n}, ${i})`),Lr(n)&&r.chunks.destroy.push(_`@detach(${i});`)):(r.chunks.mount.push(_`@insert(#target, ${i}, #anchor);`),r.chunks.destroy.push(_`if (detaching && ${this.var}) @detach(${i});`))}create_css_custom_properties_wrapper_claim_chunk(r,n,i,s,a){let u=r.get_unique_name(`${i.name}_nodes`),o=a?v`@claim_svg_element`:v`@claim_element`;return r.chunks.claim.push(_`
|
||
|
${i} = ${o}(${n}, "${s.toUpperCase()}", { style: true })
|
||
|
var ${u} = @children(${i});
|
||
|
`),u}set_css_custom_properties(r,n,i,s){let a=s?v`@svg_element`:v`@element`;r.chunks.create.push(_`${n} = ${a}("${i}");`),s||r.chunks.hydrate.push(_`@set_style(${n}, "display", "contents");`),this.node.css_custom_properties.forEach(u=>{let o=u.get_dependencies(),c=u.should_cache(),d=c&&r.get_unique_name(`${u.name.replace(Fz,"_")}_last`);c&&r.add_variable(d);let p=u.get_value(r),f=c?v`${d} = ${p}`:p;if(r.chunks.hydrate.push(_`@set_style(${n}, "${u.name}", ${f});`),o.length>0){let m=r.renderer.dirty(o);c&&(m=v`${m} && (${d} !== (${d} = ${p}))`),r.chunks.update.push(_`
|
||
|
if (${m}) {
|
||
|
@set_style(${n}, "${u.name}", ${c?d:p});
|
||
|
}
|
||
|
`)}})}};l();l();function Ta(e,t=null){return{type:"ObjectExpression",properties:Array.from(e.values()).filter(r=>r.name!=="name").map(r=>{if(r.is_spread)return{type:"SpreadElement",argument:Vz(t,r)};let n=jz(t,r);return qe`${r.name}: ${n}`})}}function jz(e,t){if(t.is_true)return v`true`;if(t.chunks.length===0)return v`""`;let r=t.chunks.map(n=>n.type==="Text"?Qe(n.data):e?n.manipulate(e):n.node).reduce((n,i)=>v`${n} + ${i}`);return t.chunks.length>1&&t.chunks[0].type!=="Text"&&(r=v`"" + ${r}`),r}function Vz(e,t){return e?t.expression.manipulate(e):t.expression.node}var La=class extends ke{constructor(r,n,i,s,a,u){super(r,n,i,s);g(this,"fragment");g(this,"fallback",null);g(this,"slot_block");g(this,"var",{type:"Identifier",name:"slot"});g(this,"dependencies",new Set(["$$scope"]));this.node.children.length&&(this.fallback=n.child({comment:St(this.node.children[0],this.renderer.component),name:this.renderer.component.get_unique_name("fallback_block"),type:"fallback"}),r.blocks.push(this.fallback)),this.fragment=new nt(r,this.fallback,s.children,this,a,u),this.node.values.forEach(o=>{Je(this.dependencies,o.dependencies)}),n.add_dependencies(this.dependencies),n.add_intro(),n.add_outro()}render(r,n,i){let{renderer:s}=this,{slot_name:a}=this.node;this.slot_block&&(r=this.slot_block);let u,o,c;if(this.node.values.size>0){u=s.component.get_unique_name(`get_${It(a)}_slot_changes`),c=s.component.get_unique_name(`get_${It(a)}_slot_context`);let P=v`{}`,j=new Set;this.node.values.forEach(I=>{if(I.type==="Spread")Je(j,Array.from(I.dependencies).filter(B=>this.is_dependency_dynamic(B)));else{let B=Array.from(I.dependencies).filter(q=>this.is_dependency_dynamic(q));B.length>0&&P.properties.push(qe`${I.name}: ${s.dirty(B)}`)}}),s.blocks.push(_`
|
||
|
const ${u} = #dirty => ${P};
|
||
|
const ${c} = #ctx => ${Ta(this.node.values,r)};
|
||
|
`),j.size&&(o=s.component.get_unique_name(`get_${It(a)}_slot_spread_changes`),s.blocks.push(_`
|
||
|
const ${o} = #dirty => ${s.dirty(Array.from(j))};
|
||
|
`))}else u="null",c="null";let d=!!this.fallback;this.fallback&&(this.fragment.render(this.fallback,null,v`#nodes`),d=this.fallback.has_content(),d||s.remove_block(this.fallback));let p=r.get_unique_name(`${It(a)}_slot`),f=r.get_unique_name(`${It(a)}_slot_template`),m=d?r.get_unique_name(`${It(a)}_slot_or_fallback`):p;r.chunks.init.push(_`
|
||
|
const ${f} = ${s.reference("#slots")}.${a};
|
||
|
const ${p} = @create_slot(${f}, #ctx, ${s.reference("$$scope")}, ${c});
|
||
|
${d?_`const ${m} = ${p} || ${this.fallback.name}(#ctx);`:null}
|
||
|
`),r.chunks.create.push(_`if (${m}) ${m}.c();`),s.options.hydratable&&r.chunks.claim.push(_`if (${m}) ${m}.l(${i});`),r.chunks.mount.push(_`
|
||
|
if (${m}) {
|
||
|
${m}.m(${n||"#target"}, ${n?"null":"#anchor"});
|
||
|
}
|
||
|
`),r.chunks.intro.push(_`@transition_in(${m}, #local);`),r.chunks.outro.push(_`@transition_out(${m}, #local);`);let y=Array.from(this.dependencies).filter(P=>this.is_dependency_dynamic(P)),w=d?Array.from(this.fallback.dependencies).filter(P=>this.is_dependency_dynamic(P)):[],b=s.dirty(y);r.has_outros&&(b=v`!#current || ${b}`);let $=[o?v`${o}(#dirty)`:null,r.has_outros?v`!#current`:null].filter(Boolean),C=$.length?$.reduce((P,j)=>v`${P} || ${j}`):null,R;if(C){let P=v`${C} ? @get_all_dirty_from_scope(${s.reference("$$scope")}) : @get_slot_changes(${f}, ${s.reference("$$scope")}, #dirty, ${u})`;R=_`
|
||
|
if (${p}.p && ${b}) {
|
||
|
@update_slot_base(${p}, ${f}, #ctx, ${s.reference("$$scope")}, ${P}, ${c});
|
||
|
}
|
||
|
`}else R=_`
|
||
|
if (${p}.p && ${b}) {
|
||
|
@update_slot(${p}, ${f}, #ctx, ${s.reference("$$scope")}, #dirty, ${u}, ${c});
|
||
|
}
|
||
|
`;let E=s.dirty(w),H=v`#dirty`;r.has_outros&&(E=v`!#current || ${E}`,H=v`!#current ? ${s.get_initial_dirty()} : ${H}`);let Y=d&&w.length>0&&_`
|
||
|
if (${m} && ${m}.p && ${E}) {
|
||
|
${m}.p(#ctx, ${H});
|
||
|
}
|
||
|
`;Y?r.chunks.update.push(_`
|
||
|
if (${p}) {
|
||
|
${R}
|
||
|
} else {
|
||
|
${Y}
|
||
|
}
|
||
|
`):r.chunks.update.push(_`
|
||
|
if (${p}) {
|
||
|
${R}
|
||
|
}
|
||
|
`),r.chunks.destroy.push(_`if (${m}) ${m}.d(detaching);`)}is_dependency_dynamic(r){if(r==="$$scope"||this.node.scope.is_let(r)||Gt(r))return!0;let n=this.renderer.component.var_lookup.get(r);return Mr(n)}};l();var Ma=class extends ke{constructor(t,r,n,i,s,a){super(t,r,n,i)}render(t,r,n){if(!!this.node.children.find(s=>s.type!=="Text")){let s,a=new Set;if(this.node.children.length===1){let{expression:d}=this.node.children[0];s=d.manipulate(t),Je(a,d.dependencies)}else s=this.node.children.map(d=>d.type==="Text"?Qe(d.data):(d.expression.dependencies.forEach(p=>{a.add(p)}),d.expression.manipulate(t))).reduce((d,p)=>v`${d} + ${p}`),this.node.children[0].type!=="Text"&&(s=v`"" + ${s}`);let u=this.node.should_cache&&t.get_unique_name("title_value");this.node.should_cache&&t.add_variable(u);let o=this.node.should_cache?v`${u} = ${s}`:s;t.chunks.init.push(_`@_document.title = ${o};`);let c=_`@_document.title = ${this.node.should_cache?u:s};`;if(a.size){let d=Array.from(a),p=t.renderer.dirty(d);t.has_outros&&(p=v`!#current || ${p}`),this.node.should_cache&&(p=v`${p} && (${u} !== (${u} = ${s}))`),t.chunks.update.push(_`
|
||
|
if (${p}) {
|
||
|
${c}
|
||
|
}`)}}else{let s=this.node.children.length>0?Qe(this.node.children[0].data):v`""`;t.chunks.hydrate.push(_`@_document.title = ${s};`)}}};l();var Hz={innerWidth:"resize",innerHeight:"resize",outerWidth:"resize",outerHeight:"resize",devicePixelRatio:"resize",scrollX:"scroll",scrollY:"scroll"},Uz={scrollX:"pageXOffset",scrollY:"pageYOffset"},zz=new Set(["innerWidth","innerHeight","outerWidth","outerHeight","devicePixelRatio","online"]),Vi=class extends ke{constructor(r,n,i,s){super(r,n,i,s);g(this,"handlers");this.handlers=this.node.handlers.map(a=>new Ot(a,this))}render(r,n,i){let{renderer:s}=this,{component:a}=s,u={},o={};Gn(r,"@_window",this.node.actions),zn(r,"@_window",this.handlers),this.node.bindings.forEach(f=>{let m=f.expression.node.name;if(zz.has(f.name)&&s.readonly.add(m),o[f.name]=m,f.name==="online")return;let y=Hz[f.name],w=Uz[f.name]||f.name;u[y]||(u[y]=[]),u[y].push({name:m,value:w})});let c=r.get_unique_name("scrolling"),d=r.get_unique_name("clear_scrolling"),p=r.get_unique_name("scrolling_timeout");if(Object.keys(u).forEach(f=>{let m=r.get_unique_name(`onwindow${f}`),y=u[f];s.add_to_context(m.name);let w=s.reference(m.name);if(f==="scroll"){r.add_variable(c,v`false`),r.add_variable(d,v`() => { ${c} = false }`),r.add_variable(p);let b=o.scrollX&&o.scrollY?v`"${o.scrollX}" in this._state || "${o.scrollY}" in this._state`:v`"${o.scrollX||o.scrollY}" in this._state`,$=o.scrollX&&v`this._state.${o.scrollX}`,C=o.scrollY&&v`this._state.${o.scrollY}`;s.meta_bindings.push(_`
|
||
|
if (${b}) {
|
||
|
@_scrollTo(${$||"@_window.pageXOffset"}, ${C||"@_window.pageYOffset"});
|
||
|
}
|
||
|
${$&&`${$} = @_window.pageXOffset;`}
|
||
|
${C&&`${C} = @_window.pageYOffset;`}
|
||
|
`),r.event_listeners.push(v`
|
||
|
@listen(@_window, "${f}", () => {
|
||
|
${c} = true;
|
||
|
@_clearTimeout(${p});
|
||
|
${p} = @_setTimeout(${d}, 100);
|
||
|
${w}();
|
||
|
})
|
||
|
`)}else y.forEach(b=>{s.meta_bindings.push(_`this._state.${b.name} = @_window.${b.value};`)}),r.event_listeners.push(v`
|
||
|
@listen(@_window, "${f}", ${w})
|
||
|
`);a.partly_hoisted.push(_`
|
||
|
function ${m}() {
|
||
|
${y.map(b=>s.invalidate(b.name,v`${b.name} = @_window.${b.value}`))}
|
||
|
}
|
||
|
`),r.chunks.init.push(_`
|
||
|
@add_render_callback(${w});
|
||
|
`),a.has_reactive_assignments=!0}),o.scrollX||o.scrollY){let f=s.dirty([o.scrollX,o.scrollY].filter(Boolean)),m=o.scrollX?s.reference(o.scrollX):v`@_window.pageXOffset`,y=o.scrollY?s.reference(o.scrollY):v`@_window.pageYOffset`;r.chunks.update.push(_`
|
||
|
if (${f} && !${c}) {
|
||
|
${c} = true;
|
||
|
@_clearTimeout(${p});
|
||
|
@_scrollTo(${m}, ${y});
|
||
|
${p} = @_setTimeout(${d}, 100);
|
||
|
}
|
||
|
`)}if(o.online){let f=r.get_unique_name("onlinestatuschanged"),m=o.online;s.add_to_context(f.name);let y=s.reference(f.name);a.partly_hoisted.push(_`
|
||
|
function ${f}() {
|
||
|
${s.invalidate(m,v`${m} = @_navigator.onLine`)}
|
||
|
}
|
||
|
`),r.chunks.init.push(_`
|
||
|
@add_render_callback(${y});
|
||
|
`),r.event_listeners.push(v`@listen(@_window, "online", ${y})`,v`@listen(@_window, "offline", ${y})`),a.has_reactive_assignments=!0}}};l();function ei(e,t){t.next=e,e&&(e.prev=t)}var lE={AwaitBlock:va,Body:ya,Comment:Zn,DebugTag:ba,Document:xa,EachBlock:wa,Element:xn,Head:Ra,IfBlock:Pa,InlineComponent:qa,KeyBlock:Aa,MustacheTag:Qn,Options:null,RawMustacheTag:Xn,Slot:La,SlotTemplate:Jn,Text:yn,Title:Ma,Window:Vi};function Gz(e,t){return t.node.find_nearest(/EachBlock/)===e.find_nearest(/EachBlock/)||t.node.prev.type==="EachBlock"}var nt=class{constructor(t,r,n,i,s,a){g(this,"nodes");this.nodes=[];let u,o,c=n.length;for(;c--;){let d=n[c];if(!d.type)throw new Error("missing type");if(!(d.type in lE))throw new Error(`TODO implement ${d.type}`);if(d.type==="Window"){o=new Vi(t,r,i,d);continue}if(d.type==="Text"){let{data:p}=d;if(this.nodes.length===0&&(a?a.node.type==="Text"&&ui.test(a.node.data)&&Gz(d,a):!d.has_ancestor("EachBlock"))&&!d.keep_space()&&(p=Ti(p),!p))continue;if(u&&u.node.type==="Text"){u.data=p+u.data;continue}let f=new yn(t,r,i,d,p);if(f.skip)continue;this.nodes.unshift(f),ei(u,u=f)}else{let p=lE[d.type];if(!p||d.type==="Comment"&&!t.options.preserveComments)continue;let f=new p(t,r,i,d,s,u||a);this.nodes.unshift(f),ei(u,u=f)}}if(s){let d=this.nodes[0];d&&d.node.type==="Text"&&!d.node.keep_space()&&(d.data=qi(d.data),d.data||(d.var=null,this.nodes.shift(),this.nodes[0]&&(this.nodes[0].prev=null)))}o&&(this.nodes.unshift(o),ei(u,o))}render(t,r,n){for(let i=0;i<this.nodes.length;i+=1)this.nodes[i].render(t,r,n)}};var Ia=class{constructor(t,r){g(this,"component");g(this,"options");g(this,"context",[]);g(this,"initial_context",[]);g(this,"context_lookup",new Map);g(this,"context_overflow");g(this,"blocks",[]);g(this,"readonly",new Set);g(this,"meta_bindings",[]);g(this,"binding_groups",new Map);g(this,"block");g(this,"fragment");g(this,"file_var");g(this,"locate");g(this,"meta_locate");this.component=t,this.options=r,this.locate=t.locate,this.meta_locate=t.meta_locate,this.file_var=r.dev&&this.component.get_unique_name("file"),t.vars.filter(i=>!i.hoistable||i.export_name&&!i.module).forEach(i=>this.add_to_context(i.name)),t.vars.filter(i=>i.subscribable).forEach(i=>this.add_to_context(`$${i.name}`)),Cg.forEach(i=>{t.var_lookup.has(i)&&this.add_to_context(i)}),t.slots.size>0&&(this.add_to_context("$$scope"),this.add_to_context("#slots")),this.block=new Li({renderer:this,name:null,type:"component",key:null,bindings:new Map,dependencies:new Set}),this.block.has_update_method=!0,this.fragment=new nt(this,this.block,t.fragment.children,null,!0,null),this.blocks.forEach(i=>{i instanceof Li&&i.assign_variable_names()}),this.block.assign_variable_names(),this.fragment.render(this.block,null,v`#nodes`),this.context_overflow=this.context.length>31,this.context.forEach(i=>{let{variable:s}=i;s?(i.priority+=2,(s.mutated||s.reassigned)&&(i.priority+=4),s.is_reactive_dependency&&(s.mutated||s.reassigned)&&(i.priority+=16),s.export_name&&(i.priority+=32),s.referenced&&(i.priority+=64)):i.is_non_contextual&&(i.priority+=8),i.is_contextual||(i.priority+=1)}),this.context.sort((i,s)=>s.priority-i.priority||i.index.value-s.index.value),this.context.forEach((i,s)=>i.index.value=s);let n=this.context.length;for(;n--;){let i=this.context[n];if(i.variable){if(i.variable.referenced||i.variable.export_name||i.variable.is_reactive_dependency&&(i.variable.mutated||i.variable.reassigned))break}else if(i.is_non_contextual)break}this.initial_context=this.context.slice(0,n+1)}add_to_context(t,r=!1){if(!this.context_lookup.has(t)){let i={name:t,index:{type:"Literal",value:this.context.length},is_contextual:!1,is_non_contextual:!1,variable:null,priority:0};this.context_lookup.set(t,i),this.context.push(i)}let n=this.context_lookup.get(t);return r?n.is_contextual=!0:(n.is_non_contextual=!0,n.variable=this.component.var_lookup.get(t)),n}invalidate(t,r,n=!1){return Sg(this,t,r,n)}dirty(t,r=!1){let n=this,i=r?v`$$self.$$.dirty`:v`#dirty`,s=()=>{let a=[];return t.forEach(u=>{let o=n.context_lookup.get(u);if(!o)return;if(o.index.value===-1)throw ne
|
||
|
/*# sourceMappingURL=${a.map.toUrl()} */`:a.code,c=e.get_unique_name("add_css"),d=!!o&&(t.customElement||t.css==="injected");d&&s.push(_`
|
||
|
function ${c}(target) {
|
||
|
@append_styles(target, "${e.stylesheet.id}", "${o}");
|
||
|
}
|
||
|
`);let p=n.blocks.slice().reverse();hr(s,p.map(z=>z.render?z.render():z)),t.dev&&!t.hydratable&&i.chunks.claim.push(_`throw new @_Error("options.hydrate only works if the component was compiled with the \`hydratable: true\` option");`);let f=e.var_lookup.has("$$slots"),m;f&&(m=_`
|
||
|
const $$slots = @compute_slots(#slots);
|
||
|
`);let y=e.var_lookup.has("$$props"),w=e.var_lookup.has("$$restProps"),b=y||w?"$$new_props":"$$props",$=e.vars.filter(z=>!z.module&&z.export_name),C=$.filter(z=>z.writable),R=e.get_unique_name("omit_props_names"),E=v`@compute_rest_props($$props, ${R.name})`,H=w?_`
|
||
|
const ${R.name} = [${$.map(z=>`"${z.export_name}"`).join(",")}];
|
||
|
let $$restProps = ${E};
|
||
|
`:null,Y=y||w||C.length>0||e.slots.size>0?v`
|
||
|
${b} => {
|
||
|
${y&&n.invalidate("$$props",v`$$props = @assign(@assign({}, $$props), @exclude_internal_props($$new_props))`)}
|
||
|
${w&&!y&&v`$$props = @assign(@assign({}, $$props), @exclude_internal_props($$new_props))`}
|
||
|
${w&&n.invalidate("$$restProps",v`$$restProps = ${E}`)}
|
||
|
${C.map(z=>_`if ('${z.export_name}' in ${b}) ${n.invalidate(z.name,v`${z.name} = ${b}.${z.export_name}`)};`)}
|
||
|
${e.slots.size>0&&_`if ('$$scope' in ${b}) ${n.invalidate("$$scope",v`$$scope = ${b}.$$scope`)};`}
|
||
|
}
|
||
|
`:null,P=[],j=e.component_options.immutable?v`@not_equal`:v`@safe_not_equal`,I,B,q,A;if($.forEach(z=>{let Ce=e.var_lookup.get(z.name);!Ce.writable||e.component_options.accessors?P.push({type:"MethodDefinition",kind:"get",key:{type:"Identifier",name:z.export_name},value:v`function() {
|
||
|
return ${z.hoistable?z.name:v`this.$$.ctx[${n.context_lookup.get(z.name).index}]`}
|
||
|
}`}):e.compile_options.dev&&P.push({type:"MethodDefinition",kind:"get",key:{type:"Identifier",name:z.export_name},value:v`function() {
|
||
|
throw new @_Error("<${e.tag}>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
||
|
}`}),e.component_options.accessors?Ce.writable&&!n.readonly.has(z.name)?P.push({type:"MethodDefinition",kind:"set",key:{type:"Identifier",name:z.export_name},value:v`function(${z.name}) {
|
||
|
this.$$set({ ${z.export_name}: ${z.name} });
|
||
|
@flush();
|
||
|
}`}):e.compile_options.dev&&P.push({type:"MethodDefinition",kind:"set",key:{type:"Identifier",name:z.export_name},value:v`function(value) {
|
||
|
throw new @_Error("<${e.tag}>: Cannot set read-only property '${z.export_name}'");
|
||
|
}`}):e.compile_options.dev&&P.push({type:"MethodDefinition",kind:"set",key:{type:"Identifier",name:z.export_name},value:v`function(value) {
|
||
|
throw new @_Error("<${e.tag}>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
||
|
}`})}),e.instance_exports_from.forEach(z=>{let Ce={...z,type:"ImportDeclaration",specifiers:[],source:z.source};e.imports.push(Ce),z.specifiers.forEach(Re=>{if(e.component_options.accessors){let J=e.get_unique_name(Re.exported.name);Ce.specifiers.push({...Re,type:"ImportSpecifier",imported:Re.local,local:J}),P.push({type:"MethodDefinition",kind:"get",key:{type:"Identifier",name:Re.exported.name},value:v`function() {
|
||
|
return ${J}
|
||
|
}`})}else e.compile_options.dev&&P.push({type:"MethodDefinition",kind:"get",key:{type:"Identifier",name:Re.exported.name},value:v`function() {
|
||
|
throw new @_Error("<${e.tag}>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
|
||
|
}`})})}),e.compile_options.dev){let z=$.filter(J=>J.writable&&!J.initialised);z.length&&(I=_`
|
||
|
$$self.$$.on_mount.push(function () {
|
||
|
${z.map(J=>_`
|
||
|
if (${J.name} === undefined && !(('${J.export_name}' in $$props) || $$self.$$.bound[$$self.$$.props['${J.export_name}']])) {
|
||
|
@_console.warn("<${e.tag}> was created without expected prop '${J.export_name}'");
|
||
|
}`)}
|
||
|
});
|
||
|
`);let Ce=e.vars.filter(J=>!J.internal&&!J.global&&!J.name.startsWith("$$"));Ce.length>0&&(q=v`() => ({ ${Ce.map(J=>qe`${J.name}`)} })`);let Re=Ce.filter(J=>!J.module&&J.writable&&J.name[0]!=="$");(y||Re.length>0)&&(B=v`
|
||
|
${b} => {
|
||
|
${y&&n.invalidate("$$props",v`$$props = @assign(@assign({}, $$props), $$new_props)`)}
|
||
|
${Re.map(J=>_`if ('${J.name}' in $$props) ${n.invalidate(J.name,v`${J.name} = ${b}.${J.name}`)};`)}
|
||
|
}
|
||
|
`,A=_`
|
||
|
if ($$props && "$$inject" in $$props) {
|
||
|
$$self.$inject_state($$props.$$inject);
|
||
|
}
|
||
|
`)}if(e.ast.instance){let z=e.instance_scope,Ce=e.instance_scope_map,Re=null;we(e.ast.instance.content,{enter(J){Ce.has(J)?(z=Ce.get(J),!Re&&!z.block&&(Re=J)):!Re&&J.type==="LabeledStatement"&&J.label.name==="$"&&(Re=J)},leave(J){if(Ce.has(J)&&(z=z.parent),Re===J&&(Re=null),J.type==="AssignmentExpression"||J.type==="UpdateExpression"){let ct=J.type==="AssignmentExpression"?J.left:J.argument,We=new Set(Ye(ct));this.replace(Ii(n,z,J,We,Re===null))}}}),e.rewrite_props(({name:J,reassigned:ct,export_name:We})=>{let Be=`$${J}`,dt=n.context_lookup.get(`$${J}`).index,xt=ct||We?_`${`$$subscribe_${J}`}()`:_`@component_subscribe($$self, ${J}, #value => $$invalidate(${dt}, ${Be} = #value))`;return e.compile_options.dev?_`@validate_store(${J}, '${J}'); ${xt}`:xt})}let K=[v`$$self`];$.length>0||e.has_reactive_assignments||e.slots.size>0||q||B?K.push(v`$$props`,v`$$invalidate`):e.compile_options.dev&&K.push(v`$$props`);let F=e.compile_options.dev||i.has_content();F&&s.push(_`
|
||
|
function create_fragment(#ctx) {
|
||
|
${i.get_contents()}
|
||
|
}
|
||
|
`),s.push(_`
|
||
|
${e.extract_javascript(e.ast.module)}
|
||
|
|
||
|
${e.fully_hoisted}
|
||
|
`);let O=$.filter(z=>e.var_lookup.get(z.name).hoistable?!1:z.name[0]!=="$"),G=e.vars.filter(z=>z.name[0]==="$"&&z.name[1]!=="$"),X=e.extract_javascript(e.ast.instance),te=e.compile_options.dev||X&&X.length>0||O.length>0||y||e.partly_hoisted.length>0||n.initial_context.length>0||e.reactive_declarations.length>0||q||B,oe=te?e.alias("instance"):{type:"Literal",value:null},me=G.filter(z=>{let Ce=e.var_lookup.get(z.name.slice(1));return!Ce||Ce.hoistable}).map(({name:z})=>_`
|
||
|
${e.compile_options.dev&&_`@validate_store(${z.slice(1)}, '${z.slice(1)}');`}
|
||
|
@component_subscribe($$self, ${z.slice(1)}, $$value => $$invalidate(${n.context_lookup.get(z).index}, ${z} = $$value));
|
||
|
`),ce=G.filter(z=>{let Ce=e.var_lookup.get(z.name.slice(1));return Ce&&(Ce.reassigned||Ce.export_name)}).map(({name:z})=>_`$$self.$$.on_destroy.push(() => ${`$$unsubscribe_${z.slice(1)}`}());`);if(te){let z=[],Ce=[];e.reactive_declarations.forEach(Be=>{let dt=Array.from(Be.dependencies),xt=!!dt.find(Fr=>Fr==="$$props"||Fr==="$$restProps"),Xt=dt.filter(Fr=>{let T=e.var_lookup.get(Fr);return T&&(T.export_name||T.mutated||T.reassigned)}),Zt=!xt&&Xt.length>0&&n.dirty(Xt,!0),an=Be.node;Zt&&(an=_`if (${Zt}) { ${an} }`[0]),Zt||xt?z.push(an):Ce.push(an)});let Re=Array.from(e.injected_reactive_declaration_vars).filter(Be=>{let dt=e.var_lookup.get(Be);return dt.injected&&dt.name[0]!=="$"}),J=G.map(Be=>{let dt=Be.name,xt=dt.slice(1),Xt=e.var_lookup.get(xt);if(Xt&&(Xt.reassigned||Xt.export_name)){let Zt=`$$unsubscribe_${xt}`,an=`$$subscribe_${xt}`,Fr=n.context_lookup.get(dt).index;return _`let ${dt}, ${Zt} = @noop, ${an} = () => (${Zt}(), ${Zt} = @subscribe(${xt}, $$value => $$invalidate(${Fr}, ${dt} = $$value)), ${xt})`}return _`let ${dt};`}),ct;e.compile_options.dev&&!(y||w)&&(ct=_`
|
||
|
const writable_props = [${C.map(Be=>v`'${Be.export_name}'`)}];
|
||
|
@_Object.keys($$props).forEach(key => {
|
||
|
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') @_console.warn(\`<${e.tag}> was created with unknown prop '\${key}'\`);
|
||
|
});
|
||
|
`);let We={type:"ArrayExpression",elements:n.initial_context.map(Be=>({type:"Identifier",name:Be.name}))};s.push(_`
|
||
|
function ${oe}(${K}) {
|
||
|
${Re.map(Be=>_`let ${Be};`)}
|
||
|
|
||
|
${H}
|
||
|
|
||
|
${J}
|
||
|
|
||
|
${me}
|
||
|
|
||
|
${ce}
|
||
|
|
||
|
${e.slots.size||e.compile_options.dev||f?_`let { $$slots: #slots = {}, $$scope } = $$props;`:null}
|
||
|
${e.compile_options.dev&&_`@validate_slots('${e.tag}', #slots, [${[...e.slots.keys()].map(Be=>`'${Be}'`).join(",")}]);`}
|
||
|
${m}
|
||
|
|
||
|
${X}
|
||
|
|
||
|
${I}
|
||
|
${ct}
|
||
|
|
||
|
${n.binding_groups.size>0&&_`const $$binding_groups = [${[...n.binding_groups.keys()].map(Be=>v`[]`)}];`}
|
||
|
|
||
|
${e.partly_hoisted}
|
||
|
|
||
|
${Y&&_`$$self.$$set = ${Y};`}
|
||
|
|
||
|
${q&&_`$$self.$capture_state = ${q};`}
|
||
|
|
||
|
${B&&_`$$self.$inject_state = ${B};`}
|
||
|
|
||
|
${A}
|
||
|
|
||
|
${z.length>0&&_`
|
||
|
$$self.$$.update = () => {
|
||
|
${z}
|
||
|
};
|
||
|
`}
|
||
|
|
||
|
${Ce}
|
||
|
|
||
|
${y&&_`$$props = @exclude_internal_props($$props);`}
|
||
|
|
||
|
return ${We};
|
||
|
}
|
||
|
`)}let ge=v`{
|
||
|
${$.filter(z=>z.export_name&&!z.module).map(z=>qe`${z.export_name}: ${n.context_lookup.get(z.name).index}`)}
|
||
|
}`,Ne;if(n.context_overflow){Ne=v`[]`;for(let z=0;z<n.context.length;z+=31)Ne.elements.push(v`-1`)}let Et={type:"Identifier",name:t.dev?"@SvelteComponentDev":"@SvelteComponent"},at=[];d?at.push(c):Ne&&at.push(v`null`),Ne&&at.push(Ne);let _t=_`
|
||
|
class ${r} extends ${Et} {
|
||
|
constructor(options) {
|
||
|
super(${t.dev&&"options"});
|
||
|
@init(this, options, ${oe}, ${F?"create_fragment":"null"}, ${j}, ${ge}, ${at});
|
||
|
${t.dev&&_`@dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "${r.name}", options, id: create_fragment.name });`}
|
||
|
}
|
||
|
}
|
||
|
`[0];if(hr(_t.body.body,P),s.push(_t),t.customElement){let z=C.reduce((We,Be)=>(We[Be.export_name]=e.component_options.customElement?.props?.[Be.export_name]||{},Be.is_boolean&&!We[Be.export_name].type&&(We[Be.export_name].type="Boolean"),We),{}),Ce=[...e.slots.keys()].map(We=>`"${We}"`).join(","),Re=P.filter(We=>We.kind==="get"&&!C.some(Be=>Be.export_name===We.key.name)).map(We=>`"${We.key.name}"`).join(","),J=e.component_options.customElement?.shadow!=="none"?"true":"false",ct=v`@create_custom_element(${r}, ${JSON.stringify(z)}, [${Ce}], [${Re}], ${J}, ${e.component_options.customElement?.extend})`;e.component_options.customElement?.tag?s.push(_`@_customElements.define("${e.component_options.customElement.tag}", ${ct});`):s.push(_`${ct}`)}return t.discloseVersion===!0&&e.imports.unshift({type:"ImportDeclaration",specifiers:[],source:{type:"Literal",value:`${t.sveltePath??"svelte"}/internal/disclose-version`}}),{js:$n(s),css:a}}l();l();l();l();function Dr(e){return e.length===0?null:{type:"VariableDeclaration",kind:"let",declarations:e.map(t=>{let r=t.node.expression;return{type:"VariableDeclarator",id:r.left,init:r.right}})}}function gE(e,t,r){t.push(),t.render(e.pending.children,r);let n=t.pop();t.push(),t.render(e.then.children,r);let i=t.pop();t.add_expression(v`
|
||
|
function(__value) {
|
||
|
if (@is_promise(__value)) {
|
||
|
__value.then(null, @noop);
|
||
|
return ${n};
|
||
|
}
|
||
|
return (function(${e.then_node?e.then_node:""}) { ${Dr(e.then.const_tags)}; return ${i}; }(__value));
|
||
|
}(${e.expression.node})
|
||
|
`)}l();function vE(e,t,r){r.preserveComments&&t.add_string(`<!--${e.data}-->`)}l();function yE(e,t,r){if(!r.dev)return;let n=r.filename||null,{line:i,column:s}=r.locate(e.start+1),a=v`{
|
||
|
${e.expressions.map(u=>qe`${u.node.name}`)}
|
||
|
}`;t.add_expression(v`@debug(${n?v`"${n}"`:v`null`}, ${i-1}, ${s}, ${a})`)}l();function bE(e,t,r){let n=[e.context_node];e.index&&n.push({type:"Identifier",name:e.index}),t.push(),t.render(e.children,r);let i=t.pop(),s=v`@each(${e.expression.node}, (${n}) => { ${Dr(e.const_tags)}; return ${i} })`;if(e.else){t.push(),t.render(e.else.children,r);let a=t.pop();e.else.const_tags.length>0&&(a=v`(() => { ${Dr(e.else.const_tags)}; return ${a} })()`),t.add_expression(v`${e.expression.node}.length ? ${s} : ${a}`)}else t.add_expression(s)}l();l();l();var Wz=/[&"<]/g,Yz=/[&<]/g;function xE(e,t=!1){let r=String(e),n=t?Wz:Yz;n.lastIndex=0;let i="",s=0;for(;n.test(r);){let a=n.lastIndex-1,u=r[a];i+=r.substring(s,a)+(u==="&"?"&":u==='"'?""":"<"),s=a+1}return i+r.substring(s)}function vv(e){if(e.chunks.length===2&&e.chunks[1].synthetic){let t=e.chunks[0].node;return v`@escape(@null_to_empty(${t}), true) + "${e.chunks[1].data}"`}return Br(e)}function Br(e){if(e.chunks.length===0)return v`""`;let t=e.parent.name.toLowerCase()==="textarea"&&e.name.toLowerCase()==="value";return e.chunks.map(r=>r.type==="Text"?Qe(xE(r.data,!0)):v`@escape(${r.node}, ${t?"false":"true"})`).reduce((r,n)=>v`${r} + ${n}`)}function wE(e){return e.chunks.length===1&&e.chunks[0].type==="Expression"?e.chunks[0].node:Br(e)}l();function Oa(e,t){let r=[],n,i=e.length;for(;i--;){let a=e[i];if(a.type==="Text"){if(a.should_skip())continue;let{data:u}=a;if(r.length===0&&(t?t.type==="Text"&&ui.test(t.data)&&Kz(a,t):!a.has_ancestor("EachBlock"))&&!a.keep_space()&&(u=Ti(u),!u))continue;if(n&&n.type==="Text"){n.data=u+n.data;continue}a.data=u,r.unshift(a),ei(n,n=a)}else r.unshift(a),ei(n,n=a)}let s=r[0];return s&&s.type==="Text"&&!s.keep_space()&&(s.data=qi(s.data),s.data||(s.var=null,r.shift(),r[0]&&(r[0].prev=null))),r}function Kz(e,t){return t.find_nearest(/EachBlock/)===e.find_nearest(/EachBlock/)||t.prev.type==="EachBlock"}function kE(e,t,r){let n=Oa(e.children,e.next),i,s=U0(e);e.is_dynamic_element&&t.push(),t.add_string("<"),p();let a=e.classes.map(f=>{let{expression:m,name:y}=f,w=m?m.node:v`#ctx.${y}`;return v`${w} ? "${y}" : ""`});e.needs_manual_style_scoping&&a.push(v`"${e.component.stylesheet.id}"`);let u=a.length>0&&a.reduce((f,m)=>v`${f} + ' ' + ${m}`),o=e.styles.map(f=>{let{name:m,important:y,expression:{node:w}}=f;return y&&(w=v`${w} + ' !important'`),qe`"${m}": ${w}`}),c=o.length>0&&v`{ ${o} }`;if(e.attributes.some(f=>f.is_spread)){let f=[];e.attributes.forEach(m=>{if(m.is_spread)f.push(v`@escape_object(${m.expression.node})`);else{let y=e.namespace===Ve.foreign?m.name:bn(m.name),w=m.name.toLowerCase();if(w==="value"&&e.name.toLowerCase()==="textarea")i=Br(m);else if(m.is_true)f.push(v`{ ${y}: true }`);else if(Wn.has(w)&&m.chunks.length===1&&m.chunks[0].type!=="Text")f.push(v`{ ${y}: ${m.chunks[0].node} || null }`);else if(m.chunks.length===1&&m.chunks[0].type!=="Text"){let b=m.chunks[0].node;f.push(v`{ ${y}: @escape_attribute_value(${b}) }`)}else f.push(v`{ ${y}: ${Br(m)} }`)}}),t.add_expression(v`@spread([${f}], { classes: ${u}, styles: ${c} })`)}else{let f=!!u,m=!!c;e.attributes.forEach(y=>{let w=y.name.toLowerCase(),b=e.namespace===Ve.foreign?y.name:bn(y.name);if(w==="value"&&e.name.toLowerCase()==="textarea")i=Br(y);else if(y.is_true)t.add_string(` ${b}`);else if(Wn.has(w)&&y.chunks.length===1&&y.chunks[0].type!=="Text")t.add_string(" "),t.add_expression(v`${y.chunks[0].node} ? "${b}" : ""`);else if(w==="class"&&u)f=!1,t.add_string(` ${b}="`),t.add_expression(v`[${vv(y)}, ${u}].join(' ').trim()`),t.add_string('"');else if(w==="style"&&c)m=!1,t.add_expression(v`@add_styles(@merge_ssr_styles(${Br(y)}, ${c}))`);else if(y.chunks.length===1&&y.chunks[0].type!=="Text"){let $=y.chunks[0].node;t.add_expression(v`@add_attribute("${b}", ${$}, ${Wn.has(w)?1:0})`)}else t.add_string(` ${b}="`),t.add_expression((w==="class"?vv:Br)(y)),t.add_string('"')}),f&&t.add_expression(v`@add_classes((${u}).trim())`),m&&t.add_expression(v`@add_styles(${c})`)}if(e.bindings.forEach(f=>{let{name:m,expression:y}=f;if(!f.is_readonly){if(m==="group"){let w=e.attributes.find
|
||
|
`)}}t.add_expression(i)}d()}else{if(e.name==="pre"){let f=n[0];f&&f.type==="Text"&&cn.test(f.data)&&t.add_string(`
|
||
|
`)}if(e.is_dynamic_element&&t.push(),t.render(n,r),e.is_dynamic_element){let f=t.pop();t.add_expression(v`@is_void(#tag) ? '' : ${f}`)}d()}if(e.is_dynamic_element){let f=t.pop();r.dev&&e.children.length>0&&(f=v`(() => { @validate_void_dynamic_element(#tag); return ${f}; })()`),t.add_expression(v`((#tag) => {
|
||
|
${r.dev&&v`@validate_dynamic_element(#tag)`}
|
||
|
return #tag ? ${f} : '';
|
||
|
})(${e.tag_expr.node})`)}function d(){if(e.tag_expr.node.type==="Literal"){Ur(e.tag_expr.node.value)||(t.add_string("</"),p(),t.add_string(">"));return}t.add_expression(v`@is_void(#tag) ? '' : \`</\${#tag}>\``)}function p(){e.tag_expr.node.type==="Literal"?t.add_string(e.tag_expr.node.value):t.add_expression(e.tag_expr.node)}}l();function $E(e,t,r){let n={...r,head_id:e.id};t.push(),t.render(e.children,n);let s=t.pop();if(r.hydratable){let a=`HEAD_${e.id}_START`,u=`HEAD_${e.id}_END`;s=v`'<!-- ${a} -->' + ${s} + '<!-- ${u} -->'`}t.add_expression(v`$$result.head += ${s}, ""`)}l();function CE(e,t,r){r.hydratable&&t.add_string("<!-- HTML_TAG_START -->"),t.add_expression(e.expression.node),r.hydratable&&t.add_string("<!-- HTML_TAG_END -->")}l();function SE(e,t,r){let n=e.expression.node;t.push(),t.render(e.children,r);let i=t.pop();e.const_tags.length>0&&(i=v`(() => { ${Dr(e.const_tags)}; return ${i} })()`),t.push(),e.else&&t.render(e.else.children,r);let s=t.pop();e.else&&e.else.const_tags.length>0&&(s=v`(() => { ${Dr(e.else.const_tags)}; return ${s} })()`),t.add_expression(v`${n} ? ${i} : ${s}`)}l();function EE(e){return e.is_true?v`true`:e.chunks.length===0?v`''`:e.chunks.map(t=>t.type==="Text"?Qe(t.data):t.node).reduce((t,r)=>v`${t} + ${r}`)}function RE(e,t,r){let n=[],i=[];e.bindings.forEach(f=>{t.has_bindings=!0;let m=f.expression.node;n.push(qe`${f.name}: ${m}`),i.push(qe`${f.name}: $$value => { ${m} = $$value; $$settled = false }`)});let s=e.attributes.find(f=>f.is_spread),a;s?a=v`@_Object.assign({}, ${e.attributes.map(f=>f.is_spread?f.expression.node:v`{ ${f.name}: ${EE(f)} }`).concat(n.map(f=>v`{ ${f} }`))})`:a=v`{
|
||
|
${e.attributes.map(f=>qe`${f.name}: ${EE(f)}`)},
|
||
|
${n}
|
||
|
}`;let u=v`{
|
||
|
${i}
|
||
|
}`,o=e.name==="svelte:self"?t.name:e.name==="svelte:component"?v`(${e.expression.node}) || @missing_component`:e.name.split(".").reduce((f,m)=>v`${f}.${m}`),c=[],d=e.children;if(d.length){let f=new Map;t.render(d,Object.assign({},r,{slot_scopes:f})),f.forEach(({input:m,output:y,statements:w},b)=>{c.push(qe`${b}: (${m}) => { ${w}; return ${y}; }`)})}let p=v`{
|
||
|
${c}
|
||
|
}`;e.css_custom_properties.length>0&&(e.namespace===Ve.svg?t.add_string('<g style="'):t.add_string('<div style="display: contents; '),e.css_custom_properties.forEach((f,m)=>{t.add_string(`${f.name}:`),t.add_expression(Br(f)),t.add_string(";"),m<e.css_custom_properties.length-1&&t.add_string(" ")}),t.add_string('">')),t.add_expression(v`@validate_component(${o}, "${e.name}").$$render($$result, ${a}, ${u}, ${p})`),e.css_custom_properties.length>0&&(e.namespace===Ve.svg?t.add_string("</g>"):t.add_string("</div>"))}l();function PE(e,t,r){t.render(e.children,r)}l();l();function Ih(e){return e.length===0?null:{type:"ObjectPattern",properties:e.map(t=>({type:"Property",kind:"init",method:!1,shorthand:!1,computed:!1,key:t.name,value:t.value||t.name}))}}function AE(e,t,r){let n=Ta(e.values),i=e.get_static_attribute_value("slot"),s=e.find_nearest(/InlineComponent/);i&&s&&t.push(),t.push(),t.render(e.children,r);let a=t.pop();t.add_expression(v`
|
||
|
#slots.${e.slot_name}
|
||
|
? #slots.${e.slot_name}(${n})
|
||
|
: ${a}
|
||
|
`),i&&s&&r.slot_scopes.set(i,{input:Ih(e.lets),output:t.pop()})}l();function qE(e,t,r){let n=e.parent,i=Oa(e instanceof Un?e.children:[e],e.next);t.push(),t.render(i,r);let s=t.pop();if(!Qz(s)){if(r.slot_scopes.has(e.slot_template_name))throw e.slot_template_name==="default"?new Error('Found elements without slot attribute when using slot="default"'):new Error(`Duplicate slot name "${e.slot_template_name}" in <${n.name}>`);r.slot_scopes.set(e.slot_template_name,{input:Ih(e.lets),output:s,statements:Dr(e.const_tags)})}}function Qz(e){return e.expressions.length===0&&e.quasis.length===1&&e.quasis[0].value.raw===""}l();function TE(e,t,r){let n=e.expression.node;t.add_expression(e.parent&&e.parent.type==="Element"&&e.parent.name==="style"?n:v`@escape(${n})`)}l();function LE(e,t,r){let n=e.data;e.use_space()?n=" ":(!e.parent||e.parent.type!=="Element"||e.parent.name!=="script"&&e.parent.name!=="style")&&(n=Us(n)),t.add_string(n)}l();function ME(e,t,r){t.push(),t.add_string("<title>"),t.render(e.children,r),t.add_string("</title>");let n=t.pop();t.add_expression(v`$$result.title = ${n}, ""`)}l();function IE(e){if(!e.quasis.length)return;let t=[],r=[],n=e.quasis[0];for(let i=0;i<e.quasis.length;i++){let s=e.expressions[i],a=e.quasis[i+1];a&&s&&s.type==="Literal"&&typeof s.value=="string"?n.value.raw+=rl(s.value)+a.value.raw:(s&&r.push(s),t.push(n),n=a)}e.quasis=t,e.expressions=r}function Oh(){}var Xz={AwaitBlock:gE,Body:Oh,Comment:vE,DebugTag:yE,Document:Oh,EachBlock:bE,Element:kE,Head:$E,IfBlock:SE,InlineComponent:RE,KeyBlock:PE,MustacheTag:TE,Options:Oh,RawMustacheTag:CE,Slot:AE,SlotTemplate:qE,Text:LE,Title:ME,Window:Oh},Na=class{constructor({name:t}){g(this,"has_bindings",!1);g(this,"name");g(this,"stack",[]);g(this,"current");g(this,"literal");g(this,"targets",[]);this.name=t,this.push()}add_string(t){this.current.value+=rl(t)}add_expression(t){this.literal.quasis.push({type:"TemplateElement",value:{raw:this.current.value,cooked:null},tail:!1}),this.literal.expressions.push(t),this.current.value=""}push(){let t=this.current={value:""},r=this.literal={type:"TemplateLiteral",expressions:[],quasis:[]};this.stack.push({current:t,literal:r})}pop(){this.literal.quasis.push({type:"TemplateElement",value:{raw:this.current.value,cooked:null},tail:!0});let t=this.stack.pop(),r=this.stack[this.stack.length-1];return r&&(this.literal=r.literal,this.current=r.current),IE(t.literal),t.literal}render(t,r){t.forEach(n=>{let i=Xz[n.type];if(!i)throw new Error(`No handler for '${n.type}' nodes`);i(n,this,r)})}};function yv(e,t){let r=new Na({name:e.name}),{name:n}=e;r.render(Zz(e.fragment.children),Object.assign({locate:e.locate},t));let i=r.pop(),s=t.customElement?{code:null,map:null}:e.stylesheet.render(t.filename),a=e.var_lookup.has("$$restProps"),u=e.vars.filter(P=>!P.module&&P.export_name),o=a?_`let $$restProps = @compute_rest_props($$props, [${u.map(P=>`"${P.export_name}"`).join(",")}]);`:null,d=e.var_lookup.has("$$slots")?_`let $$slots = @compute_slots(#slots);`:null,p=e.vars.filter(P=>P.name[0]==="$"&&P.name[1]!=="$"),f=p.filter(P=>{let j=e.var_lookup.get(P.name.slice(1));return!j||j.hoistable}).map(({name:P})=>{let j=P.slice(1);return _`
|
||
|
${e.compile_options.dev&&_`@validate_store(${j}, '${j}');`}
|
||
|
${`$$unsubscribe_${j}`} = @subscribe(${j}, #value => ${P} = #value)
|
||
|
`}),m=p.map(({name:P})=>_`${`$$unsubscribe_${P.slice(1)}`}()`),y=p.map(({name:P})=>{let j=P.slice(1),I=e.var_lookup.get(j);if(I&&I.reassigned){let B=`$$unsubscribe_${j}`,q=`$$subscribe_${j}`;return _`let ${P}, ${B} = @noop, ${q} = () => (${B}(), ${B} = @subscribe(${j}, $$value => ${P} = $$value), ${j})`}return _`let ${P}, ${`$$unsubscribe_${j}`};`});if(e.ast.instance){let P=e.instance_scope,j=e.instance_scope_map;we(e.ast.instance.content,{enter(I){j.has(I)&&(P=j.get(I))},leave(I){if(j.has(I)&&(P=P.parent),I.type==="AssignmentExpression"||I.type==="UpdateExpression"){let B=I.type==="AssignmentExpression"?I.left:I.argument,q=new Set(Ye(B)),A=new Set;for(let K of q){let ee=e.var_lookup.get(K);ee&&!ee.hoistable&&!ee.global&&!ee.module&&(ee.subscribable||ee.name[0]==="$")&&A.add(ee.name)}A.size&&this.replace(Ii({component:e},P,I,A,!0))}}})}e.rewrite_props(({name:P,reassigned:j})=>{let I=`$${P}`,B=j?_`${`$$subscribe_${P}`}()`:_`${`$$unsubscribe_${P}`} = @subscribe(${P}, #value => $${I} = #value)`;return e.compile_options.dev&&(B=_`@validate_store(${P}, '${P}'); ${B}`),B});let w=e.extract_javascript(e.ast.instance),b=w?e.vars.filter(P=>!P.module&&P.export_name).map(P=>_`if ($$props.${P.export_name} === void 0 && $$bindings.${P.export_name} && ${P.name} !== void 0) $$bindings.${P.export_name}(${P.name});`):[],$=Array.from(e.injected_reactive_declaration_vars).filter(P=>e.var_lookup.get(P).injected),C=e.reactive_declarations.map(P=>{let j=P.node.body,I=_`${j}`;return P.declaration||(I=_`$: { ${I} }`),I}),R=r.has_bindings?_`
|
||
|
let $$settled;
|
||
|
let $$rendered;
|
||
|
let #previous_head = $$result.head;
|
||
|
|
||
|
do {
|
||
|
$$settled = true;
|
||
|
// $$result.head is mutated by the literal expression
|
||
|
// need to reset it if we're looping back to prevent duplication
|
||
|
$$result.head = #previous_head;
|
||
|
|
||
|
${C}
|
||
|
|
||
|
$$rendered = ${i};
|
||
|
} while (!$$settled);
|
||
|
|
||
|
${m}
|
||
|
|
||
|
return $$rendered;
|
||
|
`:_`
|
||
|
${C}
|
||
|
|
||
|
${m}
|
||
|
|
||
|
return ${i};`,E=[...$.map(P=>_`let ${P};`),o,d,...y,...f,w,...b,s.code&&_`$$result.css.add(#css);`,R].filter(Boolean),H=ti(t.enableSourcemap,"css");return{js:_`
|
||
|
${s.code?_`
|
||
|
const #css = {
|
||
|
code: "${s.code}",
|
||
|
map: ${H&&s.map?Qe(s.map.toString()):"null"}
|
||
|
};`:null}
|
||
|
|
||
|
${e.extract_javascript(e.ast.module)}
|
||
|
|
||
|
${e.fully_hoisted}
|
||
|
|
||
|
const ${n} = @create_ssr_component(($$result, $$props, $$bindings, #slots) => {
|
||
|
${E}
|
||
|
});
|
||
|
`,css:s}}function Zz(e){let t=0;for(;t<e.length;t+=1){let n=e[t];if(n.type!=="Text"||(n.data=n.data.replace(/^\s+/,""),n.data))break}let r=e.length;for(;r>t;r-=1){let n=e[r-1];if(n.type!=="Text"||(n.data=n.data.trimRight(),n.data))break}return e.slice(t,r)}l();var zh=jr(qh(),1);l();var OE=new Set(["AbortController","AbortSignal","AbstractRange","ActiveXObject","AggregateError","AnalyserNode","Animation","AnimationEffect","AnimationEvent","AnimationPlaybackEvent","AnimationTimeline","Array","ArrayBuffer","Atomics","Attr","Audio","AudioBuffer","AudioBufferSourceNode","AudioContext","AudioDestinationNode","AudioListener","AudioNode","AudioParam","AudioParamMap","AudioProcessingEvent","AudioScheduledSourceNode","AudioWorklet","AudioWorkletNode","AuthenticatorAssertionResponse","AuthenticatorAttestationResponse","AuthenticatorResponse","BarProp","BaseAudioContext","BeforeUnloadEvent","BigInt","BigInt64Array","BigUint64Array","BiquadFilterNode","Blob","BlobEvent","Boolean","BroadcastChannel","ByteLengthQueuingStrategy","CDATASection","CSS","CSSAnimation","CSSConditionRule","CSSCounterStyleRule","CSSFontFaceRule","CSSGroupingRule","CSSImportRule","CSSKeyframeRule","CSSKeyframesRule","CSSMediaRule","CSSNamespaceRule","CSSPageRule","CSSRule","CSSRuleList","CSSStyleDeclaration","CSSStyleRule","CSSStyleSheet","CSSSupportsRule","CSSTransition","Cache","CacheStorage","CanvasCaptureMediaStreamTrack","CanvasGradient","CanvasPattern","CanvasRenderingContext2D","ChannelMergerNode","ChannelSplitterNode","CharacterData","ClientRect","Clipboard","ClipboardEvent","ClipboardItem","CloseEvent","Comment","CompositionEvent","ConstantSourceNode","ConvolverNode","CountQueuingStrategy","Credential","CredentialsContainer","Crypto","CryptoKey","CustomElementRegistry","CustomEvent","DOMException","DOMImplementation","DOMMatrix","DOMMatrixReadOnly","DOMParser","DOMPoint","DOMPointReadOnly","DOMQuad","DOMRect","DOMRectList","DOMRectReadOnly","DOMStringList","DOMStringMap","DOMTokenList","DataTransfer","DataTransferItem","DataTransferItemList","DataView","Date","DelayNode","DeviceMotionEvent","DeviceOrientationEvent","Document","DocumentFragment","DocumentTimeline","DocumentType","DragEvent","DynamicsCompressorNode","Element","ElementInternals","Enumerator","Error","ErrorEvent","EvalError","Event","EventCounts","EventSource","EventTarget","External","File","FileList","FileReader","FileSystem","FileSystemDirectoryEntry","FileSystemDirectoryHandle","FileSystemDirectoryReader","FileSystemEntry","FileSystemFileEntry","FileSystemFileHandle","FileSystemHandle","FinalizationRegistry","Float32Array","Float64Array","FocusEvent","FontFace","FontFaceSet","FontFaceSetLoadEvent","FormData","FormDataEvent","Function","GainNode","Gamepad","GamepadButton","GamepadEvent","GamepadHapticActuator","Geolocation","GeolocationCoordinates","GeolocationPosition","GeolocationPositionError","HTMLAllCollection","HTMLAnchorElement","HTMLAreaElement","HTMLAudioElement","HTMLBRElement","HTMLBaseElement","HTMLBodyElement","HTMLButtonElement","HTMLCanvasElement","HTMLCollection","HTMLDListElement","HTMLDataElement","HTMLDataListElement","HTMLDetailsElement","HTMLDialogElement","HTMLDirectoryElement","HTMLDivElement","HTMLDocument","HTMLElement","HTMLEmbedElement","HTMLFieldSetElement","HTMLFontElement","HTMLFormControlsCollection","HTMLFormElement","HTMLFrameElement","HTMLFrameSetElement","HTMLHRElement","HTMLHeadElement","HTMLHeadingElement","HTMLHtmlElement","HTMLIFrameElement","HTMLImageElement","HTMLInputElement","HTMLLIElement","HTMLLabelElement","HTMLLegendElement","HTMLLinkElement","HTMLMapElement","HTMLMarqueeElement","HTMLMediaElement","HTMLMenuElement","HTMLMetaElement","HTMLMeterElement","HTMLModElement","HTMLOListElement","HTMLObjectElement","HTMLOptGroupElement","HTMLOptionElement","HTMLOptionsCollection","HTMLOutputElement","HTMLParagraphElement","HTMLParamElement","HTMLPictureElement","HTMLPreElement","HTMLProgressElement","HTMLQuoteElement","HTMLScriptElement","HTMLSelectElement","HTMLSlotElement","HTMLSourceElement","HTMLSpanElement","HTMLStyleElement","HTMLTableCapti
|
||
|
/* ${r} */
|
||
|
|
||
|
${d}
|
||
|
${p}
|
||
|
${u}
|
||
|
${c}
|
||
|
|
||
|
${e.body}
|
||
|
|
||
|
export default ${t};
|
||
|
${m}
|
||
|
`}l();l();var DE=jr(hi(),1),Nh=class e{constructor(t){this.bits=t instanceof e?t.bits.slice():[]}add(t){this.bits[t>>5]|=1<<(t&31)}has(t){return!!(this.bits[t>>5]&1<<(t&31))}},Dh=class e{constructor(t,r,n){this.start=t,this.end=r,this.original=n,this.intro="",this.outro="",this.content=n,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(t){this.outro+=t}appendRight(t){this.intro=this.intro+t}clone(){let t=new e(this.start,this.end,this.original);return t.intro=this.intro,t.outro=this.outro,t.content=this.content,t.storeName=this.storeName,t.edited=this.edited,t}contains(t){return this.start<t&&t<this.end}eachNext(t){let r=this;for(;r;)t(r),r=r.next}eachPrevious(t){let r=this;for(;r;)t(r),r=r.previous}edit(t,r,n){return this.content=t,n||(this.intro="",this.outro=""),this.storeName=r,this.edited=!0,this}prependLeft(t){this.outro=t+this.outro}prependRight(t){this.intro=t+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(t){let r=t-this.start,n=this.original.slice(0,r),i=this.original.slice(r);this.original=n;let s=new e(t,this.end,i);return s.outro=this.outro,this.outro="",this.end=t,this.edited?(s.edit("",!1),this.content=""):this.content=n,s.next=this.next,s.next&&(s.next.previous=s),s.previous=this,this.next=s,s}toString(){return this.intro+this.content+this.outro}trimEnd(t){if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;let r=this.content.replace(t,"");if(r.length)return r!==this.content&&(this.split(this.start+r.length).edit("",void 0,!0),this.edited&&this.edit(r,this.storeName,!0)),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(t,""),this.intro.length)return!0}trimStart(t){if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;let r=this.content.replace(t,"");if(r.length){if(r!==this.content){let n=this.split(this.end-r.length);this.edited&&n.edit(r,this.storeName,!0),this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(t,""),this.outro.length)return!0}};function rG(){return typeof globalThis<"u"&&typeof globalThis.btoa=="function"?e=>globalThis.btoa(unescape(encodeURIComponent(e))):typeof Buffer=="function"?e=>Buffer.from(e,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}var nG=rG(),xv=class{constructor(t){this.version=3,this.file=t.file,this.sources=t.sources,this.sourcesContent=t.sourcesContent,this.names=t.names,this.mappings=(0,DE.encode)(t.mappings),typeof t.x_google_ignoreList<"u"&&(this.x_google_ignoreList=t.x_google_ignoreList)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+nG(this.toString())}};function iG(e){let t=e.split(`
|
||
|
`),r=t.filter(s=>/^\t+/.test(s)),n=t.filter(s=>/^ {2,}/.test(s));if(r.length===0&&n.length===0)return null;if(r.length>=n.length)return" ";let i=n.reduce((s,a)=>{let u=/^ +/.exec(a)[0].length;return Math.min(u,s)},1/0);return new Array(i+1).join(" ")}function sG(e,t){let r=e.split(/[/\\]/),n=t.split(/[/\\]/);for(r.pop();r[0]===n[0];)r.shift(),n.shift();if(r.length){let i=r.length;for(;i--;)r[i]=".."}return r.concat(n).join("/")}var aG=Object.prototype.toString;function oG(e){return aG.call(e)==="[object Object]"}function NE(e){let t=e.split(`
|
||
|
`),r=[];for(let n=0,i=0;n<t.length;n++)r.push(i),i+=t[n].length+1;return function(i){let s=0,a=r.length;for(;s<a;){let c=s+a>>1;i<r[c]?a=c:s=c+1}let u=s-1,o=i-r[u];return{line:u,column:o}}}var lG=/\w/,wv=class{constructor(t){this.hires=t,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(t,r,n,i){if(r.length){let s=r.length-1,a=r.indexOf(`
|
||
|
`,0),u=-1;for(;a>=0&&s>a;){let c=[this.generatedCodeColumn,t,n.line,n.column];i>=0&&c.push(i),this.rawSegments.push(c),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,u=a,a=r.indexOf(`
|
||
|
`,a+1)}let o=[this.generatedCodeColumn,t,n.line,n.column];i>=0&&o.push(i),this.rawSegments.push(o),this.advance(r.slice(u+1))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(r));this.pending=null}addUneditedChunk(t,r,n,i,s){let a=r.start,u=!0,o=!1;for(;a<r.end;){if(this.hires||u||s.has(a)){let c=[this.generatedCodeColumn,t,i.line,i.column];this.hires==="boundary"?lG.test(n[a])?o||(this.rawSegments.push(c),o=!0):(this.rawSegments.push(c),o=!1):this.rawSegments.push(c)}n[a]===`
|
||
|
`?(i.line+=1,i.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,u=!0):(i.column+=1,this.generatedCodeColumn+=1,u=!1),a+=1}this.pending=null}advance(t){if(!t)return;let r=t.split(`
|
||
|
`);if(r.length>1){for(let n=0;n<r.length-1;n++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=r[r.length-1].length}},Da=`
|
||
|
`,Hi={insertLeft:!1,insertRight:!1,storeName:!1},Bh=class e{constructor(t,r={}){let n=new Dh(0,t.length,t);Object.defineProperties(this,{original:{writable:!0,value:t},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:n},lastChunk:{writable:!0,value:n},lastSearchedChunk:{writable:!0,value:n},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:r.filename},indentExclusionRanges:{writable:!0,value:r.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new Nh},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:r.ignoreList}}),this.byStart[0]=n,this.byEnd[t.length]=n}addSourcemapLocation(t){this.sourcemapLocations.add(t)}append(t){if(typeof t!="string")throw new TypeError("outro content must be a string");return this.outro+=t,this}appendLeft(t,r){if(typeof r!="string")throw new TypeError("inserted content must be a string");this._split(t);let n=this.byEnd[t];return n?n.appendLeft(r):this.intro+=r,this}appendRight(t,r){if(typeof r!="string")throw new TypeError("inserted content must be a string");this._split(t);let n=this.byStart[t];return n?n.appendRight(r):this.outro+=r,this}clone(){let t=new e(this.original,{filename:this.filename}),r=this.firstChunk,n=t.firstChunk=t.lastSearchedChunk=r.clone();for(;r;){t.byStart[n.start]=n,t.byEnd[n.end]=n;let i=r.next,s=i&&i.clone();s&&(n.next=s,s.previous=n,n=s),r=i}return t.lastChunk=n,this.indentExclusionRanges&&(t.indentExclusionRanges=this.indentExclusionRanges.slice()),t.sourcemapLocations=new Nh(this.sourcemapLocations),t.intro=this.intro,t.outro=this.outro,t}generateDecodedMap(t){t=t||{};let r=0,n=Object.keys(this.storedNames),i=new wv(t.hires),s=NE(this.original);return this.intro&&i.advance(this.intro),this.firstChunk.eachNext(a=>{let u=s(a.start);a.intro.length&&i.advance(a.intro),a.edited?i.addEdit(r,a.content,u,a.storeName?n.indexOf(a.original):-1):i.addUneditedChunk(r,a,this.original,u,this.sourcemapLocations),a.outro.length&&i.advance(a.outro)}),{file:t.file?t.file.split(/[/\\]/).pop():void 0,sources:[t.source?sG(t.file||"",t.source):t.file||""],sourcesContent:t.includeContent?[this.original]:void 0,names:n,mappings:i.raw,x_google_ignoreList:this.ignoreList?[r]:void 0}}generateMap(t){return new xv(this.generateDecodedMap(t))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=iG(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),this.indentStr===null?" ":this.indentStr}indent(t,r){let n=/^[^\r\n]/gm;if(oG(t)&&(r=t,t=void 0),t===void 0&&(this._ensureindentStr(),t=this.indentStr||" "),t==="")return this;r=r||{};let i={};r.exclude&&(typeof r.exclude[0]=="number"?[r.exclude]:r.exclude).forEach(d=>{for(let p=d[0];p<d[1];p+=1)i[p]=!0});let s=r.indentStart!==!1,a=c=>s?`${t}${c}`:(s=!0,c);this.intro=this.intro.replace(n,a);let u=0,o=this.firstChunk;for(;o;){let c=o.end;if(o.edited)i[u]||(o.content=o.content.replace(n,a),o.content.length&&(s=o.content[o.content.length-1]===`
|
||
|
`));else for(u=o.start;u<c;){if(!i[u]){let d=this.original[u];d===`
|
||
|
`?s=!0:d!=="\r"&&s&&(s=!1,u===o.start||(this._splitChunk(o,u),o=o.next),o.prependRight(t))}u+=1}u=o.end,o=o.next}return this.outro=this.outro.replace(n,a),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(t,r){return Hi.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),Hi.insertLeft=!0),this.appendLeft(t,r)}insertRight(t,r){return Hi.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),Hi.insertRight=!0),this.prependRight(t,r)}move(t,r,n){if(n>=t&&n<=r)throw new Error("Cannot move a selection inside itself");this._split(t),this._split(r),this._split(n);let i=this.byStart[t],s=this.byEnd[r],a=i.previous,u=s.next,o=this.byStart[n];if(!o&&s===this.lastChunk)return this;let c=o?o.previous:this.lastChunk;return a&&(a.next=u),u&&(u.previous=a),c&&(c.next=i),o&&(o.previous=s),i.previous||(this.firstChunk=s.next),s.next||(this.lastChunk=i.previous,this.lastChunk.next=null),i.previous=c,s.next=o||null,c||(this.firstChunk=i),o||(this.lastChunk=s),this}overwrite(t,r,n,i){return i=i||{},this.update(t,r,n,{...i,overwrite:!i.contentOnly})}update(t,r,n,i){if(typeof n!="string")throw new TypeError("replacement content must be a string");if(this.original.length!==0){for(;t<0;)t+=this.original.length;for(;r<0;)r+=this.original.length}if(r>this.original.length)throw new Error("end is out of bounds");if(t===r)throw new Error("Cannot overwrite a zero-length range \u2013 use appendLeft or prependRight instead");this._split(t),this._split(r),i===!0&&(Hi.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),Hi.storeName=!0),i={storeName:!0});let s=i!==void 0?i.storeName:!1,a=i!==void 0?i.overwrite:!1;if(s){let c=this.original.slice(t,r);Object.defineProperty(this.storedNames,c,{writable:!0,value:!0,enumerable:!0})}let u=this.byStart[t],o=this.byEnd[r];if(u){let c=u;for(;c!==o;){if(c.next!==this.byStart[c.end])throw new Error("Cannot overwrite across a split point");c=c.next,c.edit("",!1)}u.edit(n,s,!a)}else{let c=new Dh(t,r,"").edit(n,s);o.next=c,c.previous=o}return this}prepend(t){if(typeof t!="string")throw new TypeError("outro content must be a string");return this.intro=t+this.intro,this}prependLeft(t,r){if(typeof r!="string")throw new TypeError("inserted content must be a string");this._split(t);let n=this.byEnd[t];return n?n.prependLeft(r):this.intro=r+this.intro,this}prependRight(t,r){if(typeof r!="string")throw new TypeError("inserted content must be a string");this._split(t);let n=this.byStart[t];return n?n.prependRight(r):this.outro=r+this.outro,this}remove(t,r){if(this.original.length!==0){for(;t<0;)t+=this.original.length;for(;r<0;)r+=this.original.length}if(t===r)return this;if(t<0||r>this.original.length)throw new Error("Character is out of bounds");if(t>r)throw new Error("end must be greater than start");this._split(t),this._split(r);let n=this.byStart[t];for(;n;)n.intro="",n.outro="",n.edit(""),n=r>n.end?this.byStart[n.end]:null;return this}reset(t,r){if(this.original.length!==0){for(;t<0;)t+=this.original.length;for(;r<0;)r+=this.original.length}if(t===r)return this;if(t<0||r>this.original.length)throw new Error("Character is out of bounds");if(t>r)throw new Error("end must be greater than start");this._split(t),this._split(r);let n=this.byStart[t];for(;n;)n.reset(),n=r>n.end?this.byStart[n.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let t=this.lastChunk;do{if(t.outro.length)return t.outro[t.outro.length-1];if(t.content.length)return t.content[t.content.length-1];if(t.intro.length)return t.intro[t.intro.length-1]}while(t=t.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let t=this.outro.lastIndexOf(Da);if(t!==-1)return this.outro.substr(t+1);let r=this.outro,n=this.lastChunk;do{if(n.outro.length>0){if(t=n.outro.lastIndexOf(Da),t!==-1)return n.outro.subs
|
||
|
${s}`})}extract_imports(t){this.imports.push(t)}extract_exports(t,r=!1){let n=_f(t);n.length&&this.push_ignores(n);let i=this._extract_exports(t,r);return n.length&&this.pop_ignores(),i}_extract_exports(t,r){if(t.type==="ExportDefaultDeclaration")return this.error(t,M.default_export);if(t.type==="ExportNamedDeclaration"){if(t.source)return r?this.exports_from.push(t):this.instance_exports_from.push(t),null;if(t.declaration){if(t.declaration.type==="VariableDeclaration")t.declaration.declarations.forEach(n=>{Ye(n.id).forEach(i=>{let s=this.var_lookup.get(i);s.export_name=i,n.init?.type==="Literal"&&typeof n.init.value=="boolean"&&(s.is_boolean=!0),!r&&s.writable&&!(s.referenced||s.referenced_from_script||s.subscribable)&&this.warn(n,ae.unused_export_let(this.name.name,i))})});else{let{name:n}=t.declaration.id,i=this.var_lookup.get(n);i.export_name=n}return t.declaration}else return t.specifiers.forEach(n=>{let i=this.var_lookup.get(n.local.name);i&&(i.export_name=n.exported.name,!r&&i.writable&&!(i.referenced||i.referenced_from_script||i.subscribable)&&this.warn(n,ae.unused_export_let(this.name.name,n.exported.name)))}),null}}extract_javascript(t){return t?t.content.body.filter(r=>!(!r||this.hoistable_nodes.has(r)||this.reactive_declaration_nodes.has(r)||r.type==="ImportDeclaration"||r.type==="ExportDeclaration"&&r.specifiers.length>0)):null}walk_module_js(){let t=this,r=this.ast.module;if(!r)return;we(r.content,{enter(u){u.type==="LabeledStatement"&&u.label.name==="$"&&t.warn(u,ae.module_script_reactive_declaration)}});let{scope:n,globals:i}=Mi(r.content);this.module_scope=n,n.declarations.forEach((u,o)=>{if(o[0]==="$")return this.error(u,M.illegal_declaration);let c=u.type==="VariableDeclaration"&&(u.kind==="var"||u.kind==="let"),d=u.type.startsWith("Import");this.add_var(u,{name:o,module:!0,hoistable:!0,writable:c,imported:d})}),i.forEach((u,o)=>{if(o[0]==="$")return this.error(u,M.illegal_subscription);this.add_var(u,{name:o,global:!0,hoistable:!0})});let{body:s}=r.content,a=s.length;for(;--a>=0;){let u=s[a];if(u.type==="ImportDeclaration"&&(this.extract_imports(u),s.splice(a,1)),zE.test(u.type)){let o=this.extract_exports(u,!0);o?s[a]=o:s.splice(a,1)}}}walk_instance_js_pre_template(){let t=this.ast.instance;if(!t)return;t.content.body.forEach(u=>{if(u.type!=="LabeledStatement"||u.body.type!=="ExpressionStatement")return;let{expression:o}=u.body;o.type==="AssignmentExpression"&&o.left.type!=="MemberExpression"&&Ye(o.left).forEach(c=>{!this.var_lookup.has(c)&&c[0]!=="$"&&this.injected_reactive_declaration_vars.add(c)})});let{scope:r,map:n,globals:i}=Mi(t.content);this.instance_scope=r,this.instance_scope_map=n,r.declarations.forEach((u,o)=>{if(o[0]==="$")return this.error(u,M.illegal_declaration);let{type:c}=u;this.add_var(u,{name:o,initialised:r.initialised_declarations.has(o),imported:c.startsWith("Import"),writable:c==="VariableDeclaration"&&(u.kind==="var"||u.kind==="let")}),this.node_for_declaration.set(o,u)});let s=Array.from(i.keys());[...s.filter(u=>u[0]!=="$"),...s.filter(u=>u[0]==="$")].forEach(u=>{if(this.var_lookup.has(u))return;let o=i.get(u);if(this.injected_reactive_declaration_vars.has(u))this.add_var(o,{name:u,injected:!0,writable:!0,reassigned:!0,initialised:!0});else if(Gt(u))this.add_var(o,{name:u,injected:!0});else if(u[0]==="$"){if(u==="$"||u[1]==="$")return this.error(o,M.illegal_global(u));this.add_var(o,{name:u,injected:!0,mutated:!0,writable:!0}),this.add_reference(o,u.slice(1));let c=this.var_lookup.get(u.slice(1));c&&(c.subscribable=!0,c.referenced_from_script=!0)}else this.add_var(o,{name:u,global:!0,hoistable:!0})}),this.track_references_and_mutations()}walk_instance_js_post_template(){this.ast.instance&&(this.post_template_walk(),this.hoist_instance_declarations(),this.extract_reactive_declarations(),this.check_if_tags_content_dynamic())}post_template_walk(){let t=this.ast.instance;if(!t)return;let r=this,{content:n}=t,{instance_scope:i,instance_scope_map:s}=this,a=i,u=[],o=(f,m,y)=>{u.unshift([f,m,y])},c=!1,d=[],p=null;we(n,{enter(f,m,y,w){(f.type==="FunctionDeclaration"||f.type==="Func
|
||
|
${a.declarations.length?a:null}
|
||
|
${o.length>0&&_`let { ${o} } = $$props;`}
|
||
|
${u}
|
||
|
`),this.skip()}},leave(a){i.has(a)&&(s=s.parent)}})}hoist_instance_declarations(){let{hoistable_nodes:t,var_lookup:r,injected_reactive_declaration_vars:n,imports:i}=this,s=new Map,{body:a}=this.ast.instance.content;for(let d=0;d<a.length;d+=1){let p=a[d];p.type==="VariableDeclaration"&&p.declarations.every(m=>{if(!m.init||m.init.type!=="Literal"||p.kind!=="const"&&this.compile_options.dev)return!1;for(let y of Ye(m.id)){let w=this.var_lookup.get(y);if(w.reassigned||w.export_name||this.vars.find(b=>b.name===y&&b.module))return!1}return!0})&&(p.declarations.forEach(m=>{for(let y of Ye(m.id))this.var_lookup.get(y).hoistable=!0}),t.add(p),a.splice(d--,1),this.fully_hoisted.push(p)),p.type==="ExportNamedDeclaration"&&p.declaration&&p.declaration.type==="FunctionDeclaration"&&s.set(p.declaration.id.name,p),p.type==="FunctionDeclaration"&&s.set(p.id.name,p)}let u=new Set,o=new Set,c=d=>{d.type==="ExportNamedDeclaration"&&(d=d.declaration);let p=this.instance_scope,f=this.instance_scope,m=this.instance_scope_map,y=!0;return o.add(d),we(d,{enter(w,b){if(!y)return this.skip();if(m.has(w)&&(f=m.get(w)),pt(w,b)){let{name:$}=Ht(w),C=f.find_owner($);if(n.has($))y=!1;else if($[0]==="$"&&!C)y=!1;else if(C===p){let R=r.get($);if((R.reassigned||R.mutated)&&(y=!1),$===d.id.name||R.hoistable)return;if(s.has($)){let E=s.get($);o.has(E)||E.type==="ExportNamedDeclaration"&&o.has(E.declaration)?y=!1:c(E)||(y=!1)}else y=!1}this.skip()}},leave(w){m.has(w)&&(f=f.parent)}}),u.add(d),o.delete(d),y};for(let[d,p]of s)if(c(p)){let f=this.var_lookup.get(d);f.hoistable=!0,t.add(p);let m=a.indexOf(p);a.splice(m,1),this.fully_hoisted.push(p)}for(let{specifiers:d}of i)for(let p of d){let f=r.get(p.local.name);(!f.mutated||f.subscribable)&&(f.hoistable=!0)}}extract_reactive_declarations(){let t=this,r=[];this.ast.instance.content.body.forEach(a=>{let u=_f(a);if(u.length&&this.push_ignores(u),a.type==="LabeledStatement"&&a.label.name==="$"){this.reactive_declaration_nodes.add(a);let o=new Set,c=new Set,d=new Set,p=new Set,f=this.instance_scope,{declarations:m}=this.instance_scope,y=this.instance_scope_map;we(a.body,{enter($,C){if($.type==="VariableDeclaration"&&$.kind==="var"&&$.declarations.some(E=>!!Ye(E.id).find(Y=>m.get(Y)===$)))return t.error($,M.invalid_var_declaration);if(y.has($)&&(f=y.get($)),$.type==="AssignmentExpression"){let R=rt($.left);_r(R).forEach(E=>{c.add(E),o.add(E.name)}),$.operator!=="="&&d.add(R.name)}else if($.type==="UpdateExpression"){let R=rt($.argument);o.add(R.name)}else if(pt($,C)){let R=rt($);if(!c.has(R)){let{name:E}=R,H=f.find_owner(E),Y=t.var_lookup.get(E),P=!0;Y&&(Y.is_reactive_dependency=!0,Y.module&&Y.writable&&(P=!1,p.add(E)));let j=Y&&(Y.writable||Y.mutated);P&&(!H||H===t.instance_scope)&&(E[0]==="$"||j)&&d.add(E)}this.skip()}},leave($){y.has($)&&(f=f.parent)}}),p.size>0&&d.size===0&&t.warn(a.body,ae.module_script_variable_reactive_declaration(Array.from(p)));let{expression:w}=a.body,b=w&&w.left;r.push({assignees:o,dependencies:d,node:a,declaration:b})}u.length&&this.pop_ignores()});let n=new Map;r.forEach(a=>{a.assignees.forEach(u=>{n.has(u)||n.set(u,[]),n.get(u).push(a)})});let i=ga(r.reduce((a,u)=>(u.assignees.forEach(o=>{u.dependencies.forEach(c=>{u.assignees.has(c)||a.push([o,c])})}),a),[]));if(i&&i.length){let u=n.get(i[0])[0];return this.error(u.node,M.cyclical_reactive_declaration(i))}let s=a=>{this.reactive_declarations.includes(a)||(a.dependencies.forEach(u=>{if(a.assignees.has(u))return;let o=n.get(u);o&&o.forEach(s)}),this.reactive_declarations.push(a))};r.forEach(s)}check_if_tags_content_dynamic(){this.tags.forEach(t=>{t.check_if_content_dynamic()})}warn_if_undefined(t,r,n,i){if(t[0]==="$"){if(t==="$"||t[1]==="$"&&!Gt(t))return this.error(r,M.illegal_global(t));if(this.has_reactive_assignments=!0,Gt(t))return;t=t.slice(1)}if(this.var_lookup.has(t)&&!this.var_lookup.get(t).global||n&&n.names.has(t)||OE.has(t)&&r.type!=="InlineComponent")return;function s(){for(let a=i.parent;a;a=a.parent)if(a.type==="InlineComponent"){let{let_attributes:u}=a;for(let o of u)if(o.expression&&Ye(o.expression).includes(t)|
|