Last Sync: 2026-07-18 05:15 (Mobile)

This commit is contained in:
choibk committed 2026-07-18 05:15:32 +09:00
1 parent 54b25a20bb
commit d87ed50df0
20 files changed
+2582 -1791

No files matched your search

+47 -47
View File
@@ -3,9 +3,9 @@ THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
var uYe=Object.create;var _j=Object.defineProperty;var cYe=Object.getOwnPropertyDescriptor;var fYe=Object.getOwnPropertyNames;var dYe=Object.getPrototypeOf,pYe=Object.prototype.hasOwnProperty;var Wn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),DS=(e,t)=>{for(var r in t)_j(e,r,{get:t[r],enumerable:!0})},Pj=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of fYe(t))!pYe.call(e,i)&&i!==r&&_j(e,i,{get:()=>t[i],enumerable:!(n=cYe(t,i))||n.enumerable});return e},Ri=(e,t,r)=>(Pj(e,t,"default"),r&&Pj(r,t,"default")),ge=(e,t,r)=>(r=e!=null?uYe(dYe(e)):{},Pj(t||!e||!e.__esModule?_j(r,"default",{value:e,enumerable:!0}):r,e)),mYe=e=>Pj(_j({},"__esModule",{value:!0}),e);var hYe=(()=>{for(var e=new Uint8Array(128),t=0;t<64;t++)e[t<26?t+65:t<52?t+71:t<62?t-4:t*4-205]=t;return r=>{for(var n=r.length,i=new Uint8Array((n-(r[n-1]=="=")-(r[n-2]=="="))*3/4|0),a=0,o=0;a<n;){var s=e[r.charCodeAt(a++)],l=e[r.charCodeAt(a++)],u=e[r.charCodeAt(a++)],c=e[r.charCodeAt(a++)];i[o++]=s<<2|l>>4,i[o++]=l<<4|u>>2,i[o++]=u<<6|c}return i}})();var jo=Wn((YMt,Ij)=>{(function(){"use strict";var e={}.hasOwnProperty;function t(){for(var i="",a=0;a<arguments.length;a++){var o=arguments[a];o&&(i=n(i,r(o)))}return i}function r(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return t.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var a="";for(var o in i)e.call(i,o)&&i[o]&&(a=n(a,o));return a}function n(i,a){return a?i?i+" "+a:i+a:i}typeof Ij<"u"&&Ij.exports?(t.default=t,Ij.exports=t):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return t}):window.classNames=t})()});var On=Wn((MS,bT)=>{(function(){var e,t="4.17.23",r=200,n="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",i="Expected a function",a="Invalid `variable` option passed into `_.template`",o="__lodash_hash_undefined__",s=500,l="__lodash_placeholder__",u=1,c=2,f=4,d=1,p=2,h=1,m=2,v=4,A=8,x=16,g=32,w=64,b=128,y=256,S=512,T=30,D="...",k=800,M=16,E=1,O=2,P=3,_=1/0,B=9007199254740991,F=17976931348623157e292,L=0/0,I=4294967295,R=I-1,J=I>>>1,Q=[["ary",b],["bind",h],["bindKey",m],["curry",A],["curryRight",x],["flip",S],["partial",g],["partialRight",w],["rearg",y]],q="[object Arguments]",ie="[object Array]",Ae="[object AsyncFunction]",le="[object Boolean]",pe="[object Date]",ae="[object DOMException]",oe="[object Error]",ue="[object Function]",Se="[object GeneratorFunction]",H="[object Map]",ye="[object Number]",ne="[object Null]",z="[object Object]",U="[object Promise]",V="[object Proxy]",Y="[object RegExp]",Z="[object Set]",re="[object String]",he="[object Symbol]",fe="[object Undefined]",ke="[object WeakMap]",se="[object WeakSet]",Le="[object ArrayBuffer]",Ne="[object DataView]",Ge="[object Float32Array]",Ye="[object Float64Array]",ve="[object Int8Array]",Oe="[object Int16Array]",Te="[object Int32Array]",Ie="[object Uint8Array]",$e="[object Uint8ClampedArray]",Ue="[object Uint16Array]",Qe="[object Uint32Array]",We=/\b__p \+= '';/g,K=/\b(__p \+=) '' \+/g,me=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Fe=/&(?:amp|lt|gt|quot|#39);/g,Ce=/[&<>"']/g,ft=RegExp(Fe.source),gt=RegExp(Ce.source),rr=/<%-([\s\S]+?)%>/g,Nr=/<%([\s\S]+?)%>/g,Rr=/<%=([\s\S]+?)%>/g,cr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,br=/^\w*$/,Br=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vn=/[\\^$.*+?()[\]{}|]/g,nn=RegExp(vn.source),Eo=/^\s+/,Qs=/\s/,Pc=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,hp=/\{\n\/\* \[wrapped with (.+)\] \*/,Tm=/,? & /,Ru=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,gp=/[()=,{}\[\]\/\s]/,Ap=/\\(\\)?/g,gf=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_A=/\w*$/,Sb=/^[-+]0x[0-9a-f]+$/i,X2=/^0b[01]+$/i,K2=/^\[object .+?Constructor\]$/,J2=/^0o[0-7]+$/i,IA=/^(?:0|[1-9]\d*)$/,Z2=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Nm=/($^)/,eS=/['\n\r\u2028\u2029\\]/g,cd="\\ud800-\\udfff",Eb="\\u0300-\\u036f",tS="\\ufe20-\\ufe2f",rS="\\u20d0-\\u20ff",kb=Eb+tS+rS,nS="\\u2700-\\u27bf",Cb="a-z\\xdf-\\xf6\\xf8-\\xff",Vh="\\xac\\xb1\\xd7\\xf7",yi="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Yo="\\u2000-\\u206f",Db=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ci="A-Z\\xc0-\\xd6\\xd8-\\xde",Af="\\ufe0e\\ufe0f",BA=Vh+yi+Yo+Db,Mm="['\u2019]",iS="["+cd+"]",Tb="["+BA+"]",LA="["+kb+"]",vf="\\d+",XD="["+nS+"]",KD="["+Cb+"]",M4="[^"+cd+BA+vf+nS+Cb+Ci+"]",Nb="\\ud83c[\\udffb-\\udfff]",O4="(?:"+LA+"|"+Nb+")",aS="[^"+cd+"]",oS="(?:\\ud83c[\\udde6-\\uddff]){2}",Mb="[\\ud800-\\udbff][\\udc00-\\udfff]",_c="["+Ci+"]",sS="\\u200d",lS="(?:"+KD+"|"+M4+")",Ob="(?:"+_c+"|"+M4+")",F4="(?:"+Mm+"(?:d|ll|m|re|s|t|ve))?",j4="(?:"+Mm+"(?:D|LL|M|RE|S|T|VE))?",uS=O4+"?",P4="["+Af+"]?",_4="(?:"+sS+"(?:"+[aS,oS,Mb].join("|")+")"+P4+uS+")*",sW="\\d*(?:1st|2nd|3rd|(?![123])\Line truncated
var uYe=Object.create;var _j=Object.defineProperty;var cYe=Object.getOwnPropertyDescriptor;var fYe=Object.getOwnPropertyNames;var dYe=Object.getPrototypeOf,pYe=Object.prototype.hasOwnProperty;var Wn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),DS=(e,t)=>{for(var r in t)_j(e,r,{get:t[r],enumerable:!0})},Pj=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of fYe(t))!pYe.call(e,i)&&i!==r&&_j(e,i,{get:()=>t[i],enumerable:!(n=cYe(t,i))||n.enumerable});return e},Ri=(e,t,r)=>(Pj(e,t,"default"),r&&Pj(r,t,"default")),ge=(e,t,r)=>(r=e!=null?uYe(dYe(e)):{},Pj(t||!e||!e.__esModule?_j(r,"default",{value:e,enumerable:!0}):r,e)),mYe=e=>Pj(_j({},"__esModule",{value:!0}),e);var hYe=(()=>{for(var e=new Uint8Array(128),t=0;t<64;t++)e[t<26?t+65:t<52?t+71:t<62?t-4:t*4-205]=t;return r=>{for(var n=r.length,i=new Uint8Array((n-(r[n-1]=="=")-(r[n-2]=="="))*3/4|0),a=0,o=0;a<n;){var s=e[r.charCodeAt(a++)],l=e[r.charCodeAt(a++)],u=e[r.charCodeAt(a++)],c=e[r.charCodeAt(a++)];i[o++]=s<<2|l>>4,i[o++]=l<<4|u>>2,i[o++]=u<<6|c}return i}})();var jo=Wn((YMt,Ij)=>{(function(){"use strict";var e={}.hasOwnProperty;function t(){for(var i="",a=0;a<arguments.length;a++){var o=arguments[a];o&&(i=n(i,r(o)))}return i}function r(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return t.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var a="";for(var o in i)e.call(i,o)&&i[o]&&(a=n(a,o));return a}function n(i,a){return a?i?i+" "+a:i+a:i}typeof Ij<"u"&&Ij.exports?(t.default=t,Ij.exports=t):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return t}):window.classNames=t})()});var On=Wn((MS,bT)=>{(function(){var e,t="4.17.23",r=200,n="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",i="Expected a function",a="Invalid `variable` option passed into `_.template`",o="__lodash_hash_undefined__",s=500,l="__lodash_placeholder__",u=1,c=2,f=4,d=1,p=2,h=1,m=2,v=4,A=8,x=16,g=32,w=64,b=128,y=256,S=512,T=30,D="...",k=800,M=16,E=1,O=2,P=3,_=1/0,B=9007199254740991,F=17976931348623157e292,L=0/0,I=4294967295,R=I-1,J=I>>>1,Q=[["ary",b],["bind",h],["bindKey",m],["curry",A],["curryRight",x],["flip",S],["partial",g],["partialRight",w],["rearg",y]],q="[object Arguments]",ie="[object Array]",Ae="[object AsyncFunction]",le="[object Boolean]",pe="[object Date]",ae="[object DOMException]",oe="[object Error]",ue="[object Function]",Se="[object GeneratorFunction]",H="[object Map]",ye="[object Number]",ne="[object Null]",z="[object Object]",U="[object Promise]",V="[object Proxy]",Y="[object RegExp]",Z="[object Set]",re="[object String]",he="[object Symbol]",fe="[object Undefined]",ke="[object WeakMap]",se="[object WeakSet]",Le="[object ArrayBuffer]",Ne="[object DataView]",Ge="[object Float32Array]",Ye="[object Float64Array]",ve="[object Int8Array]",Oe="[object Int16Array]",Te="[object Int32Array]",Ie="[object Uint8Array]",$e="[object Uint8ClampedArray]",Ue="[object Uint16Array]",Qe="[object Uint32Array]",We=/\b__p \+= '';/g,K=/\b(__p \+=) '' \+/g,me=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Fe=/&(?:amp|lt|gt|quot|#39);/g,Ce=/[&<>"']/g,ft=RegExp(Fe.source),gt=RegExp(Ce.source),rr=/<%-([\s\S]+?)%>/g,Nr=/<%([\s\S]+?)%>/g,Rr=/<%=([\s\S]+?)%>/g,cr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,br=/^\w*$/,Br=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vn=/[\\^$.*+?()[\]{}|]/g,nn=RegExp(vn.source),Eo=/^\s+/,Qs=/\s/,Pc=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,hp=/\{\n\/\* \[wrapped with (.+)\] \*/,Tm=/,? & /,Ru=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,gp=/[()=,{}\[\]\/\s]/,Ap=/\\(\\)?/g,gf=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_A=/\w*$/,Sb=/^[-+]0x[0-9a-f]+$/i,X2=/^0b[01]+$/i,K2=/^\[object .+?Constructor\]$/,J2=/^0o[0-7]+$/i,IA=/^(?:0|[1-9]\d*)$/,Z2=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Nm=/($^)/,eS=/['\n\r\u2028\u2029\\]/g,cd="\\ud800-\\udfff",Eb="\\u0300-\\u036f",tS="\\ufe20-\\ufe2f",rS="\\u20d0-\\u20ff",kb=Eb+tS+rS,nS="\\u2700-\\u27bf",Cb="a-z\\xdf-\\xf6\\xf8-\\xff",Vh="\\xac\\xb1\\xd7\\xf7",yi="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Yo="\\u2000-\\u206f",Db=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ci="A-Z\\xc0-\\xd6\\xd8-\\xde",Af="\\ufe0e\\ufe0f",BA=Vh+yi+Yo+Db,Mm="['\u2019]",iS="["+cd+"]",Tb="["+BA+"]",LA="["+kb+"]",vf="\\d+",XD="["+nS+"]",KD="["+Cb+"]",M4="[^"+cd+BA+vf+nS+Cb+Ci+"]",Nb="\\ud83c[\\udffb-\\udfff]",O4="(?:"+LA+"|"+Nb+")",aS="[^"+cd+"]",oS="(?:\\ud83c[\\udde6-\\uddff]){2}",Mb="[\\ud800-\\udbff][\\udc00-\\udfff]",_c="["+Ci+"]",sS="\\u200d",lS="(?:"+KD+"|"+M4+")",Ob="(?:"+_c+"|"+M4+")",F4="(?:"+Mm+"(?:d|ll|m|re|s|t|ve))?",j4="(?:"+Mm+"(?:D|LL|M|RE|S|T|VE))?",uS=O4+"?",P4="["+Af+"]?",_4="(?:"+sS+"(?:"+[aS,oS,Mb].join("|")+")"+P4+uS+")*",sW="\\d*(?:1st|2nd|3rd|(?![123])\Line truncated
/* [wrapped with `+j+`] */
`)}function $He(C){return En(C)||zb(C)||!!(oue&&C&&C[oue])}function VA(C,j){var $=typeof C;return j=j??B,!!j&&($=="number"||$!="symbol"&&IA.test(C))&&C>-1&&C%1==0&&C<j}function Bc(C,j,$){if(!Fo($))return!1;var ee=typeof j;return(ee=="number"?wf($)&&VA(j,$.length):ee=="string"&&j in $)?Pm($[j],C):!1}function UW(C,j){if(En(C))return!1;var $=typeof C;return $=="number"||$=="symbol"||$=="boolean"||C==null||pd(C)?!0:br.test(C)||!cr.test(C)||j!=null&&C in Ma(j)}function zHe(C){var j=typeof C;return j=="string"||j=="number"||j=="symbol"||j=="boolean"?C!=="__proto__":C===null}function HW(C){var j=Sj(C),$=xe[j];if(typeof $!="function"||!(j in ni.prototype))return!1;if(C===$)return!0;var ee=qW($);return!!ee&&C===ee[0]}function UHe(C){return!!rue&&rue in C}var HHe=Z4?GA:sQ;function hT(C){var j=C&&C.constructor,$=typeof j=="function"&&j.prototype||vS;return C===$}function rce(C){return C===C&&!Fo(C)}function nce(C,j){return function($){return $==null?!1:$[C]===j&&(j!==e||C in Ma($))}}function VHe(C){var j=Nj(C,function(ee){return $.size===s&&$.clear(),ee}),$=j.cache;return j}function GHe(C,j){var $=C[1],ee=j[1],de=$|ee,we=de<(h|m|b),qe=ee==b&&$==A||ee==b&&$==y&&C[7].length<=j[8]||ee==(b|y)&&j[7].length<=j[8]&&$==A;if(!(we||qe))return C;ee&h&&(C[2]=j[2],de|=$&h?0:v);var Ve=j[3];if(Ve){var Ke=C[3];C[3]=Ke?Rue(Ke,Ve,j[4]):Ve,C[4]=Ke?Mv(C[3],l):j[4]}return Ve=j[5],Ve&&(Ke=C[5],C[5]=Ke?que(Ke,Ve,j[6]):Ve,C[6]=Ke?Mv(C[5],l):j[6]),Ve=j[7],Ve&&(C[7]=Ve),ee&b&&(C[8]=C[8]==null?j[8]:Uu(C[8],j[8])),C[9]==null&&(C[9]=j[9]),C[0]=j[0],C[1]=de,C}function WHe(C){var j=[];if(C!=null)for(var $ in Ma(C))j.push($);return j}function QHe(C){return tj.call(C)}function ice(C,j,$){return j=Xs(j===e?C.length-1:j,0),function(){for(var ee=arguments,de=-1,we=Xs(ee.length-j,0),qe=rt(we);++de<we;)qe[de]=ee[j+de];de=-1;for(var Ve=rt(j+1);++de<j;)Ve[de]=ee[de];return Ve[j]=$(qe),qu(C,this,Ve)}}function ace(C,j){return j.length<2?C:Rb(C,Sp(j,0,-1))}function YHe(C,j){for(var $=C.length,ee=Uu(j.length,$),de=xf(C);ee--;){var we=j[ee];C[ee]=VA(we,$)?de[we]:e}return C}function VW(C,j){if(!(j==="constructor"&&typeof C[j]=="function")&&j!="__proto__")return C[j]}var oce=lce(Nue),gT=cUe||function(C,j){return Cs.setTimeout(C,j)},GW=lce(vHe);function sce(C,j,$){var ee=j+"";return GW(C,qHe(ee,XHe(BHe(ee),$)))}function lce(C){var j=0,$=0;return function(){var ee=mUe(),de=M-(ee-$);if($=ee,de>0){if(++j>=k)return arguments[0]}else j=0;return C.apply(e,arguments)}}function kj(C,j){var $=-1,ee=C.length,de=ee-1;for(j=j===e?ee:j;++$<j;){var we=TW($,de),qe=C[we];C[we]=C[$],C[$]=qe}return C.length=j,C}var uce=VHe(function(C){var j=[];return C.charCodeAt(0)===46&&j.push(""),C.replace(Br,function($,ee,de,we){j.push(de?we.replace(Ap,"$1"):ee||$)}),j});function Kh(C){if(typeof C=="string"||pd(C))return C;var j=C+"";return j=="0"&&1/C==-_?"-0":j}function $b(C){if(C!=null){try{return ej.call(C)}catch{}try{return C+""}catch{}}return""}function XHe(C,j){return bf(Q,function($){var ee="_."+$[0];j&$[1]&&!pS(C,ee)&&C.push(ee)}),C.sort()}function cce(C){if(C instanceof ni)return C.clone();var j=new xp(C.__wrapped__,C.__chain__);return j.__actions__=xf(C.__actions__),j.__index__=C.__index__,j.__values__=C.__values__,j}function KHe(C,j,$){($?Bc(C,j,$):j===e)?j=1:j=Xs(Mn(j),0);var ee=C==null?0:C.length;if(!ee||j<1)return[];for(var de=0,we=0,qe=rt(sj(ee/j));de<ee;)qe[we++]=Sp(C,de,de+=j);return qe}function JHe(C){for(var j=-1,$=C==null?0:C.length,ee=0,de=[];++j<$;){var we=C[j];we&&(de[ee++]=we)}return de}function ZHe(){var C=arguments.length;if(!C)return[];for(var j=rt(C-1),$=arguments[0],ee=C;ee--;)j[ee-1]=arguments[ee];return Wh(En($)?xf($):[$],eu(j,1))}var eVe=Bn(function(C,j){return ls(C)?cT(C,eu(j,1,ls,!0)):[]}),tVe=Bn(function(C,j){var $=Ep(j);return ls($)&&($=e),ls(C)?cT(C,eu(j,1,ls,!0),Ur($,2)):[]}),rVe=Bn(function(C,j){var $=Ep(j);return ls($)&&($=e),ls(C)?cT(C,eu(j,1,ls,!0),e,$):[]});function nVe(C,j,$){var ee=C==null?0:C.length;return ee?(j=$||j===e?1:Mn(j),Sp(C,j<0?0:j,ee)):[]}function iVe(C,j,$){var ee=C==null?0:C.length;return ee?(j=$||j===e?1:Mn(j),j=ee-j,Sp(C,0,j<0?0:j)):[]}function aVe(C,j){return C&&C.length?Aj(C,Ur(j,3),!0,!0):[]}function oVe(C,j){return C&&C.length?Aj(C,Ur(j,3),!0):[]}function sVe(C,j,$,ee){var de=C==null?0:C.length;return de?($&&typeof $!="number"&&Bc(C,j,$)&&($=0,ee=de),ZUe(C,j,$,ee)):[]}function fce(C,j,$){var ee=C==null?0:C.length;if(!ee)return-1;var de=$==null?0:Mn($);return de<0&&(de=Xs(ee+de,0)),mS(C,Ur(j,3),de)}function dce(C,j,$){var ee=C==null?0:C.length;if(!ee)return-1;var de=ee-1;return $!==e&&(de=Mn($),de=$<0?Xs(ee+de,0):Uu(de,ee-1)),mS(C,Ur(j,3),de,!0)}function pce(C){var j=C==null?0:C.length;return j?eu(C,1):[]}function lVe(C){var j=C==null?0:C.length;return j?eu(C,_):[]}function uVe(C,j){var $=C==null?0:C.length;return $?(j=j===e?1:Mn(j),eu(C,j)):[]}function cVe(C){for(var j=-1,$=C==null?0:C.length,ee={};++j<$;){var de=C[j];ee[de[0]]=de[1]}return ee}function mce(C){return C&&C.length?C[0]:e}function fVe(C,j,$){var ee=C==null?0:C.length Line truncated
`)}function $He(C){return En(C)||zb(C)||!!(oue&&C&&C[oue])}function VA(C,j){var $=typeof C;return j=j??B,!!j&&($=="number"||$!="symbol"&&IA.test(C))&&C>-1&&C%1==0&&C<j}function Bc(C,j,$){if(!Fo($))return!1;var ee=typeof j;return(ee=="number"?wf($)&&VA(j,$.length):ee=="string"&&j in $)?Pm($[j],C):!1}function UW(C,j){if(En(C))return!1;var $=typeof C;return $=="number"||$=="symbol"||$=="boolean"||C==null||pd(C)?!0:br.test(C)||!cr.test(C)||j!=null&&C in Ma(j)}function zHe(C){var j=typeof C;return j=="string"||j=="number"||j=="symbol"||j=="boolean"?C!=="__proto__":C===null}function HW(C){var j=Sj(C),$=xe[j];if(typeof $!="function"||!(j in ni.prototype))return!1;if(C===$)return!0;var ee=qW($);return!!ee&&C===ee[0]}function UHe(C){return!!rue&&rue in C}var HHe=Z4?GA:sQ;function hT(C){var j=C&&C.constructor,$=typeof j=="function"&&j.prototype||vS;return C===$}function rce(C){return C===C&&!Fo(C)}function nce(C,j){return function($){return $==null?!1:$[C]===j&&(j!==e||C in Ma($))}}function VHe(C){var j=Nj(C,function(ee){return $.size===s&&$.clear(),ee}),$=j.cache;return j}function GHe(C,j){var $=C[1],ee=j[1],de=$|ee,we=de<(h|m|b),qe=ee==b&&$==A||ee==b&&$==y&&C[7].length<=j[8]||ee==(b|y)&&j[7].length<=j[8]&&$==A;if(!(we||qe))return C;ee&h&&(C[2]=j[2],de|=$&h?0:v);var Ve=j[3];if(Ve){var Ke=C[3];C[3]=Ke?Rue(Ke,Ve,j[4]):Ve,C[4]=Ke?Mv(C[3],l):j[4]}return Ve=j[5],Ve&&(Ke=C[5],C[5]=Ke?que(Ke,Ve,j[6]):Ve,C[6]=Ke?Mv(C[5],l):j[6]),Ve=j[7],Ve&&(C[7]=Ve),ee&b&&(C[8]=C[8]==null?j[8]:Uu(C[8],j[8])),C[9]==null&&(C[9]=j[9]),C[0]=j[0],C[1]=de,C}function WHe(C){var j=[];if(C!=null)for(var $ in Ma(C))j.push($);return j}function QHe(C){return tj.call(C)}function ice(C,j,$){return j=Xs(j===e?C.length-1:j,0),function(){for(var ee=arguments,de=-1,we=Xs(ee.length-j,0),qe=rt(we);++de<we;)qe[de]=ee[j+de];de=-1;for(var Ve=rt(j+1);++de<j;)Ve[de]=ee[de];return Ve[j]=$(qe),qu(C,this,Ve)}}function ace(C,j){return j.length<2?C:Rb(C,Sp(j,0,-1))}function YHe(C,j){for(var $=C.length,ee=Uu(j.length,$),de=xf(C);ee--;){var we=j[ee];C[ee]=VA(we,$)?de[we]:e}return C}function VW(C,j){if(!(j==="constructor"&&typeof C[j]=="function")&&j!="__proto__")return C[j]}var oce=lce(Nue),gT=cUe||function(C,j){return Cs.setTimeout(C,j)},GW=lce(vHe);function sce(C,j,$){var ee=j+"";return GW(C,qHe(ee,XHe(BHe(ee),$)))}function lce(C){var j=0,$=0;return function(){var ee=mUe(),de=M-(ee-$);if($=ee,de>0){if(++j>=k)return arguments[0]}else j=0;return C.apply(e,arguments)}}function kj(C,j){var $=-1,ee=C.length,de=ee-1;for(j=j===e?ee:j;++$<j;){var we=TW($,de),qe=C[we];C[we]=C[$],C[$]=qe}return C.length=j,C}var uce=VHe(function(C){var j=[];return C.charCodeAt(0)===46&&j.push(""),C.replace(Br,function($,ee,de,we){j.push(de?we.replace(Ap,"$1"):ee||$)}),j});function Kh(C){if(typeof C=="string"||pd(C))return C;var j=C+"";return j=="0"&&1/C==-_?"-0":j}function $b(C){if(C!=null){try{return ej.call(C)}catch{}try{return C+""}catch{}}return""}function XHe(C,j){return bf(Q,function($){var ee="_."+$[0];j&$[1]&&!pS(C,ee)&&C.push(ee)}),C.sort()}function cce(C){if(C instanceof ni)return C.clone();var j=new xp(C.__wrapped__,C.__chain__);return j.__actions__=xf(C.__actions__),j.__index__=C.__index__,j.__values__=C.__values__,j}function KHe(C,j,$){($?Bc(C,j,$):j===e)?j=1:j=Xs(Mn(j),0);var ee=C==null?0:C.length;if(!ee||j<1)return[];for(var de=0,we=0,qe=rt(sj(ee/j));de<ee;)qe[we++]=Sp(C,de,de+=j);return qe}function JHe(C){for(var j=-1,$=C==null?0:C.length,ee=0,de=[];++j<$;){var we=C[j];we&&(de[ee++]=we)}return de}function ZHe(){var C=arguments.length;if(!C)return[];for(var j=rt(C-1),$=arguments[0],ee=C;ee--;)j[ee-1]=arguments[ee];return Wh(En($)?xf($):[$],eu(j,1))}var eVe=Bn(function(C,j){return us(C)?cT(C,eu(j,1,us,!0)):[]}),tVe=Bn(function(C,j){var $=Ep(j);return us($)&&($=e),us(C)?cT(C,eu(j,1,us,!0),Ur($,2)):[]}),rVe=Bn(function(C,j){var $=Ep(j);return us($)&&($=e),us(C)?cT(C,eu(j,1,us,!0),e,$):[]});function nVe(C,j,$){var ee=C==null?0:C.length;return ee?(j=$||j===e?1:Mn(j),Sp(C,j<0?0:j,ee)):[]}function iVe(C,j,$){var ee=C==null?0:C.length;return ee?(j=$||j===e?1:Mn(j),j=ee-j,Sp(C,0,j<0?0:j)):[]}function aVe(C,j){return C&&C.length?Aj(C,Ur(j,3),!0,!0):[]}function oVe(C,j){return C&&C.length?Aj(C,Ur(j,3),!0):[]}function sVe(C,j,$,ee){var de=C==null?0:C.length;return de?($&&typeof $!="number"&&Bc(C,j,$)&&($=0,ee=de),ZUe(C,j,$,ee)):[]}function fce(C,j,$){var ee=C==null?0:C.length;if(!ee)return-1;var de=$==null?0:Mn($);return de<0&&(de=Xs(ee+de,0)),mS(C,Ur(j,3),de)}function dce(C,j,$){var ee=C==null?0:C.length;if(!ee)return-1;var de=ee-1;return $!==e&&(de=Mn($),de=$<0?Xs(ee+de,0):Uu(de,ee-1)),mS(C,Ur(j,3),de,!0)}function pce(C){var j=C==null?0:C.length;return j?eu(C,1):[]}function lVe(C){var j=C==null?0:C.length;return j?eu(C,_):[]}function uVe(C,j){var $=C==null?0:C.length;return $?(j=j===e?1:Mn(j),eu(C,j)):[]}function cVe(C){for(var j=-1,$=C==null?0:C.length,ee={};++j<$;){var de=C[j];ee[de[0]]=de[1]}return ee}function mce(C){return C&&C.length?C[0]:e}function fVe(C,j,$){var ee=C==null?0:C.length Line truncated
`;C.replace(Zt,function(Yr,Gn,ci,md,Lc,hd){return ci||(ci=md),wt+=C.slice(pt,hd).replace(eS,Hze),Gn&&(Ve=!0,wt+=`' +
__e(`+Gn+`) +
'`),Lc&&(Ke=!0,wt+=`';
@@ -22,21 +22,21 @@ __p += '`),ci&&(wt+=`' +
function print() { __p += __j.call(arguments, '') }
`:`;
`)+wt+`return __p
}`;var jn=zce(function(){return Qi(we,Dr+"return "+wt).apply(e,qe)});if(jn.source=wt,KW(jn))throw jn;return jn}function gQe(C){return ea(C).toLowerCase()}function AQe(C){return ea(C).toUpperCase()}function vQe(C,j,$){if(C=ea(C),C&&($||j===e))return $u(C);if(!C||!(j=dd(j)))return C;var ee=Fm(C),de=Fm(j),we=Qh(ee,de),qe=X4(ee,de)+1;return Iv(ee,we,qe).join("")}function yQe(C,j,$){if(C=ea(C),C&&($||j===e))return C.slice(0,tue(C)+1);if(!C||!(j=dd(j)))return C;var ee=Fm(C),de=X4(ee,Fm(j))+1;return Iv(ee,0,de).join("")}function bQe(C,j,$){if(C=ea(C),C&&($||j===e))return C.replace(Eo,"");if(!C||!(j=dd(j)))return C;var ee=Fm(C),de=Qh(ee,Fm(j));return Iv(ee,de).join("")}function xQe(C,j){var $=T,ee=D;if(Fo(j)){var de="separator"in j?j.separator:de;$="length"in j?Mn(j.length):$,ee="omission"in j?dd(j.omission):ee}C=ea(C);var we=C.length;if(gS(C)){var qe=Fm(C);we=qe.length}if($>=we)return C;var Ve=$-AS(ee);if(Ve<1)return ee;var Ke=qe?Iv(qe,0,Ve).join(""):C.slice(0,Ve);if(de===e)return Ke+ee;if(qe&&(Ve+=Ke.length-Ve),JW(de)){if(C.slice(Ve).search(de)){var pt,mt=Ke;for(de.global||(de=mW(de.source,ea(_A.exec(de))+"g")),de.lastIndex=0;pt=de.exec(mt);)var wt=pt.index;Ke=Ke.slice(0,wt===e?Ve:wt)}}else if(C.indexOf(dd(de),Ve)!=Ve){var Zt=Ke.lastIndexOf(de);Zt>-1&&(Ke=Ke.slice(0,Zt))}return Ke+ee}function wQe(C){return C=ea(C),C&&ft.test(C)?C.replace(Fe,Kze):C}var SQe=SS(function(C,j,$){return C+($?" ":"")+j.toUpperCase()}),tQ=Uue("toUpperCase");function $ce(C,j,$){return C=ea(C),j=$?e:j,j===e?Gze(C)?eUe(C):W4(C):C.match(j)||[]}var zce=Bn(function(C,j){try{return qu(C,e,j)}catch($){return KW($)?$:new wn($)}}),EQe=HA(function(C,j){return bf(j,function($){$=Kh($),zA(C,$,YW(C[$],C))}),C});function kQe(C){var j=C==null?0:C.length,$=Ur();return C=j?Na(C,function(ee){if(typeof ee[1]!="function")throw new bp(i);return[$(ee[0]),ee[1]]}):[],Bn(function(ee){for(var de=-1;++de<j;){var we=C[de];if(qu(we[0],this,ee))return qu(we[1],this,ee)}})}function CQe(C){return KUe(wp(C,u))}function rQ(C){return function(){return C}}function DQe(C,j){return C==null||C!==C?j:C}var TQe=Vue(),NQe=Vue(!0);function Ef(C){return C}function nQ(C){return xue(typeof C=="function"?C:wp(C,u))}function MQe(C){return Sue(wp(C,u))}function OQe(C,j){return Eue(C,wp(j,u))}var FQe=Bn(function(C,j){return function($){return fT($,C,j)}}),jQe=Bn(function(C,j){return function($){return fT(C,$,j)}});function iQ(C,j,$){var ee=Tl(j),de=mj(j,ee);$==null&&!(Fo(j)&&(de.length||!ee.length))&&($=j,j=C,C=this,de=mj(j,Tl(j)));var we=!(Fo($)&&"chain"in $)||!!$.chain,qe=GA(C);return bf(de,function(Ve){var Ke=j[Ve];C[Ve]=Ke,qe&&(C.prototype[Ve]=function(){var pt=this.__chain__;if(we||pt){var mt=C(this.__wrapped__),wt=mt.__actions__=xf(this.__actions__);return wt.push({func:Ke,args:arguments,thisArg:C}),mt.__chain__=pt,mt}return Ke.apply(C,Wh([this.value()],arguments))})}),C}function PQe(){return Cs._===this&&(Cs._=oUe),this}function aQ(){}function _Qe(C){return C=Mn(C),Bn(function(j){return kue(j,C)})}var IQe=IW(Na),BQe=IW(G4),LQe=IW(rT);function Uce(C){return UW(C)?Je(Kh(C)):mHe(C)}function RQe(C){return function(j){return C==null?e:Rb(C,j)}}var qQe=Wue(),$Qe=Wue(!0);function oQ(){return[]}function sQ(){return!1}function zQe(){return{}}function UQe(){return""}function HQe(){return!0}function VQe(C,j){if(C=Mn(C),C<1||C>B)return[];var $=I,ee=Uu(C,I);j=Ur(j),C-=I;for(var de=bi(ee,j);++$<C;)j($);return de}function GQe(C){return En(C)?Na(C,Kh):pd(C)?[C]:xf(uce(ea(C)))}function WQe(C){var j=++iUe;return ea(C)+j}var QQe=bj(function(C,j){return C+j},0),YQe=BW("ceil"),XQe=bj(function(C,j){return C/j},1),KQe=BW("floor");function JQe(C){return C&&C.length?pj(C,Ef,wW):e}function ZQe(C,j){return C&&C.length?pj(C,Ur(j,2),wW):e}function eYe(C){return Y4(C,Ef)}function tYe(C,j){return Y4(C,Ur(j,2))}function rYe(C){return C&&C.length?pj(C,Ef,CW):e}function nYe(C,j){return C&&C.length?pj(C,Ur(j,2),CW):e}var iYe=bj(function(C,j){return C*j},1),aYe=BW("round"),oYe=bj(function(C,j){return C-j},0);function sYe(C){return C&&C.length?Cn(C,Ef):0}function lYe(C,j){return C&&C.length?Cn(C,Ur(j,2)):0}return xe.after=MGe,xe.ary=bce,xe.assign=AWe,xe.assignIn=Pce,xe.assignInWith=jj,xe.assignWith=vWe,xe.at=yWe,xe.before=xce,xe.bind=YW,xe.bindAll=EQe,xe.bindKey=wce,xe.castArray=zGe,xe.chain=Ace,xe.chunk=KHe,xe.compact=JHe,xe.concat=ZHe,xe.cond=kQe,xe.conforms=CQe,xe.constant=rQ,xe.countBy=sGe,xe.create=bWe,xe.curry=Sce,xe.curryRight=Ece,xe.debounce=kce,xe.defaults=xWe,xe.defaultsDeep=wWe,xe.defer=OGe,xe.delay=FGe,xe.difference=eVe,xe.differenceBy=tVe,xe.differenceWith=rVe,xe.drop=nVe,xe.dropRight=iVe,xe.dropRightWhile=aVe,xe.dropWhile=oVe,xe.fill=sVe,xe.filter=uGe,xe.flatMap=dGe,xe.flatMapDeep=pGe,xe.flatMapDepth=mGe,xe.flatten=pce,xe.flattenDeep=lVe,xe.flattenDepth=uVe,xe.flip=jGe,xe.flow=TQe,xe.flowRight=NQe,xe.fromPairs=cVe,xe.functions=NWe,xe.functionsIn=MWe,xe.groupBy=hGe,xe.initial=dVe,xe.intersection=pVe,xe.intersectionBy=mVe,xe.intersectionWith=hVe,xe.invert=FWe,xe.invertBy=jWe,xe.invokeMap=AGe,xe.iteratee Line truncated
}`;var jn=zce(function(){return Qi(we,Dr+"return "+wt).apply(e,qe)});if(jn.source=wt,KW(jn))throw jn;return jn}function gQe(C){return ea(C).toLowerCase()}function AQe(C){return ea(C).toUpperCase()}function vQe(C,j,$){if(C=ea(C),C&&($||j===e))return $u(C);if(!C||!(j=dd(j)))return C;var ee=Fm(C),de=Fm(j),we=Qh(ee,de),qe=X4(ee,de)+1;return Iv(ee,we,qe).join("")}function yQe(C,j,$){if(C=ea(C),C&&($||j===e))return C.slice(0,tue(C)+1);if(!C||!(j=dd(j)))return C;var ee=Fm(C),de=X4(ee,Fm(j))+1;return Iv(ee,0,de).join("")}function bQe(C,j,$){if(C=ea(C),C&&($||j===e))return C.replace(Eo,"");if(!C||!(j=dd(j)))return C;var ee=Fm(C),de=Qh(ee,Fm(j));return Iv(ee,de).join("")}function xQe(C,j){var $=T,ee=D;if(Fo(j)){var de="separator"in j?j.separator:de;$="length"in j?Mn(j.length):$,ee="omission"in j?dd(j.omission):ee}C=ea(C);var we=C.length;if(gS(C)){var qe=Fm(C);we=qe.length}if($>=we)return C;var Ve=$-AS(ee);if(Ve<1)return ee;var Ke=qe?Iv(qe,0,Ve).join(""):C.slice(0,Ve);if(de===e)return Ke+ee;if(qe&&(Ve+=Ke.length-Ve),JW(de)){if(C.slice(Ve).search(de)){var pt,mt=Ke;for(de.global||(de=mW(de.source,ea(_A.exec(de))+"g")),de.lastIndex=0;pt=de.exec(mt);)var wt=pt.index;Ke=Ke.slice(0,wt===e?Ve:wt)}}else if(C.indexOf(dd(de),Ve)!=Ve){var Zt=Ke.lastIndexOf(de);Zt>-1&&(Ke=Ke.slice(0,Zt))}return Ke+ee}function wQe(C){return C=ea(C),C&&ft.test(C)?C.replace(Fe,Kze):C}var SQe=SS(function(C,j,$){return C+($?" ":"")+j.toUpperCase()}),tQ=Uue("toUpperCase");function $ce(C,j,$){return C=ea(C),j=$?e:j,j===e?Gze(C)?eUe(C):W4(C):C.match(j)||[]}var zce=Bn(function(C,j){try{return qu(C,e,j)}catch($){return KW($)?$:new wn($)}}),EQe=HA(function(C,j){return bf(j,function($){$=Kh($),zA(C,$,YW(C[$],C))}),C});function kQe(C){var j=C==null?0:C.length,$=Ur();return C=j?Na(C,function(ee){if(typeof ee[1]!="function")throw new bp(i);return[$(ee[0]),ee[1]]}):[],Bn(function(ee){for(var de=-1;++de<j;){var we=C[de];if(qu(we[0],this,ee))return qu(we[1],this,ee)}})}function CQe(C){return KUe(wp(C,u))}function rQ(C){return function(){return C}}function DQe(C,j){return C==null||C!==C?j:C}var TQe=Vue(),NQe=Vue(!0);function Ef(C){return C}function nQ(C){return xue(typeof C=="function"?C:wp(C,u))}function MQe(C){return Sue(wp(C,u))}function OQe(C,j){return Eue(C,wp(j,u))}var FQe=Bn(function(C,j){return function($){return fT($,C,j)}}),jQe=Bn(function(C,j){return function($){return fT(C,$,j)}});function iQ(C,j,$){var ee=Tl(j),de=mj(j,ee);$==null&&!(Fo(j)&&(de.length||!ee.length))&&($=j,j=C,C=this,de=mj(j,Tl(j)));var we=!(Fo($)&&"chain"in $)||!!$.chain,qe=GA(C);return bf(de,function(Ve){var Ke=j[Ve];C[Ve]=Ke,qe&&(C.prototype[Ve]=function(){var pt=this.__chain__;if(we||pt){var mt=C(this.__wrapped__),wt=mt.__actions__=xf(this.__actions__);return wt.push({func:Ke,args:arguments,thisArg:C}),mt.__chain__=pt,mt}return Ke.apply(C,Wh([this.value()],arguments))})}),C}function PQe(){return Cs._===this&&(Cs._=oUe),this}function aQ(){}function _Qe(C){return C=Mn(C),Bn(function(j){return kue(j,C)})}var IQe=IW(Na),BQe=IW(G4),LQe=IW(rT);function Uce(C){return UW(C)?Je(Kh(C)):mHe(C)}function RQe(C){return function(j){return C==null?e:Rb(C,j)}}var qQe=Wue(),$Qe=Wue(!0);function oQ(){return[]}function sQ(){return!1}function zQe(){return{}}function UQe(){return""}function HQe(){return!0}function VQe(C,j){if(C=Mn(C),C<1||C>B)return[];var $=I,ee=Uu(C,I);j=Ur(j),C-=I;for(var de=bi(ee,j);++$<C;)j($);return de}function GQe(C){return En(C)?Na(C,Kh):pd(C)?[C]:xf(uce(ea(C)))}function WQe(C){var j=++iUe;return ea(C)+j}var QQe=bj(function(C,j){return C+j},0),YQe=BW("ceil"),XQe=bj(function(C,j){return C/j},1),KQe=BW("floor");function JQe(C){return C&&C.length?pj(C,Ef,wW):e}function ZQe(C,j){return C&&C.length?pj(C,Ur(j,2),wW):e}function eYe(C){return Y4(C,Ef)}function tYe(C,j){return Y4(C,Ur(j,2))}function rYe(C){return C&&C.length?pj(C,Ef,CW):e}function nYe(C,j){return C&&C.length?pj(C,Ur(j,2),CW):e}var iYe=bj(function(C,j){return C*j},1),aYe=BW("round"),oYe=bj(function(C,j){return C-j},0);function sYe(C){return C&&C.length?Cn(C,Ef):0}function lYe(C,j){return C&&C.length?Cn(C,Ur(j,2)):0}return xe.after=MGe,xe.ary=bce,xe.assign=AWe,xe.assignIn=Pce,xe.assignInWith=jj,xe.assignWith=vWe,xe.at=yWe,xe.before=xce,xe.bind=YW,xe.bindAll=EQe,xe.bindKey=wce,xe.castArray=zGe,xe.chain=Ace,xe.chunk=KHe,xe.compact=JHe,xe.concat=ZHe,xe.cond=kQe,xe.conforms=CQe,xe.constant=rQ,xe.countBy=sGe,xe.create=bWe,xe.curry=Sce,xe.curryRight=Ece,xe.debounce=kce,xe.defaults=xWe,xe.defaultsDeep=wWe,xe.defer=OGe,xe.delay=FGe,xe.difference=eVe,xe.differenceBy=tVe,xe.differenceWith=rVe,xe.drop=nVe,xe.dropRight=iVe,xe.dropRightWhile=aVe,xe.dropWhile=oVe,xe.fill=sVe,xe.filter=uGe,xe.flatMap=dGe,xe.flatMapDeep=pGe,xe.flatMapDepth=mGe,xe.flatten=pce,xe.flattenDeep=lVe,xe.flattenDepth=uVe,xe.flip=jGe,xe.flow=TQe,xe.flowRight=NQe,xe.fromPairs=cVe,xe.functions=NWe,xe.functionsIn=MWe,xe.groupBy=hGe,xe.initial=dVe,xe.intersection=pVe,xe.intersectionBy=mVe,xe.intersectionWith=hVe,xe.invert=FWe,xe.invertBy=jWe,xe.invokeMap=AGe,xe.iteratee Line truncated
`+PY+e}var _Y=!1;function IY(e,t){if(!e||_Y)return"";_Y=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}catch(u){if(u&&n&&typeof u.stack=="string"){for(var i=u.stack.split(`
`),a=n.stack.split(`
`),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(o!==1||s!==1)do if(o--,s--,0>s||i[o]!==a[s]){var l=`
`+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=s);break}}}finally{_Y=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?gN(e):""}function qJe(e){switch(e.tag){case 5:return gN(e.type);case 16:return gN("Lazy");case 13:return gN("Suspense");case 19:return gN("SuspenseList");case 0:case 2:case 15:return e=IY(e.type,!1),e;case 11:return e=IY(e.type.render,!1),e;case 1:return e=IY(e.type,!0),e;default:return""}}function oX(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case pE:return"Fragment";case dE:return"Portal";case nX:return"Profiler";case KX:return"StrictMode";case iX:return"Suspense";case aX:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case yhe:return(e.displayName||"Context")+".Consumer";case vhe:return(e._context.displayName||"Context")+".Provider";case JX:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ZX:return t=e.displayName||null,t!==null?t:oX(e.type)||"Memo";case i1:t=e._payload,e=e._init;try{return oX(e(t))}catch{}}return null}function $Je(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return oX(t);case 8:return t===KX?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function v1(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function xhe(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function zJe(e){var t=xhe(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function HP(e){e._valueTracker||(e._valueTracker=zJe(e))}function whe(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=xhe(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function v_(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function sX(e,t){var r=t.checked;return Lo({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function mme(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=v1(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function She(e,t){t=t.checked,t!=null&&XX(e,"checked",t,!1)}function lX(e,t){She(e,t);var r=v1(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?uX(e,t.type,r):t.hasOwnProperty("defaultValue")&&uX(e,t.type,v1(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function hme(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function uX(e,t,r){(t!=="number"||v_(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var AN=Array.isArray;function EE(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i<r.length;i++)t["$"+r[i]]=!0;for(r=0;r<e.length;r++)i=t.hasOwnProperty("$"+e[r].value),e[r].selected!==i&&(e[r].selected=i),i&&n&&(e[r].defaultSelected=!0)}else{for(r=""+v1(r),t=null,i=0;i<e.length;i++){if(e[i].value===r){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function cX Line truncated
`+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=s);break}}}finally{_Y=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?gN(e):""}function qJe(e){switch(e.tag){case 5:return gN(e.type);case 16:return gN("Lazy");case 13:return gN("Suspense");case 19:return gN("SuspenseList");case 0:case 2:case 15:return e=IY(e.type,!1),e;case 11:return e=IY(e.type.render,!1),e;case 1:return e=IY(e.type,!0),e;default:return""}}function oX(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case pE:return"Fragment";case dE:return"Portal";case nX:return"Profiler";case KX:return"StrictMode";case iX:return"Suspense";case aX:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case yhe:return(e.displayName||"Context")+".Consumer";case vhe:return(e._context.displayName||"Context")+".Provider";case JX:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ZX:return t=e.displayName||null,t!==null?t:oX(e.type)||"Memo";case i1:t=e._payload,e=e._init;try{return oX(e(t))}catch{}}return null}function $Je(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return oX(t);case 8:return t===KX?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function v1(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function xhe(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function zJe(e){var t=xhe(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function HP(e){e._valueTracker||(e._valueTracker=zJe(e))}function whe(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=xhe(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function v_(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function sX(e,t){var r=t.checked;return Lo({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function mme(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=v1(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function She(e,t){t=t.checked,t!=null&&XX(e,"checked",t,!1)}function lX(e,t){She(e,t);var r=v1(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?uX(e,t.type,r):t.hasOwnProperty("defaultValue")&&uX(e,t.type,v1(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function hme(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function uX(e,t,r){(t!=="number"||v_(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var AN=Array.isArray;function EE(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i<r.length;i++)t["$"+r[i]]=!0;for(r=0;r<e.length;r++)i=t.hasOwnProperty("$"+e[r].value),e[r].selected!==i&&(e[r].selected=i),i&&n&&(e[r].defaultSelected=!0)}else{for(r=""+v1(r),t=null,i=0;i<e.length;i++){if(e[i].value===r){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function cX Line truncated
`).replace(XZe,"")}function r_(e,t,r){if(t=Rme(t),Rme(e)!==t&&r)throw Error(Nt(425))}function C_(){}var SX=null,EX=null;function kX(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var CX=typeof setTimeout=="function"?setTimeout:void 0,KZe=typeof clearTimeout=="function"?clearTimeout:void 0,qme=typeof Promise=="function"?Promise:void 0,JZe=typeof queueMicrotask=="function"?queueMicrotask:typeof qme<"u"?function(e){return qme.resolve(null).then(e).catch(ZZe)}:CX;function ZZe(e){setTimeout(function(){throw e})}function GY(e,t){var r=t,n=0;do{var i=r.nextSibling;if(e.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(n===0){e.removeChild(i),PN(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=i}while(r);PN(t)}function p1(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function $me(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var LE=Math.random().toString(36).slice(2),fg="__reactFiber$"+LE,RN="__reactProps$"+LE,A0="__reactContainer$"+LE,DX="__reactEvents$"+LE,eet="__reactListeners$"+LE,tet="__reactHandles$"+LE;function fx(e){var t=e[fg];if(t)return t;for(var r=e.parentNode;r;){if(t=r[A0]||r[fg]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=$me(e);e!==null;){if(r=e[fg])return r;e=$me(e)}return t}e=r,r=e.parentNode}return null}function QN(e){return e=e[fg]||e[A0],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function AE(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Nt(33))}function G_(e){return e[RN]||null}var TX=[],vE=-1;function x1(e){return{current:e}}function po(e){0>vE||(e.current=TX[vE],TX[vE]=null,vE--)}function Qa(e,t){vE++,TX[vE]=e.current,e.current=t}var y1={},tc=x1(y1),Mf=x1(!1),gx=y1;function OE(e,t){var r=e.type.contextTypes;if(!r)return y1;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=t[a];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Of(e){return e=e.childContextTypes,e!=null}function D_(){po(Mf),po(tc)}function zme(e,t,r){if(tc.current!==y1)throw Error(Nt(168));Qa(tc,t),Qa(Mf,r)}function fge(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(Nt(108,$Je(e)||"Unknown",i));return Lo({},r,n)}function T_(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||y1,gx=tc.current,Qa(tc,e),Qa(Mf,Mf.current),!0}function Ume(e,t,r){var n=e.stateNode;if(!n)throw Error(Nt(169));r?(e=fge(e,t,gx),n.__reactInternalMemoizedMergedChildContext=e,po(Mf),po(tc),Qa(tc,e)):po(Mf),Qa(Mf,r)}var d0=null,W_=!1,WY=!1;function dge(e){d0===null?d0=[e]:d0.push(e)}function ret(e){W_=!0,dge(e)}function w1(){if(!WY&&d0!==null){WY=!0;var e=0,t=pa;try{var r=d0;for(pa=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}d0=null,W_=!1}catch(i){throw d0!==null&&(d0=d0.slice(e+1)),Bhe(tK,w1),i}finally{pa=t,WY=!1}}return null}var yE=[],bE=0,N_=null,M_=0,Lp=[],Rp=0,Ax=null,p0=1,m0="";function ux(e,t){yE[bE++]=M_,yE[bE++]=N_,N_=e,M_=t}function pge(e,t,r){Lp[Rp++]=p0,Lp[Rp++]=m0,Lp[Rp++]=Ax,Ax=e;var n=p0;e=m0;var i=32-Ym(n)-1;n&=~(1<<i),r+=1;var a=32-Ym(t)+i;if(30<a){var o=i-i%5;a=(n&(1<<o)-1).toString(32),n>>=o,i-=o,p0=1<<32-Ym(t)+i|r<<i|n,m0=a+e}else p0=1<<a|r<<i|n,m0=e}function cK(e){e.return!==null&&(ux(e,1),pge(e,1,0))}function fK(e){for(;e===N_;)N_=yE[--bE],yE[bE]=null,M_=yE[--bE],yE[bE]=null;for(;e===Ax;)Ax=Lp[--Rp],Lp[Rp]=null,m0=Lp[--Rp],Lp[Rp]=null,p0=Lp[--Rp],Lp[Rp]=null}var Td=null,Dd=null,Do=!1,Qm=null;function mge(e,t){var r=qp(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function Hme(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Td=e,Dd=p1(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Td=e,Dd=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Ax!==null?{id:p0,overflow:m0}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=qp(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Td=e,Dd=null,!0):!1;default:return!1}}function NX(e){return(e.mode&1)!==0&&(e.flags&128)===0}function MX(e){if(Do){var t=Dd;if(t){var r=t;if(!Hme(e,t)){if(NX(e))throw Error(Nt(418));t=p1(r.nextSibling);var n=Td;t&&Hme(e,t)?mge(n,r):(e.flags=e.flags&-4097|2,Do=!1,Td=e)}}else{if(NX(e))throw Error(Nt(418));e.flags=e.flags&-4097 Line truncated
Error generating stack: `+a.message+`
`+a.stack}return{value:e,source:t,stack:i,digest:null}}function JY(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function PX(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var det=typeof WeakMap=="function"?WeakMap:Map;function $ge(e,t,r){r=h0(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){L_||(L_=!0,HX=n),PX(e,t)},r}function zge(e,t,r){r=h0(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var i=t.value;r.payload=function(){return n(i)},r.callback=function(){PX(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){PX(e,t),typeof n!="function"&&(h1===null?h1=new Set([this]):h1.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function Zme(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new det;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(r)||(i.add(r),e=Det.bind(null,e,t,r),t.then(e,e))}function ehe(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function the(e,t,r,n,i){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=h0(-1,1),t.tag=2,m1(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var pet=b0.ReactCurrentOwner,Nf=!1;function Vc(e,t,r,n){t.child=e===null?Age(t,null,r,n):jE(t,e.child,r,n)}function rhe(e,t,r,n,i){r=r.render;var a=t.ref;return TE(t,i),n=wK(e,t,r,n,a,i),r=SK(),e!==null&&!Nf?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,y0(e,t,i)):(Do&&r&&cK(t),t.flags|=1,Vc(e,t,n,i),t.child)}function nhe(e,t,r,n,i){if(e===null){var a=r.type;return typeof a=="function"&&!jK(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=a,Uge(e,t,a,n,i)):(e=A_(r.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&i)===0){var o=a.memoizedProps;if(r=r.compare,r=r!==null?r:IN,r(o,n)&&e.ref===t.ref)return y0(e,t,i)}return t.flags|=1,e=A1(a,n),e.ref=t.ref,e.return=t,t.child=e}function Uge(e,t,r,n,i){if(e!==null){var a=e.memoizedProps;if(IN(a,n)&&e.ref===t.ref)if(Nf=!1,t.pendingProps=n=a,(e.lanes&i)!==0)(e.flags&131072)!==0&&(Nf=!0);else return t.lanes=e.lanes,y0(e,t,i)}return _X(e,t,r,n,i)}function Hge(e,t,r){var n=t.pendingProps,i=n.children,a=e!==null?e.memoizedState:null;if(n.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Qa(SE,Cd),Cd|=r;else{if((r&1073741824)===0)return e=a!==null?a.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Qa(SE,Cd),Cd|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=a!==null?a.baseLanes:r,Qa(SE,Cd),Cd|=n}else a!==null?(n=a.baseLanes|r,t.memoizedState=null):n=r,Qa(SE,Cd),Cd|=n;return Vc(e,t,i,r),t.child}function Vge(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function _X(e,t,r,n,i){var a=Of(r)?gx:tc.current;return a=OE(t,a),TE(t,i),r=wK(e,t,r,n,a,i),n=SK(),e!==null&&!Nf?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,y0(e,t,i)):(Do&&n&&cK(t),t.flags|=1,Vc(e,t,r,i),t.child)}function ihe(e,t,r,n,i){if(Of(r)){var a=!0;T_(t)}else a=!1;if(TE(t,i),t.stateNode===null)m_(e,t),qge(t,r,n),jX(t,r,n,i),n=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var l=o.context,u=r.contextType;typeof u=="object"&&u!==null?u=zp(u):(u=Of(r)?gx:tc.current,u=OE(t,u));var c=r.getDerivedStateFromProps,f=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==n||l!==u)&&Jme(t,o,n,u),a1=!1;var d=t.memoizedState;o.state=d,j_(t,n,o,i),l=t.memoizedState,s!==n||d!==l||Mf.current||a1?(typeof c=="function"&&(FX(t,r,c,n),l=t.memoizedState),(s=a1||Kme(t,r,s,n,d,l,u))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),o.props=n,o.state=l,o.context=u,n=s):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,yge(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:Gm(t.type,s),o.props=u,f=t.pendingProps,d=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=zp(l):(l=Of(r)?gx:tc.current,l=OE(t,l));var p=r.getDerivedStateFromProps;(c=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==f||d!==l)&&Jme(t,o,n,l),a1=!1,d=t.memoizedSta Line truncated
`+a.stack}return{value:e,source:t,stack:i,digest:null}}function JY(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function PX(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var det=typeof WeakMap=="function"?WeakMap:Map;function $ge(e,t,r){r=h0(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){L_||(L_=!0,HX=n),PX(e,t)},r}function zge(e,t,r){r=h0(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var i=t.value;r.payload=function(){return n(i)},r.callback=function(){PX(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){PX(e,t),typeof n!="function"&&(h1===null?h1=new Set([this]):h1.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function Zme(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new det;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(r)||(i.add(r),e=Det.bind(null,e,t,r),t.then(e,e))}function ehe(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function the(e,t,r,n,i){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=h0(-1,1),t.tag=2,m1(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var pet=b0.ReactCurrentOwner,Nf=!1;function Vc(e,t,r,n){t.child=e===null?Age(t,null,r,n):jE(t,e.child,r,n)}function rhe(e,t,r,n,i){r=r.render;var a=t.ref;return TE(t,i),n=wK(e,t,r,n,a,i),r=SK(),e!==null&&!Nf?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,y0(e,t,i)):(Do&&r&&cK(t),t.flags|=1,Vc(e,t,n,i),t.child)}function nhe(e,t,r,n,i){if(e===null){var a=r.type;return typeof a=="function"&&!jK(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=a,Uge(e,t,a,n,i)):(e=A_(r.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&i)===0){var o=a.memoizedProps;if(r=r.compare,r=r!==null?r:IN,r(o,n)&&e.ref===t.ref)return y0(e,t,i)}return t.flags|=1,e=A1(a,n),e.ref=t.ref,e.return=t,t.child=e}function Uge(e,t,r,n,i){if(e!==null){var a=e.memoizedProps;if(IN(a,n)&&e.ref===t.ref)if(Nf=!1,t.pendingProps=n=a,(e.lanes&i)!==0)(e.flags&131072)!==0&&(Nf=!0);else return t.lanes=e.lanes,y0(e,t,i)}return _X(e,t,r,n,i)}function Hge(e,t,r){var n=t.pendingProps,i=n.children,a=e!==null?e.memoizedState:null;if(n.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Qa(SE,Cd),Cd|=r;else{if((r&1073741824)===0)return e=a!==null?a.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Qa(SE,Cd),Cd|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=a!==null?a.baseLanes:r,Qa(SE,Cd),Cd|=n}else a!==null?(n=a.baseLanes|r,t.memoizedState=null):n=r,Qa(SE,Cd),Cd|=n;return Vc(e,t,i,r),t.child}function Vge(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function _X(e,t,r,n,i){var a=Of(r)?gx:tc.current;return a=OE(t,a),TE(t,i),r=wK(e,t,r,n,a,i),n=SK(),e!==null&&!Nf?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,y0(e,t,i)):(Do&&n&&cK(t),t.flags|=1,Vc(e,t,r,i),t.child)}function ihe(e,t,r,n,i){if(Of(r)){var a=!0;T_(t)}else a=!1;if(TE(t,i),t.stateNode===null)m_(e,t),qge(t,r,n),jX(t,r,n,i),n=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var l=o.context,u=r.contextType;typeof u=="object"&&u!==null?u=zp(u):(u=Of(r)?gx:tc.current,u=OE(t,u));var c=r.getDerivedStateFromProps,f=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==n||l!==u)&&Jme(t,o,n,u),a1=!1;var d=t.memoizedState;o.state=d,j_(t,n,o,i),l=t.memoizedState,s!==n||d!==l||Mf.current||a1?(typeof c=="function"&&(FX(t,r,c,n),l=t.memoizedState),(s=a1||Kme(t,r,s,n,d,l,u))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),o.props=n,o.state=l,o.context=u,n=s):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,yge(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:Gm(t.type,s),o.props=u,f=t.pendingProps,d=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=zp(l):(l=Of(r)?gx:tc.current,l=OE(t,l));var p=r.getDerivedStateFromProps;(c=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==f||d!==l)&&Jme(t,o,n,l),a1=!1,d=t.memoizedSta Line truncated
\0`,Q+=n(I,2),Q+=w.magic,Q+=n(A,2),Q+=n(x,2),Q+=n(L.crc32,4),Q+=n(L.compressedSize,4),Q+=n(L.uncompressedSize,4),Q+=n(y.length,2),Q+=n(O.length,2),{fileRecord:u.LOCAL_FILE_HEADER+Q+y+O,dirRecord:u.CENTRAL_FILE_HEADER+n(J,2)+Q+n(D.length,2)+"\0\0\0\0"+n(R,4)+n(h,4)+y+O+D}}var a=e("../utils"),o=e("../stream/GenericWorker"),s=e("../utf8"),l=e("../crc32"),u=e("../signature");function c(f,d,p,h){o.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=d,this.zipPlatform=p,this.encodeFileName=h,this.streamFiles=f,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(c,o),c.prototype.push=function(f){var d=f.meta.percent||0,p=this.entriesCount,h=this._sources.length;this.accumulate?this.contentBuffer.push(f):(this.bytesWritten+=f.data.length,o.prototype.push.call(this,{data:f.data,meta:{currentFile:this.currentFile,percent:p?(d+100*(p-h-1))/p:100}}))},c.prototype.openedSource=function(f){this.currentSourceOffset=this.bytesWritten,this.currentFile=f.file.name;var d=this.streamFiles&&!f.file.dir;if(d){var p=i(f,d,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:p.fileRecord,meta:{percent:0}})}else this.accumulate=!0},c.prototype.closedSource=function(f){this.accumulate=!1;var d=this.streamFiles&&!f.file.dir,p=i(f,d,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(p.dirRecord),d)this.push({data:function(h){return u.DATA_DESCRIPTOR+n(h.crc32,4)+n(h.compressedSize,4)+n(h.uncompressedSize,4)}(f),meta:{percent:100}});else for(this.push({data:p.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},c.prototype.flush=function(){for(var f=this.bytesWritten,d=0;d<this.dirRecords.length;d++)this.push({data:this.dirRecords[d],meta:{percent:100}});var p=this.bytesWritten-f,h=function(m,v,A,x,g){var w=a.transformTo("string",g(x));return u.CENTRAL_DIRECTORY_END+"\0\0\0\0"+n(m,2)+n(m,2)+n(v,4)+n(A,4)+n(w.length,2)+w}(this.dirRecords.length,p,f,this.zipComment,this.encodeFileName);this.push({data:h,meta:{percent:100}})},c.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},c.prototype.registerPrevious=function(f){this._sources.push(f);var d=this;return f.on("data",function(p){d.processChunk(p)}),f.on("end",function(){d.closedSource(d.previous.streamInfo),d._sources.length?d.prepareNextSource():d.end()}),f.on("error",function(p){d.error(p)}),this},c.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},c.prototype.error=function(f){var d=this._sources;if(!o.prototype.error.call(this,f))return!1;for(var p=0;p<d.length;p++)try{d[p].error(f)}catch{}return!0},c.prototype.lock=function(){o.prototype.lock.call(this);for(var f=this._sources,d=0;d<f.length;d++)f[d].lock()},t.exports=c},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,t,r){"use strict";var n=e("../compressions"),i=e("./ZipFileWorker");r.generateWorker=function(a,o,s){var l=new i(o.streamFiles,s,o.platform,o.encodeFileName),u=0;try{a.forEach(function(c,f){u++;var d=function(v,A){var x=v||A,g=n[x];if(!g)throw new Error(x+" is not a valid compression method !");return g}(f.options.compression,o.compression),p=f.options.compressionOptions||o.compressionOptions||{},h=f.dir,m=f.date;f._compressWorker(d,p).withStreamInfo("file",{name:c,dir:h,date:m,comment:f.comment||"",unixPermissions:f.unixPermissions,dosPermissions:f.dosPermissions}).pipe(l)}),l.entriesCount=u}catch(c){l.error(c)}return l}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,r){"use strict";function n(){if(!(this instanceof n))return new n;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var i=new n;for(var a in this)typeof this[a]!="function"&&(i[a]=this[a]);return i}}(n.prototype=e("./object")).loadAsync=e("./load"),n.support=e("./support"),n.defaults=e("./defaults"),n.version="3.10.1",n.loadAsync=function(i,a){return new n().loadAsync(i,a)},n.external=e("./external"),t.exports=n},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,t,r){"use strict";var n=e("./utils"),i=e("./external"),a=e("./utf8"),o=e("./zipEntries"),s=e("./stream/Crc32Probe"),l=e("./nodejsUtils");function u(c){return new i.Promise(function(f,d){var p=c.decompressed.getContentWorker().pipe(new s);p.on("error",function(h){d(h)}).on("end",function(){p.streamInfo.crc32!==c.decompressed.crc32?d(new Error("Corrupted zip : CRC32 mismatch")):f()}).resume() Line truncated
`,nexist:"\u2204",nexists:"\u2204",nfr:"\u{1D52B}",Nfr:"\u{1D511}",nge:"\u2271",ngE:"\u2267\u0338",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",ngt:"\u226F",nGt:"\u226B\u20D2",ngtr:"\u226F",nGtv:"\u226B\u0338",nharr:"\u21AE",nhArr:"\u21CE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",njcy:"\u045A",NJcy:"\u040A",nlarr:"\u219A",nlArr:"\u21CD",nldr:"\u2025",nle:"\u2270",nlE:"\u2266\u0338",nleftarrow:"\u219A",nLeftarrow:"\u21CD",nleftrightarrow:"\u21AE",nLeftrightarrow:"\u21CE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nlt:"\u226E",nLt:"\u226A\u20D2",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nopf:"\u{1D55F}",Nopf:"\u2115",not:"\xAC",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrarr:"\u219B",nrArr:"\u21CF",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nRightarrow:"\u21CF",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",nscr:"\u{1D4C3}",Nscr:"\u{1D4A9}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsube:"\u2288",nsubE:"\u2AC5\u0338",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupe:"\u2289",nsupE:"\u2AC6\u0338",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",ntilde:"\xF1",Ntilde:"\xD1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",nu:"\u03BD",Nu:"\u039D",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwarr:"\u2196",nwArr:"\u21D6",nwarrow:"\u2196",nwnear:"\u2927",oacute:"\xF3",Oacute:"\xD3",oast:"\u229B",ocir:"\u229A",ocirc:"\xF4",Ocirc:"\xD4",ocy:"\u043E",Ocy:"\u041E",odash:"\u229D",odblac:"\u0151",Odblac:"\u0150",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",oelig:"\u0153",OElig:"\u0152",ofcir:"\u29BF",ofr:"\u{1D52C}",Ofr:"\u{1D512}",ogon:"\u02DB",ograve:"\xF2",Ograve:"\xD2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",omacr:"\u014D",Omacr:"\u014C",omega:"\u03C9",Omega:"\u03A9",omicron:"\u03BF",Omicron:"\u039F",omid:"\u29B6",ominus:"\u2296",oopf:"\u{1D560}",Oopf:"\u{1D546}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",or:"\u2228",Or:"\u2A54",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",oscr:"\u2134",Oscr:"\u{1D4AA}",oslash:"\xF8",Oslash:"\xD8",osol:"\u2298",otilde:"\xF5",Otilde:"\xD5",otimes:"\u2297",Otimes:"\u2A37",otimesas:"\u2A36",ouml:"\xF6",Ouml:"\xD6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4 Line truncated
`)):typeof readline=="function"&&(te=readline(),te!==null&&(te+=`
`));if(!te)return null;W.input=Ge(te,!0)}return W.input.shift()},jb:function(W,te){te===null||te===10?(x(D(W.output,0)),W.output=[]):te!=0&&W.output.push(te)},fsync:function(W){W.output&&0<W.output.length&&(x(D(W.output,0)),W.output=[])}},Ie={jb:function(W,te){te===null||te===10?(g(D(W.output,0)),W.output=[]):te!=0&&W.output.push(te)},fsync:function(W){W.output&&0<W.output.length&&(g(D(W.output,0)),W.output=[])}},$e={Qa:null,Ra:function(){return $e.createNode(null,"/",16895,0)},createNode:function(W,te,ce,Ee){if((ce&61440)===24576||(ce&61440)===4096)throw new Ce(63);return $e.Qa||($e.Qa={dir:{node:{Pa:$e.Ga.Pa,Oa:$e.Ga.Oa,lookup:$e.Ga.lookup,ab:$e.Ga.ab,rename:$e.Ga.rename,unlink:$e.Ga.unlink,rmdir:$e.Ga.rmdir,readdir:$e.Ga.readdir,symlink:$e.Ga.symlink},stream:{Ta:$e.Ha.Ta}},file:{node:{Pa:$e.Ga.Pa,Oa:$e.Ga.Oa},stream:{Ta:$e.Ha.Ta,read:$e.Ha.read,write:$e.Ha.write,lb:$e.Ha.lb,bb:$e.Ha.bb,cb:$e.Ha.cb}},link:{node:{Pa:$e.Ga.Pa,Oa:$e.Ga.Oa,readlink:$e.Ga.readlink},stream:{}},pb:{node:{Pa:$e.Ga.Pa,Oa:$e.Ga.Oa},stream:Tm}}),ce=br(W,te,ce,Ee),(ce.mode&61440)===16384?(ce.Ga=$e.Qa.dir.node,ce.Ha=$e.Qa.dir.stream,ce.Ia={}):(ce.mode&61440)===32768?(ce.Ga=$e.Qa.file.node,ce.Ha=$e.Qa.file.stream,ce.Ma=0,ce.Ia=null):(ce.mode&61440)===40960?(ce.Ga=$e.Qa.link.node,ce.Ha=$e.Qa.link.stream):(ce.mode&61440)===8192&&(ce.Ga=$e.Qa.pb.node,ce.Ha=$e.Qa.pb.stream),ce.timestamp=Date.now(),W&&(W.Ia[te]=ce,W.timestamp=ce.timestamp),ce},Jb:function(W){return W.Ia?W.Ia.subarray?W.Ia.subarray(0,W.Ma):new Uint8Array(W.Ia):new Uint8Array(0)},qb:function(W,te){var ce=W.Ia?W.Ia.length:0;ce>=te||(te=Math.max(te,ce*(1048576>ce?2:1.125)>>>0),ce!=0&&(te=Math.max(te,256)),ce=W.Ia,W.Ia=new Uint8Array(te),0<W.Ma&&W.Ia.set(ce.subarray(0,W.Ma),0))},Gb:function(W,te){if(W.Ma!=te)if(te==0)W.Ia=null,W.Ma=0;else{var ce=W.Ia;W.Ia=new Uint8Array(te),ce&&W.Ia.set(ce.subarray(0,Math.min(te,W.Ma))),W.Ma=te}},Ga:{Pa:function(W){var te={};return te.dev=(W.mode&61440)===8192?W.id:1,te.ino=W.id,te.mode=W.mode,te.nlink=1,te.uid=0,te.gid=0,te.rdev=W.rdev,(W.mode&61440)===16384?te.size=4096:(W.mode&61440)===32768?te.size=W.Ma:(W.mode&61440)===40960?te.size=W.link.length:te.size=0,te.atime=new Date(W.timestamp),te.mtime=new Date(W.timestamp),te.ctime=new Date(W.timestamp),te.Ab=4096,te.blocks=Math.ceil(te.size/te.Ab),te},Oa:function(W,te){te.mode!==void 0&&(W.mode=te.mode),te.timestamp!==void 0&&(W.timestamp=te.timestamp),te.size!==void 0&&$e.Gb(W,te.size)},lookup:function(){throw ft[44]},ab:function(W,te,ce,Ee){return $e.createNode(W,te,ce,Ee)},rename:function(W,te,ce){if((W.mode&61440)===16384){try{var Ee=cr(te,ce)}catch{}if(Ee)for(var Be in Ee.Ia)throw new Ce(55)}delete W.parent.Ia[W.name],W.parent.timestamp=Date.now(),W.name=ce,te.Ia[ce]=W,te.timestamp=W.parent.timestamp,W.parent=te},unlink:function(W,te){delete W.Ia[te],W.timestamp=Date.now()},rmdir:function(W,te){var ce=cr(W,te),Ee;for(Ee in ce.Ia)throw new Ce(55);delete W.Ia[te],W.timestamp=Date.now()},readdir:function(W){var te=[".",".."],ce;for(ce in W.Ia)W.Ia.hasOwnProperty(ce)&&te.push(ce);return te},symlink:function(W,te,ce){return W=$e.createNode(W,te,41471,0),W.link=ce,W},readlink:function(W){if((W.mode&61440)!==40960)throw new Ce(28);return W.link}},Ha:{read:function(W,te,ce,Ee,Be){var it=W.node.Ia;if(Be>=W.node.Ma)return 0;if(W=Math.min(W.node.Ma-Be,Ee),8<W&&it.subarray)te.set(it.subarray(Be,Be+W),ce);else for(Ee=0;Ee<W;Ee++)te[ce+Ee]=it[Be+Ee];return W},write:function(W,te,ce,Ee,Be,it){if(te.buffer===P.buffer&&(it=!1),!Ee)return 0;if(W=W.node,W.timestamp=Date.now(),te.subarray&&(!W.Ia||W.Ia.subarray)){if(it)return W.Ia=te.subarray(ce,ce+Ee),W.Ma=Ee;if(W.Ma===0&&Be===0)return W.Ia=te.slice(ce,ce+Ee),W.Ma=Ee;if(Be+Ee<=W.Ma)return W.Ia.set(te.subarray(ce,ce+Ee),Be),Ee}if($e.qb(W,Be+Ee),W.Ia.subarray&&te.subarray)W.Ia.set(te.subarray(ce,ce+Ee),Be);else for(it=0;it<Ee;it++)W.Ia[Be+it]=te[ce+it];return W.Ma=Math.max(W.Ma,Be+Ee),Ee},Ta:function(W,te,ce){if(ce===1?te+=W.position:ce===2&&(W.node.mode&61440)===32768&&(te+=W.node.Ma),0>te)throw new Ce(28);return te},lb:function(W,te,ce){$e.qb(W.node,te+ce),W.node.Ma=Math.max(W.node.Ma,te+ce)},bb:function(W,te,ce,Ee,Be){if((W.node.mode&61440)!==32768)throw new Ce(43);if(W=W.node.Ia,Be&2||W.buffer!==O){if((0<ce||ce+te<W.length)&&(W.subarray?W=W.subarray(ce,ce+te):W=Array.prototype.slice.call(W,ce,ce+te)),ce=!0,te=65536*Math.ceil(te/65536),(Be=B4(65536,te))?(_.fill(0,Be,Be+te),te=Be):te=0,!te)throw new Ce(48);P.set(W,te)}else ce=!1,te=W.byteOffset;return{Fb:te,vb:ce}},cb:function(W,te,ce,Ee,Be){if((W.node.mode&61440)!==32768)throw new Ce(43);return Be&2||$e.Ha.write(W,te,0,Ee,ce,!1),0}}},Ue=null,Qe={},We=[],K=1,me=null,Fe=!0,Ce=null,ft={},gt=(W,te={})=>{if(W=Ne("/",W),!W)return{path:"",node:null};if(te=Object.assign({rb:!0,kb:0},te),8<te.kb)throw new Ce(32);W=he(W.split("/").filter(dt=>!!dt),!1);for(var ce=Ue,Ee="/",Be=0;Be<W.length;Be++){var it=Be===W.length-1;if(it&&te.parent)break;if(ce=cr(ce,W[Be]),Ee=fe(Ee+"/"+W[Be]),ce.Va&&(!it||it&&te.rb)&&(ce=ce.Va.root Line truncated
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function l(F,L){if(!!F){if(typeof F=="string")return u(F,L);var I=Object.prototype.toString.call(F).slice(8,-1);if(I==="Object"&&F.constructor&&(I=F.constructor.name),I==="Map"||I==="Set")return Array.from(F);if(I==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I))return u(F,L)}}function u(F,L){(L==null||L>F.length)&&(L=F.length);for(var I=0,R=new Array(L);I<L;I++)R[I]=F[I];return R}function c(F,L){var I=F==null?null:typeof Symbol<"u"&&F[Symbol.iterator]||F["@@iterator"];if(I!=null){var R=[],J=!0,Q=!1,q,ie;try{for(I=I.call(F);!(J=(q=I.next()).done)&&(R.push(q.value),!(L&&R.length===L));J=!0);}catch(Ae){Q=!0,ie=Ae}finally{try{!J&&I.return!=null&&I.return()}finally{if(Q)throw ie}}return R}}function f(F){if(Array.isArray(F))return F}var d=n("object-assign"),p=n("webworkify"),h=n("./lib/mathlib"),m=n("./lib/pool"),v=n("./lib/utils"),A=n("./lib/worker"),x=n("./lib/stepper"),g=n("./lib/tiler"),w=n("./lib/mm_resize/resize_filter_info"),b={},y=!1;try{typeof navigator<"u"&&navigator.userAgent&&(y=navigator.userAgent.indexOf("Safari")>=0)}catch{}var S=1;typeof navigator<"u"&&(S=Math.min(navigator.hardwareConcurrency||1,4));var T={tile:1024,concurrency:S,features:["js","wasm","ww"],idle:2e3,createCanvas:function(L,I){var R=document.createElement("canvas");return R.width=L,R.height=I,R}},D={filter:"mks2013",unsharpAmount:0,unsharpRadius:0,unsharpThreshold:0},k=!1,M=!1,E=!1,O=!1,P=!1;function _(){return{value:p(A),destroy:function(){if(this.value.terminate(),typeof window<"u"){var L=window.URL||window.webkitURL||window.mozURL||window.msURL;L&&L.revokeObjectURL&&this.value.objectURL&&L.revokeObjectURL(this.value.objectURL)}}}}function B(F){if(!(this instanceof B))return new B(F);this.options=d({},T,F||{});var L="lk_".concat(this.options.concurrency);this.__limit=b[L]||v.limiter(this.options.concurrency),b[L]||(b[L]=this.__limit),this.features={js:!1,wasm:!1,cib:!1,ww:!1},this.__workersPool=null,this.__requested_features=[],this.__mathlib=null}B.prototype.init=function(){var F=this;if(this.__initPromise)return this.__initPromise;if(typeof ImageData<"u"&&typeof Uint8ClampedArray<"u")try{new ImageData(new Uint8ClampedArray(400),10,10),k=!0}catch{}typeof ImageBitmap<"u"&&(ImageBitmap.prototype&&ImageBitmap.prototype.close?M=!0:this.debug("ImageBitmap does not support .close(), disabled"));var L=this.options.features.slice();if(L.indexOf("all")>=0&&(L=["cib","wasm","js","ww"]),this.__requested_features=L,this.__mathlib=new h(L),L.indexOf("ww")>=0&&typeof window<"u"&&"Worker"in window)try{var I=n("webworkify")(function(){});I.terminate(),this.features.ww=!0;var R="wp_".concat(JSON.stringify(this.options));b[R]?this.__workersPool=b[R]:(this.__workersPool=new m(_,this.options.idle),b[R]=this.__workersPool)}catch{}var J=this.__mathlib.init().then(function(Ae){d(F.features,Ae.features)}),Q;M?Q=v.cib_support(this.options.createCanvas).then(function(Ae){if(F.features.cib&&L.indexOf("cib")<0){F.debug("createImageBitmap() resize supported, but disabled by config");return}L.indexOf("cib")>=0&&(F.features.cib=Ae)}):Q=Promise.resolve(!1),E=v.can_use_canvas(this.options.createCanvas);var q;M&&k&&L.indexOf("ww")!==-1?q=v.worker_offscreen_canvas_support():q=Promise.resolve(!1),q=q.then(function(Ae){O=Ae});var ie=v.cib_can_use_region().then(function(Ae){P=Ae});return this.__initPromise=Promise.all([J,Q,q,ie]).then(function(){return F}),this.__initPromise},B.prototype.__invokeResize=function(F,L){var I=this;return L.__mathCache=L.__mathCache||{},Promise.resolve().then(function(){return I.features.ww?new Promise(function(R,J){var Q=I.__workersPool.acquire();L.cancelToken&&L.cancelToken.catch(function(ie){return J(ie)}),Q.value.onmessage=function(ie){Q.release(),ie.data.err?J(ie.data.err):R(ie.data)};var q=[];F.src&&q.push(F.src.buffer),F.srcBitmap&&q.push(F.srcBitmap),Q.value.postMessage({opts:F,features:I.__requested_features,preload:{wasm_nodule:I.__mathlib.__}},q)}):{data:I.__mathlib.resizeAndUnsharp(F,L.__mathCache)}})},B.prototype.__extractTileData=function(F,L,I,R,J){if(this.features.ww&&O&&(v.isCanvas(L)||P))return this.debug("Create tile for OffscreenCanvas"),createImageBitmap(R.srcImageBitmap||L,F.x,F.y,F.width,F.height).then(function(ie){return J.srcBitmap=ie,J});if(v.isCanvas(L))return R.srcCtx||(R.srcCtx=L.getContext("2d")),this.debug("Get tile pixel data"),J.src=R.srcCtx.getImageData(F.x,F.y,F.width,F.height).data,J;this.debug("Draw tile imageBitmap/image to temporary canvas");var Q=this.options.createCanvas(F.width,F.height),q=Q.getContext("2d");return q.globalCompositeOperation="copy",q.drawImage(R.srcImageBitmap||L,F.x,F.y,F.width,F.height,0,0,F.width,F.height),this.debug("Get tile pixel data"),J.src=q.getImageData(0,0,F.width,F.height).data,Q.width=Q.height=0,J},B.prototype.__landTileData=function(F,L,I){var R;if(this.debug("Convert raw rgba tile result to ImageData"),L.bitmap)return I.toCtx.drawImage(L.bitmap,F.toX,F.toY),null Line truncated
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function l(F,L){if(!!F){if(typeof F=="string")return u(F,L);var I=Object.prototype.toString.call(F).slice(8,-1);if(I==="Object"&&F.constructor&&(I=F.constructor.name),I==="Map"||I==="Set")return Array.from(F);if(I==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I))return u(F,L)}}function u(F,L){(L==null||L>F.length)&&(L=F.length);for(var I=0,R=new Array(L);I<L;I++)R[I]=F[I];return R}function c(F,L){var I=F==null?null:typeof Symbol<"u"&&F[Symbol.iterator]||F["@@iterator"];if(I!=null){var R=[],J=!0,Q=!1,q,ie;try{for(I=I.call(F);!(J=(q=I.next()).done)&&(R.push(q.value),!(L&&R.length===L));J=!0);}catch(Ae){Q=!0,ie=Ae}finally{try{!J&&I.return!=null&&I.return()}finally{if(Q)throw ie}}return R}}function f(F){if(Array.isArray(F))return F}var d=n("object-assign"),p=n("webworkify"),h=n("./lib/mathlib"),m=n("./lib/pool"),v=n("./lib/utils"),A=n("./lib/worker"),x=n("./lib/stepper"),g=n("./lib/tiler"),w=n("./lib/mm_resize/resize_filter_info"),b={},y=!1;try{typeof navigator<"u"&&navigator.userAgent&&(y=navigator.userAgent.indexOf("Safari")>=0)}catch{}var S=1;typeof navigator<"u"&&(S=Math.min(navigator.hardwareConcurrency||1,4));var T={tile:1024,concurrency:S,features:["js","wasm","ww"],idle:2e3,createCanvas:function(L,I){var R=document.createElement("canvas");return R.width=L,R.height=I,R}},D={filter:"mks2013",unsharpAmount:0,unsharpRadius:0,unsharpThreshold:0},k=!1,M=!1,E=!1,O=!1,P=!1;function _(){return{value:p(A),destroy:function(){if(this.value.terminate(),typeof window<"u"){var L=window.URL||window.webkitURL||window.mozURL||window.msURL;L&&L.revokeObjectURL&&this.value.objectURL&&L.revokeObjectURL(this.value.objectURL)}}}}function B(F){if(!(this instanceof B))return new B(F);this.options=d({},T,F||{});var L="lk_".concat(this.options.concurrency);this.__limit=b[L]||v.limiter(this.options.concurrency),b[L]||(b[L]=this.__limit),this.features={js:!1,wasm:!1,cib:!1,ww:!1},this.__workersPool=null,this.__requested_features=[],this.__mathlib=null}B.prototype.init=function(){var F=this;if(this.__initPromise)return this.__initPromise;if(typeof ImageData<"u"&&typeof Uint8ClampedArray<"u")try{new ImageData(new Uint8ClampedArray(400),10,10),k=!0}catch{}typeof ImageBitmap<"u"&&(ImageBitmap.prototype&&ImageBitmap.prototype.close?M=!0:this.debug("ImageBitmap does not support .close(), disabled"));var L=this.options.features.slice();if(L.indexOf("all")>=0&&(L=["cib","wasm","js","ww"]),this.__requested_features=L,this.__mathlib=new h(L),L.indexOf("ww")>=0&&typeof window<"u"&&"Worker"in window)try{var I=n("webworkify")(function(){});I.terminate(),this.features.ww=!0;var R="wp_".concat(JSON.stringify(this.options));b[R]?this.__workersPool=b[R]:(this.__workersPool=new m(_,this.options.idle),b[R]=this.__workersPool)}catch{}var J=this.__mathlib.init().then(function(Ae){d(F.features,Ae.features)}),Q;M?Q=v.cib_support(this.options.createCanvas).then(function(Ae){if(F.features.cib&&L.indexOf("cib")<0){F.debug("createImageBitmap() resize supported, but disabled by config");return}L.indexOf("cib")>=0&&(F.features.cib=Ae)}):Q=Promise.resolve(!1),E=v.can_use_canvas(this.options.createCanvas);var q;M&&k&&L.indexOf("ww")!==-1?q=v.worker_offscreen_canvas_support():q=Promise.resolve(!1),q=q.then(function(Ae){O=Ae});var ie=v.cib_can_use_region().then(function(Ae){P=Ae});return this.__initPromise=Promise.all([J,Q,q,ie]).then(function(){return F}),this.__initPromise},B.prototype.__invokeResize=function(F,L){var I=this;return L.__mathCache=L.__mathCache||{},Promise.resolve().then(function(){return I.features.ww?new Promise(function(R,J){var Q=I.__workersPool.acquire();L.cancelToken&&L.cancelToken.catch(function(ie){return J(ie)}),Q.value.onmessage=function(ie){Q.release(),ie.data.err?J(ie.data.err):R(ie.data)};var q=[];F.src&&q.push(F.src.buffer),F.srcBitmap&&q.push(F.srcBitmap),Q.value.postMessage({opts:F,features:I.__requested_features,preload:{wasm_nodule:I.__mathlib.__}},q)}):{data:I.__mathlib.resizeAndUnsharp(F,L.__mathCache)}})},B.prototype.__extractTileData=function(F,L,I,R,J){if(this.features.ww&&O&&(v.isCanvas(L)||P))return this.debug("Create tile for OffscreenCanvas"),createImageBitmap(R.srcImageBitmap||L,F.x,F.y,F.width,F.height).then(function(ie){return J.srcBitmap=ie,J});if(v.isCanvas(L))return R.srcCtx||(R.srcCtx=L.getContext("2d")),this.debug("Get tile pixel data"),J.src=R.srcCtx.getImageData(F.x,F.y,F.width,F.height).data,J;this.debug("Draw tile imageBitmap/image to temporary canvas");var Q=this.options.createCanvas(F.width,F.height),q=Q.getContext("2d");return q.globalCompositeOperation="copy",q.drawImage(R.srcImageBitmap||L,F.x,F.y,F.width,F.height,0,0,F.width,F.height),this.debug("Get tile pixel data"),J.src=q.getImageData(0,0,F.width,F.height).data,Q.width=Q.height=0,J},B.prototype.__landTileData=function(F,L,I){var R;if(this.debug("Convert raw rgba tile result to ImageData"),L.bitmap)return I.toCtx.drawImage(L.bitmap,F.toX,F.toY),null Line truncated
`).map(XXe).filter(function(r){return r!==null});return da(da({},t[0]),t[1])}function IT(e){var t={},r=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(e);if(!r)return t;var n=r[1],i=r[2];return n&&(t.tzid=n),t.dtstart=FT(i),t}function XXe(e){if(e=e.replace(/^\s+|\s+$/,""),!e.length)return null;var t=/^([A-Z]+?)[:;]/.exec(e.toUpperCase());if(!t)return zfe(e);var r=t[1];switch(r.toUpperCase()){case"RRULE":case"EXRULE":return zfe(e);case"DTSTART":return IT(e);default:throw new Error("Unsupported RFC prop ".concat(r," in ").concat(e))}}function zfe(e){var t=e.replace(/^RRULE:/i,""),r=IT(t),n=e.replace(/^(?:RRULE|EXRULE):/i,"").split(";");return n.forEach(function(i){var a=i.split("="),o=a[0],s=a[1];switch(o.toUpperCase()){case"FREQ":r.freq=$n[s.toUpperCase()];break;case"WKST":r.wkst=Mp[s.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var l=KXe(s),u=o.toLowerCase();r[u]=l;break;case"BYWEEKDAY":case"BYDAY":r.byweekday=JXe(s);break;case"DTSTART":case"TZID":var c=IT(e);r.tzid=c.tzid,r.dtstart=c.dtstart;break;case"UNTIL":r.until=FT(s);break;case"BYEASTER":r.byeaster=Number(s);break;default:throw new Error("Unknown RRULE property '"+o+"'")}}),r}function KXe(e){if(e.indexOf(",")!==-1){var t=e.split(",");return t.map(Ufe)}return Ufe(e)}function Ufe(e){return/^[+-]?\d+$/.test(e)?Number(e):e}function JXe(e){var t=e.split(",");return t.map(function(r){if(r.length===2)return Mp[r];var n=r.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!n||n.length<3)throw new SyntaxError("Invalid weekday string: ".concat(r));var i=Number(n[1]),a=n[2],o=Mp[a].weekday;return new Ms(o,i)})}var Jb=function(){function e(t,r){if(isNaN(t.getTime()))throw new RangeError("Invalid date passed to DateWithZone");this.date=t,this.tzid=r}return Object.defineProperty(e.prototype,"isUTC",{get:function(){return!this.tzid||this.tzid.toUpperCase()==="UTC"},enumerable:!1,configurable:!0}),e.prototype.toString=function(){var t=HS(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(t):";TZID=".concat(this.tzid,":").concat(t)},e.prototype.getTime=function(){return this.date.getTime()},e.prototype.rezonedDate=function(){return this.isUTC?this.date:jfe(this.date,this.tzid)},e}();function LT(e){for(var t=[],r="",n=Object.keys(e),i=Object.keys(_T),a=0;a<n.length;a++)if(n[a]!=="tzid"&&!!di(i,n[a])){var o=n[a].toUpperCase(),s=e[n[a]],l="";if(!(!Ga(s)||nu(s)&&!s.length)){switch(o){case"FREQ":l=dr.FREQUENCIES[e.freq];break;case"WKST":bd(s)?l=new Ms(s).toString():l=s.toString();break;case"BYWEEKDAY":o="BYDAY",l=Tfe(s).map(function(p){return p instanceof Ms?p:nu(p)?new Ms(p[0],p[1]):new Ms(p)}).toString();break;case"DTSTART":r=ZXe(s,e.tzid);break;case"UNTIL":l=HS(s,!e.tzid);break;default:if(nu(s)){for(var u=[],c=0;c<s.length;c++)u[c]=String(s[c]);l=u.toString()}else l=String(s)}l&&t.push([o,l])}}var f=t.map(function(p){var h=p[0],m=p[1];return"".concat(h,"=").concat(m.toString())}).join(";"),d="";return f!==""&&(d="RRULE:".concat(f)),[r,d].filter(function(p){return!!p}).join(`
`)}function ZXe(e,t){return e?"DTSTART"+new Jb(new Date(e),t).toString():""}function eKe(e,t){return Array.isArray(e)?!Array.isArray(t)||e.length!==t.length?!1:e.every(function(r,n){return r.getTime()===t[n].getTime()}):e instanceof Date?t instanceof Date&&e.getTime()===t.getTime():e===t}var Hfe=function(){function e(){this.all=!1,this.before=[],this.after=[],this.between=[]}return e.prototype._cacheAdd=function(t,r,n){r&&(r=r instanceof Date?oP(r):LQ(r)),t==="all"?this.all=r:(n._value=r,this[t].push(n))},e.prototype._cacheGet=function(t,r){var n=!1,i=r?Object.keys(r):[],a=function(c){for(var f=0;f<i.length;f++){var d=i[f];if(!eKe(r[d],c[d]))return!0}return!1},o=this[t];if(t==="all")n=this.all;else if(nu(o))for(var s=0;s<o.length;s++){var l=o[s];if(!(i.length&&a(l))){n=l._value;break}}if(!n&&this.all){for(var u=new r0(t,r),s=0;s<this.all.length&&u.accept(this.all[s]);s++);n=u.getValue(),this._cacheAdd(t,n,r)}return nu(n)?LQ(n):n instanceof Date?oP(n):n},e}();var Vfe=Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt([],oi(1,31),!0),oi(2,28),!0),oi(3,31),!0),oi(4,30),!0),oi(5,31),!0),oi(6,30),!0),oi(7,31),!0),oi(8,31),!0),oi(9,30),!0),oi(10,31),!0),oi(11,30),!0),oi(12,31),!0),oi(1,7),!0),Gfe=Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt([],oi(1,31),!0),oi(2,29),!0),oi(3,31),!0),oi(4,30),!0),oi(5,31),!0),oi(6,30),!0),oi(7,31),!0),oi(8,31),!0),oi(9,30),!0),oi(10,31),!0),oi(11,30),!0),oi(12,31),!0),oi(1,7),!0),tKe=Np(1,29),rKe=Np(1,30),Hv=Np(1,31),Qu=Np(1,32),Wfe=Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt([],Qu,!0),rKe,!0),Qu,!0),Hv,!0),Qu,!0),Hv,!0),Qu,!0),Qu,!0),Hv,!0),Qu,!0),Hv,!0),Qu,!0),Qu.slice(0,7),!0),Qfe=Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt([],Qu,!0),tKe,!0),Qu,!0),Hv,!0),Qu,!0),Hv,!0),Qu,!0),Qu,!0),Hv,!0),Qu,!0),Hv,!0),Qu,!0),Qu.slice(0,7),!0),nKe=Np(-28,0),iKe=Np(-29,0),Vv=Np(-30,0),Yu=Np(-31,0),Yfe=Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt([],Yu,!0),iKe,!0),Yu,!0),Vv,!0),Yu,!0),Vv,!0),Yu,!0),Yu,!0),Vv,!0),Yu,!0),Vv,!0),Yu,!0),Yu.slice(0,7),!0),Xfe=Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt([],Yu,!0),nKe,!0),Yu,!0),Vv,!0),Yu,!0),Vv,!0),Yu,!0),Yu,!0),Vv,!0),Yu,!0),Vv,!0),Yu,!0),Yu.slice(0,7),!0),Kfe=[0,31,60,91,121,152,182,213,244,274,305,335,366],Jfe=[0,31,59,90,120,151,181,212,243,273,304,334,365],zQ=function(){for(var e=[],t=0;t<55;t++)e=e.concat(Np(7));return e}();function Zfe(e,t){var r=tg(e,1,1),n=US(e)?366:365,i=US(e+1)?366:365,a=OT(r),o=e0(r),s=da(da({yearlen:n,nextyearlen:i,yearordinal:a,yearweekday:o},aKe(e)),{wnomask:null});if(xd(t.byweekno))return s;s.wnomask=oi(0,n+7);var l,u,c=l=Wu(7-o+t.wkst,7);c>=4?(c=0,u=s.yearlen+Wu(o-t.wkst,7)):u=n-c;for(var f=Math.floor(u/7),d=Wu(u,7),p=Math.floor(f+d/4),h=0;h<t.byweekno.length;h++){var m=t.byweekno[h];if(m<0&&(m+=p+1),m>0&&m<=p){var v=void 0;m>1?(v=c+(m-1)*7,c!==l&&(v-=7-l)):v=c;for(var A=0;A<7&&(s.wnomask[v]=1,v++,s.wdaymask[v]!==t.wkst);A++);}}if(di(t.byweekno,1)){var v=c+p*7;if(c!==l&&(v-=7-l),v<n)for(var h=0;h<7&&(s.wnomask[v]=1,v+=1,s.wdaymask[v]!==t.wkst);h++);}if(c){var x=void 0;if(di(t.byweekno,-1))x=-1;else{var g=e0(tg(e-1,1,1)),w=Wu(7-g.valueOf()+t.wkst,7),b=US(e-1)?366:365,y=void 0;w>=4?(w=0,y=b+Wu(g-t.wkst,7)):y=n-c,x=Math.floor(52+Wu(y,7)/4)}if(di(t.byweekno,x))for(var v=0;v<c;v++)s.wnomask[v]=1}return s}function aKe(e){var t=US(e)?366:365,r=tg(e,1,1),n=e0(r);return t===365?{mmask:Vfe,mdaymask:Qfe,nmdaymask:Xfe,wdaymask:zQ.slice(n),mrange:Jfe}:{mmask:Gfe,mdaymask:Wfe,nmdaymask:Yfe,wdaymask:zQ.slice(n),mrange:Kfe}}function ede(e,t,r,n,i,a){var o={lastyear:e,lastmonth:t,nwdaymask:[]},s=[];if(a.freq===dr.YEARLY)if(xd(a.bymonth))s=[[0,r]];else for(var l=0;l<a.bymonth.length;l++)t=a.bymonth[l],s.push(n.slice(t-1,t+1));else a.freq===dr.MONTHLY&&(s=[n.slice(t-1,t+1)]);if(xd(s))return o;o.nwdaymask=oi(0,r);for(var l=0;l<s.length;l++)for(var u=s[l],c=u[0],f=u[1]-1,d=0;d<a.bynweekday.length;d++){var p=void 0,h=a.bynweekday[d],m=h[0],v=h[1];v<0?(p=f+(v+1)*7,p-=Wu(i[p]-m,7)):(p=c+(v-1)*7,p+=Wu(7-i[p]+m,7)),c<=p&&p<=f&&(o.nwdaymask[p]=1)}return o}function tde(e,t){t===void 0&&(t=0);var r=e%19,n=Math.floor(e/100),i=e%100,a=Math.floor(n/4),o=n%4,s=Math.floor((n+8)/25),l=Math.floor((n-s+1)/3),u=Math.floor(19*r+n-a-l+15)%30,c=Math.floor(i/4),f=i%4,d=Math.floor(32+2*o+2*c-u-f)%7,p=Math.floor((r+11*u+22*d)/451),h=Math.floor((u+d-7*p+114)/31),m=(u+d-7*p+114)%31+1,v=Date.UTC(e,h-1,m+t),A=Date.UTC(e,0,1);return[Math.ceil((v-A)/(1e3*60*60*24))]}var oKe=function(){function e(t){this.options=t}return e.prototype.rebuild=function(t,r){var n=this.options;if(t!==this.lastyear&&(this.yearinfo=Zfe(t,n)),fs(n.bynweekday)&&(r!==this.lastmonth||t!==this.lastyear)){var i=this.yearinfo,a=i.yearlen,o=i.mrange,s=i.wdaymask;this.monthinfo=ede(t,r,a,o,s,n)}Ga(n.byeaster)&&(this.eastermask=tde(t,n.byeaster))},Object.defineProperty(e.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastmonth",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!1,configurable:!0}),Obje Line truncated
`)}function ZXe(e,t){return e?"DTSTART"+new Jb(new Date(e),t).toString():""}function eKe(e,t){return Array.isArray(e)?!Array.isArray(t)||e.length!==t.length?!1:e.every(function(r,n){return r.getTime()===t[n].getTime()}):e instanceof Date?t instanceof Date&&e.getTime()===t.getTime():e===t}var Hfe=function(){function e(){this.all=!1,this.before=[],this.after=[],this.between=[]}return e.prototype._cacheAdd=function(t,r,n){r&&(r=r instanceof Date?oP(r):LQ(r)),t==="all"?this.all=r:(n._value=r,this[t].push(n))},e.prototype._cacheGet=function(t,r){var n=!1,i=r?Object.keys(r):[],a=function(c){for(var f=0;f<i.length;f++){var d=i[f];if(!eKe(r[d],c[d]))return!0}return!1},o=this[t];if(t==="all")n=this.all;else if(nu(o))for(var s=0;s<o.length;s++){var l=o[s];if(!(i.length&&a(l))){n=l._value;break}}if(!n&&this.all){for(var u=new r0(t,r),s=0;s<this.all.length&&u.accept(this.all[s]);s++);n=u.getValue(),this._cacheAdd(t,n,r)}return nu(n)?LQ(n):n instanceof Date?oP(n):n},e}();var Vfe=Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt([],oi(1,31),!0),oi(2,28),!0),oi(3,31),!0),oi(4,30),!0),oi(5,31),!0),oi(6,30),!0),oi(7,31),!0),oi(8,31),!0),oi(9,30),!0),oi(10,31),!0),oi(11,30),!0),oi(12,31),!0),oi(1,7),!0),Gfe=Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt([],oi(1,31),!0),oi(2,29),!0),oi(3,31),!0),oi(4,30),!0),oi(5,31),!0),oi(6,30),!0),oi(7,31),!0),oi(8,31),!0),oi(9,30),!0),oi(10,31),!0),oi(11,30),!0),oi(12,31),!0),oi(1,7),!0),tKe=Np(1,29),rKe=Np(1,30),Hv=Np(1,31),Qu=Np(1,32),Wfe=Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt([],Qu,!0),rKe,!0),Qu,!0),Hv,!0),Qu,!0),Hv,!0),Qu,!0),Qu,!0),Hv,!0),Qu,!0),Hv,!0),Qu,!0),Qu.slice(0,7),!0),Qfe=Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt([],Qu,!0),tKe,!0),Qu,!0),Hv,!0),Qu,!0),Hv,!0),Qu,!0),Qu,!0),Hv,!0),Qu,!0),Hv,!0),Qu,!0),Qu.slice(0,7),!0),nKe=Np(-28,0),iKe=Np(-29,0),Vv=Np(-30,0),Yu=Np(-31,0),Yfe=Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt([],Yu,!0),iKe,!0),Yu,!0),Vv,!0),Yu,!0),Vv,!0),Yu,!0),Yu,!0),Vv,!0),Yu,!0),Vv,!0),Yu,!0),Yu.slice(0,7),!0),Xfe=Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt([],Yu,!0),nKe,!0),Yu,!0),Vv,!0),Yu,!0),Vv,!0),Yu,!0),Yu,!0),Vv,!0),Yu,!0),Vv,!0),Yu,!0),Yu.slice(0,7),!0),Kfe=[0,31,60,91,121,152,182,213,244,274,305,335,366],Jfe=[0,31,59,90,120,151,181,212,243,273,304,334,365],zQ=function(){for(var e=[],t=0;t<55;t++)e=e.concat(Np(7));return e}();function Zfe(e,t){var r=tg(e,1,1),n=US(e)?366:365,i=US(e+1)?366:365,a=OT(r),o=e0(r),s=da(da({yearlen:n,nextyearlen:i,yearordinal:a,yearweekday:o},aKe(e)),{wnomask:null});if(xd(t.byweekno))return s;s.wnomask=oi(0,n+7);var l,u,c=l=Wu(7-o+t.wkst,7);c>=4?(c=0,u=s.yearlen+Wu(o-t.wkst,7)):u=n-c;for(var f=Math.floor(u/7),d=Wu(u,7),p=Math.floor(f+d/4),h=0;h<t.byweekno.length;h++){var m=t.byweekno[h];if(m<0&&(m+=p+1),m>0&&m<=p){var v=void 0;m>1?(v=c+(m-1)*7,c!==l&&(v-=7-l)):v=c;for(var A=0;A<7&&(s.wnomask[v]=1,v++,s.wdaymask[v]!==t.wkst);A++);}}if(di(t.byweekno,1)){var v=c+p*7;if(c!==l&&(v-=7-l),v<n)for(var h=0;h<7&&(s.wnomask[v]=1,v+=1,s.wdaymask[v]!==t.wkst);h++);}if(c){var x=void 0;if(di(t.byweekno,-1))x=-1;else{var g=e0(tg(e-1,1,1)),w=Wu(7-g.valueOf()+t.wkst,7),b=US(e-1)?366:365,y=void 0;w>=4?(w=0,y=b+Wu(g-t.wkst,7)):y=n-c,x=Math.floor(52+Wu(y,7)/4)}if(di(t.byweekno,x))for(var v=0;v<c;v++)s.wnomask[v]=1}return s}function aKe(e){var t=US(e)?366:365,r=tg(e,1,1),n=e0(r);return t===365?{mmask:Vfe,mdaymask:Qfe,nmdaymask:Xfe,wdaymask:zQ.slice(n),mrange:Jfe}:{mmask:Gfe,mdaymask:Wfe,nmdaymask:Yfe,wdaymask:zQ.slice(n),mrange:Kfe}}function ede(e,t,r,n,i,a){var o={lastyear:e,lastmonth:t,nwdaymask:[]},s=[];if(a.freq===dr.YEARLY)if(xd(a.bymonth))s=[[0,r]];else for(var l=0;l<a.bymonth.length;l++)t=a.bymonth[l],s.push(n.slice(t-1,t+1));else a.freq===dr.MONTHLY&&(s=[n.slice(t-1,t+1)]);if(xd(s))return o;o.nwdaymask=oi(0,r);for(var l=0;l<s.length;l++)for(var u=s[l],c=u[0],f=u[1]-1,d=0;d<a.bynweekday.length;d++){var p=void 0,h=a.bynweekday[d],m=h[0],v=h[1];v<0?(p=f+(v+1)*7,p-=Wu(i[p]-m,7)):(p=c+(v-1)*7,p+=Wu(7-i[p]+m,7)),c<=p&&p<=f&&(o.nwdaymask[p]=1)}return o}function tde(e,t){t===void 0&&(t=0);var r=e%19,n=Math.floor(e/100),i=e%100,a=Math.floor(n/4),o=n%4,s=Math.floor((n+8)/25),l=Math.floor((n-s+1)/3),u=Math.floor(19*r+n-a-l+15)%30,c=Math.floor(i/4),f=i%4,d=Math.floor(32+2*o+2*c-u-f)%7,p=Math.floor((r+11*u+22*d)/451),h=Math.floor((u+d-7*p+114)/31),m=(u+d-7*p+114)%31+1,v=Date.UTC(e,h-1,m+t),A=Date.UTC(e,0,1);return[Math.ceil((v-A)/(1e3*60*60*24))]}var oKe=function(){function e(t){this.options=t}return e.prototype.rebuild=function(t,r){var n=this.options;if(t!==this.lastyear&&(this.yearinfo=Zfe(t,n)),ds(n.bynweekday)&&(r!==this.lastmonth||t!==this.lastyear)){var i=this.yearinfo,a=i.yearlen,o=i.mrange,s=i.wdaymask;this.monthinfo=ede(t,r,a,o,s,n)}Ga(n.byeaster)&&(this.eastermask=tde(t,n.byeaster))},Object.defineProperty(e.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastmonth",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!1,configurable:!0}),Obje Line truncated
`),n=0;n<r.length;){var i=r[n]=r[n].replace(/\s+$/g,"");i?n>0&&i[0]===" "?(r[n-1]+=i.slice(1),r.splice(n,1)):n+=1:r.splice(n,1)}return r}function gKe(e){e.forEach(function(t){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(t))throw new Error("unsupported RDATE/EXDATE parm: "+t)})}function sde(e,t){return gKe(t),e.split(",").map(function(r){return FT(r)})}function lde(e){var t=this;return function(r){if(r!==void 0&&(t["_".concat(e)]=r),t["_".concat(e)]!==void 0)return t["_".concat(e)];for(var n=0;n<t._rrule.length;n++){var i=t._rrule[n].origOptions[e];if(i)return i}}}var HQ=function(e){VS(t,e);function t(r){r===void 0&&(r=!1);var n=e.call(this,{},r)||this;return n.dtstart=lde.apply(n,["dtstart"]),n.tzid=lde.apply(n,["tzid"]),n._rrule=[],n._rdate=[],n._exrule=[],n._exdate=[],n}return t.prototype._iter=function(r){return ade(r,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},t.prototype.rrule=function(r){ude(r,this._rrule)},t.prototype.exrule=function(r){ude(r,this._exrule)},t.prototype.rdate=function(r){cde(r,this._rdate)},t.prototype.exdate=function(r){cde(r,this._exdate)},t.prototype.rrules=function(){return this._rrule.map(function(r){return uP(r.toString())})},t.prototype.exrules=function(){return this._exrule.map(function(r){return uP(r.toString())})},t.prototype.rdates=function(){return this._rdate.map(function(r){return new Date(r.getTime())})},t.prototype.exdates=function(){return this._exdate.map(function(r){return new Date(r.getTime())})},t.prototype.valueOf=function(){var r=[];return!this._rrule.length&&this._dtstart&&(r=r.concat(LT({dtstart:this._dtstart}))),this._rrule.forEach(function(n){r=r.concat(n.toString().split(`
`))}),this._exrule.forEach(function(n){r=r.concat(n.toString().split(`
`).map(function(i){return i.replace(/^RRULE:/,"EXRULE:")}).filter(function(i){return!/^DTSTART/.test(i)}))}),this._rdate.length&&r.push(fde("RDATE",this._rdate,this.tzid())),this._exdate.length&&r.push(fde("EXDATE",this._exdate,this.tzid())),r},t.prototype.toString=function(){return this.valueOf().join(`
@@ -65,23 +65,23 @@ Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=1
`)}try{let n=nx(e,{ecmaVersion:2020});lY(n,{MemberExpression(i){i.object.type==="Identifier"&&!t.includes(i.object.name)&&t.push(i.object.name),i.computed?t.push(i.property.value):t.push(i.property.name)}})}catch{}return t.length<3?null:{context:t[1],prop:t[2]}},sg=e=>{if(!e||ou(e))return null;let t=[];if(e.includes(`
`)){let n=e.split(`
`).filter(i=>i.trim()!=="");n[n.length-1]=`${n[n.length-1].replace("return ","")}`,e=n.join(`
`)}try{let n=nx(e,{ecmaVersion:2020});lY(n,{MemberExpression(i){i.object.type==="Identifier"&&!t.includes(i.object.name)&&t.push(i.object.name),i.computed?t.push(i.property.value):t.push(i.property.name)}})}catch{}return t.length<3?null:{node:t[0],prop:t[2]}},mJe=async(e,t,r,n)=>{if(!t)return;let i=ox(n,t.schema.id),a={...t,cols:t.cols??[],rows:[...i].map(o=>kd(Ed("$root",t.schema.id,o,t.schema.id)))};await e.spaceManager.saveFrame(r.path,a)},Mpe=async(e,t,r,n)=>e.spaceManager.readFrame(t.path,r).then(i=>mJe(e,i,t,n)),YT=(e,t)=>Object.keys(e).reduce((r,n)=>({...r,[n]:{uniques:oE.uniques,cols:oE.cols,rows:e[n].rows}}),{m_fields:{uniques:Va.uniques,cols:Va.cols,rows:Object.values(e).flatMap(r=>r.cols)}});var Co={def:{id:"icon",icon:"ui//gem"},node:{icon:"ui//gem",schemaId:"icon",parentId:"",name:N.properties.icon.label,rank:0,id:"icon",type:"icon",props:{value:""},types:{value:"icon"},styles:{"--icon-size":"'100%'",width:"'36px'",height:"'36px'"}}},Zv={def:{id:"space",icon:"ui//layout-grid",description:N.frames.context.description},node:{icon:"ui//layout-grid",schemaId:"space",parentId:"",name:N.frames.context.label,rank:0,id:"space",styles:{width:"'100%'"},type:"space",props:{value:""},types:{value:"view"}}},zc={def:{id:"image",icon:"ui//image"},node:{icon:"ui//image",schemaId:"image",parentId:"",name:N.properties.image.label,rank:0,id:"image",type:"image",props:{value:""},types:{value:"image"}}},$9t={def:{id:"text",icon:"ui//audio"},node:{icon:"ui//audio",schemaId:"audio",parentId:"",name:N.properties.audio.label,rank:0,id:"audio",type:"audio",props:{value:""},types:{value:"audio"}}},Yn={def:{id:"text",icon:"ui//type",description:N.frames.label.description},node:{icon:"ui//type",schemaId:"text",parentId:"",name:N.frames.label.label,rank:0,id:"text",type:"text",props:{value:""},types:{value:"text"},styles:{width:"'100%'"}}},sx={def:{icon:""},node:{schemaId:"input",parentId:"",name:"input",rank:0,id:"input",styles:{as:'"text"'},type:"input",props:{value:""},types:{value:"text"},actions:{onChange:"$api.properties.update(input.props.value, $value, $contexts.$context['_keyValue'], $saveState)"}}},Os={def:{id:"flow",icon:"ui//file-text"},node:{icon:"ui//file-text",schemaId:"flow",parentId:"",name:N.commands.flow,rank:0,id:"flow",type:"flow",props:{query:"{}",value:""},styles:{width:"'100%'",padding:"'8px'"},types:{query:"object",value:"link"}}},z9t={def:{id:"newNode",icon:"ui//lightbulb"},node:{id:"node",schemaId:"node",name:N.commands.idea,rank:0,parentId:"",type:"new"}},_r={def:{id:"groupNode",icon:"ui//box-select",description:"Groups allow you to customize your layout"},node:{id:"group",schemaId:"group",name:N.commands.group,rank:0,parentId:"",styles:{layout:'"column"',width:"'100%'"},type:"group"}},U9t={def:{id:"spacerNode",icon:"ui//unfold-horizontal"},node:{id:"group",schemaId:"group",name:N.commands.group,rank:0,parentId:"",styles:{flex:"'1'"},type:"group"}},Ope={def:{id:"columnsNode",icon:"ui//columns"},node:{id:"container",schemaId:"container",name:N.commands.columns,rank:0,parentId:"",styles:{layout:'"row"',width:"'100%'",gap:"'24px'"},type:"container"}},PP={def:{id:"columnNode",icon:"ui//columns"},node:{icon:"ui//columns",id:"column",schemaId:"column",name:N.commands.column,rank:0,parentId:"",styles:{layout:'"column"',layoutAlign:"'left'",flex:"1",gap:"'8px'",width:"0"},type:"column"}},Uc={def:{id:"content",icon:"ui//type"},node:{icon:"ui//type",schemaId:"content",parentId:"",name:N.menu.content,rank:0,id:"content",type:"content"}},XT={def:{id:"visualization",icon:"lucide//bar-chart-3"},node:{icon:"lucide//bar-chart-3",schemaId:"visualization",parentId:"",name:"Data Visualization",rank:0,id:"visualization",type:"visualization",props:{value:""},styles:{width:"'600px'",height:"'400px'"},types:{value:"option"},propsValue:{value:{alias:"Visualization Configuration",source:"visualization"}}}},Ip={def:{id:"data",icon:"ui//database",description:N.labels.displayDataWithCustomFieldTypes},node:{icon:"ui//database",schemaId:"data",parentId:"",name:"Data Field",rank:0,id:"data",type:"data",props:{field:"",value:""},types:{field:"object",value:"text"},propsValue:{field:{alias:"Field Configuration"},value:{alias:N.menu.value}}}};var hJe=[{..._r.node,id:"main",type:"group",rank:0,schemaId:"main",props:{note:"",space:""},types:{note:"link",space:"space"},propsValue:{note:JSON.stringify({alias:N.defaults.spaceNote}),space:JSON.stringify({alias:N.defaults.spaceContext})},styles:{layout:'"column"'}},{...Zv.node,id:"context",rank:0,props:{value:"$contexts.$space.space"},styles:{width:'"100%"'},parentId:"main",schemaId:"main"}],gJe=[{..._r.node,id:"main",type:"group",rank:0,schemaId:"main",props:{note:"",space:""},types:{note:"link",space:"space"},propsValue:{note:JSON.stringify({alias:N.defaults.spaceNote}),space:JSON.stringify({alias:N.defaults.spaceContext})},styles:{layout:'"column"'}},{...Os.node,rank:1,props:{value:"$contexts.$space.note"},styles:{width:'"100%"',"--mk-min-mode":"true","--mk-expanded":"true",padding: Line truncated
`)}try{let n=nx(e,{ecmaVersion:2020});lY(n,{MemberExpression(i){i.object.type==="Identifier"&&!t.includes(i.object.name)&&t.push(i.object.name),i.computed?t.push(i.property.value):t.push(i.property.name)}})}catch{}return t.length<3?null:{node:t[0],prop:t[2]}},mJe=async(e,t,r,n)=>{if(!t)return;let i=ox(n,t.schema.id),a={...t,cols:t.cols??[],rows:[...i].map(o=>kd(Ed("$root",t.schema.id,o,t.schema.id)))};await e.spaceManager.saveFrame(r.path,a)},Mpe=async(e,t,r,n)=>e.spaceManager.readFrame(t.path,r).then(i=>mJe(e,i,t,n)),YT=(e,t)=>Object.keys(e).reduce((r,n)=>({...r,[n]:{uniques:oE.uniques,cols:oE.cols,rows:e[n].rows}}),{m_fields:{uniques:Va.uniques,cols:Va.cols,rows:Object.values(e).flatMap(r=>r.cols)}});var Co={def:{id:"icon",icon:"ui//gem"},node:{icon:"ui//gem",schemaId:"icon",parentId:"",name:N.properties.icon.label,rank:0,id:"icon",type:"icon",props:{value:""},types:{value:"icon"},styles:{"--icon-size":"'100%'",width:"'36px'",height:"'36px'"}}},Zv={def:{id:"space",icon:"ui//layout-grid",description:N.frames.context.description},node:{icon:"ui//layout-grid",schemaId:"space",parentId:"",name:N.frames.context.label,rank:0,id:"space",styles:{width:"'100%'"},type:"space",props:{value:""},types:{value:"view"}}},zc={def:{id:"image",icon:"ui//image"},node:{icon:"ui//image",schemaId:"image",parentId:"",name:N.properties.image.label,rank:0,id:"image",type:"image",props:{value:""},types:{value:"image"}}},$9t={def:{id:"text",icon:"ui//audio"},node:{icon:"ui//audio",schemaId:"audio",parentId:"",name:N.properties.audio.label,rank:0,id:"audio",type:"audio",props:{value:""},types:{value:"audio"}}},Yn={def:{id:"text",icon:"ui//type",description:N.frames.label.description},node:{icon:"ui//type",schemaId:"text",parentId:"",name:N.frames.label.label,rank:0,id:"text",type:"text",props:{value:""},types:{value:"text"},styles:{width:"'100%'"}}},sx={def:{icon:""},node:{schemaId:"input",parentId:"",name:"input",rank:0,id:"input",styles:{as:'"text"'},type:"input",props:{value:""},types:{value:"text"},actions:{onChange:"$api.properties.update(input.props.value, $value, $contexts.$context['_keyValue'], $saveState)"}}},Os={def:{id:"flow",icon:"ui//file-text"},node:{icon:"ui//file-text",schemaId:"flow",parentId:"",name:N.commands.flow,rank:0,id:"flow",type:"flow",props:{query:"{}",value:""},styles:{width:"'100%'",padding:"'8px'"},types:{query:"object",value:"link"}}},z9t={def:{id:"newNode",icon:"ui//lightbulb"},node:{id:"node",schemaId:"node",name:N.commands.idea,rank:0,parentId:"",type:"new"}},_r={def:{id:"groupNode",icon:"ui//box-select",description:"Groups allow you to customize your layout"},node:{id:"group",schemaId:"group",name:N.commands.group,rank:0,parentId:"",styles:{layout:'"column"',width:"'100%'"},type:"group"}},U9t={def:{id:"spacerNode",icon:"ui//unfold-horizontal"},node:{id:"group",schemaId:"group",name:N.commands.group,rank:0,parentId:"",styles:{flex:"'1'"},type:"group"}},Ope={def:{id:"columnsNode",icon:"ui//columns"},node:{id:"container",schemaId:"container",name:N.commands.columns,rank:0,parentId:"",styles:{layout:'"row"',width:"'100%'",gap:"'24px'"},type:"container"}},PP={def:{id:"columnNode",icon:"ui//columns"},node:{icon:"ui//columns",id:"column",schemaId:"column",name:N.commands.column,rank:0,parentId:"",styles:{layout:'"column"',layoutAlign:"'left'",flex:"1",gap:"'8px'",width:"0"},type:"column"}},Uc={def:{id:"content",icon:"ui//type"},node:{icon:"ui//type",schemaId:"content",parentId:"",name:N.menu.content,rank:0,id:"content",type:"content"}},XT={def:{id:"visualization",icon:"lucide//bar-chart-3"},node:{icon:"lucide//bar-chart-3",schemaId:"visualization",parentId:"",name:"Data Visualization",rank:0,id:"visualization",type:"visualization",props:{value:""},styles:{width:"'600px'",height:"'400px'"},types:{value:"option"},propsValue:{value:{alias:"Visualization Configuration",source:"visualization"}}}},Ip={def:{id:"data",icon:"ui//database",description:N.labels.displayDataWithCustomFieldTypes},node:{icon:"ui//database",schemaId:"data",parentId:"",name:"Data Field",rank:0,id:"data",type:"data",props:{field:"",value:""},types:{field:"object",value:"text"},propsValue:{field:{alias:"Field Configuration"},value:{alias:N.menu.value}}}};var hJe=[{..._r.node,id:"main",type:"group",rank:0,schemaId:"main",props:{note:"",space:""},types:{note:"link",space:"space"},propsValue:{note:JSON.stringify({alias:N.defaults.spaceNote}),space:JSON.stringify({alias:N.defaults.spaceContext})},styles:{layout:'"column"'}},{...Zv.node,id:"context",rank:0,props:{value:"$contexts.$space.space"},styles:{width:'"100%"'},parentId:"main",schemaId:"main"}],gJe=[{..._r.node,id:"main",type:"group",rank:0,schemaId:"main",props:{note:"",space:""},types:{note:"link",space:"space"},propsValue:{note:JSON.stringify({alias:N.defaults.spaceNote}),space:JSON.stringify({alias:N.defaults.spaceContext})},styles:{layout:'"column"'}},{...Os.node,rank:1,props:{value:"$contexts.$space.note"},styles:{width:'"100%"',"--mk-min-mode":"true","--mk-expanded":"true",padding: Line truncated
To pick up a draggable item, press the space bar.
While dragging, use the arrow keys to move the item.
Press space again to drop the item in its new position, or press escape to cancel.
`},Uet={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Het(e){let{announcements:t=Uet,container:r,hiddenTextDescribedById:n,screenReaderInstructions:i=zet}=e,{announce:a,announcement:o}=EAe(),s=kx("DndLiveRegion"),[l,u]=(0,ot.useState)(!1);if((0,ot.useEffect)(()=>{u(!0)},[]),mo((0,ot.useMemo)(()=>({onDragStart(f){let{active:d}=f;a(t.onDragStart({active:d}))},onDragMove(f){let{active:d,over:p}=f;t.onDragMove&&a(t.onDragMove({active:d,over:p}))},onDragOver(f){let{active:d,over:p}=f;a(t.onDragOver({active:d,over:p}))},onDragEnd(f){let{active:d,over:p}=f;a(t.onDragEnd({active:d,over:p}))},onDragCancel(f){let{active:d,over:p}=f;a(t.onDragCancel({active:d,over:p}))}}),[a,t])),!l)return null;let c=ot.default.createElement(ot.default.Fragment,null,ot.default.createElement(wAe,{id:n,value:i.draggable}),ot.default.createElement(SAe,{id:s,announcement:o}));return r?(0,Nx.createPortal)(c,r):c}var al;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(al||(al={}));function oI(){}function jf(e,t){return(0,ot.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function E1(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,ot.useMemo)(()=>[...t].filter(n=>n!=null),[...t])}var Jm=Object.freeze({x:0,y:0});function WK(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Vet(e,t){let r=e3(e);if(!r)return"0 0";let n={x:(r.x-t.left)/t.width*100,y:(r.y-t.top)/t.height*100};return n.x+"% "+n.y+"%"}function QK(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return r-n}function Get(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function UK(e){let{left:t,top:r,height:n,width:i}=e;return[{x:t,y:r},{x:t+i,y:r},{x:t,y:r+n},{x:t+i,y:r+n}]}function YK(e,t){if(!e||e.length===0)return null;let[r]=e;return t?r[t]:r}function kAe(e,t,r){return t===void 0&&(t=e.left),r===void 0&&(r=e.top),{x:t+e.width*.5,y:r+e.height*.5}}var HE=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e,i=kAe(t,t.left,t.top),a=[];for(let o of n){let{id:s}=o,l=r.get(s);if(l){let u=WK(kAe(l),i);a.push({id:s,data:{droppableContainer:o,value:u}})}}return a.sort(QK)},LAe=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e,i=UK(t),a=[];for(let o of n){let{id:s}=o,l=r.get(s);if(l){let u=UK(l),c=i.reduce((d,p,h)=>d+WK(u[h],p),0),f=Number((c/4).toFixed(4));a.push({id:s,data:{droppableContainer:o,value:f}})}}return a.sort(QK)};function Wet(e,t){let r=Math.max(t.top,e.top),n=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-n,s=a-r;if(n<i&&r<a){let l=t.width*t.height,u=e.width*e.height,c=o*s,f=c/(l+u-c);return Number(f.toFixed(4))}return 0}var Qet=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e,i=[];for(let a of n){let{id:o}=a,s=r.get(o);if(s){let l=Wet(s,t);l>0&&i.push({id:o,data:{droppableContainer:a,value:l}})}}return i.sort(Get)};function Yet(e,t){let{top:r,left:n,bottom:i,right:a}=t;return r<=e.y&&e.y<=i&&n<=e.x&&e.x<=a}var RAe=e=>{let{droppableContainers:t,droppableRects:r,pointerCoordinates:n}=e;if(!n)return[];let i=[];for(let a of t){let{id:o}=a,s=r.get(o);if(s&&Yet(n,s)){let u=UK(s).reduce((f,d)=>f+WK(n,d),0),c=Number((u/4).toFixed(4));i.push({id:o,data:{droppableContainer:a,value:c}})}}return i.sort(QK)};function Xet(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function qAe(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Jm}function Ket(e){return function(r){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];return i.reduce((o,s)=>({...o,top:o.top+e*s.y,bottom:o.bottom+e*s.y,left:o.left+e*s.x,right:o.right+e*s.x}),{...r})}}var Jet=Ket(1);function $Ae(e){if(e.startsWith("matrix3d(")){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Zet(e,t,r){let n=$Ae(t);if(!n)return e;let{scaleX:i,scaleY:a,x:o,y:s}=n,l=e.left-o-(1-i)*parseFloat(r),u=e.top-s-(1-a)*parseFloat(r.slice(r.indexOf(" ")+1)),c=i?e.width/i:e.width,f=a?e.height/a:e.height;return{width:c,height:f,top:u,right:l+c,bottom:u+f,left:l}}var ett={ignoreTransform:!1};function Fx(e,t){t===void 0&&(t=ett);let r=e.getBoundingClientRect();if(t.ignoreTransform){let{trans Line truncated
`},Uet={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Het(e){let{announcements:t=Uet,container:r,hiddenTextDescribedById:n,screenReaderInstructions:i=zet}=e,{announce:a,announcement:o}=EAe(),s=kx("DndLiveRegion"),[l,u]=(0,ot.useState)(!1);if((0,ot.useEffect)(()=>{u(!0)},[]),mo((0,ot.useMemo)(()=>({onDragStart(f){let{active:d}=f;a(t.onDragStart({active:d}))},onDragMove(f){let{active:d,over:p}=f;t.onDragMove&&a(t.onDragMove({active:d,over:p}))},onDragOver(f){let{active:d,over:p}=f;a(t.onDragOver({active:d,over:p}))},onDragEnd(f){let{active:d,over:p}=f;a(t.onDragEnd({active:d,over:p}))},onDragCancel(f){let{active:d,over:p}=f;a(t.onDragCancel({active:d,over:p}))}}),[a,t])),!l)return null;let c=ot.default.createElement(ot.default.Fragment,null,ot.default.createElement(wAe,{id:n,value:i.draggable}),ot.default.createElement(SAe,{id:s,announcement:o}));return r?(0,Nx.createPortal)(c,r):c}var al;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(al||(al={}));function oI(){}function jf(e,t){return(0,ot.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function E1(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,ot.useMemo)(()=>[...t].filter(n=>n!=null),[...t])}var Jm=Object.freeze({x:0,y:0});function WK(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Vet(e,t){let r=e3(e);if(!r)return"0 0";let n={x:(r.x-t.left)/t.width*100,y:(r.y-t.top)/t.height*100};return n.x+"% "+n.y+"%"}function QK(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return r-n}function Get(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function UK(e){let{left:t,top:r,height:n,width:i}=e;return[{x:t,y:r},{x:t+i,y:r},{x:t,y:r+n},{x:t+i,y:r+n}]}function YK(e,t){if(!e||e.length===0)return null;let[r]=e;return t?r[t]:r}function kAe(e,t,r){return t===void 0&&(t=e.left),r===void 0&&(r=e.top),{x:t+e.width*.5,y:r+e.height*.5}}var HE=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e,i=kAe(t,t.left,t.top),a=[];for(let o of n){let{id:s}=o,l=r.get(s);if(l){let u=WK(kAe(l),i);a.push({id:s,data:{droppableContainer:o,value:u}})}}return a.sort(QK)},LAe=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e,i=UK(t),a=[];for(let o of n){let{id:s}=o,l=r.get(s);if(l){let u=UK(l),c=i.reduce((d,p,h)=>d+WK(u[h],p),0),f=Number((c/4).toFixed(4));a.push({id:s,data:{droppableContainer:o,value:f}})}}return a.sort(QK)};function Wet(e,t){let r=Math.max(t.top,e.top),n=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-n,s=a-r;if(n<i&&r<a){let l=t.width*t.height,u=e.width*e.height,c=o*s,f=c/(l+u-c);return Number(f.toFixed(4))}return 0}var Qet=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e,i=[];for(let a of n){let{id:o}=a,s=r.get(o);if(s){let l=Wet(s,t);l>0&&i.push({id:o,data:{droppableContainer:a,value:l}})}}return i.sort(Get)};function Yet(e,t){let{top:r,left:n,bottom:i,right:a}=t;return r<=e.y&&e.y<=i&&n<=e.x&&e.x<=a}var RAe=e=>{let{droppableContainers:t,droppableRects:r,pointerCoordinates:n}=e;if(!n)return[];let i=[];for(let a of t){let{id:o}=a,s=r.get(o);if(s&&Yet(n,s)){let u=UK(s).reduce((f,d)=>f+WK(n,d),0),c=Number((u/4).toFixed(4));i.push({id:o,data:{droppableContainer:a,value:c}})}}return i.sort(QK)};function Xet(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function qAe(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Jm}function Ket(e){return function(r){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];return i.reduce((o,s)=>({...o,top:o.top+e*s.y,bottom:o.bottom+e*s.y,left:o.left+e*s.x,right:o.right+e*s.x}),{...r})}}var Jet=Ket(1);function $Ae(e){if(e.startsWith("matrix3d(")){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Zet(e,t,r){let n=$Ae(t);if(!n)return e;let{scaleX:i,scaleY:a,x:o,y:s}=n,l=e.left-o-(1-i)*parseFloat(r),u=e.top-s-(1-a)*parseFloat(r.slice(r.indexOf(" ")+1)),c=i?e.width/i:e.width,f=a?e.height/a:e.height;return{width:c,height:f,top:u,right:l+c,bottom:u+f,left:l}}var ett={ignoreTransform:!1};function Fx(e,t){t===void 0&&(t=ett);let r=e.getBoundingClientRect();if(t.ignoreTransform){let{trans Line truncated
Please create a mathjs instance if you want to change the default configuration.
Example:
import { create, all } from 'mathjs';
const mathjs = create(all);
mathjs.config({ number: 'BigNumber' });
`);return Object.freeze(Px)};mi(st,Px,{MATRIX_OPTIONS:NI,NUMBER_OPTIONS:MI});var YZ={};DS(YZ,{createAbs:()=>F5,createAccessorNode:()=>M9,createAcos:()=>R8,createAcosh:()=>q8,createAcot:()=>$8,createAcoth:()=>z8,createAcsc:()=>U8,createAcsch:()=>H8,createAdd:()=>b9,createAddScalar:()=>P5,createAnd:()=>Dk,createAndTransform:()=>QR,createApply:()=>_1,createApplyTransform:()=>TR,createArg:()=>oB,createArrayNode:()=>F9,createAsec:()=>V8,createAsech:()=>G8,createAsin:()=>W8,createAsinh:()=>Q8,createAssignmentNode:()=>I9,createAtan:()=>Y8,createAtan2:()=>X8,createAtanh:()=>K8,createAtomicMass:()=>oR,createAvogadro:()=>sR,createBellNumbers:()=>Z7,createBigNumberClass:()=>QI,createBignumber:()=>w5,createBin:()=>zB,createBitAnd:()=>dk,createBitAndTransform:()=>XR,createBitNot:()=>iB,createBitOr:()=>pk,createBitOrTransform:()=>KR,createBitXor:()=>aB,createBlockNode:()=>L9,createBohrMagneton:()=>qL,createBohrRadius:()=>GL,createBoltzmann:()=>lR,createBoolean:()=>x5,createCatalan:()=>eL,createCbrt:()=>I5,createCeil:()=>B5,createChain:()=>S7,createChainClass:()=>x7,createClassicalElectronRadius:()=>WL,createClone:()=>i5,createColumn:()=>gk,createColumnTransform:()=>NR,createCombinations:()=>q7,createCombinationsWithRep:()=>$7,createCompare:()=>f8,createCompareNatural:()=>d8,createCompareText:()=>p8,createCompile:()=>u7,createComplex:()=>S5,createComplexClass:()=>YI,createComposition:()=>tL,createConcat:()=>hk,createConcatTransform:()=>qR,createConditionalNode:()=>q9,createConductanceQuantum:()=>$L,createConj:()=>sB,createConstantNode:()=>H9,createCorr:()=>R7,createCos:()=>J8,createCosh:()=>Z8,createCot:()=>e9,createCoth:()=>t9,createCoulomb:()=>LL,createCount:()=>dB,createCreateUnit:()=>L8,createCross:()=>pB,createCsc:()=>r9,createCsch:()=>n9,createCtranspose:()=>FB,createCube:()=>L5,createCumSum:()=>Fk,createCumSumTransform:()=>VR,createDeepEqual:()=>k8,createDenseMatrixClass:()=>n5,createDerivative:()=>lL,createDet:()=>E7,createDeuteronMass:()=>ZL,createDiag:()=>mB,createDiff:()=>Ak,createDiffTransform:()=>$R,createDistance:()=>P7,createDivide:()=>j7,createDivideScalar:()=>YB,createDot:()=>S9,createDotDivide:()=>r8,createDotMultiply:()=>rB,createDotPow:()=>t8,createE:()=>xL,createEfimovFactor:()=>aR,createEigs:()=>D7,createElectricConstant:()=>IL,createElectronMass:()=>QL,createElementaryCharge:()=>RL,createEqual:()=>h8,createEqualScalar:()=>A5,createEqualText:()=>g8,createErf:()=>BB,createEvaluate:()=>c7,createExp:()=>R5,createExpm:()=>T7,createExpm1:()=>q5,createFactorial:()=>H7,createFalse:()=>hL,createFaraday:()=>uR,createFermiCoupling:()=>YL,createFft:()=>PB,createFibonacciHeapClass:()=>F8,createFilter:()=>hB,createFilterTransform:()=>MR,createFineStructure:()=>XL,createFirstRadiation:()=>cR,createFix:()=>$5,createFlatten:()=>gB,createFloor:()=>lk,createForEach:()=>AB,createForEachTransform:()=>OR,createFormat:()=>$B,createFraction:()=>E5,createFractionClass:()=>XI,createFreqz:()=>fL,createFunctionAssignmentNode:()=>G9,createFunctionNode:()=>s7,createGamma:()=>z7,createGasConstant:()=>dR,createGcd:()=>z5,createGetMatrixDataType:()=>vB,createGravitationConstant:()=>FL,createGravity:()=>xR,createHartreeEnergy:()=>KL,createHasNumericValue:()=>f5,createHelp:()=>w7,createHelpClass:()=>b7,createHex:()=>HB,createHypot:()=>x9,createI:()=>NL,createIdentity:()=>yB,createIfft:()=>_B,createIm:()=>lB,createImmutableDenseMatrixClass:()=>M8,createIndex:()=>k9,createIndexClass:()=>O8,createIndexNode:()=>Q9,createIndexTransform:()=>FR,createInfinity:()=>AL,createIntersect:()=>_7,createInv:()=>k7,createInverseConductanceQuantum:()=>zL,createInvmod:()=>eB,createIsInteger:()=>s5,createIsNaN:()=>m5,createIsNegative:()=>u5,createIsNumeric:()=>c5,createIsPositive:()=>d5,createIsPrime:()=>WB,createIsZero:()=>p5,createKldivergence:()=>V7,createKlitzing:()=>VL,createKron:()=>bB,createLN10:()=>EL,createLN2:()=>SL,createLOG10E:()=>CL,createLOG2E:()=>kL,createLarger:()=>w8,createLargerEq:()=>E8,createLcm:()=>U5,createLeafCount:()=>rL,createLeftShift:()=>s8,createLgamma:()=>U7,createLog:()=>JB,createLog10:()=>H5,createLog1p:()=>ZB,createLog2:()=>V5,createLoschmidt:()=>fR,createLsolve:()=>n8,createLsolveAll:()=>a8,createLup:()=>p7,createLusolve:()=>v7,createLyap:()=>F7,createMad:()=>L7,createMagneticConstant:()=>_L,createMagneticFluxQuantum:()=>UL,createMap:()=>xB,createMapTransform:()=>jR,createMatrix:()=>k5,createMatrixClass:()=>JI,createMatrixFromColumns:()=>T5,createMatrixFromFunction:()=>C5,createMatrixFromRows:()=>D5,createMax:()=>Tk,createMaxTransform:()=>PR,createMean:()=>jk,createMeanTransform:()=>_R,createMedian:()=>B7,createMin:()=>Nk,createMinTransform:()=>IR,createMod:()=>uk,createMode:()=>RB,createMolarMass:()=>yR,createMolarMassC12:()=>bR,createMolarPlanckConstant:()=>pR,createMolarVolume:()=>mR,createMultinomial:()=>G7,createMultiply:()=>W5,createMultiplyScalar:()=>G5,createNaN:()=>vL,createNeutronMass:()=>eR,createNode:()=>D9,createNorm:()=>w9,createNot:()=>cB,createNthRoot:()=>Q5,createNthRoots:()=>e8,createNuclearMagneton:() Line truncated
`||(s==="+"?i++:s==="-"?a++:s==="i"||s==="I"?(i+a===0&&tk(),n[o+1]!==" "&&!isNaN(n[o+1])?(r.im+=parseFloat((a%2?"-":"")+n[o+1]),o++):r.im+=parseFloat((a%2?"-":"")+"1"),i=a=0):((i+a===0||isNaN(s))&&tk(),n[o+1]==="i"||n[o+1]==="I"?(r.im+=parseFloat((a%2?"-":"")+s),o++):r.re+=parseFloat((a%2?"-":"")+s),i=a=0))}i+a>0&&tk();break;case"number":r.im=0,r.re=e;break;default:tk()}return isNaN(r.re)||isNaN(r.im),r};function tt(e,t){if(!(this instanceof tt))return new tt(e,t);let r=Lx(e,t);this.re=r.re,this.im=r.im}tt.prototype={re:0,im:0,sign:function(){let e=yJ(this.re,this.im);return new tt(this.re/e,this.im/e)},add:function(e,t){let r=Lx(e,t),n=this.isInfinite(),i=!(isFinite(r.re)&&isFinite(r.im));return n||i?n&&i?tt.NAN:tt.INFINITY:new tt(this.re+r.re,this.im+r.im)},sub:function(e,t){let r=Lx(e,t),n=this.isInfinite(),i=!(isFinite(r.re)&&isFinite(r.im));return n||i?n&&i?tt.NAN:tt.INFINITY:new tt(this.re-r.re,this.im-r.im)},mul:function(e,t){let r=Lx(e,t),n=this.isInfinite(),i=!(isFinite(r.re)&&isFinite(r.im)),a=this.re===0&&this.im===0,o=r.re===0&&r.im===0;return n&&o||i&&a?tt.NAN:n||i?tt.INFINITY:r.im===0&&this.im===0?new tt(this.re*r.re,0):new tt(this.re*r.re-this.im*r.im,this.re*r.im+this.im*r.re)},div:function(e,t){let r=Lx(e,t),n=this.isInfinite(),i=!(isFinite(r.re)&&isFinite(r.im)),a=this.re===0&&this.im===0,o=r.re===0&&r.im===0;if(a&&o||n&&i)return tt.NAN;if(o||n)return tt.INFINITY;if(a||i)return tt.ZERO;if(r.im===0)return new tt(this.re/r.re,this.im/r.re);if(Math.abs(r.re)<Math.abs(r.im)){let s=r.re/r.im,l=r.re*s+r.im;return new tt((this.re*s+this.im)/l,(this.im*s-this.re)/l)}else{let s=r.im/r.re,l=r.im*s+r.re;return new tt((this.re+this.im*s)/l,(this.im-this.re*s)/l)}},pow:function(e,t){let r=Lx(e,t),n=this.re===0&&this.im===0;if(r.re===0&&r.im===0)return tt.ONE;if(r.im===0){if(this.im===0&&this.re>0)return new tt(Math.pow(this.re,r.re),0);if(this.re===0)switch((r.re%4+4)%4){case 0:return new tt(Math.pow(this.im,r.re),0);case 1:return new tt(0,Math.pow(this.im,r.re));case 2:return new tt(-Math.pow(this.im,r.re),0);case 3:return new tt(0,-Math.pow(this.im,r.re))}}if(n&&r.re>0)return tt.ZERO;let a=Math.atan2(this.im,this.re),o=bJ(this.re,this.im),s=Math.exp(r.re*o-r.im*a),l=r.im*o+r.re*a;return new tt(s*Math.cos(l),s*Math.sin(l))},sqrt:function(){let e=this.re,t=this.im;if(t===0)return e>=0?new tt(Math.sqrt(e),0):new tt(0,Math.sqrt(-e));let r=yJ(e,t),n=Math.sqrt(.5*(r+Math.abs(e))),i=Math.abs(t)/(2*n);return e>=0?new tt(n,t<0?-i:i):new tt(i,t<0?-n:n)},exp:function(){let e=Math.exp(this.re);return this.im===0?new tt(e,0):new tt(e*Math.cos(this.im),e*Math.sin(this.im))},expm1:function(){let e=this.re,t=this.im;return new tt(Math.expm1(e)*Math.cos(t)+wnt(t),Math.exp(e)*Math.sin(t))},log:function(){let e=this.re,t=this.im;return t===0&&e>0?new tt(Math.log(e),0):new tt(bJ(e,t),Math.atan2(t,e))},abs:function(){return yJ(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){let e=this.re,t=this.im;return new tt(Math.sin(e)*ic(t),Math.cos(e)*Wp(t))},cos:function(){let e=this.re,t=this.im;return new tt(Math.cos(e)*ic(t),-Math.sin(e)*Wp(t))},tan:function(){let e=2*this.re,t=2*this.im,r=Math.cos(e)+ic(t);return new tt(Math.sin(e)/r,Wp(t)/r)},cot:function(){let e=2*this.re,t=2*this.im,r=Math.cos(e)-ic(t);return new tt(-Math.sin(e)/r,Wp(t)/r)},sec:function(){let e=this.re,t=this.im,r=.5*ic(2*t)+.5*Math.cos(2*e);return new tt(Math.cos(e)*ic(t)/r,Math.sin(e)*Wp(t)/r)},csc:function(){let e=this.re,t=this.im,r=.5*ic(2*t)-.5*Math.cos(2*e);return new tt(Math.sin(e)*ic(t)/r,-Math.cos(e)*Wp(t)/r)},asin:function(){let e=this.re,t=this.im,r=new tt(t*t-e*e+1,-2*e*t).sqrt(),n=new tt(r.re-t,r.im+e).log();return new tt(n.im,-n.re)},acos:function(){let e=this.re,t=this.im,r=new tt(t*t-e*e+1,-2*e*t).sqrt(),n=new tt(r.re-t,r.im+e).log();return new tt(Math.PI/2-n.im,n.re)},atan:function(){let e=this.re,t=this.im;if(e===0){if(t===1)return new tt(0,1/0);if(t===-1)return new tt(0,-1/0)}let r=e*e+(1-t)*(1-t),n=new tt((1-t*t-e*e)/r,-2*e/r).log();return new tt(-.5*n.im,.5*n.re)},acot:function(){let e=this.re,t=this.im;if(t===0)return new tt(Math.atan2(1,e),0);let r=e*e+t*t;return r!==0?new tt(e/r,-t/r).atan():new tt(e!==0?e/0:0,t!==0?-t/0:0).atan()},asec:function(){let e=this.re,t=this.im;if(e===0&&t===0)return new tt(0,1/0);let r=e*e+t*t;return r!==0?new tt(e/r,-t/r).acos():new tt(e!==0?e/0:0,t!==0?-t/0:0).acos()},acsc:function(){let e=this.re,t=this.im;if(e===0&&t===0)return new tt(Math.PI/2,1/0);let r=e*e+t*t;return r!==0?new tt(e/r,-t/r).asin():new tt(e!==0?e/0:0,t!==0?-t/0:0).asin()},sinh:function(){let e=this.re,t=this.im;return new tt(Wp(e)*Math.cos(t),ic(e)*Math.sin(t))},cosh:function(){let e=this.re,t=this.im;return new tt(ic(e)*Math.cos(t),Wp(e)*Math.sin(t))},tanh:function(){let e=2*this.re,t=2*this.im,r=ic(e)+Math.cos(t);return new tt(Wp(e)/r,Math.sin(t)/r)},coth:function(){let e=2*this.re,t=2*this.im,r=ic(e)-Math.cos(t);return new tt(Wp(e)/r,-Math.sin(t)/r)},csch:function(){let e=this.re,t=this.im,r=Ma Line truncated
`);return Object.freeze(Px)};mi(st,Px,{MATRIX_OPTIONS:NI,NUMBER_OPTIONS:MI});var YZ={};DS(YZ,{createAbs:()=>F5,createAccessorNode:()=>M9,createAcos:()=>R8,createAcosh:()=>q8,createAcot:()=>$8,createAcoth:()=>z8,createAcsc:()=>U8,createAcsch:()=>H8,createAdd:()=>b9,createAddScalar:()=>P5,createAnd:()=>Dk,createAndTransform:()=>QR,createApply:()=>_1,createApplyTransform:()=>TR,createArg:()=>oB,createArrayNode:()=>F9,createAsec:()=>V8,createAsech:()=>G8,createAsin:()=>W8,createAsinh:()=>Q8,createAssignmentNode:()=>I9,createAtan:()=>Y8,createAtan2:()=>X8,createAtanh:()=>K8,createAtomicMass:()=>oR,createAvogadro:()=>sR,createBellNumbers:()=>Z7,createBigNumberClass:()=>QI,createBignumber:()=>w5,createBin:()=>zB,createBitAnd:()=>dk,createBitAndTransform:()=>XR,createBitNot:()=>iB,createBitOr:()=>pk,createBitOrTransform:()=>KR,createBitXor:()=>aB,createBlockNode:()=>L9,createBohrMagneton:()=>qL,createBohrRadius:()=>GL,createBoltzmann:()=>lR,createBoolean:()=>x5,createCatalan:()=>eL,createCbrt:()=>I5,createCeil:()=>B5,createChain:()=>S7,createChainClass:()=>x7,createClassicalElectronRadius:()=>WL,createClone:()=>i5,createColumn:()=>gk,createColumnTransform:()=>NR,createCombinations:()=>q7,createCombinationsWithRep:()=>$7,createCompare:()=>f8,createCompareNatural:()=>d8,createCompareText:()=>p8,createCompile:()=>u7,createComplex:()=>S5,createComplexClass:()=>YI,createComposition:()=>tL,createConcat:()=>hk,createConcatTransform:()=>qR,createConditionalNode:()=>q9,createConductanceQuantum:()=>$L,createConj:()=>sB,createConstantNode:()=>H9,createCorr:()=>R7,createCos:()=>J8,createCosh:()=>Z8,createCot:()=>e9,createCoth:()=>t9,createCoulomb:()=>LL,createCount:()=>dB,createCreateUnit:()=>L8,createCross:()=>pB,createCsc:()=>r9,createCsch:()=>n9,createCtranspose:()=>FB,createCube:()=>L5,createCumSum:()=>Fk,createCumSumTransform:()=>VR,createDeepEqual:()=>k8,createDenseMatrixClass:()=>n5,createDerivative:()=>lL,createDet:()=>E7,createDeuteronMass:()=>ZL,createDiag:()=>mB,createDiff:()=>Ak,createDiffTransform:()=>$R,createDistance:()=>P7,createDivide:()=>j7,createDivideScalar:()=>YB,createDot:()=>S9,createDotDivide:()=>r8,createDotMultiply:()=>rB,createDotPow:()=>t8,createE:()=>xL,createEfimovFactor:()=>aR,createEigs:()=>D7,createElectricConstant:()=>IL,createElectronMass:()=>QL,createElementaryCharge:()=>RL,createEqual:()=>h8,createEqualScalar:()=>A5,createEqualText:()=>g8,createErf:()=>BB,createEvaluate:()=>c7,createExp:()=>R5,createExpm:()=>T7,createExpm1:()=>q5,createFactorial:()=>H7,createFalse:()=>hL,createFaraday:()=>uR,createFermiCoupling:()=>YL,createFft:()=>PB,createFibonacciHeapClass:()=>F8,createFilter:()=>hB,createFilterTransform:()=>MR,createFineStructure:()=>XL,createFirstRadiation:()=>cR,createFix:()=>$5,createFlatten:()=>gB,createFloor:()=>lk,createForEach:()=>AB,createForEachTransform:()=>OR,createFormat:()=>$B,createFraction:()=>E5,createFractionClass:()=>XI,createFreqz:()=>fL,createFunctionAssignmentNode:()=>G9,createFunctionNode:()=>s7,createGamma:()=>z7,createGasConstant:()=>dR,createGcd:()=>z5,createGetMatrixDataType:()=>vB,createGravitationConstant:()=>FL,createGravity:()=>xR,createHartreeEnergy:()=>KL,createHasNumericValue:()=>f5,createHelp:()=>w7,createHelpClass:()=>b7,createHex:()=>HB,createHypot:()=>x9,createI:()=>NL,createIdentity:()=>yB,createIfft:()=>_B,createIm:()=>lB,createImmutableDenseMatrixClass:()=>M8,createIndex:()=>k9,createIndexClass:()=>O8,createIndexNode:()=>Q9,createIndexTransform:()=>FR,createInfinity:()=>AL,createIntersect:()=>_7,createInv:()=>k7,createInverseConductanceQuantum:()=>zL,createInvmod:()=>eB,createIsInteger:()=>s5,createIsNaN:()=>m5,createIsNegative:()=>u5,createIsNumeric:()=>c5,createIsPositive:()=>d5,createIsPrime:()=>WB,createIsZero:()=>p5,createKldivergence:()=>V7,createKlitzing:()=>VL,createKron:()=>bB,createLN10:()=>EL,createLN2:()=>SL,createLOG10E:()=>CL,createLOG2E:()=>kL,createLarger:()=>w8,createLargerEq:()=>E8,createLcm:()=>U5,createLeafCount:()=>rL,createLeftShift:()=>s8,createLgamma:()=>U7,createLog:()=>JB,createLog10:()=>H5,createLog1p:()=>ZB,createLog2:()=>V5,createLoschmidt:()=>fR,createLsolve:()=>n8,createLsolveAll:()=>a8,createLup:()=>p7,createLusolve:()=>v7,createLyap:()=>F7,createMad:()=>L7,createMagneticConstant:()=>_L,createMagneticFluxQuantum:()=>UL,createMap:()=>xB,createMapTransform:()=>jR,createMatrix:()=>k5,createMatrixClass:()=>JI,createMatrixFromColumns:()=>T5,createMatrixFromFunction:()=>C5,createMatrixFromRows:()=>D5,createMax:()=>Tk,createMaxTransform:()=>PR,createMean:()=>jk,createMeanTransform:()=>_R,createMedian:()=>B7,createMin:()=>Nk,createMinTransform:()=>IR,createMod:()=>uk,createMode:()=>RB,createMolarMass:()=>yR,createMolarMassC12:()=>bR,createMolarPlanckConstant:()=>pR,createMolarVolume:()=>mR,createMultinomial:()=>G7,createMultiply:()=>W5,createMultiplyScalar:()=>G5,createNaN:()=>vL,createNeutronMass:()=>eR,createNode:()=>D9,createNorm:()=>w9,createNot:()=>cB,createNthRoot:()=>Q5,createNthRoots:()=>e8,createNuclearMagneton:() Line truncated
`||(s==="+"?i++:s==="-"?a++:s==="i"||s==="I"?(i+a===0&&tk(),n[o+1]!==" "&&!isNaN(n[o+1])?(r.im+=parseFloat((a%2?"-":"")+n[o+1]),o++):r.im+=parseFloat((a%2?"-":"")+"1"),i=a=0):((i+a===0||isNaN(s))&&tk(),n[o+1]==="i"||n[o+1]==="I"?(r.im+=parseFloat((a%2?"-":"")+s),o++):r.re+=parseFloat((a%2?"-":"")+s),i=a=0))}i+a>0&&tk();break;case"number":r.im=0,r.re=e;break;default:tk()}return isNaN(r.re)||isNaN(r.im),r};function tt(e,t){if(!(this instanceof tt))return new tt(e,t);let r=Lx(e,t);this.re=r.re,this.im=r.im}tt.prototype={re:0,im:0,sign:function(){let e=yJ(this.re,this.im);return new tt(this.re/e,this.im/e)},add:function(e,t){let r=Lx(e,t),n=this.isInfinite(),i=!(isFinite(r.re)&&isFinite(r.im));return n||i?n&&i?tt.NAN:tt.INFINITY:new tt(this.re+r.re,this.im+r.im)},sub:function(e,t){let r=Lx(e,t),n=this.isInfinite(),i=!(isFinite(r.re)&&isFinite(r.im));return n||i?n&&i?tt.NAN:tt.INFINITY:new tt(this.re-r.re,this.im-r.im)},mul:function(e,t){let r=Lx(e,t),n=this.isInfinite(),i=!(isFinite(r.re)&&isFinite(r.im)),a=this.re===0&&this.im===0,o=r.re===0&&r.im===0;return n&&o||i&&a?tt.NAN:n||i?tt.INFINITY:r.im===0&&this.im===0?new tt(this.re*r.re,0):new tt(this.re*r.re-this.im*r.im,this.re*r.im+this.im*r.re)},div:function(e,t){let r=Lx(e,t),n=this.isInfinite(),i=!(isFinite(r.re)&&isFinite(r.im)),a=this.re===0&&this.im===0,o=r.re===0&&r.im===0;if(a&&o||n&&i)return tt.NAN;if(o||n)return tt.INFINITY;if(a||i)return tt.ZERO;if(r.im===0)return new tt(this.re/r.re,this.im/r.re);if(Math.abs(r.re)<Math.abs(r.im)){let s=r.re/r.im,l=r.re*s+r.im;return new tt((this.re*s+this.im)/l,(this.im*s-this.re)/l)}else{let s=r.im/r.re,l=r.im*s+r.re;return new tt((this.re+this.im*s)/l,(this.im-this.re*s)/l)}},pow:function(e,t){let r=Lx(e,t),n=this.re===0&&this.im===0;if(r.re===0&&r.im===0)return tt.ONE;if(r.im===0){if(this.im===0&&this.re>0)return new tt(Math.pow(this.re,r.re),0);if(this.re===0)switch((r.re%4+4)%4){case 0:return new tt(Math.pow(this.im,r.re),0);case 1:return new tt(0,Math.pow(this.im,r.re));case 2:return new tt(-Math.pow(this.im,r.re),0);case 3:return new tt(0,-Math.pow(this.im,r.re))}}if(n&&r.re>0)return tt.ZERO;let a=Math.atan2(this.im,this.re),o=bJ(this.re,this.im),s=Math.exp(r.re*o-r.im*a),l=r.im*o+r.re*a;return new tt(s*Math.cos(l),s*Math.sin(l))},sqrt:function(){let e=this.re,t=this.im;if(t===0)return e>=0?new tt(Math.sqrt(e),0):new tt(0,Math.sqrt(-e));let r=yJ(e,t),n=Math.sqrt(.5*(r+Math.abs(e))),i=Math.abs(t)/(2*n);return e>=0?new tt(n,t<0?-i:i):new tt(i,t<0?-n:n)},exp:function(){let e=Math.exp(this.re);return this.im===0?new tt(e,0):new tt(e*Math.cos(this.im),e*Math.sin(this.im))},expm1:function(){let e=this.re,t=this.im;return new tt(Math.expm1(e)*Math.cos(t)+wnt(t),Math.exp(e)*Math.sin(t))},log:function(){let e=this.re,t=this.im;return t===0&&e>0?new tt(Math.log(e),0):new tt(bJ(e,t),Math.atan2(t,e))},abs:function(){return yJ(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){let e=this.re,t=this.im;return new tt(Math.sin(e)*ic(t),Math.cos(e)*Wp(t))},cos:function(){let e=this.re,t=this.im;return new tt(Math.cos(e)*ic(t),-Math.sin(e)*Wp(t))},tan:function(){let e=2*this.re,t=2*this.im,r=Math.cos(e)+ic(t);return new tt(Math.sin(e)/r,Wp(t)/r)},cot:function(){let e=2*this.re,t=2*this.im,r=Math.cos(e)-ic(t);return new tt(-Math.sin(e)/r,Wp(t)/r)},sec:function(){let e=this.re,t=this.im,r=.5*ic(2*t)+.5*Math.cos(2*e);return new tt(Math.cos(e)*ic(t)/r,Math.sin(e)*Wp(t)/r)},csc:function(){let e=this.re,t=this.im,r=.5*ic(2*t)-.5*Math.cos(2*e);return new tt(Math.sin(e)*ic(t)/r,-Math.cos(e)*Wp(t)/r)},asin:function(){let e=this.re,t=this.im,r=new tt(t*t-e*e+1,-2*e*t).sqrt(),n=new tt(r.re-t,r.im+e).log();return new tt(n.im,-n.re)},acos:function(){let e=this.re,t=this.im,r=new tt(t*t-e*e+1,-2*e*t).sqrt(),n=new tt(r.re-t,r.im+e).log();return new tt(Math.PI/2-n.im,n.re)},atan:function(){let e=this.re,t=this.im;if(e===0){if(t===1)return new tt(0,1/0);if(t===-1)return new tt(0,-1/0)}let r=e*e+(1-t)*(1-t),n=new tt((1-t*t-e*e)/r,-2*e/r).log();return new tt(-.5*n.im,.5*n.re)},acot:function(){let e=this.re,t=this.im;if(t===0)return new tt(Math.atan2(1,e),0);let r=e*e+t*t;return r!==0?new tt(e/r,-t/r).atan():new tt(e!==0?e/0:0,t!==0?-t/0:0).atan()},asec:function(){let e=this.re,t=this.im;if(e===0&&t===0)return new tt(0,1/0);let r=e*e+t*t;return r!==0?new tt(e/r,-t/r).acos():new tt(e!==0?e/0:0,t!==0?-t/0:0).acos()},acsc:function(){let e=this.re,t=this.im;if(e===0&&t===0)return new tt(Math.PI/2,1/0);let r=e*e+t*t;return r!==0?new tt(e/r,-t/r).asin():new tt(e!==0?e/0:0,t!==0?-t/0:0).asin()},sinh:function(){let e=this.re,t=this.im;return new tt(Wp(e)*Math.cos(t),ic(e)*Math.sin(t))},cosh:function(){let e=this.re,t=this.im;return new tt(ic(e)*Math.cos(t),Wp(e)*Math.sin(t))},tanh:function(){let e=2*this.re,t=2*this.im,r=ic(e)+Math.cos(t);return new tt(Wp(e)/r,Math.sin(t)/r)},coth:function(){let e=2*this.re,t=2*this.im,r=ic(e)-Math.cos(t);return new tt(Wp(e)/r,-Math.sin(t)/r)},csch:function(){let e=this.re,t=this.im,r=Ma Line truncated
`,w=0;w<A;w++)for(var b=this._ptr[w],y=this._ptr[w+1],S=b;S<y;S++){var T=this._index[S];g+=`
(`+Er(T,m)+", "+Er(w,m)+") ==> "+(this._values?Er(this._values[S],m):"X")}return g},i.prototype.toString=function(){return Er(this.toArray())},i.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},i.prototype.diagonal=function(m){if(m){if(er(m)&&(m=m.toNumber()),!hr(m)||!Ot(m))throw new TypeError("The parameter k must be an integer number")}else m=0;var v=m>0?m:0,A=m<0?-m:0,x=this._size[0],g=this._size[1],w=Math.min(x-A,g-v),b=[],y=[],S=[];S[0]=0;for(var T=v;T<g&&b.length<w;T++)for(var D=this._ptr[T],k=this._ptr[T+1],M=D;M<k;M++){var E=this._index[M];if(E===T-v+A){b.push(this._values[M]),y[b.length-1]=E-A;break}}return S.push(b.length),new i({values:b,index:y,ptr:S,size:[w,1]})},i.fromJSON=function(m){return new i(m)},i.diagonal=function(m,v,A,x,g){if(!mn(m))throw new TypeError("Array expected, size parameter");if(m.length!==2)throw new Error("Only two dimensions matrix are supported");if(m=m.map(function(I){if(er(I)&&(I=I.toNumber()),!hr(I)||!Ot(I)||I<1)throw new Error("Size values must be positive integers");return I}),A){if(er(A)&&(A=A.toNumber()),!hr(A)||!Ot(A))throw new TypeError("The parameter k must be an integer number")}else A=0;var w=r,b=0;Ya(g)&&(w=t.find(r,[g,g])||r,b=t.convert(0,g));var y=A>0?A:0,S=A<0?-A:0,T=m[0],D=m[1],k=Math.min(T-S,D-y),M;if(mn(v)){if(v.length!==k)throw new Error("Invalid value array length");M=function(R){return v[R]}}else if(jt(v)){var E=v.size();if(E.length!==1||E[0]!==k)throw new Error("Invalid matrix length");M=function(R){return v.get([R])}}else M=function(){return v};for(var O=[],P=[],_=[],B=0;B<D;B++){_.push(O.length);var F=B-y;if(F>=0&&F<k){var L=M(F);w(L,b)||(P.push(F+S),O.push(L))}}return _.push(O.length),new i({values:O,index:P,ptr:_,size:[T,D]})},i.prototype.swapRows=function(m,v){if(!hr(m)||!Ot(m)||!hr(v)||!Ot(v))throw new Error("Row index must be positive integers");if(this._size.length!==2)throw new Error("Only two dimensional matrix is supported");return xi(m,this._size[0]),xi(v,this._size[0]),i._swapRows(m,v,this._size[1],this._values,this._index,this._ptr),this},i._forEachRow=function(m,v,A,x,g){for(var w=x[m],b=x[m+1],y=w;y<b;y++)g(A[y],v[y])},i._swapRows=function(m,v,A,x,g,w){for(var b=0;b<A;b++){var y=w[b],S=w[b+1],T=u(m,y,S,g),D=u(v,y,S,g);if(T<S&&D<S&&g[T]===m&&g[D]===v){if(x){var k=x[T];x[T]=x[D],x[D]=k}continue}if(T<S&&g[T]===m&&(D>=S||g[D]!==v)){var M=x?x[T]:void 0;g.splice(D,0,v),x&&x.splice(D,0,M),g.splice(D<=T?T+1:T,1),x&&x.splice(D<=T?T+1:T,1);continue}if(D<S&&g[D]===v&&(T>=S||g[T]!==m)){var E=x?x[D]:void 0;g.splice(T,0,m),x&&x.splice(T,0,E),g.splice(T<=D?D+1:D,1),x&&x.splice(T<=D?D+1:D,1)}}},i},{isClass:!0});var xit="number",wit=["typed"];function Sit(e){var t=e.match(/(0[box])([0-9a-fA-F]*)\.([0-9a-fA-F]*)/);if(t){var r={"0b":2,"0o":8,"0x":16}[t[1]],n=t[2],i=t[3];return{input:e,radix:r,integerPart:n,fractionalPart:i}}else return null}function Eit(e){for(var t=parseInt(e.integerPart,e.radix),r=0,n=0;n<e.fractionalPart.length;n++){var i=parseInt(e.fractionalPart[n],e.radix);r+=i/Math.pow(e.radix,n+1)}var a=t+r;if(isNaN(a))throw new SyntaxError('String "'+e.input+'" is not a valid number');return a}var y5=X(xit,wit,e=>{var{typed:t}=e,r=t("number",{"":function(){return 0},number:function(i){return i},string:function(i){if(i==="NaN")return NaN;var a=Sit(i);if(a)return Eit(a);var o=0,s=i.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);s&&(o=Number(s[2]),i=s[1]);var l=Number(i);if(isNaN(l))throw new SyntaxError('String "'+i+'" is not a valid number');if(s){if(l>2**o-1)throw new SyntaxError('String "'.concat(i,'" is out of range'));l>=2**(o-1)&&(l=l-2**o)}return l},BigNumber:function(i){return i.toNumber()},Fraction:function(i){return i.valueOf()},Unit:t.referToSelf(n=>i=>{var a=i.clone();return a.value=n(i.value),a}),null:function(i){return 0},"Unit, string | Unit":function(i,a){return i.toNumber(a)},"Array | Matrix":t.referToSelf(n=>i=>Ut(i,n))});return r.fromJSON=function(n){return parseFloat(n.value)},r});var Pve="string",kit=["typed"],b5=X(Pve,kit,e=>{var{typed:t}=e;return t(Pve,{"":function(){return""},number:th,null:function(n){return"null"},boolean:function(n){return n+""},string:function(n){return n},"Array | Matrix":t.referToSelf(r=>n=>Ut(n,r)),any:function(n){return String(n)}})});var _ve="boolean",Cit=["typed"],x5=X(_ve,Cit,e=>{var{typed:t}=e;return t(_ve,{"":function(){return!1},boolean:function(n){return n},number:function(n){return!!n},null:function(n){return!1},BigNumber:function(n){return!n.isZero()},string:function(n){var i=n.toLowerCase();if(i==="true")return!0;if(i==="false")return!1;var a=Number(n);if(n!==""&&!isNaN(a))return!!a;throw new Error('Cannot convert "'+n+'" to a boolean')},"Array | Matrix":t.referToSelf(r=>n=>Ut(n,r))})});var Dit="bignumber",Tit=["typed","BigNumber"],w5=X(Dit,Tit,e=>{var{typed:t,BigNumber:r}=e;return t("bignumber",{"":function(){return new r(0)},number:function(i){return new r(i+"")},string:function(i){var a Line truncated
(`+Er(T,m)+", "+Er(w,m)+") ==> "+(this._values?Er(this._values[S],m):"X")}return g},i.prototype.toString=function(){return Er(this.toArray())},i.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},i.prototype.diagonal=function(m){if(m){if(er(m)&&(m=m.toNumber()),!hr(m)||!Ot(m))throw new TypeError("The parameter k must be an integer number")}else m=0;var v=m>0?m:0,A=m<0?-m:0,x=this._size[0],g=this._size[1],w=Math.min(x-A,g-v),b=[],y=[],S=[];S[0]=0;for(var T=v;T<g&&b.length<w;T++)for(var D=this._ptr[T],k=this._ptr[T+1],M=D;M<k;M++){var E=this._index[M];if(E===T-v+A){b.push(this._values[M]),y[b.length-1]=E-A;break}}return S.push(b.length),new i({values:b,index:y,ptr:S,size:[w,1]})},i.fromJSON=function(m){return new i(m)},i.diagonal=function(m,v,A,x,g){if(!mn(m))throw new TypeError("Array expected, size parameter");if(m.length!==2)throw new Error("Only two dimensions matrix are supported");if(m=m.map(function(I){if(er(I)&&(I=I.toNumber()),!hr(I)||!Ot(I)||I<1)throw new Error("Size values must be positive integers");return I}),A){if(er(A)&&(A=A.toNumber()),!hr(A)||!Ot(A))throw new TypeError("The parameter k must be an integer number")}else A=0;var w=r,b=0;Ya(g)&&(w=t.find(r,[g,g])||r,b=t.convert(0,g));var y=A>0?A:0,S=A<0?-A:0,T=m[0],D=m[1],k=Math.min(T-S,D-y),M;if(mn(v)){if(v.length!==k)throw new Error("Invalid value array length");M=function(R){return v[R]}}else if(jt(v)){var E=v.size();if(E.length!==1||E[0]!==k)throw new Error("Invalid matrix length");M=function(R){return v.get([R])}}else M=function(){return v};for(var O=[],P=[],_=[],B=0;B<D;B++){_.push(O.length);var F=B-y;if(F>=0&&F<k){var L=M(F);w(L,b)||(P.push(F+S),O.push(L))}}return _.push(O.length),new i({values:O,index:P,ptr:_,size:[T,D]})},i.prototype.swapRows=function(m,v){if(!hr(m)||!Ot(m)||!hr(v)||!Ot(v))throw new Error("Row index must be positive integers");if(this._size.length!==2)throw new Error("Only two dimensional matrix is supported");return xi(m,this._size[0]),xi(v,this._size[0]),i._swapRows(m,v,this._size[1],this._values,this._index,this._ptr),this},i._forEachRow=function(m,v,A,x,g){for(var w=x[m],b=x[m+1],y=w;y<b;y++)g(A[y],v[y])},i._swapRows=function(m,v,A,x,g,w){for(var b=0;b<A;b++){var y=w[b],S=w[b+1],T=u(m,y,S,g),D=u(v,y,S,g);if(T<S&&D<S&&g[T]===m&&g[D]===v){if(x){var k=x[T];x[T]=x[D],x[D]=k}continue}if(T<S&&g[T]===m&&(D>=S||g[D]!==v)){var M=x?x[T]:void 0;g.splice(D,0,v),x&&x.splice(D,0,M),g.splice(D<=T?T+1:T,1),x&&x.splice(D<=T?T+1:T,1);continue}if(D<S&&g[D]===v&&(T>=S||g[T]!==m)){var E=x?x[D]:void 0;g.splice(T,0,m),x&&x.splice(T,0,E),g.splice(T<=D?D+1:D,1),x&&x.splice(T<=D?D+1:D,1)}}},i},{isClass:!0});var xit="number",wit=["typed"];function Sit(e){var t=e.match(/(0[box])([0-9a-fA-F]*)\.([0-9a-fA-F]*)/);if(t){var r={"0b":2,"0o":8,"0x":16}[t[1]],n=t[2],i=t[3];return{input:e,radix:r,integerPart:n,fractionalPart:i}}else return null}function Eit(e){for(var t=parseInt(e.integerPart,e.radix),r=0,n=0;n<e.fractionalPart.length;n++){var i=parseInt(e.fractionalPart[n],e.radix);r+=i/Math.pow(e.radix,n+1)}var a=t+r;if(isNaN(a))throw new SyntaxError('String "'+e.input+'" is not a valid number');return a}var y5=X(xit,wit,e=>{var{typed:t}=e,r=t("number",{"":function(){return 0},number:function(i){return i},string:function(i){if(i==="NaN")return NaN;var a=Sit(i);if(a)return Eit(a);var o=0,s=i.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);s&&(o=Number(s[2]),i=s[1]);var l=Number(i);if(isNaN(l))throw new SyntaxError('String "'+i+'" is not a valid number');if(s){if(l>2**o-1)throw new SyntaxError('String "'.concat(i,'" is out of range'));l>=2**(o-1)&&(l=l-2**o)}return l},BigNumber:function(i){return i.toNumber()},Fraction:function(i){return i.valueOf()},Unit:t.referToSelf(n=>i=>{var a=i.clone();return a.value=n(i.value),a}),null:function(i){return 0},"Unit, string | Unit":function(i,a){return i.toNumber(a)},"Array | Matrix":t.referToSelf(n=>i=>Ut(i,n))});return r.fromJSON=function(n){return parseFloat(n.value)},r});var Pve="string",kit=["typed"],b5=X(Pve,kit,e=>{var{typed:t}=e;return t(Pve,{"":function(){return""},number:th,null:function(n){return"null"},boolean:function(n){return n+""},string:function(n){return n},"Array | Matrix":t.referToSelf(r=>n=>Ut(n,r)),any:function(n){return String(n)}})});var _ve="boolean",Cit=["typed"],x5=X(_ve,Cit,e=>{var{typed:t}=e;return t(_ve,{"":function(){return!1},boolean:function(n){return n},number:function(n){return!!n},null:function(n){return!1},BigNumber:function(n){return!n.isZero()},string:function(n){var i=n.toLowerCase();if(i==="true")return!0;if(i==="false")return!1;var a=Number(n);if(n!==""&&!isNaN(a))return!!a;throw new Error('Cannot convert "'+n+'" to a boolean')},"Array | Matrix":t.referToSelf(r=>n=>Ut(n,r))})});var Dit="bignumber",Tit=["typed","BigNumber"],w5=X(Dit,Tit,e=>{var{typed:t,BigNumber:r}=e;return t("bignumber",{"":function(){return new r(0)},number:function(i){return new r(i+"")},string:function(i){var a Line truncated
`)}toJSON(){return{mathjs:B9,blocks:this.blocks}}static fromJSON(a){return new n(a.blocks)}_toHTML(a){return this.blocks.map(function(o){return o.node.toHTML(a)+(o.visible?"":'<span class="math-separator">;</span>')}).join('<span class="math-separator"><br /></span>')}_toTex(a){return this.blocks.map(function(o){return o.node.toTex(a)+(o.visible?"":";")}).join(`\\;\\;
`)}}return ai(n,"name",B9),n},{isClass:!0,isNode:!0});var R9="ConditionalNode",aut=["Node"],q9=X(R9,aut,e=>{var{Node:t}=e;function r(i){if(typeof i=="number"||typeof i=="boolean"||typeof i=="string")return!!i;if(i){if(er(i))return!i.isZero();if(ol(i))return!!(i.re||i.im);if(hs(i))return!!i.value}if(i==null)return!1;throw new TypeError('Unsupported type of condition "'+yn(i)+'"')}class n extends t{constructor(a,o,s){if(super(),!an(a))throw new TypeError("Parameter condition must be a Node");if(!an(o))throw new TypeError("Parameter trueExpr must be a Node");if(!an(s))throw new TypeError("Parameter falseExpr must be a Node");this.condition=a,this.trueExpr=o,this.falseExpr=s}get type(){return R9}get isConditionalNode(){return!0}_compile(a,o){var s=this.condition._compile(a,o),l=this.trueExpr._compile(a,o),u=this.falseExpr._compile(a,o);return function(f,d,p){return r(s(f,d,p))?l(f,d,p):u(f,d,p)}}forEach(a){a(this.condition,"condition",this),a(this.trueExpr,"trueExpr",this),a(this.falseExpr,"falseExpr",this)}map(a){return new n(this._ifNode(a(this.condition,"condition",this)),this._ifNode(a(this.trueExpr,"trueExpr",this)),this._ifNode(a(this.falseExpr,"falseExpr",this)))}clone(){return new n(this.condition,this.trueExpr,this.falseExpr)}_toString(a){var o=a&&a.parenthesis?a.parenthesis:"keep",s=hi(this,o,a&&a.implicit),l=this.condition.toString(a),u=hi(this.condition,o,a&&a.implicit);(o==="all"||this.condition.type==="OperatorNode"||u!==null&&u<=s)&&(l="("+l+")");var c=this.trueExpr.toString(a),f=hi(this.trueExpr,o,a&&a.implicit);(o==="all"||this.trueExpr.type==="OperatorNode"||f!==null&&f<=s)&&(c="("+c+")");var d=this.falseExpr.toString(a),p=hi(this.falseExpr,o,a&&a.implicit);return(o==="all"||this.falseExpr.type==="OperatorNode"||p!==null&&p<=s)&&(d="("+d+")"),l+" ? "+c+" : "+d}toJSON(){return{mathjs:R9,condition:this.condition,trueExpr:this.trueExpr,falseExpr:this.falseExpr}}static fromJSON(a){return new n(a.condition,a.trueExpr,a.falseExpr)}_toHTML(a){var o=a&&a.parenthesis?a.parenthesis:"keep",s=hi(this,o,a&&a.implicit),l=this.condition.toHTML(a),u=hi(this.condition,o,a&&a.implicit);(o==="all"||this.condition.type==="OperatorNode"||u!==null&&u<=s)&&(l='<span class="math-parenthesis math-round-parenthesis">(</span>'+l+'<span class="math-parenthesis math-round-parenthesis">)</span>');var c=this.trueExpr.toHTML(a),f=hi(this.trueExpr,o,a&&a.implicit);(o==="all"||this.trueExpr.type==="OperatorNode"||f!==null&&f<=s)&&(c='<span class="math-parenthesis math-round-parenthesis">(</span>'+c+'<span class="math-parenthesis math-round-parenthesis">)</span>');var d=this.falseExpr.toHTML(a),p=hi(this.falseExpr,o,a&&a.implicit);return(o==="all"||this.falseExpr.type==="OperatorNode"||p!==null&&p<=s)&&(d='<span class="math-parenthesis math-round-parenthesis">(</span>'+d+'<span class="math-parenthesis math-round-parenthesis">)</span>'),l+'<span class="math-operator math-conditional-operator">?</span>'+c+'<span class="math-operator math-conditional-operator">:</span>'+d}_toTex(a){return"\\begin{cases} {"+this.trueExpr.toTex(a)+"}, &\\quad{\\text{if }\\;"+this.condition.toTex(a)+"}\\\\{"+this.falseExpr.toTex(a)+"}, &\\quad{\\text{otherwise}}\\end{cases}"}}return ai(n,"name",R9),n},{isClass:!0,isNode:!0});var Ibe=ge(Pbe(),1);var jZ={Alpha:"A",alpha:"\\alpha",Beta:"B",beta:"\\beta",Gamma:"\\Gamma",gamma:"\\gamma",Delta:"\\Delta",delta:"\\delta",Epsilon:"E",epsilon:"\\epsilon",varepsilon:"\\varepsilon",Zeta:"Z",zeta:"\\zeta",Eta:"H",eta:"\\eta",Theta:"\\Theta",theta:"\\theta",vartheta:"\\vartheta",Iota:"I",iota:"\\iota",Kappa:"K",kappa:"\\kappa",varkappa:"\\varkappa",Lambda:"\\Lambda",lambda:"\\lambda",Mu:"M",mu:"\\mu",Nu:"N",nu:"\\nu",Xi:"\\Xi",xi:"\\xi",Omicron:"O",omicron:"o",Pi:"\\Pi",pi:"\\pi",varpi:"\\varpi",Rho:"P",rho:"\\rho",varrho:"\\varrho",Sigma:"\\Sigma",sigma:"\\sigma",varsigma:"\\varsigma",Tau:"T",tau:"\\tau",Upsilon:"\\Upsilon",upsilon:"\\upsilon",Phi:"\\Phi",phi:"\\phi",varphi:"\\varphi",Chi:"X",chi:"\\chi",Psi:"\\Psi",psi:"\\psi",Omega:"\\Omega",omega:"\\omega",true:"\\mathrm{True}",false:"\\mathrm{False}",i:"i",inf:"\\infty",Inf:"\\infty",infinity:"\\infty",Infinity:"\\infty",oo:"\\infty",lim:"\\lim",undefined:"\\mathbf{?}"},Kn={transpose:"^\\top",ctranspose:"^H",factorial:"!",pow:"^",dotPow:".^\\wedge",unaryPlus:"+",unaryMinus:"-",bitNot:"\\~",not:"\\neg",multiply:"\\cdot",divide:"\\frac",dotMultiply:".\\cdot",dotDivide:".:",mod:"\\mod",add:"+",subtract:"-",to:"\\rightarrow",leftShift:"<<",rightArithShift:">>",rightLogShift:">>>",equal:"=",unequal:"\\neq",smaller:"<",larger:">",smallerEq:"\\leq",largerEq:"\\geq",bitAnd:"\\&",bitXor:"\\underline{|}",bitOr:"|",and:"\\wedge",xor:"\\veebar",or:"\\vee"},PZ={abs:{1:"\\left|${args[0]}\\right|"},add:{2:"\\left(${args[0]}".concat(Kn.add,"${args[1]}\\right)")},cbrt:{1:"\\sqrt[3]{${args[0]}}"},ceil:{1:"\\left\\lceil${args[0]}\\right\\rceil"},cube:{1:"\\left(${args[0]}\\right)^3"},divide:{2:"\\frac{${args[0]}}{${args[1]}}"},dotDivide:{2:"\\left(${args[0]}".concat(Kn.dotDivi Line truncated
`)}}return ai(n,"name",B9),n},{isClass:!0,isNode:!0});var R9="ConditionalNode",aut=["Node"],q9=X(R9,aut,e=>{var{Node:t}=e;function r(i){if(typeof i=="number"||typeof i=="boolean"||typeof i=="string")return!!i;if(i){if(er(i))return!i.isZero();if(ol(i))return!!(i.re||i.im);if(gs(i))return!!i.value}if(i==null)return!1;throw new TypeError('Unsupported type of condition "'+yn(i)+'"')}class n extends t{constructor(a,o,s){if(super(),!an(a))throw new TypeError("Parameter condition must be a Node");if(!an(o))throw new TypeError("Parameter trueExpr must be a Node");if(!an(s))throw new TypeError("Parameter falseExpr must be a Node");this.condition=a,this.trueExpr=o,this.falseExpr=s}get type(){return R9}get isConditionalNode(){return!0}_compile(a,o){var s=this.condition._compile(a,o),l=this.trueExpr._compile(a,o),u=this.falseExpr._compile(a,o);return function(f,d,p){return r(s(f,d,p))?l(f,d,p):u(f,d,p)}}forEach(a){a(this.condition,"condition",this),a(this.trueExpr,"trueExpr",this),a(this.falseExpr,"falseExpr",this)}map(a){return new n(this._ifNode(a(this.condition,"condition",this)),this._ifNode(a(this.trueExpr,"trueExpr",this)),this._ifNode(a(this.falseExpr,"falseExpr",this)))}clone(){return new n(this.condition,this.trueExpr,this.falseExpr)}_toString(a){var o=a&&a.parenthesis?a.parenthesis:"keep",s=hi(this,o,a&&a.implicit),l=this.condition.toString(a),u=hi(this.condition,o,a&&a.implicit);(o==="all"||this.condition.type==="OperatorNode"||u!==null&&u<=s)&&(l="("+l+")");var c=this.trueExpr.toString(a),f=hi(this.trueExpr,o,a&&a.implicit);(o==="all"||this.trueExpr.type==="OperatorNode"||f!==null&&f<=s)&&(c="("+c+")");var d=this.falseExpr.toString(a),p=hi(this.falseExpr,o,a&&a.implicit);return(o==="all"||this.falseExpr.type==="OperatorNode"||p!==null&&p<=s)&&(d="("+d+")"),l+" ? "+c+" : "+d}toJSON(){return{mathjs:R9,condition:this.condition,trueExpr:this.trueExpr,falseExpr:this.falseExpr}}static fromJSON(a){return new n(a.condition,a.trueExpr,a.falseExpr)}_toHTML(a){var o=a&&a.parenthesis?a.parenthesis:"keep",s=hi(this,o,a&&a.implicit),l=this.condition.toHTML(a),u=hi(this.condition,o,a&&a.implicit);(o==="all"||this.condition.type==="OperatorNode"||u!==null&&u<=s)&&(l='<span class="math-parenthesis math-round-parenthesis">(</span>'+l+'<span class="math-parenthesis math-round-parenthesis">)</span>');var c=this.trueExpr.toHTML(a),f=hi(this.trueExpr,o,a&&a.implicit);(o==="all"||this.trueExpr.type==="OperatorNode"||f!==null&&f<=s)&&(c='<span class="math-parenthesis math-round-parenthesis">(</span>'+c+'<span class="math-parenthesis math-round-parenthesis">)</span>');var d=this.falseExpr.toHTML(a),p=hi(this.falseExpr,o,a&&a.implicit);return(o==="all"||this.falseExpr.type==="OperatorNode"||p!==null&&p<=s)&&(d='<span class="math-parenthesis math-round-parenthesis">(</span>'+d+'<span class="math-parenthesis math-round-parenthesis">)</span>'),l+'<span class="math-operator math-conditional-operator">?</span>'+c+'<span class="math-operator math-conditional-operator">:</span>'+d}_toTex(a){return"\\begin{cases} {"+this.trueExpr.toTex(a)+"}, &\\quad{\\text{if }\\;"+this.condition.toTex(a)+"}\\\\{"+this.falseExpr.toTex(a)+"}, &\\quad{\\text{otherwise}}\\end{cases}"}}return ai(n,"name",R9),n},{isClass:!0,isNode:!0});var Ibe=ge(Pbe(),1);var jZ={Alpha:"A",alpha:"\\alpha",Beta:"B",beta:"\\beta",Gamma:"\\Gamma",gamma:"\\gamma",Delta:"\\Delta",delta:"\\delta",Epsilon:"E",epsilon:"\\epsilon",varepsilon:"\\varepsilon",Zeta:"Z",zeta:"\\zeta",Eta:"H",eta:"\\eta",Theta:"\\Theta",theta:"\\theta",vartheta:"\\vartheta",Iota:"I",iota:"\\iota",Kappa:"K",kappa:"\\kappa",varkappa:"\\varkappa",Lambda:"\\Lambda",lambda:"\\lambda",Mu:"M",mu:"\\mu",Nu:"N",nu:"\\nu",Xi:"\\Xi",xi:"\\xi",Omicron:"O",omicron:"o",Pi:"\\Pi",pi:"\\pi",varpi:"\\varpi",Rho:"P",rho:"\\rho",varrho:"\\varrho",Sigma:"\\Sigma",sigma:"\\sigma",varsigma:"\\varsigma",Tau:"T",tau:"\\tau",Upsilon:"\\Upsilon",upsilon:"\\upsilon",Phi:"\\Phi",phi:"\\phi",varphi:"\\varphi",Chi:"X",chi:"\\chi",Psi:"\\Psi",psi:"\\psi",Omega:"\\Omega",omega:"\\omega",true:"\\mathrm{True}",false:"\\mathrm{False}",i:"i",inf:"\\infty",Inf:"\\infty",infinity:"\\infty",Infinity:"\\infty",oo:"\\infty",lim:"\\lim",undefined:"\\mathbf{?}"},Kn={transpose:"^\\top",ctranspose:"^H",factorial:"!",pow:"^",dotPow:".^\\wedge",unaryPlus:"+",unaryMinus:"-",bitNot:"\\~",not:"\\neg",multiply:"\\cdot",divide:"\\frac",dotMultiply:".\\cdot",dotDivide:".:",mod:"\\mod",add:"+",subtract:"-",to:"\\rightarrow",leftShift:"<<",rightArithShift:">>",rightLogShift:">>>",equal:"=",unequal:"\\neq",smaller:"<",larger:">",smallerEq:"\\leq",largerEq:"\\geq",bitAnd:"\\&",bitXor:"\\underline{|}",bitOr:"|",and:"\\wedge",xor:"\\veebar",or:"\\vee"},PZ={abs:{1:"\\left|${args[0]}\\right|"},add:{2:"\\left(${args[0]}".concat(Kn.add,"${args[1]}\\right)")},cbrt:{1:"\\sqrt[3]{${args[0]}}"},ceil:{1:"\\left\\lceil${args[0]}\\right\\rceil"},cube:{1:"\\left(${args[0]}\\right)^3"},divide:{2:"\\frac{${args[0]}}{${args[1]}}"},dotDivide:{2:"\\left(${args[0]}".concat(Kn.dotDivi Line truncated
`)+"\\end{array}\\right\\}";return s}}return ai(r,"name",Y9),r},{isClass:!0,isNode:!0});function Hx(e,t){return new JE(e,new Ix(t),new Set(Object.keys(t)))}var K9="OperatorNode",put=["Node"],J9=X(K9,put,e=>{var{Node:t}=e;function r(a,o){var s=a;if(o==="auto")for(;ll(s);)s=s.content;return Hr(s)?!0:ta(s)?r(s.args[0],o):!1}function n(a,o,s,l,u){var c=hi(a,o,s),f=Mk(a,o);if(o==="all"||l.length>2&&a.getIdentifier()!=="OperatorNode:add"&&a.getIdentifier()!=="OperatorNode:multiply")return l.map(function(k){switch(k.getContent().type){case"ArrayNode":case"ConstantNode":case"SymbolNode":case"ParenthesisNode":return!1;default:return!0}});var d;switch(l.length){case 0:d=[];break;case 1:{var p=hi(l[0],o,s,a);if(u&&p!==null){var h,m;if(o==="keep"?(h=l[0].getIdentifier(),m=a.getIdentifier()):(h=l[0].getContent().getIdentifier(),m=a.getContent().getIdentifier()),Jp[c][m].latexLeftParens===!1){d=[!1];break}if(Jp[p][h].latexParens===!1){d=[!1];break}}if(p===null){d=[!1];break}if(p<=c){d=[!0];break}d=[!1]}break;case 2:{var v,A=hi(l[0],o,s,a),x=P9(a,l[0],o);A===null?v=!1:A===c&&f==="right"&&!x||A<c?v=!0:v=!1;var g,w=hi(l[1],o,s,a),b=P9(a,l[1],o);if(w===null?g=!1:w===c&&f==="left"&&!b||w<c?g=!0:g=!1,u){var y,S,T;o==="keep"?(y=a.getIdentifier(),S=a.args[0].getIdentifier(),T=a.args[1].getIdentifier()):(y=a.getContent().getIdentifier(),S=a.args[0].getContent().getIdentifier(),T=a.args[1].getContent().getIdentifier()),A!==null&&(Jp[c][y].latexLeftParens===!1&&(v=!1),Jp[A][S].latexParens===!1&&(v=!1)),w!==null&&(Jp[c][y].latexRightParens===!1&&(g=!1),Jp[w][T].latexParens===!1&&(g=!1))}d=[v,g]}break;default:(a.getIdentifier()==="OperatorNode:add"||a.getIdentifier()==="OperatorNode:multiply")&&(d=l.map(function(k){var M=hi(k,o,s,a),E=P9(a,k,o),O=Mk(k,o);return M===null?!1:c===M&&f===O&&!E?!0:M<c}));break}if(l.length>=2&&a.getIdentifier()==="OperatorNode:multiply"&&a.implicit&&o!=="all"&&s==="hide")for(var D=1;D<d.length;++D)r(l[D],o)&&!d[D-1]&&(o!=="keep"||!ll(l[D-1]))&&(d[D]=!0);return d}class i extends t{constructor(o,s,l,u,c){if(super(),typeof o!="string")throw new TypeError('string expected for parameter "op"');if(typeof s!="string")throw new TypeError('string expected for parameter "fn"');if(!Array.isArray(l)||!l.every(an))throw new TypeError('Array containing Nodes expected for parameter "args"');this.implicit=u===!0,this.isPercentage=c===!0,this.op=o,this.fn=s,this.args=l||[]}get type(){return K9}get isOperatorNode(){return!0}_compile(o,s){if(typeof this.fn!="string"||!II(o,this.fn))throw o[this.fn]?new Error('No access to function "'+this.fn+'"'):new Error("Function "+this.fn+' missing in provided namespace "math"');var l=Oa(o,this.fn),u=Lf(this.args,function(h){return h._compile(o,s)});if(typeof l=="function"&&l.rawArgs===!0){var c=this.args;return function(m,v,A){return l(c,o,Hx(m,v))}}else if(u.length===1){var f=u[0];return function(m,v,A){return l(f(m,v,A))}}else if(u.length===2){var d=u[0],p=u[1];return function(m,v,A){return l(d(m,v,A),p(m,v,A))}}else return function(m,v,A){return l.apply(null,Lf(u,function(x){return x(m,v,A)}))}}forEach(o){for(var s=0;s<this.args.length;s++)o(this.args[s],"args["+s+"]",this)}map(o){for(var s=[],l=0;l<this.args.length;l++)s[l]=this._ifNode(o(this.args[l],"args["+l+"]",this));return new i(this.op,this.fn,s,this.implicit,this.isPercentage)}clone(){return new i(this.op,this.fn,this.args.slice(0),this.implicit,this.isPercentage)}isUnary(){return this.args.length===1}isBinary(){return this.args.length===2}_toString(o){var s=o&&o.parenthesis?o.parenthesis:"keep",l=o&&o.implicit?o.implicit:"hide",u=this.args,c=n(this,s,l,u,!1);if(u.length===1){var f=Mk(this,s),d=u[0].toString(o);c[0]&&(d="("+d+")");var p=/[a-zA-Z]+/.test(this.op);return f==="right"?this.op+(p?" ":"")+d:f==="left"?d+(p?" ":"")+this.op:d+this.op}else if(u.length===2){var h=u[0].toString(o),m=u[1].toString(o);return c[0]&&(h="("+h+")"),c[1]&&(m="("+m+")"),this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&l==="hide"?h+" "+m:h+" "+this.op+" "+m}else if(u.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")){var v=u.map(function(A,x){return A=A.toString(o),c[x]&&(A="("+A+")"),A});return this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&l==="hide"?v.join(" "):v.join(" "+this.op+" ")}else return this.fn+"("+this.args.join(", ")+")"}toJSON(){return{mathjs:K9,op:this.op,fn:this.fn,args:this.args,implicit:this.implicit,isPercentage:this.isPercentage}}static fromJSON(o){return new i(o.op,o.fn,o.args,o.implicit,o.isPercentage)}_toHTML(o){var s=o&&o.parenthesis?o.parenthesis:"keep",l=o&&o.implicit?o.implicit:"hide",u=this.args,c=n(this,s,l,u,!1);if(u.length===1){var f=Mk(this,s),d=u[0].toHTML(o);return c[0]&&(d='<span class="math-parenthesis math-round-parenthesis">(</span>'+d+'<span class="math-parenthesis math-round-parenthesis">)</span>'),f==="right"?'<span class="math-operator math-unary-operator math-lefthand-unary-operator">'+cl(this.op)+"</span>"+d:d+'<span Line truncated
`).concat(a(D)))};if(h){var v=this.args;return function(D,k,M){var E=m(D);return E(v,u,Hx(D,k))}}else switch(f.length){case 0:return function(D,k,M){var E=m(D);return E()};case 1:return function(D,k,M){var E=m(D),O=f[0];return E(O(D,k,M))};case 2:return function(D,k,M){var E=m(D),O=f[0],P=f[1];return E(O(D,k,M),P(D,k,M))};default:return function(D,k,M){var E=m(D),O=f.map(P=>P(D,k,M));return E(...O)}}}}else if(Yc(this.fn)&&If(this.fn.index)&&this.fn.index.isObjectProperty()){var x=this.fn.object._compile(u,c),g=this.fn.index.getObjectProperty(),w=this.args;return function(D,k,M){var E=x(D,k,M),O=R0e(E,g);if(O!=null&&O.rawArgs)return O(w,u,Hx(D,k));var P=f.map(_=>_(D,k,M));return O.apply(E,P)}}else{var b=this.fn.toString(),y=this.fn._compile(u,c),S=this.args;return function(D,k,M){var E=y(D,k,M);if(typeof E!="function")throw new TypeError("Expression '".concat(b,"' did not evaluate to a function; value is:")+`
`.concat(a(E)));if(E.rawArgs)return E(S,u,Hx(D,k));var O=f.map(P=>P(D,k,M));return E.apply(E,O)}}}forEach(u){u(this.fn,"fn",this);for(var c=0;c<this.args.length;c++)u(this.args[c],"args["+c+"]",this)}map(u){for(var c=this._ifNode(u(this.fn,"fn",this)),f=[],d=0;d<this.args.length;d++)f[d]=this._ifNode(u(this.args[d],"args["+d+"]",this));return new s(c,f)}clone(){return new s(this.fn,this.args.slice(0))}toString(u){var c,f=this.fn.toString(u);return u&&typeof u.handler=="object"&&Pt(u.handler,f)&&(c=u.handler[f](this,u)),typeof c<"u"?c:super.toString(u)}_toString(u){var c=this.args.map(function(d){return d.toString(u)}),f=Vp(this.fn)?"("+this.fn.toString(u)+")":this.fn.toString(u);return f+"("+c.join(", ")+")"}toJSON(){return{mathjs:o7,fn:this.fn,args:this.args}}_toHTML(u){var c=this.args.map(function(f){return f.toHTML(u)});return'<span class="math-function">'+cl(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+c.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'}toTex(u){var c;return u&&typeof u.handler=="object"&&Pt(u.handler,this.name)&&(c=u.handler[this.name](this,u)),typeof c<"u"?c:super.toTex(u)}_toTex(u){var c=this.args.map(function(p){return p.toTex(u)}),f;PZ[this.name]&&(f=PZ[this.name]),r[this.name]&&(typeof r[this.name].toTex=="function"||typeof r[this.name].toTex=="object"||typeof r[this.name].toTex=="string")&&(f=r[this.name].toTex);var d;switch(typeof f){case"function":d=f(this,u);break;case"string":d=o(f,this,u);break;case"object":switch(typeof f[c.length]){case"function":d=f[c.length](this,u);break;case"string":d=o(f[c.length],this,u);break}}return typeof d<"u"?d:o(Bbe,this,u)}getIdentifier(){return this.type+":"+this.name}}return t=s,ai(s,"name",o7),ai(s,"onUndefinedFunction",function(l){throw new Error("Undefined function "+l)}),ai(s,"fromJSON",function(l){return new t(l.fn,l.args)}),s},{isClass:!0,isNode:!0});var Lbe="parse",but=["typed","numeric","config","AccessorNode","ArrayNode","AssignmentNode","BlockNode","ConditionalNode","ConstantNode","FunctionAssignmentNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","RangeNode","RelationalNode","SymbolNode"],l7=X(Lbe,but,e=>{var{typed:t,numeric:r,config:n,AccessorNode:i,ArrayNode:a,AssignmentNode:o,BlockNode:s,ConditionalNode:l,ConstantNode:u,FunctionAssignmentNode:c,FunctionNode:f,IndexNode:d,ObjectNode:p,OperatorNode:h,ParenthesisNode:m,RangeNode:v,RelationalNode:A,SymbolNode:x}=e,g=t(Lbe,{string:function(me){return J(me,{})},"Array | Matrix":function(me){return w(me,{})},"string, Object":function(me,Fe){var Ce=Fe.nodes!==void 0?Fe.nodes:{};return J(me,Ce)},"Array | Matrix, Object":w});function w(K){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Fe=me.nodes!==void 0?me.nodes:{};return Ut(K,function(Ce){if(typeof Ce!="string")throw new TypeError("String expected");return J(Ce,Fe)})}var b={NULL:0,DELIMITER:1,NUMBER:2,SYMBOL:3,UNKNOWN:4},y={",":!0,"(":!0,")":!0,"[":!0,"]":!0,"{":!0,"}":!0,'"':!0,"'":!0,";":!0,"+":!0,"-":!0,"*":!0,".*":!0,"/":!0,"./":!0,"%":!0,"^":!0,".^":!0,"~":!0,"!":!0,"&":!0,"|":!0,"^|":!0,"=":!0,":":!0,"?":!0,"==":!0,"!=":!0,"<":!0,">":!0,"<=":!0,">=":!0,"<<":!0,">>":!0,">>>":!0},S={mod:!0,to:!0,in:!0,and:!0,xor:!0,or:!0,not:!0},T={true:!0,false:!1,null:null,undefined:void 0},D=["NaN","Infinity"],k={'"':'"',"'":"'","\\":"\\","/":"/",b:"\b",f:"\f",n:`
@@ -122,7 +122,7 @@ q: `+this.q.toString():"")+`
`),n.seealso&&n.seealso.length&&(i+="See also: "+n.seealso.join(", ")+`
`),i},r.prototype.toJSON=function(){var n=nr(this.doc);return n.mathjs="Help",n},r.fromJSON=function(n){var i={};return Object.keys(n).filter(a=>a!=="mathjs").forEach(a=>{i[a]=n[a]}),new r(i)},r.prototype.valueOf=r.prototype.toString,r},{isClass:!0});var Uut="Chain",Hut=["?on","math","typed"],x7=X(Uut,Hut,e=>{var{on:t,math:r,typed:n}=e;function i(u){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");WE(u)?this.value=u.value:this.value=u}i.prototype.type="Chain",i.prototype.isChain=!0,i.prototype.done=function(){return this.value},i.prototype.valueOf=function(){return this.value},i.prototype.toString=function(){return Er(this.value)},i.prototype.toJSON=function(){return{mathjs:"Chain",value:this.value}},i.fromJSON=function(u){return new i(u.value)};function a(u,c){typeof c=="function"&&(i.prototype[u]=s(c))}function o(u,c){YE(i.prototype,u,function(){var d=c();if(typeof d=="function")return s(d)})}function s(u){return function(){if(arguments.length===0)return new i(u(this.value));for(var c=[this.value],f=0;f<arguments.length;f++)c[f+1]=arguments[f];if(n.isTypedFunction(u)){var d=n.resolve(u,c);if(d.params.length===1)throw new Error("chain function "+u.name+" cannot match rest parameter between chain value and additional arguments.");return new i(d.implementation.apply(u,c))}return new i(u.apply(u,c))}}i.createProxy=function(u,c){if(typeof u=="string")a(u,c);else{var f=function(h){Pt(u,h)&&l[h]===void 0&&o(h,()=>u[h])};for(var d in u)f(d)}};var l={expression:!0,docs:!0,type:!0,classes:!0,json:!0,error:!0,isChain:!0};return i.createProxy(r),t&&t("import",function(u,c,f){f||o(u,c)}),i},{isClass:!0});var BZ={name:"e",category:"Constants",syntax:["e"],description:"Euler's number, the base of the natural logarithm. Approximately equal to 2.71828",examples:["e","e ^ 2","exp(2)","log(e)"],seealso:["exp"]};var axe={name:"false",category:"Constants",syntax:["false"],description:"Boolean value false",examples:["false"],seealso:["true"]};var oxe={name:"i",category:"Constants",syntax:["i"],description:"Imaginary unit, defined as i*i=-1. A complex number is described as a + b*i, where a is the real part, and b is the imaginary part.",examples:["i","i * i","sqrt(-1)"],seealso:[]};var sxe={name:"Infinity",category:"Constants",syntax:["Infinity"],description:"Infinity, a number which is larger than the maximum number that can be handled by a floating point number.",examples:["Infinity","1 / 0"],seealso:[]};var lxe={name:"LN10",category:"Constants",syntax:["LN10"],description:"Returns the natural logarithm of 10, approximately equal to 2.302",examples:["LN10","log(10)"],seealso:[]};var uxe={name:"LN2",category:"Constants",syntax:["LN2"],description:"Returns the natural logarithm of 2, approximately equal to 0.693",examples:["LN2","log(2)"],seealso:[]};var cxe={name:"LOG10E",category:"Constants",syntax:["LOG10E"],description:"Returns the base-10 logarithm of E, approximately equal to 0.434",examples:["LOG10E","log(e, 10)"],seealso:[]};var fxe={name:"LOG2E",category:"Constants",syntax:["LOG2E"],description:"Returns the base-2 logarithm of E, approximately equal to 1.442",examples:["LOG2E","log(e, 2)"],seealso:[]};var dxe={name:"NaN",category:"Constants",syntax:["NaN"],description:"Not a number",examples:["NaN","0 / 0"],seealso:[]};var pxe={name:"null",category:"Constants",syntax:["null"],description:"Value null",examples:["null"],seealso:["true","false"]};var mxe={name:"phi",category:"Constants",syntax:["phi"],description:"Phi is the golden ratio. Two quantities are in the golden ratio if their ratio is the same as the ratio of their sum to the larger of the two quantities. Phi is defined as `(1 + sqrt(5)) / 2` and is approximately 1.618034...",examples:["phi"],seealso:[]};var LZ={name:"pi",category:"Constants",syntax:["pi"],description:"The number pi is a mathematical constant that is the ratio of a circle's circumference to its diameter, and is approximately equal to 3.14159",examples:["pi","sin(pi/2)"],seealso:["tau"]};var hxe={name:"SQRT1_2",category:"Constants",syntax:["SQRT1_2"],description:"Returns the square root of 1/2, approximately equal to 0.707",examples:["SQRT1_2","sqrt(1/2)"],seealso:[]};var gxe={name:"SQRT2",category:"Constants",syntax:["SQRT2"],description:"Returns the square root of 2, approximately equal to 1.414",examples:["SQRT2","sqrt(2)"],seealso:[]};var Axe={name:"tau",category:"Constants",syntax:["tau"],description:"Tau is the ratio constant of a circle's circumference to radius, equal to 2 * pi, approximately 6.2832.",examples:["tau","2 * pi"],seealso:["pi"]};var vxe={name:"true",category:"Constants",syntax:["true"],description:"Boolean value true",examples:["true"],seealso:["false"]};var yxe={name:"version",category:"Constants",syntax:["version"],description:"A string with the version number of math.js",examples:["version"],seealso:[]};var bxe={name:"bignumber",category:"Construction",syntax:["bignumber(x)"],description:"Create a big number from a number Line truncated
In case of a (multi dimensional) array or matrix, the prob order quantile of all elements will be calculated.`,examples:["quantileSeq([3, -1, 5, 7], 0.5)","quantileSeq([3, -1, 5, 7], [1/3, 2/3])","quantileSeq([3, -1, 5, 7], 2)","quantileSeq([-1, 3, 5, 7], 0.5, true)"],seealso:["mean","median","min","max","prod","std","sum","variance"]};var ISe={name:"std",category:"Statistics",syntax:["std(a, b, c, ...)","std(A)","std(A, dimension)","std(A, normalization)","std(A, dimension, normalization)"],description:'Compute the standard deviation of all values, defined as std(A) = sqrt(variance(A)). Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["std(2, 4, 6)","std([2, 4, 6, 8])",'std([2, 4, 6, 8], "uncorrected")','std([2, 4, 6, 8], "biased")',"std([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","prod","sum","variance"]};var BSe={name:"cumsum",category:"Statistics",syntax:["cumsum(a, b, c, ...)","cumsum(A)"],description:"Compute the cumulative sum of all values.",examples:["cumsum(2, 3, 4, 1)","cumsum([2, 3, 4, 1])","cumsum([1, 2; 3, 4])","cumsum([1, 2; 3, 4], 1)","cumsum([1, 2; 3, 4], 2)"],seealso:["max","mean","median","min","prod","std","sum","variance"]};var LSe={name:"sum",category:"Statistics",syntax:["sum(a, b, c, ...)","sum(A)","sum(A, dimension)"],description:"Compute the sum of all values.",examples:["sum(2, 3, 4, 1)","sum([2, 3, 4, 1])","sum([2, 5; 4, 3])"],seealso:["max","mean","median","min","prod","std","sum","variance"]};var RSe={name:"variance",category:"Statistics",syntax:["variance(a, b, c, ...)","variance(A)","variance(A, dimension)","variance(A, normalization)","variance(A, dimension, normalization)"],description:'Compute the variance of all values. Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["variance(2, 4, 6)","variance([2, 4, 6, 8])",'variance([2, 4, 6, 8], "uncorrected")','variance([2, 4, 6, 8], "biased")',"variance([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","min","prod","std","sum"]};var qSe={name:"corr",category:"Statistics",syntax:["corr(A,B)"],description:"Compute the correlation coefficient of a two list with values, For matrices, the matrix correlation coefficient is calculated.",examples:["corr([2, 4, 6, 8],[1, 2, 3, 6])","corr(matrix([[1, 2.2, 3, 4.8, 5], [1, 2, 3, 4, 5]]), matrix([[4, 5.3, 6.6, 7, 8], [1, 2, 3, 4, 5]]))"],seealso:["max","mean","min","median","min","prod","std","sum"]};var $Se={name:"acos",category:"Trigonometry",syntax:["acos(x)"],description:"Compute the inverse cosine of a value in radians.",examples:["acos(0.5)","acos(cos(2.3))"],seealso:["cos","atan","asin"]};var zSe={name:"acosh",category:"Trigonometry",syntax:["acosh(x)"],description:"Calculate the hyperbolic arccos of a value, defined as `acosh(x) = ln(sqrt(x^2 - 1) + x)`.",examples:["acosh(1.5)"],seealso:["cosh","asinh","atanh"]};var USe={name:"acot",category:"Trigonometry",syntax:["acot(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acot(0.5)","acot(cot(0.5))","acot(2)"],seealso:["cot","atan"]};var HSe={name:"acoth",category:"Trigonometry",syntax:["acoth(x)"],description:"Calculate the hyperbolic arccotangent of a value, defined as `acoth(x) = (ln((x+1)/x) + ln(x/(x-1))) / 2`.",examples:["acoth(2)","acoth(0.5)"],seealso:["acsch","asech"]};var VSe={name:"acsc",category:"Trigonometry",syntax:["acsc(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acsc(2)","acsc(csc(0.5))","acsc(0.5)"],seealso:["csc","asin","asec"]};var GSe={name:"acsch",category:"Trigonometry",syntax:["acsch(x)"],description:"Calculate the hyperbolic arccosecant of a value, defined as `acsch(x) = ln(1/x + sqrt(1/x^2 + 1))`.",examples:["acsch(0.5)"],seealso:["asech","acoth"]};var WSe={name:"asec",category:"Trigonometry",syntax:["asec(x)"],description:"Calculate the inverse secant of a value.",examples:["asec(0.5)","asec(sec(0.5))","asec(2)"],seealso:["acos","acot","acsc"]};var QSe={name:"asech",category:"Trigonometry",syntax:["asech(x)"],description:"Calculate the inverse secant of a value.",examples:["asech(0.5)"],seealso:["acsch","acoth"]};var YSe={name:"asin",category:"Trigonometry",syntax:["asin(x)"],description:"Compute the inverse sine of a value in radians.",examples:["asin(0.5)","asin(sin(0.5))"],seealso:["sin","acos","atan"]};var XSe={name:"asinh",category:"Trigonometry",syntax:["asinh(x)"],description:"Calculate the hyperbolic arcsine of a value, defined as `asinh(x) = ln(x + sqrt(x^2 + 1))`.",examples:["asinh(0.5)"],seealso:["acosh","atanh"]};var KSe={name:"atan",category:"Trigonometry",syntax:["atan(x)"],description:"Compute the inverse tangent of a value in radians.",examples:["atan(0.5)","atan(tan(0.5))"],seealso:["tan","acos","asin"]};var JSe={name:"atan2",category:"Trigonometry",syntax:["atan2(y, x)"],description:"Computes the principal value of the arc tangent of y/x in radians.",examples:["atan2(2, 2) / pi","angle = 60 deg in rad","x = cos(an Line truncated
In case of a (multi dimensional) array or matrix, the prob order quantile of all elements will be calculated.`,examples:["quantileSeq([3, -1, 5, 7], 0.5)","quantileSeq([3, -1, 5, 7], [1/3, 2/3])","quantileSeq([3, -1, 5, 7], 2)","quantileSeq([-1, 3, 5, 7], 0.5, true)"],seealso:["mean","median","min","max","prod","std","sum","variance"]};var ISe={name:"std",category:"Statistics",syntax:["std(a, b, c, ...)","std(A)","std(A, dimension)","std(A, normalization)","std(A, dimension, normalization)"],description:'Compute the standard deviation of all values, defined as std(A) = sqrt(variance(A)). Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["std(2, 4, 6)","std([2, 4, 6, 8])",'std([2, 4, 6, 8], "uncorrected")','std([2, 4, 6, 8], "biased")',"std([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","prod","sum","variance"]};var BSe={name:"cumsum",category:"Statistics",syntax:["cumsum(a, b, c, ...)","cumsum(A)"],description:"Compute the cumulative sum of all values.",examples:["cumsum(2, 3, 4, 1)","cumsum([2, 3, 4, 1])","cumsum([1, 2; 3, 4])","cumsum([1, 2; 3, 4], 1)","cumsum([1, 2; 3, 4], 2)"],seealso:["max","mean","median","min","prod","std","sum","variance"]};var LSe={name:"sum",category:"Statistics",syntax:["sum(a, b, c, ...)","sum(A)","sum(A, dimension)"],description:"Compute the sum of all values.",examples:["sum(2, 3, 4, 1)","sum([2, 3, 4, 1])","sum([2, 5; 4, 3])"],seealso:["max","mean","median","min","prod","std","sum","variance"]};var RSe={name:"variance",category:"Statistics",syntax:["variance(a, b, c, ...)","variance(A)","variance(A, dimension)","variance(A, normalization)","variance(A, dimension, normalization)"],description:'Compute the variance of all values. Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["variance(2, 4, 6)","variance([2, 4, 6, 8])",'variance([2, 4, 6, 8], "uncorrected")','variance([2, 4, 6, 8], "biased")',"variance([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","min","prod","std","sum"]};var qSe={name:"corr",category:"Statistics",syntax:["corr(A,B)"],description:"Compute the correlation coefficient of a two list with values, For matrices, the matrix correlation coefficient is calculated.",examples:["corr([2, 4, 6, 8],[1, 2, 3, 6])","corr(matrix([[1, 2.2, 3, 4.8, 5], [1, 2, 3, 4, 5]]), matrix([[4, 5.3, 6.6, 7, 8], [1, 2, 3, 4, 5]]))"],seealso:["max","mean","min","median","min","prod","std","sum"]};var $Se={name:"acos",category:"Trigonometry",syntax:["acos(x)"],description:"Compute the inverse cosine of a value in radians.",examples:["acos(0.5)","acos(cos(2.3))"],seealso:["cos","atan","asin"]};var zSe={name:"acosh",category:"Trigonometry",syntax:["acosh(x)"],description:"Calculate the hyperbolic arccos of a value, defined as `acosh(x) = ln(sqrt(x^2 - 1) + x)`.",examples:["acosh(1.5)"],seealso:["cosh","asinh","atanh"]};var USe={name:"acot",category:"Trigonometry",syntax:["acot(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acot(0.5)","acot(cot(0.5))","acot(2)"],seealso:["cot","atan"]};var HSe={name:"acoth",category:"Trigonometry",syntax:["acoth(x)"],description:"Calculate the hyperbolic arccotangent of a value, defined as `acoth(x) = (ln((x+1)/x) + ln(x/(x-1))) / 2`.",examples:["acoth(2)","acoth(0.5)"],seealso:["acsch","asech"]};var VSe={name:"acsc",category:"Trigonometry",syntax:["acsc(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acsc(2)","acsc(csc(0.5))","acsc(0.5)"],seealso:["csc","asin","asec"]};var GSe={name:"acsch",category:"Trigonometry",syntax:["acsch(x)"],description:"Calculate the hyperbolic arccosecant of a value, defined as `acsch(x) = ln(1/x + sqrt(1/x^2 + 1))`.",examples:["acsch(0.5)"],seealso:["asech","acoth"]};var WSe={name:"asec",category:"Trigonometry",syntax:["asec(x)"],description:"Calculate the inverse secant of a value.",examples:["asec(0.5)","asec(sec(0.5))","asec(2)"],seealso:["acos","acot","acsc"]};var QSe={name:"asech",category:"Trigonometry",syntax:["asech(x)"],description:"Calculate the inverse secant of a value.",examples:["asech(0.5)"],seealso:["acsch","acoth"]};var YSe={name:"asin",category:"Trigonometry",syntax:["asin(x)"],description:"Compute the inverse sine of a value in radians.",examples:["asin(0.5)","asin(sin(0.5))"],seealso:["sin","acos","atan"]};var XSe={name:"asinh",category:"Trigonometry",syntax:["asinh(x)"],description:"Calculate the hyperbolic arcsine of a value, defined as `asinh(x) = ln(x + sqrt(x^2 + 1))`.",examples:["asinh(0.5)"],seealso:["acosh","atanh"]};var KSe={name:"atan",category:"Trigonometry",syntax:["atan(x)"],description:"Compute the inverse tangent of a value in radians.",examples:["atan(0.5)","atan(tan(0.5))"],seealso:["tan","acos","asin"]};var JSe={name:"atan2",category:"Trigonometry",syntax:["atan2(y, x)"],description:"Computes the principal value of the arc tangent of y/x in radians.",examples:["atan2(2, 2) / pi","angle = 60 deg in rad","x = cos(an Line truncated
`):!1)?new Function(`with(this) { ${e} }`):new Function(`with(this) { return ${e}; }`)).call(t),mdt=async(e,t,r,n)=>{let{id:i}=e.node,a=e.execProps??{},o=t.state;o[i]={props:t.state[i]?.props??{},actions:t.state[i]?.actions??{},styles:t.state[i]?.styles??{}},o.$contexts=r,o.$api=n;for(let{name:s,isConst:l}of e.execPropsOptions.props)try{let u;s in(t.newState?.[i]?.props||{})&&l?u=t.newState[i].props[s]:u=a[s]?.call(o),u!==null?(o[i].props[s]=u,t.state[i].props[s]=u,t.newState&&(t.newState[i]=t.newState[i]??{props:{},styles:{},actions:{}},t.newState[i].props[s]=u)):(delete o[i].props[s],delete t.state[i].props[s],t.newState?.[i]&&delete t.newState[i].props[s])}catch{}return t};function pNe(e,t,r,n){let{id:i}=e;for(let a of Mr([...Object.keys(r),...Object.keys(n.newState?.[i]?.[t]??{})])){let o;try{if(a in(n.newState?.[i]?.[t]||{})&&n.newState[i][t][a]!==void 0)o=n.newState[i][t][a];else try{o=r[a]?.call(n.state)}catch(s){throw s}o!==null?n.state[e.id][t][a]=o:delete n.state[e.id][t][a]}catch{}}return n}var B3=(e,t)=>e.hiddenExtensions.some(r=>t.endsWith(r))||t.endsWith("/"+e.spaceSubFolder)||t==e.spaceSubFolder||t.split("/").pop()==e.spaceSubFolder||t.startsWith(e.spacesFolder+"/#")||e.hiddenFiles.some(r=>t.startsWith(r)),Yee=(e,t)=>e.skipFolderNames.some(r=>t.endsWith(r))||t.endsWith("/"+e.spaceSubFolder)||t==e.spaceSubFolder||t.split("/").pop()==e.spaceSubFolder||t.startsWith(e.spacesFolder+"/#")||t.startsWith(e.spacesFolder+"/$")||e.hiddenFiles.some(r=>t.startsWith(r));var L3="templates",R3="kits",q3="actions",$3="waypoints.json",z3=class{constructor(t,r){this.fileSystem=t;this.dataPath=r;this.schemes=["spaces","vault"];this.onFocusesUpdated=()=>{this.spaceManager.onFocusesUpdated()};this.onSpaceUpdated=t=>{t.type=="views.mdb"?this.spaceManager.onSpaceUpdated(t.path,"frame"):t.type=="context.mdb"?this.spaceManager.onSpaceUpdated(t.path,"context"):t.type=="commands.mdb"&&this.spaceManager.onSpaceUpdated(t.path,"action")};this.loadPath=async t=>this.fileSystem.loadPath(t);this.onCreate=async t=>{t.file.isFolder?this.spaceManager.onSpaceCreated(t.file.path):this.spaceManager.onPathCreated(t.file.path)};this.onDelete=t=>{!t.file||(!t.file.isFolder&&t.file.extension!="mdb"?this.spaceManager.onPathDeleted(t.file.path):t.file.isFolder&&this.spaceManager.onSpaceDeleted(t.file.path))};this.onRename=t=>{!t.file||(!t.file.isFolder&&t.file.extension!="mdb"?this.spaceManager.onPathChanged(t.file.path,t.oldPath):t.file.isFolder&&this.spaceManager.onSpaceRenamed(t.file.path,t.oldPath))};this.authorities=["vault"];t.eventDispatch.addListener("onCreate",this.onCreate,0,this),t.eventDispatch.addListener("onRename",this.onRename,0,this),t.eventDispatch.addListener("onDelete",this.onDelete,0,this),t.eventDispatch.addListener("onFocusesUpdated",this.onFocusesUpdated,0,this),t.eventDispatch.addListener("onSpaceUpdated",this.onSpaceUpdated,0,this),t.eventDispatch.addListener("onCacheUpdated",this.onMetadataChange,0,this)}initiateAdapter(t){this.spaceManager=t}async readTemplates(t){return(await this.childrenForPath(`${t}/${this.spaceManager.superstate.settings.spaceSubFolder}/templates`)).filter(r=>!r.startsWith(".")).map(r=>r.split("/").pop())}async saveTemplate(t,r){return this.copyPath(t,`${r}/${this.spaceManager.superstate.settings.spaceSubFolder}/templates`)}deleteTemplate(t,r){return this.deletePath(`${r}/${this.spaceManager.superstate.settings.spaceSubFolder}/templates/${t}`)}async readFocuses(){return await this.fileSystem.fileExists(this.dataPath)||await this.fileSystem.createFolder(this.dataPath),await this.fileSystem.fileExists(`${this.dataPath}/${$3}`)?this.fileSystem.readTextFromFile(`${this.dataPath}/${$3}`).then(t=>Ks(or(t))):[]}async saveFocuses(t){return await this.fileSystem.fileExists(this.dataPath)||await this.fileSystem.createFolder(this.dataPath),this.fileSystem.writeTextToFile(`${this.dataPath}/${$3}`,JSON.stringify(t))}async readTemplate(t){let r=`${this.dataPath}/${L3}/${t}`;if(await this.fileSystem.fileExists(r))return this.fileSystem.readFileFragments({path:`${r}/${this.spaceManager.superstate.settings.spaceSubFolder}/views.mdb`,name:"views",filename:"views.mdb",parent:r,isFolder:!1,extension:"mdb"},"mdbTables")}async readAllKits(){let t=(await this.childrenForPath(`${this.dataPath}/${R3}`)).map(n=>n.split("/").pop());return Promise.all(t.map(async n=>{let i=await this.readKitFrames(n);return{id:n,name:n,colors:{},frames:Object.values(i??{})}}))}async readAllTemplates(){let t=(await this.childrenForPath(`${this.dataPath}/${L3}`)).map(n=>n.split("/").pop()),r={};for(let n of t){let i=await this.readTemplate(n);i&&(r[n]=i)}return r}async readKitFrames(t){return this.fileSystem.readFileFragments({path:`${this.dataPath}/${R3}/${t}/kit.mdb`,name:"kit",filename:"kit.mdb",parent:`${this.dataPath}/${R3}/${t}`,isFolder:!1,extension:"mdb"},"mdbTables")}async saveFrameKit(t,r){let n={path:`${this.dataPath}/${R3}/${r}/kit.mdb`,name:"kit",filename:"kit.mdb",parent:`${this.dataPath}/${R3}/${r}`,isFolder:!1,extensi Line truncated
<g opacity="0.4">
<path fill-rule="evenodd" clip-rule="evenodd" d="M32 31H58C58.2761 31 58.5 31.2239 58.5 31.5V52.5H54.4943L49.0521 40.8382L44.3215 49.5109L41.1209 46.3103L37.1595 52.5H31.5V31.5C31.5 31.2239 31.7239 31 32 31ZM53.5704 54.0672L53.539 54H37.9804L37.8817 54.1543L37.6406 54H31.5V57.5C31.5 57.7761 31.7239 58 32 58H58C58.2761 58 58.5 57.7761 58.5 57.5V54H53.7143L53.5704 54.0672ZM48.9479 44.1618L52.839 52.5H38.9404L41.379 48.6897L44.6784 51.9891L48.9479 44.1618ZM30 54V52.5V31.5C30 30.3954 30.8954 29.5 32 29.5H58C59.1046 29.5 60 30.3954 60 31.5V57.5C60 58.6046 59.1046 59.5 58 59.5H32C30.8954 59.5 30 58.6046 30 57.5V54ZM39.5 38.75C39.5 39.7165 38.7165 40.5 37.75 40.5C36.7835 40.5 36 39.7165 36 38.75C36 37.7835 36.7835 37 37.75 37C38.7165 37 39.5 37.7835 39.5 38.75ZM41 38.75C41 40.5449 39.5449 42 37.75 42C35.9551 42 34.5 40.5449 34.5 38.75C34.5 36.9551 35.9551 35.5 37.75 35.5C39.5449 35.5 41 36.9551 41 38.75Z" fill="white"/>
@@ -181,16 +181,16 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
`)}static newName(){let t=rOe[tOe]||1;return rOe[tOe]=t+1,are+t.toString(36)}static mount(t,r,n){let i=t[ore],a=n&&n.nonce;i?a&&i.setNonce(a):i=new sre(t,a),i.mount(Array.isArray(r)?r:[r],t)}},nOe=new Map,sre=class{constructor(t,r){let n=t.ownerDocument||t,i=n.defaultView;if(!t.head&&t.adoptedStyleSheets&&i.CSSStyleSheet){let a=nOe.get(n);if(a)return t[ore]=a;this.sheet=new i.CSSStyleSheet,nOe.set(n,this)}else this.styleTag=n.createElement("style"),r&&this.styleTag.setAttribute("nonce",r);this.modules=[],t[ore]=this}mount(t,r){let n=this.sheet,i=0,a=0;for(let o=0;o<t.length;o++){let s=t[o],l=this.modules.indexOf(s);if(l<a&&l>-1&&(this.modules.splice(l,1),a--,l=-1),l==-1){if(this.modules.splice(a++,0,s),n)for(let u=0;u<s.rules.length;u++)n.insertRule(s.rules[u],i++)}else{for(;a<l;)i+=this.modules[a++].rules.length;i+=s.rules.length,a++}}if(n)r.adoptedStyleSheets.indexOf(this.sheet)<0&&(r.adoptedStyleSheets=[this.sheet,...r.adoptedStyleSheets]);else{let o="";for(let l=0;l<this.modules.length;l++)o+=this.modules[l].getRules()+`
`;this.styleTag.textContent=o;let s=r.head||r;this.styleTag.parentNode!=s&&s.insertBefore(this.styleTag,s.firstChild)}}setNonce(t){this.styleTag&&this.styleTag.getAttribute("nonce")!=t&&this.styleTag.setAttribute("nonce",t)}};var lre,gC=new Zn;function cht(e){return ei.Facet.define({combine:e?t=>t.concat(e):void 0})}var fht=new Zn,Yd=class{constructor(t,r,n=[],i=""){this.data=t,this.name=i,ei.EditorState.prototype.hasOwnProperty("tree")||Object.defineProperty(ei.EditorState.prototype,"tree",{get(){return yu(this)}}),this.parser=r,this.extension=[cy.of(this),ei.EditorState.languageData.of((a,o,s)=>{let l=iOe(a,o,s),u=l.type.prop(gC);if(!u)return[];let c=a.facet(u),f=l.type.prop(fht);if(f){let d=l.resolve(o-l.from,s);for(let p of f)if(p.test(d,a)){let h=a.facet(p.facet);return p.type=="replace"?h:h.concat(c)}}return c})].concat(n)}isActiveAt(t,r,n=-1){return iOe(t,r,n).type.prop(gC)==this.data}findRegions(t){let r=t.facet(cy);if(r?.data==this.data)return[{from:0,to:t.doc.length}];if(!r||!r.allowsNesting)return[];let n=[],i=(a,o)=>{if(a.prop(gC)==this.data){n.push({from:o,to:o+a.length});return}let s=a.prop(Zn.mounted);if(s){if(s.tree.prop(gC)==this.data){if(s.overlay)for(let l of s.overlay)n.push({from:l.from+o,to:l.to+o});else n.push({from:o,to:o+a.length});return}else if(s.overlay){let l=n.length;if(i(s.tree,s.overlay[0].from+o),n.length>l)return}}for(let l=0;l<a.children.length;l++){let u=a.children[l];u instanceof ja&&i(u,a.positions[l]+o)}};return i(yu(t),0),n}get allowsNesting(){return!0}};Yd.setState=ei.StateEffect.define();function iOe(e,t,r){let n=e.facet(cy),i=yu(e).topNode;if(!n||n.allowsNesting)for(let a=i;a;a=a.enter(t,r,es.ExcludeBuffers|es.EnterBracketed))a.type.isTop&&(i=a);return i}function yu(e){let t=e.field(Yd.state,!1);return t?t.tree:ja.empty}var dre=class{constructor(t){this.doc=t,this.cursorPos=0,this.string="",this.cursor=t.iter()}get length(){return this.doc.length}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,r){let n=this.cursorPos-this.string.length;return t<n||r>=this.cursorPos?this.doc.sliceString(t,r):this.string.slice(t-n,r-n)}},lM=null,ly=class{constructor(t,r,n=[],i,a,o,s,l){this.parser=t,this.state=r,this.fragments=n,this.tree=i,this.treeLen=a,this.viewport=o,this.skipped=s,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(t,r,n){return new ly(t,r,[],ja.empty,0,n,[],null)}startParse(){return this.parser.startParse(new dre(this.state.doc),this.fragments)}work(t,r){return r!=null&&r>=this.state.doc.length&&(r=void 0),this.tree!=ja.empty&&this.isDone(r??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var n;if(typeof t=="number"){let i=Date.now()+t;t=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),r!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>r)&&r<this.state.doc.length&&this.parse.stopAt(r);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(Ig.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(n=this.parse.stoppedAt)!==null&&n!==void 0?n:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(r??this.state.doc.length))this.parse=this.startParse();else return!0;if(t())return!1}})}takeTree(){let t,r;this.parse&&(t=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext(()=>{for(;!(r=this.parse.advance()););}),this.treeLen=t,this.tree=r,this.fragments=this.withoutTempSkipped(Ig.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let r=lM;lM=this;try{return t()}finally{lM=r}}withoutTempSkipped(t){for(let r;r=this.tempSkipped.pop();)t=aOe(t,r.from,r.to);return t}changes(t,r){let{fragments:n,tree:i,treeLen:a,viewport:o,skipped:s}=this;if(this.takeTree(),!t.empty){let l=[];if(t.iterChangedRanges((u,c,f,d)=>l.push({fromA:u,toA:c,fromB:f,toB:d})),n=Ig.applyChanges(n,l),i=ja.empty,a=0,o={from:t.mapPos(o.from,-1),to:t.mapPos(o.to,1)},this.skipped.length){s=[];for(let u of this.skipped){let c=t.mapPos(u.from,1),f=t.mapPos(u.to,-1);c<f&&s.push({from:c,to:f})}}}return new ly(this.parser,r,n,i,a,o,s,this.scheduleOn)}updateViewport(t){if(this.viewport.from==t.from&&this.viewport.to==t.to)return!1;this.viewport=t;let r=this.skipped.length;for(let n=0;n<this.skipped.length;n++){let{from:i,to:a}=this.skipped[n];i<t.to&&a>t.from&&(this.fragments=aOe(this.fragments,i,a),this.skipped.splice(n--,1))}return this.skipped.length>=r?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,r){this.skipped.push({from:t,to:r})}static getSkippingParser(t){return new class extends oM{createParse(r,n,i){let a=i[0].from,o=i[i.length-1].to;return{parsedPos:a,advance(){let l=lM;if(l){for(let u of i)l.tempSkipped.push(u);t&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,t]):t)}return this.parsedPos=o Line truncated
`&&(r="");else{let n=r.indexOf(`
`);n>-1&&(r=r.slice(0,n))}return t+r.length<=this.to?r:r.slice(0,this.to-t)}nextLine(){let t=this.parsedPos,r=this.lineAfter(t),n=t+r.length;for(let i=this.rangeIndex;;){let a=this.ranges[i].to;if(a>=n||(r=r.slice(0,a-(n-r.length)),i++,i==this.ranges.length))break;let o=this.ranges[i].from,s=this.lineAfter(o);r+=s,n=o+s.length}return{line:r,end:n}}skipGapsTo(t,r,n){for(;;){let i=this.ranges[this.rangeIndex].to,a=t+r;if(n>0?i>a:i>=a)break;r+=this.ranges[++this.rangeIndex].from-i}return r}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to<this.parsedPos;)this.rangeIndex++}emitToken(t,r,n,i){let a=4;if(this.ranges.length>1){i=this.skipGapsTo(r,i,1),r+=i;let s=this.chunk.length;i=this.skipGapsTo(n,i,-1),n+=i,a+=this.chunk.length-s}let o=this.chunk.length-4;return this.lang.streamParser.mergeTokens&&a==4&&o>=0&&this.chunk[o]==t&&this.chunk[o+2]==r?this.chunk[o+2]=n:this.chunk.push(t,r,n,a),i}parseLine(t){let{line:r,end:n}=this.nextLine(),i=0,{streamParser:a}=this.lang,o=new h$(r,t?t.state.tabSize:4,t?f$(t.state):2);if(o.eol())a.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let s=MOe(a.token,o,this.state);if(s&&(i=this.emitToken(this.lang.tokenTable.resolve(s),this.parsedPos+o.start,this.parsedPos+o.pos,i)),o.start>1e4)break}this.parsedPos=n,this.moveRangeIndex(),this.parsedPos<this.to&&this.parsedPos++}finishChunk(){let t=ja.build({buffer:this.chunk,start:this.chunkStart,length:this.parsedPos-this.chunkStart,nodeSet:Yht,topID:0,maxBufferLength:512,reused:this.chunkReused});t=new ja(t.type,t.children,t.positions,t.length,[[this.lang.stateAfter,this.lang.streamParser.copyState(this.state)]]),this.chunks.push(t),this.chunkPos.push(this.chunkStart-this.ranges[0].from),this.chunk=[],this.chunkReused=void 0,this.chunkStart=this.parsedPos}finish(){return new ja(this.lang.topNode,this.chunks,this.chunkPos,this.parsedPos-this.ranges[0].from).balance()}};function MOe(e,t,r){t.start=t.pos;for(let n=0;n<10;n++){let i=e(t,r);if(t.pos>t.start)return i}throw new Error("Stream parser failed to advance stream.")}var wre=Object.create(null),fM=[vu.none],Yht=new mC(fM),cOe=[],fOe=Object.create(null),OOe=Object.create(null);for(let[e,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])OOe[e]=FOe(wre,t);var g$=class{constructor(t){this.extra=t,this.table=Object.assign(Object.create(null),OOe)}resolve(t){return t?this.table[t]||(this.table[t]=FOe(this.extra,t)):0}},Xht=new g$(wre);function fre(e,t){cOe.indexOf(e)>-1||(cOe.push(e),console.warn(t))}function FOe(e,t){let r=[];for(let s of t.split(" ")){let l=[];for(let u of s.split(".")){let c=e[u]||He[u];c?typeof c=="function"?l.length?l=l.map(c):fre(u,`Modifier ${u} used at start of tag`):l.length?fre(u,`Tag ${u} used as modifier`):l=Array.isArray(c)?c:[c]:fre(u,`Unknown highlighting tag ${u}`)}for(let u of l)r.push(u)}if(!r.length)return 0;let n=t.replace(/ /g,"_"),i=n+" "+r.map(s=>s.id),a=fOe[i];if(a)return a.id;let o=fOe[i]=vu.define({id:fM.length,name:n,props:[JMe({[n]:r})]});return fM.push(o),o.id}function Kht(e,t){let r=vu.define({id:fM.length,name:"Document",props:[gC.add(()=>e),pOe.add(()=>n=>t.getIndent(n))],top:!0});return fM.push(r),r}var hNr={rtl:_n.Decoration.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"rtl"},bidiIsolate:_n.Direction.RTL}),ltr:_n.Decoration.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"ltr"},bidiIsolate:_n.Direction.LTR}),auto:_n.Decoration.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"auto"},bidiIsolate:null})};var jOe=require("@codemirror/view");var mM=e=>{var{theme:t,settings:r={},styles:n=[]}=e,i={".cm-gutters":{}},a={};r.background&&(a.backgroundColor=r.background),r.backgroundImage&&(a.backgroundImage=r.backgroundImage),r.foreground&&(a.color=r.foreground),r.fontSize&&(a.fontSize=r.fontSize),(r.background||r.foreground)&&(i["&"]=a),r.fontFamily&&(i["&.cm-editor .cm-scroller"]={fontFamily:r.fontFamily}),r.gutterBackground&&(i[".cm-gutters"].backgroundColor=r.gutterBackground),r.gutterForeground&&(i[".cm-gutters"].color=r.gutterForeground),r.gutterBorder&&(i[".cm-gutters"].borderRightColor=r.gutterBorder),r.caret&&(i[".cm-content"]={caretColor:r.caret},i[".cm-cursor, .cm-dropCursor"]={borderLeftColor:r.caret});var o={};r.gutterActiveForeground&&(o.color=r.gutterActiveForeground),r.lineHighlight&&(i[".cm-activeLine"]={backgroundColor:r.lineHighlight},o.backgroundColor=r.lineHighlight),i[".cm-activeLineGutter"]=o,r.selection&&(i["&.cm-focused .cm-selectionBackground, & .cm-line::selection, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection"]={background:r.selection+" !important"}),r.selectionMatch&&(i["& .cm-selectionMatch"]={backgroundColor:r.selectionMatch});var s=jOe.EditorView.theme(i,{dark:t==="dark"}),l=qg.define(n),u=[s,A Line truncated
`);n>-1&&(r=r.slice(0,n))}return t+r.length<=this.to?r:r.slice(0,this.to-t)}nextLine(){let t=this.parsedPos,r=this.lineAfter(t),n=t+r.length;for(let i=this.rangeIndex;;){let a=this.ranges[i].to;if(a>=n||(r=r.slice(0,a-(n-r.length)),i++,i==this.ranges.length))break;let o=this.ranges[i].from,s=this.lineAfter(o);r+=s,n=o+s.length}return{line:r,end:n}}skipGapsTo(t,r,n){for(;;){let i=this.ranges[this.rangeIndex].to,a=t+r;if(n>0?i>a:i>=a)break;r+=this.ranges[++this.rangeIndex].from-i}return r}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to<this.parsedPos;)this.rangeIndex++}emitToken(t,r,n,i){let a=4;if(this.ranges.length>1){i=this.skipGapsTo(r,i,1),r+=i;let s=this.chunk.length;i=this.skipGapsTo(n,i,-1),n+=i,a+=this.chunk.length-s}let o=this.chunk.length-4;return this.lang.streamParser.mergeTokens&&a==4&&o>=0&&this.chunk[o]==t&&this.chunk[o+2]==r?this.chunk[o+2]=n:this.chunk.push(t,r,n,a),i}parseLine(t){let{line:r,end:n}=this.nextLine(),i=0,{streamParser:a}=this.lang,o=new h$(r,t?t.state.tabSize:4,t?f$(t.state):2);if(o.eol())a.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let s=MOe(a.token,o,this.state);if(s&&(i=this.emitToken(this.lang.tokenTable.resolve(s),this.parsedPos+o.start,this.parsedPos+o.pos,i)),o.start>1e4)break}this.parsedPos=n,this.moveRangeIndex(),this.parsedPos<this.to&&this.parsedPos++}finishChunk(){let t=ja.build({buffer:this.chunk,start:this.chunkStart,length:this.parsedPos-this.chunkStart,nodeSet:Yht,topID:0,maxBufferLength:512,reused:this.chunkReused});t=new ja(t.type,t.children,t.positions,t.length,[[this.lang.stateAfter,this.lang.streamParser.copyState(this.state)]]),this.chunks.push(t),this.chunkPos.push(this.chunkStart-this.ranges[0].from),this.chunk=[],this.chunkReused=void 0,this.chunkStart=this.parsedPos}finish(){return new ja(this.lang.topNode,this.chunks,this.chunkPos,this.parsedPos-this.ranges[0].from).balance()}};function MOe(e,t,r){t.start=t.pos;for(let n=0;n<10;n++){let i=e(t,r);if(t.pos>t.start)return i}throw new Error("Stream parser failed to advance stream.")}var wre=Object.create(null),fM=[vu.none],Yht=new mC(fM),cOe=[],fOe=Object.create(null),OOe=Object.create(null);for(let[e,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])OOe[e]=FOe(wre,t);var g$=class{constructor(t){this.extra=t,this.table=Object.assign(Object.create(null),OOe)}resolve(t){return t?this.table[t]||(this.table[t]=FOe(this.extra,t)):0}},Xht=new g$(wre);function fre(e,t){cOe.indexOf(e)>-1||(cOe.push(e),console.warn(t))}function FOe(e,t){let r=[];for(let s of t.split(" ")){let l=[];for(let u of s.split(".")){let c=e[u]||He[u];c?typeof c=="function"?l.length?l=l.map(c):fre(u,`Modifier ${u} used at start of tag`):l.length?fre(u,`Tag ${u} used as modifier`):l=Array.isArray(c)?c:[c]:fre(u,`Unknown highlighting tag ${u}`)}for(let u of l)r.push(u)}if(!r.length)return 0;let n=t.replace(/ /g,"_"),i=n+" "+r.map(s=>s.id),a=fOe[i];if(a)return a.id;let o=fOe[i]=vu.define({id:fM.length,name:n,props:[JMe({[n]:r})]});return fM.push(o),o.id}function Kht(e,t){let r=vu.define({id:fM.length,name:"Document",props:[gC.add(()=>e),pOe.add(()=>n=>t.getIndent(n))],top:!0});return fM.push(r),r}var hNr={rtl:_n.Decoration.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"rtl"},bidiIsolate:_n.Direction.RTL}),ltr:_n.Decoration.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"ltr"},bidiIsolate:_n.Direction.LTR}),auto:_n.Decoration.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"auto"},bidiIsolate:null})};var jOe=require("@codemirror/view");var mM=e=>{var{theme:t,settings:r={},styles:n=[]}=e,i={".cm-gutters":{}},a={};r.background&&(a.backgroundColor=r.background),r.backgroundImage&&(a.backgroundImage=r.backgroundImage),r.foreground&&(a.color=r.foreground),r.fontSize&&(a.fontSize=r.fontSize),(r.background||r.foreground)&&(i["&"]=a),r.fontFamily&&(i["&.cm-editor .cm-scroller"]={fontFamily:r.fontFamily}),r.gutterBackground&&(i[".cm-gutters"].backgroundColor=r.gutterBackground),r.gutterForeground&&(i[".cm-gutters"].color=r.gutterForeground),r.gutterBorder&&(i[".cm-gutters"].borderRightColor=r.gutterBorder),r.caret&&(i[".cm-content"]={caretColor:r.caret},i[".cm-cursor, .cm-dropCursor"]={borderLeftColor:r.caret});var o={};r.gutterActiveForeground&&(o.color=r.gutterActiveForeground),r.lineHighlight&&(i[".cm-activeLine"]={backgroundColor:r.lineHighlight},o.backgroundColor=r.lineHighlight),i[".cm-activeLineGutter"]=o,r.selection&&(i["&.cm-focused .cm-selectionBackground, & .cm-line::selection, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection"]={background:r.selection+" !important"}),r.selectionMatch&&(i["& .cm-selectionMatch"]={backgroundColor:r.selectionMatch});var s=jOe.EditorView.theme(i,{dark:t==="dark"}),l=qg.define(n),u=[s,A Line truncated
font-size: .6rem;
font-weight: bold;
color: hsl(${Math.max(0,Math.min(120-120*d,120))}deg 100% 31%);`,r?.key)}return i}}function Zr(e,t,r,n){return{debug:()=>{var i;return(i=e?.debugAll)!=null?i:e[t]},key:!1,onChange:n}}function O0t(e,t,r,n){let i=()=>{var o;return(o=a.getValue())!=null?o:e.options.renderFallbackValue},a={id:`${t.id}_${r.id}`,row:t,column:r,getValue:()=>t.getValue(n),renderValue:i,getContext:Jr(()=>[e,r,t,a],(o,s,l,u)=>({table:o,column:s,row:l,cell:u,getValue:u.getValue,renderValue:u.renderValue}),Zr(e.options,"debugCells","cell.getContext"))};return e._features.forEach(o=>{o.createCell==null||o.createCell(a,r,t,e)},{}),a}function F0t(e,t,r,n){var i,a;let s={...e._getDefaultColumnDef(),...t},l=s.accessorKey,u=(i=(a=s.id)!=null?a:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?i:typeof s.header=="string"?s.header:void 0,c;if(s.accessorFn?c=s.accessorFn:l&&(l.includes(".")?c=d=>{let p=d;for(let m of l.split(".")){var h;p=(h=p)==null?void 0:h[m]}return p}:c=d=>d[s.accessorKey]),!u)throw new Error;let f={id:`${String(u)}`,accessorFn:c,parent:n,depth:r,columnDef:s,columns:[],getFlatColumns:Jr(()=>[!0],()=>{var d;return[f,...(d=f.columns)==null?void 0:d.flatMap(p=>p.getFlatColumns())]},Zr(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:Jr(()=>[e._getOrderColumnsFn()],d=>{var p;if((p=f.columns)!=null&&p.length){let h=f.columns.flatMap(m=>m.getLeafColumns());return d(h)}return[f]},Zr(e.options,"debugColumns","column.getLeafColumns"))};for(let d of e._features)d.createColumn==null||d.createColumn(f,e);return f}var pc="debugHeaders";function WFe(e,t,r){var n;let a={id:(n=r.id)!=null?n:t.id,column:t,index:r.index,isPlaceholder:!!r.isPlaceholder,placeholderId:r.placeholderId,depth:r.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{let o=[],s=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(s),o.push(l)};return s(a),o},getContext:()=>({table:e,header:a,column:t})};return e._features.forEach(o=>{o.createHeader==null||o.createHeader(a,e)}),a}var j0t={createTable:e=>{e.getHeaderGroups=Jr(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,n,i)=>{var a,o;let s=(a=n?.map(f=>r.find(d=>d.id===f)).filter(Boolean))!=null?a:[],l=(o=i?.map(f=>r.find(d=>d.id===f)).filter(Boolean))!=null?o:[],u=r.filter(f=>!(n!=null&&n.includes(f.id))&&!(i!=null&&i.includes(f.id)));return q$(t,[...s,...u,...l],e)},Zr(e.options,pc,"getHeaderGroups")),e.getCenterHeaderGroups=Jr(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,n,i)=>(r=r.filter(a=>!(n!=null&&n.includes(a.id))&&!(i!=null&&i.includes(a.id))),q$(t,r,e,"center")),Zr(e.options,pc,"getCenterHeaderGroups")),e.getLeftHeaderGroups=Jr(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,r,n)=>{var i;let a=(i=n?.map(o=>r.find(s=>s.id===o)).filter(Boolean))!=null?i:[];return q$(t,a,e,"left")},Zr(e.options,pc,"getLeftHeaderGroups")),e.getRightHeaderGroups=Jr(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,r,n)=>{var i;let a=(i=n?.map(o=>r.find(s=>s.id===o)).filter(Boolean))!=null?i:[];return q$(t,a,e,"right")},Zr(e.options,pc,"getRightHeaderGroups")),e.getFooterGroups=Jr(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Zr(e.options,pc,"getFooterGroups")),e.getLeftFooterGroups=Jr(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Zr(e.options,pc,"getLeftFooterGroups")),e.getCenterFooterGroups=Jr(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Zr(e.options,pc,"getCenterFooterGroups")),e.getRightFooterGroups=Jr(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Zr(e.options,pc,"getRightFooterGroups")),e.getFlatHeaders=Jr(()=>[e.getHeaderGroups()],t=>t.map(r=>r.headers).flat(),Zr(e.options,pc,"getFlatHeaders")),e.getLeftFlatHeaders=Jr(()=>[e.getLeftHeaderGroups()],t=>t.map(r=>r.headers).flat(),Zr(e.options,pc,"getLeftFlatHeaders")),e.getCenterFlatHeaders=Jr(()=>[e.getCenterHeaderGroups()],t=>t.map(r=>r.headers).flat(),Zr(e.options,pc,"getCenterFlatHeaders")),e.getRightFlatHeaders=Jr(()=>[e.getRightHeaderGroups()],t=>t.map(r=>r.headers).flat(),Zr(e.options,pc,"getRightFlatHeaders")),e.getCenterLeafHeaders=Jr(()=>[e.getCenterFlatHeaders()],t=>t.filter(r=>{var n;return!((n=r.subHeaders)!=null&&n.length)}),Zr(e.options,pc,"getCenterLeafHeaders")),e.getLeftLeafHeaders=Jr(()=>[e.getLeftFlatHeaders()],t=>t.filter(r=>{var n;return!((n=r.subHeaders)!=null&&n.length)}),Zr(e.options,pc,"getLeftLeafHeaders")),e.getRightLeafHeaders=Jr(()=>[e.getRightFlatHeaders()],t=>t.filter(r=>{var n;return!((n=r.subHeaders)!=null&&n.length)}),Zr(e.options,pc,"getRightLeafHeaders")),e.getLeafHeaders=Jr(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,r,n)=>{var i,a,o,s,l,u;return[...(i=(a=t[0])==null?void 0:a.headers)!=null?i:[],...(o=(s=r[0])==null?void 0:s.headers)!=null?o:[],...(l=(u=n Line truncated
color: hsl(${Math.max(0,Math.min(120-120*d,120))}deg 100% 31%);`,r?.key)}return i}}function Zr(e,t,r,n){return{debug:()=>{var i;return(i=e?.debugAll)!=null?i:e[t]},key:!1,onChange:n}}function O0t(e,t,r,n){let i=()=>{var o;return(o=a.getValue())!=null?o:e.options.renderFallbackValue},a={id:`${t.id}_${r.id}`,row:t,column:r,getValue:()=>t.getValue(n),renderValue:i,getContext:Jr(()=>[e,r,t,a],(o,s,l,u)=>({table:o,column:s,row:l,cell:u,getValue:u.getValue,renderValue:u.renderValue}),Zr(e.options,"debugCells","cell.getContext"))};return e._features.forEach(o=>{o.createCell==null||o.createCell(a,r,t,e)},{}),a}function F0t(e,t,r,n){var i,a;let s={...e._getDefaultColumnDef(),...t},l=s.accessorKey,u=(i=(a=s.id)!=null?a:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?i:typeof s.header=="string"?s.header:void 0,c;if(s.accessorFn?c=s.accessorFn:l&&(l.includes(".")?c=d=>{let p=d;for(let m of l.split(".")){var h;p=(h=p)==null?void 0:h[m]}return p}:c=d=>d[s.accessorKey]),!u)throw new Error;let f={id:`${String(u)}`,accessorFn:c,parent:n,depth:r,columnDef:s,columns:[],getFlatColumns:Jr(()=>[!0],()=>{var d;return[f,...(d=f.columns)==null?void 0:d.flatMap(p=>p.getFlatColumns())]},Zr(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:Jr(()=>[e._getOrderColumnsFn()],d=>{var p;if((p=f.columns)!=null&&p.length){let h=f.columns.flatMap(m=>m.getLeafColumns());return d(h)}return[f]},Zr(e.options,"debugColumns","column.getLeafColumns"))};for(let d of e._features)d.createColumn==null||d.createColumn(f,e);return f}var pc="debugHeaders";function WFe(e,t,r){var n;let a={id:(n=r.id)!=null?n:t.id,column:t,index:r.index,isPlaceholder:!!r.isPlaceholder,placeholderId:r.placeholderId,depth:r.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{let o=[],s=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(s),o.push(l)};return s(a),o},getContext:()=>({table:e,header:a,column:t})};return e._features.forEach(o=>{o.createHeader==null||o.createHeader(a,e)}),a}var j0t={createTable:e=>{e.getHeaderGroups=Jr(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,n,i)=>{var a,o;let s=(a=n?.map(f=>r.find(d=>d.id===f)).filter(Boolean))!=null?a:[],l=(o=i?.map(f=>r.find(d=>d.id===f)).filter(Boolean))!=null?o:[],u=r.filter(f=>!(n!=null&&n.includes(f.id))&&!(i!=null&&i.includes(f.id)));return q$(t,[...s,...u,...l],e)},Zr(e.options,pc,"getHeaderGroups")),e.getCenterHeaderGroups=Jr(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,n,i)=>(r=r.filter(a=>!(n!=null&&n.includes(a.id))&&!(i!=null&&i.includes(a.id))),q$(t,r,e,"center")),Zr(e.options,pc,"getCenterHeaderGroups")),e.getLeftHeaderGroups=Jr(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,r,n)=>{var i;let a=(i=n?.map(o=>r.find(s=>s.id===o)).filter(Boolean))!=null?i:[];return q$(t,a,e,"left")},Zr(e.options,pc,"getLeftHeaderGroups")),e.getRightHeaderGroups=Jr(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,r,n)=>{var i;let a=(i=n?.map(o=>r.find(s=>s.id===o)).filter(Boolean))!=null?i:[];return q$(t,a,e,"right")},Zr(e.options,pc,"getRightHeaderGroups")),e.getFooterGroups=Jr(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Zr(e.options,pc,"getFooterGroups")),e.getLeftFooterGroups=Jr(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Zr(e.options,pc,"getLeftFooterGroups")),e.getCenterFooterGroups=Jr(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Zr(e.options,pc,"getCenterFooterGroups")),e.getRightFooterGroups=Jr(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Zr(e.options,pc,"getRightFooterGroups")),e.getFlatHeaders=Jr(()=>[e.getHeaderGroups()],t=>t.map(r=>r.headers).flat(),Zr(e.options,pc,"getFlatHeaders")),e.getLeftFlatHeaders=Jr(()=>[e.getLeftHeaderGroups()],t=>t.map(r=>r.headers).flat(),Zr(e.options,pc,"getLeftFlatHeaders")),e.getCenterFlatHeaders=Jr(()=>[e.getCenterHeaderGroups()],t=>t.map(r=>r.headers).flat(),Zr(e.options,pc,"getCenterFlatHeaders")),e.getRightFlatHeaders=Jr(()=>[e.getRightHeaderGroups()],t=>t.map(r=>r.headers).flat(),Zr(e.options,pc,"getRightFlatHeaders")),e.getCenterLeafHeaders=Jr(()=>[e.getCenterFlatHeaders()],t=>t.filter(r=>{var n;return!((n=r.subHeaders)!=null&&n.length)}),Zr(e.options,pc,"getCenterLeafHeaders")),e.getLeftLeafHeaders=Jr(()=>[e.getLeftFlatHeaders()],t=>t.filter(r=>{var n;return!((n=r.subHeaders)!=null&&n.length)}),Zr(e.options,pc,"getLeftLeafHeaders")),e.getRightLeafHeaders=Jr(()=>[e.getRightFlatHeaders()],t=>t.filter(r=>{var n;return!((n=r.subHeaders)!=null&&n.length)}),Zr(e.options,pc,"getRightLeafHeaders")),e.getLeafHeaders=Jr(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,r,n)=>{var i,a,o,s,l,u;return[...(i=(a=t[0])==null?void 0:a.headers)!=null?i:[],...(o=(s=r[0])==null?void 0:s.headers)!=null?o:[],...(l=(u=n Line truncated
{
display: none;
}`))};var An=ge(Me());var r6=e=>{let[t,r]=(0,An.useState)(!e.superstate.settings.inlineContextExpanded||!e.collapseSpaces);(0,An.useEffect)(()=>{e.superstate.settings.inlineContextExpanded=!t,e.superstate.saveSettings()},[t]);let[n,i]=(0,An.useState)({}),{spaceState:a}=(0,An.useContext)(kr),{addToSpace:o,readMode:s,removeFromSpace:l,pathState:u}=(0,An.useContext)(en),c=u.type=="space",f=(E,O)=>{let P=e.superstate.spacesIndex.get(O);if(!P)return;let _=!1;P.type=="tag"&&!(u.metadata?.tags??[]).includes(P.space.name)&&(_=!0),P.type=="folder"&&(u.liveSpaces??[]).includes(O)&&(_=!0),E.preventDefault();let B=[];B.push({name:N.menu.openSpace,icon:"ui//layout-grid",onClick:L=>{e.superstate.ui.openPath(P.path,L.metaKey)}}),B.push({name:N.labels.newProperty,icon:"ui//plus",onClick:L=>{m(L,P.path)}}),l&&!_&&B.push({name:N.menu.removeFromSpace.replace("${1}",P.name),icon:"ui//trash",onClick:L=>{l(P.path)}});let F=E.target.getBoundingClientRect();e.superstate.ui.openMenu(F,_t(e.superstate.ui,B),je(E.view.document))},d=(0,An.useMemo)(()=>Mr([u.parent,...e.superstate.spacesMap.get(u.path)]).map(E=>e.superstate.spacesIndex.get(E)).filter(E=>E&&E.type!="default"&&E.path!="/").map(E=>e.superstate.pathsIndex.get(E.path)).sort((E,O)=>u.path.startsWith(E.path)?-1:u.path.startsWith(O.path)?1:0).filter(E=>E),[u]),p=(0,An.useMemo)(()=>[...e.superstate.spacesMap.get(u?.path)??[]].map(E=>e.superstate.spacesIndex.get(E)?.space).filter(E=>E),[u]),h=(E,O)=>E=="$fm"?(iNe(e.superstate,u.path,O),!0):(e.superstate.spaceManager.addSpaceProperty(E,O),!0),m=(E,O)=>{let P=E.target.getBoundingClientRect();Kd(e.superstate,P,je(E.view.document),{spaces:d.map(_=>_.path),fields:[],saveField:(_,B)=>h(_,B),schemaId:lr,contextPath:O,fileMetadata:!0})},v=E=>{let O=E.target.getBoundingClientRect();Aa(O,je(E.view.document),e.superstate,(P,_,B)=>{_?P.charAt(0)=="#"||B=="tag"?Tg(e.superstate,u.path,P):Uf(e.superstate,P,{links:[u.path]}):o(P)},!1,!0)},A=E=>{e.superstate.ui.openModal(N.labels.newAction,An.default.createElement(ga,{value:"",saveLabel:N.buttons.save,saveValue:O=>{e.superstate.spaceManager.createCommand(a.path,{id:O,name:O,type:"actions"})}}),je(E.view.document))},[x,g]=(0,An.useState)([]);(0,An.useEffect)(()=>{w()},[u]),(0,An.useEffect)(()=>{let E=O=>{![...e.superstate.spacesMap.get(u?.path)??[]].includes(O.path)||w()};return e.superstate.eventsDispatcher.addListener("contextStateUpdated",E),()=>{e.superstate.eventsDispatcher.removeListener("contextStateUpdated",E)}},[u]);let w=async()=>{let E=[...e.superstate.spacesMap.get(u?.path)??[]],O=await Promise.all(E.map(async I=>e.superstate.spaceManager.readTable(I,lr).then(R=>({path:I,schema:R.schema,cols:R.cols,rows:R.rows})))),P=E.flatMap(I=>e.superstate.spacesIndex.get(I)?.contexts),_=x.filter(I=>I.property.type.startsWith("context")).map(I=>$t(I.property.value,I.property.type).space).filter(I=>I),F=(await Promise.all([...P,..._].filter(I=>!E.includes(I)).map(I=>e.superstate.spaceManager.readTable(I,lr).then(R=>({[I]:R}))))).reduce((I,R)=>({...I,...R}),{});i({...F,...O.reduce((I,R)=>({...I,[R.path]:{schema:R.schema,cols:R.cols,rows:R.rows}}),{})});let L=[];O.forEach(I=>{let R=I.rows.find(J=>e.superstate.spaceManager.resolvePath(J[ut],I.path)==u.path);I.cols.filter(J=>J.primary!="true").forEach(J=>{let Q=L.findIndex(q=>q.property.name==J.name);Q==-1?L.push({property:J,contexts:[I.path],value:R?.[J.name]??""}):L[Q].contexts.push(I.path)})},[]),g(L)},b=(E,O)=>{ma(e.superstate,u.path,{[O.property.name]:zi(O.property.type,E,!0)}),Promise.all(O.contexts.map(P=>{jx(e.superstate.spaceManager,e.superstate.spacesIndex.get(P).space,u.path,O.property.name,E)}))},y=(E,O,P)=>{ma(e.superstate,u.path,{[P.property.name]:zi(P.property.type,O,!0)}),e.superstate.spaceManager.saveSpaceProperty(P.contexts[0],{...P.property,value:E},P.property)},S=(E,O)=>{let P=E.target.getBoundingClientRect();lm({superstate:e.superstate,field:O.property,rect:P,win:je(E.view.document),options:[],fields:x.map(_=>_.property),contextPath:u.path,saveField:_=>{e.superstate.spaceManager.saveSpaceProperty(O.contexts[0],_,O.property)},anchor:"bottom",deleteColumn:_=>{e.superstate.spaceManager.deleteSpaceProperty(O.contexts[0],O.property)},editable:!0})},[T,D]=(0,An.useTransition)();(0,An.useEffect)(()=>{D(()=>null)},[]);let k=()=>{D(()=>r(E=>!E))},M=[...e1(e.superstate.settings)];return An.default.createElement("div",{className:"mk-props-contexts"},!s&&e.collapseSpaces&&An.default.createElement("div",{style:{position:"relative"}},An.default.createElement("div",{className:"mk-fold"},An.default.createElement(fm,{superstate:e.superstate,collapsed:t,onToggle:E=>k()}))),e.collapseSpaces&&An.default.createElement("div",{className:"mk-path-context-row"},An.default.createElement("div",{className:"mk-props-contexts-space-list"},d.map((E,O)=>An.default.createElement("div",{key:O,className:"mk-props-contexts-space-name",onContextMenu:P=>f(P,E.path),onClick:P=>e.superstate.ui.openPath(E.path,P.metaKey),style:E.label?.color?.length>0?{"--tag-backgr Line truncated
{
display: none;
}`))};var tie=e=>{let[t,r]=(0,Rs.useState)(null),n=a=>{r(a)};(0,Rs.useEffect)(()=>(e.superstate.ui.eventsDispatch.addListener("activePathChanged",n),()=>{e.superstate.ui.eventsDispatch.removeListener("activePathChanged",n)}),[]);let i=e.superstate.spacesIndex.has(t);return Rs.default.createElement(_a,{superstate:e.superstate,path:t,readMode:!1},i?Rs.default.createElement(hl,{superstate:e.superstate},Rs.default.createElement(Aje,{superstate:e.superstate})):Rs.default.createElement(Aje,{superstate:e.superstate}))},Aje=e=>{let[t,r]=(0,Rs.useState)([]),{pathState:n}=(0,Rs.useContext)(en);return(0,Rs.useEffect)(()=>{n&&r([n.path])},[n]),Rs.default.createElement("div",{className:"mk-path-explorer"},Rs.default.createElement("div",{className:"mk-path-context-properties"},Rs.default.createElement("div",{onClick:i=>{i.stopPropagation()},className:"mk-path-context-title"},Rs.default.createElement("div",{dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//list")}}),N.labels.properties),Rs.default.createElement(r6,{superstate:e.superstate,collapseSpaces:!1})),Rs.default.createElement(Fw,{superstate:e.superstate,path:n.path}))};var wh={frameSelected:"mkmd-active-frame",frameLayerSelected:"mkmd-frame-layer",refreshView:"mkmd-refresh-view",revealPath:"mkmd-reveal-file",collapseFolders:"mkmd-collapse-folders",toggleBacklinks:"mkmd-toggle-backlinks",metadataChange:"mkmd-tags-change",vaultChange:"mkmd-vault-change",mdbChange:"mkmd-mdb-change",spacesChange:"mkmd-spaces-change",frameChange:"mkmd-frame-change",updateSections:"mkmd-update-sections",settingsChanged:"mkmd-settings-changed"};var la=ge(Me());var Jvt=e=>{let[t,r]=(0,la.useState)(null),n=o=>{let s=e.superstate.pathsIndex.get(o),l=[...s.metadata.links??[],...s.metadata.embeds??[]].find(u=>e.source.includes(u.displayText));if(l){let u=s.metadata.sections.find(c=>c.position.start.offset<=l.position.start.offset&&c.position.end.offset>=l.position.end.offset);r([Math.max(1,u.position.start.line),Math.max(u.position.start.line+1,u.position.end.line+1)])}else r([null,null])};(0,la.useEffect)(()=>{n(e.path)},[]),(0,la.useEffect)(()=>{n(e.path)},[e.path]);let[i,a]=(0,la.useState)(!0);return la.default.createElement(la.default.Fragment,null,la.default.createElement("div",{className:"mk-path-backlink-title"},la.default.createElement(bo,{superstate:e.superstate,path:e.path},la.default.createElement(fm,{superstate:e.superstate,collapsed:i,onToggle:o=>a(o)}))),!i&&t?la.default.createElement("div",{className:"mk-path-context-backlink"},la.default.createElement(Ty,{load:!0,forceNote:!0,superstate:e.superstate,path:e.path,properties:{from:t[0],to:t[1]},classname:"mk-path-context-flow"})):la.default.createElement(la.default.Fragment,null))},Fw=e=>{let[t,r]=(0,la.useState)(!e.superstate.settings.inlineBacklinksExpanded),[n,i]=(0,la.useState)([]);(0,la.useEffect)(()=>{!e.path||i(Mr([...e.superstate.linksMap.getInverse(e.path)]).map(o=>e.superstate.pathsIndex.get(o).path))},[e.path]),(0,la.useEffect)(()=>{e.superstate.settings.inlineBacklinksExpanded=!t,e.superstate.saveSettings()},[t]);let a=()=>{r(!t)};return(0,la.useEffect)(()=>(window.addEventListener(wh.toggleBacklinks,a),()=>{window.removeEventListener(wh.toggleBacklinks,a)}),[t]),n.length>0&&e.path?la.default.createElement("div",{className:"mk-path-context-component mk-note-footer"},la.default.createElement("div",{onClick:o=>{r(!t),o.stopPropagation()},className:"mk-path-context-title"},la.default.createElement("div",{dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//backlink")}}),N.labels.backlinks),la.default.createElement("div",{className:"mk-fold"},la.default.createElement(fm,{superstate:e.superstate,collapsed:t,onToggle:o=>a()})),la.default.createElement("div",{className:"mk-path-backlinks"},!t&&n.map((o,s)=>la.default.createElement(Jvt,{path:o,key:s,superstate:e.superstate,source:e.path})))):la.default.createElement(la.default.Fragment,null)};var rf=ge(Me());var vje=ge(On());var ka=ge(Me());var pz=e=>{let{expandedSection:t,setExpandedSection:r}=e,{spaceState:n}=(0,ka.useContext)(kr),{pathState:i}=(0,ka.useContext)(en),a=(0,ka.useMemo)(()=>n?[...e.superstate.spacesMap.getInverse(n.path)].length:0,[n]),o=c=>{e.superstate.ui.openModal(N.labels.newTable,ka.default.createElement(ga,{value:"",saveLabel:N.buttons.save,saveValue:f=>{e.superstate.spaceManager.tablesForSpace(n.path).then(d=>{if(d){let p={id:qi(Dg(f),d.map(h=>h.id)),name:f,type:"db"};return e.superstate.spaceManager.createTable(n.path,p).then(h=>e.superstate.spaceManager.addSpaceProperty(n.path,{...zS[0],schemaId:p.id}))}})}}),je(c.view.document))},s=(c,f)=>Au(c,f,e.superstate,d=>{(0,vje.isString)(d)&&X1(e.superstate,n.path,d)}),l=c=>{let f=c.target.getBoundingClientRect(),d=je(c.view.document),p=i?.metadata.label?.[e.superstate.settings.fmKeySticker]?.length>0,h=i?.metadata.property?.[e.superstate.settings.fmKeyBanner],m=[];Or(e.superstate.ui)&&(p?(m.push({name:N.buttons.changeIcon,icon:"ui//sticker",onClick:v=>e.superstate.ui.openPalett Line truncated
}`))};var tie=e=>{let[t,r]=(0,Rs.useState)(null),n=a=>{r(a)};(0,Rs.useEffect)(()=>(e.superstate.ui.eventsDispatch.addListener("activePathChanged",n),()=>{e.superstate.ui.eventsDispatch.removeListener("activePathChanged",n)}),[]);let i=e.superstate.spacesIndex.has(t);return Rs.default.createElement(_a,{superstate:e.superstate,path:t,readMode:!1},i?Rs.default.createElement(hl,{superstate:e.superstate},Rs.default.createElement(Aje,{superstate:e.superstate})):Rs.default.createElement(Aje,{superstate:e.superstate}))},Aje=e=>{let[t,r]=(0,Rs.useState)([]),{pathState:n}=(0,Rs.useContext)(en);return(0,Rs.useEffect)(()=>{n&&r([n.path])},[n]),Rs.default.createElement("div",{className:"mk-path-explorer"},Rs.default.createElement("div",{className:"mk-path-context-properties"},Rs.default.createElement("div",{onClick:i=>{i.stopPropagation()},className:"mk-path-context-title"},Rs.default.createElement("div",{dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//list")}}),N.labels.properties),Rs.default.createElement(r6,{superstate:e.superstate,collapseSpaces:!1})),Rs.default.createElement(Fw,{superstate:e.superstate,path:n.path}))};var wh={frameSelected:"mkmd-active-frame",frameLayerSelected:"mkmd-frame-layer",refreshView:"mkmd-refresh-view",revealPath:"mkmd-reveal-file",collapseFolders:"mkmd-collapse-folders",toggleBacklinks:"mkmd-toggle-backlinks",metadataChange:"mkmd-tags-change",vaultChange:"mkmd-vault-change",mdbChange:"mkmd-mdb-change",spacesChange:"mkmd-spaces-change",frameChange:"mkmd-frame-change",updateSections:"mkmd-update-sections",settingsChanged:"mkmd-settings-changed"};var la=ge(Me());var Jvt=e=>{let[t,r]=(0,la.useState)(null),n=o=>{let s=e.superstate.pathsIndex.get(o),l=[...s.metadata.links??[],...s.metadata.embeds??[]].find(u=>e.source.includes(u.displayText));if(l){let u=s.metadata.sections.find(c=>c.position.start.offset<=l.position.start.offset&&c.position.end.offset>=l.position.end.offset);r([Math.max(1,u.position.start.line),Math.max(u.position.start.line+1,u.position.end.line+1)])}else r([null,null])};(0,la.useEffect)(()=>{n(e.path)},[]),(0,la.useEffect)(()=>{n(e.path)},[e.path]);let[i,a]=(0,la.useState)(!0);return la.default.createElement(la.default.Fragment,null,la.default.createElement("div",{className:"mk-path-backlink-title"},la.default.createElement(bo,{superstate:e.superstate,path:e.path},la.default.createElement(fm,{superstate:e.superstate,collapsed:i,onToggle:o=>a(o)}))),!i&&t?la.default.createElement("div",{className:"mk-path-context-backlink"},la.default.createElement(Ty,{load:!0,forceNote:!0,superstate:e.superstate,path:e.path,properties:{from:t[0],to:t[1]},classname:"mk-path-context-flow"})):la.default.createElement(la.default.Fragment,null))},Fw=e=>{let[t,r]=(0,la.useState)(!e.superstate.settings.inlineBacklinksExpanded),[n,i]=(0,la.useState)([]);(0,la.useEffect)(()=>{!e.path||i(Mr([...e.superstate.linksMap.getInverse(e.path)]).map(o=>e.superstate.pathsIndex.get(o).path))},[e.path]),(0,la.useEffect)(()=>{e.superstate.settings.inlineBacklinksExpanded=!t,e.superstate.saveSettings()},[t]);let a=()=>{r(!t)};return(0,la.useEffect)(()=>(window.addEventListener(wh.toggleBacklinks,a),()=>{window.removeEventListener(wh.toggleBacklinks,a)}),[t]),n.length>0&&e.path?la.default.createElement("div",{className:"mk-path-context-component mk-note-footer"},la.default.createElement("div",{onClick:o=>{r(!t),o.stopPropagation()},className:"mk-path-context-title"},la.default.createElement("div",{dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//backlink")}}),N.labels.backlinks),la.default.createElement("div",{className:"mk-fold"},la.default.createElement(fm,{superstate:e.superstate,collapsed:t,onToggle:o=>a()})),la.default.createElement("div",{className:"mk-path-backlinks"},!t&&n.map((o,s)=>la.default.createElement(Jvt,{path:o,key:s,superstate:e.superstate,source:e.path})))):la.default.createElement(la.default.Fragment,null)};var rf=ge(Me());var vje=ge(On());var ka=ge(Me());var pz=e=>{let{expandedSection:t,setExpandedSection:r}=e,{spaceState:n}=(0,ka.useContext)(kr),{pathState:i}=(0,ka.useContext)(en),a=(0,ka.useMemo)(()=>n?[...e.superstate.spacesMap.getInverse(n.path)].length:0,[n]),o=c=>{e.superstate.ui.openModal(N.labels.newTable,ka.default.createElement(ga,{value:"",saveLabel:N.buttons.save,saveValue:f=>{e.superstate.spaceManager.tablesForSpace(n.path).then(d=>{if(d){let p={id:qi(Dg(f),d.map(h=>h.id)),name:f,type:"db"};return e.superstate.spaceManager.createTable(n.path,p).then(h=>e.superstate.spaceManager.addSpaceProperty(n.path,{...zS[0],schemaId:p.id}))}})}}),je(c.view.document))},s=(c,f)=>Au(c,f,e.superstate,d=>{(0,vje.isString)(d)&&X1(e.superstate,n.path,d)}),l=c=>{let f=c.target.getBoundingClientRect(),d=je(c.view.document),p=i?.metadata.label?.[e.superstate.settings.fmKeySticker]?.length>0,h=i?.metadata.property?.[e.superstate.settings.fmKeyBanner],m=[];Or(e.superstate.ui)&&(p?(m.push({name:N.buttons.changeIcon,icon:"ui//sticker",onClick:v=>e.superstate.ui.openPalett Line truncated
\${}
} catch (\${error}) {
\${}
@@ -202,13 +202,13 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
${t.code}
}`:"",[t]),n=i=>{e.saveCommand({...t,code:i.split(`
`).slice(1,-1).join(`
`),codeType:"script"})};return N6.default.createElement("div",null,N6.default.createElement(yM,{className:"mk-editor-code",value:r,height:"100%",theme:A_e,extensions:[g_e({jsx:!0})],onChange:n}),N6.default.createElement(O$,{type:"script",code:t.code,fields:t.fields,value:{},superstate:e.superstate,path:e.path}))};var y_e=e=>{let[t,r]=(0,La.useState)(null),n=(0,La.useMemo)(()=>e.superstate.spaceManager.uriByString(e.action),[e.action]),i=p=>{if(r(p),n.authority=="$actions"){e.superstate.spaceManager.saveSystemCommand(n.path.split("/").pop(),p);return}e.superstate.spaceManager.saveCommand(n.path,p.schema.id,()=>p)};(0,La.useEffect)(()=>{r(e.superstate.cli.commandForAction(e.action))},[e.action]),(0,La.useEffect)(()=>{let p=h=>{h.path==n.basePath&&r(e.superstate.cli.commandForAction(e.action))};return e.superstate.eventsDispatcher.addListener("actionStateUpdated",p),()=>{e.superstate.eventsDispatcher.removeListener("actionStateUpdated",p)}});let a=(p,h)=>(i({...t,fields:[...t.fields,h]}),!0),o=p=>{i({...t,fields:t.fields.filter(h=>h.name!=p.name)})},s=(p,h)=>{i({...t,fields:t.fields.map(m=>m.name==h.name?p:m)})},l=p=>{let h=p.target.getBoundingClientRect();Kd(e.superstate,h,je(p.view.document),{spaces:[],fields:[],saveField:a,schemaId:t.schema.id,fileMetadata:!0,isSpace:!0})},u=[{name:N.labels.actions,value:"actions"},{name:N.labels.script,value:"script"},{name:N.labels.formula,value:"formula"}],c=p=>{let h=$t(p.value,p.type);if(h)return h?.default},f=(p,h)=>{let m=$t(p.value,p.type)??{};m.default=h,s({...p,value:JSON.stringify(m)},p)},d=(0,La.useMemo)(()=>t?.fields.reduce((p,h)=>({...p,[h.name]:c(h)}),{})??{},[t?.fields]);return La.default.createElement("div",{className:"mk-editor-actions"},t&&La.default.createElement(La.default.Fragment,null,La.default.createElement("div",{className:"mk-props-contexts"},La.default.createElement("div",{className:"mk-path-context-row"},La.default.createElement("div",{className:"mk-path-context-field"},N.labels.type),La.default.createElement("div",{className:"mk-path-context-value"},La.default.createElement(Bw,{superstate:e.superstate,options:u,value:t.schema.type,selectValue:p=>i({...t,schema:{...t.schema,type:p}})}))),La.default.createElement("div",{className:"mk-path-context-row"},La.default.createElement("div",{className:"mk-path-context-field"},N.labels.properties)),La.default.createElement("div",{className:"mk-cell-object"},t.fields.map(p=>La.default.createElement(sa,{key:p.name,superstate:e.superstate,initialValue:c(p),column:p,editMode:5,updateValue:h=>{f(p,h)},updateFieldValue:(h,m)=>{i({...t,fields:t.fields.map(v=>p.name==v.name?{...v,value:h}:v)})},propertyMenu:h=>{let m=h.target.getBoundingClientRect();lm({superstate:e.superstate,rect:m,win:je(h.view.document),editable:!0,options:[],field:p,fields:t.fields,contextPath:null,saveField:v=>s(v,p),deleteColumn:o})}}))),La.default.createElement("button",{className:"mk-inline-button",onClick:p=>l(p)},La.default.createElement("div",{className:"mk-icon-xsmall",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//plus")}}),N.labels.newProperty)),t.schema.type=="script"?La.default.createElement(v_e,{superstate:e.superstate,command:t,saveCommand:i,values:d,path:n.path}):t.schema.type=="actions"?La.default.createElement(iPe,{superstate:e.superstate,formula:t.code,path:n.path,saveOutputType:p=>{i({...t,codeType:p})},saveFormula:p=>{i({...t,code:p})},fields:t.fields,value:d}):t.schema.type=="formula"?La.default.createElement($g,{superstate:e.superstate,formula:t.code,saveFormula:p=>{i({...t,code:p})},fields:t.fields,value:d,path:n.path}):La.default.createElement("div",null)))};var no=ge(Me());var $r=ge(Me());var uf=ge(Me());function Vw(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Zie(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Gw(e){let t,r,n;e.length!==2?(t=Vw,r=(s,l)=>Vw(e(s),l),n=(s,l)=>e(s)-l):(t=e===Vw||e===Zie?e:Vyt,r=e,n=e);function i(s,l,u=0,c=s.length){if(u<c){if(t(l,l)!==0)return c;do{let f=u+c>>>1;r(s[f],l)<0?u=f+1:c=f}while(u<c)}return u}function a(s,l,u=0,c=s.length){if(u<c){if(t(l,l)!==0)return c;do{let f=u+c>>>1;r(s[f],l)<=0?u=f+1:c=f}while(u<c)}return u}function o(s,l,u=0,c=s.length){let f=i(s,l,u,c-1);return f>u&&n(s[f-1],l)>-n(s[f],l)?f-1:f}return{left:i,center:o,right:a}}function Vyt(){return 0}function eae(e){return e===null?NaN:+e}var b_e=Gw(Vw),x_e=b_e.right,Gyt=b_e.left,Wyt=Gw(eae).center,tae=x_e;function nd(e,t){let r,n;if(t===void 0)for(let i of e)i!=null&&(r===void 0?i>=i&&(r=n=i):(r>i&&(r=i),n<i&&(n=i)));else{let i=-1;for(let a of e)(a=t(a,++i,e))!=null&&(r===void 0?a>=a&&(r=n=a):(r>a&&(r=a),n<a&&(n=a)))}return[r,n]}var Hy=class extends Map{constructor(t,r=Xyt){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(let[n,i]of t)this.set(n,i)}get(t){return super.get(w_e(this,t))}has(t){return super.has(w_e(this,t))}set(t,r){return super.set(Qyt(this,t),r)}delete(t){return super.delete(Yyt(this,t))}};function w_e( Line truncated
`),codeType:"script"})};return N6.default.createElement("div",null,N6.default.createElement(yM,{className:"mk-editor-code",value:r,height:"100%",theme:A_e,extensions:[g_e({jsx:!0})],onChange:n}),N6.default.createElement(O$,{type:"script",code:t.code,fields:t.fields,value:{},superstate:e.superstate,path:e.path}))};var y_e=e=>{let[t,r]=(0,La.useState)(null),n=(0,La.useMemo)(()=>e.superstate.spaceManager.uriByString(e.action),[e.action]),i=p=>{if(r(p),n.authority=="$actions"){e.superstate.spaceManager.saveSystemCommand(n.path.split("/").pop(),p);return}e.superstate.spaceManager.saveCommand(n.path,p.schema.id,()=>p)};(0,La.useEffect)(()=>{r(e.superstate.cli.commandForAction(e.action))},[e.action]),(0,La.useEffect)(()=>{let p=h=>{h.path==n.basePath&&r(e.superstate.cli.commandForAction(e.action))};return e.superstate.eventsDispatcher.addListener("actionStateUpdated",p),()=>{e.superstate.eventsDispatcher.removeListener("actionStateUpdated",p)}});let a=(p,h)=>(i({...t,fields:[...t.fields,h]}),!0),o=p=>{i({...t,fields:t.fields.filter(h=>h.name!=p.name)})},s=(p,h)=>{i({...t,fields:t.fields.map(m=>m.name==h.name?p:m)})},l=p=>{let h=p.target.getBoundingClientRect();Kd(e.superstate,h,je(p.view.document),{spaces:[],fields:[],saveField:a,schemaId:t.schema.id,fileMetadata:!0,isSpace:!0})},u=[{name:N.labels.actions,value:"actions"},{name:N.labels.script,value:"script"},{name:N.labels.formula,value:"formula"}],c=p=>{let h=$t(p.value,p.type);if(h)return h?.default},f=(p,h)=>{let m=$t(p.value,p.type)??{};m.default=h,s({...p,value:JSON.stringify(m)},p)},d=(0,La.useMemo)(()=>t?.fields.reduce((p,h)=>({...p,[h.name]:c(h)}),{})??{},[t?.fields]);return La.default.createElement("div",{className:"mk-editor-actions"},t&&La.default.createElement(La.default.Fragment,null,La.default.createElement("div",{className:"mk-props-contexts"},La.default.createElement("div",{className:"mk-path-context-row"},La.default.createElement("div",{className:"mk-path-context-field"},N.labels.type),La.default.createElement("div",{className:"mk-path-context-value"},La.default.createElement(Bw,{superstate:e.superstate,options:u,value:t.schema.type,selectValue:p=>i({...t,schema:{...t.schema,type:p}})}))),La.default.createElement("div",{className:"mk-path-context-row"},La.default.createElement("div",{className:"mk-path-context-field"},N.labels.properties)),La.default.createElement("div",{className:"mk-cell-object"},t.fields.map(p=>La.default.createElement(sa,{key:p.name,superstate:e.superstate,initialValue:c(p),column:p,editMode:5,updateValue:h=>{f(p,h)},updateFieldValue:(h,m)=>{i({...t,fields:t.fields.map(v=>p.name==v.name?{...v,value:h}:v)})},propertyMenu:h=>{let m=h.target.getBoundingClientRect();lm({superstate:e.superstate,rect:m,win:je(h.view.document),editable:!0,options:[],field:p,fields:t.fields,contextPath:null,saveField:v=>s(v,p),deleteColumn:o})}}))),La.default.createElement("button",{className:"mk-inline-button",onClick:p=>l(p)},La.default.createElement("div",{className:"mk-icon-xsmall",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//plus")}}),N.labels.newProperty)),t.schema.type=="script"?La.default.createElement(v_e,{superstate:e.superstate,command:t,saveCommand:i,values:d,path:n.path}):t.schema.type=="actions"?La.default.createElement(iPe,{superstate:e.superstate,formula:t.code,path:n.path,saveOutputType:p=>{i({...t,codeType:p})},saveFormula:p=>{i({...t,code:p})},fields:t.fields,value:d}):t.schema.type=="formula"?La.default.createElement($g,{superstate:e.superstate,formula:t.code,saveFormula:p=>{i({...t,code:p})},fields:t.fields,value:d,path:n.path}):La.default.createElement("div",null)))};var no=ge(Me());var $r=ge(Me());var uf=ge(Me());function Vw(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Zie(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Gw(e){let t,r,n;e.length!==2?(t=Vw,r=(s,l)=>Vw(e(s),l),n=(s,l)=>e(s)-l):(t=e===Vw||e===Zie?e:Vyt,r=e,n=e);function i(s,l,u=0,c=s.length){if(u<c){if(t(l,l)!==0)return c;do{let f=u+c>>>1;r(s[f],l)<0?u=f+1:c=f}while(u<c)}return u}function a(s,l,u=0,c=s.length){if(u<c){if(t(l,l)!==0)return c;do{let f=u+c>>>1;r(s[f],l)<=0?u=f+1:c=f}while(u<c)}return u}function o(s,l,u=0,c=s.length){let f=i(s,l,u,c-1);return f>u&&n(s[f-1],l)>-n(s[f],l)?f-1:f}return{left:i,center:o,right:a}}function Vyt(){return 0}function eae(e){return e===null?NaN:+e}var b_e=Gw(Vw),x_e=b_e.right,Gyt=b_e.left,Wyt=Gw(eae).center,tae=x_e;function nd(e,t){let r,n;if(t===void 0)for(let i of e)i!=null&&(r===void 0?i>=i&&(r=n=i):(r>i&&(r=i),n<i&&(n=i)));else{let i=-1;for(let a of e)(a=t(a,++i,e))!=null&&(r===void 0?a>=a&&(r=n=a):(r>a&&(r=a),n<a&&(n=a)))}return[r,n]}var Hy=class extends Map{constructor(t,r=Xyt){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(let[n,i]of t)this.set(n,i)}get(t){return super.get(w_e(this,t))}has(t){return super.has(w_e(this,t))}set(t,r){return super.set(Qyt(this,t),r)}delete(t){return super.delete(Yyt(this,t))}};function w_e( Line truncated
<div style="font-weight: 600; margin-bottom: 4px;">${ye}</div>
<div><strong>${k.field}:</strong> ${U}</div>
`).style("left",ae.pageX+10+"px").style("top",ae.pageY-28+"px")}).on("mouseout",function(){vr(this).attr("fill","transparent").attr("stroke","transparent").attr("r",4),b.transition().duration(500).style("opacity",0)}),u&&(r.append("g").attr("class",`area-interaction-${M}`).append("path").datum(P).attr("fill","none").attr("stroke","transparent").attr("stroke-width",10).attr("d",B).style("cursor","pointer").on("click",function(){f&&f({type:"series",id:`area-${M}`})}),c?.type==="series"&&c.id===`area-${M}`&&(le.style("stroke-width",(s.mark?.strokeWidth||2)+2).style("filter","drop-shadow(0 0 4px var(--mk-ui-accent))"),Ae.style("fill-opacity",(s.mark?.fillOpacity||.3)+.1))),s.mark?.point?.show){let ae=r.selectAll(`.area-point-series-${M}`).data(P).enter().append("circle").attr("class",`area-point area-point-series-${M}`).attr("cx",oe=>T(oe,E)).attr("cy",oe=>A(oe[k.field])).attr("r",s.mark.point.size||3).attr("fill",p("var(--mk-ui-background)")).attr("stroke",R).attr("stroke-width",2);u&&ae.style("cursor","pointer")}(d||s.mark?.dataLabels?.show)&&P.length<50&&r.selectAll(`.area-label-series-${M}`).data(P).enter().append("text").attr("class",`area-label area-label-series-${M}`).attr("x",ae=>T(ae,E)).attr("y",ae=>A(ae[k.field])-5).attr("text-anchor","middle").style("font-size",`${s.mark?.dataLabels?.fontSize||10}px`).style("fill",p(s.mark?.dataLabels?.color||"var(--mk-ui-text-primary)")).text(ae=>String(ae[k.field]))}),w.length>0&&(n._legendItems=w);let D=x[0];if(D&&(D.type==="temporal"||D.type==="nominal"||D.type==="ordinal")){let k=new Map;i.forEach(O=>{let P=O[D.field],_=P instanceof Date?P.getTime().toString():String(P);k.has(_)||k.set(_,[]),k.get(_).push(O)});let E=Array.from(k.keys()).sort().length>1?Math.abs(v(i[1][D.field])-v(i[0][D.field])):50;k.forEach((O,P)=>{let _=O[0][D.field],B=T(O[0],D);isNaN(B)||r.append("rect").attr("class","x-value-hit-area").attr("x",B-E/2).attr("y",0).attr("width",E).attr("height",l.bottom-l.top).attr("fill","transparent").attr("pointer-events","all").style("cursor","crosshair").on("mouseover",function(F){b.transition().duration(200).style("opacity",.9);let L;if(D.type==="temporal"&&(_ instanceof Date||!isNaN(Date.parse(String(_))))){let R=_ instanceof Date?_:new Date(String(_));L=dv.formatDateForTooltip(R,D)}else{let R=m?.find(J=>J.name===D.field);L=R?cn(R,_,t.superstate):String(_)}let I=`<div style="font-weight: 600; margin-bottom: 4px;">${L}</div>`;g.forEach(R=>{O.forEach(J=>{let Q=J[R.field];if(Q!=null){let q=rn(Number(Q));I+=`<div><strong>${R.field}:</strong> ${q}</div>`}})}),b.html(I).style("left",F.pageX+10+"px").style("top",F.pageY-28+"px")}).on("mousemove",function(F){b.style("left",F.pageX+10+"px").style("top",F.pageY-28+"px")}).on("mouseout",function(){b.transition().duration(500).style("opacity",0)})})}}static renderWithTransformedData(t,r){if(!tn(t))return;let{g:n,svg:i,scales:a,config:o,graphArea:s,editMode:l,selectedElement:u,onElementSelect:c,showDataLabels:f,resolveColor:d,colorPaletteId:p,tableProperties:h}=t,m=a.get("x"),v=a.get("y");if(!m||!v)return;let A=Array.isArray(o.encoding.x)?o.encoding.x:[o.encoding.x],x=Array.isArray(o.encoding.y)?o.encoding.y:[o.encoding.y];if(A[0]&&h){let M=h.find(O=>O.name===A[0].field),E=r.xDomain;A[0]=bs(A[0],M,E)}let g=A[0],w=x[0],b=[],y=bc("area-tooltip"),S=M=>{if(g.type==="quantitative"||g.type==="temporal"){let E=g.type==="temporal"?M instanceof Date?M:new Date(String(M)):Number(M);return m(E)}else{let E=m,O=E.bandwidth?E.bandwidth():0;return E(String(M))+O/2}},T=In(p,t.superstate),D=uH(p,t.superstate),k=new Map;r.data.forEach(M=>{k.has(M.series)||k.set(M.series,[]),k.get(M.series).push(M)}),r.series.forEach((M,E)=>{let O=k.get(M)||[];O.sort((I,R)=>I.x instanceof Date&&R.x instanceof Date?I.x.getTime()-R.x.getTime():typeof I.x=="number"&&typeof R.x=="number"?I.x-R.x:String(I.x).localeCompare(String(R.x)));let P=T[E%T.length],_=D[E%D.length];b.push({label:M,color:P});let B=X6().x(I=>S(I.x)).y0(I=>v(I.y0||0)).y1(I=>v(I.y)).curve((o.mark?.interpolate||"linear")==="monotone"?cv:yc),F=lf().x(I=>S(I.x)).y(I=>v(I.y)).curve((o.mark?.interpolate||"linear")==="monotone"?cv:yc);n.append("path").datum(O).attr("class",`area area-series-${E}`).attr("fill",P).attr("fill-opacity",o.mark?.fillOpacity||.3).attr("d",B),n.append("path").datum(O).attr("class",`area-line area-line-series-${E}`).attr("fill","none").attr("stroke",_).attr("stroke-width",o.mark?.strokeWidth||2).attr("d",F),n.append("g").attr("class",`area-tooltip-points-${E}`).selectAll("circle").data(O).enter().append("circle").attr("cx",I=>S(I.x)).attr("cy",I=>v(I.y)).attr("r",4).attr("fill","transparent").attr("stroke","transparent").style("cursor","pointer").on("mouseover",function(I,R){vr(this).attr("fill",_).attr("stroke",_).attr("r",6);let J;if(R.x instanceof Date){let Q=Array.isArray(o.encoding.x)?o.encoding.x[0]:o.encoding.x;J=dv.formatDateForTooltip(R.x,Q)}else if(typeof R.x=="number")J=rn(R.x);else{let Q=h?.find(q=>q.name===g.field);J=Q&&t.superstate?cn(Q,R.x,t.Line truncated
`).style("left",ae.pageX+10+"px").style("top",ae.pageY-28+"px")}).on("mouseout",function(){vr(this).attr("fill","transparent").attr("stroke","transparent").attr("r",4),b.transition().duration(500).style("opacity",0)}),u&&(r.append("g").attr("class",`area-interaction-${M}`).append("path").datum(P).attr("fill","none").attr("stroke","transparent").attr("stroke-width",10).attr("d",B).style("cursor","pointer").on("click",function(){f&&f({type:"series",id:`area-${M}`})}),c?.type==="series"&&c.id===`area-${M}`&&(le.style("stroke-width",(s.mark?.strokeWidth||2)+2).style("filter","drop-shadow(0 0 4px var(--mk-ui-accent))"),Ae.style("fill-opacity",(s.mark?.fillOpacity||.3)+.1))),s.mark?.point?.show){let ae=r.selectAll(`.area-point-series-${M}`).data(P).enter().append("circle").attr("class",`area-point area-point-series-${M}`).attr("cx",oe=>T(oe,E)).attr("cy",oe=>A(oe[k.field])).attr("r",s.mark.point.size||3).attr("fill",p("var(--mk-ui-background)")).attr("stroke",R).attr("stroke-width",2);u&&ae.style("cursor","pointer")}(d||s.mark?.dataLabels?.show)&&P.length<50&&r.selectAll(`.area-label-series-${M}`).data(P).enter().append("text").attr("class",`area-label area-label-series-${M}`).attr("x",ae=>T(ae,E)).attr("y",ae=>A(ae[k.field])-5).attr("text-anchor","middle").style("font-size",`${s.mark?.dataLabels?.fontSize||10}px`).style("fill",p(s.mark?.dataLabels?.color||"var(--mk-ui-text-primary)")).text(ae=>String(ae[k.field]))}),w.length>0&&(n._legendItems=w);let D=x[0];if(D&&(D.type==="temporal"||D.type==="nominal"||D.type==="ordinal")){let k=new Map;i.forEach(O=>{let P=O[D.field],_=P instanceof Date?P.getTime().toString():String(P);k.has(_)||k.set(_,[]),k.get(_).push(O)});let E=Array.from(k.keys()).sort().length>1?Math.abs(v(i[1][D.field])-v(i[0][D.field])):50;k.forEach((O,P)=>{let _=O[0][D.field],B=T(O[0],D);isNaN(B)||r.append("rect").attr("class","x-value-hit-area").attr("x",B-E/2).attr("y",0).attr("width",E).attr("height",l.bottom-l.top).attr("fill","transparent").attr("pointer-events","all").style("cursor","crosshair").on("mouseover",function(F){b.transition().duration(200).style("opacity",.9);let L;if(D.type==="temporal"&&(_ instanceof Date||!isNaN(Date.parse(String(_))))){let R=_ instanceof Date?_:new Date(String(_));L=dv.formatDateForTooltip(R,D)}else{let R=m?.find(J=>J.name===D.field);L=R?cn(R,_,t.superstate):String(_)}let I=`<div style="font-weight: 600; margin-bottom: 4px;">${L}</div>`;g.forEach(R=>{O.forEach(J=>{let Q=J[R.field];if(Q!=null){let q=rn(Number(Q));I+=`<div><strong>${R.field}:</strong> ${q}</div>`}})}),b.html(I).style("left",F.pageX+10+"px").style("top",F.pageY-28+"px")}).on("mousemove",function(F){b.style("left",F.pageX+10+"px").style("top",F.pageY-28+"px")}).on("mouseout",function(){b.transition().duration(500).style("opacity",0)})})}}static renderWithTransformedData(t,r){if(!tn(t))return;let{g:n,svg:i,scales:a,config:o,graphArea:s,editMode:l,selectedElement:u,onElementSelect:c,showDataLabels:f,resolveColor:d,colorPaletteId:p,tableProperties:h}=t,m=a.get("x"),v=a.get("y");if(!m||!v)return;let A=Array.isArray(o.encoding.x)?o.encoding.x:[o.encoding.x],x=Array.isArray(o.encoding.y)?o.encoding.y:[o.encoding.y];if(A[0]&&h){let M=h.find(O=>O.name===A[0].field),E=r.xDomain;A[0]=xs(A[0],M,E)}let g=A[0],w=x[0],b=[],y=bc("area-tooltip"),S=M=>{if(g.type==="quantitative"||g.type==="temporal"){let E=g.type==="temporal"?M instanceof Date?M:new Date(String(M)):Number(M);return m(E)}else{let E=m,O=E.bandwidth?E.bandwidth():0;return E(String(M))+O/2}},T=In(p,t.superstate),D=uH(p,t.superstate),k=new Map;r.data.forEach(M=>{k.has(M.series)||k.set(M.series,[]),k.get(M.series).push(M)}),r.series.forEach((M,E)=>{let O=k.get(M)||[];O.sort((I,R)=>I.x instanceof Date&&R.x instanceof Date?I.x.getTime()-R.x.getTime():typeof I.x=="number"&&typeof R.x=="number"?I.x-R.x:String(I.x).localeCompare(String(R.x)));let P=T[E%T.length],_=D[E%D.length];b.push({label:M,color:P});let B=X6().x(I=>S(I.x)).y0(I=>v(I.y0||0)).y1(I=>v(I.y)).curve((o.mark?.interpolate||"linear")==="monotone"?cv:yc),F=lf().x(I=>S(I.x)).y(I=>v(I.y)).curve((o.mark?.interpolate||"linear")==="monotone"?cv:yc);n.append("path").datum(O).attr("class",`area area-series-${E}`).attr("fill",P).attr("fill-opacity",o.mark?.fillOpacity||.3).attr("d",B),n.append("path").datum(O).attr("class",`area-line area-line-series-${E}`).attr("fill","none").attr("stroke",_).attr("stroke-width",o.mark?.strokeWidth||2).attr("d",F),n.append("g").attr("class",`area-tooltip-points-${E}`).selectAll("circle").data(O).enter().append("circle").attr("cx",I=>S(I.x)).attr("cy",I=>v(I.y)).attr("r",4).attr("fill","transparent").attr("stroke","transparent").style("cursor","pointer").on("mouseover",function(I,R){vr(this).attr("fill",_).attr("stroke",_).attr("r",6);let J;if(R.x instanceof Date){let Q=Array.isArray(o.encoding.x)?o.encoding.x[0]:o.encoding.x;J=dv.formatDateForTooltip(R.x,Q)}else if(typeof R.x=="number")J=rn(R.x);else{let Q=h?.find(q=>q.name===g.field);J=Q&&t.superstate?cn(Q,R.x,t.Line truncated
<div style="font-weight: 600; margin-bottom: 4px;">${J}</div>
<div><strong>${M}:</strong> ${rn(R.y)}</div>
`).style("left",I.pageX+10+"px").style("top",I.pageY-28+"px")}).on("mouseout",function(){vr(this).attr("fill","transparent").attr("stroke","transparent").attr("r",4),y.transition().duration(500).style("opacity",0)})}),b.length>0&&(i._legendItems=b)}static renderStackedAreas(t,r,n,i,a,o,s){if(!tn(t))return;let{g:l,svg:u,processedData:c,config:f,resolveColor:d}=t,p=In(t.colorPaletteId,t.superstate),h=i[0];if(!h?.field)return;let m=c.map(y=>({data:y,xPos:o(y,h)})).filter(y=>a.every(S=>y.data[S.field]!=null&&!isNaN(Number(y.data[S.field])))&&!isNaN(y.xPos));m.sort((y,S)=>y.xPos-S.xPos);let v=m.map(y=>y.data),x=fv().keys(a.map(y=>y.field)).value((y,S)=>Number(y[S])||0)(v),g=ip(x[x.length-1],y=>y[1])||0;n.domain([0,g]);let w=X6().x(y=>o(y.data,h)).y0(y=>n(y[0])).y1(y=>n(y[1])).defined(y=>{let S=o(y.data,h);return!isNaN(S)}).curve((f.mark?.interpolate||"linear")==="monotone"?h2:yc),b=lf().x(y=>o(y.data,h)).y(y=>n(y[1])).defined(y=>{let S=o(y.data,h);return!isNaN(S)}).curve((f.mark?.interpolate||"linear")==="monotone"?h2:yc);x.forEach((y,S)=>{let T=p[S%p.length],D=f.mark?.stroke?d(f.mark.stroke):T;s.push({label:y.key,color:T}),l.append("path").datum(y).attr("class",`stacked-area stacked-area-series-${S}`).attr("fill",T).attr("fill-opacity",f.mark?.fillOpacity||.7).attr("d",w),l.append("path").datum(y).attr("class",`stacked-area-line stacked-area-line-series-${S}`).attr("fill","none").attr("stroke",D).attr("stroke-width",f.mark?.strokeWidth||2).attr("d",b),f.mark?.point?.show&&l.selectAll(`.stacked-area-point-series-${S}`).data(y).enter().append("circle").attr("class",`stacked-area-point stacked-area-point-series-${S}`).attr("cx",k=>o(k.data,h)).attr("cy",k=>n(k[1])).attr("r",f.mark.point.size||3).attr("fill",d("var(--mk-ui-background)")).attr("stroke",D).attr("stroke-width",2)})}static renderCanvas(t){if(!Sn(t))return;let{ctx:r,processedData:n,scales:i,config:a,graphArea:o,resolveColor:s,colorPaletteId:l,tableProperties:u}=t,c=i.get("x"),f=i.get("y");if(!c||!f)return;let d=Array.isArray(a.encoding.x)?a.encoding.x:[a.encoding.x],p=Array.isArray(a.encoding.y)?a.encoding.y:[a.encoding.y];if(d[0]&&u){let A=u.find(g=>g.name===d[0].field),x=n.map(g=>g[d[0].field]);d[0]=bs(d[0],A,x)}let h=(A,x)=>{if(!x||!x.field)return NaN;let g=A[x.field];if(g==null)return NaN;if(x.type==="quantitative"||x.type==="temporal"){let w=x.type==="temporal"?g instanceof Date?g:new Date(String(g)):Number(g);if(x.type==="temporal"&&w instanceof Date&&isNaN(w.getTime()))return NaN;if(x.type==="quantitative"&&typeof w=="number"&&isNaN(w))return NaN;let b=c(w);return b===void 0||isNaN(b)?NaN:b}else{let w=c,b=w.bandwidth?w.bandwidth():0,y=w(String(g));return y===void 0||isNaN(y)?NaN:y+b/2}};p.length>1&&a.stacked?this.renderStackedAreasCanvas(t,c,f,d,p,h):p.forEach((A,x)=>{let g=d[Math.min(x,d.length-1)];if(!g?.field||!A?.field)return;let w=n.map(k=>{let M=h(k,g),E=k[A.field];return{data:k,xPos:M,yValue:E,xValue:k[g.field]}}).filter(k=>k.yValue!=null&&!isNaN(Number(k.yValue))&&!isNaN(k.xPos));w.sort((k,M)=>k.xPos-M.xPos);let b=w.map(k=>({data:k.data,x:k.xPos,y:f(Number(k.yValue)),xValue:k.xValue,yValue:k.yValue}));if(b.length<2)return;let y=In(t.colorPaletteId,t.superstate),S=uH(t.colorPaletteId,t.superstate),T,D;T=y[x%y.length],a.mark?.stroke?D=s(a.mark.stroke):D=S[x%S.length],r.save(),r.fillStyle=T,r.globalAlpha=a.mark?.fillOpacity||.3,r.beginPath(),r.moveTo(b[0].x,o.bottom),r.lineTo(b[0].x,b[0].y);for(let k=1;k<b.length;k++)r.lineTo(b[k].x,b[k].y);r.lineTo(b[b.length-1].x,o.bottom),r.closePath(),r.fill(),r.restore(),r.save(),r.strokeStyle=D,r.lineWidth=a.mark?.strokeWidth||2,r.beginPath(),r.moveTo(b[0].x,b[0].y);for(let k=1;k<b.length;k++)r.lineTo(b[k].x,b[k].y);r.stroke(),r.restore(),a.mark?.point?.show&&(r.save(),r.fillStyle=s("var(--mk-ui-background)"),r.strokeStyle=D,r.lineWidth=2,b.forEach(({x:k,y:M})=>{r.beginPath(),r.arc(k,M,a.mark?.point?.size||3,0,2*Math.PI),r.fill(),r.stroke()}),r.restore()),a.mark?.dataLabels?.show&&b.length<50&&(r.save(),r.fillStyle=s(a.mark?.dataLabels?.color||"var(--mk-ui-text-primary)"),r.font=`${a.mark?.dataLabels?.fontSize||10}px sans-serif`,r.textAlign="center",r.textBaseline="bottom",b.forEach(({x:k,y:M,data:E})=>{let O=E[A.field];r.fillText(String(O),k,M-5)}),r.restore())})}static renderStackedAreasCanvas(t,r,n,i,a,o){if(!Sn(t))return;let{ctx:s,processedData:l,config:u,resolveColor:c}=t,f=In(t.colorPaletteId,t.superstate),d=i[0];if(!d?.field)return;let p=l.map(x=>({data:x,xPos:o(x,d)})).filter(x=>a.every(g=>x.data[g.field]!=null&&!isNaN(Number(x.data[g.field])))&&!isNaN(x.xPos));p.sort((x,g)=>x.xPos-g.xPos);let h=p.map(x=>x.data),v=fv().keys(a.map(x=>x.field)).value((x,g)=>Number(x[g])||0)(h),A=ip(v[v.length-1],x=>x[1])||0;n.domain([0,A]),v.forEach((x,g)=>{let w=f[g%f.length],b=u.mark?.stroke?c(u.mark.stroke):w;s.save(),s.fillStyle=w,s.globalAlpha=u.mark?.fillOpacity||.7,s.beginPath();let y=!0;x.forEach(S=>{let T=o(S.data,d),D=n(S[0]),k=n(S[1]);!isNaN(T)&&!isNaN(D)&&!isNaN(k)&&(y?(s.moveTo(T,k),y=!1): Line truncated
`).style("left",I.pageX+10+"px").style("top",I.pageY-28+"px")}).on("mouseout",function(){vr(this).attr("fill","transparent").attr("stroke","transparent").attr("r",4),y.transition().duration(500).style("opacity",0)})}),b.length>0&&(i._legendItems=b)}static renderStackedAreas(t,r,n,i,a,o,s){if(!tn(t))return;let{g:l,svg:u,processedData:c,config:f,resolveColor:d}=t,p=In(t.colorPaletteId,t.superstate),h=i[0];if(!h?.field)return;let m=c.map(y=>({data:y,xPos:o(y,h)})).filter(y=>a.every(S=>y.data[S.field]!=null&&!isNaN(Number(y.data[S.field])))&&!isNaN(y.xPos));m.sort((y,S)=>y.xPos-S.xPos);let v=m.map(y=>y.data),x=fv().keys(a.map(y=>y.field)).value((y,S)=>Number(y[S])||0)(v),g=ip(x[x.length-1],y=>y[1])||0;n.domain([0,g]);let w=X6().x(y=>o(y.data,h)).y0(y=>n(y[0])).y1(y=>n(y[1])).defined(y=>{let S=o(y.data,h);return!isNaN(S)}).curve((f.mark?.interpolate||"linear")==="monotone"?h2:yc),b=lf().x(y=>o(y.data,h)).y(y=>n(y[1])).defined(y=>{let S=o(y.data,h);return!isNaN(S)}).curve((f.mark?.interpolate||"linear")==="monotone"?h2:yc);x.forEach((y,S)=>{let T=p[S%p.length],D=f.mark?.stroke?d(f.mark.stroke):T;s.push({label:y.key,color:T}),l.append("path").datum(y).attr("class",`stacked-area stacked-area-series-${S}`).attr("fill",T).attr("fill-opacity",f.mark?.fillOpacity||.7).attr("d",w),l.append("path").datum(y).attr("class",`stacked-area-line stacked-area-line-series-${S}`).attr("fill","none").attr("stroke",D).attr("stroke-width",f.mark?.strokeWidth||2).attr("d",b),f.mark?.point?.show&&l.selectAll(`.stacked-area-point-series-${S}`).data(y).enter().append("circle").attr("class",`stacked-area-point stacked-area-point-series-${S}`).attr("cx",k=>o(k.data,h)).attr("cy",k=>n(k[1])).attr("r",f.mark.point.size||3).attr("fill",d("var(--mk-ui-background)")).attr("stroke",D).attr("stroke-width",2)})}static renderCanvas(t){if(!Sn(t))return;let{ctx:r,processedData:n,scales:i,config:a,graphArea:o,resolveColor:s,colorPaletteId:l,tableProperties:u}=t,c=i.get("x"),f=i.get("y");if(!c||!f)return;let d=Array.isArray(a.encoding.x)?a.encoding.x:[a.encoding.x],p=Array.isArray(a.encoding.y)?a.encoding.y:[a.encoding.y];if(d[0]&&u){let A=u.find(g=>g.name===d[0].field),x=n.map(g=>g[d[0].field]);d[0]=xs(d[0],A,x)}let h=(A,x)=>{if(!x||!x.field)return NaN;let g=A[x.field];if(g==null)return NaN;if(x.type==="quantitative"||x.type==="temporal"){let w=x.type==="temporal"?g instanceof Date?g:new Date(String(g)):Number(g);if(x.type==="temporal"&&w instanceof Date&&isNaN(w.getTime()))return NaN;if(x.type==="quantitative"&&typeof w=="number"&&isNaN(w))return NaN;let b=c(w);return b===void 0||isNaN(b)?NaN:b}else{let w=c,b=w.bandwidth?w.bandwidth():0,y=w(String(g));return y===void 0||isNaN(y)?NaN:y+b/2}};p.length>1&&a.stacked?this.renderStackedAreasCanvas(t,c,f,d,p,h):p.forEach((A,x)=>{let g=d[Math.min(x,d.length-1)];if(!g?.field||!A?.field)return;let w=n.map(k=>{let M=h(k,g),E=k[A.field];return{data:k,xPos:M,yValue:E,xValue:k[g.field]}}).filter(k=>k.yValue!=null&&!isNaN(Number(k.yValue))&&!isNaN(k.xPos));w.sort((k,M)=>k.xPos-M.xPos);let b=w.map(k=>({data:k.data,x:k.xPos,y:f(Number(k.yValue)),xValue:k.xValue,yValue:k.yValue}));if(b.length<2)return;let y=In(t.colorPaletteId,t.superstate),S=uH(t.colorPaletteId,t.superstate),T,D;T=y[x%y.length],a.mark?.stroke?D=s(a.mark.stroke):D=S[x%S.length],r.save(),r.fillStyle=T,r.globalAlpha=a.mark?.fillOpacity||.3,r.beginPath(),r.moveTo(b[0].x,o.bottom),r.lineTo(b[0].x,b[0].y);for(let k=1;k<b.length;k++)r.lineTo(b[k].x,b[k].y);r.lineTo(b[b.length-1].x,o.bottom),r.closePath(),r.fill(),r.restore(),r.save(),r.strokeStyle=D,r.lineWidth=a.mark?.strokeWidth||2,r.beginPath(),r.moveTo(b[0].x,b[0].y);for(let k=1;k<b.length;k++)r.lineTo(b[k].x,b[k].y);r.stroke(),r.restore(),a.mark?.point?.show&&(r.save(),r.fillStyle=s("var(--mk-ui-background)"),r.strokeStyle=D,r.lineWidth=2,b.forEach(({x:k,y:M})=>{r.beginPath(),r.arc(k,M,a.mark?.point?.size||3,0,2*Math.PI),r.fill(),r.stroke()}),r.restore()),a.mark?.dataLabels?.show&&b.length<50&&(r.save(),r.fillStyle=s(a.mark?.dataLabels?.color||"var(--mk-ui-text-primary)"),r.font=`${a.mark?.dataLabels?.fontSize||10}px sans-serif`,r.textAlign="center",r.textBaseline="bottom",b.forEach(({x:k,y:M,data:E})=>{let O=E[A.field];r.fillText(String(O),k,M-5)}),r.restore())})}static renderStackedAreasCanvas(t,r,n,i,a,o){if(!Sn(t))return;let{ctx:s,processedData:l,config:u,resolveColor:c}=t,f=In(t.colorPaletteId,t.superstate),d=i[0];if(!d?.field)return;let p=l.map(x=>({data:x,xPos:o(x,d)})).filter(x=>a.every(g=>x.data[g.field]!=null&&!isNaN(Number(x.data[g.field])))&&!isNaN(x.xPos));p.sort((x,g)=>x.xPos-g.xPos);let h=p.map(x=>x.data),v=fv().keys(a.map(x=>x.field)).value((x,g)=>Number(x[g])||0)(h),A=ip(v[v.length-1],x=>x[1])||0;n.domain([0,A]),v.forEach((x,g)=>{let w=f[g%f.length],b=u.mark?.stroke?c(u.mark.stroke):w;s.save(),s.fillStyle=w,s.globalAlpha=u.mark?.fillOpacity||.7,s.beginPath();let y=!0;x.forEach(S=>{let T=o(S.data,d),D=n(S[0]),k=n(S[1]);!isNaN(T)&&!isNaN(D)&&!isNaN(k)&&(y?(s.moveTo(T,k),y=!1): Line truncated
<div style="font-weight: 600; margin-bottom: 4px;">${D}</div>
${T.series?`<div><strong>${T.series}:</strong> ${rn(T.value)}</div>`:`<div><strong>{i18n.labels.value}</strong> ${rn(T.value)}</div>`}
`;v.html(M).style("left",S.pageX+10+"px").style("top",S.pageY-28+"px")}).on("mousemove",function(S){v.style("left",S.pageX+10+"px").style("top",S.pageY-28+"px")}).on("mouseout",function(){vr(this).transition().duration(150).attr("opacity",o.mark?.opacity||.8),v.transition().duration(500).style("opacity",0)}),g.forEach((S,T)=>{let D=S[0].category,k;D instanceof Date||typeof p.bandwidth>"u"?k=p(D)-A/2:k=p(String(D)),n.append("rect").attr("class","category-hit-area").attr("x",k).attr("y",0).attr("width",A).attr("height",s.bottom-s.top).attr("fill","transparent").attr("pointer-events","all").style("cursor","pointer").on("mouseover",function(M){y.filter(_=>String(_.category)===T).transition().duration(150).attr("opacity",1),v.transition().duration(200).style("opacity",.9);let E,O=Array.isArray(o.encoding.x)?o.encoding.x[0]:o.encoding.x;if(O?.type==="temporal"||D instanceof Date){let _=D instanceof Date?D:new Date(Number(D));isNaN(_.getTime())?E=String(D):E=nb.formatDateForTooltip(_,O)}else{let _=t.tableProperties?.find(B=>B.name===O?.field);E=_&&t.superstate?cn(_,D,t.superstate):String(D)}let P=`<div style="font-weight: 600; margin-bottom: 4px;">${E}</div>`;S.forEach(_=>{_.series?P+=`<div><strong>${_.series}:</strong> ${rn(_.value)}</div>`:P+=`<div><strong>{i18n.labels.value}</strong> ${rn(_.value)}</div>`}),v.html(P).style("left",M.pageX+10+"px").style("top",M.pageY-28+"px")}).on("mousemove",function(M){v.style("left",M.pageX+10+"px").style("top",M.pageY-28+"px")}).on("mouseout",function(){y.filter(M=>String(M.category)===T).transition().duration(150).attr("opacity",o.mark?.opacity||.8),v.transition().duration(500).style("opacity",0)})}),i.node().__barTooltip=v}static renderLegacy(t){if(!tn(t))return;let{g:r,svg:n,processedData:i,scales:a,config:o,graphArea:s,editMode:l,selectedElement:u,onElementSelect:c,showDataLabels:f,showLegend:d,resolveColor:p}=t,h=a.get("x"),m=a.get("y");if(!h||!m)return;let v=b=>Array.isArray(o.encoding.x)?o.encoding.x.map(y=>String(b[y.field]||"")).join(" | "):o.encoding.x?String(b[(o.encoding.x&&!Array.isArray(o.encoding.x)?o.encoding.x.field:"")||""]):"";if(Array.isArray(o.encoding.x)&&h.domain){let b=Array.from(new Set(i.map(y=>v(y))));h.domain(b)}let A=Array.isArray(o.encoding.y)?o.encoding.y:o.encoding.y?[o.encoding.y]:[],x=A.length>1,g=!!o.encoding.color?.field;(x||g?o.stacked!==!1:!1)&&(x||g)?this.renderStackedBars(t,h,m,A,v):x||g?this.renderGroupedBars(t,h,m,A,v):this.renderSingleBarsLegacy(t,h,m,A,v)}static renderSingleBarsLegacy(t,r,n,i,a){if(!tn(t))return;let{g:o,svg:s,processedData:l,scales:u,config:c,graphArea:f,editMode:d,selectedElement:p,onElementSelect:h,showDataLabels:m,showLegend:v,resolveColor:A}=t,x=u.get("color"),g=c.encoding.color?.field,w=i[0]?.field,b=In(t.colorPaletteId,t.superstate);if(!w)return;let y,S,T;if(r.bandwidth)y=r.bandwidth(),T=y*.1,S=y-T*2;else{let M=l.length;y=(f.right-f.left)/(M+1),S=Math.min(y*.9,80),T=(y-S)/2}let D=o.selectAll(".bar").data(l).enter().append("rect").attr("class","bar").attr("x",M=>{let E=a(M),O;if(r.bandwidth)O=r(E);else if(c.encoding.x&&!Array.isArray(c.encoding.x)&&c.encoding.x.type==="temporal"){let P=M[c.encoding.x.field],_=P instanceof Date?P:new Date(P);O=r(_)}else O=r(Number(E));return!r.bandwidth&&O!==void 0&&(O=O-S/2),O!==void 0?O+(r.bandwidth?T:0):0}).attr("y",M=>{let E=Number(M[w])||0;return E>=0?n(E):n(0)}).attr("width",S).attr("height",M=>{let E=Number(M[w])||0;return Math.abs(n(0)-n(E))}).attr("fill",(M,E)=>{let O=c.mark,_=t.superstate?.assets?.getColorPalettes()?.find(F=>F.id===t.colorPaletteId);if(_?.colors){let F=_.colors.filter(L=>L.value&&(L.value.includes("linear-gradient")||L.value.includes("radial-gradient")||L.value.includes("conic-gradient")))||[];if(F.length>0){let L=F[E%F.length],I=_u.parseCSSGradient(L.value);if(I)return I.angle=180,I.direction="vertical",_u.createSVGGradient(s,I)}}if(_?.gradients&&_.gradients.length>0){let F=_.gradients[E%_.gradients.length],L={type:F.type,colors:F.stops.map(R=>R.color),positions:F.stops.map(R=>R.position),angle:F.direction,centerX:F.center?.x||.5,centerY:F.center?.y||.5};return _u.applyGradient(t,L)}let B;if(g&&x)try{B=x(M[g])||b[0]}catch{B=b[0]}else B=b[E%b.length];return B}).attr("opacity",c.mark?.opacity||1).attr("cursor",d?"pointer":"default").attr("rx",4).attr("ry",4),k=bc("bar-tooltip");if(D.on("mouseover",function(M,E){let P=vr(this).attr("fill");k.transition().duration(200).style("opacity",.9);let _="";if(Array.isArray(c.encoding.x))c.encoding.x.forEach(I=>{if(I.field){let R=E[I.field],J=t.tableProperties?.find(q=>q.name===I.field);_+=`<div>${J?cn(J,R,t.superstate):R}</div>`}});else if(c.encoding.x&&!Array.isArray(c.encoding.x)&&c.encoding.x.field){let I=c.encoding.x,R=E[I.field],J=t.tableProperties?.find(q=>q.name===I.field);_+=`<div>${J?cn(J,R,t.superstate):R}</div>`}_+='<div style="display: flex; align-items: center; gap: 8px; margin-top: 4px;">',_+=`<div style="width: 12px; height: 12px; background-color: ${P}; border-radius: 2px; flex-shrink: 0;Line truncated
@@ -236,7 +236,7 @@ ${t.code}
${D.series&&D.series!=="default"?`<div><strong>{i18n.labels.series}</strong> ${D.series}</div>`:""}
${D.size!==void 0?`<div><strong>{i18n.labels.size}</strong> ${rn(Number(D.size))}</div>`:""}
${D.label?`<div><strong>{i18n.labels.label}</strong> ${D.label}</div>`:""}
`;x.html(B).style("left",T.pageX+10+"px").style("top",T.pageY-28+"px")}).on("mousemove",function(T){x.style("left",T.pageX+10+"px").style("top",T.pageY-28+"px")}).on("mouseout",function(T,D){vr(this).transition().duration(150).attr("opacity",o.mark?.opacity||.7).attr("r",k=>k.size!==void 0&&m?Math.max(2,Math.sqrt(m(k.size)*10)):A),x.transition().duration(500).style("opacity",0)}),f&&n.selectAll(".scatter-label").data(r.data).enter().append("text").attr("class","scatter-label").attr("x",T=>d(T.x)).attr("y",T=>p(T.y)-8).attr("text-anchor","middle").attr("font-size","10px").attr("fill","var(--mk-ui-text-primary)").text(T=>T.label||`(${rn(T.x)}, ${rn(T.y)})`),i.node().__scatterTooltip=x}};var ab=class{static calculateLayout(t,r,n={}){let{showTitle:i=!0,showXAxis:a=t.layout.xAxis.show,showYAxis:o=t.layout.yAxis.show,showLegend:s=t.layout.legend.show,showXAxisLabel:l=t.layout.xAxis.show,showYAxisLabel:u=t.layout.yAxis.show}=n,f={...{top:10,right:10,bottom:10,left:10},...r.padding},d=0,p=0,h=0;if(s&&(t.encoding?.color||Array.isArray(t.encoding?.y)&&t.encoding.y.length>1||t.chartType==="pie"||!Array.isArray(t.encoding?.y)&&t.encoding?.y?.field||Array.isArray(t.encoding?.y)&&t.encoding.y.length===1&&t.encoding.y[0]?.field)){let M=t.layout?.legend?.position||"top",E=t.layout?.legend?.itemFontSize||12;if(M==="top"||M==="bottom"){let O=t.layout?.legend?.orient||"horizontal",P=E+28;O==="horizontal"?p=P:p=P*2}else h=120}let v=0;l&&t.layout?.xAxis?.label&&t.layout?.xAxis?.showLabel!==!1&&(v=(t.layout.xAxis.labelFontSize||12)+10);let A=0;u&&t.layout?.yAxis?.label&&t.layout?.yAxis?.showLabel!==!1&&(A=(t.layout.yAxis.labelFontSize||12)+10),i||(f.top=10,d=0),!a&&!l&&(f.bottom=10,v=0),!o&&!u&&(f.left=10,A=0);let x=0,g=0;t.chartType!=="pie"?(a&&t.layout?.xAxis?.show!==!1&&(x=25),o&&t.layout?.yAxis?.show!==!1&&(g=35)):(f.left=10,f.bottom=10,v=0,A=0,x=0,g=0);let w=t.layout?.legend?.position||"top",b=r.height,y={left:0,right:r.width,top:0,bottom:b},S=Math.max(d,f.top),T={left:f.left+(w==="left"?h:0),right:r.width-f.right-(w==="right"?h:0),top:S+(w==="top"?p:0),bottom:b-f.bottom-(w==="bottom"?p:0),width:0,height:0};T.width=Math.max(0,T.right-T.left),T.height=Math.max(0,T.bottom-T.top);let D={left:T.left+A+g,right:T.right,top:T.top,bottom:T.bottom-x-v,width:0,height:0};return D.width=Math.max(0,D.right-D.left),D.height=Math.max(0,D.bottom-D.top),{padding:f,containerArea:y,innerContainer:T,graphArea:D,legendHeight:p,legendWidth:h,containerHeight:b,titleHeight:d,xAxisLabelHeight:v,yAxisLabelWidth:A,xAxisHeight:x,yAxisWidth:g}}static getTitlePosition(t,r){let{containerArea:n,padding:i}=t,a=n.left+i.left,o=n.top+t.titleHeight/2;return{x:a,y:o}}static getLegendPosition(t,r,n){let i=r.layout?.legend?.position||"top",{containerArea:a,legendHeight:o,legendWidth:s,titleHeight:l}=t,u=n?.showTitle!==!1&&r.layout?.title?.text&&t.titleHeight>0;switch(i){case"top":return{x:a.left,y:u?a.top+l:a.top,width:a.right-a.left,height:o};case"bottom":return{x:a.left,y:a.bottom-o,width:a.right-a.left,height:o};case"left":return{x:a.left,y:u?a.top+l:a.top,width:s,height:a.bottom-(u?a.top+l:a.top)};case"right":return{x:a.right-s,y:u?a.top+l:a.top,width:s,height:a.bottom-(u?a.top+l:a.top)};default:return{x:0,y:0,width:0,height:0}}}static getXAxisLabelPosition(t,r){let{graphArea:n,xAxisHeight:i}=t;return{x:n.left+n.width/2,y:n.bottom+i+10}}static getYAxisLabelPosition(t,r){let{graphArea:n,yAxisWidth:i,yAxisLabelWidth:a}=t;return{x:n.left-i-a/2,y:n.top+n.height/2,rotation:-90}}};var Z6=class{static groupDateByTimeUnit(t,r){if(!r||r==="day")return new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()));switch(r){case"hour":return new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours()));case"week":{let n=t.getUTCDay(),i=t.getUTCDate()-n+(n===0?-6:1);return new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),i))}case"month":return new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),1));case"quarter":{let n=Math.floor(t.getUTCMonth()/3);return new Date(Date.UTC(t.getUTCFullYear(),n*3,1))}case"year":return new Date(Date.UTC(t.getUTCFullYear(),0,1));default:return new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()))}}static generateDateRange(t,r,n){let i=[],a=new Date(t);for(;a<=r;)switch(i.push(new Date(a)),n){case"hour":a.setUTCHours(a.getUTCHours()+1);break;case"day":a.setDate(a.getDate()+1);break;case"week":a.setDate(a.getDate()+7);break;case"month":a.setMonth(a.getMonth()+1);break;case"quarter":a.setMonth(a.getMonth()+3);break;case"year":a.setFullYear(a.getFullYear()+1);break}return i}static normalizeXValue(t,r,n){if(t==null)return"undefined";if(r==="temporal"){let i=t instanceof Date?t:new Date(String(t));return isNaN(i.getTime())?String(t):(n?this.groupDateByTimeUnit(i,n):i).getTime().toString()}return String(t)}static transform(t,r,n){if(!t||t.length===0)return{data:[],categories:[]};let i=Array.isArray(r.encoding.x)?r.encoding.x[0]:r.encoding.x,a=Array.isArray(r.encoding.y)?r.encoding.y[0] Line truncated
`;x.html(B).style("left",T.pageX+10+"px").style("top",T.pageY-28+"px")}).on("mousemove",function(T){x.style("left",T.pageX+10+"px").style("top",T.pageY-28+"px")}).on("mouseout",function(T,D){vr(this).transition().duration(150).attr("opacity",o.mark?.opacity||.7).attr("r",k=>k.size!==void 0&&m?Math.max(2,Math.sqrt(m(k.size)*10)):A),x.transition().duration(500).style("opacity",0)}),f&&n.selectAll(".scatter-label").data(r.data).enter().append("text").attr("class","scatter-label").attr("x",T=>d(T.x)).attr("y",T=>p(T.y)-8).attr("text-anchor","middle").attr("font-size","10px").attr("fill","var(--mk-ui-text-primary)").text(T=>T.label||`(${rn(T.x)}, ${rn(T.y)})`),i.node().__scatterTooltip=x}};var ab=class{static calculateLayout(t,r,n={}){let{showTitle:i=!0,showXAxis:a=t.layout.xAxis.show,showYAxis:o=t.layout.yAxis.show,showLegend:s=t.layout.legend.show,showXAxisLabel:l=t.layout.xAxis.show,showYAxisLabel:u=t.layout.yAxis.show}=n,f={...{top:10,right:10,bottom:10,left:10},...r.padding},d=0,p=0,h=0;if(s&&(t.encoding?.color||Array.isArray(t.encoding?.y)&&t.encoding.y.length>1||t.chartType==="pie"||!Array.isArray(t.encoding?.y)&&t.encoding?.y?.field||Array.isArray(t.encoding?.y)&&t.encoding.y.length===1&&t.encoding.y[0]?.field)){let M=t.layout?.legend?.position||"top",E=t.layout?.legend?.itemFontSize||12;if(M==="top"||M==="bottom"){let O=t.layout?.legend?.orient||"horizontal",P=E+28;O==="horizontal"?p=P:p=P*2}else h=120}let v=0;l&&t.layout?.xAxis?.label&&t.layout?.xAxis?.showLabel!==!1&&(v=(t.layout.xAxis.labelFontSize||12)+10);let A=0;u&&t.layout?.yAxis?.label&&t.layout?.yAxis?.showLabel!==!1&&(A=(t.layout.yAxis.labelFontSize||12)+10),i||(f.top=10,d=0),!a&&!l&&(f.bottom=10,v=0),!o&&!u&&(f.left=10,A=0);let x=0,g=0;t.chartType!=="pie"?(a&&t.layout?.xAxis?.show!==!1&&(x=25),o&&t.layout?.yAxis?.show!==!1&&(g=35)):(f.left=10,f.bottom=10,v=0,A=0,x=0,g=0);let w=t.layout?.legend?.position||"top",b=r.height,y={left:0,right:r.width,top:0,bottom:b},S=Math.max(d,f.top),T={left:f.left+(w==="left"?h:0),right:r.width-f.right-(w==="right"?h:0),top:S+(w==="top"?p:0),bottom:b-f.bottom-(w==="bottom"?p:0),width:0,height:0};T.width=Math.max(0,T.right-T.left),T.height=Math.max(0,T.bottom-T.top);let D={left:T.left+A+g,right:T.right,top:T.top,bottom:T.bottom-x-v,width:0,height:0};return D.width=Math.max(0,D.right-D.left),D.height=Math.max(0,D.bottom-D.top),{padding:f,containerArea:y,innerContainer:T,graphArea:D,legendHeight:p,legendWidth:h,containerHeight:b,titleHeight:d,xAxisLabelHeight:v,yAxisLabelWidth:A,xAxisHeight:x,yAxisWidth:g}}static getTitlePosition(t,r){let{containerArea:n,padding:i}=t,a=n.left+i.left,o=n.top+t.titleHeight/2;return{x:a,y:o}}static getLegendPosition(t,r,n){let i=r.layout?.legend?.position||"top",{containerArea:a,legendHeight:o,legendWidth:s,titleHeight:l}=t,u=n?.showTitle!==!1&&r.layout?.title?.text&&t.titleHeight>0;switch(i){case"top":return{x:a.left,y:u?a.top+l:a.top,width:a.right-a.left,height:o};case"bottom":return{x:a.left,y:a.bottom-o,width:a.right-a.left,height:o};case"left":return{x:a.left,y:u?a.top+l:a.top,width:s,height:a.bottom-(u?a.top+l:a.top)};case"right":return{x:a.right-s,y:u?a.top+l:a.top,width:s,height:a.bottom-(u?a.top+l:a.top)};default:return{x:0,y:0,width:0,height:0}}}static getXAxisLabelPosition(t,r){let{graphArea:n,xAxisHeight:i}=t;return{x:n.left+n.width/2,y:n.bottom+i+10}}static getYAxisLabelPosition(t,r){let{graphArea:n,yAxisWidth:i,yAxisLabelWidth:a}=t;return{x:n.left-i-a/2,y:n.top+n.height/2,rotation:-90}}};var Z6=class{static groupDateByTimeUnit(t,r){if(!r||r==="day")return new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()));switch(r){case"hour":return new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours()));case"week":{let n=t.getUTCDay(),i=t.getUTCDate()-n+(n===0?-6:1);return new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),i))}case"month":return new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),1));case"quarter":{let n=Math.floor(t.getUTCMonth()/3);return new Date(Date.UTC(t.getUTCFullYear(),n*3,1))}case"year":return new Date(Date.UTC(t.getUTCFullYear(),0,1));default:return new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()))}}static generateDateRange(t,r,n){let i=[],a=new Date(t);for(;a<=r;)switch(i.push(new Date(a)),n){case"hour":a.setUTCHours(a.getUTCHours()+1);break;case"day":a.setDate(a.getDate()+1);break;case"week":a.setDate(a.getDate()+7);break;case"month":a.setMonth(a.getMonth()+1);break;case"quarter":a.setMonth(a.getMonth()+3);break;case"year":a.setFullYear(a.getFullYear()+1);break}return i}static normalizeXValue(t,r,n){if(t==null)return"undefined";if(r==="temporal"){let i=t instanceof Date?t:new Date(String(t));return isNaN(i.getTime())?String(t):(n?this.groupDateByTimeUnit(i,n):i).getTime().toString()}return String(t)}static transform(t,r,n){if(!t||t.length===0)return{data:[],categories:[]};let i=Array.isArray(r.encoding.x)?r.encoding.x[0]:r.encoding.x,a=Array.isArray(r.encoding.y)?r.encoding.y[0] Line truncated
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GSt(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function WSt(e){if(Array.isArray(e))return poe(e)}function C8e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function D8e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?C8e(Object(r),!0).forEach(function(n){M8e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C8e(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function M8e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function SF(e,t){return XSt(e)||YSt(e,t)||O8e(e,t)||QSt()}function QSt(){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 O8e(e,t){if(!!e){if(typeof e=="string")return poe(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 poe(e,t)}}function poe(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 YSt(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,a=!1,o,s;try{for(r=r.call(e);!(i=(o=r.next()).done)&&(n.push(o.value),!(t&&n.length===t));i=!0);}catch(l){a=!0,s=l}finally{try{!i&&r.return!=null&&r.return()}finally{if(a)throw s}}return n}}function XSt(e){if(Array.isArray(e))return e}var KSt=typeof NH.default=="function"?NH.default:NH.default.default,JSt="file-invalid-type",ZSt="file-too-large",eEt="file-too-small",tEt="too-many-files";var rEt=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",r=t.split(","),n=r.length>1?"one of ".concat(r.join(", ")):r[0];return{code:JSt,message:"File type must be ".concat(n)}},T8e=function(t){return{code:ZSt,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},N8e=function(t){return{code:eEt,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},F8e={code:tEt,message:"Too many files"};function moe(e,t){var r=e.type==="application/x-moz-file"||KSt(e,t);return[r,r?null:rEt(t)]}function hoe(e,t,r){if(b2(e.size))if(b2(t)&&b2(r)){if(e.size>r)return[!1,T8e(r)];if(e.size<t)return[!1,N8e(t)]}else{if(b2(t)&&e.size<t)return[!1,N8e(t)];if(b2(r)&&e.size>r)return[!1,T8e(r)]}return[!0,null]}function b2(e){return e!=null}function j8e(e){var t=e.files,r=e.accept,n=e.minSize,i=e.maxSize,a=e.multiple,o=e.maxFiles,s=e.validator;return!a&&t.length>1||a&&o>=1&&t.length>o?!1:t.every(function(l){var u=moe(l,r),c=SF(u,1),f=c[0],d=hoe(l,n,i),p=SF(d,1),h=p[0],m=s?s(l):null;return f&&h&&!m})}function EF(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function kF(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function goe(e){e.preventDefault()}function nEt(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function iEt(e){return e.indexOf("Edge/")!==-1}function P8e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return nEt(e)||iEt(e)}function Fh(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){for(var i=arguments.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];return t.some(function(s){return!EF(n)&&s&&s.apply(void 0,[n].concat(a)),EF(n)})}}function _8e(){return"showOpenFilePicker"in window}function I8e(e){if(b2(e)){var t=Object.entries(e).filter(function(r){var n=SF(r,2),i=n[0],a=n[1],o=!0;return q8e(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),(!Array.isArray(a)||!a.every($8e))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(r,n){var i=SF(n,2),a=i[0],o=i[1];return D8e(D8e({},r),{},M8e({},a,o))},{});return[{description:"Files",accept:t}]}return e}function B8e(e){if(b2(e))return Object.entries(e).reduce(function(t,r){var n=SF(r,2),i=n[0],a=n[1];return[].concat(k8e(t),[i],k8e(a))},[]).filter(function(t){return q8e(t)||$8e(t)}).join(",")}function L8e(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function R8e(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function q8e(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function $8e(e){return/^.*\.[\w]+$/.test(e)}var aEt=["children"],oEt=["open"],sEt=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],lEt=["refKey","onChange","onClick"];function uEt(e){return dEt(e)||fEt(e)||H8e(e)||cEt()}function cEt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fEt(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function dEt(e){if(Array.isArray(e))return voe(e)}function Aoe(e,t){return hEt(e)||mEt(e,t)||H8e(e,t)||pEt()}function pEt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
@@ -246,10 +246,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
color: hsl(${Math.max(0,Math.min(120-120*v,120))}deg 100% 31%);`,r?.key)}return r?.onChange&&!(a&&r.skipInitialOnChange)&&r.onChange(i),a=!1,i}return o.updateDeps=s=>{n=s},o}function Soe(e,t){if(e===void 0)throw new Error(`Unexpected undefined${t?`: ${t}`:""}`);return e}var W8e=(e,t)=>Math.abs(e-t)<1.01,Q8e=(e,t,r)=>{let n;return function(...i){e.clearTimeout(n),n=e.setTimeout(()=>t.apply(this,i),r)}};var Y8e=e=>{let{offsetWidth:t,offsetHeight:r}=e;return{width:t,height:r}},vEt=e=>e,yEt=e=>{let t=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let i=t;i<=r;i++)n.push(i);return n},J8e=(e,t)=>{let r=e.scrollElement;if(!r)return;let n=e.targetWindow;if(!n)return;let i=o=>{let{width:s,height:l}=o;t({width:Math.round(s),height:Math.round(l)})};if(i(Y8e(r)),!n.ResizeObserver)return()=>{};let a=new n.ResizeObserver(o=>{let s=()=>{let l=o[0];if(l?.borderBoxSize){let u=l.borderBoxSize[0];if(u){i({width:u.inlineSize,height:u.blockSize});return}}i(Y8e(r))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()});return a.observe(r,{box:"border-box"}),()=>{a.unobserve(r)}},X8e={passive:!0};var K8e=typeof window>"u"?!0:"onscrollend"in window,Z8e=(e,t)=>{let r=e.scrollElement;if(!r)return;let n=e.targetWindow;if(!n)return;let i=0,a=e.options.useScrollendEvent&&K8e?()=>{}:Q8e(n,()=>{t(i,!1)},e.options.isScrollingResetDelay),o=c=>()=>{let{horizontal:f,isRtl:d}=e.options;i=f?r.scrollLeft*(d&&-1||1):r.scrollTop,a(),t(i,c)},s=o(!0),l=o(!1);r.addEventListener("scroll",s,X8e);let u=e.options.useScrollendEvent&&K8e;return u&&r.addEventListener("scrollend",l,X8e),()=>{r.removeEventListener("scroll",s),u&&r.removeEventListener("scrollend",l)}};var bEt=(e,t,r)=>{if(t?.borderBoxSize){let n=t.borderBoxSize[0];if(n)return Math.round(n[r.options.horizontal?"inlineSize":"blockSize"])}return e[r.options.horizontal?"offsetWidth":"offsetHeight"]};var e9e=(e,{adjustments:t=0,behavior:r},n)=>{var i,a;let o=e+t;(a=(i=n.scrollElement)==null?void 0:i.scrollTo)==null||a.call(i,{[n.options.horizontal?"left":"top"]:o,behavior:r})},FH=class{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let r=null,n=()=>r||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:r=new this.targetWindow.ResizeObserver(i=>{i.forEach(a=>{let o=()=>{this._measureElement(a.target,a)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()})}));return{disconnect:()=>{var i;(i=n())==null||i.disconnect(),r=null},observe:i=>{var a;return(a=n())==null?void 0:a.observe(i,{box:"border-box"})},unobserve:i=>{var a;return(a=n())==null?void 0:a.unobserve(i)}}})(),this.range=null,this.setOptions=r=>{Object.entries(r).forEach(([n,i])=>{typeof i>"u"&&delete r[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:vEt,rangeExtractor:yEt,onChange:()=>{},measureElement:bEt,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...r}},this.notify=r=>{var n,i;(i=(n=this.options).onChange)==null||i.call(n,this,r)},this.maybeNotify=x2(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),r=>{this.notify(r)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(r=>r()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var r;let n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((r=this.scrollElement)==null?void 0:r.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=a,this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.ge Line truncated
`);navigator.clipboard.writeText(x),e.ui.notify(`Copied ${n.length} cover image URLs to clipboard`)},v=async()=>{try{d("");let x=u.split(`
`).map(w=>w.trim()).filter(w=>w.length>0);if(x.length===0){d("No URLs found. Please enter one URL per line.");return}let g=e.assets;if(g){for(let b of x)try{let y=p(b);await g.addCoverImage(b,y,[])}catch{}let w=g.getAllCoverImages();i(w),l(!1),c("")}}catch{d("Error processing URLs. Please check your input.")}},A=async x=>{let g=e.assets;if(g&&g.removeCoverImage&&await g.removeCoverImage(x)){let b=g.getAllCoverImages();i(b)}};return Lr.default.createElement(Lr.default.Fragment,null,Lr.default.createElement("div",{className:"mk-setting-section"},Lr.default.createElement("h2",null,N.settings.sections.coverImage),Lr.default.createElement("div",{className:"mk-community-callout"},Lr.default.createElement("div",{className:"mk-callout-icon"},"\u{1F4A1}"),Lr.default.createElement("div",{className:"mk-callout-content"},Lr.default.createElement("div",{className:"mk-callout-text"},"Find cover images from the community at"," ",Lr.default.createElement("span",{className:"mk-callout-url",onClick:()=>window.open("https://make.md/community","_blank"),style:{cursor:"pointer"}},"https://make.md/community")))),Lr.default.createElement("div",{className:"mk-setting-group"},Lr.default.createElement("div",{className:"mk-setting-item"},Lr.default.createElement("div",{className:"mk-setting-item-info"},Lr.default.createElement("div",{className:"mk-setting-item-name"},N.settings.banners.name),Lr.default.createElement("div",{className:"mk-setting-item-description"},N.settings.banners.desc)),Lr.default.createElement("div",{className:"mk-setting-item-control"},Lr.default.createElement("input",{type:"checkbox",checked:e.settings.banners,onChange:x=>{e.settings.banners=x.target.checked,r()}}))),Lr.default.createElement("div",{className:"mk-setting-item"},Lr.default.createElement("div",{className:"mk-setting-item-info"},Lr.default.createElement("div",{className:"mk-setting-item-name"},N.settings.bannerHeight.name),Lr.default.createElement("div",{className:"mk-setting-item-description"},N.settings.bannerHeight.desc)),Lr.default.createElement("div",{className:"mk-setting-item-control"},Lr.default.createElement("input",{type:"number",value:e.settings.bannerHeight,onChange:x=>{e.settings.bannerHeight=parseInt(x.target.value)||200,r()}})))),Lr.default.createElement("div",{className:"mk-setting-group"},Lr.default.createElement("div",{className:"mk-cover-image-header"},Lr.default.createElement("div",{className:"mk-cover-image-input-section"},Lr.default.createElement("input",{type:"text",placeholder:"Enter image URL and press Enter to add",value:a,onChange:x=>o(x.target.value),onKeyPress:x=>{x.key==="Enter"&&h()},className:"mk-input mk-cover-image-url-input"})),Lr.default.createElement("div",{className:"mk-cover-image-actions"},Lr.default.createElement("button",{onClick:()=>l(!s),className:"mk-button mk-button-secondary"},N.settings.importUrls),Lr.default.createElement("button",{onClick:m,className:"mk-button mk-button-secondary",disabled:n.length===0},N.settings.exportUrls))),s&&Lr.default.createElement("div",{className:"mk-import-area"},Lr.default.createElement("div",{style:{display:"flex",flexDirection:"column",gap:"8px",width:"100%"}},Lr.default.createElement("textarea",{value:u,onChange:x=>c(x.target.value),placeholder:N.descriptions.pasteUrlsHereOnePerLine,style:{width:"100%",minHeight:"150px",fontFamily:"monospace",fontSize:"12px",padding:"8px",border:"1px solid var(--background-modifier-border)",borderRadius:"4px",backgroundColor:"var(--background-primary)"}}),f&&Lr.default.createElement("div",{style:{color:"var(--text-error)",fontSize:"12px"}},f),Lr.default.createElement("div",{style:{display:"flex",gap:"8px"}},Lr.default.createElement("button",{className:"mod-cta",onClick:v,disabled:!u.trim()},N.buttons.import),Lr.default.createElement("button",{onClick:()=>{l(!1),c(""),d("")}},N.buttons.cancel)))),Lr.default.createElement("div",{className:"mk-cover-images-grid"},n.length===0?Lr.default.createElement("div",{className:"mk-empty-state"},"No cover images added yet"):n.map(x=>Lr.default.createElement("div",{key:x.url,className:"mk-cover-image-item"},Lr.default.createElement("div",{className:"mk-cover-image-container"},Lr.default.createElement("img",{src:x.url,alt:x.name}),Lr.default.createElement("div",{className:"mk-cover-image-overlay"},Lr.default.createElement("button",{onClick:()=>A(x.url),className:"mk-cover-image-delete",title:N.settings.removeImage},"\xD7"))),Lr.default.createElement("div",{className:"mk-cover-image-name"},x.name)))))))};var Kt=ge(Me());var MEt=({superstate:e})=>{let[t,r]=(0,Kt.useState)([]),[n,i]=(0,Kt.useState)(!0),[a,o]=(0,Kt.useState)(""),[s,l]=(0,Kt.useState)(!1),[u,c]=(0,Kt.useState)(""),[f,d]=(0,Kt.useState)(""),[p,h]=(0,Kt.useState)(!1);Kt.default.useEffect(()=>{x()},[e]);let m=async()=>{try{await x()}catch(_){console.error("Failed to reset default palettes:",_)}},v=async()=>{if(!a.trim())return;if(e.assets){let B={id:`palette-${Date.now()}`,name:a.trim(),path:`assets/color-palettes/${a.trim()}`,type:"colorpal Line truncated
`,t);return n===-1?r:r===-1||r+1===n?n:r<n?r:n}var z9e={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};var H9e={}.hasOwnProperty,HEt=Object.prototype;function Qoe(e,t){let r=t||{};return Yoe({file:r.file||void 0,location:!1,schema:r.space==="svg"?yv:k2,verbose:r.verbose||!1},e)}function Yoe(e,t){let r;switch(t.nodeName){case"#comment":{let n=t;return r={type:"comment",value:n.data},$H(e,n,r),r}case"#document":case"#document-fragment":{let n=t,i="mode"in n?n.mode==="quirks"||n.mode==="limited-quirks":!1;if(r={type:"root",children:V9e(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){let a=String(e.file),o=Woe(a),s=o.toPoint(0),l=o.toPoint(a.length);r.position={start:s,end:l}}return r}case"#documentType":{let n=t;return r={type:"doctype"},$H(e,n,r),r}case"#text":{let n=t;return r={type:"text",value:n.value},$H(e,n,r),r}default:return r=VEt(e,t),r}}function V9e(e,t){let r=-1,n=[];for(;++r<t.length;){let i=Yoe(e,t[r]);n.push(i)}return n}function VEt(e,t){let r=e.schema;e.schema=t.namespaceURI===z9e.svg?yv:k2;let n=-1,i={};for(;++n<t.attrs.length;){let s=t.attrs[n],l=(s.prefix?s.prefix+":":"")+s.name;H9e.call(HEt,l)||(i[l]=s.value)}let o=(e.schema.space==="svg"?Goe:Voe)(t.tagName,i,V9e(e,t.childNodes));if($H(e,t,o),o.tagName==="template"){let s=t,l=s.sourceCodeLocation,u=l&&l.startTag&&hD(l.startTag),c=l&&l.endTag&&hD(l.endTag),f=Yoe(e,s.content);u&&c&&e.file&&(f.position={start:u.end,end:c.start}),o.content=f}return e.schema=r,o}function $H(e,t,r){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){let n=GEt(e,r,t.sourceCodeLocation);n&&(e.location=!0,r.position=n)}}function GEt(e,t,r){let n=hD(r);if(t.type==="element"){let i=t.children[t.children.length-1];if(n&&!r.endTag&&i&&i.position&&i.position.end&&(n.end=Object.assign({},i.position.end)),e.verbose){let a={},o;if(r.attrs)for(o in r.attrs)H9e.call(r.attrs,o)&&(a[E2(e.schema,o).property]=hD(r.attrs[o]));r.startTag;let s=hD(r.startTag),l=r.endTag?hD(r.endTag):void 0,u={opening:s};l&&(u.closing=l),u.properties=a,t.data={position:u}}}return n}function hD(e){let t=U9e({line:e.startLine,column:e.startCol,offset:e.startOffset}),r=U9e({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||r?{start:t,end:r}:void 0}function U9e(e){return e.line&&e.column?e:void 0}var WEt=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),so="\uFFFD",De;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(De||(De={}));var pf={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function zH(e){return e>=55296&&e<=57343}function G9e(e){return e>=56320&&e<=57343}function W9e(e,t){return(e-55296)*1024+9216+t}function UH(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function HH(e){return e>=64976&&e<=65007||WEt.has(e)}var nt;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicol Line truncated
`,t);return n===-1?r:r===-1||r+1===n?n:r<n?r:n}var z9e={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};var H9e={}.hasOwnProperty,HEt=Object.prototype;function Qoe(e,t){let r=t||{};return Yoe({file:r.file||void 0,location:!1,schema:r.space==="svg"?yv:k2,verbose:r.verbose||!1},e)}function Yoe(e,t){let r;switch(t.nodeName){case"#comment":{let n=t;return r={type:"comment",value:n.data},$H(e,n,r),r}case"#document":case"#document-fragment":{let n=t,i="mode"in n?n.mode==="quirks"||n.mode==="limited-quirks":!1;if(r={type:"root",children:V9e(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){let a=String(e.file),o=Woe(a),s=o.toPoint(0),l=o.toPoint(a.length);r.position={start:s,end:l}}return r}case"#documentType":{let n=t;return r={type:"doctype"},$H(e,n,r),r}case"#text":{let n=t;return r={type:"text",value:n.value},$H(e,n,r),r}default:return r=VEt(e,t),r}}function V9e(e,t){let r=-1,n=[];for(;++r<t.length;){let i=Yoe(e,t[r]);n.push(i)}return n}function VEt(e,t){let r=e.schema;e.schema=t.namespaceURI===z9e.svg?yv:k2;let n=-1,i={};for(;++n<t.attrs.length;){let s=t.attrs[n],l=(s.prefix?s.prefix+":":"")+s.name;H9e.call(HEt,l)||(i[l]=s.value)}let o=(e.schema.space==="svg"?Goe:Voe)(t.tagName,i,V9e(e,t.childNodes));if($H(e,t,o),o.tagName==="template"){let s=t,l=s.sourceCodeLocation,u=l&&l.startTag&&hD(l.startTag),c=l&&l.endTag&&hD(l.endTag),f=Yoe(e,s.content);u&&c&&e.file&&(f.position={start:u.end,end:c.start}),o.content=f}return e.schema=r,o}function $H(e,t,r){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){let n=GEt(e,r,t.sourceCodeLocation);n&&(e.location=!0,r.position=n)}}function GEt(e,t,r){let n=hD(r);if(t.type==="element"){let i=t.children[t.children.length-1];if(n&&!r.endTag&&i&&i.position&&i.position.end&&(n.end=Object.assign({},i.position.end)),e.verbose){let a={},o;if(r.attrs)for(o in r.attrs)H9e.call(r.attrs,o)&&(a[E2(e.schema,o).property]=hD(r.attrs[o]));r.startTag;let s=hD(r.startTag),l=r.endTag?hD(r.endTag):void 0,u={opening:s};l&&(u.closing=l),u.properties=a,t.data={position:u}}}return n}function hD(e){let t=U9e({line:e.startLine,column:e.startCol,offset:e.startOffset}),r=U9e({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||r?{start:t,end:r}:void 0}function U9e(e){return e.line&&e.column?e:void 0}var WEt=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),so="\uFFFD",De;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(De||(De={}));var pf={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function zH(e){return e>=55296&&e<=57343}function G9e(e){return e>=56320&&e<=57343}function W9e(e,t){return(e-55296)*1024+9216+t}function UH(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function HH(e){return e>=64976&&e<=65007||WEt.has(e)}var nt;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicol Line truncated
`;break}case-3:{o=`\r
`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(a)}i=a===-2,n.push(o)}return n.join("")}function Ese(e){let n={constructs:sV([Sse,...(e||{}).extensions||[]]),content:i(Y7e),defined:[],document:i(K7e),flow:i(tLe),lazy:{},string:i(nLe),text:i(iLe)};return n;function i(a){return o;function o(s){return sLe(n,a,s)}}}function kse(e){for(;!mV(e););return e}var lLe=/[\0\t\n\r]/g;function Cse(){let e=1,t="",r=!0,n;return i;function i(a,o,s){let l=[],u,c,f,d,p;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(o||void 0).decode(a)),f=0,t="",r&&(a.charCodeAt(0)===65279&&f++,r=void 0);f<a.length;){if(lLe.lastIndex=f,u=lLe.exec(a),d=u&&u.index!==void 0?u.index:a.length,p=a.charCodeAt(d),!u){t=a.slice(f);break}if(p===10&&f===d&&n)l.push(-3),n=void 0;else switch(n&&(l.push(-5),n=void 0),f<d&&(l.push(a.slice(f,d)),e+=d-f),p){case 0:{l.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,l.push(-2);e++<c;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:n=!0,e=1}f=d+1}return s&&(n&&l.push(-5),t&&l.push(t),l.push(null)),l}}var ZDt=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function uLe(e){return e.replace(ZDt,eTt)}function eTt(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){let i=r.charCodeAt(1),a=i===120||i===88;return lV(r.slice(a?2:1),a?16:10)}return bD(r)||e}var fLe={}.hasOwnProperty;function Dse(e,t,r){return typeof t!="string"&&(r=t,t=void 0),tTt(r)(kse(Ese(r).document().write(Cse()(e,t,!0))))}function tTt(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Z),autolinkProtocol:D,autolinkEmail:D,atxHeading:a(z),blockQuote:a(ue),characterEscape:D,characterReference:D,codeFenced:a(Se),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(Se,o),codeText:a(H,o),codeTextData:D,data:D,codeFlowValue:D,definition:a(ye),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(ne),hardBreakEscape:a(U),hardBreakTrailing:a(U),htmlFlow:a(V,o),htmlFlowData:D,htmlText:a(V,o),htmlTextData:D,image:a(Y),label:o,link:a(Z),listItem:a(he),listItemValue:d,listOrdered:a(re,f),listUnordered:a(re),paragraph:a(fe),reference:q,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(z),strong:a(ke),thematicBreak:a(Le)},exit:{atxHeading:l(),atxHeadingSequence:b,autolink:l(),autolinkEmail:oe,autolinkProtocol:ae,blockQuote:l(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:Ae,characterReferenceMarkerNumeric:Ae,characterReferenceValue:le,characterReference:pe,codeFenced:l(v),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:k,codeIndented:l(A),codeText:l(_),codeTextData:k,data:k,definition:l(),definitionDestinationString:w,definitionLabelString:x,definitionTitleString:g,emphasis:l(),hardBreakEscape:l(E),hardBreakTrailing:l(E),htmlFlow:l(O),htmlFlowData:k,htmlText:l(P),htmlTextData:k,image:l(F),label:I,labelText:L,lineEnding:M,link:l(B),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ie,resourceDestinationString:R,resourceTitleString:J,resource:Q,setextHeading:l(T),setextHeadingLineSequence:S,setextHeadingText:y,strong:l(),thematicBreak:l()}};dLe(t,(e||{}).mdastExtensions||[]);let r={};return n;function n(Ne){let Ge={type:"root",children:[]},Ye={stack:[Ge],tokenStack:[],config:t,enter:s,exit:u,buffer:o,resume:c,data:r},ve=[],Oe=-1;for(;++Oe<Ne.length;)if(Ne[Oe][1].type==="listOrdered"||Ne[Oe][1].type==="listUnordered")if(Ne[Oe][0]==="enter")ve.push(Oe);else{let Te=ve.pop();Oe=i(Ne,Te,Oe)}for(Oe=-1;++Oe<Ne.length;){let Te=t[Ne[Oe][0]];fLe.call(Te,Ne[Oe][1].type)&&Te[Ne[Oe][1].type].call(Object.assign({sliceSerialize:Ne[Oe][2].sliceSerialize},Ye),Ne[Oe][1])}if(Ye.tokenStack.length>0){let Te=Ye.tokenStack[Ye.tokenStack.length-1];(Te[1]||cLe).call(Ye,void 0,Te[0])}for(Ge.position={start:mb(Ne.length>0?Ne[0][1].start:{line:1,column:1,offset:0}),end:mb(Ne.length>0?Ne[Ne.length-2][1].end:{line:1,column:1,offset:0})},Oe=-1;++Oe<t.transforms.length;)Ge=t.transforms[Oe](Ge)||Ge;return Ge}function i(Ne,Ge,Ye){let ve=Ge-1,Oe=-1,Te=!1,Ie,$e,Ue,Qe;for(;++ve<=Ye;){let We=Ne[ve];switch(We[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{We[0]==="enter"?Oe++:Oe--,Qe=void 0;break}case"lineEndingBlank":{We[0]==="enter"&&(Ie&&!Qe&&!Oe&&!Ue&&(Ue=ve),Qe=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Qe=void 0}if(!Oe&&We[0]==="enter"&&We[1].type==="listItemPrefix"||Oe===-1&&We[0]==="exit"&&(We[1].type==="listUnordered"||We[1].type==="listOrdered")){if(Ie){let K=ve;for($e=void 0;K--;){let me=Ne[K];if(me[1].type==="lineEnding"||me[1].type==="lineEndingBlank"){if(me[0]==="exit")continue;$e&&(Ne[$e][1].type="lineEndingBlank",Te=!0),me[1].type="lineEnding",$e=K}else if(!(me[1].type==="linePrefix"||me[1].type==="blockQuotePrefix"||me[1].type==="blockQuotePrefixWhitespace"||me[1].type==="blockQuoteMaLine truncated
`,$Le="/",zLe="*",_2="",FNt="comment",jNt="declaration";function HLe(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var r=1,n=1;function i(h){var m=h.match(ENt);m&&(r+=m.length);var v=h.lastIndexOf(ONt);n=~v?h.length-v:n+h.length}function a(){var h={line:r,column:n};return function(m){return m.position=new o(h),u(),m}}function o(h){this.start=h,this.end={line:r,column:n},this.source=t.source}o.prototype.content=e;function s(h){var m=new Error(t.source+":"+r+":"+n+": "+h);if(m.reason=h,m.filename=t.source,m.line=r,m.column=n,m.source=e,!t.silent)throw m}function l(h){var m=h.exec(e);if(!!m){var v=m[0];return i(v),e=e.slice(v.length),m}}function u(){l(kNt)}function c(h){var m;for(h=h||[];m=f();)m!==!1&&h.push(m);return h}function f(){var h=a();if(!($Le!=e.charAt(0)||zLe!=e.charAt(1))){for(var m=2;_2!=e.charAt(m)&&(zLe!=e.charAt(m)||$Le!=e.charAt(m+1));)++m;if(m+=2,_2===e.charAt(m-1))return s("End of comment missing");var v=e.slice(2,m-2);return n+=2,i(v),e=e.slice(m),n+=2,h({type:FNt,comment:v})}}function d(){var h=a(),m=l(CNt);if(!!m){if(f(),!l(DNt))return s("property missing ':'");var v=l(TNt),A=h({type:jNt,property:ULe(m[0].replace(qLe,_2)),value:v?ULe(v[0].replace(qLe,_2)):_2});return l(NNt),A}}function p(){var h=[];c(h);for(var m;m=d();)m!==!1&&(h.push(m),c(h));return h}return u(),p()}function ULe(e){return e?e.replace(MNt,_2):_2}var Zse=ge(On()),VLe=e=>{let t=UF(e,{fragment:!0}),r=(n,i)=>{let a=(0,Zse.uniqueId)("~"),o=[],s={},l={},u="group",c=null;if((n.tagName=="strong"||n.tagName=="em"||n.tagName=="s"||n.tagName==="p"||n.tagName==="h1"||n.tagName==="h2"||n.tagName==="h3"||n.tagName==="h4"||n.tagName==="h5"||n.tagName==="h6")&&(c=n.tagName,u="text"),n.tagName=="span"&&(u="text",c="span",n.properties.style&&HLe(n.properties.style).forEach(d=>{d.type==="declaration"&&(s[d.property]=Jt(d.value))})),(n.tagName=="blockquote"||n.tagName=="pre")&&(u="group",c=n.tagName),n.tagName=="a"&&(u="text",c="a",s.label=Jt(n.value),l.value=Jt(n.href)),n.tagName=="br"&&(u="text",l.value="",c="br"),n.type==="text"&&(u="text",l.value=Jt(n.value)),(n.tagName=="table"||n.tagName=="thead"||n.tagName=="tbody"||n.tagName=="tfoot"||n.tagName=="tr"||n.tagName=="td"||n.tagName=="th")&&(u="group",c=n.tagName),(n.tagName==="ul"||n.tagName==="ol")&&(u="group",c=n.tagName,n.properties.dataType=="taskList"&&(c="taskList")),n.children?.length>0&&(o=n.children.map((d,p)=>r(d,p)),n.tagName==="li"&&(u="group",c="li",n.properties.dataType=="taskItem"))){l.value=Jt(n.properties.dataChecked=="true"?"true":"false"),c="task";let d=(0,Zse.uniqueId)("~");o=[{id:d,node:{id:d,schemaId:"",rank:0,name:"input",type:"input",props:{value:n.checked?"true":"false"}},children:[],parent:null,isRef:!1,editorProps:{editMode:0}},...o]}return c&&(s.sem=Jt(c)),{id:a,node:{id:a,schemaId:"",rank:0,name:n.tagName,type:u,props:l,styles:s},children:o,parent:null,isRef:!1,editorProps:{editMode:0}}};return r(t,0)};var SV=ge(Foe());SV.default.support.nodebuffer=!1;var hb=async(e,t,r)=>r?fetch(t).then(i=>i.arrayBuffer()):await e.middleware.fileExists(t)?await e.middleware.readBinaryToFile(t):null,PNt=async(e,t,r,n)=>{let i=await hb(e,r,n);if(i){let a=await new t.Database(new Uint8Array(i));try{a.exec("SELECT name FROM sqlite_schema")}catch{return new t.Database}return a}return new t.Database},KF=async(e,t,r,n)=>{let i=await _Nt(e,r,n);if(i){let a=await new t.Database(new Uint8Array(i));try{a.exec("SELECT name FROM sqlite_schema")}catch{return new t.Database}return a}return new t.Database},_Nt=async(e,t,r)=>{if(r)return fetch(t).then(o=>o.arrayBuffer());if(!await e.middleware.fileExists(t))return null;let n=new SV.default,i=await e.middleware.readBinaryToFile(t),a;try{a=await n.loadAsync(i).then(o=>n.file("data.mdb").async("arraybuffer"))}catch{}return a},CD=async(e,t,r)=>{await e.middleware.fileExists(Vu(Rc(t)))||await e.middleware.createFolder(Rc(t));let n=new SV.default;n.file("data.mdb",r);let i=await n.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:5}});return e.middleware.writeBinaryToFile(t,i)},EV=async(e,t,r)=>(await e.middleware.fileExists(Vu(Rc(t)))||await e.middleware.createFolder(Rc(t)),e.middleware.writeBinaryToFile(t,r)),ele=(e,t)=>Object.keys(e).reduce((r,n)=>({...r,[n]:{uniques:t?.[n]??[],cols:e[n].cols.map(i=>i.name),rows:e[n].rows}}),{}),Kl=e=>e.reduce((t,r,n)=>[...t,{cols:r.columns,rows:r?r.values.map(i=>r.columns.reduce((a,o,s)=>({...a,[o]:i[s]}),{})):[]}],[]),JF=(e,t,r,n)=>{let i=n??"*",a=r?`SELECT ${i} FROM "${t}" WHERE ${r};`:`SELECT ${i} FROM ${t};`,o;try{o=Kl(e.exec(a))}catch{return null}return o.length==1?o[0]:null},GLe=(e,t,r)=>{let n=yfe(Object.keys(t).map(i=>{let a=t[i].cols;return t[i].rows.reduce((s,l)=>`${s} ${r?"REPLACE":"INSERT"} INTO "${i}" VALUES (${FQ(a.map(u=>`'${Cg(l?.[u])??""}'`))});`,"")}));try{e.exec(`${n}`)}catch{}};var I2=(e,t,r)=>{let n=`DELETE FROM "${t}" WHERE ${r};`;try{e.exec(n)}catch{}},WLe=(e,t)=>{let r=`DROP TABLE IF EXISTS "${tLine truncated
`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(a)}i=a===-2,n.push(o)}return n.join("")}function Ese(e){let n={constructs:sV([Sse,...(e||{}).extensions||[]]),content:i(Y7e),defined:[],document:i(K7e),flow:i(tLe),lazy:{},string:i(nLe),text:i(iLe)};return n;function i(a){return o;function o(s){return sLe(n,a,s)}}}function kse(e){for(;!mV(e););return e}var lLe=/[\0\t\n\r]/g;function Cse(){let e=1,t="",r=!0,n;return i;function i(a,o,s){let l=[],u,c,f,d,p;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(o||void 0).decode(a)),f=0,t="",r&&(a.charCodeAt(0)===65279&&f++,r=void 0);f<a.length;){if(lLe.lastIndex=f,u=lLe.exec(a),d=u&&u.index!==void 0?u.index:a.length,p=a.charCodeAt(d),!u){t=a.slice(f);break}if(p===10&&f===d&&n)l.push(-3),n=void 0;else switch(n&&(l.push(-5),n=void 0),f<d&&(l.push(a.slice(f,d)),e+=d-f),p){case 0:{l.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,l.push(-2);e++<c;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:n=!0,e=1}f=d+1}return s&&(n&&l.push(-5),t&&l.push(t),l.push(null)),l}}var ZDt=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function uLe(e){return e.replace(ZDt,eTt)}function eTt(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){let i=r.charCodeAt(1),a=i===120||i===88;return lV(r.slice(a?2:1),a?16:10)}return bD(r)||e}var fLe={}.hasOwnProperty;function Dse(e,t,r){return typeof t!="string"&&(r=t,t=void 0),tTt(r)(kse(Ese(r).document().write(Cse()(e,t,!0))))}function tTt(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Z),autolinkProtocol:D,autolinkEmail:D,atxHeading:a(z),blockQuote:a(ue),characterEscape:D,characterReference:D,codeFenced:a(Se),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(Se,o),codeText:a(H,o),codeTextData:D,data:D,codeFlowValue:D,definition:a(ye),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(ne),hardBreakEscape:a(U),hardBreakTrailing:a(U),htmlFlow:a(V,o),htmlFlowData:D,htmlText:a(V,o),htmlTextData:D,image:a(Y),label:o,link:a(Z),listItem:a(he),listItemValue:d,listOrdered:a(re,f),listUnordered:a(re),paragraph:a(fe),reference:q,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(z),strong:a(ke),thematicBreak:a(Le)},exit:{atxHeading:l(),atxHeadingSequence:b,autolink:l(),autolinkEmail:oe,autolinkProtocol:ae,blockQuote:l(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:Ae,characterReferenceMarkerNumeric:Ae,characterReferenceValue:le,characterReference:pe,codeFenced:l(v),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:k,codeIndented:l(A),codeText:l(_),codeTextData:k,data:k,definition:l(),definitionDestinationString:w,definitionLabelString:x,definitionTitleString:g,emphasis:l(),hardBreakEscape:l(E),hardBreakTrailing:l(E),htmlFlow:l(O),htmlFlowData:k,htmlText:l(P),htmlTextData:k,image:l(F),label:I,labelText:L,lineEnding:M,link:l(B),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ie,resourceDestinationString:R,resourceTitleString:J,resource:Q,setextHeading:l(T),setextHeadingLineSequence:S,setextHeadingText:y,strong:l(),thematicBreak:l()}};dLe(t,(e||{}).mdastExtensions||[]);let r={};return n;function n(Ne){let Ge={type:"root",children:[]},Ye={stack:[Ge],tokenStack:[],config:t,enter:s,exit:u,buffer:o,resume:c,data:r},ve=[],Oe=-1;for(;++Oe<Ne.length;)if(Ne[Oe][1].type==="listOrdered"||Ne[Oe][1].type==="listUnordered")if(Ne[Oe][0]==="enter")ve.push(Oe);else{let Te=ve.pop();Oe=i(Ne,Te,Oe)}for(Oe=-1;++Oe<Ne.length;){let Te=t[Ne[Oe][0]];fLe.call(Te,Ne[Oe][1].type)&&Te[Ne[Oe][1].type].call(Object.assign({sliceSerialize:Ne[Oe][2].sliceSerialize},Ye),Ne[Oe][1])}if(Ye.tokenStack.length>0){let Te=Ye.tokenStack[Ye.tokenStack.length-1];(Te[1]||cLe).call(Ye,void 0,Te[0])}for(Ge.position={start:mb(Ne.length>0?Ne[0][1].start:{line:1,column:1,offset:0}),end:mb(Ne.length>0?Ne[Ne.length-2][1].end:{line:1,column:1,offset:0})},Oe=-1;++Oe<t.transforms.length;)Ge=t.transforms[Oe](Ge)||Ge;return Ge}function i(Ne,Ge,Ye){let ve=Ge-1,Oe=-1,Te=!1,Ie,$e,Ue,Qe;for(;++ve<=Ye;){let We=Ne[ve];switch(We[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{We[0]==="enter"?Oe++:Oe--,Qe=void 0;break}case"lineEndingBlank":{We[0]==="enter"&&(Ie&&!Qe&&!Oe&&!Ue&&(Ue=ve),Qe=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Qe=void 0}if(!Oe&&We[0]==="enter"&&We[1].type==="listItemPrefix"||Oe===-1&&We[0]==="exit"&&(We[1].type==="listUnordered"||We[1].type==="listOrdered")){if(Ie){let K=ve;for($e=void 0;K--;){let me=Ne[K];if(me[1].type==="lineEnding"||me[1].type==="lineEndingBlank"){if(me[0]==="exit")continue;$e&&(Ne[$e][1].type="lineEndingBlank",Te=!0),me[1].type="lineEnding",$e=K}else if(!(me[1].type==="linePrefix"||me[1].type==="blockQuotePrefix"||me[1].type==="blockQuotePrefixWhitespace"||me[1].type==="blockQuoteMaLine truncated
`,$Le="/",zLe="*",_2="",FNt="comment",jNt="declaration";function HLe(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var r=1,n=1;function i(h){var m=h.match(ENt);m&&(r+=m.length);var v=h.lastIndexOf(ONt);n=~v?h.length-v:n+h.length}function a(){var h={line:r,column:n};return function(m){return m.position=new o(h),u(),m}}function o(h){this.start=h,this.end={line:r,column:n},this.source=t.source}o.prototype.content=e;function s(h){var m=new Error(t.source+":"+r+":"+n+": "+h);if(m.reason=h,m.filename=t.source,m.line=r,m.column=n,m.source=e,!t.silent)throw m}function l(h){var m=h.exec(e);if(!!m){var v=m[0];return i(v),e=e.slice(v.length),m}}function u(){l(kNt)}function c(h){var m;for(h=h||[];m=f();)m!==!1&&h.push(m);return h}function f(){var h=a();if(!($Le!=e.charAt(0)||zLe!=e.charAt(1))){for(var m=2;_2!=e.charAt(m)&&(zLe!=e.charAt(m)||$Le!=e.charAt(m+1));)++m;if(m+=2,_2===e.charAt(m-1))return s("End of comment missing");var v=e.slice(2,m-2);return n+=2,i(v),e=e.slice(m),n+=2,h({type:FNt,comment:v})}}function d(){var h=a(),m=l(CNt);if(!!m){if(f(),!l(DNt))return s("property missing ':'");var v=l(TNt),A=h({type:jNt,property:ULe(m[0].replace(qLe,_2)),value:v?ULe(v[0].replace(qLe,_2)):_2});return l(NNt),A}}function p(){var h=[];c(h);for(var m;m=d();)m!==!1&&(h.push(m),c(h));return h}return u(),p()}function ULe(e){return e?e.replace(MNt,_2):_2}var Zse=ge(On()),VLe=e=>{let t=UF(e,{fragment:!0}),r=(n,i)=>{let a=(0,Zse.uniqueId)("~"),o=[],s={},l={},u="group",c=null;if((n.tagName=="strong"||n.tagName=="em"||n.tagName=="s"||n.tagName==="p"||n.tagName==="h1"||n.tagName==="h2"||n.tagName==="h3"||n.tagName==="h4"||n.tagName==="h5"||n.tagName==="h6")&&(c=n.tagName,u="text"),n.tagName=="span"&&(u="text",c="span",n.properties.style&&HLe(n.properties.style).forEach(d=>{d.type==="declaration"&&(s[d.property]=Jt(d.value))})),(n.tagName=="blockquote"||n.tagName=="pre")&&(u="group",c=n.tagName),n.tagName=="a"&&(u="text",c="a",s.label=Jt(n.value),l.value=Jt(n.href)),n.tagName=="br"&&(u="text",l.value="",c="br"),n.type==="text"&&(u="text",l.value=Jt(n.value)),(n.tagName=="table"||n.tagName=="thead"||n.tagName=="tbody"||n.tagName=="tfoot"||n.tagName=="tr"||n.tagName=="td"||n.tagName=="th")&&(u="group",c=n.tagName),(n.tagName==="ul"||n.tagName==="ol")&&(u="group",c=n.tagName,n.properties.dataType=="taskList"&&(c="taskList")),n.children?.length>0&&(o=n.children.map((d,p)=>r(d,p)),n.tagName==="li"&&(u="group",c="li",n.properties.dataType=="taskItem"))){l.value=Jt(n.properties.dataChecked=="true"?"true":"false"),c="task";let d=(0,Zse.uniqueId)("~");o=[{id:d,node:{id:d,schemaId:"",rank:0,name:"input",type:"input",props:{value:n.checked?"true":"false"}},children:[],parent:null,isRef:!1,editorProps:{editMode:0}},...o]}return c&&(s.sem=Jt(c)),{id:a,node:{id:a,schemaId:"",rank:0,name:n.tagName,type:u,props:l,styles:s},children:o,parent:null,isRef:!1,editorProps:{editMode:0}}};return r(t,0)};var SV=ge(Foe());SV.default.support.nodebuffer=!1;var hb=async(e,t,r)=>r?fetch(t).then(i=>i.arrayBuffer()):await e.middleware.fileExists(t)?await e.middleware.readBinaryToFile(t):null,PNt=async(e,t,r,n)=>{let i=await hb(e,r,n);if(i){let a=await new t.Database(new Uint8Array(i));try{a.exec("SELECT name FROM sqlite_schema")}catch{return new t.Database}return a}return new t.Database},KF=async(e,t,r,n)=>{let i=await _Nt(e,r,n);if(i){let a=await new t.Database(new Uint8Array(i));try{a.exec("SELECT name FROM sqlite_schema")}catch{return new t.Database}return a}return new t.Database},_Nt=async(e,t,r)=>{if(r)return fetch(t).then(o=>o.arrayBuffer());if(!await e.middleware.fileExists(t))return null;let n=new SV.default,i=await e.middleware.readBinaryToFile(t),a;try{a=await n.loadAsync(i).then(o=>n.file("data.mdb").async("arraybuffer"))}catch{}return a},CD=async(e,t,r)=>{await e.middleware.fileExists(Vu(Rc(t)))||await e.middleware.createFolder(Rc(t));let n=new SV.default;n.file("data.mdb",r);let i=await n.generateAsync({type:"arraybuffer",compression:"DEFLATE",compressionOptions:{level:5}});return e.middleware.writeBinaryToFile(t,i)},EV=async(e,t,r)=>(await e.middleware.fileExists(Vu(Rc(t)))||await e.middleware.createFolder(Rc(t)),e.middleware.writeBinaryToFile(t,r)),ele=(e,t)=>Object.keys(e).reduce((r,n)=>({...r,[n]:{uniques:t?.[n]??[],cols:e[n].cols.map(i=>i.name),rows:e[n].rows}}),{}),Kl=e=>e.reduce((t,r,n)=>[...t,{cols:r.columns,rows:r?r.values.map(i=>r.columns.reduce((a,o,s)=>({...a,[o]:i[s]}),{})):[]}],[]),JF=(e,t,r,n)=>{let i=n??"*",a=r?`SELECT ${i} FROM "${t}" WHERE ${r};`:`SELECT ${i} FROM ${t};`,o;try{o=Kl(e.exec(a))}catch{return null}return o.length==1?o[0]:null},GLe=(e,t,r)=>{let n=yfe(Object.keys(t).map(i=>{let a=t[i].cols;return t[i].rows.reduce((s,l)=>`${s} ${r?"REPLACE":"INSERT"} INTO "${i}" VALUES (${FQ(a.map(u=>`'${Cg(l?.[u])??""}'`))});`,"")}));try{e.exec(`${n}`)}catch{}};var I2=(e,t,r)=>{let n=`DELETE FROM "${t}" WHERE ${r};`;try{e.exec(n)}catch{}},WLe=(e,t)=>{let r=`DROP TABLE IF EXISTS "${tLine truncated
\f\r &/=>`.split(""),`
\f\r "&'/=>\``.split("")],[`\0
\f\r "&'/<=>`.split(""),`\0
@@ -257,7 +257,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
\f\r &>`.split(""),`\0
\f\r "&'<=>\``.split("")],[`\0
\f\r "&'<=>\``.split(""),`\0
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function gRe(e,t,r,n){let i=n.schema,a=i.space==="svg"?!1:n.settings.omitOptionalTags,o=i.space==="svg"?n.settings.closeEmptyElements:n.settings.voids.includes(e.tagName.toLowerCase()),s=[],l;i.space==="html"&&e.tagName==="svg"&&(n.schema=yv);let u=m3t(n,e.properties),c=n.all(i.space==="html"&&e.tagName==="template"?e.content:e);return n.schema=i,c&&(o=!1),(u||!a||!hRe(e,t,r))&&(s.push("<",e.tagName,u?" "+u:""),o&&(i.space==="svg"||n.settings.closeSelfClosing)&&(l=u.charAt(u.length-1),(!n.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&s.push(" "),s.push("/")),s.push(">")),s.push(c),!o&&(!a||!ZF(e,t,r))&&s.push("</"+e.tagName+">"),s.join("")}function m3t(e,t){let r=[],n=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let a=h3t(e,i,t[i]);a&&r.push(a)}}for(;++n<r.length;){let a=e.settings.tightAttributes?r[n].charAt(r[n].length-1):void 0;n!==r.length-1&&a!=='"'&&a!=="'"&&(r[n]+=" ")}return r.join("")}function h3t(e,t,r){let n=E2(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,a=e.settings.allowDangerousCharacters?0:1,o=e.quote,s;if(n.overloadedBoolean&&(r===n.attribute||r==="")?r=!0:(n.boolean||n.overloadedBoolean)&&(typeof r!="string"||r===n.attribute||r==="")&&(r=Boolean(r)),r==null||r===!1||typeof r=="number"&&Number.isNaN(r))return"";let l=Sv(n.attribute,Object.assign({},e.settings.characterReferences,{subset:jV.name[i][a]}));return r===!0||(r=Array.isArray(r)?(n.commaSeparated?I9e:L9e)(r,{padLeft:!e.settings.tightCommaSeparatedLists}):String(r),e.settings.collapseEmptyAttributes&&!r)?l:(e.settings.preferUnquoted&&(s=Sv(r,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:jV.unquoted[i][a]}))),s!==r&&(e.settings.quoteSmart&&wD(r,o)>wD(r,e.alternative)&&(o=e.alternative),s=o+Sv(r,Object.assign({},e.settings.characterReferences,{subset:(o==="'"?jV.single:jV.double)[i][a],attribute:!0}))+o),l+(s&&"="+s))}var g3t=["<","&"];function PV(e,t,r,n){return r&&r.type==="element"&&(r.tagName==="script"||r.tagName==="style")?e.value:Sv(e.value,Object.assign({},n.settings.characterReferences,{subset:g3t}))}function ARe(e,t,r,n){return n.settings.allowDangerousHtml?e.value:PV(e,t,r,n)}function vRe(e,t,r,n){return n.all(e)}var yRe=wLe("type",{invalid:A3t,unknown:v3t,handlers:{comment:uRe,doctype:cRe,element:gRe,raw:ARe,root:vRe,text:PV}});function A3t(e){throw new Error("Expected node, not `"+e+"`")}function v3t(e){let t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}var y3t={},b3t={},x3t=[];function DD(e,t){let r=t||y3t,n=r.quote||'"',i=n==='"'?"'":'"';if(n!=='"'&&n!=="'")throw new Error("Invalid quote `"+n+"`, expected `'` or `\"`");return{one:w3t,all:S3t,settings:{omitOptionalTags:r.omitOptionalTags||!1,allowParseErrors:r.allowParseErrors||!1,allowDangerousCharacters:r.allowDangerousCharacters||!1,quoteSmart:r.quoteSmart||!1,preferUnquoted:r.preferUnquoted||!1,tightAttributes:r.tightAttributes||!1,upperDoctype:r.upperDoctype||!1,tightDoctype:r.tightDoctype||!1,bogusComments:r.bogusComments||!1,tightCommaSeparatedLists:r.tightCommaSeparatedLists||!1,tightSelfClosing:r.tightSelfClosing||!1,collapseEmptyAttributes:r.collapseEmptyAttributes||!1,allowDangerousHtml:r.allowDangerousHtml||!1,voids:r.voids||ZLe,characterReferences:r.characterReferences||b3t,closeSelfClosing:r.closeSelfClosing||!1,closeEmptyElements:r.closeEmptyElements||!1},schema:r.space==="svg"?yv:k2,quote:n,alternative:i}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function w3t(e,t,r){return yRe(e,t,r,this)}function S3t(e){let t=[],r=e&&e.children||x3t,n=-1;for(;++n<r.length;)t[n]=this.one(r[n],n,e);return t.join("")}var _V=async(e,t,r,n)=>{let i=await IV(e,t,r),a=await u0(i),o=await sh(a,{prevState:{},state:{},newState:{},slides:{}},{api:e.api,contexts:{},saveState:()=>null,root:a,exec:a,runID:"",selectedSlide:"",styleAst:n?.styleAst}),s=await e4(e,i,o,[],r,n);return DD({type:"root",children:s})};var cp=ge(Me());var BV=e=>Object.keys(e??{}).filter(t=>t!="position");var qa=ge(Me());var LV=e=>{let{name:t,fm:r}=e,[n,i]=(0,qa.useState)(!1),a=r.tags??[],[o,s]=(0,qa.useState)({}),[l,u]=(0,qa.useState)([]);(0,qa.useEffect)(()=>{let f=[],d={},h=Bj(BV(r)).map(m=>({table:"",name:m,schemaId:"",type:OQ(JA(r[m],m))}));r&&(f.push(...h),Object.keys(r).forEach(m=>{d[m]=fa(m,r[m])})),s(d),u(f)},[]);let c=(0,qa.useMemo)(()=>({name:t,path:t,readOnly:!0,type:"note",label:{sticker:r.sticker,color:r.color,name:t},metadata:{property:{banner:r.banner}}}),[r,t]);return qa.default.createElement(_a,{superstate:e.superstate,path:e.name,pathState:c,readMode:!0},c.metadata.property.banner&&e.superstate.settings.banners&&qa.default.createElement(n6,{superstate:e.superstate}),qa.default.createElement("div",{className:"mk-path-context-component"},qa.default.createElement("div",{className:`mk-path-context-labeLine truncated
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function gRe(e,t,r,n){let i=n.schema,a=i.space==="svg"?!1:n.settings.omitOptionalTags,o=i.space==="svg"?n.settings.closeEmptyElements:n.settings.voids.includes(e.tagName.toLowerCase()),s=[],l;i.space==="html"&&e.tagName==="svg"&&(n.schema=yv);let u=m3t(n,e.properties),c=n.all(i.space==="html"&&e.tagName==="template"?e.content:e);return n.schema=i,c&&(o=!1),(u||!a||!hRe(e,t,r))&&(s.push("<",e.tagName,u?" "+u:""),o&&(i.space==="svg"||n.settings.closeSelfClosing)&&(l=u.charAt(u.length-1),(!n.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&s.push(" "),s.push("/")),s.push(">")),s.push(c),!o&&(!a||!ZF(e,t,r))&&s.push("</"+e.tagName+">"),s.join("")}function m3t(e,t){let r=[],n=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let a=h3t(e,i,t[i]);a&&r.push(a)}}for(;++n<r.length;){let a=e.settings.tightAttributes?r[n].charAt(r[n].length-1):void 0;n!==r.length-1&&a!=='"'&&a!=="'"&&(r[n]+=" ")}return r.join("")}function h3t(e,t,r){let n=E2(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,a=e.settings.allowDangerousCharacters?0:1,o=e.quote,s;if(n.overloadedBoolean&&(r===n.attribute||r==="")?r=!0:(n.boolean||n.overloadedBoolean)&&(typeof r!="string"||r===n.attribute||r==="")&&(r=Boolean(r)),r==null||r===!1||typeof r=="number"&&Number.isNaN(r))return"";let l=Sv(n.attribute,Object.assign({},e.settings.characterReferences,{subset:jV.name[i][a]}));return r===!0||(r=Array.isArray(r)?(n.commaSeparated?I9e:L9e)(r,{padLeft:!e.settings.tightCommaSeparatedLists}):String(r),e.settings.collapseEmptyAttributes&&!r)?l:(e.settings.preferUnquoted&&(s=Sv(r,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:jV.unquoted[i][a]}))),s!==r&&(e.settings.quoteSmart&&wD(r,o)>wD(r,e.alternative)&&(o=e.alternative),s=o+Sv(r,Object.assign({},e.settings.characterReferences,{subset:(o==="'"?jV.single:jV.double)[i][a],attribute:!0}))+o),l+(s&&"="+s))}var g3t=["<","&"];function PV(e,t,r,n){return r&&r.type==="element"&&(r.tagName==="script"||r.tagName==="style")?e.value:Sv(e.value,Object.assign({},n.settings.characterReferences,{subset:g3t}))}function ARe(e,t,r,n){return n.settings.allowDangerousHtml?e.value:PV(e,t,r,n)}function vRe(e,t,r,n){return n.all(e)}var yRe=wLe("type",{invalid:A3t,unknown:v3t,handlers:{comment:uRe,doctype:cRe,element:gRe,raw:ARe,root:vRe,text:PV}});function A3t(e){throw new Error("Expected node, not `"+e+"`")}function v3t(e){let t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}var y3t={},b3t={},x3t=[];function DD(e,t){let r=t||y3t,n=r.quote||'"',i=n==='"'?"'":'"';if(n!=='"'&&n!=="'")throw new Error("Invalid quote `"+n+"`, expected `'` or `\"`");return{one:w3t,all:S3t,settings:{omitOptionalTags:r.omitOptionalTags||!1,allowParseErrors:r.allowParseErrors||!1,allowDangerousCharacters:r.allowDangerousCharacters||!1,quoteSmart:r.quoteSmart||!1,preferUnquoted:r.preferUnquoted||!1,tightAttributes:r.tightAttributes||!1,upperDoctype:r.upperDoctype||!1,tightDoctype:r.tightDoctype||!1,bogusComments:r.bogusComments||!1,tightCommaSeparatedLists:r.tightCommaSeparatedLists||!1,tightSelfClosing:r.tightSelfClosing||!1,collapseEmptyAttributes:r.collapseEmptyAttributes||!1,allowDangerousHtml:r.allowDangerousHtml||!1,voids:r.voids||ZLe,characterReferences:r.characterReferences||b3t,closeSelfClosing:r.closeSelfClosing||!1,closeEmptyElements:r.closeEmptyElements||!1},schema:r.space==="svg"?yv:k2,quote:n,alternative:i}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function w3t(e,t,r){return yRe(e,t,r,this)}function S3t(e){let t=[],r=e&&e.children||x3t,n=-1;for(;++n<r.length;)t[n]=this.one(r[n],n,e);return t.join("")}var _V=async(e,t,r,n)=>{let i=await IV(e,t,r),a=await u0(i),o=await sh(a,{prevState:{},state:{},newState:{},slides:{}},{api:e.api,contexts:{},saveState:()=>null,root:a,exec:a,runID:"",selectedSlide:"",styleAst:n?.styleAst}),s=await e4(e,i,o,[],r,n);return DD({type:"root",children:s})};var cp=ge(Me());var BV=e=>Object.keys(e??{}).filter(t=>t!="position");var qa=ge(Me());var LV=e=>{let{name:t,fm:r}=e,[n,i]=(0,qa.useState)(!1),a=r.tags??[],[o,s]=(0,qa.useState)({}),[l,u]=(0,qa.useState)([]);(0,qa.useEffect)(()=>{let f=[],d={},h=Bj(BV(r)).map(m=>({table:"",name:m,schemaId:"",type:OQ(JA(r[m],m))}));r&&(f.push(...h),Object.keys(r).forEach(m=>{d[m]=fa(m,r[m])})),s(d),u(f)},[]);let c=(0,qa.useMemo)(()=>({name:t,path:t,readOnly:!0,type:"note",label:{sticker:r.sticker,color:r.color,name:t},metadata:{property:{banner:r.banner}}}),[r,t]);return qa.default.createElement(_a,{superstate:e.superstate,path:e.name,pathState:c,readMode:!0},c.metadata.property.banner&&e.superstate.settings.banners&&qa.default.createElement(n6,{superstate:e.superstate}),qa.default.createElement("div",{className:"mk-path-context-component"},qa.default.createElement("div",{className:`mk-path-context-labeLine truncated
`).forEach((p,h,m)=>{l.push({value:p,type:"text"}),h<m.length-1&&l.push({tagName:"br",properties:{},children:[],type:"element"})})}if(o=="flow"){let d=e.spaceManager.resolvePath(r.state[s.id].props.value,i);if(!r.state[s.id].styles?.["--mk-expanded"])return e.pathsIndex.has(d)?[{tagName:"div",properties:{style:"display: flex;"},children:[{tagName:"a",properties:{href:Cm(e,d,i)},children:[ple(e,d)],type:"element"}],type:"element"}]:[];if(e.spacesIndex.has(d)&&(d=e.spacesIndex.get(d).space.notePath),!d)return[];let h=await e.spaceManager.readPath(d),m=d.split("/").slice(0,-1).join("/");if(!h)return[];let v=await IV(e,h,d),A=await u0(v),x=await sh(A,{prevState:{},state:{},newState:{},slides:{}},{api:e.api,contexts:{},saveState:()=>null,root:A,exec:A,runID:"",selectedSlide:"",styleAst:r.styleAst});l=await e4(e,v,x,[],m,a)??[]}if(o=="input"&&r.state[s.id].styles?.sem=="checkbox"&&(u="input",f.display="inline-block",c={type:"checkbox",checked:r.state[s.id].props.value=="true",disabled:!0}),o=="slides")return[];if(t.children?.length>0){o=="contextView"&&(u="div",c={"data-type":"contextView"}),u=="contextGroup"&&(u="div",c={"data-type":"contextGroup"}),u=="contextItem"&&(u="a",c={"data-type":"contextItem",href:Cm(e,r.state[s.id].styles.dataPath,i),"data-path":r.state[s.id].styles.dataPath}),u=="taskList"&&(u="ul",f["flex-basis"]="100%",c={"data-type":"taskList"}),u=="task"&&(u="li",f.display="flex",f["flex-wrap"]="wrap",c={"data-type":"taskItem","data-checked":r.state[s.id].props.value=="true"?"true":"false"}),u=="ul"?(u="ul",f["flex-basis"]="100%"):u=="ol"&&(u="ol",f["flex-basis"]="100%");for(let d=0;d<t.children.length;d++){let p=await e4(e,t.children[d],r,n,i,a);p&&l.push(...p)}}return u?(delete f.sem,[{tagName:u,properties:{...c,style:P3t(f)},children:l,type:"element"}]):l},VV=async(e,t,r,n,i,a)=>(i=="contextItem"&&(t.state[t.exec.id].styles.dataPath=t.contexts.$context._keyValue,t.state[t.exec.id].styles.sem="contextItem"),(i=="contextGroup"||i=="contextView")&&(t.state[t.exec.id].styles.sem=i),e4(e,t.exec,t,r,n,a)),PRe=async(e,t,r,n,i)=>{let a=await dle(e,r,n,{},t,i.styleAst);return await VV(e,a,[],r)};var GV=e=>{let t=`* { box-sizing: border-box; }
`,r=(n,i)=>{let a=n.sem;n.sem=="taskList"&&(a="li[data-type='taskList']"),n.sem=="contextView"&&(a="div[data-type='contextView']"),n.sem=="contextGroup"&&(a="div[data-type='contextGroup']"),n.sem=="contextItem"&&(a="a[data-type='contextItem']"),n.sem=="root"?a="body":n.type=="slide"?(a=="$hover"?a=":hover":a=="$active"&&(a=".mk-active"),n.selector.length>0?a=`${i}.${n.selector}${a}`:a=`${i}${a}`):(n.selector.length>0&&(a+=`.${n.selector}`),a=`${i} ${a}`);let o=n.children.map(l=>r(l,n.sem=="root"?"":a)).join(`
`);return`${a} {
@@ -361,11 +361,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
flex: 1;
}
</style>
${s(a)}</div>`};var IRe=async(e,t,r)=>{let n="";if(r.head.styles?.enabled)if(r.head.styles.payload)n+=`<style>${r.head.styles.payload}</style>`;else{let o=await mD();n+=`<style>${GV(o)}</style>`}let i=e.pathsIndex.get(t)?.label.name;n+=`<title>${i}</title>`,n+='<meta name="viewport" content="width=device-width, initial-scale=1.0">',n+='<meta name="theme-color" content="var(--theme-color)">',n+=`<meta name="description" content="${i}">`;let a=e.pathsIndex.get(t)?.label.sticker;return a&&(n+=`<link rel="icon" href="data:image/svg+xml,${(0,_Re.encode)(e.ui.getSticker(a,{fontless:!0}))}" type="image/svg+xml">`),`<head>${n}</head>`},BRe=async(e,t,r)=>{let{header:n}=r,i="",a=e.pathsIndex.get(t),o="var(--file-margins)";if(n?.enabled&&n?.cover){let s=a?.metadata.property?.[e.settings.fmKeyBanner];if(s){let l=Cm(e,s,t);o="180px",i+=`<div style="background-image: url('${l}'); background-size: cover; background-position: center; height: 200px; width: 100%; left: 0; top: 0; position: absolute;"></div>`}}if(i+=`<div style="margin: 0 auto; width: 100%; margin-top: ${o}; max-width: var(--file-line-width); display: flex; position: relative; flex-direction: column; padding: 0 var(--file-margins); margin-bottom: var(--file-margins);">`,n?.enabled){let s="";if(a.metadata.label?.[e.settings.fmKeySticker]?.length){let u=a.label.sticker;s+=`<div style="width: 48px; height: 48px; flex: 0 0 auto">${DD(TD(e,u))}</div>`}s+=`<h1>${a.label.name}</h1>`,i+=s}return i},QV=async(e,t,r)=>{let n="";if(!e.pathsIndex.has(t))return n;r.head.enabled&&(n+=await IRe(e,t,r)),n+="<body>",r.nav.enabled&&(n+=hle(e,r.nav.root,t)),r.body.main.enabled&&(n+=`<div class="main" ${r.body.main.styles?`style="${r.body.main.styles}"`:""}>`),n+=await BRe(e,t,r);let i=await e.spaceManager.readPath(t);return n+=await _V(e,i,t,r),r.body.main.enabled&&(n+="</div>"),n+="</div></div></body>",n},YV=async(e,t,r)=>{let n="",i=e.spacesIndex.get(t);if(!i)return n;let o={$space:{note:i.space.notePath,space:t,path:t},$context:{_keyValue:t,_schema:"main"}};return r.head.enabled&&(n+=await IRe(e,t,r)),n+="<body>",r.nav.enabled&&(n+=hle(e,r.nav.root,t)),n+='<div class="main">',n+=await BRe(e,t,r),n+=await PRe(e,o,t,"main",r).then(s=>DD({type:"root",children:s})),n+="</div></div></div></body>",n};var Oc=ge(Me());var LRe=e=>{let{spaceState:t}=(0,Oc.useContext)(kr),[r,n]=Oc.default.useState({recursive:!0,nav:!0}),[i,a]=Oc.default.useState(!1),o=async(l,u)=>{a(!0);let c=await mD(),d=`${GV(c)}`;if(r.recursive){let p=async h=>{let m=await e.superstate.spaceManager.childrenForPath(h);return Promise.all(m.map(async v=>{let A=e.superstate.pathsIndex.get(v);if(!!A)return A.type=="space"&&await p(v),s(v,d,r,!1,l)}))};await p(l)}await s(l,d,r,u,l),a(!1),e.superstate.ui.notify("Successfully exported to HTML")},s=async(l,u,c,f,d)=>{let p=e.superstate.pathsIndex.get(l);if(!p)return;let h,m;if(p.type=="space")h=l+"/index.html",m=await YV(e.superstate,l,{header:{enabled:!0,cover:!0},nav:{enabled:c.nav,root:d},head:{enabled:!0,styles:{enabled:!0,themes:!0,payload:u}},body:{main:{enabled:!0}}});else if(p.subtype=="md"){let v=e.superstate.spaceManager.parentPathForPath(l),A=e.superstate.spacesIndex.get(v);if(!A||A.space.notePath==l)return;h=l.replace(new RegExp(".md$"),".html"),m=await QV(e.superstate,l,{header:{cover:!0,enabled:!0},nav:{enabled:c.nav,root:d},head:{enabled:!0,styles:{enabled:!0,themes:!0,payload:u}},body:{main:{enabled:!0}}})}else return;return e.superstate.spaceManager.writeToPath(h,m).then(v=>{f&&e.superstate.ui.openPath(h,"split")})};return Oc.default.createElement("div",{className:"mk-space-editor-smart"},Oc.default.createElement("div",{className:"mk-space-editor-smart-join-header"},Oc.default.createElement("div",{className:"mk-icon-small",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//pin")}}),Oc.default.createElement("span",null,N.labels.makeAStaticWebVersionOf," "),Oc.default.createElement(Bw,{superstate:e.superstate,options:[{name:"This Space",value:"false"},{name:N.labels.thisSpaceAndAllSubfolders,value:"true"}],value:r.recursive?"true":"false",selectValue:l=>{n({...r,recursive:l=="true"})}}),Oc.default.createElement(Bw,{superstate:e.superstate,options:[{name:"With Navigator",value:"true"},{name:"Without Navigator",value:"false"}],value:r.nav?"true":"false",selectValue:l=>{n({...r,nav:l=="true"})}})),i?Oc.default.createElement("div",{className:"mk-button-group"},Oc.default.createElement("button",{disabled:!0},N.labels.making)):Oc.default.createElement("div",{className:"mk-button-group"},Oc.default.createElement("button",{onClick:()=>o(t.path,!0)},N.buttons.export),Oc.default.createElement("button",{onClick:()=>e.close()},N.buttons.cancel)))};var RRe=ge(On());var Jl=ge(Me());var qRe=e=>{let[t,r]=(0,Jl.useState)(!0),[n,i]=(0,Jl.useState)(e.space.metadata??{}),a=u=>{i(u),hu(e.superstate,e.space.space,u)},o=(0,Jl.useMemo)(()=>(n?.links??[]).map(u=>e.superstate.pathsIndex.get(u)).filter(u=>u),[n]);(0,Jl.useEffect)(()=>{let u=c=>{if(c.path==e.space.path){lLine truncated
${s(a)}</div>`};var IRe=async(e,t,r)=>{let n="";if(r.head.styles?.enabled)if(r.head.styles.payload)n+=`<style>${r.head.styles.payload}</style>`;else{let o=await mD();n+=`<style>${GV(o)}</style>`}let i=e.pathsIndex.get(t)?.label.name;n+=`<title>${i}</title>`,n+='<meta name="viewport" content="width=device-width, initial-scale=1.0">',n+='<meta name="theme-color" content="var(--theme-color)">',n+=`<meta name="description" content="${i}">`;let a=e.pathsIndex.get(t)?.label.sticker;return a&&(n+=`<link rel="icon" href="data:image/svg+xml,${(0,_Re.encode)(e.ui.getSticker(a,{fontless:!0}))}" type="image/svg+xml">`),`<head>${n}</head>`},BRe=async(e,t,r)=>{let{header:n}=r,i="",a=e.pathsIndex.get(t),o="var(--file-margins)";if(n?.enabled&&n?.cover){let s=a?.metadata.property?.[e.settings.fmKeyBanner];if(s){let l=Cm(e,s,t);o="180px",i+=`<div style="background-image: url('${l}'); background-size: cover; background-position: center; height: 200px; width: 100%; left: 0; top: 0; position: absolute;"></div>`}}if(i+=`<div style="margin: 0 auto; width: 100%; margin-top: ${o}; max-width: var(--file-line-width); display: flex; position: relative; flex-direction: column; padding: 0 var(--file-margins); margin-bottom: var(--file-margins);">`,n?.enabled){let s="";if(a.metadata.label?.[e.settings.fmKeySticker]?.length){let u=a.label.sticker;s+=`<div style="width: 48px; height: 48px; flex: 0 0 auto">${DD(TD(e,u))}</div>`}s+=`<h1>${a.label.name}</h1>`,i+=s}return i},QV=async(e,t,r)=>{let n="";if(!e.pathsIndex.has(t))return n;r.head.enabled&&(n+=await IRe(e,t,r)),n+="<body>",r.nav.enabled&&(n+=hle(e,r.nav.root,t)),r.body.main.enabled&&(n+=`<div class="main" ${r.body.main.styles?`style="${r.body.main.styles}"`:""}>`),n+=await BRe(e,t,r);let i=await e.spaceManager.readPath(t);return n+=await _V(e,i,t,r),r.body.main.enabled&&(n+="</div>"),n+="</div></div></body>",n},YV=async(e,t,r)=>{let n="",i=e.spacesIndex.get(t);if(!i)return n;let o={$space:{note:i.space.notePath,space:t,path:t},$context:{_keyValue:t,_schema:"main"}};return r.head.enabled&&(n+=await IRe(e,t,r)),n+="<body>",r.nav.enabled&&(n+=hle(e,r.nav.root,t)),n+='<div class="main">',n+=await BRe(e,t,r),n+=await PRe(e,o,t,"main",r).then(s=>DD({type:"root",children:s})),n+="</div></div></div></body>",n};var Oc=ge(Me());var LRe=e=>{let{spaceState:t}=(0,Oc.useContext)(kr),[r,n]=Oc.default.useState({recursive:!0,nav:!0}),[i,a]=Oc.default.useState(!1),o=async(l,u)=>{a(!0);let c=await mD(),d=`${GV(c)}`;if(r.recursive){let p=async h=>{let m=await e.superstate.spaceManager.childrenForPath(h);return Promise.all(m.map(async v=>{let A=e.superstate.pathsIndex.get(v);if(!!A)return A.type=="space"&&await p(v),s(v,d,r,!1,l)}))};await p(l)}await s(l,d,r,u,l),a(!1),e.superstate.ui.notify("Successfully exported to HTML")},s=async(l,u,c,f,d)=>{let p=e.superstate.pathsIndex.get(l);if(!p)return;let h,m;if(p.type=="space")h=l+"/index.html",m=await YV(e.superstate,l,{header:{enabled:!0,cover:!0},nav:{enabled:c.nav,root:d},head:{enabled:!0,styles:{enabled:!0,themes:!0,payload:u}},body:{main:{enabled:!0}}});else if(p.subtype=="md"){let v=e.superstate.spaceManager.parentPathForPath(l),A=e.superstate.spacesIndex.get(v);if(!A||A.space.notePath==l)return;h=l.replace(new RegExp(".md$"),".html"),m=await QV(e.superstate,l,{header:{cover:!0,enabled:!0},nav:{enabled:c.nav,root:d},head:{enabled:!0,styles:{enabled:!0,themes:!0,payload:u}},body:{main:{enabled:!0}}})}else return;return e.superstate.spaceManager.writeToPath(h,m).then(v=>{f&&e.superstate.ui.openPath(h,"split")})};return Oc.default.createElement("div",{className:"mk-space-editor-smart"},Oc.default.createElement("div",{className:"mk-space-editor-smart-join-header"},Oc.default.createElement("div",{className:"mk-icon-small",dangerouslySetInnerHTML:{__html:e.superstate.ui.getSticker("ui//pin")}}),Oc.default.createElement("span",null,N.labels.makeAStaticWebVersionOf," "),Oc.default.createElement(Bw,{superstate:e.superstate,options:[{name:"This Space",value:"false"},{name:N.labels.thisSpaceAndAllSubfolders,value:"true"}],value:r.recursive?"true":"false",selectValue:l=>{n({...r,recursive:l=="true"})}}),Oc.default.createElement(Bw,{superstate:e.superstate,options:[{name:"With Navigator",value:"true"},{name:"Without Navigator",value:"false"}],value:r.nav?"true":"false",selectValue:l=>{n({...r,nav:l=="true"})}})),i?Oc.default.createElement("div",{className:"mk-button-group"},Oc.default.createElement("button",{disabled:!0},N.labels.making)):Oc.default.createElement("div",{className:"mk-button-group"},Oc.default.createElement("button",{onClick:()=>o(t.path,!0)},N.buttons.export),Oc.default.createElement("button",{onClick:()=>e.close()},N.buttons.cancel)))};var RRe=ge(On());var Jl=ge(Me());var qRe=e=>{let[t,r]=(0,Jl.useState)(!0),[n,i]=(0,Jl.useState)(e.space.metadata??{}),a=u=>{i(u),hu(e.superstate,e.space.space,u)},o=(0,Jl.useMemo)(()=>(n?.links??[]).map(u=>e.superstate.pathsIndex.get(u)).filter(u=>u),[n]);(0,Jl.useEffect)(()=>{let u=c=>{if(c.path==e.space.path){lLine truncated
<path d="m51.39 53.148 36.687-38.355v73.284H11.923V14.793L48.61 53.148 50 54.6l1.39-1.453Z"/>
</svg>
`,uG=["accessibility","activity","air-vent","airplay","alarm-check","alarm-clock-off","alarm-clock","alarm-minus","alarm-plus","album","alert-circle","alert-octagon","alert-triangle","align-center-horizontal","align-center-vertical","align-center","align-end-horizontal","align-end-vertical","align-horizontal-distribute-center","align-horizontal-distribute-end","align-horizontal-distribute-start","align-horizontal-justify-center","align-horizontal-justify-end","align-horizontal-justify-start","align-horizontal-space-around","align-horizontal-space-between","align-justify","align-left","align-right","align-start-horizontal","align-start-vertical","align-vertical-distribute-center","align-vertical-distribute-end","align-vertical-distribute-start","align-vertical-justify-center","align-vertical-justify-end","align-vertical-justify-start","align-vertical-space-around","align-vertical-space-between","anchor","angry","annoyed","aperture","apple","archive-restore","archive","armchair","arrow-big-down","arrow-big-left","arrow-big-right","arrow-big-up","arrow-down-circle","arrow-down-left-from-circle","arrow-down-left","arrow-down-right-from-circle","arrow-down-right","arrow-down","arrow-left-circle","arrow-left-right","arrow-left","arrow-right-circle","arrow-right","arrow-up-circle","arrow-up-down","arrow-up-left-from-circle","arrow-up-left","arrow-up-right-from-circle","arrow-up-right","arrow-up","asterisk","at-sign","atom","award","axe","axis-3d","baby","backpack","baggage-claim","ban","banana","banknote","bar-chart-2","bar-chart-3","bar-chart-4","bar-chart-horizontal","bar-chart","baseline","bath","battery-charging","battery-full","battery-low","battery-medium","battery-warning","battery","beaker","bean-off","bean","bed-double","bed-single","bed","beef","beer","bell-minus","bell-off","bell-plus","bell-ring","bell","bike","binary","bird","bitcoin","blinds","bluetooth-connected","bluetooth-off","bluetooth-searching","bluetooth","bold","bomb","bone","book-copy","book-down","book-key","book-lock","book-marked","book-minus","book-open-check","book-open","book-plus","book-template","book-up","book-x","book","bookmark-minus","bookmark-plus","bookmark","bot","box-select","box","boxes","brain-circuit","brain-cog","brain","briefcase","brush","bug","building-2","building","bus","cake","calculator","calendar-check-2","calendar-check","calendar-clock","calendar-days","calendar-heart","calendar-minus","calendar-off","calendar-plus","calendar-range","calendar-search","calendar-x2","calendar-x","calendar","camera-off","camera","candy-off","candy","car","carrot","case-lower","case-sensitive","case-upper","cast","castle","cat","check-check","check-circle-2","check-circle","check-square","check","chef-hat","cherry","chevron-down-square","chevron-down","chevron-first","chevron-last","chevron-left-square","chevron-left","chevron-right-square","chevron-right","chevron-up-square","chevron-up","chevrons-down-up","chevrons-down","chevrons-left-right","chevrons-left","chevrons-right-left","chevrons-right","chevrons-up-down","chevrons-up","chrome","church","cigarette-off","cigarette","circle-dot","circle-ellipsis","circle-equal","circle-off","circle-slash-2","circle-slash","circle","circuit-board","citrus","clapperboard","clipboard-check","clipboard-copy","clipboard-edit","clipboard-list","clipboard-paste","clipboard-signature","clipboard-type","clipboard-x","clipboard","clock-1","clock-10","clock-11","clock-12","clock-2","clock-3","clock-4","clock-5","clock-6","clock-7","clock-8","clock-9","clock","cloud-cog","cloud-drizzle","cloud-fog","cloud-hail","cloud-lightning","cloud-moon-rain","cloud-moon","cloud-off","cloud-rain-wind","cloud-rain","cloud-snow","cloud-sun-rain","cloud-sun","cloud","cloudy","clover","code-2","code","codepen","codesandbox","coffee","cog","coins","columns","command","compass","component","concierge-bell","construction","contact","contrast","cookie","copy-check","copy-minus","copy-plus","copy-slash","copy-x","copy","copyleft","copyright","corner-down-left","corner-down-right","corner-left-down","corner-left-up","corner-right-down","corner-right-up","corner-up-left","corner-up-right","cpu","creative-commons","credit-card","croissant","crop","cross","crosshair","crown","cup-soda","curly-braces","currency","database-backup","database","delete","diamond","dice-1","dice-2","dice-3","dice-4","dice-5","dice-6","dices","diff","disc-2","disc","divide-circle","divide-square","divide","dna-off","dna","dog","dollar-sign","door-closed","door-open","download-cloud","download","dribbble","droplet","droplets","drumstick","dumbbell","ear-off","ear","edit-2","edit-3","edit","egg-fried","egg-off","egg","equal-not","equal","eraser","euro","expand","external-link","eye-off","eye","facebook","factory","fan","fast-forward","feather","figma","file-archive","file-audio-2","file-audio","file-axis-3d","file-badge-2","file-badge","file-bar-chart-2","file-bar-chart","file-box","file-check-2","file-check","file-clock","file-code","file-cog-2","fi Line truncated
`).replace(/~{3}.*\n/g,"").replace(/~~/g,"").replace(/`{3}.*\n/g,""),t=t.replace(/<[^>]*>/g,"");let r=new RegExp("<[^>]*>","g");t=t.replace(r,"").replace(/^[=\-]{2,}\s*$/g,"").replace(/\[\^.+?\](\: .*?$)?/g,"").replace(/\s{0,2}\[.*?\]: .*?$/g,"").replace(/\!\[(.*?)\][\[\(].*?[\]\)]/g,"").replace(/\[([^\]]*?)\][\[\(].*?[\]\)]/g,"$1").replace(/^(\n)?\s{0,3}>\s?/gm,"$1").replace(/^\s{1,2}\[(.*?)\]: (\S+)( ".*?")?\s*$/g,"").replace(/^(\n)?\s{0,}#{1,6}\s*( (.+))? +#+$|^(\n)?\s{0,}#{1,6}\s*( (.+))?$/gm,"$1$3$4$6").replace(/([\*]+)(\S)(.*?\S)??\1/g,"$2$3").replace(/(^|\W)([_]+)(\S)(.*?\S)??\2($|\W)/g,"$1$3$4$5").replace(/(`{3,})(.*?)\1/gm,"$2").replace(/`(.+?)`/g,"$1").replace(/~(.*?)~/g,"$1")}catch(r){return console.error(r),t}return t.replace(/^\s*\n/gm,"")},xG=class{constructor(t){this.plugin=t;this.id="metadata.obsidian.md";this.supportedFileTypes=["md"];this.cacheDirectory=".makemd/thumbnails";this.loadFile=async t=>{if(this.plugin.superstate.settings.noteThumbnails){let r=`${this.cacheDirectory}/${d4(t.path)}.jpeg`;(!await this.middleware.fileExists(r)||!this.thumbnailFreshCache.get(t.path))&&(Ab.Platform.isMobile||await this.generateThumbnail(t,r)&&(this.parseCache(t,!0),this.thumbnailFreshCache.set(t.path,!0)))}};this.generateThumbnail=async(t,r)=>{let n=async(l,u,c,f="#fff")=>{let d="http://www.w3.org/2000/svg",p=document.createElementNS(d,"svg"),h=document.createElementNS(d,"foreignObject");p.setAttribute("width",`${u}`),p.setAttribute("height",`${c}`),p.setAttribute("viewBox",`0 0 ${u} ${c}`),h.setAttribute("width","100%"),h.setAttribute("height","100%"),h.setAttribute("x","0"),h.setAttribute("y","0"),h.setAttribute("externalResourcesRequired","true"),p.appendChild(h);let m=document.createElement("div");m.innerHTML=l,h.appendChild(m);let v=await Promise.resolve().then(()=>new XMLSerializer().serializeToString(p)).then(encodeURIComponent).then(D=>`data:image/svg+xml;charset=utf-8,${D}`),A=await new Promise((D,k)=>{let M=new Image;M.onload=()=>{M.decode().then(()=>{requestAnimationFrame(()=>D(M))})},M.onerror=k,M.crossOrigin="anonymous",M.decoding="async",M.src=v}),x=document.createElement("canvas"),g=x.getContext("2d"),w=1,b=u,y=c;return x.width=b*w,x.height=y*w,x.style.width=`${b}`,x.style.height=`${y}`,g.fillStyle=f,g.fillRect(0,0,x.width,x.height),g.drawImage(A,0,0,x.width,x.height),await(await new Promise(D=>{x.toBlob(D,"image/jpeg",1)})).arrayBuffer()};this.styleAst||(this.styleAst=await mD(!0));let i=Object.entries(this.styleAst.styles).map(([l,u])=>`${a4(l)}: ${u.replace(/"/g,"&quot;").replace(/ |\r\n|\n|\r/gm,"")}${this.styleAst.type=="slide"?"!important":""};`).join(" "),a={header:{enabled:!0,cover:!1},styleAst:this.styleAst,images:{embed:!0},nav:{enabled:!1},head:{enabled:!1},body:{main:{enabled:!0,styles:i}}},o;t.isFolder?o=await YV(this.plugin.superstate,t.path,a):o=await QV(this.plugin.superstate,t.path,a);let s=await n(o,512,800,this.styleAst.styles["--mk-ui-background-contrast"]);return await this.middleware.fileExists(this.cacheDirectory)||await this.middleware.createFolder(this.cacheDirectory),await this.middleware.writeBinaryToFile(r,s),!0};this.metadataKeys=["property","links","embeds","tags","headings","sections","listItems","frontmatter","frontmatterPosition","frontmatterLinks","blocks"];this.app=t.app}initiate(t){this.middleware=t,this.cache=new Map,this.linksMap=new hc,this.thumbnailFreshCache=new Map}metadataChange(t){this.parseCache(Nc(t),!0)}async parseCache(t,r){if(!t)return;let n=this.app.metadataCache.getCache(t.path);if(!n)return;let i=[],a=this.app.metadataCache.resolvedLinks,o=new Set(this.linksMap.getInverse(t.path)),s=this.cache.get(t.path);if(!s)for(let[c,f]of Object.entries(a))t.path in f&&o.add(c);n&&n.tags&&i.push(...n.tags?.map(c=>c.tag)??[]),n&&n.frontmatter?.tags&&i.push(...(typeof n.frontmatter?.tags=="string"?$S(n.frontmatter.tags.replace(/ /g,"")):Array.isArray(n.frontmatter?.tags)?n.frontmatter?.tags??[]:[]).filter(c=>typeof c=="string").map(c=>Rm(c))),n&&n.frontmatter?.tag&&i.push(...(typeof n.frontmatter?.tag=="string"?$S(n.frontmatter.tag.replace(/ /g,"")):Array.isArray(n.frontmatter?.tag)?n.frontmatter?.tag??[]:[]).filter(c=>typeof c=="string").map(c=>Rm(c)));let l=n.links?.map(c=>this.plugin.app.metadataCache.getFirstLinkpathDest(c.link,t.path)?.path).filter(c=>c);this.linksMap.set(t.path,new Set(l));let u={resolvedLinks:l??[],inlinks:Array.from(o),tags:i.filter(c=>c),property:n.frontmatter,tasks:[],label:{name:t.name,cover:n.frontmatter?.[this.plugin.superstate.settings.fmKeyBanner],thumbnail:n.frontmatter?.[this.plugin.superstate.settings.fmKeyBanner],sticker:n.frontmatter?.[this.plugin.superstate.settings.fmKeySticker],color:n.frontmatter?.[this.plugin.superstate.settings.fmKeyColor]}};if(this.plugin.superstate.settings.noteThumbnails){let c=`${this.cacheDirectory}/${d4(t.path)}.jpeg`;await this.middleware.fileExists(c)&&(this.thumbnailFreshCache.set(t.path,!0),u.label.thumbnail=c)}if(this.plugin.superstate.settings.notesPreview){let c=await this.pluLine truncated
`).replace(/~{3}.*\n/g,"").replace(/~~/g,"").replace(/`{3}.*\n/g,""),t=t.replace(/<[^>]*>/g,"");let r=new RegExp("<[^>]*>","g");t=t.replace(r,"").replace(/^[=\-]{2,}\s*$/g,"").replace(/\[\^.+?\](\: .*?$)?/g,"").replace(/\s{0,2}\[.*?\]: .*?$/g,"").replace(/\!\[(.*?)\][\[\(].*?[\]\)]/g,"").replace(/\[([^\]]*?)\][\[\(].*?[\]\)]/g,"$1").replace(/^(\n)?\s{0,3}>\s?/gm,"$1").replace(/^\s{1,2}\[(.*?)\]: (\S+)( ".*?")?\s*$/g,"").replace(/^(\n)?\s{0,}#{1,6}\s*( (.+))? +#+$|^(\n)?\s{0,}#{1,6}\s*( (.+))?$/gm,"$1$3$4$6").replace(/([\*]+)(\S)(.*?\S)??\1/g,"$2$3").replace(/(^|\W)([_]+)(\S)(.*?\S)??\2($|\W)/g,"$1$3$4$5").replace(/(`{3,})(.*?)\1/gm,"$2").replace(/`(.+?)`/g,"$1").replace(/~(.*?)~/g,"$1")}catch(r){return console.error(r),t}return t.replace(/^\s*\n/gm,"")},xG=class{constructor(t){this.plugin=t;this.id="metadata.obsidian.md";this.supportedFileTypes=["md"];this.cacheDirectory=".makemd/thumbnails";this.loadFile=async t=>{if(this.plugin.superstate.settings.noteThumbnails){let r=`${this.cacheDirectory}/${d4(t.path)}.jpeg`;(!await this.middleware.fileExists(r)||!this.thumbnailFreshCache.get(t.path))&&(Ab.Platform.isMobile||await this.generateThumbnail(t,r)&&(this.parseCache(t,!0),this.thumbnailFreshCache.set(t.path,!0)))}};this.generateThumbnail=async(t,r)=>{let n=async(l,u,c,f="#fff")=>{let d="http://www.w3.org/2000/svg",p=document.createElementNS(d,"svg"),h=document.createElementNS(d,"foreignObject");p.setAttribute("width",`${u}`),p.setAttribute("height",`${c}`),p.setAttribute("viewBox",`0 0 ${u} ${c}`),h.setAttribute("width","100%"),h.setAttribute("height","100%"),h.setAttribute("x","0"),h.setAttribute("y","0"),h.setAttribute("externalResourcesRequired","true"),p.appendChild(h);let m=document.createElement("div");m.innerHTML=l,h.appendChild(m);let v=await Promise.resolve().then(()=>new XMLSerializer().serializeToString(p)).then(encodeURIComponent).then(D=>`data:image/svg+xml;charset=utf-8,${D}`),A=await new Promise((D,k)=>{let M=new Image;M.onload=()=>{M.decode().then(()=>{requestAnimationFrame(()=>D(M))})},M.onerror=k,M.crossOrigin="anonymous",M.decoding="async",M.src=v}),x=document.createElement("canvas"),g=x.getContext("2d"),w=1,b=u,y=c;return x.width=b*w,x.height=y*w,x.style.width=`${b}`,x.style.height=`${y}`,g.fillStyle=f,g.fillRect(0,0,x.width,x.height),g.drawImage(A,0,0,x.width,x.height),await(await new Promise(D=>{x.toBlob(D,"image/jpeg",1)})).arrayBuffer()};this.styleAst||(this.styleAst=await mD(!0));let i=Object.entries(this.styleAst.styles).map(([l,u])=>`${a4(l)}: ${u.replace(/"/g,"&quot;").replace(/ |\r\n|\n|\r/gm,"")}${this.styleAst.type=="slide"?"!important":""};`).join(" "),a={header:{enabled:!0,cover:!1},styleAst:this.styleAst,images:{embed:!0},nav:{enabled:!1},head:{enabled:!1},body:{main:{enabled:!0,styles:i}}},o;t.isFolder?o=await YV(this.plugin.superstate,t.path,a):o=await QV(this.plugin.superstate,t.path,a);let s=await n(o,512,800,this.styleAst.styles["--mk-ui-background-contrast"]);return await this.middleware.fileExists(this.cacheDirectory)||await this.middleware.createFolder(this.cacheDirectory),await this.middleware.writeBinaryToFile(r,s),!0};this.metadataKeys=["property","links","embeds","tags","headings","sections","listItems","frontmatter","frontmatterPosition","frontmatterLinks","blocks"];this.app=t.app}initiate(t){this.middleware=t,this.cache=new Map,this.linksMap=new hc,this.thumbnailFreshCache=new Map}metadataChange(t){this.parseCache(Nc(t),!0)}async parseCache(t,r){if(!t)return;let n=this.app.metadataCache.getCache(t.path);if(!n)return;let i=[],a=this.app.metadataCache.resolvedLinks,o=new Set(this.linksMap.getInverse(t.path)),s=this.cache.get(t.path);if(!s)for(let[c,f]of Object.entries(a))t.path in f&&o.add(c);n&&n.tags&&i.push(...n.tags?.map(c=>c.tag)??[]),n&&n.frontmatter?.tags&&i.push(...(typeof n.frontmatter?.tags=="string"?$S(n.frontmatter.tags.replace(/ /g,"")):Array.isArray(n.frontmatter?.tags)?n.frontmatter?.tags??[]:[]).filter(c=>typeof c=="string").map(c=>Rm(c))),n&&n.frontmatter?.tag&&i.push(...(typeof n.frontmatter?.tag=="string"?$S(n.frontmatter.tag.replace(/ /g,"")):Array.isArray(n.frontmatter?.tag)?n.frontmatter?.tag??[]:[]).filter(c=>typeof c=="string").map(c=>Rm(c)));let l=n.links?.map(c=>this.plugin.app.metadataCache.getFirstLinkpathDest(c.link,t.path)?.path).filter(c=>c);this.linksMap.set(t.path,new Set(l));let u={resolvedLinks:l??[],inlinks:Array.from(o),tags:i.filter(c=>c),property:n.frontmatter,tasks:[],label:{name:t.name,cover:n.frontmatter?.[this.plugin.superstate.settings.fmKeyBanner],thumbnail:n.frontmatter?.[this.plugin.superstate.settings.fmKeyBanner],sticker:n.frontmatter?.[this.plugin.superstate.settings.fmKeySticker],color:n.frontmatter?.[this.plugin.superstate.settings.fmKeyColor]}};if(this.plugin.superstate.settings.noteThumbnails){let c=`${this.cacheDirectory}/${d4(t.path)}.jpeg`;await this.middleware.fileExists(c)&&(this.thumbnailFreshCache.set(t.path,!0),u.label.thumbnail=c)}if(this.plugin.superstate.settings.notesPreview){let c=await this.pluLine truncated
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
</svg>`,"flow-hover":`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.7941 11.6917C11.4281 11.809 12.0857 11.7486 12.6856 11.5163C13.2858 11.2838 13.8068 10.8873 14.1773 10.3692C14.5483 9.85038 14.75 9.23465 14.75 8.6C14.75 7.96535 14.5483 7.34962 14.1773 6.83081C13.8068 6.31273 13.2858 5.91619 12.6856 5.68372C12.0857 5.45136 11.4281 5.39096 10.7941 5.50834C10.1599 5.62575 9.57072 5.91716 9.10335 6.35289C9.09233 6.36317 9.08162 6.37378 9.07124 6.3847L5.85862 9.76393C5.60897 9.99123 5.28818 10.1509 4.93287 10.2167C4.5702 10.2839 4.19486 10.2487 3.85619 10.1175C3.51778 9.98646 3.23669 9.76777 3.04283 9.49668C2.84949 9.22631 2.75 8.91434 2.75 8.6C2.75 8.28566 2.84949 7.97369 3.04283 7.70332C3.23669 7.43223 3.51778 7.21354 3.85619 7.08246C4.19486 6.95128 4.5702 6.91614 4.93287 6.98328C5.29024 7.04944 5.61268 7.21063 5.86295 7.44003L6.559 8.14747L7.62823 7.09545L6.91982 6.37545C6.91226 6.36777 6.90453 6.36025 6.89665 6.35289C6.42928 5.91716 5.8401 5.62575 5.20593 5.50834C4.57189 5.39096 3.91432 5.45136 3.31441 5.68372C2.71423 5.91619 2.19318 6.31273 1.8227 6.83081C1.4517 7.34962 1.25 7.96535 1.25 8.6C1.25 9.23465 1.4517 9.85038 1.8227 10.3692C2.19318 10.8873 2.71423 11.2838 3.31441 11.5163C3.91432 11.7486 4.57189 11.809 5.20593 11.6917C5.8401 11.5742 6.42928 11.2828 6.89665 10.8471C6.90767 10.8368 6.91838 10.8262 6.92876 10.8153L10.1414 7.43607C10.391 7.20877 10.7118 7.04906 11.0671 6.98328C11.4298 6.91614 11.8051 6.95128 12.1438 7.08246C12.4822 7.21354 12.7633 7.43223 12.9572 7.70332C13.1505 7.97369 13.25 8.28566 13.25 8.6C13.25 8.91434 13.1505 9.22631 12.9572 9.49668C12.7633 9.76777 12.4822 9.98646 12.1438 10.1175C11.8051 10.2487 11.4298 10.2839 11.0671 10.2167C10.7098 10.1506 10.3873 9.98938 10.1371 9.75998L9.441 9.05253L8.37177 10.1045L9.08018 10.8245C9.08774 10.8322 9.09547 10.8398 9.10335 10.8471C9.57072 11.2828 10.1599 11.5742 10.7941 11.6917Z" fill="currentColor"/>
@@ -968,7 +968,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
</div>
</foreignObject>
</svg>
`}else{if(n=="ui")return vi[i];if(n=="lucide")return yqe(i);{let a=n,o=i;if(t.superstate.assets){let s=t.superstate.assets,l=`${a}//${o}`,u=s.getIconSync(l)||s.getIconSync(o)||s.getIconSync(e);if(u)return u;s.getIcon(l).then(c=>{}).catch(()=>{s.getIcon(o).then(c=>{}).catch(()=>{})})}return""}}};var h4=e=>{if(!e.superstate.settings.spacesStickers)return;let t=e.app.workspace.getActiveViewOfType(Wqe.MarkdownView)?.leaf;if(t){let r=e.app.workspace.getActiveFile();if(!r)return;let n=e.superstate.pathsIndex.get(r.path);if(n?.label.sticker&&t.tabHeaderInnerIconEl){let[i,a]=fh(n.label.sticker);if(i=="image"){let o=e.superstate.ui.getUIPath(e.superstate.imagesCache.get(a));o&&(t.tabHeaderInnerIconEl.innerHTML=`<img src="${o}" />`)}else{let o=m4(n.label.sticker,e);t.tabHeaderInnerIconEl.innerHTML=o}}return}else if(t=e.app.workspace.getActiveViewOfType(q2)?.leaf,t){let r=t.view.getState().path,n=e.superstate.pathsIndex.get(r);if(n?.label?.sticker&&t.tabHeaderInnerIconEl){let[i,a]=fh(n.label.sticker);if(i=="image"){let o=e.superstate.ui.getUIPath(e.superstate.imagesCache.get(a));if(!o)return o;t.tabHeaderInnerIconEl.innerHTML=`<img src="${o}" />`}else{let o=m4(n.label.sticker,e);t.tabHeaderInnerIconEl.innerHTML=o}}return}};var jA=ge(Me()),Qqe=ge(cu());function Yqe(){let e=(0,jA.useRef)(new WeakMap),t=(0,jA.useRef)(new WeakMap),[r,n]=(0,jA.useState)(0),[i,a]=(0,jA.useState)(new Set),o=u=>t.current.get(u),s=(0,jA.useCallback)((u,c)=>{let f={render:d=>{e.current.set(u,d),n(p=>p+1)},unmount:()=>{e.current.delete(u),t.current.delete(u),a(d=>{let p=new Set(d);return p.delete(u),p}),n(d=>d+1)}};return e.current.set(u,null),t.current.set(u,f),a(d=>new Set(d).add(u)),n(d=>d+1),f},[]),l=(0,jA.useMemo)(()=>[...i].map(u=>{let c=e.current.get(u);return c?(0,Qqe.createPortal)(c,u):null}).filter(Boolean),[i,r]);return{createRoot:s,portals:l,getRoot:o}}var RD=ge(Me()),Xqe=e=>{let t=E1(jf(x0,{activationConstraint:{distance:10}}),jf(w0,{activationConstraint:{delay:250,tolerance:5}}),jf(mg,{coordinateGetter:VE})),{createRoot:r,portals:n,getRoot:i}=Yqe();(0,RD.useEffect)(()=>{e.ui.createRoot=r,e.ui.getRoot=i,e.ui.manager.eventsDispatch.dispatchEvent("windowReady",null)},[r]);let[a,o]=RD.default.useState(!1);return RD.default.createElement(k1,{sensors:t,onDragStart:()=>{o(!0)},onDragEnd:()=>{o(!1),document.body.style.setProperty("cursor","")},onDragCancel:()=>{o(!1)},collisionDetection:RAe,measuring:{droppable:{strategy:jd.Always}}},RD.default.createElement(oje,{dragActive:a},n))};var Rh=ge(Me());function Kqe(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Yj(e,t)}var g4=ge(Me()),A4=ge(cu());var Cle={disabled:!1};var Jqe=ge(Me()),Dle=Jqe.default.createContext(null);var Zqe=function(t){return t.scrollTop};var v4="unmounted",V2="exited",G2="entering",$D="entered",Tle="exiting",Cv=function(e){Kqe(t,e);function t(n,i){var a;a=e.call(this,n,i)||this;var o=i,s=o&&!o.isMounting?n.enter:n.appear,l;return a.appearStatus=null,n.in?s?(l=V2,a.appearStatus=G2):l=$D:n.unmountOnExit||n.mountOnEnter?l=v4:l=V2,a.state={status:l},a.nextCallback=null,a}t.getDerivedStateFromProps=function(i,a){var o=i.in;return o&&a.status===v4?{status:V2}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(i){var a=null;if(i!==this.props){var o=this.state.status;this.props.in?o!==G2&&o!==$D&&(a=G2):(o===G2||o===$D)&&(a=Tle)}this.updateStatus(!1,a)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var i=this.props.timeout,a,o,s;return a=o=s=i,i!=null&&typeof i!="number"&&(a=i.exit,o=i.enter,s=i.appear!==void 0?i.appear:o),{exit:a,enter:o,appear:s}},r.updateStatus=function(i,a){if(i===void 0&&(i=!1),a!==null)if(this.cancelNextCallback(),a===G2){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:A4.default.findDOMNode(this);o&&Zqe(o)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===V2&&this.setState({status:v4})},r.performEnter=function(i){var a=this,o=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[A4.default.findDOMNode(this),s],u=l[0],c=l[1],f=this.getTimeouts(),d=s?f.appear:f.enter;if(!i&&!o||Cle.disabled){this.safeSetState({status:$D},function(){a.props.onEntered(u)});return}this.props.onEnter(u,c),this.safeSetState({status:G2},function(){a.props.onEntering(u,c),a.onTransitionEnd(d,function(){a.safeSetState({status:$D},function(){a.props.onEntered(u,c)})})})},r.performExit=function(){var i=this,a=this.props.exit,o=this.getTimeouts(),s=this.props.nodeRef?void 0:A4.default.findDOMNode(this);if(!a||Cle.disabled){this.safeSetState({status:V2},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:Tle},function(){i.props.onExiting(s),i.onTransitionEnd(o.exit,function(){i.safeSetState({status:V2},function(){i.props.onExited(s)})})})},r.cancelNextCallback=function(){thi Line truncated
`}else{if(n=="ui")return vi[i];if(n=="lucide")return yqe(i);{let a=n,o=i;if(t.superstate.assets){let s=t.superstate.assets,l=`${a}//${o}`,u=s.getIconSync(l)||s.getIconSync(o)||s.getIconSync(e);if(u)return u;s.getIcon(l).then(c=>{}).catch(()=>{s.getIcon(o).then(c=>{}).catch(()=>{})})}return""}}};var h4=e=>{if(!e.superstate.settings.spacesStickers)return;let t=e.app.workspace.getActiveViewOfType(Wqe.MarkdownView)?.leaf;if(t){let r=e.app.workspace.getActiveFile();if(!r)return;let n=e.superstate.pathsIndex.get(r.path);if(n?.label.sticker&&t.tabHeaderInnerIconEl){let[i,a]=fh(n.label.sticker);if(i=="image"){let o=e.superstate.ui.getUIPath(e.superstate.imagesCache.get(a));o&&(t.tabHeaderInnerIconEl.innerHTML=`<img src="${o}" />`)}else{let o=m4(n.label.sticker,e);t.tabHeaderInnerIconEl.innerHTML=o}}return}else if(t=e.app.workspace.getActiveViewOfType(q2)?.leaf,t){let r=t.view.getState().path,n=e.superstate.pathsIndex.get(r);if(n?.label?.sticker&&t.tabHeaderInnerIconEl){let[i,a]=fh(n.label.sticker);if(i=="image"){let o=e.superstate.ui.getUIPath(e.superstate.imagesCache.get(a));if(!o)return o;t.tabHeaderInnerIconEl.innerHTML=`<img src="${o}" />`}else{let o=m4(n.label.sticker,e);t.tabHeaderInnerIconEl.innerHTML=o}}return}};var jA=ge(Me()),Qqe=ge(cu());function Yqe(){let e=(0,jA.useRef)(new WeakMap),t=(0,jA.useRef)(new WeakMap),[r,n]=(0,jA.useState)(0),[i,a]=(0,jA.useState)(new Set),o=u=>t.current.get(u),s=(0,jA.useCallback)((u,c)=>{let f={render:d=>{e.current.set(u,d),n(p=>p+1)},unmount:()=>{e.current.delete(u),t.current.delete(u),a(d=>{let p=new Set(d);return p.delete(u),p}),n(d=>d+1)}};return e.current.set(u,null),t.current.set(u,f),a(d=>new Set(d).add(u)),n(d=>d+1),f},[]),l=(0,jA.useMemo)(()=>[...i].map(u=>{let c=e.current.get(u);return c?(0,Qqe.createPortal)(c,u):null}).filter(Boolean),[i,r]);return{createRoot:s,portals:l,getRoot:o}}var RD=ge(Me()),Xqe=e=>{let t=E1(jf(x0,{activationConstraint:{distance:10}}),jf(w0,{activationConstraint:{delay:250,tolerance:5}}),jf(mg,{coordinateGetter:VE})),{createRoot:r,portals:n,getRoot:i}=Yqe();(0,RD.useEffect)(()=>{e.ui.createRoot=r,e.ui.getRoot=i,e.ui.manager.eventsDispatch.dispatchEvent("windowReady",null)},[r]);let[a,o]=RD.default.useState(!1);return RD.default.createElement(k1,{sensors:t,onDragStart:()=>{o(!0)},onDragEnd:()=>{o(!1),document.body.style.setProperty("cursor","")},onDragCancel:()=>{o(!1)},collisionDetection:RAe,measuring:{droppable:{strategy:jd.Always}}},RD.default.createElement(oje,{dragActive:a},n))};var Rh=ge(Me());function Kqe(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Yj(e,t)}var g4=ge(Me()),A4=ge(cu());var Cle={disabled:!1};var Jqe=ge(Me()),Dle=Jqe.default.createContext(null);var Zqe=function(t){return t.scrollTop};var v4="unmounted",V2="exited",G2="entering",$D="entered",Tle="exiting",Cv=function(e){Kqe(t,e);function t(n,i){var a;a=e.call(this,n,i)||this;var o=i,s=o&&!o.isMounting?n.enter:n.appear,l;return a.appearStatus=null,n.in?s?(l=V2,a.appearStatus=G2):l=$D:n.unmountOnExit||n.mountOnEnter?l=v4:l=V2,a.state={status:l},a.nextCallback=null,a}t.getDerivedStateFromProps=function(i,a){var o=i.in;return o&&a.status===v4?{status:V2}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(i){var a=null;if(i!==this.props){var o=this.state.status;this.props.in?o!==G2&&o!==$D&&(a=G2):(o===G2||o===$D)&&(a=Tle)}this.updateStatus(!1,a)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var i=this.props.timeout,a,o,s;return a=o=s=i,i!=null&&typeof i!="number"&&(a=i.exit,o=i.enter,s=i.appear!==void 0?i.appear:o),{exit:a,enter:o,appear:s}},r.updateStatus=function(i,a){if(i===void 0&&(i=!1),a!==null)if(this.cancelNextCallback(),a===G2){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:A4.default.findDOMNode(this);o&&Zqe(o)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===V2&&this.setState({status:v4})},r.performEnter=function(i){var a=this,o=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[A4.default.findDOMNode(this),s],u=l[0],c=l[1],f=this.getTimeouts(),d=s?f.appear:f.enter;if(!i&&!o||Cle.disabled){this.safeSetState({status:$D},function(){a.props.onEntered(u)});return}this.props.onEnter(u,c),this.safeSetState({status:G2},function(){a.props.onEntering(u,c),a.onTransitionEnd(d,function(){a.safeSetState({status:$D},function(){a.props.onEntered(u,c)})})})},r.performExit=function(){var i=this,a=this.props.exit,o=this.getTimeouts(),s=this.props.nodeRef?void 0:A4.default.findDOMNode(this);if(!a||Cle.disabled){this.safeSetState({status:V2},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:Tle},function(){i.props.onExiting(s),i.onTransitionEnd(o.exit,function(){i.safeSetState({status:V2},function(){i.props.onExited(s)})})})},r.cancelNextCallback=function(){thi Line truncated
font-family: '${t.name}';
src: url('${this.middleware.resourcePathForPath(t.path)}');
}`};this.cache.set(t.path,n),this.middleware.updateFileCache(t.path,this.cache.get(t.path),r)}cacheTypes(t){return["svg"]}contentTypes(t){return["svg"]}async newFile(t,r,n,i){let a=r.includes(".")?r:`${r}.${n}`,o=t?`${t}/${a}`:a;t&&!await this.middleware.fileExists(t)&&await this.middleware.createFolder(t);let s=typeof i=="string"?i:i instanceof ArrayBuffer?new TextDecoder().decode(i):i?.toString()||"";return await this.middleware.writeTextToFile(o,s),await this.middleware.getFile(o)}async readContent(t,r,n){if(r=="svg")return this.cache.get(t.path).svg}};var i$e=e=>e?{scheme:"obsidian",schema:{id:e.id,name:e.name,type:"command"},path:"obsidian://"+e.id,fields:[],code:e.callback,codeType:"closure"}:null,NG=class{constructor(t){this.plugin=t;this.scheme="obsidian";this.allCommands=()=>Object.values(this.plugin.app.commands.commands).map(t=>i$e(t));this.commandForAction=t=>{if(!t)return null;let r=Ds(t);return i$e(this.plugin.app.commands.commands[r.authority])};this.runCommand=async(t,r)=>{if(!t)return;let i=Ds(t).authority;this.plugin.app.commands.commands[i]?.callback?this.plugin.app.commands.commands[i].callback():this.plugin.app.commands.commands[i].checkCallback&&this.plugin.app.commands.commands[i].checkCallback(!1)}}};var wMt=[{id:"filter",icon:"lucide//filter",description:N.descriptions.onlyContinueIfAConditionIsMet,name:N.descriptions.filter,fields:[]},{id:"formula",icon:"lucide//sigma",description:N.descriptions.useAFormulaToCalculateAResult,name:N.descriptions.formula,fields:[]}],zD=class{constructor(t){this.terminals=[];this.terminalForURI=t=>t?t.scheme==null||t.scheme=="vault"?this.mainTerminal:this.terminals.find(r=>r.scheme==t.scheme):null;this.commandForAction=t=>{if(!t)return null;let r=Ds(t);return r.scheme=="builtin"?this.builtinCommands.find(n=>n.schema.id==r.authority):this.terminalForURI(r)?.commandForAction(t)};this.runCommand=(t,r)=>{if(!t)return;let n=Ds(t);return n.scheme=="builtin"?void 0:this.terminalForURI(n)?.runCommand(t,r)};this.terminals=[t],t.manager=this,this.mainTerminal=t,this.builtinCommands=wMt.map(r=>({schema:{id:r.id,name:r.name,def:{icon:r.icon,description:r.description},type:"builtin"},fields:r.fields}))}static create(t){return new zD(t)}allCommands(){return[...this.builtinCommands.map(t=>({scheme:"builtin",path:"builtin://"+t.schema.id,...t})),...this.terminals.flatMap(t=>t.allCommands())]}};var f$e=ge(Me());var a$e=[{id:"label.sticker",label:N.metadataTypes.sticker,field:"sticker",vType:"text",defaultFilter:"isEmpty",type:"label",description:"Sticker label for the item"},{id:"label.color",label:N.metadataTypes.color,field:"color",vType:"color",defaultFilter:"equals",type:"label",description:"Color label for the item"}],o$e=[{id:"file.name",label:N.metadataTypes.fileName,field:"name",vType:"text",defaultFilter:"contains",type:"file",description:"Name for a space or note"},{id:"file.path",label:N.metadataTypes.path,field:"path",vType:"link",defaultFilter:"contains",type:"file",description:"Path for a space or note"},{id:"file.isFolder",label:N.metadataTypes.isFolder,field:"isFolder",vType:"boolean",defaultFilter:"isTrue",type:"file",description:"Is the item a folder"},{id:"file.parent",label:N.metadataTypes.folder,field:"parent",vType:"space",defaultFilter:"contains",type:"file",description:"Folder the note or space is in"},{id:"file.ctime",label:N.metadataTypes.created,field:"ctime",vType:"date",defaultFilter:"isSameDate",type:"file",description:"Creation date for the note or space"},{id:"file.mtime",label:N.metadataTypes.lastModified,field:"mtime",vType:"date",defaultFilter:"isSameDate",type:"file",description:"Last modified date for the note or space"},{id:"file.extension",label:N.metadataTypes.extension,field:"extension",vType:"text",defaultFilter:"is",type:"file",description:"File extension"},{id:"file.size",label:N.metadataTypes.size,field:"size",vType:"number",defaultFilter:"lessThan",type:"file",description:"File size"}],s$e=[{id:"path.tags",label:N.metadataTypes.tags,field:"tags",vType:"tags-multi",defaultFilter:"contains",type:"path",description:"Tags for the note or space"},{id:"path.inlinks",label:N.metadataTypes.inlinks,field:"inlinks",vType:"link-multi",defaultFilter:"contains",type:"path",description:"Links to the note or space"},{id:"path.outlinks",label:N.metadataTypes.outlinks,field:"outlinks",vType:"link-multi",defaultFilter:"contains",type:"path",description:"Links from the note or space"}];var MG=e=>({file:{name:N.metadataTypes.fileMetadata,properties:o$e},path:{name:N.metadataTypes.outlinks,properties:s$e},label:{name:N.metadataTypes.label,properties:a$e},frontmatter:{name:N.metadataTypes.frontmatter,properties:e.spaceManager.keysForCacheType("frontmatter").map(t=>({id:"frontmatter."+t,label:t,field:t,vType:"any",defaultFilter:"contains",type:"frontmatter",description:"Frontmatter property"}))},context:{name:N.metadataTypes.contexts,properties:[...e.contextsIndex.values()].flatMap(t=>t?.contextTable?.cols.filter(r=>r.primary!="true").m Line truncated
@@ -993,9 +993,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
schema: newItemButton.props.schema,
properties: newItemButton.props.group ? {[newItemButton.props.group]: newItemButton.props.groupValue} : {},
}
}`},styles:{padding:"'8px'",width:"'100%'",sem:"'card'",cursor:"'pointer'"},interactions:{onClick:"openNewModal"}},children:[at({..._r,children:[at(Co,{value:"'ui//plus'"},{width:"'16px'",height:"'16px'","--icon-size":"'16px'"}),at(Yn,{value:"'New Item'"},{"--font-text-color":"'var(--mk-ui-text)'","--font-text-size":"'14px'"})]},{},{layout:"'row'",gap:"'8px'",alignItems:"'center'"})]},Oze={def:{id:"listGroup",type:"listGroup"},node:{type:"group",props:{_groupField:"",_groupValue:"",_readMode:"false",showNew:"true"},types:{_groupField:"object",_groupValue:"text",_readMode:"boolean",showNew:"boolean"},propsValue:{showNew:{alias:N.labels.showNewItemButton}},styles:{sem:"'contextGroup'"},id:"$root",schemaId:"$root",name:N.labels.rows,rank:0},id:"$root",children:[at(Ip,{field:"$root.props['_groupField']",value:"$root.props['_groupValue']"}),at(Uc,{},{layout:"'column'",alignItems:"'stretch'"}),Sd(Xle,{space:"$contexts.$context['_path']",schema:"$contexts.$context['_schema']",key:"$contexts.$context['_key']",group:"$root.props['_groupField']?.name",groupValue:"$root.props['_groupValue']"},{hidden:"!$root.props['showNew'] || $root.props['_readMode']"})]},Fze={def:{id:"columnGroup",type:"listGroup"},node:{type:"group",props:{_groupField:"",_groupValue:"",_readMode:"false",showNew:"true"},types:{_groupField:"object",_groupValue:"text",_readMode:"boolean",showNew:"boolean"},propsValue:{showNew:{alias:N.labels.showNewItemButton}},styles:{layout:"'column'",width:"'262px'",background:"'var(--mk-ui-background-variant)'",borderRadius:"'8px'",gap:"'8px'",padding:"'6px'"},id:"$root",schemaId:"$root",name:N.labels.columns,rank:0},id:"$root",children:[at(Ip,{field:"$root.props['_groupField']",value:"$root.props['_groupValue']"}),at(Uc,{},{gap:"'8px'",layout:"'column'",width:"'100%'",alignItems:"'stretch'"}),Sd(Kle,{space:"$contexts.$context['_path']",schema:"$contexts.$context['_schema']",group:"$root.props['_groupField']?.name",groupValue:"$root.props['_groupValue']"},{hidden:"!$root.props['showNew'] || $root.props['_readMode']"})]},jze={def:{id:"rowGroup",type:"listGroup"},node:{type:"group",props:{_groupField:"",_groupValue:""},types:{_groupField:"object",_groupValue:"text"},styles:{layout:"'column'",padding:"'6px'",gap:"'8px'",sem:"'contextGroup'"},id:"$root",schemaId:"$root",name:"Catalog Group",rank:0},id:"$root",children:[at(Ip,{field:"$root.props['_groupField']",value:"$root.props['_groupValue']"}),at(Uc,{},{gap:"'8px'",layout:"'row'",width:"'100%'",overflow:"'scroll'"})]},Pze={def:{id:"gridGroup",type:"listGroup"},node:{type:"group",props:{_groupField:"",_groupValue:""},types:{_groupField:"object",_groupValue:"text"},styles:{layout:"'column'",padding:"'6px'",gap:"'8px'",sem:"'contextGroup'"},id:"$root",schemaId:"$root",name:"Grid Group",rank:0},id:"$root",children:[at(Ip,{field:"$root.props['_groupField']",value:"$root.props['_groupValue']"}),at(Uc,{},{gap:"'8px'",layout:"'grid'",width:"'100%'","--mk-grid-columns":"'auto-fill'","--mk-grid-width":"'250px'"})]},_ze={def:{id:"masonryGroup",type:"listGroup"},node:{type:"group",props:{},id:"$root",schemaId:"$root",name:N.labels.masonry,rank:0,styles:{layout:"'column'",sem:"'contextGroup'"}},id:"$root",children:[at(Ip,{field:"$root.props['_groupField']",value:"$root.props['_groupValue']"}),at(Uc,{},{padding:"'8px'",layout:"'masonry'"})]},Ize={def:{id:"listView",type:"listView"},node:{type:"group",props:{},styles:{sem:"'contextView'"},id:"$root",schemaId:"$root",name:"List View",rank:0},id:"$root",children:[Uc]},Bze={def:{id:"columnView",type:"listView"},node:{type:"group",props:{},id:"$root",styles:{sem:"'contextView'"},schemaId:"$root",name:"Column View",rank:0},id:"$root",children:[at(Uc,{},{padding:"'8px'",layout:"'row'",gap:"'8px'"})]};var zPn={id:"pageHeader",def:{id:"pageHeader",icon:"ui//layout-header",name:N.labels.header,description:N.labels.pageHeaderContainingBannerAndTitle},node:{icon:"ui//layout-header",schemaId:"pageHeader",parentId:"",name:N.labels.header,rank:0,id:"pageHeader",type:"group",styles:{width:'"100%"',layout:'"column"',marginBottom:"'16px'"},props:{},types:{}},children:[{...zc,node:{...zc.node,id:"banner",name:N.labels.banner,props:{value:"$contexts.$space.cover"},styles:{width:'"100%"',maxWidth:'"100%"',height:'"200px"',position:'"relative"',marginLeft:"0",marginRight:"0",marginBottom:'"16px"',hidden:"!$contexts.$space.cover.length > 0",objectFit:'"cover"'}}},{..._r,node:{..._r.node,id:"spacer",name:"Banner Spacer",styles:{height:'"16px"',minHeight:'"16px"',hidden:"$contexts.$space.cover.length > 0"}}},{...Yn,node:{...Yn.node,id:"title",name:N.labels.title,props:{value:"$contexts.$space.title"},styles:{sem:'"h1"',marginTop:'"0px"',"--font-text-size":'"2rem"',"--font-text-weight":'"bold"',lineHeight:'"1.2"',marginLeft:'"var(--file-margins)"',marginRight:'"var(--file-margins)"',maxWidth:'"calc(100% - var(--file-margins) * 2)"'}}}]};var iW=class{constructor(t,r){this.superstate=r;this.scheme="spaces";this.apiCommands={frame:{update:{schema:{i Line truncated
}`},styles:{padding:"'8px'",width:"'100%'",sem:"'card'",cursor:"'pointer'"},interactions:{onClick:"openNewModal"}},children:[at({..._r,children:[at(Co,{value:"'ui//plus'"},{width:"'16px'",height:"'16px'","--icon-size":"'16px'"}),at(Yn,{value:"'New Item'"},{"--font-text-color":"'var(--mk-ui-text)'","--font-text-size":"'14px'"})]},{},{layout:"'row'",gap:"'8px'",alignItems:"'center'"})]},Oze={def:{id:"listGroup",type:"listGroup"},node:{type:"group",props:{_groupField:"",_groupValue:"",_readMode:"false",showNew:"true"},types:{_groupField:"object",_groupValue:"text",_readMode:"boolean",showNew:"boolean"},propsValue:{showNew:{alias:N.labels.showNewItemButton}},styles:{sem:"'contextGroup'"},id:"$root",schemaId:"$root",name:N.labels.rows,rank:0},id:"$root",children:[at(Ip,{field:"$root.props['_groupField']",value:"$root.props['_groupValue']"}),at(Uc,{},{layout:"'column'",alignItems:"'stretch'"}),Sd(Xle,{space:"$contexts.$context['_path']",schema:"$contexts.$context['_schema']",key:"$contexts.$context['_key']",group:"$root.props['_groupField']?.name",groupValue:"$root.props['_groupValue']"},{hidden:"!$root.props['showNew'] || $root.props['_readMode']"})]},Fze={def:{id:"columnGroup",type:"listGroup"},node:{type:"group",props:{_groupField:"",_groupValue:"",_readMode:"false",showNew:"true"},types:{_groupField:"object",_groupValue:"text",_readMode:"boolean",showNew:"boolean"},propsValue:{showNew:{alias:N.labels.showNewItemButton}},styles:{layout:"'column'",width:"'262px'",background:"'var(--mk-ui-background-variant)'",borderRadius:"'8px'",gap:"'8px'",padding:"'6px'"},id:"$root",schemaId:"$root",name:N.labels.columns,rank:0},id:"$root",children:[at(Ip,{field:"$root.props['_groupField']",value:"$root.props['_groupValue']"}),at(Uc,{},{gap:"'8px'",layout:"'column'",width:"'100%'",alignItems:"'stretch'"}),Sd(Kle,{space:"$contexts.$context['_path']",schema:"$contexts.$context['_schema']",group:"$root.props['_groupField']?.name",groupValue:"$root.props['_groupValue']"},{hidden:"!$root.props['showNew'] || $root.props['_readMode']"})]},jze={def:{id:"rowGroup",type:"listGroup"},node:{type:"group",props:{_groupField:"",_groupValue:""},types:{_groupField:"object",_groupValue:"text"},styles:{layout:"'column'",padding:"'6px'",gap:"'8px'",sem:"'contextGroup'"},id:"$root",schemaId:"$root",name:"Catalog Group",rank:0},id:"$root",children:[at(Ip,{field:"$root.props['_groupField']",value:"$root.props['_groupValue']"}),at(Uc,{},{gap:"'8px'",layout:"'row'",width:"'100%'",overflow:"'scroll'"})]},Pze={def:{id:"gridGroup",type:"listGroup"},node:{type:"group",props:{_groupField:"",_groupValue:""},types:{_groupField:"object",_groupValue:"text"},styles:{layout:"'column'",padding:"'6px'",gap:"'8px'",sem:"'contextGroup'"},id:"$root",schemaId:"$root",name:"Grid Group",rank:0},id:"$root",children:[at(Ip,{field:"$root.props['_groupField']",value:"$root.props['_groupValue']"}),at(Uc,{},{gap:"'8px'",layout:"'grid'",width:"'100%'","--mk-grid-columns":"'auto-fill'","--mk-grid-width":"'250px'"})]},_ze={def:{id:"masonryGroup",type:"listGroup"},node:{type:"group",props:{},id:"$root",schemaId:"$root",name:N.labels.masonry,rank:0,styles:{layout:"'column'",sem:"'contextGroup'"}},id:"$root",children:[at(Ip,{field:"$root.props['_groupField']",value:"$root.props['_groupValue']"}),at(Uc,{},{padding:"'8px'",layout:"'masonry'"})]},Ize={def:{id:"listView",type:"listView"},node:{type:"group",props:{},styles:{sem:"'contextView'"},id:"$root",schemaId:"$root",name:"List View",rank:0},id:"$root",children:[Uc]},Bze={def:{id:"columnView",type:"listView"},node:{type:"group",props:{},id:"$root",styles:{sem:"'contextView'"},schemaId:"$root",name:"Column View",rank:0},id:"$root",children:[at(Uc,{},{padding:"'8px'",layout:"'row'",gap:"'8px'"})]};var zPn={id:"pageHeader",def:{id:"pageHeader",icon:"ui//layout-header",name:N.labels.header,description:N.labels.pageHeaderContainingBannerAndTitle},node:{icon:"ui//layout-header",schemaId:"pageHeader",parentId:"",name:N.labels.header,rank:0,id:"pageHeader",type:"group",styles:{width:'"100%"',layout:'"column"',marginBottom:"'16px'"},props:{},types:{}},children:[{...zc,node:{...zc.node,id:"banner",name:N.labels.banner,props:{value:"$contexts.$space.cover"},styles:{width:'"100%"',maxWidth:'"100%"',height:'"200px"',position:'"relative"',marginLeft:"0",marginRight:"0",marginBottom:'"16px"',hidden:"!$contexts.$space.cover.length > 0",objectFit:'"cover"'}}},{..._r,node:{..._r.node,id:"spacer",name:"Banner Spacer",styles:{height:'"16px"',minHeight:'"16px"',hidden:"$contexts.$space.cover.length > 0"}}},{...Yn,node:{...Yn.node,id:"title",name:N.labels.title,props:{value:"$contexts.$space.title"},styles:{sem:'"h1"',marginTop:'"0px"',"--font-text-size":'"2rem"',"--font-text-weight":'"bold"',lineHeight:'"1.2"',marginLeft:'"var(--file-margins)"',marginRight:'"var(--file-margins)"',maxWidth:'"calc(100% - var(--file-margins) * 2)"'}}}]};var iW=class{constructor(t,r){this.superstate=r;this.scheme="spaces";this.apiCommands={frame:{update:{schema:{i Line truncated
/* [wrapped with \`+d+\`] */
\`)}function K7(l){return Nr(l)||Bo(l)||!!(fS&&l&&l[fS])}function fi(l,d){var D=typeof l;return d=d??R,!!d&&(D=="number"||D!="symbol"&&Dy.test(l))&&l>-1&&l%1==0&&l<d}function Dn(l,d,D){if(!bt(D))return!1;var O=typeof d;return(O=="number"?Tn(D)&&fi(d,D.length):O=="string"&&d in D)?Ca(D[d],l):!1}function bx(l,d){if(Nr(l))return!1;var D=typeof l;return D=="number"||D=="symbol"||D=="boolean"||l==null||Yn(l)?!0:zu.test(l)||!Bi.test(l)||d!=null&&l in ot(d)}function X7(l){var d=typeof l;return d=="string"||d=="number"||d=="symbol"||d=="boolean"?l!=="__proto__":l===null}function wx(l){var d=Ec(l),D=W[d];if(typeof D!="function"||!(d in kr.prototype))return!1;if(l===D)return!0;var O=gx(D);return!!O&&l===O[0]}function J7(l){return!!iS&&iS in l}var Q7=tc?ci:Lx;function rf(l){var d=l&&l.constructor,D=typeof d=="function"&&d.prototype||hs;return l===D}function iN(l){return l===l&&!bt(l)}function oN(l,d){return function(D){return D==null?!1:D[l]===d&&(d!==e||l in ot(D))}}function j7(l){var d=_c(l,function(O){return D.size===f&&D.clear(),O}),D=d.cache;return d}function ek(l,d){var D=l[1],O=d[1],L=D|O,$=L<(g|v|N),Q=O==N&&D==x||O==N&&D==w&&l[7].length<=d[8]||O==(N|w)&&d[7].length<=d[8]&&D==x;if(!($||Q))return l;O&g&&(l[2]=d[2],L|=D&g?0:y);var te=d[3];if(te){var ce=l[3];l[3]=ce?WS(ce,te,d[4]):te,l[4]=ce?qi(l[3],u):d[4]}return te=d[5],te&&(ce=l[5],l[5]=ce?YS(ce,te,d[6]):te,l[6]=ce?qi(l[5],u):d[6]),te=d[7],te&&(l[7]=te),O&N&&(l[8]=l[8]==null?d[8]:an(l[8],d[8])),l[9]==null&&(l[9]=d[9]),l[0]=d[0],l[1]=L,l}function rk(l){var d=[];if(l!=null)for(var D in ot(l))d.push(D);return d}function tk(l){return ac.call(l)}function sN(l,d,D){return d=kt(d===e?l.length-1:d,0),function(){for(var O=arguments,L=-1,$=kt(O.length-d,0),Q=xe($);++L<$;)Q[L]=O[d+L];L=-1;for(var te=xe(d+1);++L<d;)te[L]=O[L];return te[d]=D(Q),Un(l,this,te)}}function uN(l,d){return d.length<2?l:Fo(l,fa(d,0,-1))}function nk(l,d){for(var D=l.length,O=an(d.length,D),L=Cn(l);O--;){var $=d[O];l[O]=fi($,D)?L[$]:e}return l}function Dx(l,d){if(!(d==="constructor"&&typeof l[d]=="function")&&d!="__proto__")return l[d]}var fN=lN(_S),tf=y6||function(l,d){return $t.setTimeout(l,d)},Sx=lN(E7);function cN(l,d,D){var O=d+"";return Sx(l,Z7(O,ak($7(O),D)))}function lN(l){var d=0,D=0;return function(){var O=D6(),L=B-(O-D);if(D=O,L>0){if(++d>=M)return arguments[0]}else d=0;return l.apply(e,arguments)}}function Cc(l,d){var D=-1,O=l.length,L=O-1;for(d=d===e?O:d;++D<d;){var $=ix(D,L),Q=l[$];l[$]=l[D],l[D]=Q}return l.length=d,l}var mN=j7(function(l){var d=[];return l.charCodeAt(0)===46&&d.push(""),l.replace(Ii,function(D,O,L,$){d.push(L?$.replace(vy,"$1"):O||D)}),d});function za(l){if(typeof l=="string"||Yn(l))return l;var d=l+"";return d=="0"&&1/l==-q?"-0":d}function _o(l){if(l!=null){try{return nc.call(l)}catch{}try{return l+""}catch{}}return""}function ak(l,d){return ia(ee,function(D){var O="_."+D[0];d&D[1]&&!Qf(l,O)&&l.push(O)}),l.sort()}function pN(l){if(l instanceof kr)return l.clone();var d=new sa(l.__wrapped__,l.__chain__);return d.__actions__=Cn(l.__actions__),d.__index__=l.__index__,d.__values__=l.__values__,d}function ik(l,d,D){(D?Dn(l,d,D):d===e)?d=1:d=kt(Er(d),0);var O=l==null?0:l.length;if(!O||d<1)return[];for(var L=0,$=0,Q=xe(cc(O/d));L<O;)Q[$++]=fa(l,L,L+=d);return Q}function ok(l){for(var d=-1,D=l==null?0:l.length,O=0,L=[];++d<D;){var $=l[d];$&&(L[O++]=$)}return L}function sk(){var l=arguments.length;if(!l)return[];for(var d=xe(l-1),D=arguments[0],O=l;O--;)d[O-1]=arguments[O];return Li(Nr(D)?Cn(D):[D],Kt(d,1))}var uk=Fr(function(l,d){return Et(l)?Xu(l,Kt(d,1,Et,!0)):[]}),fk=Fr(function(l,d){var D=ca(d);return Et(D)&&(D=e),Et(l)?Xu(l,Kt(d,1,Et,!0),cr(D,2)):[]}),ck=Fr(function(l,d){var D=ca(d);return Et(D)&&(D=e),Et(l)?Xu(l,Kt(d,1,Et,!0),e,D):[]});function lk(l,d,D){var O=l==null?0:l.length;return O?(d=D||d===e?1:Er(d),fa(l,d<0?0:d,O)):[]}function mk(l,d,D){var O=l==null?0:l.length;return O?(d=D||d===e?1:Er(d),d=O-d,fa(l,0,d<0?0:d)):[]}function pk(l,d){return l&&l.length?bc(l,cr(d,3),!0,!0):[]}function dk(l,d){return l&&l.length?bc(l,cr(d,3),!0):[]}function hk(l,d,D,O){var L=l==null?0:l.length;return L?(D&&typeof D!="number"&&Dn(l,d,D)&&(D=0,O=L),s7(l,d,D,O)):[]}function dN(l,d,D){var O=l==null?0:l.length;if(!O)return-1;var L=D==null?0:Er(D);return L<0&&(L=kt(O+L,0)),jf(l,cr(d,3),L)}function hN(l,d,D){var O=l==null?0:l.length;if(!O)return-1;var L=O-1;return D!==e&&(L=Er(D),L=D<0?kt(O+L,0):an(L,O-1)),jf(l,cr(d,3),L,!0)}function vN(l){var d=l==null?0:l.length;return d?Kt(l,1):[]}function vk(l){var d=l==null?0:l.length;return d?Kt(l,q):[]}function gk(l,d){var D=l==null?0:l.length;return D?(d=d===e?1:Er(d),Kt(l,d)):[]}function yk(l){for(var d=-1,D=l==null?0:l.length,O={};++d<D;){var L=l[d];O[L[0]]=L[1]}return O}function gN(l){return l&&l.length?l[0]:e}function xk(l,d,D){var O=l==null?0:l.length;if(!O)return-1;var L=D==null?0:Er(D);return L<0&&(L=kt(O+L,0)),ms(l,d,L)}function bk(l){var d=l==null?0:l.length;return d?fa(l,0,-1):[]}var wk=Fr(function(l){var d=vt(l,cx);return d.length&&d[0 Line truncated
\`)}function K7(l){return Nr(l)||Bo(l)||!!(fS&&l&&l[fS])}function fi(l,d){var D=typeof l;return d=d??P,!!d&&(D=="number"||D!="symbol"&&Dy.test(l))&&l>-1&&l%1==0&&l<d}function Dn(l,d,D){if(!bt(D))return!1;var O=typeof d;return(O=="number"?Tn(D)&&fi(d,D.length):O=="string"&&d in D)?Ca(D[d],l):!1}function bx(l,d){if(Nr(l))return!1;var D=typeof l;return D=="number"||D=="symbol"||D=="boolean"||l==null||Yn(l)?!0:zu.test(l)||!Bi.test(l)||d!=null&&l in ot(d)}function X7(l){var d=typeof l;return d=="string"||d=="number"||d=="symbol"||d=="boolean"?l!=="__proto__":l===null}function wx(l){var d=Ec(l),D=W[d];if(typeof D!="function"||!(d in kr.prototype))return!1;if(l===D)return!0;var O=gx(D);return!!O&&l===O[0]}function J7(l){return!!iS&&iS in l}var Q7=tc?ci:Lx;function rf(l){var d=l&&l.constructor,D=typeof d=="function"&&d.prototype||hs;return l===D}function iN(l){return l===l&&!bt(l)}function oN(l,d){return function(D){return D==null?!1:D[l]===d&&(d!==e||l in ot(D))}}function j7(l){var d=_c(l,function(O){return D.size===f&&D.clear(),O}),D=d.cache;return d}function ek(l,d){var D=l[1],O=d[1],L=D|O,$=L<(g|v|N),j=O==N&&D==x||O==N&&D==w&&l[7].length<=d[8]||O==(N|w)&&d[7].length<=d[8]&&D==x;if(!($||j))return l;O&g&&(l[2]=d[2],L|=D&g?0:y);var te=d[3];if(te){var ce=l[3];l[3]=ce?WS(ce,te,d[4]):te,l[4]=ce?qi(l[3],u):d[4]}return te=d[5],te&&(ce=l[5],l[5]=ce?YS(ce,te,d[6]):te,l[6]=ce?qi(l[5],u):d[6]),te=d[7],te&&(l[7]=te),O&N&&(l[8]=l[8]==null?d[8]:an(l[8],d[8])),l[9]==null&&(l[9]=d[9]),l[0]=d[0],l[1]=L,l}function rk(l){var d=[];if(l!=null)for(var D in ot(l))d.push(D);return d}function tk(l){return ac.call(l)}function sN(l,d,D){return d=kt(d===e?l.length-1:d,0),function(){for(var O=arguments,L=-1,$=kt(O.length-d,0),j=xe($);++L<$;)j[L]=O[d+L];L=-1;for(var te=xe(d+1);++L<d;)te[L]=O[L];return te[d]=D(j),Un(l,this,te)}}function uN(l,d){return d.length<2?l:Fo(l,fa(d,0,-1))}function nk(l,d){for(var D=l.length,O=an(d.length,D),L=Cn(l);O--;){var $=d[O];l[O]=fi($,D)?L[$]:e}return l}function Dx(l,d){if(!(d==="constructor"&&typeof l[d]=="function")&&d!="__proto__")return l[d]}var fN=lN(_S),tf=y6||function(l,d){return $t.setTimeout(l,d)},Sx=lN(E7);function cN(l,d,D){var O=d+"";return Sx(l,Z7(O,ak($7(O),D)))}function lN(l){var d=0,D=0;return function(){var O=D6(),L=B-(O-D);if(D=O,L>0){if(++d>=M)return arguments[0]}else d=0;return l.apply(e,arguments)}}function Cc(l,d){var D=-1,O=l.length,L=O-1;for(d=d===e?O:d;++D<d;){var $=ix(D,L),j=l[$];l[$]=l[D],l[D]=j}return l.length=d,l}var mN=j7(function(l){var d=[];return l.charCodeAt(0)===46&&d.push(""),l.replace(Ii,function(D,O,L,$){d.push(L?$.replace(vy,"$1"):O||D)}),d});function za(l){if(typeof l=="string"||Yn(l))return l;var d=l+"";return d=="0"&&1/l==-q?"-0":d}function _o(l){if(l!=null){try{return nc.call(l)}catch{}try{return l+""}catch{}}return""}function ak(l,d){return ia(Q,function(D){var O="_."+D[0];d&D[1]&&!Qf(l,O)&&l.push(O)}),l.sort()}function pN(l){if(l instanceof kr)return l.clone();var d=new sa(l.__wrapped__,l.__chain__);return d.__actions__=Cn(l.__actions__),d.__index__=l.__index__,d.__values__=l.__values__,d}function ik(l,d,D){(D?Dn(l,d,D):d===e)?d=1:d=kt(Er(d),0);var O=l==null?0:l.length;if(!O||d<1)return[];for(var L=0,$=0,j=xe(cc(O/d));L<O;)j[$++]=fa(l,L,L+=d);return j}function ok(l){for(var d=-1,D=l==null?0:l.length,O=0,L=[];++d<D;){var $=l[d];$&&(L[O++]=$)}return L}function sk(){var l=arguments.length;if(!l)return[];for(var d=xe(l-1),D=arguments[0],O=l;O--;)d[O-1]=arguments[O];return Li(Nr(D)?Cn(D):[D],Kt(d,1))}var uk=Fr(function(l,d){return Et(l)?Xu(l,Kt(d,1,Et,!0)):[]}),fk=Fr(function(l,d){var D=ca(d);return Et(D)&&(D=e),Et(l)?Xu(l,Kt(d,1,Et,!0),cr(D,2)):[]}),ck=Fr(function(l,d){var D=ca(d);return Et(D)&&(D=e),Et(l)?Xu(l,Kt(d,1,Et,!0),e,D):[]});function lk(l,d,D){var O=l==null?0:l.length;return O?(d=D||d===e?1:Er(d),fa(l,d<0?0:d,O)):[]}function mk(l,d,D){var O=l==null?0:l.length;return O?(d=D||d===e?1:Er(d),d=O-d,fa(l,0,d<0?0:d)):[]}function pk(l,d){return l&&l.length?bc(l,cr(d,3),!0,!0):[]}function dk(l,d){return l&&l.length?bc(l,cr(d,3),!0):[]}function hk(l,d,D,O){var L=l==null?0:l.length;return L?(D&&typeof D!="number"&&Dn(l,d,D)&&(D=0,O=L),s7(l,d,D,O)):[]}function dN(l,d,D){var O=l==null?0:l.length;if(!O)return-1;var L=D==null?0:Er(D);return L<0&&(L=kt(O+L,0)),jf(l,cr(d,3),L)}function hN(l,d,D){var O=l==null?0:l.length;if(!O)return-1;var L=O-1;return D!==e&&(L=Er(D),L=D<0?kt(O+L,0):an(L,O-1)),jf(l,cr(d,3),L,!0)}function vN(l){var d=l==null?0:l.length;return d?Kt(l,1):[]}function vk(l){var d=l==null?0:l.length;return d?Kt(l,q):[]}function gk(l,d){var D=l==null?0:l.length;return D?(d=d===e?1:Er(d),Kt(l,d)):[]}function yk(l){for(var d=-1,D=l==null?0:l.length,O={};++d<D;){var L=l[d];O[L[0]]=L[1]}return O}function gN(l){return l&&l.length?l[0]:e}function xk(l,d,D){var O=l==null?0:l.length;if(!O)return-1;var L=D==null?0:Er(D);return L<0&&(L=kt(O+L,0)),ms(l,d,L)}function bk(l){var d=l==null?0:l.length;return d?fa(l,0,-1):[]}var wk=Fr(function(l){var d=vt(l,cx);return d.length&&d[0] Line truncated
\`;l.replace(Ve,function(hr,Ir,zr,Hn,Sn,$n){return zr||(zr=Hn),Re+=l.slice(Oe,$n).replace(Ny,Q8),Ir&&(te=!0,Re+=\`' +
__e(\`+Ir+\`) +
'\`),Sn&&(ce=!0,Re+=\`';
@@ -1012,7 +1012,7 @@ __p += '\`),zr&&(Re+=\`' +
function print() { __p += __j.call(arguments, '') }
\`:\`;
\`)+Re+\`return __p
}\`;var Cr=$N(function(){return Jr($,rr+"return "+Re).apply(e,Q)});if(Cr.source=Re,Cx(Cr))throw Cr;return Cr}function Nq(l){return et(l).toLowerCase()}function Aq(l){return et(l).toUpperCase()}function Eq(l,d,D){if(l=et(l),l&&(D||d===e))return eS(l);if(!l||!(d=Wn(d)))return l;var O=Ea(l),L=Ea(d),$=rS(O,L),Q=tS(O,L)+1;return $i(O,$,Q).join("")}function Mq(l,d,D){if(l=et(l),l&&(D||d===e))return l.slice(0,aS(l)+1);if(!l||!(d=Wn(d)))return l;var O=Ea(l),L=tS(O,Ea(d))+1;return $i(O,0,L).join("")}function Cq(l,d,D){if(l=et(l),l&&(D||d===e))return l.replace(Wu,"");if(!l||!(d=Wn(d)))return l;var O=Ea(l),L=rS(O,Ea(d));return $i(O,L).join("")}function Tq(l,d){var D=C,O=E;if(bt(d)){var L="separator"in d?d.separator:L;D="length"in d?Er(d.length):D,O="omission"in d?Wn(d.omission):O}l=et(l);var $=l.length;if(ps(l)){var Q=Ea(l);$=Q.length}if(D>=$)return l;var te=D-ds(O);if(te<1)return O;var ce=Q?$i(Q,0,te).join(""):l.slice(0,te);if(L===e)return ce+O;if(Q&&(te+=ce.length-te),Tx(L)){if(l.slice(te).search(L)){var Oe,_e=ce;for(L.global||(L=$y(L.source,et(Gf.exec(L))+"g")),L.lastIndex=0;Oe=L.exec(_e);)var Re=Oe.index;ce=ce.slice(0,Re===e?te:Re)}}else if(l.indexOf(Wn(L),te)!=te){var Ve=ce.lastIndexOf(L);Ve>-1&&(ce=ce.slice(0,Ve))}return ce+O}function Fq(l){return l=et(l),l&&Xe.test(l)?l.replace(ie,i6):l}var Oq=bs(function(l,d,D){return l+(D?" ":"")+d.toUpperCase()}),_x=GS("toUpperCase");function HN(l,d,D){return l=et(l),d=D?e:d,d===e?e6(l)?u6(l):$8(l):l.match(d)||[]}var $N=Fr(function(l,d){try{return Un(l,e,d)}catch(D){return Cx(D)?D:new Sr(D)}}),_q=ui(function(l,d){return ia(d,function(D){D=za(D),oi(l,D,Ex(l[D],l))}),l});function Bq(l){var d=l==null?0:l.length,D=cr();return l=d?vt(l,function(O){if(typeof O[1]!="function")throw new oa(a);return[D(O[0]),O[1]]}):[],Fr(function(O){for(var L=-1;++L<d;){var $=l[L];if(Un($[0],this,O))return Un($[1],this,O)}})}function Iq(l){return i7(ua(l,s))}function Bx(l){return function(){return l}}function Pq(l,d){return l==null||l!==l?d:l}var Rq=ZS(),kq=ZS(!0);function On(l){return l}function Ix(l){return NS(typeof l=="function"?l:ua(l,s))}function Lq(l){return ES(ua(l,s))}function qq(l,d){return MS(l,ua(d,s))}var Uq=Fr(function(l,d){return function(D){return Ju(D,l,d)}}),zq=Fr(function(l,d){return function(D){return Ju(l,D,d)}});function Px(l,d,D){var O=Gt(d),L=gc(d,O);D==null&&!(bt(d)&&(L.length||!O.length))&&(D=d,d=l,l=this,L=gc(d,Gt(d)));var $=!(bt(D)&&"chain"in D)||!!D.chain,Q=ci(l);return ia(L,function(te){var ce=d[te];l[te]=ce,Q&&(l.prototype[te]=function(){var Oe=this.__chain__;if($||Oe){var _e=l(this.__wrapped__),Re=_e.__actions__=Cn(this.__actions__);return Re.push({func:ce,args:arguments,thisArg:l}),_e.__chain__=Oe,_e}return ce.apply(l,Li([this.value()],arguments))})}),l}function Wq(){return $t._===this&&($t._=d6),this}function Rx(){}function Yq(l){return l=Er(l),Fr(function(d){return CS(d,l)})}var Hq=px(vt),$q=px(KD),Gq=px(Ly);function GN(l){return bx(l)?qy(za(l)):D7(l)}function Vq(l){return function(d){return l==null?e:Fo(l,d)}}var Zq=XS(),Kq=XS(!0);function kx(){return[]}function Lx(){return!1}function Xq(){return{}}function Jq(){return""}function Qq(){return!0}function jq(l,d){if(l=Er(l),l<1||l>R)return[];var D=k,O=an(l,k);d=cr(d),l-=k;for(var L=Wy(O,d);++D<l;)d(D);return L}function eU(l){return Nr(l)?vt(l,za):Yn(l)?[l]:Cn(mN(et(l)))}function rU(l){var d=++m6;return et(l)+d}var tU=Sc(function(l,d){return l+d},0),nU=dx("ceil"),aU=Sc(function(l,d){return l/d},1),iU=dx("floor");function oU(l){return l&&l.length?vc(l,On,jy):e}function sU(l,d){return l&&l.length?vc(l,cr(d,2),jy):e}function uU(l){return QD(l,On)}function fU(l,d){return QD(l,cr(d,2))}function cU(l){return l&&l.length?vc(l,On,nx):e}function lU(l,d){return l&&l.length?vc(l,cr(d,2),nx):e}var mU=Sc(function(l,d){return l*d},1),pU=dx("round"),dU=Sc(function(l,d){return l-d},0);function hU(l){return l&&l.length?zy(l,On):0}function vU(l,d){return l&&l.length?zy(l,cr(d,2)):0}return W.after=LL,W.ary=SN,W.assign=A9,W.assignIn=kN,W.assignInWith=Rc,W.assignWith=E9,W.at=M9,W.before=NN,W.bind=Ex,W.bindAll=_q,W.bindKey=AN,W.castArray=XL,W.chain=bN,W.chunk=ik,W.compact=ok,W.concat=sk,W.cond=Bq,W.conforms=Iq,W.constant=Bx,W.countBy=hL,W.create=C9,W.curry=EN,W.curryRight=MN,W.debounce=CN,W.defaults=T9,W.defaultsDeep=F9,W.defer=qL,W.delay=UL,W.difference=uk,W.differenceBy=fk,W.differenceWith=ck,W.drop=lk,W.dropRight=mk,W.dropRightWhile=pk,W.dropWhile=dk,W.fill=hk,W.filter=gL,W.flatMap=bL,W.flatMapDeep=wL,W.flatMapDepth=DL,W.flatten=vN,W.flattenDeep=vk,W.flattenDepth=gk,W.flip=zL,W.flow=Rq,W.flowRight=kq,W.fromPairs=yk,W.functions=k9,W.functionsIn=L9,W.groupBy=SL,W.initial=bk,W.intersection=wk,W.intersectionBy=Dk,W.intersectionWith=Sk,W.invert=U9,W.invertBy=z9,W.invokeMap=AL,W.iteratee=Ix,W.keyBy=EL,W.keys=Gt,W.keysIn=Fn,W.map=Fc,W.mapKeys=Y9,W.mapValues=H9,W.matches=Lq,W.matchesProperty=qq,W.memoize=_c,W.merge=$9,W.mergeWith=LN,W.method=Uq,W.methodOf=zq,W.mixin=Px,W.negate=Bc,W.nthArg=Yq,W.omit=G9,W.omitBy=V9,W.once=WL,W.orderBy=ML,W.over Line truncated
}\`;var Cr=$N(function(){return Jr($,rr+"return "+Re).apply(e,j)});if(Cr.source=Re,Cx(Cr))throw Cr;return Cr}function Nq(l){return et(l).toLowerCase()}function Aq(l){return et(l).toUpperCase()}function Eq(l,d,D){if(l=et(l),l&&(D||d===e))return eS(l);if(!l||!(d=Wn(d)))return l;var O=Ea(l),L=Ea(d),$=rS(O,L),j=tS(O,L)+1;return $i(O,$,j).join("")}function Mq(l,d,D){if(l=et(l),l&&(D||d===e))return l.slice(0,aS(l)+1);if(!l||!(d=Wn(d)))return l;var O=Ea(l),L=tS(O,Ea(d))+1;return $i(O,0,L).join("")}function Cq(l,d,D){if(l=et(l),l&&(D||d===e))return l.replace(Wu,"");if(!l||!(d=Wn(d)))return l;var O=Ea(l),L=rS(O,Ea(d));return $i(O,L).join("")}function Tq(l,d){var D=C,O=E;if(bt(d)){var L="separator"in d?d.separator:L;D="length"in d?Er(d.length):D,O="omission"in d?Wn(d.omission):O}l=et(l);var $=l.length;if(ps(l)){var j=Ea(l);$=j.length}if(D>=$)return l;var te=D-ds(O);if(te<1)return O;var ce=j?$i(j,0,te).join(""):l.slice(0,te);if(L===e)return ce+O;if(j&&(te+=ce.length-te),Tx(L)){if(l.slice(te).search(L)){var Oe,_e=ce;for(L.global||(L=$y(L.source,et(Gf.exec(L))+"g")),L.lastIndex=0;Oe=L.exec(_e);)var Re=Oe.index;ce=ce.slice(0,Re===e?te:Re)}}else if(l.indexOf(Wn(L),te)!=te){var Ve=ce.lastIndexOf(L);Ve>-1&&(ce=ce.slice(0,Ve))}return ce+O}function Fq(l){return l=et(l),l&&Xe.test(l)?l.replace(ie,i6):l}var Oq=bs(function(l,d,D){return l+(D?" ":"")+d.toUpperCase()}),_x=GS("toUpperCase");function HN(l,d,D){return l=et(l),d=D?e:d,d===e?e6(l)?u6(l):$8(l):l.match(d)||[]}var $N=Fr(function(l,d){try{return Un(l,e,d)}catch(D){return Cx(D)?D:new Sr(D)}}),_q=ui(function(l,d){return ia(d,function(D){D=za(D),oi(l,D,Ex(l[D],l))}),l});function Bq(l){var d=l==null?0:l.length,D=cr();return l=d?vt(l,function(O){if(typeof O[1]!="function")throw new oa(a);return[D(O[0]),O[1]]}):[],Fr(function(O){for(var L=-1;++L<d;){var $=l[L];if(Un($[0],this,O))return Un($[1],this,O)}})}function Iq(l){return i7(ua(l,s))}function Bx(l){return function(){return l}}function Pq(l,d){return l==null||l!==l?d:l}var Rq=ZS(),kq=ZS(!0);function On(l){return l}function Ix(l){return NS(typeof l=="function"?l:ua(l,s))}function Lq(l){return ES(ua(l,s))}function qq(l,d){return MS(l,ua(d,s))}var Uq=Fr(function(l,d){return function(D){return Ju(D,l,d)}}),zq=Fr(function(l,d){return function(D){return Ju(l,D,d)}});function Px(l,d,D){var O=Gt(d),L=gc(d,O);D==null&&!(bt(d)&&(L.length||!O.length))&&(D=d,d=l,l=this,L=gc(d,Gt(d)));var $=!(bt(D)&&"chain"in D)||!!D.chain,j=ci(l);return ia(L,function(te){var ce=d[te];l[te]=ce,j&&(l.prototype[te]=function(){var Oe=this.__chain__;if($||Oe){var _e=l(this.__wrapped__),Re=_e.__actions__=Cn(this.__actions__);return Re.push({func:ce,args:arguments,thisArg:l}),_e.__chain__=Oe,_e}return ce.apply(l,Li([this.value()],arguments))})}),l}function Wq(){return $t._===this&&($t._=d6),this}function Rx(){}function Yq(l){return l=Er(l),Fr(function(d){return CS(d,l)})}var Hq=px(vt),$q=px(KD),Gq=px(Ly);function GN(l){return bx(l)?qy(za(l)):D7(l)}function Vq(l){return function(d){return l==null?e:Fo(l,d)}}var Zq=XS(),Kq=XS(!0);function kx(){return[]}function Lx(){return!1}function Xq(){return{}}function Jq(){return""}function Qq(){return!0}function jq(l,d){if(l=Er(l),l<1||l>P)return[];var D=k,O=an(l,k);d=cr(d),l-=k;for(var L=Wy(O,d);++D<l;)d(D);return L}function eU(l){return Nr(l)?vt(l,za):Yn(l)?[l]:Cn(mN(et(l)))}function rU(l){var d=++m6;return et(l)+d}var tU=Sc(function(l,d){return l+d},0),nU=dx("ceil"),aU=Sc(function(l,d){return l/d},1),iU=dx("floor");function oU(l){return l&&l.length?vc(l,On,jy):e}function sU(l,d){return l&&l.length?vc(l,cr(d,2),jy):e}function uU(l){return QD(l,On)}function fU(l,d){return QD(l,cr(d,2))}function cU(l){return l&&l.length?vc(l,On,nx):e}function lU(l,d){return l&&l.length?vc(l,cr(d,2),nx):e}var mU=Sc(function(l,d){return l*d},1),pU=dx("round"),dU=Sc(function(l,d){return l-d},0);function hU(l){return l&&l.length?zy(l,On):0}function vU(l,d){return l&&l.length?zy(l,cr(d,2)):0}return W.after=LL,W.ary=SN,W.assign=A9,W.assignIn=kN,W.assignInWith=Rc,W.assignWith=E9,W.at=M9,W.before=NN,W.bind=Ex,W.bindAll=_q,W.bindKey=AN,W.castArray=XL,W.chain=bN,W.chunk=ik,W.compact=ok,W.concat=sk,W.cond=Bq,W.conforms=Iq,W.constant=Bx,W.countBy=hL,W.create=C9,W.curry=EN,W.curryRight=MN,W.debounce=CN,W.defaults=T9,W.defaultsDeep=F9,W.defer=qL,W.delay=UL,W.difference=uk,W.differenceBy=fk,W.differenceWith=ck,W.drop=lk,W.dropRight=mk,W.dropRightWhile=pk,W.dropWhile=dk,W.fill=hk,W.filter=gL,W.flatMap=bL,W.flatMapDeep=wL,W.flatMapDepth=DL,W.flatten=vN,W.flattenDeep=vk,W.flattenDepth=gk,W.flip=zL,W.flow=Rq,W.flowRight=kq,W.fromPairs=yk,W.functions=k9,W.functionsIn=L9,W.groupBy=SL,W.initial=bk,W.intersection=wk,W.intersectionBy=Dk,W.intersectionWith=Sk,W.invert=U9,W.invertBy=z9,W.invokeMap=AL,W.iteratee=Ix,W.keyBy=EL,W.keys=Gt,W.keysIn=Fn,W.map=Fc,W.mapKeys=Y9,W.mapValues=H9,W.matches=Lq,W.matchesProperty=qq,W.memoize=_c,W.merge=$9,W.mergeWith=LN,W.method=Uq,W.methodOf=zq,W.mixin=Px,W.negate=Bc,W.nthArg=Yq,W.omit=G9,W.omitBy=V9,W.once=WL,W.orderBy=ML,W.over Line truncated
\`).map(rW).filter(function(t){return t!==null});return Qt(Qt({},r[0]),r[1])}function yf(e){var r={},t=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\\s]+)/i.exec(e);if(!t)return r;var n=t[1],a=t[2];return n&&(r.tzid=n),r.dtstart=df(a),r}function rW(e){if(e=e.replace(/^\\s+|\\s+$/,""),!e.length)return null;var r=/^([A-Z]+?)[:;]/.exec(e.toUpperCase());if(!r)return kA(e);var t=r[1];switch(t.toUpperCase()){case"RRULE":case"EXRULE":return kA(e);case"DTSTART":return yf(e);default:throw new Error("Unsupported RFC prop ".concat(t," in ").concat(e))}}function kA(e){var r=e.replace(/^RRULE:/i,""),t=yf(r),n=e.replace(/^(?:RRULE|EXRULE):/i,"").split(";");return n.forEach(function(a){var i=a.split("="),o=i[0],f=i[1];switch(o.toUpperCase()){case"FREQ":t.freq=_r[f.toUpperCase()];break;case"WKST":t.wkst=pa[f.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var u=tW(f),s=o.toLowerCase();t[s]=u;break;case"BYWEEKDAY":case"BYDAY":t.byweekday=nW(f);break;case"DTSTART":case"TZID":var c=yf(e);t.tzid=c.tzid,t.dtstart=c.dtstart;break;case"UNTIL":t.until=df(f);break;case"BYEASTER":t.byeaster=Number(f);break;default:throw new Error("Unknown RRULE property '"+o+"'")}}),t}function tW(e){if(e.indexOf(",")!==-1){var r=e.split(",");return r.map(LA)}return LA(e)}function LA(e){return/^[+-]?\\d+$/.test(e)?Number(e):e}function nW(e){var r=e.split(",");return r.map(function(t){if(t.length===2)return pa[t];var n=t.match(/^([+-]?\\d{1,2})([A-Z]{2})$/);if(!n||n.length<3)throw new SyntaxError("Invalid weekday string: ".concat(t));var a=Number(n[1]),i=n[2],o=pa[i].weekday;return new Bt(o,a)})}var Wo=function(){function e(r,t){if(isNaN(r.getTime()))throw new RangeError("Invalid date passed to DateWithZone");this.date=r,this.tzid=t}return Object.defineProperty(e.prototype,"isUTC",{get:function(){return!this.tzid||this.tzid.toUpperCase()==="UTC"},enumerable:!1,configurable:!0}),e.prototype.toString=function(){var r=Ts(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(r):";TZID=".concat(this.tzid,":").concat(r)},e.prototype.getTime=function(){return this.date.getTime()},e.prototype.rezonedDate=function(){return this.isUTC?this.date:CA(this.date,this.tzid)},e}();function bf(e){for(var r=[],t="",n=Object.keys(e),a=Object.keys(gf),i=0;i<n.length;i++)if(n[i]!=="tzid"&&!!Wr(a,n[i])){var o=n[i].toUpperCase(),f=e[n[i]],u="";if(!(!ct(f)||Jt(f)&&!f.length)){switch(o){case"FREQ":u=ir.FREQUENCIES[e.freq];break;case"WKST":Vn(f)?u=new Bt(f).toString():u=f.toString();break;case"BYWEEKDAY":o="BYDAY",u=SA(f).map(function(h){return h instanceof Bt?h:Jt(h)?new Bt(h[0],h[1]):new Bt(h)}).toString();break;case"DTSTART":t=aW(f,e.tzid);break;case"UNTIL":u=Ts(f,!e.tzid);break;default:if(Jt(f)){for(var s=[],c=0;c<f.length;c++)s[c]=String(f[c]);u=s.toString()}else u=String(f)}u&&r.push([o,u])}}var m=r.map(function(h){var g=h[0],v=h[1];return"".concat(g,"=").concat(v.toString())}).join(";"),p="";return m!==""&&(p="RRULE:".concat(m)),[t,p].filter(function(h){return!!h}).join(\`
\`)}function aW(e,r){return e?"DTSTART"+new Wo(new Date(e),r).toString():""}function iW(e,r){return Array.isArray(e)?!Array.isArray(r)||e.length!==r.length?!1:e.every(function(t,n){return t.getTime()===r[n].getTime()}):e instanceof Date?r instanceof Date&&e.getTime()===r.getTime():e===r}var qA=function(){function e(){this.all=!1,this.before=[],this.after=[],this.between=[]}return e.prototype._cacheAdd=function(r,t,n){t&&(t=t instanceof Date?Zc(t):s1(t)),r==="all"?this.all=t:(n._value=t,this[r].push(n))},e.prototype._cacheGet=function(r,t){var n=!1,a=t?Object.keys(t):[],i=function(c){for(var m=0;m<a.length;m++){var p=a[m];if(!iW(t[p],c[p]))return!0}return!1},o=this[r];if(r==="all")n=this.all;else if(Jt(o))for(var f=0;f<o.length;f++){var u=o[f];if(!(a.length&&i(u))){n=u._value;break}}if(!n&&this.all){for(var s=new yi(r,t),f=0;f<this.all.length&&s.accept(this.all[f]);f++);n=s.getValue(),this._cacheAdd(r,n,t)}return Jt(n)?s1(n):n instanceof Date?Zc(n):n},e}();var UA=$e($e($e($e($e($e($e($e($e($e($e($e($e([],qr(1,31),!0),qr(2,28),!0),qr(3,31),!0),qr(4,30),!0),qr(5,31),!0),qr(6,30),!0),qr(7,31),!0),qr(8,31),!0),qr(9,30),!0),qr(10,31),!0),qr(11,30),!0),qr(12,31),!0),qr(1,7),!0),zA=$e($e($e($e($e($e($e($e($e($e($e($e($e([],qr(1,31),!0),qr(2,29),!0),qr(3,31),!0),qr(4,30),!0),qr(5,31),!0),qr(6,30),!0),qr(7,31),!0),qr(8,31),!0),qr(9,30),!0),qr(10,31),!0),qr(11,30),!0),qr(12,31),!0),qr(1,7),!0),oW=ma(1,29),sW=ma(1,30),Ji=ma(1,31),fn=ma(1,32),WA=$e($e($e($e($e($e($e($e($e($e($e($e($e([],fn,!0),sW,!0),fn,!0),Ji,!0),fn,!0),Ji,!0),fn,!0),fn,!0),Ji,!0),fn,!0),Ji,!0),fn,!0),fn.slice(0,7),!0),YA=$e($e($e($e($e($e($e($e($e($e($e($e($e([],fn,!0),oW,!0),fn,!0),Ji,!0),fn,!0),Ji,!0),fn,!0),fn,!0),Ji,!0),fn,!0),Ji,!0),fn,!0),fn.slice(0,7),!0),uW=ma(-28,0),fW=ma(-29,0),Qi=ma(-30,0),cn=ma(-31,0),HA=$e($e($e($e($e($e($e($e($e($e($e($e($e([],cn,!0),fW,!0),cn,!0),Qi,!0),cn,!0),Qi,!0),cn,!0),cn,!0),Qi,!0),cn,!0),Qi,!0),cn,!0),cn.slice(0,7),!0),$A=$e($e($e($e($e($e($e($e($e($e($e($e($e([],cn,!0),uW,!0),cn,!0),Qi,!0),cn,!0),Qi,!0),cn,!0),cn,!0),Qi,!0),cn,!0),Qi,!0),cn,!0),cn.slice(0,7),!0),GA=[0,31,60,91,121,152,182,213,244,274,305,335,366],VA=[0,31,59,90,120,151,181,212,243,273,304,334,365],l1=function(){for(var e=[],r=0;r<55;r++)e=e.concat(ma(7));return e}();function ZA(e,r){var t=Ha(e,1,1),n=Cs(e)?366:365,a=Cs(e+1)?366:365,i=pf(t),o=vi(t),f=Qt(Qt({yearlen:n,nextyearlen:a,yearordinal:i,yearweekday:o},cW(e)),{wnomask:null});if(Zn(r.byweekno))return f;f.wnomask=qr(0,n+7);var u,s,c=u=un(7-o+r.wkst,7);c>=4?(c=0,s=f.yearlen+un(o-r.wkst,7)):s=n-c;for(var m=Math.floor(s/7),p=un(s,7),h=Math.floor(m+p/4),g=0;g<r.byweekno.length;g++){var v=r.byweekno[g];if(v<0&&(v+=h+1),v>0&&v<=h){var y=void 0;v>1?(y=c+(v-1)*7,c!==u&&(y-=7-u)):y=c;for(var x=0;x<7&&(f.wnomask[y]=1,y++,f.wdaymask[y]!==r.wkst);x++);}}if(Wr(r.byweekno,1)){var y=c+h*7;if(c!==u&&(y-=7-u),y<n)for(var g=0;g<7&&(f.wnomask[y]=1,y+=1,f.wdaymask[y]!==r.wkst);g++);}if(c){var A=void 0;if(Wr(r.byweekno,-1))A=-1;else{var b=vi(Ha(e-1,1,1)),S=un(7-b.valueOf()+r.wkst,7),N=Cs(e-1)?366:365,w=void 0;S>=4?(S=0,w=N+un(b-r.wkst,7)):w=n-c,A=Math.floor(52+un(w,7)/4)}if(Wr(r.byweekno,A))for(var y=0;y<c;y++)f.wnomask[y]=1}return f}function cW(e){var r=Cs(e)?366:365,t=Ha(e,1,1),n=vi(t);return r===365?{mmask:UA,mdaymask:YA,nmdaymask:$A,wdaymask:l1.slice(n),mrange:VA}:{mmask:zA,mdaymask:WA,nmdaymask:HA,wdaymask:l1.slice(n),mrange:GA}}function KA(e,r,t,n,a,i){var o={lastyear:e,lastmonth:r,nwdaymask:[]},f=[];if(i.freq===ir.YEARLY)if(Zn(i.bymonth))f=[[0,t]];else for(var u=0;u<i.bymonth.length;u++)r=i.bymonth[u],f.push(n.slice(r-1,r+1));else i.freq===ir.MONTHLY&&(f=[n.slice(r-1,r+1)]);if(Zn(f))return o;o.nwdaymask=qr(0,t);for(var u=0;u<f.length;u++)for(var s=f[u],c=s[0],m=s[1]-1,p=0;p<i.bynweekday.length;p++){var h=void 0,g=i.bynweekday[p],v=g[0],y=g[1];y<0?(h=m+(y+1)*7,h-=un(a[h]-v,7)):(h=c+(y-1)*7,h+=un(7-a[h]+v,7)),c<=h&&h<=m&&(o.nwdaymask[h]=1)}return o}function XA(e,r){r===void 0&&(r=0);var t=e%19,n=Math.floor(e/100),a=e%100,i=Math.floor(n/4),o=n%4,f=Math.floor((n+8)/25),u=Math.floor((n-f+1)/3),s=Math.floor(19*t+n-i-u+15)%30,c=Math.floor(a/4),m=a%4,p=Math.floor(32+2*o+2*c-s-m)%7,h=Math.floor((t+11*s+22*p)/451),g=Math.floor((s+p-7*h+114)/31),v=(s+p-7*h+114)%31+1,y=Date.UTC(e,g-1,v+r),x=Date.UTC(e,0,1);return[Math.ceil((y-x)/(1e3*60*60*24))]}var lW=function(){function e(r){this.options=r}return e.prototype.rebuild=function(r,t){var n=this.options;if(r!==this.lastyear&&(this.yearinfo=ZA(r,n)),Tt(n.bynweekday)&&(t!==this.lastmonth||r!==this.lastyear)){var a=this.yearinfo,i=a.yearlen,o=a.mrange,f=a.wdaymask;this.monthinfo=KA(r,t,i,o,f,n)}ct(n.byeaster)&&(this.eastermask=XA(r,n.byeaster))},Object.defineProperty(e.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastmonth",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yearl Line truncated
\`),n=0;n<t.length;){var a=t[n]=t[n].replace(/\\s+$/g,"");a?n>0&&a[0]===" "?(t[n-1]+=a.slice(1),t.splice(n,1)):n+=1:t.splice(n,1)}return t}function wW(e){e.forEach(function(r){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(r))throw new Error("unsupported RDATE/EXDATE parm: "+r)})}function tE(e,r){return wW(r),e.split(",").map(function(t){return df(t)})}function nE(e){var r=this;return function(t){if(t!==void 0&&(r["_".concat(e)]=t),r["_".concat(e)]!==void 0)return r["_".concat(e)];for(var n=0;n<r._rrule.length;n++){var a=r._rrule[n].origOptions[e];if(a)return a}}}var p1=function(e){Fs(r,e);function r(t){t===void 0&&(t=!1);var n=e.call(this,{},t)||this;return n.dtstart=nE.apply(n,["dtstart"]),n.tzid=nE.apply(n,["tzid"]),n._rrule=[],n._rdate=[],n._exrule=[],n._exdate=[],n}return r.prototype._iter=function(t){return eE(t,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},r.prototype.rrule=function(t){aE(t,this._rrule)},r.prototype.exrule=function(t){aE(t,this._exrule)},r.prototype.rdate=function(t){iE(t,this._rdate)},r.prototype.exdate=function(t){iE(t,this._exdate)},r.prototype.rrules=function(){return this._rrule.map(function(t){return Xc(t.toString())})},r.prototype.exrules=function(){return this._exrule.map(function(t){return Xc(t.toString())})},r.prototype.rdates=function(){return this._rdate.map(function(t){return new Date(t.getTime())})},r.prototype.exdates=function(){return this._exdate.map(function(t){return new Date(t.getTime())})},r.prototype.valueOf=function(){var t=[];return!this._rrule.length&&this._dtstart&&(t=t.concat(bf({dtstart:this._dtstart}))),this._rrule.forEach(function(n){t=t.concat(n.toString().split(\`
@@ -1025,32 +1025,32 @@ Example:
import { create, all } from 'mathjs';
const mathjs = create(all);
mathjs.config({ number: 'BigNumber' });
\`);return Object.freeze(Yo)};it(Me,Yo,{MATRIX_OPTIONS:cl,NUMBER_OPTIONS:ll});var uw={};DU(uw,{createAbs:()=>pm,createAccessorNode:()=>lh,createAcos:()=>bd,createAcosh:()=>wd,createAcot:()=>Dd,createAcoth:()=>Sd,createAcsc:()=>Nd,createAcsch:()=>Ad,createAdd:()=>rh,createAddScalar:()=>hm,createAnd:()=>vu,createAndTransform:()=>T0,createApply:()=>uo,createApplyTransform:()=>f0,createArg:()=>zm,createArrayNode:()=>ph,createAsec:()=>Ed,createAsech:()=>Md,createAsin:()=>Cd,createAsinh:()=>Td,createAssignmentNode:()=>gh,createAtan:()=>Fd,createAtan2:()=>Od,createAtanh:()=>_d,createAtomicMass:()=>zg,createAvogadro:()=>Wg,createBellNumbers:()=>Iv,createBigNumberClass:()=>Tl,createBignumber:()=>nm,createBin:()=>Sp,createBitAnd:()=>ru,createBitAndTransform:()=>O0,createBitNot:()=>qm,createBitOr:()=>tu,createBitOrTransform:()=>_0,createBitXor:()=>Um,createBlockNode:()=>xh,createBohrMagneton:()=>wg,createBohrRadius:()=>Mg,createBoltzmann:()=>Yg,createBoolean:()=>tm,createCatalan:()=>Pv,createCbrt:()=>gm,createCeil:()=>ym,createChain:()=>av,createChainClass:()=>tv,createClassicalElectronRadius:()=>Cg,createClone:()=>ql,createColumn:()=>iu,createColumnTransform:()=>c0,createCombinations:()=>wv,createCombinationsWithRep:()=>Dv,createCompare:()=>Gp,createCompareNatural:()=>Vp,createCompareText:()=>Zp,createCompile:()=>Hh,createComplex:()=>am,createComplexClass:()=>Fl,createComposition:()=>Rv,createConcat:()=>au,createConcatTransform:()=>w0,createConditionalNode:()=>wh,createConductanceQuantum:()=>Dg,createConj:()=>Wm,createConstantNode:()=>Ah,createCorr:()=>bv,createCos:()=>Bd,createCosh:()=>Id,createCot:()=>Pd,createCoth:()=>Rd,createCoulomb:()=>xg,createCount:()=>Vm,createCreateUnit:()=>xd,createCross:()=>Zm,createCsc:()=>kd,createCsch:()=>Ld,createCtranspose:()=>pp,createCube:()=>xm,createCumSum:()=>wu,createCumSumTransform:()=>E0,createDeepEqual:()=>od,createDenseMatrixClass:()=>Ll,createDerivative:()=>Yv,createDet:()=>iv,createDeuteronMass:()=>Ig,createDiag:()=>Km,createDiff:()=>ou,createDiffTransform:()=>D0,createDistance:()=>hv,createDivide:()=>dv,createDivideScalar:()=>Fp,createDot:()=>ah,createDotDivide:()=>kp,createDotMultiply:()=>km,createDotPow:()=>Rp,createE:()=>tg,createEfimovFactor:()=>Ug,createEigs:()=>uv,createElectricConstant:()=>gg,createElectronMass:()=>Tg,createElementaryCharge:()=>bg,createEqual:()=>Xp,createEqualScalar:()=>Ql,createEqualText:()=>Jp,createErf:()=>yp,createEvaluate:()=>$h,createExp:()=>bm,createExpm:()=>fv,createExpm1:()=>wm,createFactorial:()=>Av,createFalse:()=>Xv,createFaraday:()=>Hg,createFermiCoupling:()=>Fg,createFft:()=>hp,createFibonacciHeapClass:()=>pd,createFilter:()=>Xm,createFilterTransform:()=>l0,createFineStructure:()=>Og,createFirstRadiation:()=>$g,createFix:()=>Dm,createFlatten:()=>Jm,createFloor:()=>Js,createForEach:()=>Qm,createForEachTransform:()=>m0,createFormat:()=>Dp,createFraction:()=>im,createFractionClass:()=>Ol,createFreqz:()=>Gv,createFunctionAssignmentNode:()=>Mh,createFunctionNode:()=>Wh,createGamma:()=>Sv,createGasConstant:()=>Vg,createGcd:()=>Sm,createGetMatrixDataType:()=>jm,createGravitationConstant:()=>pg,createGravity:()=>t0,createHartreeEnergy:()=>_g,createHasNumericValue:()=>Gl,createHelp:()=>nv,createHelpClass:()=>rv,createHex:()=>Ap,createHypot:()=>th,createI:()=>cg,createIdentity:()=>ep,createIfft:()=>vp,createIm:()=>Ym,createImmutableDenseMatrixClass:()=>ld,createIndex:()=>oh,createIndexClass:()=>md,createIndexNode:()=>Th,createIndexTransform:()=>p0,createInfinity:()=>Qv,createIntersect:()=>vv,createInv:()=>ov,createInverseConductanceQuantum:()=>Sg,createInvmod:()=>Pm,createIsInteger:()=>Wl,createIsNaN:()=>Kl,createIsNegative:()=>Hl,createIsNumeric:()=>$l,createIsPositive:()=>Vl,createIsPrime:()=>Cp,createIsZero:()=>Zl,createKldivergence:()=>Ev,createKlitzing:()=>Eg,createKron:()=>rp,createLN10:()=>ig,createLN2:()=>ag,createLOG10E:()=>sg,createLOG2E:()=>og,createLarger:()=>nd,createLargerEq:()=>id,createLcm:()=>Nm,createLeafCount:()=>kv,createLeftShift:()=>Wp,createLgamma:()=>Nv,createLog:()=>Bp,createLog10:()=>Am,createLog1p:()=>Ip,createLog2:()=>Em,createLoschmidt:()=>Gg,createLsolve:()=>Lp,createLsolveAll:()=>Up,createLup:()=>Zh,createLusolve:()=>jh,createLyap:()=>pv,createMad:()=>xv,createMagneticConstant:()=>vg,createMagneticFluxQuantum:()=>Ng,createMap:()=>tp,createMapTransform:()=>d0,createMatrix:()=>om,createMatrixClass:()=>Bl,createMatrixFromColumns:()=>fm,createMatrixFromFunction:()=>sm,createMatrixFromRows:()=>um,createMax:()=>gu,createMaxTransform:()=>h0,createMean:()=>Du,createMeanTransform:()=>v0,createMedian:()=>yv,createMin:()=>yu,createMinTransform:()=>g0,createMod:()=>Qs,createMode:()=>bp,createMolarMass:()=>e0,createMolarMassC12:()=>r0,createMolarPlanckConstant:()=>Zg,createMolarVolume:()=>Kg,createMultinomial:()=>Mv,createMultiply:()=>Cm,createMultiplyScalar:()=>Mm,createNaN:()=>jv,createNeutronMass:()=>Pg,createNode:()=>uh,createNorm:()=>nh,createNot:()=>$m,createNthRoot:()=>Tm,createNthRoots:()=>Pp,createNuclearMagneton:( Line truncated
\`||(f==="+"?a++:f==="-"?i++:f==="i"||f==="I"?(a+i===0&&Hs(),n[o+1]!==" "&&!isNaN(n[o+1])?(t.im+=parseFloat((i%2?"-":"")+n[o+1]),o++):t.im+=parseFloat((i%2?"-":"")+"1"),a=i=0):((a+i===0||isNaN(f))&&Hs(),n[o+1]==="i"||n[o+1]==="I"?(t.im+=parseFloat((i%2?"-":"")+f),o++):t.re+=parseFloat((i%2?"-":"")+f),a=i=0))}a+i>0&&Hs();break;case"number":t.im=0,t.re=e;break;default:Hs()}return isNaN(t.re)||isNaN(t.im),t};function ye(e,r){if(!(this instanceof ye))return new ye(e,r);let t=Vo(e,r);this.re=t.re,this.im=t.im}ye.prototype={re:0,im:0,sign:function(){let e=_1(this.re,this.im);return new ye(this.re/e,this.im/e)},add:function(e,r){let t=Vo(e,r),n=this.isInfinite(),a=!(isFinite(t.re)&&isFinite(t.im));return n||a?n&&a?ye.NAN:ye.INFINITY:new ye(this.re+t.re,this.im+t.im)},sub:function(e,r){let t=Vo(e,r),n=this.isInfinite(),a=!(isFinite(t.re)&&isFinite(t.im));return n||a?n&&a?ye.NAN:ye.INFINITY:new ye(this.re-t.re,this.im-t.im)},mul:function(e,r){let t=Vo(e,r),n=this.isInfinite(),a=!(isFinite(t.re)&&isFinite(t.im)),i=this.re===0&&this.im===0,o=t.re===0&&t.im===0;return n&&o||a&&i?ye.NAN:n||a?ye.INFINITY:t.im===0&&this.im===0?new ye(this.re*t.re,0):new ye(this.re*t.re-this.im*t.im,this.re*t.im+this.im*t.re)},div:function(e,r){let t=Vo(e,r),n=this.isInfinite(),a=!(isFinite(t.re)&&isFinite(t.im)),i=this.re===0&&this.im===0,o=t.re===0&&t.im===0;if(i&&o||n&&a)return ye.NAN;if(o||n)return ye.INFINITY;if(i||a)return ye.ZERO;if(t.im===0)return new ye(this.re/t.re,this.im/t.re);if(Math.abs(t.re)<Math.abs(t.im)){let f=t.re/t.im,u=t.re*f+t.im;return new ye((this.re*f+this.im)/u,(this.im*f-this.re)/u)}else{let f=t.im/t.re,u=t.im*f+t.re;return new ye((this.re+this.im*f)/u,(this.im-this.re*f)/u)}},pow:function(e,r){let t=Vo(e,r),n=this.re===0&&this.im===0;if(t.re===0&&t.im===0)return ye.ONE;if(t.im===0){if(this.im===0&&this.re>0)return new ye(Math.pow(this.re,t.re),0);if(this.re===0)switch((t.re%4+4)%4){case 0:return new ye(Math.pow(this.im,t.re),0);case 1:return new ye(0,Math.pow(this.im,t.re));case 2:return new ye(-Math.pow(this.im,t.re),0);case 3:return new ye(0,-Math.pow(this.im,t.re))}}if(n&&t.re>0)return ye.ZERO;let i=Math.atan2(this.im,this.re),o=B1(this.re,this.im),f=Math.exp(t.re*o-t.im*i),u=t.im*o+t.re*i;return new ye(f*Math.cos(u),f*Math.sin(u))},sqrt:function(){let e=this.re,r=this.im;if(r===0)return e>=0?new ye(Math.sqrt(e),0):new ye(0,Math.sqrt(-e));let t=_1(e,r),n=Math.sqrt(.5*(t+Math.abs(e))),a=Math.abs(r)/(2*n);return e>=0?new ye(n,r<0?-a:a):new ye(a,r<0?-n:n)},exp:function(){let e=Math.exp(this.re);return this.im===0?new ye(e,0):new ye(e*Math.cos(this.im),e*Math.sin(this.im))},expm1:function(){let e=this.re,r=this.im;return new ye(Math.expm1(e)*Math.cos(r)+CY(r),Math.exp(e)*Math.sin(r))},log:function(){let e=this.re,r=this.im;return r===0&&e>0?new ye(Math.log(e),0):new ye(B1(e,r),Math.atan2(r,e))},abs:function(){return _1(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){let e=this.re,r=this.im;return new ye(Math.sin(e)*mn(r),Math.cos(e)*va(r))},cos:function(){let e=this.re,r=this.im;return new ye(Math.cos(e)*mn(r),-Math.sin(e)*va(r))},tan:function(){let e=2*this.re,r=2*this.im,t=Math.cos(e)+mn(r);return new ye(Math.sin(e)/t,va(r)/t)},cot:function(){let e=2*this.re,r=2*this.im,t=Math.cos(e)-mn(r);return new ye(-Math.sin(e)/t,va(r)/t)},sec:function(){let e=this.re,r=this.im,t=.5*mn(2*r)+.5*Math.cos(2*e);return new ye(Math.cos(e)*mn(r)/t,Math.sin(e)*va(r)/t)},csc:function(){let e=this.re,r=this.im,t=.5*mn(2*r)-.5*Math.cos(2*e);return new ye(Math.sin(e)*mn(r)/t,-Math.cos(e)*va(r)/t)},asin:function(){let e=this.re,r=this.im,t=new ye(r*r-e*e+1,-2*e*r).sqrt(),n=new ye(t.re-r,t.im+e).log();return new ye(n.im,-n.re)},acos:function(){let e=this.re,r=this.im,t=new ye(r*r-e*e+1,-2*e*r).sqrt(),n=new ye(t.re-r,t.im+e).log();return new ye(Math.PI/2-n.im,n.re)},atan:function(){let e=this.re,r=this.im;if(e===0){if(r===1)return new ye(0,1/0);if(r===-1)return new ye(0,-1/0)}let t=e*e+(1-r)*(1-r),n=new ye((1-r*r-e*e)/t,-2*e/t).log();return new ye(-.5*n.im,.5*n.re)},acot:function(){let e=this.re,r=this.im;if(r===0)return new ye(Math.atan2(1,e),0);let t=e*e+r*r;return t!==0?new ye(e/t,-r/t).atan():new ye(e!==0?e/0:0,r!==0?-r/0:0).atan()},asec:function(){let e=this.re,r=this.im;if(e===0&&r===0)return new ye(0,1/0);let t=e*e+r*r;return t!==0?new ye(e/t,-r/t).acos():new ye(e!==0?e/0:0,r!==0?-r/0:0).acos()},acsc:function(){let e=this.re,r=this.im;if(e===0&&r===0)return new ye(Math.PI/2,1/0);let t=e*e+r*r;return t!==0?new ye(e/t,-r/t).asin():new ye(e!==0?e/0:0,r!==0?-r/0:0).asin()},sinh:function(){let e=this.re,r=this.im;return new ye(va(e)*Math.cos(r),mn(e)*Math.sin(r))},cosh:function(){let e=this.re,r=this.im;return new ye(mn(e)*Math.cos(r),va(e)*Math.sin(r))},tanh:function(){let e=2*this.re,r=2*this.im,t=mn(e)+Math.cos(r);return new ye(va(e)/t,Math.sin(r)/t)},coth:function(){let e=2*this.re,r=2*this.im,t=mn(e)-Math.cos(r);return new ye(va(e)/t,-Math.sin(r)/t)},csch:function(){let e=this.re,r=this.im,t=Ma Line truncated
\`);return Object.freeze(Yo)};it(Me,Yo,{MATRIX_OPTIONS:cl,NUMBER_OPTIONS:ll});var uw={};DU(uw,{createAbs:()=>pm,createAccessorNode:()=>lh,createAcos:()=>bd,createAcosh:()=>wd,createAcot:()=>Dd,createAcoth:()=>Sd,createAcsc:()=>Nd,createAcsch:()=>Ad,createAdd:()=>rh,createAddScalar:()=>hm,createAnd:()=>vu,createAndTransform:()=>T0,createApply:()=>uo,createApplyTransform:()=>f0,createArg:()=>zm,createArrayNode:()=>ph,createAsec:()=>Ed,createAsech:()=>Md,createAsin:()=>Cd,createAsinh:()=>Td,createAssignmentNode:()=>gh,createAtan:()=>Fd,createAtan2:()=>Od,createAtanh:()=>_d,createAtomicMass:()=>zg,createAvogadro:()=>Wg,createBellNumbers:()=>Iv,createBigNumberClass:()=>Tl,createBignumber:()=>nm,createBin:()=>Sp,createBitAnd:()=>ru,createBitAndTransform:()=>O0,createBitNot:()=>qm,createBitOr:()=>tu,createBitOrTransform:()=>_0,createBitXor:()=>Um,createBlockNode:()=>xh,createBohrMagneton:()=>wg,createBohrRadius:()=>Mg,createBoltzmann:()=>Yg,createBoolean:()=>tm,createCatalan:()=>Pv,createCbrt:()=>gm,createCeil:()=>ym,createChain:()=>av,createChainClass:()=>tv,createClassicalElectronRadius:()=>Cg,createClone:()=>ql,createColumn:()=>iu,createColumnTransform:()=>c0,createCombinations:()=>wv,createCombinationsWithRep:()=>Dv,createCompare:()=>Gp,createCompareNatural:()=>Vp,createCompareText:()=>Zp,createCompile:()=>Hh,createComplex:()=>am,createComplexClass:()=>Fl,createComposition:()=>Rv,createConcat:()=>au,createConcatTransform:()=>w0,createConditionalNode:()=>wh,createConductanceQuantum:()=>Dg,createConj:()=>Wm,createConstantNode:()=>Ah,createCorr:()=>bv,createCos:()=>Bd,createCosh:()=>Id,createCot:()=>Pd,createCoth:()=>Rd,createCoulomb:()=>xg,createCount:()=>Vm,createCreateUnit:()=>xd,createCross:()=>Zm,createCsc:()=>kd,createCsch:()=>Ld,createCtranspose:()=>pp,createCube:()=>xm,createCumSum:()=>wu,createCumSumTransform:()=>E0,createDeepEqual:()=>od,createDenseMatrixClass:()=>Ll,createDerivative:()=>Yv,createDet:()=>iv,createDeuteronMass:()=>Ig,createDiag:()=>Km,createDiff:()=>ou,createDiffTransform:()=>D0,createDistance:()=>hv,createDivide:()=>dv,createDivideScalar:()=>Fp,createDot:()=>ah,createDotDivide:()=>kp,createDotMultiply:()=>km,createDotPow:()=>Rp,createE:()=>tg,createEfimovFactor:()=>Ug,createEigs:()=>uv,createElectricConstant:()=>gg,createElectronMass:()=>Tg,createElementaryCharge:()=>bg,createEqual:()=>Xp,createEqualScalar:()=>Ql,createEqualText:()=>Jp,createErf:()=>yp,createEvaluate:()=>$h,createExp:()=>bm,createExpm:()=>fv,createExpm1:()=>wm,createFactorial:()=>Av,createFalse:()=>Xv,createFaraday:()=>Hg,createFermiCoupling:()=>Fg,createFft:()=>hp,createFibonacciHeapClass:()=>pd,createFilter:()=>Xm,createFilterTransform:()=>l0,createFineStructure:()=>Og,createFirstRadiation:()=>$g,createFix:()=>Dm,createFlatten:()=>Jm,createFloor:()=>Js,createForEach:()=>Qm,createForEachTransform:()=>m0,createFormat:()=>Dp,createFraction:()=>im,createFractionClass:()=>Ol,createFreqz:()=>Gv,createFunctionAssignmentNode:()=>Mh,createFunctionNode:()=>Wh,createGamma:()=>Sv,createGasConstant:()=>Vg,createGcd:()=>Sm,createGetMatrixDataType:()=>jm,createGravitationConstant:()=>pg,createGravity:()=>t0,createHartreeEnergy:()=>_g,createHasNumericValue:()=>Gl,createHelp:()=>nv,createHelpClass:()=>rv,createHex:()=>Ap,createHypot:()=>th,createI:()=>cg,createIdentity:()=>ep,createIfft:()=>vp,createIm:()=>Ym,createImmutableDenseMatrixClass:()=>ld,createIndex:()=>oh,createIndexClass:()=>md,createIndexNode:()=>Th,createIndexTransform:()=>p0,createInfinity:()=>Qv,createIntersect:()=>vv,createInv:()=>ov,createInverseConductanceQuantum:()=>Sg,createInvmod:()=>Pm,createIsInteger:()=>Wl,createIsNaN:()=>Kl,createIsNegative:()=>Hl,createIsNumeric:()=>$l,createIsPositive:()=>Vl,createIsPrime:()=>Cp,createIsZero:()=>Zl,createKldivergence:()=>Ev,createKlitzing:()=>Eg,createKron:()=>rp,createLN10:()=>ig,createLN2:()=>ag,createLOG10E:()=>sg,createLOG2E:()=>og,createLarger:()=>nd,createLargerEq:()=>id,createLcm:()=>Nm,createLeafCount:()=>kv,createLeftShift:()=>Wp,createLgamma:()=>Nv,createLog:()=>Bp,createLog10:()=>Am,createLog1p:()=>Ip,createLog2:()=>Em,createLoschmidt:()=>Gg,createLsolve:()=>Lp,createLsolveAll:()=>Up,createLup:()=>Zh,createLusolve:()=>jh,createLyap:()=>pv,createMad:()=>xv,createMagneticConstant:()=>vg,createMagneticFluxQuantum:()=>Ng,createMap:()=>tp,createMapTransform:()=>d0,createMatrix:()=>om,createMatrixClass:()=>Bl,createMatrixFromColumns:()=>fm,createMatrixFromFunction:()=>sm,createMatrixFromRows:()=>um,createMax:()=>gu,createMaxTransform:()=>h0,createMean:()=>Du,createMeanTransform:()=>v0,createMedian:()=>yv,createMin:()=>yu,createMinTransform:()=>g0,createMod:()=>Qs,createMode:()=>bp,createMolarMass:()=>e0,createMolarMassC12:()=>r0,createMolarPlanckConstant:()=>Zg,createMolarVolume:()=>Kg,createMultinomial:()=>Mv,createMultiply:()=>Cm,createMultiplyScalar:()=>Mm,createNaN:()=>jv,createNeutronMass:()=>Pg,createNode:()=>uh,createNorm:()=>nh,createNot:()=>$m,createNthRoot:()=>Tm,createNthRoots:()=>Pp,createNuclearMagneton:( Line truncated
\`||(f==="+"?a++:f==="-"?i++:f==="i"||f==="I"?(a+i===0&&Hs(),n[o+1]!==" "&&!isNaN(n[o+1])?(t.im+=parseFloat((i%2?"-":"")+n[o+1]),o++):t.im+=parseFloat((i%2?"-":"")+"1"),a=i=0):((a+i===0||isNaN(f))&&Hs(),n[o+1]==="i"||n[o+1]==="I"?(t.im+=parseFloat((i%2?"-":"")+f),o++):t.re+=parseFloat((i%2?"-":"")+f),a=i=0))}a+i>0&&Hs();break;case"number":t.im=0,t.re=e;break;default:Hs()}return isNaN(t.re)||isNaN(t.im),t};function ye(e,r){if(!(this instanceof ye))return new ye(e,r);let t=Vo(e,r);this.re=t.re,this.im=t.im}ye.prototype={re:0,im:0,sign:function(){let e=_1(this.re,this.im);return new ye(this.re/e,this.im/e)},add:function(e,r){let t=Vo(e,r),n=this.isInfinite(),a=!(isFinite(t.re)&&isFinite(t.im));return n||a?n&&a?ye.NAN:ye.INFINITY:new ye(this.re+t.re,this.im+t.im)},sub:function(e,r){let t=Vo(e,r),n=this.isInfinite(),a=!(isFinite(t.re)&&isFinite(t.im));return n||a?n&&a?ye.NAN:ye.INFINITY:new ye(this.re-t.re,this.im-t.im)},mul:function(e,r){let t=Vo(e,r),n=this.isInfinite(),a=!(isFinite(t.re)&&isFinite(t.im)),i=this.re===0&&this.im===0,o=t.re===0&&t.im===0;return n&&o||a&&i?ye.NAN:n||a?ye.INFINITY:t.im===0&&this.im===0?new ye(this.re*t.re,0):new ye(this.re*t.re-this.im*t.im,this.re*t.im+this.im*t.re)},div:function(e,r){let t=Vo(e,r),n=this.isInfinite(),a=!(isFinite(t.re)&&isFinite(t.im)),i=this.re===0&&this.im===0,o=t.re===0&&t.im===0;if(i&&o||n&&a)return ye.NAN;if(o||n)return ye.INFINITY;if(i||a)return ye.ZERO;if(t.im===0)return new ye(this.re/t.re,this.im/t.re);if(Math.abs(t.re)<Math.abs(t.im)){let f=t.re/t.im,u=t.re*f+t.im;return new ye((this.re*f+this.im)/u,(this.im*f-this.re)/u)}else{let f=t.im/t.re,u=t.im*f+t.re;return new ye((this.re+this.im*f)/u,(this.im-this.re*f)/u)}},pow:function(e,r){let t=Vo(e,r),n=this.re===0&&this.im===0;if(t.re===0&&t.im===0)return ye.ONE;if(t.im===0){if(this.im===0&&this.re>0)return new ye(Math.pow(this.re,t.re),0);if(this.re===0)switch((t.re%4+4)%4){case 0:return new ye(Math.pow(this.im,t.re),0);case 1:return new ye(0,Math.pow(this.im,t.re));case 2:return new ye(-Math.pow(this.im,t.re),0);case 3:return new ye(0,-Math.pow(this.im,t.re))}}if(n&&t.re>0)return ye.ZERO;let i=Math.atan2(this.im,this.re),o=B1(this.re,this.im),f=Math.exp(t.re*o-t.im*i),u=t.im*o+t.re*i;return new ye(f*Math.cos(u),f*Math.sin(u))},sqrt:function(){let e=this.re,r=this.im;if(r===0)return e>=0?new ye(Math.sqrt(e),0):new ye(0,Math.sqrt(-e));let t=_1(e,r),n=Math.sqrt(.5*(t+Math.abs(e))),a=Math.abs(r)/(2*n);return e>=0?new ye(n,r<0?-a:a):new ye(a,r<0?-n:n)},exp:function(){let e=Math.exp(this.re);return this.im===0?new ye(e,0):new ye(e*Math.cos(this.im),e*Math.sin(this.im))},expm1:function(){let e=this.re,r=this.im;return new ye(Math.expm1(e)*Math.cos(r)+CY(r),Math.exp(e)*Math.sin(r))},log:function(){let e=this.re,r=this.im;return r===0&&e>0?new ye(Math.log(e),0):new ye(B1(e,r),Math.atan2(r,e))},abs:function(){return _1(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){let e=this.re,r=this.im;return new ye(Math.sin(e)*mn(r),Math.cos(e)*va(r))},cos:function(){let e=this.re,r=this.im;return new ye(Math.cos(e)*mn(r),-Math.sin(e)*va(r))},tan:function(){let e=2*this.re,r=2*this.im,t=Math.cos(e)+mn(r);return new ye(Math.sin(e)/t,va(r)/t)},cot:function(){let e=2*this.re,r=2*this.im,t=Math.cos(e)-mn(r);return new ye(-Math.sin(e)/t,va(r)/t)},sec:function(){let e=this.re,r=this.im,t=.5*mn(2*r)+.5*Math.cos(2*e);return new ye(Math.cos(e)*mn(r)/t,Math.sin(e)*va(r)/t)},csc:function(){let e=this.re,r=this.im,t=.5*mn(2*r)-.5*Math.cos(2*e);return new ye(Math.sin(e)*mn(r)/t,-Math.cos(e)*va(r)/t)},asin:function(){let e=this.re,r=this.im,t=new ye(r*r-e*e+1,-2*e*r).sqrt(),n=new ye(t.re-r,t.im+e).log();return new ye(n.im,-n.re)},acos:function(){let e=this.re,r=this.im,t=new ye(r*r-e*e+1,-2*e*r).sqrt(),n=new ye(t.re-r,t.im+e).log();return new ye(Math.PI/2-n.im,n.re)},atan:function(){let e=this.re,r=this.im;if(e===0){if(r===1)return new ye(0,1/0);if(r===-1)return new ye(0,-1/0)}let t=e*e+(1-r)*(1-r),n=new ye((1-r*r-e*e)/t,-2*e/t).log();return new ye(-.5*n.im,.5*n.re)},acot:function(){let e=this.re,r=this.im;if(r===0)return new ye(Math.atan2(1,e),0);let t=e*e+r*r;return t!==0?new ye(e/t,-r/t).atan():new ye(e!==0?e/0:0,r!==0?-r/0:0).atan()},asec:function(){let e=this.re,r=this.im;if(e===0&&r===0)return new ye(0,1/0);let t=e*e+r*r;return t!==0?new ye(e/t,-r/t).acos():new ye(e!==0?e/0:0,r!==0?-r/0:0).acos()},acsc:function(){let e=this.re,r=this.im;if(e===0&&r===0)return new ye(Math.PI/2,1/0);let t=e*e+r*r;return t!==0?new ye(e/t,-r/t).asin():new ye(e!==0?e/0:0,r!==0?-r/0:0).asin()},sinh:function(){let e=this.re,r=this.im;return new ye(va(e)*Math.cos(r),mn(e)*Math.sin(r))},cosh:function(){let e=this.re,r=this.im;return new ye(mn(e)*Math.cos(r),va(e)*Math.sin(r))},tanh:function(){let e=2*this.re,r=2*this.im,t=mn(e)+Math.cos(r);return new ye(va(e)/t,Math.sin(r)/t)},coth:function(){let e=2*this.re,r=2*this.im,t=mn(e)-Math.cos(r);return new ye(va(e)/t,-Math.sin(r)/t)},csch:function(){let e=this.re,r=this.im,t=Ma Line truncated
\`,S=0;S<x;S++)for(var N=this._ptr[S],w=this._ptr[S+1],F=N;F<w;F++){var C=this._index[F];b+=\`
(\`+er(C,v)+", "+er(S,v)+") ==> "+(this._values?er(this._values[F],v):"X")}return b},a.prototype.toString=function(){return er(this.toArray())},a.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},a.prototype.diagonal=function(v){if(v){if(Ze(v)&&(v=v.toNumber()),!Qe(v)||!ze(v))throw new TypeError("The parameter k must be an integer number")}else v=0;var y=v>0?v:0,x=v<0?-v:0,A=this._size[0],b=this._size[1],S=Math.min(A-x,b-y),N=[],w=[],F=[];F[0]=0;for(var C=y;C<b&&N.length<S;C++)for(var E=this._ptr[C],M=this._ptr[C+1],B=E;B<M;B++){var P=this._index[B];if(P===C-y+x){N.push(this._values[B]),w[N.length-1]=P-x;break}}return F.push(N.length),new a({values:N,index:w,ptr:F,size:[S,1]})},a.fromJSON=function(v){return new a(v)},a.diagonal=function(v,y,x,A,b){if(!yr(v))throw new TypeError("Array expected, size parameter");if(v.length!==2)throw new Error("Only two dimensions matrix are supported");if(v=v.map(function(k){if(Ze(k)&&(k=k.toNumber()),!Qe(k)||!ze(k)||k<1)throw new Error("Size values must be positive integers");return k}),x){if(Ze(x)&&(x=x.toNumber()),!Qe(x)||!ze(x))throw new TypeError("The parameter k must be an integer number")}else x=0;var S=t,N=0;lt(b)&&(S=r.find(t,[b,b])||t,N=r.convert(0,b));var w=x>0?x:0,F=x<0?-x:0,C=v[0],E=v[1],M=Math.min(C-F,E-w),B;if(yr(y)){if(y.length!==M)throw new Error("Invalid value array length");B=function(re){return y[re]}}else if(We(y)){var P=y.size();if(P.length!==1||P[0]!==M)throw new Error("Invalid matrix length");B=function(re){return y.get([re])}}else B=function(){return y};for(var U=[],z=[],q=[],R=0;R<E;R++){q.push(U.length);var I=R-w;if(I>=0&&I<M){var G=B(I);S(G,N)||(z.push(I+F),U.push(G))}}return q.push(U.length),new a({values:U,index:z,ptr:q,size:[C,E]})},a.prototype.swapRows=function(v,y){if(!Qe(v)||!ze(v)||!Qe(y)||!ze(y))throw new Error("Row index must be positive integers");if(this._size.length!==2)throw new Error("Only two dimensional matrix is supported");return Hr(v,this._size[0]),Hr(y,this._size[0]),a._swapRows(v,y,this._size[1],this._values,this._index,this._ptr),this},a._forEachRow=function(v,y,x,A,b){for(var S=A[v],N=A[v+1],w=S;w<N;w++)b(x[w],y[w])},a._swapRows=function(v,y,x,A,b,S){for(var N=0;N<x;N++){var w=S[N],F=S[N+1],C=s(v,w,F,b),E=s(y,w,F,b);if(C<F&&E<F&&b[C]===v&&b[E]===y){if(A){var M=A[C];A[C]=A[E],A[E]=M}continue}if(C<F&&b[C]===v&&(E>=F||b[E]!==y)){var B=A?A[C]:void 0;b.splice(E,0,y),A&&A.splice(E,0,B),b.splice(E<=C?C+1:C,1),A&&A.splice(E<=C?C+1:C,1);continue}if(E<F&&b[E]===y&&(C>=F||b[C]!==v)){var P=A?A[E]:void 0;b.splice(C,0,v),A&&A.splice(C,0,P),b.splice(C<=E?E+1:E,1),A&&A.splice(C<=E?E+1:E,1)}}},a},{isClass:!0});var MH="number",CH=["typed"];function TH(e){var r=e.match(/(0[box])([0-9a-fA-F]*)\\.([0-9a-fA-F]*)/);if(r){var t={"0b":2,"0o":8,"0x":16}[r[1]],n=r[2],a=r[3];return{input:e,radix:t,integerPart:n,fractionalPart:a}}else return null}function FH(e){for(var r=parseInt(e.integerPart,e.radix),t=0,n=0;n<e.fractionalPart.length;n++){var a=parseInt(e.fractionalPart[n],e.radix);t+=a/Math.pow(e.radix,n+1)}var i=r+t;if(isNaN(i))throw new SyntaxError('String "'+e.input+'" is not a valid number');return i}var em=T(MH,CH,e=>{var{typed:r}=e,t=r("number",{"":function(){return 0},number:function(a){return a},string:function(a){if(a==="NaN")return NaN;var i=TH(a);if(i)return FH(i);var o=0,f=a.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);f&&(o=Number(f[2]),a=f[1]);var u=Number(a);if(isNaN(u))throw new SyntaxError('String "'+a+'" is not a valid number');if(f){if(u>2**o-1)throw new SyntaxError('String "'.concat(a,'" is out of range'));u>=2**(o-1)&&(u=u-2**o)}return u},BigNumber:function(a){return a.toNumber()},Fraction:function(a){return a.valueOf()},Unit:r.referToSelf(n=>a=>{var i=a.clone();return i.value=n(a.value),i}),null:function(a){return 0},"Unit, string | Unit":function(a,i){return a.toNumber(i)},"Array | Matrix":r.referToSelf(n=>a=>Ge(a,n))});return t.fromJSON=function(n){return parseFloat(n.value)},t});var UM="string",OH=["typed"],rm=T(UM,OH,e=>{var{typed:r}=e;return r(UM,{"":function(){return""},number:Ba,null:function(n){return"null"},boolean:function(n){return n+""},string:function(n){return n},"Array | Matrix":r.referToSelf(t=>n=>Ge(n,t)),any:function(n){return String(n)}})});var zM="boolean",_H=["typed"],tm=T(zM,_H,e=>{var{typed:r}=e;return r(zM,{"":function(){return!1},boolean:function(n){return n},number:function(n){return!!n},null:function(n){return!1},BigNumber:function(n){return!n.isZero()},string:function(n){var a=n.toLowerCase();if(a==="true")return!0;if(a==="false")return!1;var i=Number(n);if(n!==""&&!isNaN(i))return!!i;throw new Error('Cannot convert "'+n+'" to a boolean')},"Array | Matrix":r.referToSelf(t=>n=>Ge(n,t))})});var BH="bignumber",IH=["typed","BigNumber"],nm=T(BH,IH,e=>{var{typed:r,BigNumber:t}=e;return r("bignumber",{"":function(){return new t(0)},number:function(a){return new t(a+"")},string:function(a){var i=a.match(/(0[box Line truncated
(\`+er(C,v)+", "+er(S,v)+") ==> "+(this._values?er(this._values[F],v):"X")}return b},a.prototype.toString=function(){return er(this.toArray())},a.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},a.prototype.diagonal=function(v){if(v){if(Ze(v)&&(v=v.toNumber()),!Qe(v)||!ze(v))throw new TypeError("The parameter k must be an integer number")}else v=0;var y=v>0?v:0,x=v<0?-v:0,A=this._size[0],b=this._size[1],S=Math.min(A-x,b-y),N=[],w=[],F=[];F[0]=0;for(var C=y;C<b&&N.length<S;C++)for(var E=this._ptr[C],M=this._ptr[C+1],B=E;B<M;B++){var R=this._index[B];if(R===C-y+x){N.push(this._values[B]),w[N.length-1]=R-x;break}}return F.push(N.length),new a({values:N,index:w,ptr:F,size:[S,1]})},a.fromJSON=function(v){return new a(v)},a.diagonal=function(v,y,x,A,b){if(!yr(v))throw new TypeError("Array expected, size parameter");if(v.length!==2)throw new Error("Only two dimensions matrix are supported");if(v=v.map(function(k){if(Ze(k)&&(k=k.toNumber()),!Qe(k)||!ze(k)||k<1)throw new Error("Size values must be positive integers");return k}),x){if(Ze(x)&&(x=x.toNumber()),!Qe(x)||!ze(x))throw new TypeError("The parameter k must be an integer number")}else x=0;var S=t,N=0;lt(b)&&(S=r.find(t,[b,b])||t,N=r.convert(0,b));var w=x>0?x:0,F=x<0?-x:0,C=v[0],E=v[1],M=Math.min(C-F,E-w),B;if(yr(y)){if(y.length!==M)throw new Error("Invalid value array length");B=function(re){return y[re]}}else if(We(y)){var R=y.size();if(R.length!==1||R[0]!==M)throw new Error("Invalid matrix length");B=function(re){return y.get([re])}}else B=function(){return y};for(var U=[],z=[],q=[],P=0;P<E;P++){q.push(U.length);var I=P-w;if(I>=0&&I<M){var V=B(I);S(V,N)||(z.push(I+F),U.push(V))}}return q.push(U.length),new a({values:U,index:z,ptr:q,size:[C,E]})},a.prototype.swapRows=function(v,y){if(!Qe(v)||!ze(v)||!Qe(y)||!ze(y))throw new Error("Row index must be positive integers");if(this._size.length!==2)throw new Error("Only two dimensional matrix is supported");return Hr(v,this._size[0]),Hr(y,this._size[0]),a._swapRows(v,y,this._size[1],this._values,this._index,this._ptr),this},a._forEachRow=function(v,y,x,A,b){for(var S=A[v],N=A[v+1],w=S;w<N;w++)b(x[w],y[w])},a._swapRows=function(v,y,x,A,b,S){for(var N=0;N<x;N++){var w=S[N],F=S[N+1],C=s(v,w,F,b),E=s(y,w,F,b);if(C<F&&E<F&&b[C]===v&&b[E]===y){if(A){var M=A[C];A[C]=A[E],A[E]=M}continue}if(C<F&&b[C]===v&&(E>=F||b[E]!==y)){var B=A?A[C]:void 0;b.splice(E,0,y),A&&A.splice(E,0,B),b.splice(E<=C?C+1:C,1),A&&A.splice(E<=C?C+1:C,1);continue}if(E<F&&b[E]===y&&(C>=F||b[C]!==v)){var R=A?A[E]:void 0;b.splice(C,0,v),A&&A.splice(C,0,R),b.splice(C<=E?E+1:E,1),A&&A.splice(C<=E?E+1:E,1)}}},a},{isClass:!0});var MH="number",CH=["typed"];function TH(e){var r=e.match(/(0[box])([0-9a-fA-F]*)\\.([0-9a-fA-F]*)/);if(r){var t={"0b":2,"0o":8,"0x":16}[r[1]],n=r[2],a=r[3];return{input:e,radix:t,integerPart:n,fractionalPart:a}}else return null}function FH(e){for(var r=parseInt(e.integerPart,e.radix),t=0,n=0;n<e.fractionalPart.length;n++){var a=parseInt(e.fractionalPart[n],e.radix);t+=a/Math.pow(e.radix,n+1)}var i=r+t;if(isNaN(i))throw new SyntaxError('String "'+e.input+'" is not a valid number');return i}var em=T(MH,CH,e=>{var{typed:r}=e,t=r("number",{"":function(){return 0},number:function(a){return a},string:function(a){if(a==="NaN")return NaN;var i=TH(a);if(i)return FH(i);var o=0,f=a.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);f&&(o=Number(f[2]),a=f[1]);var u=Number(a);if(isNaN(u))throw new SyntaxError('String "'+a+'" is not a valid number');if(f){if(u>2**o-1)throw new SyntaxError('String "'.concat(a,'" is out of range'));u>=2**(o-1)&&(u=u-2**o)}return u},BigNumber:function(a){return a.toNumber()},Fraction:function(a){return a.valueOf()},Unit:r.referToSelf(n=>a=>{var i=a.clone();return i.value=n(a.value),i}),null:function(a){return 0},"Unit, string | Unit":function(a,i){return a.toNumber(i)},"Array | Matrix":r.referToSelf(n=>a=>Ge(a,n))});return t.fromJSON=function(n){return parseFloat(n.value)},t});var UM="string",OH=["typed"],rm=T(UM,OH,e=>{var{typed:r}=e;return r(UM,{"":function(){return""},number:Ba,null:function(n){return"null"},boolean:function(n){return n+""},string:function(n){return n},"Array | Matrix":r.referToSelf(t=>n=>Ge(n,t)),any:function(n){return String(n)}})});var zM="boolean",_H=["typed"],tm=T(zM,_H,e=>{var{typed:r}=e;return r(zM,{"":function(){return!1},boolean:function(n){return n},number:function(n){return!!n},null:function(n){return!1},BigNumber:function(n){return!n.isZero()},string:function(n){var a=n.toLowerCase();if(a==="true")return!0;if(a==="false")return!1;var i=Number(n);if(n!==""&&!isNaN(i))return!!i;throw new Error('Cannot convert "'+n+'" to a boolean')},"Array | Matrix":r.referToSelf(t=>n=>Ge(n,t))})});var BH="bignumber",IH=["typed","BigNumber"],nm=T(BH,IH,e=>{var{typed:r,BigNumber:t}=e;return r("bignumber",{"":function(){return new t(0)},number:function(a){return new t(a+"")},string:function(a){var i=a.match(/(0[box Line truncated
\`)}toJSON(){return{mathjs:yh,blocks:this.blocks}}static fromJSON(i){return new n(i.blocks)}_toHTML(i){return this.blocks.map(function(o){return o.node.toHTML(i)+(o.visible?"":'<span class="math-separator">;</span>')}).join('<span class="math-separator"><br /></span>')}_toTex(i){return this.blocks.map(function(o){return o.node.toTex(i)+(o.visible?"":";")}).join(\`\\\\;\\\\;
\`)}}return Lr(n,"name",yh),n},{isClass:!0,isNode:!0});var bh="ConditionalNode",lK=["Node"],wh=T(bh,lK,e=>{var{Node:r}=e;function t(a){if(typeof a=="number"||typeof a=="boolean"||typeof a=="string")return!!a;if(a){if(Ze(a))return!a.isZero();if(Lt(a))return!!(a.re||a.im);if(Ft(a))return!!a.value}if(a==null)return!1;throw new TypeError('Unsupported type of condition "'+wr(a)+'"')}class n extends r{constructor(i,o,f){if(super(),!vr(i))throw new TypeError("Parameter condition must be a Node");if(!vr(o))throw new TypeError("Parameter trueExpr must be a Node");if(!vr(f))throw new TypeError("Parameter falseExpr must be a Node");this.condition=i,this.trueExpr=o,this.falseExpr=f}get type(){return bh}get isConditionalNode(){return!0}_compile(i,o){var f=this.condition._compile(i,o),u=this.trueExpr._compile(i,o),s=this.falseExpr._compile(i,o);return function(m,p,h){return t(f(m,p,h))?u(m,p,h):s(m,p,h)}}forEach(i){i(this.condition,"condition",this),i(this.trueExpr,"trueExpr",this),i(this.falseExpr,"falseExpr",this)}map(i){return new n(this._ifNode(i(this.condition,"condition",this)),this._ifNode(i(this.trueExpr,"trueExpr",this)),this._ifNode(i(this.falseExpr,"falseExpr",this)))}clone(){return new n(this.condition,this.trueExpr,this.falseExpr)}_toString(i){var o=i&&i.parenthesis?i.parenthesis:"keep",f=Yr(this,o,i&&i.implicit),u=this.condition.toString(i),s=Yr(this.condition,o,i&&i.implicit);(o==="all"||this.condition.type==="OperatorNode"||s!==null&&s<=f)&&(u="("+u+")");var c=this.trueExpr.toString(i),m=Yr(this.trueExpr,o,i&&i.implicit);(o==="all"||this.trueExpr.type==="OperatorNode"||m!==null&&m<=f)&&(c="("+c+")");var p=this.falseExpr.toString(i),h=Yr(this.falseExpr,o,i&&i.implicit);return(o==="all"||this.falseExpr.type==="OperatorNode"||h!==null&&h<=f)&&(p="("+p+")"),u+" ? "+c+" : "+p}toJSON(){return{mathjs:bh,condition:this.condition,trueExpr:this.trueExpr,falseExpr:this.falseExpr}}static fromJSON(i){return new n(i.condition,i.trueExpr,i.falseExpr)}_toHTML(i){var o=i&&i.parenthesis?i.parenthesis:"keep",f=Yr(this,o,i&&i.implicit),u=this.condition.toHTML(i),s=Yr(this.condition,o,i&&i.implicit);(o==="all"||this.condition.type==="OperatorNode"||s!==null&&s<=f)&&(u='<span class="math-parenthesis math-round-parenthesis">(</span>'+u+'<span class="math-parenthesis math-round-parenthesis">)</span>');var c=this.trueExpr.toHTML(i),m=Yr(this.trueExpr,o,i&&i.implicit);(o==="all"||this.trueExpr.type==="OperatorNode"||m!==null&&m<=f)&&(c='<span class="math-parenthesis math-round-parenthesis">(</span>'+c+'<span class="math-parenthesis math-round-parenthesis">)</span>');var p=this.falseExpr.toHTML(i),h=Yr(this.falseExpr,o,i&&i.implicit);return(o==="all"||this.falseExpr.type==="OperatorNode"||h!==null&&h<=f)&&(p='<span class="math-parenthesis math-round-parenthesis">(</span>'+p+'<span class="math-parenthesis math-round-parenthesis">)</span>'),u+'<span class="math-operator math-conditional-operator">?</span>'+c+'<span class="math-operator math-conditional-operator">:</span>'+p}_toTex(i){return"\\\\begin{cases} {"+this.trueExpr.toTex(i)+"}, &\\\\quad{\\\\text{if }\\\\;"+this.condition.toTex(i)+"}\\\\\\\\{"+this.falseExpr.toTex(i)+"}, &\\\\quad{\\\\text{otherwise}}\\\\end{cases}"}}return Lr(n,"name",bh),n},{isClass:!0,isNode:!0});var WT=Gn(UT(),1);var Gb={Alpha:"A",alpha:"\\\\alpha",Beta:"B",beta:"\\\\beta",Gamma:"\\\\Gamma",gamma:"\\\\gamma",Delta:"\\\\Delta",delta:"\\\\delta",Epsilon:"E",epsilon:"\\\\epsilon",varepsilon:"\\\\varepsilon",Zeta:"Z",zeta:"\\\\zeta",Eta:"H",eta:"\\\\eta",Theta:"\\\\Theta",theta:"\\\\theta",vartheta:"\\\\vartheta",Iota:"I",iota:"\\\\iota",Kappa:"K",kappa:"\\\\kappa",varkappa:"\\\\varkappa",Lambda:"\\\\Lambda",lambda:"\\\\lambda",Mu:"M",mu:"\\\\mu",Nu:"N",nu:"\\\\nu",Xi:"\\\\Xi",xi:"\\\\xi",Omicron:"O",omicron:"o",Pi:"\\\\Pi",pi:"\\\\pi",varpi:"\\\\varpi",Rho:"P",rho:"\\\\rho",varrho:"\\\\varrho",Sigma:"\\\\Sigma",sigma:"\\\\sigma",varsigma:"\\\\varsigma",Tau:"T",tau:"\\\\tau",Upsilon:"\\\\Upsilon",upsilon:"\\\\upsilon",Phi:"\\\\Phi",phi:"\\\\phi",varphi:"\\\\varphi",Chi:"X",chi:"\\\\chi",Psi:"\\\\Psi",psi:"\\\\psi",Omega:"\\\\Omega",omega:"\\\\omega",true:"\\\\mathrm{True}",false:"\\\\mathrm{False}",i:"i",inf:"\\\\infty",Inf:"\\\\infty",infinity:"\\\\infty",Infinity:"\\\\infty",oo:"\\\\infty",lim:"\\\\lim",undefined:"\\\\mathbf{?}"},Pr={transpose:"^\\\\top",ctranspose:"^H",factorial:"!",pow:"^",dotPow:".^\\\\wedge",unaryPlus:"+",unaryMinus:"-",bitNot:"\\\\~",not:"\\\\neg",multiply:"\\\\cdot",divide:"\\\\frac",dotMultiply:".\\\\cdot",dotDivide:".:",mod:"\\\\mod",add:"+",subtract:"-",to:"\\\\rightarrow",leftShift:"<<",rightArithShift:">>",rightLogShift:">>>",equal:"=",unequal:"\\\\neq",smaller:"<",larger:">",smallerEq:"\\\\leq",largerEq:"\\\\geq",bitAnd:"\\\\&",bitXor:"\\\\underline{|}",bitOr:"|",and:"\\\\wedge",xor:"\\\\veebar",or:"\\\\vee"},Vb={abs:{1:"\\\\left|\${args[0]}\\\\right|"},add:{2:"\\\\left(\${args[0]}".concat(Pr.add,"\${args[1]}\\\\right)")},cbrt:{1:"\\\\sqrt[3]{\${args[0]}}"},ceil:{1:"\\\\left\\Line truncated
\`)+"\\\\end{array}\\\\right\\\\}";return f}}return Lr(t,"name",Fh),t},{isClass:!0,isNode:!0});function jo(e,r){return new zs(e,new $o(r),new Set(Object.keys(r)))}var _h="OperatorNode",xK=["Node"],Bh=T(_h,xK,e=>{var{Node:r}=e;function t(i,o){var f=i;if(o==="auto")for(;Ut(f);)f=f.content;return lr(f)?!0:rt(f)?t(f.args[0],o):!1}function n(i,o,f,u,s){var c=Yr(i,o,f),m=xu(i,o);if(o==="all"||u.length>2&&i.getIdentifier()!=="OperatorNode:add"&&i.getIdentifier()!=="OperatorNode:multiply")return u.map(function(M){switch(M.getContent().type){case"ArrayNode":case"ConstantNode":case"SymbolNode":case"ParenthesisNode":return!1;default:return!0}});var p;switch(u.length){case 0:p=[];break;case 1:{var h=Yr(u[0],o,f,i);if(s&&h!==null){var g,v;if(o==="keep"?(g=u[0].getIdentifier(),v=i.getIdentifier()):(g=u[0].getContent().getIdentifier(),v=i.getContent().getIdentifier()),wa[c][v].latexLeftParens===!1){p=[!1];break}if(wa[h][g].latexParens===!1){p=[!1];break}}if(h===null){p=[!1];break}if(h<=c){p=[!0];break}p=[!1]}break;case 2:{var y,x=Yr(u[0],o,f,i),A=hh(i,u[0],o);x===null?y=!1:x===c&&m==="right"&&!A||x<c?y=!0:y=!1;var b,S=Yr(u[1],o,f,i),N=hh(i,u[1],o);if(S===null?b=!1:S===c&&m==="left"&&!N||S<c?b=!0:b=!1,s){var w,F,C;o==="keep"?(w=i.getIdentifier(),F=i.args[0].getIdentifier(),C=i.args[1].getIdentifier()):(w=i.getContent().getIdentifier(),F=i.args[0].getContent().getIdentifier(),C=i.args[1].getContent().getIdentifier()),x!==null&&(wa[c][w].latexLeftParens===!1&&(y=!1),wa[x][F].latexParens===!1&&(y=!1)),S!==null&&(wa[c][w].latexRightParens===!1&&(b=!1),wa[S][C].latexParens===!1&&(b=!1))}p=[y,b]}break;default:(i.getIdentifier()==="OperatorNode:add"||i.getIdentifier()==="OperatorNode:multiply")&&(p=u.map(function(M){var B=Yr(M,o,f,i),P=hh(i,M,o),U=xu(M,o);return B===null?!1:c===B&&m===U&&!P?!0:B<c}));break}if(u.length>=2&&i.getIdentifier()==="OperatorNode:multiply"&&i.implicit&&o!=="all"&&f==="hide")for(var E=1;E<p.length;++E)t(u[E],o)&&!p[E-1]&&(o!=="keep"||!Ut(u[E-1]))&&(p[E]=!0);return p}class a extends r{constructor(o,f,u,s,c){if(super(),typeof o!="string")throw new TypeError('string expected for parameter "op"');if(typeof f!="string")throw new TypeError('string expected for parameter "fn"');if(!Array.isArray(u)||!u.every(vr))throw new TypeError('Array containing Nodes expected for parameter "args"');this.implicit=s===!0,this.isPercentage=c===!0,this.op=o,this.fn=f,this.args=u||[]}get type(){return _h}get isOperatorNode(){return!0}_compile(o,f){if(typeof this.fn!="string"||!gl(o,this.fn))throw o[this.fn]?new Error('No access to function "'+this.fn+'"'):new Error("Function "+this.fn+' missing in provided namespace "math"');var u=st(o,this.fn),s=Pn(this.args,function(g){return g._compile(o,f)});if(typeof u=="function"&&u.rawArgs===!0){var c=this.args;return function(v,y,x){return u(c,o,jo(v,y))}}else if(s.length===1){var m=s[0];return function(v,y,x){return u(m(v,y,x))}}else if(s.length===2){var p=s[0],h=s[1];return function(v,y,x){return u(p(v,y,x),h(v,y,x))}}else return function(v,y,x){return u.apply(null,Pn(s,function(A){return A(v,y,x)}))}}forEach(o){for(var f=0;f<this.args.length;f++)o(this.args[f],"args["+f+"]",this)}map(o){for(var f=[],u=0;u<this.args.length;u++)f[u]=this._ifNode(o(this.args[u],"args["+u+"]",this));return new a(this.op,this.fn,f,this.implicit,this.isPercentage)}clone(){return new a(this.op,this.fn,this.args.slice(0),this.implicit,this.isPercentage)}isUnary(){return this.args.length===1}isBinary(){return this.args.length===2}_toString(o){var f=o&&o.parenthesis?o.parenthesis:"keep",u=o&&o.implicit?o.implicit:"hide",s=this.args,c=n(this,f,u,s,!1);if(s.length===1){var m=xu(this,f),p=s[0].toString(o);c[0]&&(p="("+p+")");var h=/[a-zA-Z]+/.test(this.op);return m==="right"?this.op+(h?" ":"")+p:m==="left"?p+(h?" ":"")+this.op:p+this.op}else if(s.length===2){var g=s[0].toString(o),v=s[1].toString(o);return c[0]&&(g="("+g+")"),c[1]&&(v="("+v+")"),this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&u==="hide"?g+" "+v:g+" "+this.op+" "+v}else if(s.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")){var y=s.map(function(x,A){return x=x.toString(o),c[A]&&(x="("+x+")"),x});return this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&u==="hide"?y.join(" "):y.join(" "+this.op+" ")}else return this.fn+"("+this.args.join(", ")+")"}toJSON(){return{mathjs:_h,op:this.op,fn:this.fn,args:this.args,implicit:this.implicit,isPercentage:this.isPercentage}}static fromJSON(o){return new a(o.op,o.fn,o.args,o.implicit,o.isPercentage)}_toHTML(o){var f=o&&o.parenthesis?o.parenthesis:"keep",u=o&&o.implicit?o.implicit:"hide",s=this.args,c=n(this,f,u,s,!1);if(s.length===1){var m=xu(this,f),p=s[0].toHTML(o);return c[0]&&(p='<span class="math-parenthesis math-round-parenthesis">(</span>'+p+'<span class="math-parenthesis math-round-parenthesis">)</span>'),m==="right"?'<span class="math-operator math-unary-operator math-lefthand-unary-operator">'+Wt(this.op)+"</span>"+p:p+'< Line truncated
\`).concat(i(E)))};if(g){var y=this.args;return function(E,M,B){var P=v(E);return P(y,s,jo(E,M))}}else switch(m.length){case 0:return function(E,M,B){var P=v(E);return P()};case 1:return function(E,M,B){var P=v(E),U=m[0];return P(U(E,M,B))};case 2:return function(E,M,B){var P=v(E),U=m[0],z=m[1];return P(U(E,M,B),z(E,M,B))};default:return function(E,M,B){var P=v(E),U=m.map(z=>z(E,M,B));return P(...U)}}}}else if(En(this.fn)&&Bn(this.fn.index)&&this.fn.index.isObjectProperty()){var A=this.fn.object._compile(s,c),b=this.fn.index.getObjectProperty(),S=this.args;return function(E,M,B){var P=A(E,M,B),U=$E(P,b);if(U!=null&&U.rawArgs)return U(S,s,jo(E,M));var z=m.map(q=>q(E,M,B));return U.apply(P,z)}}else{var N=this.fn.toString(),w=this.fn._compile(s,c),F=this.args;return function(E,M,B){var P=w(E,M,B);if(typeof P!="function")throw new TypeError("Expression '".concat(N,"' did not evaluate to a function; value is:")+\`
\`.concat(i(P)));if(P.rawArgs)return P(F,s,jo(E,M));var U=m.map(z=>z(E,M,B));return P.apply(P,U)}}}forEach(s){s(this.fn,"fn",this);for(var c=0;c<this.args.length;c++)s(this.args[c],"args["+c+"]",this)}map(s){for(var c=this._ifNode(s(this.fn,"fn",this)),m=[],p=0;p<this.args.length;p++)m[p]=this._ifNode(s(this.args[p],"args["+p+"]",this));return new f(c,m)}clone(){return new f(this.fn,this.args.slice(0))}toString(s){var c,m=this.fn.toString(s);return s&&typeof s.handler=="object"&&Ye(s.handler,m)&&(c=s.handler[m](this,s)),typeof c<"u"?c:super.toString(s)}_toString(s){var c=this.args.map(function(p){return p.toString(s)}),m=da(this.fn)?"("+this.fn.toString(s)+")":this.fn.toString(s);return m+"("+c.join(", ")+")"}toJSON(){return{mathjs:zh,fn:this.fn,args:this.args}}_toHTML(s){var c=this.args.map(function(m){return m.toHTML(s)});return'<span class="math-function">'+Wt(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+c.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'}toTex(s){var c;return s&&typeof s.handler=="object"&&Ye(s.handler,this.name)&&(c=s.handler[this.name](this,s)),typeof c<"u"?c:super.toTex(s)}_toTex(s){var c=this.args.map(function(h){return h.toTex(s)}),m;Vb[this.name]&&(m=Vb[this.name]),t[this.name]&&(typeof t[this.name].toTex=="function"||typeof t[this.name].toTex=="object"||typeof t[this.name].toTex=="string")&&(m=t[this.name].toTex);var p;switch(typeof m){case"function":p=m(this,s);break;case"string":p=o(m,this,s);break;case"object":switch(typeof m[c.length]){case"function":p=m[c.length](this,s);break;case"string":p=o(m[c.length],this,s);break}}return typeof p<"u"?p:o(YT,this,s)}getIdentifier(){return this.type+":"+this.name}}return r=f,Lr(f,"name",zh),Lr(f,"onUndefinedFunction",function(u){throw new Error("Undefined function "+u)}),Lr(f,"fromJSON",function(u){return new r(u.fn,u.args)}),f},{isClass:!0,isNode:!0});var HT="parse",EK=["typed","numeric","config","AccessorNode","ArrayNode","AssignmentNode","BlockNode","ConditionalNode","ConstantNode","FunctionAssignmentNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","RangeNode","RelationalNode","SymbolNode"],Yh=T(HT,EK,e=>{var{typed:r,numeric:t,config:n,AccessorNode:a,ArrayNode:i,AssignmentNode:o,BlockNode:f,ConditionalNode:u,ConstantNode:s,FunctionAssignmentNode:c,FunctionNode:m,IndexNode:p,ObjectNode:h,OperatorNode:g,ParenthesisNode:v,RangeNode:y,RelationalNode:x,SymbolNode:A}=e,b=r(HT,{string:function(H){return se(H,{})},"Array | Matrix":function(H){return S(H,{})},"string, Object":function(H,ie){var Ee=ie.nodes!==void 0?ie.nodes:{};return se(H,Ee)},"Array | Matrix, Object":S});function S(_){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ie=H.nodes!==void 0?H.nodes:{};return Ge(_,function(Ee){if(typeof Ee!="string")throw new TypeError("String expected");return se(Ee,ie)})}var N={NULL:0,DELIMITER:1,NUMBER:2,SYMBOL:3,UNKNOWN:4},w={",":!0,"(":!0,")":!0,"[":!0,"]":!0,"{":!0,"}":!0,'"':!0,"'":!0,";":!0,"+":!0,"-":!0,"*":!0,".*":!0,"/":!0,"./":!0,"%":!0,"^":!0,".^":!0,"~":!0,"!":!0,"&":!0,"|":!0,"^|":!0,"=":!0,":":!0,"?":!0,"==":!0,"!=":!0,"<":!0,">":!0,"<=":!0,">=":!0,"<<":!0,">>":!0,">>>":!0},F={mod:!0,to:!0,in:!0,and:!0,xor:!0,or:!0,not:!0},C={true:!0,false:!1,null:null,undefined:void 0},E=["NaN","Infinity"],M={'"':'"',"'":"'","\\\\":"\\\\","/":"/",b:"\\b",f:"\\f",n:\`
\`,r:"\\r",t:" "};function B(){return{extraNodes:{},expression:"",comment:"",index:0,token:"",tokenType:N.NULL,nestingLevel:0,conditionalLevel:null}}function P(_,H){return _.expression.substr(_.index,H)}function U(_){return P(_,1)}function z(_){_.index++}function q(_){return _.expression.charAt(_.index-1)}function R(_){return _.expression.charAt(_.index+1)}function I(_){for(_.tokenType=N.NULL,_.token="",_.comment="";;){if(U(_)==="#")for(;U(_)!==\`
\`)+"\\\\end{array}\\\\right\\\\}";return f}}return Lr(t,"name",Fh),t},{isClass:!0,isNode:!0});function jo(e,r){return new zs(e,new $o(r),new Set(Object.keys(r)))}var _h="OperatorNode",xK=["Node"],Bh=T(_h,xK,e=>{var{Node:r}=e;function t(i,o){var f=i;if(o==="auto")for(;Ut(f);)f=f.content;return lr(f)?!0:rt(f)?t(f.args[0],o):!1}function n(i,o,f,u,s){var c=Yr(i,o,f),m=xu(i,o);if(o==="all"||u.length>2&&i.getIdentifier()!=="OperatorNode:add"&&i.getIdentifier()!=="OperatorNode:multiply")return u.map(function(M){switch(M.getContent().type){case"ArrayNode":case"ConstantNode":case"SymbolNode":case"ParenthesisNode":return!1;default:return!0}});var p;switch(u.length){case 0:p=[];break;case 1:{var h=Yr(u[0],o,f,i);if(s&&h!==null){var g,v;if(o==="keep"?(g=u[0].getIdentifier(),v=i.getIdentifier()):(g=u[0].getContent().getIdentifier(),v=i.getContent().getIdentifier()),wa[c][v].latexLeftParens===!1){p=[!1];break}if(wa[h][g].latexParens===!1){p=[!1];break}}if(h===null){p=[!1];break}if(h<=c){p=[!0];break}p=[!1]}break;case 2:{var y,x=Yr(u[0],o,f,i),A=hh(i,u[0],o);x===null?y=!1:x===c&&m==="right"&&!A||x<c?y=!0:y=!1;var b,S=Yr(u[1],o,f,i),N=hh(i,u[1],o);if(S===null?b=!1:S===c&&m==="left"&&!N||S<c?b=!0:b=!1,s){var w,F,C;o==="keep"?(w=i.getIdentifier(),F=i.args[0].getIdentifier(),C=i.args[1].getIdentifier()):(w=i.getContent().getIdentifier(),F=i.args[0].getContent().getIdentifier(),C=i.args[1].getContent().getIdentifier()),x!==null&&(wa[c][w].latexLeftParens===!1&&(y=!1),wa[x][F].latexParens===!1&&(y=!1)),S!==null&&(wa[c][w].latexRightParens===!1&&(b=!1),wa[S][C].latexParens===!1&&(b=!1))}p=[y,b]}break;default:(i.getIdentifier()==="OperatorNode:add"||i.getIdentifier()==="OperatorNode:multiply")&&(p=u.map(function(M){var B=Yr(M,o,f,i),R=hh(i,M,o),U=xu(M,o);return B===null?!1:c===B&&m===U&&!R?!0:B<c}));break}if(u.length>=2&&i.getIdentifier()==="OperatorNode:multiply"&&i.implicit&&o!=="all"&&f==="hide")for(var E=1;E<p.length;++E)t(u[E],o)&&!p[E-1]&&(o!=="keep"||!Ut(u[E-1]))&&(p[E]=!0);return p}class a extends r{constructor(o,f,u,s,c){if(super(),typeof o!="string")throw new TypeError('string expected for parameter "op"');if(typeof f!="string")throw new TypeError('string expected for parameter "fn"');if(!Array.isArray(u)||!u.every(vr))throw new TypeError('Array containing Nodes expected for parameter "args"');this.implicit=s===!0,this.isPercentage=c===!0,this.op=o,this.fn=f,this.args=u||[]}get type(){return _h}get isOperatorNode(){return!0}_compile(o,f){if(typeof this.fn!="string"||!gl(o,this.fn))throw o[this.fn]?new Error('No access to function "'+this.fn+'"'):new Error("Function "+this.fn+' missing in provided namespace "math"');var u=st(o,this.fn),s=Pn(this.args,function(g){return g._compile(o,f)});if(typeof u=="function"&&u.rawArgs===!0){var c=this.args;return function(v,y,x){return u(c,o,jo(v,y))}}else if(s.length===1){var m=s[0];return function(v,y,x){return u(m(v,y,x))}}else if(s.length===2){var p=s[0],h=s[1];return function(v,y,x){return u(p(v,y,x),h(v,y,x))}}else return function(v,y,x){return u.apply(null,Pn(s,function(A){return A(v,y,x)}))}}forEach(o){for(var f=0;f<this.args.length;f++)o(this.args[f],"args["+f+"]",this)}map(o){for(var f=[],u=0;u<this.args.length;u++)f[u]=this._ifNode(o(this.args[u],"args["+u+"]",this));return new a(this.op,this.fn,f,this.implicit,this.isPercentage)}clone(){return new a(this.op,this.fn,this.args.slice(0),this.implicit,this.isPercentage)}isUnary(){return this.args.length===1}isBinary(){return this.args.length===2}_toString(o){var f=o&&o.parenthesis?o.parenthesis:"keep",u=o&&o.implicit?o.implicit:"hide",s=this.args,c=n(this,f,u,s,!1);if(s.length===1){var m=xu(this,f),p=s[0].toString(o);c[0]&&(p="("+p+")");var h=/[a-zA-Z]+/.test(this.op);return m==="right"?this.op+(h?" ":"")+p:m==="left"?p+(h?" ":"")+this.op:p+this.op}else if(s.length===2){var g=s[0].toString(o),v=s[1].toString(o);return c[0]&&(g="("+g+")"),c[1]&&(v="("+v+")"),this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&u==="hide"?g+" "+v:g+" "+this.op+" "+v}else if(s.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")){var y=s.map(function(x,A){return x=x.toString(o),c[A]&&(x="("+x+")"),x});return this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&u==="hide"?y.join(" "):y.join(" "+this.op+" ")}else return this.fn+"("+this.args.join(", ")+")"}toJSON(){return{mathjs:_h,op:this.op,fn:this.fn,args:this.args,implicit:this.implicit,isPercentage:this.isPercentage}}static fromJSON(o){return new a(o.op,o.fn,o.args,o.implicit,o.isPercentage)}_toHTML(o){var f=o&&o.parenthesis?o.parenthesis:"keep",u=o&&o.implicit?o.implicit:"hide",s=this.args,c=n(this,f,u,s,!1);if(s.length===1){var m=xu(this,f),p=s[0].toHTML(o);return c[0]&&(p='<span class="math-parenthesis math-round-parenthesis">(</span>'+p+'<span class="math-parenthesis math-round-parenthesis">)</span>'),m==="right"?'<span class="math-operator math-unary-operator math-lefthand-unary-operator">'+Wt(this.op)+"</span>"+p:p+'< Line truncated
\`).concat(i(E)))};if(g){var y=this.args;return function(E,M,B){var R=v(E);return R(y,s,jo(E,M))}}else switch(m.length){case 0:return function(E,M,B){var R=v(E);return R()};case 1:return function(E,M,B){var R=v(E),U=m[0];return R(U(E,M,B))};case 2:return function(E,M,B){var R=v(E),U=m[0],z=m[1];return R(U(E,M,B),z(E,M,B))};default:return function(E,M,B){var R=v(E),U=m.map(z=>z(E,M,B));return R(...U)}}}}else if(En(this.fn)&&Bn(this.fn.index)&&this.fn.index.isObjectProperty()){var A=this.fn.object._compile(s,c),b=this.fn.index.getObjectProperty(),S=this.args;return function(E,M,B){var R=A(E,M,B),U=$E(R,b);if(U!=null&&U.rawArgs)return U(S,s,jo(E,M));var z=m.map(q=>q(E,M,B));return U.apply(R,z)}}else{var N=this.fn.toString(),w=this.fn._compile(s,c),F=this.args;return function(E,M,B){var R=w(E,M,B);if(typeof R!="function")throw new TypeError("Expression '".concat(N,"' did not evaluate to a function; value is:")+\`
\`.concat(i(R)));if(R.rawArgs)return R(F,s,jo(E,M));var U=m.map(z=>z(E,M,B));return R.apply(R,U)}}}forEach(s){s(this.fn,"fn",this);for(var c=0;c<this.args.length;c++)s(this.args[c],"args["+c+"]",this)}map(s){for(var c=this._ifNode(s(this.fn,"fn",this)),m=[],p=0;p<this.args.length;p++)m[p]=this._ifNode(s(this.args[p],"args["+p+"]",this));return new f(c,m)}clone(){return new f(this.fn,this.args.slice(0))}toString(s){var c,m=this.fn.toString(s);return s&&typeof s.handler=="object"&&Ye(s.handler,m)&&(c=s.handler[m](this,s)),typeof c<"u"?c:super.toString(s)}_toString(s){var c=this.args.map(function(p){return p.toString(s)}),m=da(this.fn)?"("+this.fn.toString(s)+")":this.fn.toString(s);return m+"("+c.join(", ")+")"}toJSON(){return{mathjs:zh,fn:this.fn,args:this.args}}_toHTML(s){var c=this.args.map(function(m){return m.toHTML(s)});return'<span class="math-function">'+Wt(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+c.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'}toTex(s){var c;return s&&typeof s.handler=="object"&&Ye(s.handler,this.name)&&(c=s.handler[this.name](this,s)),typeof c<"u"?c:super.toTex(s)}_toTex(s){var c=this.args.map(function(h){return h.toTex(s)}),m;Vb[this.name]&&(m=Vb[this.name]),t[this.name]&&(typeof t[this.name].toTex=="function"||typeof t[this.name].toTex=="object"||typeof t[this.name].toTex=="string")&&(m=t[this.name].toTex);var p;switch(typeof m){case"function":p=m(this,s);break;case"string":p=o(m,this,s);break;case"object":switch(typeof m[c.length]){case"function":p=m[c.length](this,s);break;case"string":p=o(m[c.length],this,s);break}}return typeof p<"u"?p:o(YT,this,s)}getIdentifier(){return this.type+":"+this.name}}return r=f,Lr(f,"name",zh),Lr(f,"onUndefinedFunction",function(u){throw new Error("Undefined function "+u)}),Lr(f,"fromJSON",function(u){return new r(u.fn,u.args)}),f},{isClass:!0,isNode:!0});var HT="parse",EK=["typed","numeric","config","AccessorNode","ArrayNode","AssignmentNode","BlockNode","ConditionalNode","ConstantNode","FunctionAssignmentNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","RangeNode","RelationalNode","SymbolNode"],Yh=T(HT,EK,e=>{var{typed:r,numeric:t,config:n,AccessorNode:a,ArrayNode:i,AssignmentNode:o,BlockNode:f,ConditionalNode:u,ConstantNode:s,FunctionAssignmentNode:c,FunctionNode:m,IndexNode:p,ObjectNode:h,OperatorNode:g,ParenthesisNode:v,RangeNode:y,RelationalNode:x,SymbolNode:A}=e,b=r(HT,{string:function(H){return se(H,{})},"Array | Matrix":function(H){return S(H,{})},"string, Object":function(H,ie){var Ee=ie.nodes!==void 0?ie.nodes:{};return se(H,Ee)},"Array | Matrix, Object":S});function S(_){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ie=H.nodes!==void 0?H.nodes:{};return Ge(_,function(Ee){if(typeof Ee!="string")throw new TypeError("String expected");return se(Ee,ie)})}var N={NULL:0,DELIMITER:1,NUMBER:2,SYMBOL:3,UNKNOWN:4},w={",":!0,"(":!0,")":!0,"[":!0,"]":!0,"{":!0,"}":!0,'"':!0,"'":!0,";":!0,"+":!0,"-":!0,"*":!0,".*":!0,"/":!0,"./":!0,"%":!0,"^":!0,".^":!0,"~":!0,"!":!0,"&":!0,"|":!0,"^|":!0,"=":!0,":":!0,"?":!0,"==":!0,"!=":!0,"<":!0,">":!0,"<=":!0,">=":!0,"<<":!0,">>":!0,">>>":!0},F={mod:!0,to:!0,in:!0,and:!0,xor:!0,or:!0,not:!0},C={true:!0,false:!1,null:null,undefined:void 0},E=["NaN","Infinity"],M={'"':'"',"'":"'","\\\\":"\\\\","/":"/",b:"\\b",f:"\\f",n:\`
\`,r:"\\r",t:" "};function B(){return{extraNodes:{},expression:"",comment:"",index:0,token:"",tokenType:N.NULL,nestingLevel:0,conditionalLevel:null}}function R(_,H){return _.expression.substr(_.index,H)}function U(_){return R(_,1)}function z(_){_.index++}function q(_){return _.expression.charAt(_.index-1)}function P(_){return _.expression.charAt(_.index+1)}function I(_){for(_.tokenType=N.NULL,_.token="",_.comment="";;){if(U(_)==="#")for(;U(_)!==\`
\`&&U(_)!=="";)_.comment+=U(_),z(_);if(b.isWhitespace(U(_),_.nestingLevel))z(_);else break}if(U(_)===""){_.tokenType=N.DELIMITER;return}if(U(_)===\`
\`&&!_.nestingLevel){_.tokenType=N.DELIMITER,_.token=U(_),z(_);return}var H=U(_),ie=P(_,2),Ee=P(_,3);if(Ee.length===3&&w[Ee]){_.tokenType=N.DELIMITER,_.token=Ee,z(_),z(_),z(_);return}if(ie.length===2&&w[ie]){_.tokenType=N.DELIMITER,_.token=ie,z(_),z(_);return}if(w[H]){_.tokenType=N.DELIMITER,_.token=H,z(_);return}if(b.isDigitDot(H)){_.tokenType=N.NUMBER;var Xe=P(_,2);if(Xe==="0b"||Xe==="0o"||Xe==="0x"){for(_.token+=U(_),z(_),_.token+=U(_),z(_);b.isHexDigit(U(_));)_.token+=U(_),z(_);if(U(_)===".")for(_.token+=".",z(_);b.isHexDigit(U(_));)_.token+=U(_),z(_);else if(U(_)==="i")for(_.token+="i",z(_);b.isDigit(U(_));)_.token+=U(_),z(_);return}if(U(_)==="."){if(_.token+=U(_),z(_),!b.isDigit(U(_))){_.tokenType=N.DELIMITER;return}}else{for(;b.isDigit(U(_));)_.token+=U(_),z(_);b.isDecimalMark(U(_),R(_))&&(_.token+=U(_),z(_))}for(;b.isDigit(U(_));)_.token+=U(_),z(_);if(U(_)==="E"||U(_)==="e"){if(b.isDigit(R(_))||R(_)==="-"||R(_)==="+"){if(_.token+=U(_),z(_),(U(_)==="+"||U(_)==="-")&&(_.token+=U(_),z(_)),!b.isDigit(U(_)))throw Ce(_,'Digit expected, got "'+U(_)+'"');for(;b.isDigit(U(_));)_.token+=U(_),z(_);if(b.isDecimalMark(U(_),R(_)))throw Ce(_,'Digit expected, got "'+U(_)+'"')}else if(R(_)===".")throw z(_),Ce(_,'Digit expected, got "'+U(_)+'"')}return}if(b.isAlpha(U(_),q(_),R(_))){for(;b.isAlpha(U(_),q(_),R(_))||b.isDigit(U(_));)_.token+=U(_),z(_);Ye(F,_.token)?_.tokenType=N.DELIMITER:_.tokenType=N.SYMBOL;return}for(_.tokenType=N.UNKNOWN;U(_)!=="";)_.token+=U(_),z(_);throw Ce(_,'Syntax error in part "'+_.token+'"')}function G(_){do I(_);while(_.token===\`
\`&&!_.nestingLevel){_.tokenType=N.DELIMITER,_.token=U(_),z(_);return}var H=U(_),ie=R(_,2),Ee=R(_,3);if(Ee.length===3&&w[Ee]){_.tokenType=N.DELIMITER,_.token=Ee,z(_),z(_),z(_);return}if(ie.length===2&&w[ie]){_.tokenType=N.DELIMITER,_.token=ie,z(_),z(_);return}if(w[H]){_.tokenType=N.DELIMITER,_.token=H,z(_);return}if(b.isDigitDot(H)){_.tokenType=N.NUMBER;var Xe=R(_,2);if(Xe==="0b"||Xe==="0o"||Xe==="0x"){for(_.token+=U(_),z(_),_.token+=U(_),z(_);b.isHexDigit(U(_));)_.token+=U(_),z(_);if(U(_)===".")for(_.token+=".",z(_);b.isHexDigit(U(_));)_.token+=U(_),z(_);else if(U(_)==="i")for(_.token+="i",z(_);b.isDigit(U(_));)_.token+=U(_),z(_);return}if(U(_)==="."){if(_.token+=U(_),z(_),!b.isDigit(U(_))){_.tokenType=N.DELIMITER;return}}else{for(;b.isDigit(U(_));)_.token+=U(_),z(_);b.isDecimalMark(U(_),P(_))&&(_.token+=U(_),z(_))}for(;b.isDigit(U(_));)_.token+=U(_),z(_);if(U(_)==="E"||U(_)==="e"){if(b.isDigit(P(_))||P(_)==="-"||P(_)==="+"){if(_.token+=U(_),z(_),(U(_)==="+"||U(_)==="-")&&(_.token+=U(_),z(_)),!b.isDigit(U(_)))throw Ce(_,'Digit expected, got "'+U(_)+'"');for(;b.isDigit(U(_));)_.token+=U(_),z(_);if(b.isDecimalMark(U(_),P(_)))throw Ce(_,'Digit expected, got "'+U(_)+'"')}else if(P(_)===".")throw z(_),Ce(_,'Digit expected, got "'+U(_)+'"')}return}if(b.isAlpha(U(_),q(_),P(_))){for(;b.isAlpha(U(_),q(_),P(_))||b.isDigit(U(_));)_.token+=U(_),z(_);Ye(F,_.token)?_.tokenType=N.DELIMITER:_.tokenType=N.SYMBOL;return}for(_.tokenType=N.UNKNOWN;U(_)!=="";)_.token+=U(_),z(_);throw Ce(_,'Syntax error in part "'+_.token+'"')}function V(_){do I(_);while(_.token===\`
\`)}function k(_){_.nestingLevel++}function re(_){_.nestingLevel--}b.isAlpha=function(H,ie,Ee){return b.isValidLatinOrGreek(H)||b.isValidMathSymbol(H,Ee)||b.isValidMathSymbol(ie,H)},b.isValidLatinOrGreek=function(H){return/^[a-zA-Z_$\\u00C0-\\u02AF\\u0370-\\u03FF\\u2100-\\u214F]$/.test(H)},b.isValidMathSymbol=function(H,ie){return/^[\\uD835]$/.test(H)&&/^[\\uDC00-\\uDFFF]$/.test(ie)&&/^[^\\uDC55\\uDC9D\\uDCA0\\uDCA1\\uDCA3\\uDCA4\\uDCA7\\uDCA8\\uDCAD\\uDCBA\\uDCBC\\uDCC4\\uDD06\\uDD0B\\uDD0C\\uDD15\\uDD1D\\uDD3A\\uDD3F\\uDD45\\uDD47-\\uDD49\\uDD51\\uDEA6\\uDEA7\\uDFCC\\uDFCD]$/.test(ie)},b.isWhitespace=function(H,ie){return H===" "||H===" "||H===\`
\`&&ie>0},b.isDecimalMark=function(H,ie){return H==="."&&ie!=="/"&&ie!=="*"&&ie!=="^"},b.isDigitDot=function(H){return H>="0"&&H<="9"||H==="."},b.isDigit=function(H){return H>="0"&&H<="9"},b.isHexDigit=function(H){return H>="0"&&H<="9"||H>="a"&&H<="f"||H>="A"&&H<="F"};function se(_,H){var ie=B();it(ie,{expression:_,extraNodes:H}),I(ie);var Ee=ee(ie);if(ie.token!=="")throw ie.tokenType===N.DELIMITER?ke(ie,"Unexpected operator "+ie.token):Ce(ie,'Unexpected part "'+ie.token+'"');return Ee}function ee(_){var H,ie=[],Ee;for(_.token!==""&&_.token!==\`
\`&&ie>0},b.isDecimalMark=function(H,ie){return H==="."&&ie!=="/"&&ie!=="*"&&ie!=="^"},b.isDigitDot=function(H){return H>="0"&&H<="9"||H==="."},b.isDigit=function(H){return H>="0"&&H<="9"},b.isHexDigit=function(H){return H>="0"&&H<="9"||H>="a"&&H<="f"||H>="A"&&H<="F"};function se(_,H){var ie=B();it(ie,{expression:_,extraNodes:H}),I(ie);var Ee=Q(ie);if(ie.token!=="")throw ie.tokenType===N.DELIMITER?ke(ie,"Unexpected operator "+ie.token):Ce(ie,'Unexpected part "'+ie.token+'"');return Ee}function Q(_){var H,ie=[],Ee;for(_.token!==""&&_.token!==\`
\`&&_.token!==";"&&(H=Y(_),_.comment&&(H.comment=_.comment));_.token===\`
\`||_.token===";";)ie.length===0&&H&&(Ee=_.token!==";",ie.push({node:H,visible:Ee})),I(_),_.token!==\`
\`&&_.token!==";"&&_.token!==""&&(H=Y(_),_.comment&&(H.comment=_.comment),Ee=_.token!==";",ie.push({node:H,visible:Ee}));return ie.length>0?new f(ie):(H||(H=new s(void 0),_.comment&&(H.comment=_.comment)),H)}function Y(_){var H,ie,Ee,Xe,ar=oe(_);if(_.token==="="){if(Vr(ar))return H=ar.name,G(_),Ee=Y(_),new o(new A(H),Ee);if(En(ar))return G(_),Ee=Y(_),new o(ar.object,ar.index,Ee);if(jt(ar)&&Vr(ar.fn)&&(Xe=!0,ie=[],H=ar.name,ar.args.forEach(function(Qr,tn){Vr(Qr)?ie[tn]=Qr.name:Xe=!1}),Xe))return G(_),Ee=Y(_),new c(H,ie,Ee);throw Ce(_,"Invalid left hand side of assignment operator =")}return ar}function oe(_){for(var H=De(_);_.token==="?";){var ie=_.conditionalLevel;_.conditionalLevel=_.nestingLevel,G(_);var Ee=H,Xe=Y(_);if(_.token!==":")throw Ce(_,"False part of conditional expression expected");_.conditionalLevel=null,G(_);var ar=Y(_);H=new u(Ee,Xe,ar),_.conditionalLevel=ie}return H}function De(_){for(var H=ue(_);_.token==="or";)G(_),H=new g("or","or",[H,ue(_)]);return H}function ue(_){for(var H=le(_);_.token==="xor";)G(_),H=new g("xor","xor",[H,le(_)]);return H}function le(_){for(var H=ge(_);_.token==="and";)G(_),H=new g("and","and",[H,ge(_)]);return H}function ge(_){for(var H=pe(_);_.token==="|";)G(_),H=new g("|","bitOr",[H,pe(_)]);return H}function pe(_){for(var H=de(_);_.token==="^|";)G(_),H=new g("^|","bitXor",[H,de(_)]);return H}function de(_){for(var H=ve(_);_.token==="&";)G(_),H=new g("&","bitAnd",[H,ve(_)]);return H}function ve(_){for(var H=[be(_)],ie=[],Ee={"==":"equal","!=":"unequal","<":"smaller",">":"larger","<=":"smallerEq",">=":"largerEq"};Ye(Ee,_.token);){var Xe={name:_.token,fn:Ee[_.token]};ie.push(Xe),G(_),H.push(be(_))}return H.length===1?H[0]:H.length===2?new g(ie[0].name,ie[0].fn,H):new x(ie.map(ar=>ar.fn),H)}function be(_){var H,ie,Ee,Xe;H=Pe(_);for(var ar={"<<":"leftShift",">>":"rightArithShift",">>>":"rightLogShift"};Ye(ar,_.token);)ie=_.token,Ee=ar[ie],G(_),Xe=[H,Pe(_)],H=new g(ie,Ee,Xe);return H}function Pe(_){var H,ie,Ee,Xe;H=He(_);for(var ar={to:"to",in:"to"};Ye(ar,_.token);)ie=_.token,Ee=ar[ie],G(_),ie==="in"&&_.token===""?H=new g("*","multiply",[H,new A("in")],!0):(Xe=[H,He(_)],H=new g(ie,Ee,Xe));return H}function He(_){var H,ie=[];if(_.token===":"?H=new s(1):H=V(_),_.token===":"&&_.conditionalLevel!==_.nestingLevel){for(ie.push(H);_.token===":"&&ie.length<3;)G(_),_.token===")"||_.token==="]"||_.token===","||_.token===""?ie.push(new A("end")):ie.push(V(_));ie.length===3?H=new y(ie[0],ie[2],ie[1]):H=new y(ie[0],ie[1])}return H}function V(_){var H,ie,Ee,Xe;H=X(_);for(var ar={"+":"add","-":"subtract"};Ye(ar,_.token);){ie=_.token,Ee=ar[ie],G(_);var Qr=X(_);Qr.isPercentage?Xe=[H,new g("*","multiply",[H,Qr])]:Xe=[H,Qr],H=new g(ie,Ee,Xe)}return H}function X(_){var H,ie,Ee,Xe;H=me(_),ie=H;for(var ar={"*":"multiply",".*":"dotMultiply","/":"divide","./":"dotDivide"};Ye(ar,_.token);)Ee=_.token,Xe=ar[Ee],G(_),ie=me(_),H=new g(Ee,Xe,[H,ie]);return H}function me(_){var H,ie;for(H=Z(_),ie=H;_.tokenType===N.SYMBOL||_.token==="in"&&lr(H)||_.tokenType===N.NUMBER&&!lr(ie)&&(!rt(ie)||ie.op==="!")||_.token==="(";)ie=Z(_),H=new g("*","multiply",[H,ie],!0);return H}function Z(_){for(var H=j(_),ie=H,Ee=[];_.token==="/"&&wf(ie);)if(Ee.push(it({},_)),G(_),_.tokenType===N.NUMBER)if(Ee.push(it({},_)),G(_),_.tokenType===N.SYMBOL||_.token==="(")it(_,Ee.pop()),Ee.pop(),ie=j(_),H=new g("/","divide",[H,ie]);else{Ee.pop(),it(_,Ee.pop());break}else{it(_,Ee.pop());break}return H}function j(_){var H,ie,Ee,Xe;H=ne(_);for(var ar={"%":"mod",mod:"mod"};Ye(ar,_.token);)ie=_.token,Ee=ar[ie],G(_),ie==="%"&&_.tokenType===N.DELIMITER&&_.token!=="("?H=new g("/","divide",[H,new s(100)],!1,!0):(Xe=[H,ne(_)],H=new g(ie,Ee,Xe));return H}function ne(_){var H,ie,Ee,Xe={"-":"unaryMinus","+":"unaryPlus","~":"bitNot",not:"not"};return Ye(Xe,_.token)?(Ee=Xe[_.token],H=_.token,G(_),ie=[ne(_)],new g(H,Ee,ie)):we(_)}function we(_){var H,ie,Ee,Xe;return H=Se(_),(_.token==="^"||_.token===".^")&&(ie=_.token,Ee=ie==="^"?"pow":"dotPow",G(_),Xe=[H,ne(_)],H=new g(ie,Ee,Xe)),H}function Se(_){var H,ie,Ee,Xe;H=qe(_);for(var ar={"!":"factorial","'":"ctranspose"};Ye(ar,_.token);)ie=_.token,Ee=ar[ie],I(_),Xe=[H],H=new g(ie,Ee,Xe),H=nr(_,H);return H}function qe(_){var H=[];if(_.tokenType===N.SYMBOL&&Ye(_.extraNodes,_.token)){var ie=_.extraNodes[_.token];if(I(_),_.token==="("){if(H=[],k(_),I(_),_.token!==")")for(H.push(Y(_));_.token===",";)I(_),H.push(Y(_));if(_.token!==")")throw Ce(_,"Parenthesis ) expected");re(_),I(_)}return new ie(H)}return Fe(_)}function Fe(_){var H,ie;return _.tokenType===N.SYMBOL||_.tokenType===N.DELIMITER&&_.token in F?(ie=_.token,I(_),Ye(C,ie)?H=new s(C[ie]):E.includes(ie)?H=new s(t(ie,"number")):H=new A(ie),H=nr(_,H),H):ur(_)}function nr(_,H,ie){for(var Ee;(_.token==="("||_.token==="["||_.token===".")&&(!ie||ie.includes(_.token));)if(Ee=[],_.token==="(")if(Vr(H)||En(H)){if(k(_),I(_),_.token!==")")for(Ee.push(Y(_));_.token===",";)I(_),Ee.push(Y(_));if(_.token!==")")throw Ce(_,"Parenthesis ) expected");re(_),I(_),H=new m(H,Ee Line truncated
\`&&_.token!==";"&&_.token!==""&&(H=Y(_),_.comment&&(H.comment=_.comment),Ee=_.token!==";",ie.push({node:H,visible:Ee}));return ie.length>0?new f(ie):(H||(H=new s(void 0),_.comment&&(H.comment=_.comment)),H)}function Y(_){var H,ie,Ee,Xe,ar=oe(_);if(_.token==="="){if(Vr(ar))return H=ar.name,V(_),Ee=Y(_),new o(new A(H),Ee);if(En(ar))return V(_),Ee=Y(_),new o(ar.object,ar.index,Ee);if(jt(ar)&&Vr(ar.fn)&&(Xe=!0,ie=[],H=ar.name,ar.args.forEach(function(Qr,tn){Vr(Qr)?ie[tn]=Qr.name:Xe=!1}),Xe))return V(_),Ee=Y(_),new c(H,ie,Ee);throw Ce(_,"Invalid left hand side of assignment operator =")}return ar}function oe(_){for(var H=De(_);_.token==="?";){var ie=_.conditionalLevel;_.conditionalLevel=_.nestingLevel,V(_);var Ee=H,Xe=Y(_);if(_.token!==":")throw Ce(_,"False part of conditional expression expected");_.conditionalLevel=null,V(_);var ar=Y(_);H=new u(Ee,Xe,ar),_.conditionalLevel=ie}return H}function De(_){for(var H=ue(_);_.token==="or";)V(_),H=new g("or","or",[H,ue(_)]);return H}function ue(_){for(var H=le(_);_.token==="xor";)V(_),H=new g("xor","xor",[H,le(_)]);return H}function le(_){for(var H=ge(_);_.token==="and";)V(_),H=new g("and","and",[H,ge(_)]);return H}function ge(_){for(var H=pe(_);_.token==="|";)V(_),H=new g("|","bitOr",[H,pe(_)]);return H}function pe(_){for(var H=de(_);_.token==="^|";)V(_),H=new g("^|","bitXor",[H,de(_)]);return H}function de(_){for(var H=ve(_);_.token==="&";)V(_),H=new g("&","bitAnd",[H,ve(_)]);return H}function ve(_){for(var H=[be(_)],ie=[],Ee={"==":"equal","!=":"unequal","<":"smaller",">":"larger","<=":"smallerEq",">=":"largerEq"};Ye(Ee,_.token);){var Xe={name:_.token,fn:Ee[_.token]};ie.push(Xe),V(_),H.push(be(_))}return H.length===1?H[0]:H.length===2?new g(ie[0].name,ie[0].fn,H):new x(ie.map(ar=>ar.fn),H)}function be(_){var H,ie,Ee,Xe;H=Pe(_);for(var ar={"<<":"leftShift",">>":"rightArithShift",">>>":"rightLogShift"};Ye(ar,_.token);)ie=_.token,Ee=ar[ie],V(_),Xe=[H,Pe(_)],H=new g(ie,Ee,Xe);return H}function Pe(_){var H,ie,Ee,Xe;H=He(_);for(var ar={to:"to",in:"to"};Ye(ar,_.token);)ie=_.token,Ee=ar[ie],V(_),ie==="in"&&_.token===""?H=new g("*","multiply",[H,new A("in")],!0):(Xe=[H,He(_)],H=new g(ie,Ee,Xe));return H}function He(_){var H,ie=[];if(_.token===":"?H=new s(1):H=G(_),_.token===":"&&_.conditionalLevel!==_.nestingLevel){for(ie.push(H);_.token===":"&&ie.length<3;)V(_),_.token===")"||_.token==="]"||_.token===","||_.token===""?ie.push(new A("end")):ie.push(G(_));ie.length===3?H=new y(ie[0],ie[2],ie[1]):H=new y(ie[0],ie[1])}return H}function G(_){var H,ie,Ee,Xe;H=X(_);for(var ar={"+":"add","-":"subtract"};Ye(ar,_.token);){ie=_.token,Ee=ar[ie],V(_);var Qr=X(_);Qr.isPercentage?Xe=[H,new g("*","multiply",[H,Qr])]:Xe=[H,Qr],H=new g(ie,Ee,Xe)}return H}function X(_){var H,ie,Ee,Xe;H=me(_),ie=H;for(var ar={"*":"multiply",".*":"dotMultiply","/":"divide","./":"dotDivide"};Ye(ar,_.token);)Ee=_.token,Xe=ar[Ee],V(_),ie=me(_),H=new g(Ee,Xe,[H,ie]);return H}function me(_){var H,ie;for(H=Z(_),ie=H;_.tokenType===N.SYMBOL||_.token==="in"&&lr(H)||_.tokenType===N.NUMBER&&!lr(ie)&&(!rt(ie)||ie.op==="!")||_.token==="(";)ie=Z(_),H=new g("*","multiply",[H,ie],!0);return H}function Z(_){for(var H=ee(_),ie=H,Ee=[];_.token==="/"&&wf(ie);)if(Ee.push(it({},_)),V(_),_.tokenType===N.NUMBER)if(Ee.push(it({},_)),V(_),_.tokenType===N.SYMBOL||_.token==="(")it(_,Ee.pop()),Ee.pop(),ie=ee(_),H=new g("/","divide",[H,ie]);else{Ee.pop(),it(_,Ee.pop());break}else{it(_,Ee.pop());break}return H}function ee(_){var H,ie,Ee,Xe;H=ne(_);for(var ar={"%":"mod",mod:"mod"};Ye(ar,_.token);)ie=_.token,Ee=ar[ie],V(_),ie==="%"&&_.tokenType===N.DELIMITER&&_.token!=="("?H=new g("/","divide",[H,new s(100)],!1,!0):(Xe=[H,ne(_)],H=new g(ie,Ee,Xe));return H}function ne(_){var H,ie,Ee,Xe={"-":"unaryMinus","+":"unaryPlus","~":"bitNot",not:"not"};return Ye(Xe,_.token)?(Ee=Xe[_.token],H=_.token,V(_),ie=[ne(_)],new g(H,Ee,ie)):we(_)}function we(_){var H,ie,Ee,Xe;return H=Se(_),(_.token==="^"||_.token===".^")&&(ie=_.token,Ee=ie==="^"?"pow":"dotPow",V(_),Xe=[H,ne(_)],H=new g(ie,Ee,Xe)),H}function Se(_){var H,ie,Ee,Xe;H=qe(_);for(var ar={"!":"factorial","'":"ctranspose"};Ye(ar,_.token);)ie=_.token,Ee=ar[ie],I(_),Xe=[H],H=new g(ie,Ee,Xe),H=nr(_,H);return H}function qe(_){var H=[];if(_.tokenType===N.SYMBOL&&Ye(_.extraNodes,_.token)){var ie=_.extraNodes[_.token];if(I(_),_.token==="("){if(H=[],k(_),I(_),_.token!==")")for(H.push(Y(_));_.token===",";)I(_),H.push(Y(_));if(_.token!==")")throw Ce(_,"Parenthesis ) expected");re(_),I(_)}return new ie(H)}return Fe(_)}function Fe(_){var H,ie;return _.tokenType===N.SYMBOL||_.tokenType===N.DELIMITER&&_.token in F?(ie=_.token,I(_),Ye(C,ie)?H=new s(C[ie]):E.includes(ie)?H=new s(t(ie,"number")):H=new A(ie),H=nr(_,H),H):ur(_)}function nr(_,H,ie){for(var Ee;(_.token==="("||_.token==="["||_.token===".")&&(!ie||ie.includes(_.token));)if(Ee=[],_.token==="(")if(Vr(H)||En(H)){if(k(_),I(_),_.token!==")")for(Ee.push(Y(_));_.token===",";)I(_),Ee.push(Y(_));if(_.token!==")")throw Ce(_,"Parenthesis ) expected");re(_),I(_),H=new m(H Line truncated
U: \`+this.U.toString()+\`
P: \`+this.p}}}function v(y){var x=y._size[0],A=y._size[1],b=Math.min(x,A),S=y._values,N=y._index,w=y._ptr,F=[],C=[],E=[],M=[x,b],B=[],P=[],U=[],z=[b,A],q,R,I,G=[],k=[];for(q=0;q<x;q++)G[q]=q,k[q]=q;var re=function(Y,oe){var De=k[Y],ue=k[oe];G[De]=oe,G[ue]=Y,k[Y]=ue,k[oe]=De},se=function(){var Y=new h;R<x&&(E.push(F.length),F.push(1),C.push(R)),U.push(B.length);var oe=w[R],De=w[R+1];for(I=oe;I<De;I++)q=N[I],Y.set(G[q],S[I]);R>0&&Y.forEach(0,R-1,function(pe,de){p._forEachRow(pe,F,C,E,function(ve,be){ve>pe&&Y.accumulate(ve,c(o(be,de)))})});var ue=R,le=Y.get(R),ge=n(le);Y.forEach(R+1,x-1,function(pe,de){var ve=n(de);u(ve,ge)&&(ue=pe,ge=ve,le=de)}),R!==ue&&(p._swapRows(R,ue,M[1],F,C,E),p._swapRows(R,ue,z[1],B,P,U),Y.swap(R,ue),re(R,ue)),Y.forEach(0,x-1,function(pe,de){pe<=R?(B.push(de),P.push(pe)):(de=i(de,le),s(de,0)||(F.push(de),C.push(pe)))})};for(R=0;R<A;R++)se();return U.push(B.length),E.push(F.length),{L:new p({values:F,index:C,ptr:E,size:M}),U:new p({values:B,index:P,ptr:U,size:z}),p:G,toString:function(){return"L: "+this.L.toString()+\`
P: \`+this.p}}}function v(y){var x=y._size[0],A=y._size[1],b=Math.min(x,A),S=y._values,N=y._index,w=y._ptr,F=[],C=[],E=[],M=[x,b],B=[],R=[],U=[],z=[b,A],q,P,I,V=[],k=[];for(q=0;q<x;q++)V[q]=q,k[q]=q;var re=function(Y,oe){var De=k[Y],ue=k[oe];V[De]=oe,V[ue]=Y,k[Y]=ue,k[oe]=De},se=function(){var Y=new h;P<x&&(E.push(F.length),F.push(1),C.push(P)),U.push(B.length);var oe=w[P],De=w[P+1];for(I=oe;I<De;I++)q=N[I],Y.set(V[q],S[I]);P>0&&Y.forEach(0,P-1,function(pe,de){p._forEachRow(pe,F,C,E,function(ve,be){ve>pe&&Y.accumulate(ve,c(o(be,de)))})});var ue=P,le=Y.get(P),ge=n(le);Y.forEach(P+1,x-1,function(pe,de){var ve=n(de);u(ve,ge)&&(ue=pe,ge=ve,le=de)}),P!==ue&&(p._swapRows(P,ue,M[1],F,C,E),p._swapRows(P,ue,z[1],B,R,U),Y.swap(P,ue),re(P,ue)),Y.forEach(0,x-1,function(pe,de){pe<=P?(B.push(de),R.push(pe)):(de=i(de,le),s(de,0)||(F.push(de),C.push(pe)))})};for(P=0;P<A;P++)se();return U.push(B.length),E.push(F.length),{L:new p({values:F,index:C,ptr:E,size:M}),U:new p({values:B,index:R,ptr:U,size:z}),p:V,toString:function(){return"L: "+this.L.toString()+\`
U: \`+this.U.toString()+\`
P: \`+this.p}}}});var KT="qr",BK=["typed","matrix","zeros","identity","isZero","equal","sign","sqrt","conj","unaryMinus","addScalar","divideScalar","multiplyScalar","subtractScalar","complex"],Kh=T(KT,BK,e=>{var{typed:r,matrix:t,zeros:n,identity:a,isZero:i,equal:o,sign:f,sqrt:u,conj:s,unaryMinus:c,addScalar:m,divideScalar:p,multiplyScalar:h,subtractScalar:g,complex:v}=e;return it(r(KT,{DenseMatrix:function(S){return x(S)},SparseMatrix:function(S){return A(S)},Array:function(S){var N=t(S),w=x(N);return{Q:w.Q.valueOf(),R:w.R.valueOf()}}}),{_denseQRimpl:y});function y(b){var S=b._size[0],N=b._size[1],w=a([S],"dense"),F=w._data,C=b.clone(),E=C._data,M,B,P,U=n([S],"");for(P=0;P<Math.min(N,S);++P){var z=E[P][P],q=c(o(z,0)?1:f(z)),R=s(q),I=0;for(M=P;M<S;M++)I=m(I,h(E[M][P],s(E[M][P])));var G=h(q,u(I));if(!i(G)){var k=g(z,G);for(U[P]=1,M=P+1;M<S;M++)U[M]=p(E[M][P],k);var re=c(s(p(k,G))),se=void 0;for(B=P;B<N;B++){for(se=0,M=P;M<S;M++)se=m(se,h(s(U[M]),E[M][B]));for(se=h(se,re),M=P;M<S;M++)E[M][B]=h(g(E[M][B],h(U[M],se)),R)}for(M=0;M<S;M++){for(se=0,B=P;B<S;B++)se=m(se,h(F[M][B],U[B]));for(se=h(se,re),B=P;B<S;++B)F[M][B]=p(g(F[M][B],h(se,s(U[B]))),R)}}}return{Q:w,R:C,toString:function(){return"Q: "+this.Q.toString()+\`
R: \`+this.R.toString()}}}function x(b){var S=y(b),N=S.R._data;if(b._data.length>0)for(var w=N[0][0].type==="Complex"?v(0):0,F=0;F<N.length;++F)for(var C=0;C<F&&C<(N[0]||[]).length;++C)N[F][C]=w;return S}function A(b){throw new Error("qr not implemented for sparse matrices yet")}});function XT(e,r,t,n){for(var a=e._values,i=e._index,o=e._ptr,f=e._size,u=e._datatype,s=f[0],c=f[1],m=n&&e._values?[]:null,p=[],h=[],g=0,v=0;v<c;v++){h[v]=g;for(var y=t?t[v]:v,x=o[y],A=o[y+1],b=x;b<A;b++){var S=r?r[i[b]]:i[b];p[g]=S,m&&(m[g]=a[b]),g++}}return h[c]=g,e.createSparseMatrix({values:m,index:p,ptr:h,size:[s,c],datatype:u})}function Xh(e,r,t,n,a,i,o){var f=0;for(t[o]=e;f>=0;){var u=t[o+f],s=t[n+u];s===-1?(f--,i[r++]=u):(t[n+u]=t[a+s],++f,t[o+f]=s)}return r}function JT(e,r){if(!e)return null;var t=0,n,a=[],i=[],o=0,f=r,u=2*r;for(n=0;n<r;n++)i[o+n]=-1;for(n=r-1;n>=0;n--)e[n]!==-1&&(i[f+n]=i[o+e[n]],i[o+e[n]]=n);for(n=0;n<r;n++)e[n]===-1&&(t=Xh(n,t,i,o,f,a,u));return a}function QT(e,r){if(!e)return null;var t=e._index,n=e._ptr,a=e._size,i=a[0],o=a[1],f=[],u=[],s=0,c=o,m,p;if(r)for(m=0;m<i;m++)u[c+m]=-1;for(var h=0;h<o;h++){f[h]=-1,u[s+h]=-1;for(var g=n[h],v=n[h+1],y=g;y<v;y++){var x=t[y];for(m=r?u[c+x]:x;m!==-1&&m<h;m=p)p=u[s+m],u[s+m]=h,p===-1&&(f[m]=h);r&&(u[c+x]=h)}}return f}function jT(e,r,t){for(var n=e._values,a=e._index,i=e._ptr,o=e._size,f=o[1],u=0,s=0;s<f;s++){var c=i[s];for(i[s]=u;c<i[s+1];c++)r(a[c],s,n?n[c]:1,t)&&(a[u]=a[c],n&&(n[u]=n[c]),u++)}return i[f]=u,a.splice(u,a.length-u),n&&n.splice(u,n.length-u),u}function Ra(e){return-e-2}var IK="csAmd",PK=["add","multiply","transpose"],eF=T(IK,PK,e=>{var{add:r,multiply:t,transpose:n}=e;return function(c,m){if(!m||c<=0||c>3)return null;var p=m._size,h=p[0],g=p[1],v=0,y=Math.max(16,10*Math.sqrt(g));y=Math.min(g-2,y);var x=a(c,m,h,g,y);jT(x,u,null);for(var A=x._index,b=x._ptr,S=b[g],N=[],w=[],F=0,C=g+1,E=2*(g+1),M=3*(g+1),B=4*(g+1),P=5*(g+1),U=6*(g+1),z=7*(g+1),q=N,R=i(g,b,w,F,M,q,E,z,C,U,B,P),I=o(g,b,w,P,B,U,y,C,M,q,E),G=0,k,re,se,ee,Y,oe,De,ue,le,ge,pe,de,ve,be,Pe,He;I<g;){for(se=-1;G<g&&(se=w[M+G])===-1;G++);w[E+se]!==-1&&(q[w[E+se]]=-1),w[M+G]=w[E+se];var V=w[B+se],X=w[C+se];I+=X;var me=0;w[C+se]=-X;var Z=b[se],j=V===0?Z:S,ne=j;for(ee=1;ee<=V+1;ee++){for(ee>V?(oe=se,De=Z,ue=w[F+se]-V):(oe=A[Z++],De=b[oe],ue=w[F+oe]),Y=1;Y<=ue;Y++)k=A[De++],!((le=w[C+k])<=0)&&(me+=le,w[C+k]=-le,A[ne++]=k,w[E+k]!==-1&&(q[w[E+k]]=q[k]),q[k]!==-1?w[E+q[k]]=w[E+k]:w[M+w[P+k]]=w[E+k]);oe!==se&&(b[oe]=Ra(se),w[U+oe]=0)}for(V!==0&&(S=ne),w[P+se]=me,b[se]=j,w[F+se]=ne-j,w[B+se]=-2,R=f(R,v,w,U,g),ge=j;ge<ne;ge++)if(k=A[ge],!((pe=w[B+k])<=0)){le=-w[C+k];var we=R-le;for(Z=b[k],de=b[k]+pe-1;Z<=de;Z++)oe=A[Z],w[U+oe]>=R?w[U+oe]-=le:w[U+oe]!==0&&(w[U+oe]=w[P+oe]+we)}for(ge=j;ge<ne;ge++){for(k=A[ge],de=b[k],ve=de+w[B+k]-1,be=de,Pe=0,He=0,Z=de;Z<=ve;Z++)if(oe=A[Z],w[U+oe]!==0){var Se=w[U+oe]-R;Se>0?(He+=Se,A[be++]=oe,Pe+=oe):(b[oe]=Ra(se),w[U+oe]=0)}w[B+k]=be-de+1;var qe=be,Fe=de+w[F+k];for(Z=ve+1;Z<Fe;Z++){re=A[Z];var nr=w[C+re];nr<=0||(He+=nr,A[be++]=re,Pe+=re)}He===0?(b[k]=Ra(se),le=-w[C+k],me-=le,X+=le,I+=le,w[C+k]=0,w[B+k]=-1):(w[P+k]=Math.min(w[P+k],He),A[be]=A[qe],A[qe]=A[de],A[de]=se,w[F+k]=be-de+1,Pe=(Pe<0?-Pe:Pe)%g,w[E+k]=w[z+Pe],w[z+Pe]=k,q[k]=Pe)}for(w[P+se]=me,v=Math.max(v,me),R=f(R+v,v,w,U,g),ge=j;ge<ne;ge++)if(k=A[ge],!(w[C+k]>=0))for(Pe=q[k],k=w[z+Pe],w[z+Pe]=-1;k!==-1&&w[E+k]!==-1;k=w[E+k],R++){for(ue=w[F+k],pe=w[B+k],Z=b[k]+1;Z<=b[k]+ue-1;Z++)w[U+A[Z]]=R;var ur=k;for(re=w[E+k];re!==-1;){var Mr=w[F+re]===ue&&w[B+re]===pe;for(Z=b[re]+1;Mr&&Z<=b[re]+ue-1;Z++)w[U+A[Z]]!==R&&(Mr=0);Mr?(b[re]=Ra(k),w[C+k]+=w[C+re],w[C+re]=0,w[B+re]=-1,re=w[E+re],w[E+ur]=re):(ur=re,re=w[E+re])}}for(Z=j,ge=j;ge<ne;ge++)k=A[ge],!((le=-w[C+k])<=0)&&(w[C+k]=le,He=w[P+k]+me-le,He=Math.min(He,g-I-le),w[M+He]!==-1&&(q[w[M+He]]=k),w[E+k]=w[M+He],q[k]=-1,w[M+He]=k,G=Math.min(G,He),w[P+k]=He,A[Z++]=k);w[C+se]=X,(w[F+se]=Z-j)===0&&(b[se]=-1,w[U+se]=0),V!==0&&(S=Z)}for(k=0;k<g;k++)b[k]=Ra(b[k]);for(re=0;re<=g;re++)w[M+re]=-1;for(re=g;re>=0;re--)w[C+re]>0||(w[E+re]=w[M+b[re]],w[M+b[re]]=re);for(oe=g;oe>=0;oe--)w[C+oe]<=0||b[oe]!==-1&&(w[E+oe]=w[M+b[oe]],w[M+b[oe]]=oe);for(se=0,k=0;k<=g;k++)b[k]===-1&&(se=Xh(k,se,w,M,E,N,U));return N.splice(N.length-1,1),N};function a(s,c,m,p,h){var g=n(c);if(s===1&&p===m)return r(c,g);if(s===2){for(var v=g._index,y=g._ptr,x=0,A=0;A<m;A++){var b=y[A];if(y[A]=x,!(y[A+1]-b>h))for(var S=y[A+1];b<S;b++)v[x++]=v[b]}return y[m]=x,c=n(g),t(g,c)}return t(g,c)}function i(s,c,m,p,h,g,v,y,x,A,b,S){for(var N=0;N<s;N++)m[p+N]=c[N+1]-c[N];m[p+s]=0;for(var w=0;w<=s;w++)m[h+w]=-1,g[w]=-1,m[v+w]=-1,m[y+w]=-1,m[x+w]=1,m[A+w]=1,m[b+w]=0,m[S+w]=m[p+w];var F=f(0,0,m,A,s);return m[b+s]=-2,c[s]=-1,m[A+s]=0,F}function o(s,c,m,p,h,g,v,y,x,A,b){for(var S=0,N=0;N<s;N++){var w=m[p+N];if(w===0)m[h+N]=-2,S++,c[N]=-1,m[g+N]=0;else if(w>v)m[y+N]=0,m[h+N]=-1,S++,c[N]=Ra(s),m[y+s]++;else{var F=m[x+w];F!==-1&&(A[F]=N),m[b+N]=m[x+w],m[x+w]=N}}return S}function f(s,c,m,p,h){if(s<2||s+c<0){for(var g=0;g<h;g++)m[p+g]!==0&& Line truncated
P: \`+this.p}}}});var KT="qr",BK=["typed","matrix","zeros","identity","isZero","equal","sign","sqrt","conj","unaryMinus","addScalar","divideScalar","multiplyScalar","subtractScalar","complex"],Kh=T(KT,BK,e=>{var{typed:r,matrix:t,zeros:n,identity:a,isZero:i,equal:o,sign:f,sqrt:u,conj:s,unaryMinus:c,addScalar:m,divideScalar:p,multiplyScalar:h,subtractScalar:g,complex:v}=e;return it(r(KT,{DenseMatrix:function(S){return x(S)},SparseMatrix:function(S){return A(S)},Array:function(S){var N=t(S),w=x(N);return{Q:w.Q.valueOf(),R:w.R.valueOf()}}}),{_denseQRimpl:y});function y(b){var S=b._size[0],N=b._size[1],w=a([S],"dense"),F=w._data,C=b.clone(),E=C._data,M,B,R,U=n([S],"");for(R=0;R<Math.min(N,S);++R){var z=E[R][R],q=c(o(z,0)?1:f(z)),P=s(q),I=0;for(M=R;M<S;M++)I=m(I,h(E[M][R],s(E[M][R])));var V=h(q,u(I));if(!i(V)){var k=g(z,V);for(U[R]=1,M=R+1;M<S;M++)U[M]=p(E[M][R],k);var re=c(s(p(k,V))),se=void 0;for(B=R;B<N;B++){for(se=0,M=R;M<S;M++)se=m(se,h(s(U[M]),E[M][B]));for(se=h(se,re),M=R;M<S;M++)E[M][B]=h(g(E[M][B],h(U[M],se)),P)}for(M=0;M<S;M++){for(se=0,B=R;B<S;B++)se=m(se,h(F[M][B],U[B]));for(se=h(se,re),B=R;B<S;++B)F[M][B]=p(g(F[M][B],h(se,s(U[B]))),P)}}}return{Q:w,R:C,toString:function(){return"Q: "+this.Q.toString()+\`
R: \`+this.R.toString()}}}function x(b){var S=y(b),N=S.R._data;if(b._data.length>0)for(var w=N[0][0].type==="Complex"?v(0):0,F=0;F<N.length;++F)for(var C=0;C<F&&C<(N[0]||[]).length;++C)N[F][C]=w;return S}function A(b){throw new Error("qr not implemented for sparse matrices yet")}});function XT(e,r,t,n){for(var a=e._values,i=e._index,o=e._ptr,f=e._size,u=e._datatype,s=f[0],c=f[1],m=n&&e._values?[]:null,p=[],h=[],g=0,v=0;v<c;v++){h[v]=g;for(var y=t?t[v]:v,x=o[y],A=o[y+1],b=x;b<A;b++){var S=r?r[i[b]]:i[b];p[g]=S,m&&(m[g]=a[b]),g++}}return h[c]=g,e.createSparseMatrix({values:m,index:p,ptr:h,size:[s,c],datatype:u})}function Xh(e,r,t,n,a,i,o){var f=0;for(t[o]=e;f>=0;){var u=t[o+f],s=t[n+u];s===-1?(f--,i[r++]=u):(t[n+u]=t[a+s],++f,t[o+f]=s)}return r}function JT(e,r){if(!e)return null;var t=0,n,a=[],i=[],o=0,f=r,u=2*r;for(n=0;n<r;n++)i[o+n]=-1;for(n=r-1;n>=0;n--)e[n]!==-1&&(i[f+n]=i[o+e[n]],i[o+e[n]]=n);for(n=0;n<r;n++)e[n]===-1&&(t=Xh(n,t,i,o,f,a,u));return a}function QT(e,r){if(!e)return null;var t=e._index,n=e._ptr,a=e._size,i=a[0],o=a[1],f=[],u=[],s=0,c=o,m,p;if(r)for(m=0;m<i;m++)u[c+m]=-1;for(var h=0;h<o;h++){f[h]=-1,u[s+h]=-1;for(var g=n[h],v=n[h+1],y=g;y<v;y++){var x=t[y];for(m=r?u[c+x]:x;m!==-1&&m<h;m=p)p=u[s+m],u[s+m]=h,p===-1&&(f[m]=h);r&&(u[c+x]=h)}}return f}function jT(e,r,t){for(var n=e._values,a=e._index,i=e._ptr,o=e._size,f=o[1],u=0,s=0;s<f;s++){var c=i[s];for(i[s]=u;c<i[s+1];c++)r(a[c],s,n?n[c]:1,t)&&(a[u]=a[c],n&&(n[u]=n[c]),u++)}return i[f]=u,a.splice(u,a.length-u),n&&n.splice(u,n.length-u),u}function Ra(e){return-e-2}var IK="csAmd",PK=["add","multiply","transpose"],eF=T(IK,PK,e=>{var{add:r,multiply:t,transpose:n}=e;return function(c,m){if(!m||c<=0||c>3)return null;var p=m._size,h=p[0],g=p[1],v=0,y=Math.max(16,10*Math.sqrt(g));y=Math.min(g-2,y);var x=a(c,m,h,g,y);jT(x,u,null);for(var A=x._index,b=x._ptr,S=b[g],N=[],w=[],F=0,C=g+1,E=2*(g+1),M=3*(g+1),B=4*(g+1),R=5*(g+1),U=6*(g+1),z=7*(g+1),q=N,P=i(g,b,w,F,M,q,E,z,C,U,B,R),I=o(g,b,w,R,B,U,y,C,M,q,E),V=0,k,re,se,Q,Y,oe,De,ue,le,ge,pe,de,ve,be,Pe,He;I<g;){for(se=-1;V<g&&(se=w[M+V])===-1;V++);w[E+se]!==-1&&(q[w[E+se]]=-1),w[M+V]=w[E+se];var G=w[B+se],X=w[C+se];I+=X;var me=0;w[C+se]=-X;var Z=b[se],ee=G===0?Z:S,ne=ee;for(Q=1;Q<=G+1;Q++){for(Q>G?(oe=se,De=Z,ue=w[F+se]-G):(oe=A[Z++],De=b[oe],ue=w[F+oe]),Y=1;Y<=ue;Y++)k=A[De++],!((le=w[C+k])<=0)&&(me+=le,w[C+k]=-le,A[ne++]=k,w[E+k]!==-1&&(q[w[E+k]]=q[k]),q[k]!==-1?w[E+q[k]]=w[E+k]:w[M+w[R+k]]=w[E+k]);oe!==se&&(b[oe]=Ra(se),w[U+oe]=0)}for(G!==0&&(S=ne),w[R+se]=me,b[se]=ee,w[F+se]=ne-ee,w[B+se]=-2,P=f(P,v,w,U,g),ge=ee;ge<ne;ge++)if(k=A[ge],!((pe=w[B+k])<=0)){le=-w[C+k];var we=P-le;for(Z=b[k],de=b[k]+pe-1;Z<=de;Z++)oe=A[Z],w[U+oe]>=P?w[U+oe]-=le:w[U+oe]!==0&&(w[U+oe]=w[R+oe]+we)}for(ge=ee;ge<ne;ge++){for(k=A[ge],de=b[k],ve=de+w[B+k]-1,be=de,Pe=0,He=0,Z=de;Z<=ve;Z++)if(oe=A[Z],w[U+oe]!==0){var Se=w[U+oe]-P;Se>0?(He+=Se,A[be++]=oe,Pe+=oe):(b[oe]=Ra(se),w[U+oe]=0)}w[B+k]=be-de+1;var qe=be,Fe=de+w[F+k];for(Z=ve+1;Z<Fe;Z++){re=A[Z];var nr=w[C+re];nr<=0||(He+=nr,A[be++]=re,Pe+=re)}He===0?(b[k]=Ra(se),le=-w[C+k],me-=le,X+=le,I+=le,w[C+k]=0,w[B+k]=-1):(w[R+k]=Math.min(w[R+k],He),A[be]=A[qe],A[qe]=A[de],A[de]=se,w[F+k]=be-de+1,Pe=(Pe<0?-Pe:Pe)%g,w[E+k]=w[z+Pe],w[z+Pe]=k,q[k]=Pe)}for(w[R+se]=me,v=Math.max(v,me),P=f(P+v,v,w,U,g),ge=ee;ge<ne;ge++)if(k=A[ge],!(w[C+k]>=0))for(Pe=q[k],k=w[z+Pe],w[z+Pe]=-1;k!==-1&&w[E+k]!==-1;k=w[E+k],P++){for(ue=w[F+k],pe=w[B+k],Z=b[k]+1;Z<=b[k]+ue-1;Z++)w[U+A[Z]]=P;var ur=k;for(re=w[E+k];re!==-1;){var Mr=w[F+re]===ue&&w[B+re]===pe;for(Z=b[re]+1;Mr&&Z<=b[re]+ue-1;Z++)w[U+A[Z]]!==P&&(Mr=0);Mr?(b[re]=Ra(k),w[C+k]+=w[C+re],w[C+re]=0,w[B+re]=-1,re=w[E+re],w[E+ur]=re):(ur=re,re=w[E+re])}}for(Z=ee,ge=ee;ge<ne;ge++)k=A[ge],!((le=-w[C+k])<=0)&&(w[C+k]=le,He=w[R+k]+me-le,He=Math.min(He,g-I-le),w[M+He]!==-1&&(q[w[M+He]]=k),w[E+k]=w[M+He],q[k]=-1,w[M+He]=k,V=Math.min(V,He),w[R+k]=He,A[Z++]=k);w[C+se]=X,(w[F+se]=Z-ee)===0&&(b[se]=-1,w[U+se]=0),G!==0&&(S=Z)}for(k=0;k<g;k++)b[k]=Ra(b[k]);for(re=0;re<=g;re++)w[M+re]=-1;for(re=g;re>=0;re--)w[C+re]>0||(w[E+re]=w[M+b[re]],w[M+b[re]]=re);for(oe=g;oe>=0;oe--)w[C+oe]<=0||b[oe]!==-1&&(w[E+oe]=w[M+b[oe]],w[M+b[oe]]=oe);for(se=0,k=0;k<=g;k++)b[k]===-1&&(se=Xh(k,se,w,M,E,N,U));return N.splice(N.length-1,1),N};function a(s,c,m,p,h){var g=n(c);if(s===1&&p===m)return r(c,g);if(s===2){for(var v=g._index,y=g._ptr,x=0,A=0;A<m;A++){var b=y[A];if(y[A]=x,!(y[A+1]-b>h))for(var S=y[A+1];b<S;b++)v[x++]=v[b]}return y[m]=x,c=n(g),t(g,c)}return t(g,c)}function i(s,c,m,p,h,g,v,y,x,A,b,S){for(var N=0;N<s;N++)m[p+N]=c[N+1]-c[N];m[p+s]=0;for(var w=0;w<=s;w++)m[h+w]=-1,g[w]=-1,m[v+w]=-1,m[y+w]=-1,m[x+w]=1,m[A+w]=1,m[b+w]=0,m[S+w]=m[p+w];var F=f(0,0,m,A,s);return m[b+s]=-2,c[s]=-1,m[A+s]=0,F}function o(s,c,m,p,h,g,v,y,x,A,b){for(var S=0,N=0;N<s;N++){var w=m[p+N];if(w===0)m[h+N]=-2,S++,c[N]=-1,m[g+N]=0;else if(w>v)m[y+N]=0,m[h+N]=-1,S++,c[N]=Ra(s),m[y+s]++;else{var F=m[x+w];F!==-1&&(A[F]=N),m[b+N]=m[x+w],m[x+w]=N}}return S}function f(s,c,m,p,h){if(s<2||s+c<0){for(var g=0;g<h;g++)m[p+g]! Line truncated
U: \`+this.U.toString()+\`
p: \`+this.p.toString()+(this.q?\`
q: \`+this.q.toString():"")+\`
\`}}}})});function Kb(e,r){var t,n=r.length,a=[];if(e)for(t=0;t<n;t++)a[e[t]]=r[t];else for(t=0;t<n;t++)a[t]=r[t];return a}var fF="lusolve",$K=["typed","matrix","lup","slu","usolve","lsolve","DenseMatrix"],jh=T(fF,$K,e=>{var{typed:r,matrix:t,lup:n,slu:a,usolve:i,lsolve:o,DenseMatrix:f}=e,u=ja({DenseMatrix:f});return r(fF,{"Array, Array | Matrix":function(p,h){p=t(p);var g=n(p),v=c(g.L,g.U,g.p,null,h);return v.valueOf()},"DenseMatrix, Array | Matrix":function(p,h){var g=n(p);return c(g.L,g.U,g.p,null,h)},"SparseMatrix, Array | Matrix":function(p,h){var g=n(p);return c(g.L,g.U,g.p,null,h)},"SparseMatrix, Array | Matrix, number, number":function(p,h,g,v){var y=a(p,g,v);return c(y.L,y.U,y.p,y.q,h)},"Object, Array | Matrix":function(p,h){return c(p.L,p.U,p.p,p.q,h)}});function s(m){if(We(m))return m;if(yr(m))return t(m);throw new TypeError("Invalid Matrix LU decomposition")}function c(m,p,h,g,v){m=s(m),p=s(p),h&&(v=u(m,v,!0),v._data=Kb(h,v._data));var y=o(m,v),x=i(p,y);return g&&(x._data=Kb(g,x._data)),x}});var cF="polynomialRoot",GK=["typed","isZero","equalScalar","add","subtract","multiply","divide","sqrt","unaryMinus","cbrt","typeOf","im","re"],ev=T(cF,GK,e=>{var{typed:r,isZero:t,equalScalar:n,add:a,subtract:i,multiply:o,divide:f,sqrt:u,unaryMinus:s,cbrt:c,typeOf:m,im:p,re:h}=e;return r(cF,{"number|Complex, ...number|Complex":(g,v)=>{for(var y=[g,...v];y.length>0&&t(y[y.length-1]);)y.pop();if(y.length<2)throw new RangeError("Polynomial [".concat(g,", ").concat(v,"] must have a non-zero non-constant coefficient"));switch(y.length){case 2:return[s(f(y[0],y[1]))];case 3:{var[x,A,b]=y,S=o(2,b),N=o(A,A),w=o(4,b,x);if(n(N,w))return[f(s(A),S)];var F=u(i(N,w));return[f(i(F,A),S),f(i(s(F),A),S)]}case 4:{var[C,E,M,B]=y,P=s(o(3,B)),U=o(M,M),z=o(3,B,E),q=a(o(2,M,M,M),o(27,B,B,C)),R=o(9,B,M,E);if(n(U,z)&&n(q,R))return[f(M,P)];var I=i(U,z),G=i(q,R),k=a(o(18,B,M,E,C),o(M,M,E,E)),re=a(o(4,M,M,M,C),o(4,B,E,E,E),o(27,B,B,C,C));if(n(k,re))return[f(i(o(4,B,M,E),a(o(9,B,B,C),o(M,M,M))),o(B,I)),f(i(o(9,B,C),o(M,E)),o(2,I))];var se;n(U,z)?se=G:se=f(a(G,u(i(o(G,G),o(4,I,I,I)))),2);var ee=!0,Y=c(se,ee).toArray().map(oe=>f(a(M,oe,f(I,oe)),P));return Y.map(oe=>m(oe)==="Complex"&&n(h(oe),h(oe)+p(oe))?h(oe):oe)}default:throw new RangeError("only implemented for cubic or lower-order polynomials, not ".concat(y))}}})});var VK="Help",ZK=["evaluate"],rv=T(VK,ZK,e=>{var{evaluate:r}=e;function t(n){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(!n)throw new Error('Argument "doc" missing');this.doc=n}return t.prototype.type="Help",t.prototype.isHelp=!0,t.prototype.toString=function(){var n=this.doc||{},a=\`
\`}}}})});function Kb(e,r){var t,n=r.length,a=[];if(e)for(t=0;t<n;t++)a[e[t]]=r[t];else for(t=0;t<n;t++)a[t]=r[t];return a}var fF="lusolve",$K=["typed","matrix","lup","slu","usolve","lsolve","DenseMatrix"],jh=T(fF,$K,e=>{var{typed:r,matrix:t,lup:n,slu:a,usolve:i,lsolve:o,DenseMatrix:f}=e,u=ja({DenseMatrix:f});return r(fF,{"Array, Array | Matrix":function(p,h){p=t(p);var g=n(p),v=c(g.L,g.U,g.p,null,h);return v.valueOf()},"DenseMatrix, Array | Matrix":function(p,h){var g=n(p);return c(g.L,g.U,g.p,null,h)},"SparseMatrix, Array | Matrix":function(p,h){var g=n(p);return c(g.L,g.U,g.p,null,h)},"SparseMatrix, Array | Matrix, number, number":function(p,h,g,v){var y=a(p,g,v);return c(y.L,y.U,y.p,y.q,h)},"Object, Array | Matrix":function(p,h){return c(p.L,p.U,p.p,p.q,h)}});function s(m){if(We(m))return m;if(yr(m))return t(m);throw new TypeError("Invalid Matrix LU decomposition")}function c(m,p,h,g,v){m=s(m),p=s(p),h&&(v=u(m,v,!0),v._data=Kb(h,v._data));var y=o(m,v),x=i(p,y);return g&&(x._data=Kb(g,x._data)),x}});var cF="polynomialRoot",GK=["typed","isZero","equalScalar","add","subtract","multiply","divide","sqrt","unaryMinus","cbrt","typeOf","im","re"],ev=T(cF,GK,e=>{var{typed:r,isZero:t,equalScalar:n,add:a,subtract:i,multiply:o,divide:f,sqrt:u,unaryMinus:s,cbrt:c,typeOf:m,im:p,re:h}=e;return r(cF,{"number|Complex, ...number|Complex":(g,v)=>{for(var y=[g,...v];y.length>0&&t(y[y.length-1]);)y.pop();if(y.length<2)throw new RangeError("Polynomial [".concat(g,", ").concat(v,"] must have a non-zero non-constant coefficient"));switch(y.length){case 2:return[s(f(y[0],y[1]))];case 3:{var[x,A,b]=y,S=o(2,b),N=o(A,A),w=o(4,b,x);if(n(N,w))return[f(s(A),S)];var F=u(i(N,w));return[f(i(F,A),S),f(i(s(F),A),S)]}case 4:{var[C,E,M,B]=y,R=s(o(3,B)),U=o(M,M),z=o(3,B,E),q=a(o(2,M,M,M),o(27,B,B,C)),P=o(9,B,M,E);if(n(U,z)&&n(q,P))return[f(M,R)];var I=i(U,z),V=i(q,P),k=a(o(18,B,M,E,C),o(M,M,E,E)),re=a(o(4,M,M,M,C),o(4,B,E,E,E),o(27,B,B,C,C));if(n(k,re))return[f(i(o(4,B,M,E),a(o(9,B,B,C),o(M,M,M))),o(B,I)),f(i(o(9,B,C),o(M,E)),o(2,I))];var se;n(U,z)?se=V:se=f(a(V,u(i(o(V,V),o(4,I,I,I)))),2);var Q=!0,Y=c(se,Q).toArray().map(oe=>f(a(M,oe,f(I,oe)),R));return Y.map(oe=>m(oe)==="Complex"&&n(h(oe),h(oe)+p(oe))?h(oe):oe)}default:throw new RangeError("only implemented for cubic or lower-order polynomials, not ".concat(y))}}})});var VK="Help",ZK=["evaluate"],rv=T(VK,ZK,e=>{var{evaluate:r}=e;function t(n){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(!n)throw new Error('Argument "doc" missing');this.doc=n}return t.prototype.type="Help",t.prototype.isHelp=!0,t.prototype.toString=function(){var n=this.doc||{},a=\`
\`;if(n.name&&(a+="Name: "+n.name+\`
\`),n.category&&(a+="Category: "+n.category+\`
@@ -1071,7 +1071,7 @@ q: \`+this.q.toString():"")+\`
\`),n.seealso&&n.seealso.length&&(a+="See also: "+n.seealso.join(", ")+\`
\`),a},t.prototype.toJSON=function(){var n=Ke(this.doc);return n.mathjs="Help",n},t.fromJSON=function(n){var a={};return Object.keys(n).filter(i=>i!=="mathjs").forEach(i=>{a[i]=n[i]}),new t(a)},t.prototype.valueOf=t.prototype.toString,t},{isClass:!0});var KK="Chain",XK=["?on","math","typed"],tv=T(KK,XK,e=>{var{on:r,math:t,typed:n}=e;function a(s){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");Rs(s)?this.value=s.value:this.value=s}a.prototype.type="Chain",a.prototype.isChain=!0,a.prototype.done=function(){return this.value},a.prototype.valueOf=function(){return this.value},a.prototype.toString=function(){return er(this.value)},a.prototype.toJSON=function(){return{mathjs:"Chain",value:this.value}},a.fromJSON=function(s){return new a(s.value)};function i(s,c){typeof c=="function"&&(a.prototype[s]=f(c))}function o(s,c){Ls(a.prototype,s,function(){var p=c();if(typeof p=="function")return f(p)})}function f(s){return function(){if(arguments.length===0)return new a(s(this.value));for(var c=[this.value],m=0;m<arguments.length;m++)c[m+1]=arguments[m];if(n.isTypedFunction(s)){var p=n.resolve(s,c);if(p.params.length===1)throw new Error("chain function "+s.name+" cannot match rest parameter between chain value and additional arguments.");return new a(p.implementation.apply(s,c))}return new a(s.apply(s,c))}}a.createProxy=function(s,c){if(typeof s=="string")i(s,c);else{var m=function(g){Ye(s,g)&&u[g]===void 0&&o(g,()=>s[g])};for(var p in s)m(p)}};var u={expression:!0,docs:!0,type:!0,classes:!0,json:!0,error:!0,isChain:!0};return a.createProxy(t),r&&r("import",function(s,c,m){m||o(s,c)}),a},{isClass:!0});var Xb={name:"e",category:"Constants",syntax:["e"],description:"Euler's number, the base of the natural logarithm. Approximately equal to 2.71828",examples:["e","e ^ 2","exp(2)","log(e)"],seealso:["exp"]};var lF={name:"false",category:"Constants",syntax:["false"],description:"Boolean value false",examples:["false"],seealso:["true"]};var mF={name:"i",category:"Constants",syntax:["i"],description:"Imaginary unit, defined as i*i=-1. A complex number is described as a + b*i, where a is the real part, and b is the imaginary part.",examples:["i","i * i","sqrt(-1)"],seealso:[]};var pF={name:"Infinity",category:"Constants",syntax:["Infinity"],description:"Infinity, a number which is larger than the maximum number that can be handled by a floating point number.",examples:["Infinity","1 / 0"],seealso:[]};var dF={name:"LN10",category:"Constants",syntax:["LN10"],description:"Returns the natural logarithm of 10, approximately equal to 2.302",examples:["LN10","log(10)"],seealso:[]};var hF={name:"LN2",category:"Constants",syntax:["LN2"],description:"Returns the natural logarithm of 2, approximately equal to 0.693",examples:["LN2","log(2)"],seealso:[]};var vF={name:"LOG10E",category:"Constants",syntax:["LOG10E"],description:"Returns the base-10 logarithm of E, approximately equal to 0.434",examples:["LOG10E","log(e, 10)"],seealso:[]};var gF={name:"LOG2E",category:"Constants",syntax:["LOG2E"],description:"Returns the base-2 logarithm of E, approximately equal to 1.442",examples:["LOG2E","log(e, 2)"],seealso:[]};var yF={name:"NaN",category:"Constants",syntax:["NaN"],description:"Not a number",examples:["NaN","0 / 0"],seealso:[]};var xF={name:"null",category:"Constants",syntax:["null"],description:"Value null",examples:["null"],seealso:["true","false"]};var bF={name:"phi",category:"Constants",syntax:["phi"],description:"Phi is the golden ratio. Two quantities are in the golden ratio if their ratio is the same as the ratio of their sum to the larger of the two quantities. Phi is defined as \`(1 + sqrt(5)) / 2\` and is approximately 1.618034...",examples:["phi"],seealso:[]};var Jb={name:"pi",category:"Constants",syntax:["pi"],description:"The number pi is a mathematical constant that is the ratio of a circle's circumference to its diameter, and is approximately equal to 3.14159",examples:["pi","sin(pi/2)"],seealso:["tau"]};var wF={name:"SQRT1_2",category:"Constants",syntax:["SQRT1_2"],description:"Returns the square root of 1/2, approximately equal to 0.707",examples:["SQRT1_2","sqrt(1/2)"],seealso:[]};var DF={name:"SQRT2",category:"Constants",syntax:["SQRT2"],description:"Returns the square root of 2, approximately equal to 1.414",examples:["SQRT2","sqrt(2)"],seealso:[]};var SF={name:"tau",category:"Constants",syntax:["tau"],description:"Tau is the ratio constant of a circle's circumference to radius, equal to 2 * pi, approximately 6.2832.",examples:["tau","2 * pi"],seealso:["pi"]};var NF={name:"true",category:"Constants",syntax:["true"],description:"Boolean value true",examples:["true"],seealso:["false"]};var AF={name:"version",category:"Constants",syntax:["version"],description:"A string with the version number of math.js",examples:["version"],seealso:[]};var EF={name:"bignumber",category:"Construction",syntax:["bignumber(x)"],description:"Create a big number from a number or string.",exam Line truncated
In case of a (multi dimensional) array or matrix, the prob order quantile of all elements will be calculated.\`,examples:["quantileSeq([3, -1, 5, 7], 0.5)","quantileSeq([3, -1, 5, 7], [1/3, 2/3])","quantileSeq([3, -1, 5, 7], 2)","quantileSeq([-1, 3, 5, 7], 0.5, true)"],seealso:["mean","median","min","max","prod","std","sum","variance"]};var W_={name:"std",category:"Statistics",syntax:["std(a, b, c, ...)","std(A)","std(A, dimension)","std(A, normalization)","std(A, dimension, normalization)"],description:'Compute the standard deviation of all values, defined as std(A) = sqrt(variance(A)). Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["std(2, 4, 6)","std([2, 4, 6, 8])",'std([2, 4, 6, 8], "uncorrected")','std([2, 4, 6, 8], "biased")',"std([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","prod","sum","variance"]};var Y_={name:"cumsum",category:"Statistics",syntax:["cumsum(a, b, c, ...)","cumsum(A)"],description:"Compute the cumulative sum of all values.",examples:["cumsum(2, 3, 4, 1)","cumsum([2, 3, 4, 1])","cumsum([1, 2; 3, 4])","cumsum([1, 2; 3, 4], 1)","cumsum([1, 2; 3, 4], 2)"],seealso:["max","mean","median","min","prod","std","sum","variance"]};var H_={name:"sum",category:"Statistics",syntax:["sum(a, b, c, ...)","sum(A)","sum(A, dimension)"],description:"Compute the sum of all values.",examples:["sum(2, 3, 4, 1)","sum([2, 3, 4, 1])","sum([2, 5; 4, 3])"],seealso:["max","mean","median","min","prod","std","sum","variance"]};var $_={name:"variance",category:"Statistics",syntax:["variance(a, b, c, ...)","variance(A)","variance(A, dimension)","variance(A, normalization)","variance(A, dimension, normalization)"],description:'Compute the variance of all values. Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["variance(2, 4, 6)","variance([2, 4, 6, 8])",'variance([2, 4, 6, 8], "uncorrected")','variance([2, 4, 6, 8], "biased")',"variance([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","min","prod","std","sum"]};var G_={name:"corr",category:"Statistics",syntax:["corr(A,B)"],description:"Compute the correlation coefficient of a two list with values, For matrices, the matrix correlation coefficient is calculated.",examples:["corr([2, 4, 6, 8],[1, 2, 3, 6])","corr(matrix([[1, 2.2, 3, 4.8, 5], [1, 2, 3, 4, 5]]), matrix([[4, 5.3, 6.6, 7, 8], [1, 2, 3, 4, 5]]))"],seealso:["max","mean","min","median","min","prod","std","sum"]};var V_={name:"acos",category:"Trigonometry",syntax:["acos(x)"],description:"Compute the inverse cosine of a value in radians.",examples:["acos(0.5)","acos(cos(2.3))"],seealso:["cos","atan","asin"]};var Z_={name:"acosh",category:"Trigonometry",syntax:["acosh(x)"],description:"Calculate the hyperbolic arccos of a value, defined as \`acosh(x) = ln(sqrt(x^2 - 1) + x)\`.",examples:["acosh(1.5)"],seealso:["cosh","asinh","atanh"]};var K_={name:"acot",category:"Trigonometry",syntax:["acot(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acot(0.5)","acot(cot(0.5))","acot(2)"],seealso:["cot","atan"]};var X_={name:"acoth",category:"Trigonometry",syntax:["acoth(x)"],description:"Calculate the hyperbolic arccotangent of a value, defined as \`acoth(x) = (ln((x+1)/x) + ln(x/(x-1))) / 2\`.",examples:["acoth(2)","acoth(0.5)"],seealso:["acsch","asech"]};var J_={name:"acsc",category:"Trigonometry",syntax:["acsc(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acsc(2)","acsc(csc(0.5))","acsc(0.5)"],seealso:["csc","asin","asec"]};var Q_={name:"acsch",category:"Trigonometry",syntax:["acsch(x)"],description:"Calculate the hyperbolic arccosecant of a value, defined as \`acsch(x) = ln(1/x + sqrt(1/x^2 + 1))\`.",examples:["acsch(0.5)"],seealso:["asech","acoth"]};var j_={name:"asec",category:"Trigonometry",syntax:["asec(x)"],description:"Calculate the inverse secant of a value.",examples:["asec(0.5)","asec(sec(0.5))","asec(2)"],seealso:["acos","acot","acsc"]};var eB={name:"asech",category:"Trigonometry",syntax:["asech(x)"],description:"Calculate the inverse secant of a value.",examples:["asech(0.5)"],seealso:["acsch","acoth"]};var rB={name:"asin",category:"Trigonometry",syntax:["asin(x)"],description:"Compute the inverse sine of a value in radians.",examples:["asin(0.5)","asin(sin(0.5))"],seealso:["sin","acos","atan"]};var tB={name:"asinh",category:"Trigonometry",syntax:["asinh(x)"],description:"Calculate the hyperbolic arcsine of a value, defined as \`asinh(x) = ln(x + sqrt(x^2 + 1))\`.",examples:["asinh(0.5)"],seealso:["acosh","atanh"]};var nB={name:"atan",category:"Trigonometry",syntax:["atan(x)"],description:"Compute the inverse tangent of a value in radians.",examples:["atan(0.5)","atan(tan(0.5))"],seealso:["tan","acos","asin"]};var aB={name:"atan2",category:"Trigonometry",syntax:["atan2(y, x)"],description:"Computes the principal value of the arc tangent of y/x in radians.",examples:["atan2(2, 2) / pi","angle = 60 deg in rad","x = cos(angle)","y Line truncated
In case of a (multi dimensional) array or matrix, the prob order quantile of all elements will be calculated.\`,examples:["quantileSeq([3, -1, 5, 7], 0.5)","quantileSeq([3, -1, 5, 7], [1/3, 2/3])","quantileSeq([3, -1, 5, 7], 2)","quantileSeq([-1, 3, 5, 7], 0.5, true)"],seealso:["mean","median","min","max","prod","std","sum","variance"]};var W_={name:"std",category:"Statistics",syntax:["std(a, b, c, ...)","std(A)","std(A, dimension)","std(A, normalization)","std(A, dimension, normalization)"],description:'Compute the standard deviation of all values, defined as std(A) = sqrt(variance(A)). Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["std(2, 4, 6)","std([2, 4, 6, 8])",'std([2, 4, 6, 8], "uncorrected")','std([2, 4, 6, 8], "biased")',"std([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","prod","sum","variance"]};var Y_={name:"cumsum",category:"Statistics",syntax:["cumsum(a, b, c, ...)","cumsum(A)"],description:"Compute the cumulative sum of all values.",examples:["cumsum(2, 3, 4, 1)","cumsum([2, 3, 4, 1])","cumsum([1, 2; 3, 4])","cumsum([1, 2; 3, 4], 1)","cumsum([1, 2; 3, 4], 2)"],seealso:["max","mean","median","min","prod","std","sum","variance"]};var H_={name:"sum",category:"Statistics",syntax:["sum(a, b, c, ...)","sum(A)","sum(A, dimension)"],description:"Compute the sum of all values.",examples:["sum(2, 3, 4, 1)","sum([2, 3, 4, 1])","sum([2, 5; 4, 3])"],seealso:["max","mean","median","min","prod","std","sum","variance"]};var $_={name:"variance",category:"Statistics",syntax:["variance(a, b, c, ...)","variance(A)","variance(A, dimension)","variance(A, normalization)","variance(A, dimension, normalization)"],description:'Compute the variance of all values. Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["variance(2, 4, 6)","variance([2, 4, 6, 8])",'variance([2, 4, 6, 8], "uncorrected")','variance([2, 4, 6, 8], "biased")',"variance([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","min","prod","std","sum"]};var G_={name:"corr",category:"Statistics",syntax:["corr(A,B)"],description:"Compute the correlation coefficient of a two list with values, For matrices, the matrix correlation coefficient is calculated.",examples:["corr([2, 4, 6, 8],[1, 2, 3, 6])","corr(matrix([[1, 2.2, 3, 4.8, 5], [1, 2, 3, 4, 5]]), matrix([[4, 5.3, 6.6, 7, 8], [1, 2, 3, 4, 5]]))"],seealso:["max","mean","min","median","min","prod","std","sum"]};var V_={name:"acos",category:"Trigonometry",syntax:["acos(x)"],description:"Compute the inverse cosine of a value in radians.",examples:["acos(0.5)","acos(cos(2.3))"],seealso:["cos","atan","asin"]};var Z_={name:"acosh",category:"Trigonometry",syntax:["acosh(x)"],description:"Calculate the hyperbolic arccos of a value, defined as \`acosh(x) = ln(sqrt(x^2 - 1) + x)\`.",examples:["acosh(1.5)"],seealso:["cosh","asinh","atanh"]};var K_={name:"acot",category:"Trigonometry",syntax:["acot(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acot(0.5)","acot(cot(0.5))","acot(2)"],seealso:["cot","atan"]};var X_={name:"acoth",category:"Trigonometry",syntax:["acoth(x)"],description:"Calculate the hyperbolic arccotangent of a value, defined as \`acoth(x) = (ln((x+1)/x) + ln(x/(x-1))) / 2\`.",examples:["acoth(2)","acoth(0.5)"],seealso:["acsch","asech"]};var J_={name:"acsc",category:"Trigonometry",syntax:["acsc(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acsc(2)","acsc(csc(0.5))","acsc(0.5)"],seealso:["csc","asin","asec"]};var Q_={name:"acsch",category:"Trigonometry",syntax:["acsch(x)"],description:"Calculate the hyperbolic arccosecant of a value, defined as \`acsch(x) = ln(1/x + sqrt(1/x^2 + 1))\`.",examples:["acsch(0.5)"],seealso:["asech","acoth"]};var j_={name:"asec",category:"Trigonometry",syntax:["asec(x)"],description:"Calculate the inverse secant of a value.",examples:["asec(0.5)","asec(sec(0.5))","asec(2)"],seealso:["acos","acot","acsc"]};var eB={name:"asech",category:"Trigonometry",syntax:["asech(x)"],description:"Calculate the inverse secant of a value.",examples:["asech(0.5)"],seealso:["acsch","acoth"]};var rB={name:"asin",category:"Trigonometry",syntax:["asin(x)"],description:"Compute the inverse sine of a value in radians.",examples:["asin(0.5)","asin(sin(0.5))"],seealso:["sin","acos","atan"]};var tB={name:"asinh",category:"Trigonometry",syntax:["asinh(x)"],description:"Calculate the hyperbolic arcsine of a value, defined as \`asinh(x) = ln(x + sqrt(x^2 + 1))\`.",examples:["asinh(0.5)"],seealso:["acosh","atanh"]};var nB={name:"atan",category:"Trigonometry",syntax:["atan(x)"],description:"Compute the inverse tangent of a value in radians.",examples:["atan(0.5)","atan(tan(0.5))"],seealso:["tan","acos","asin"]};var aB={name:"atan2",category:"Trigonometry",syntax:["atan2(y, x)"],description:"Computes the principal value of the arc tangent of y/x in radians.",examples:["atan2(2, 2) / pi","angle = 60 deg in rad","x = cos(angle)","y Line truncated
/*!
* decimal.js v10.6.0
* An arbitrary-precision Decimal type for JavaScript.
@@ -1094,7 +1094,7 @@ In case of a (multi dimensional) array or matrix, the prob order quantile of all
* Copyright (c) 2023, Robert Eisele (robert@raw.org)
* Dual licensed under the MIT or GPL Version 2 licenses.
**/
`,{name:"Superstate Indexer"})}var aW=class{constructor(t,r){this.numWorkers=t;this.cache=r;this.workers=[],this.busy=[],this.reloadQueue=[],this.reloadSet=new Set,this.callbacks=new Map;for(let n=0;n<t;n++){let i=new Zle({name:"Superstate Indexer "+(n+1)});i.onmessage=a=>this.finish(a.data.job,a.data.result,n),this.workers.push(i),this.busy.push(!1)}}reload(t){let r=Yle(t),n=new Promise((a,o)=>{this.callbacks.has(r)?this.callbacks.get(r)?.push([a,o]):this.callbacks.set(r,[[a,o]])});if(this.reloadSet.has(r))return n;this.reloadSet.add(r);let i=this.nextAvailableWorker();return i!==void 0?this.send(t,i):this.reloadQueue.push(t),n}finish(t,r,n){let i=Yle(t),a=[].concat(this.callbacks.get(i)??[]);this.reloadSet.delete(i),this.callbacks.delete(i),this.busy[n]=!1;let o=this.reloadQueue.shift();if(o!==void 0&&this.send(o,n),"$error"in r)for(let[s,l]of a)l(r.$error);else for(let[s,l]of a)s(r)}async send(t,r){if(t.type=="paths"){let n=await this.cache.spaceManager.allCaches(),i={settings:this.cache.settings,spacesCache:this.cache.spacesIndex,pathCache:n,oldMetadata:this.cache.pathsIndex};this.message(r,{job:t,payload:i}),this.busy[r]=!0;return}if(t.type=="path"){let n=this.cache.spacesIndex.get(t.path),i=t.path,a,o=!1;n&&(a=n.space.name,this.cache.settings.enableFolderNote&&await this.cache.spaceManager.pathExists(i=n.space.notePath)?(i=n.space.notePath,o=!0):i=n.space.defPath);let s=await this.cache.spaceManager.readPathCache(i)??await this.cache.spaceManager.readPathCache(t.path);if(o&&s){let d=await this.cache.spaceManager.readPathCache(t.path);d&&(s={...s,file:d.file,parent:d.parent,subtype:d.subtype,type:d.type,contentTypes:d.contentTypes})}a=a??s?.label.name;let l=await this.cache.spaceManager.parentPathForPath(t.path),u=n?"space":s?.type,c=n?n.type:s?.subtype,f={path:t.path,settings:this.cache.settings,spacesCache:this.cache.spacesIndex,pathMetadata:s,name:a,parent:l,type:u,subtype:c,oldMetadata:this.cache.pathsIndex.get(t.path)};this.message(r,{job:t,payload:f}),this.busy[r]=!0;return}if(t.type=="index"){let n=this.cache.pathsIndex;this.message(r,{job:t,payload:{pathsIndex:n}}),this.busy[r]=!0;return}if(t.type=="context"){let n=this.cache.spacesIndex.get(t.path)?.space;if(!n||!n.path){this.message(r,{job:t,payload:{space:n,mdb:null,paths:[...this.cache.spacesMap.getInverse(t.path)],settings:this.cache.settings,pathsIndex:this.cache.pathsIndex,spacesMap:this.cache.spacesMap,contextsIndex:this.cache.contextsIndex,options:t.payload}}),this.busy[r]=!0;return}let i=await this.cache.spaceManager.contextInitiated(n.path);this.cache.spaceManager.readAllTables(n.path).then(a=>{this.message(r,{job:t,payload:{space:n,mdb:a,paths:[...this.cache.spacesMap.getInverse(t.path)],spacesMap:this.cache.spacesMap,settings:this.cache.settings,dbExists:i,contextsIndex:this.cache.contextsIndex,pathsIndex:this.cache.pathsIndex,options:t.payload}}),this.busy[r]=!0});return}if(t.type=="contexts"){let n=this.cache.allSpaces().filter(a=>a.type!="default").map(a=>a.space),i=new Map;for(let a of n){let o=await this.cache.spaceManager.contextInitiated(a.path);await this.cache.spaceManager.readAllTables(a.path).then(s=>{i.set(a.path,{space:a,mdb:s,paths:[...this.cache.spacesMap.getInverse(a.path)],settings:this.cache.settings,spacesMap:this.cache.spacesMap,contextsIndex:this.cache.contextsIndex,dbExists:o})})}this.message(r,{job:t,payload:{map:i,pathsIndex:this.cache.pathsIndex,settings:this.cache.settings,spacesMap:this.cache.spacesMap,contextsIndex:this.cache.contextsIndex}}),this.busy[r]=!0}}message(t,r){this.workers[t].postMessage(r)}nextAvailableWorker(){let t=this.busy.indexOf(!1);return t==-1?void 0:t}};function Lze(e,t,r,n){let i=[],a={shouldSort:!0,threshold:0,ignoreLocation:!0,keys:[{name:"name",weight:2},"path","label.preview",{name:"spaceNames",weight:.5}]};return new Qd([...t.values()].filter(s=>s.hidden==!1),a,n).search(e).map(s=>s.item).slice(0,r)}function Rze(e){let{queries:t,pathsIndex:r,count:n}=e,i=[];for(let[a,o]of r)!o.hidden&&Qle(t,o,{},!0)&&i.push(o);return i.slice(0,n)}var YD=class{constructor(t,r,n,i,a){this.indexVersion=t;this.onChange=r;this.kit=[i6(),hz,bz(),xz,vz(),yz(),yze,VM(),Sje(),Sze,Mze,Nze,Eze,Cze,kze,Dze,Tze(),Oze,Fze,_ze,Ize,xze,bze,gz(),Ip,Pze,Xle,Kle,Az(),N4,jze,wze,Bze,XT];this.eventsDispatcher=new Yv;let o={...Kk,createAdd:X("add",[],()=>function(f,d){return f+d}),createEqual:X("equal",[],()=>function(f,d){return f==d}),createUnequal:X("unequal",[],()=>function(f,d){return f!=d})},l=Kx(o,{matrix:"Array"});l.import(Jk,{override:!0}),this.formulaContext=l,this.initialized=!1,this.spaceManager=n,this.spaceManager.superstate=this,this.ui=i,this.ui.superstate=this,this.cli=a;let u=new iW(this.cli,this);this.cli.superstate=this,this.cli.terminals.splice(0,0,u),this.cli.mainTerminal=u,this.allMetadata={},this.api=new Dy(this),n.api=new Dy(this,n),this.assets=null,this.pathsIndex=new Map,this.spacesIndex=new Map,this.contextsIndex=new Map,this.actionsIndex=new Map,this.kitFrames=new Map,this.kits=new Map, Line truncated
`,{name:"Superstate Indexer"})}var aW=class{constructor(t,r){this.numWorkers=t;this.cache=r;this.workers=[],this.busy=[],this.reloadQueue=[],this.reloadSet=new Set,this.callbacks=new Map;for(let n=0;n<t;n++){let i=new Zle({name:"Superstate Indexer "+(n+1)});i.onmessage=a=>this.finish(a.data.job,a.data.result,n),this.workers.push(i),this.busy.push(!1)}}reload(t){let r=Yle(t),n=new Promise((a,o)=>{this.callbacks.has(r)?this.callbacks.get(r)?.push([a,o]):this.callbacks.set(r,[[a,o]])});if(this.reloadSet.has(r))return n;this.reloadSet.add(r);let i=this.nextAvailableWorker();return i!==void 0?this.send(t,i):this.reloadQueue.push(t),n}finish(t,r,n){let i=Yle(t),a=[].concat(this.callbacks.get(i)??[]);this.reloadSet.delete(i),this.callbacks.delete(i),this.busy[n]=!1;let o=this.reloadQueue.shift();if(o!==void 0&&this.send(o,n),"$error"in r)for(let[s,l]of a)l(r.$error);else for(let[s,l]of a)s(r)}async send(t,r){if(t.type=="paths"){let n=await this.cache.spaceManager.allCaches(),i={settings:this.cache.settings,spacesCache:this.cache.spacesIndex,pathCache:n,oldMetadata:this.cache.pathsIndex};this.message(r,{job:t,payload:i}),this.busy[r]=!0;return}if(t.type=="path"){let n=this.cache.spacesIndex.get(t.path),i=t.path,a,o=!1;n&&(a=n.space.name,this.cache.settings.enableFolderNote&&await this.cache.spaceManager.pathExists(i=n.space.notePath)?(i=n.space.notePath,o=!0):i=n.space.defPath);let s=await this.cache.spaceManager.readPathCache(i)??await this.cache.spaceManager.readPathCache(t.path);if(o&&s){let d=await this.cache.spaceManager.readPathCache(t.path);d&&(s={...s,file:d.file,parent:d.parent,subtype:d.subtype,type:d.type,contentTypes:d.contentTypes})}a=a??s?.label.name;let l=await this.cache.spaceManager.parentPathForPath(t.path),u=n?"space":s?.type,c=n?n.type:s?.subtype,f={path:t.path,settings:this.cache.settings,spacesCache:this.cache.spacesIndex,pathMetadata:s,name:a,parent:l,type:u,subtype:c,oldMetadata:this.cache.pathsIndex.get(t.path)};this.message(r,{job:t,payload:f}),this.busy[r]=!0;return}if(t.type=="index"){let n=this.cache.pathsIndex;this.message(r,{job:t,payload:{pathsIndex:n}}),this.busy[r]=!0;return}if(t.type=="context"){let n=this.cache.spacesIndex.get(t.path)?.space;if(!n||!n.path){this.message(r,{job:t,payload:{space:n,mdb:null,paths:[...this.cache.spacesMap.getInverse(t.path)],settings:this.cache.settings,pathsIndex:this.cache.pathsIndex,spacesMap:this.cache.spacesMap,contextsIndex:this.cache.contextsIndex,options:t.payload}}),this.busy[r]=!0;return}let i=await this.cache.spaceManager.contextInitiated(n.path);this.cache.spaceManager.readAllTables(n.path).then(a=>{this.message(r,{job:t,payload:{space:n,mdb:a,paths:[...this.cache.spacesMap.getInverse(t.path)],spacesMap:this.cache.spacesMap,settings:this.cache.settings,dbExists:i,contextsIndex:this.cache.contextsIndex,pathsIndex:this.cache.pathsIndex,options:t.payload}}),this.busy[r]=!0});return}if(t.type=="contexts"){let n=this.cache.allSpaces().filter(a=>a.type!="default").map(a=>a.space),i=new Map;for(let a of n){let o=await this.cache.spaceManager.contextInitiated(a.path);await this.cache.spaceManager.readAllTables(a.path).then(s=>{i.set(a.path,{space:a,mdb:s,paths:[...this.cache.spacesMap.getInverse(a.path)],settings:this.cache.settings,spacesMap:this.cache.spacesMap,contextsIndex:this.cache.contextsIndex,dbExists:o})})}this.message(r,{job:t,payload:{map:i,pathsIndex:this.cache.pathsIndex,settings:this.cache.settings,spacesMap:this.cache.spacesMap,contextsIndex:this.cache.contextsIndex}}),this.busy[r]=!0}}message(t,r){this.workers[t].postMessage(r)}nextAvailableWorker(){let t=this.busy.indexOf(!1);return t==-1?void 0:t}};function Lze(e,t,r,n){let i=[],a={shouldSort:!0,threshold:0,ignoreLocation:!0,keys:[{name:"name",weight:2},"path","label.preview",{name:"spaceNames",weight:.5}]};return new Qd([...t.values()].filter(s=>s.hidden==!1),a,n).search(e).map(s=>s.item).slice(0,r)}function Rze(e){let{queries:t,pathsIndex:r,count:n}=e,i=[];for(let[a,o]of r)!o.hidden&&Qle(t,o,{},!0)&&i.push(o);return i.slice(0,n)}var YD=class{constructor(t,r,n,i,a){this.indexVersion=t;this.onChange=r;this.kit=[i6(),hz,bz(),xz,vz(),yz(),yze,VM(),Sje(),Sze,Mze,Nze,Eze,Cze,kze,Dze,Tze(),Oze,Fze,_ze,Ize,xze,bze,gz(),Ip,Pze,Xle,Kle,Az(),N4,jze,wze,Bze,XT];this.eventsDispatcher=new Yv;let o={...Kk,createAdd:X("add",[],()=>function(f,d){return f+d}),createEqual:X("equal",[],()=>function(f,d){return f==d}),createUnequal:X("unequal",[],()=>function(f,d){return f!=d})},l=Kx(o,{matrix:"Array"});l.import(Jk,{override:!0}),this.formulaContext=l,this.initialized=!1,this.spaceManager=n,this.spaceManager.superstate=this,this.ui=i,this.ui.superstate=this,this.cli=a;let u=new iW(this.cli,this);this.cli.superstate=this,this.cli.terminals.splice(0,0,u),this.cli.mainTerminal=u,this.allMetadata={},this.api=new Dy(this),n.api=new Dy(this,n),this.assets=null,this.pathsIndex=new Map,this.spacesIndex=new Map,this.contextsIndex=new Map,this.actionsIndex=new Map,this.kitFrames=new Map,this.kits=new Map, Line truncated
/*
object-assign
(c) Sindre Sorhus