@bygd/nc-report-ui 0.1.19 → 0.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -21,7 +21,7 @@ var _BYGD_NC_REPORT_UI=function(){"use strict";function e(e,t){return t.forEach(
|
|
|
21
21
|
* author : Adam Draper
|
|
22
22
|
* license : MIT
|
|
23
23
|
* http://adamwdraper.github.com/Numeral-js/
|
|
24
|
-
*/var Ya,Xa=(qa||(qa=1,Ya=Ga,function(e,t){Ya.exports?Ya.exports=t():e.numeral=t()}(Ga.exports,function(){var e,t,n,r,o,i={},a={},s={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},l={currentLocale:s.currentLocale,zeroFormat:s.zeroFormat,nullFormat:s.nullFormat,defaultFormat:s.defaultFormat,scalePercentBy100:s.scalePercentBy100};function u(e,t){this._input=e,this._value=t}return(e=function(n){var r,o,a,s;if(e.isNumeral(n))r=n.value();else if(0===n||void 0===n)r=0;else if(null===n||t.isNaN(n))r=null;else if("string"==typeof n)if(l.zeroFormat&&n===l.zeroFormat)r=0;else if(l.nullFormat&&n===l.nullFormat||!n.replace(/[^0-9]+/g,"").length)r=null;else{for(o in i)if((s="function"==typeof i[o].regexps.unformat?i[o].regexps.unformat():i[o].regexps.unformat)&&n.match(s)){a=i[o].unformat;break}r=(a=a||e._.stringToNumber)(n)}else r=Number(n)||null;return new u(n,r)}).version="2.0.6",e.isNumeral=function(e){return e instanceof u},e._=t={numberToFormat:function(t,n,r){var o,i,s,l,u,c,d,p,f=a[e.options.currentLocale],h=!1,m=!1,g="",v=1e12,y=1e9,b=1e6,w="",x=!1;if(t=t||0,s=Math.abs(t),e._.includes(n,"(")?(h=!0,n=n.replace(/[\(|\)]/g,"")):(e._.includes(n,"+")||e._.includes(n,"-"))&&(c=e._.includes(n,"+")?n.indexOf("+"):t<0?n.indexOf("-"):-1,n=n.replace(/[\+|\-]/g,"")),e._.includes(n,"a")&&(i=!!(i=n.match(/a(k|m|b|t)?/))&&i[1],e._.includes(n," a")&&(g=" "),n=n.replace(new RegExp(g+"a[kmbt]?"),""),s>=v&&!i||"t"===i?(g+=f.abbreviations.trillion,t/=v):s<v&&s>=y&&!i||"b"===i?(g+=f.abbreviations.billion,t/=y):s<y&&s>=b&&!i||"m"===i?(g+=f.abbreviations.million,t/=b):(s<b&&s>=1e3&&!i||"k"===i)&&(g+=f.abbreviations.thousand,t/=1e3)),e._.includes(n,"[.]")&&(m=!0,n=n.replace("[.]",".")),l=t.toString().split(".")[0],u=n.split(".")[1],d=n.indexOf(","),o=(n.split(".")[0].split(",")[0].match(/0/g)||[]).length,u?(e._.includes(u,"[")?(u=(u=u.replace("]","")).split("["),w=e._.toFixed(t,u[0].length+u[1].length,r,u[1].length)):w=e._.toFixed(t,u.length,r),l=w.split(".")[0],w=e._.includes(w,".")?f.delimiters.decimal+w.split(".")[1]:"",m&&0===Number(w.slice(1))&&(w="")):l=e._.toFixed(t,0,r),g&&!i&&Number(l)>=1e3&&g!==f.abbreviations.trillion)switch(l=String(Number(l)/1e3),g){case f.abbreviations.thousand:g=f.abbreviations.million;break;case f.abbreviations.million:g=f.abbreviations.billion;break;case f.abbreviations.billion:g=f.abbreviations.trillion}if(e._.includes(l,"-")&&(l=l.slice(1),x=!0),l.length<o)for(var k=o-l.length;k>0;k--)l="0"+l;return d>-1&&(l=l.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+f.delimiters.thousands)),0===n.indexOf(".")&&(l=""),p=l+w+(g||""),h?p=(h&&x?"(":"")+p+(h&&x?")":""):c>=0?p=0===c?(x?"-":"+")+p:p+(x?"-":"+"):x&&(p="-"+p),p},stringToNumber:function(e){var t,n,r,o=a[l.currentLocale],i=e,s={thousand:3,million:6,billion:9,trillion:12};if(l.zeroFormat&&e===l.zeroFormat)n=0;else if(l.nullFormat&&e===l.nullFormat||!e.replace(/[^0-9]+/g,"").length)n=null;else{for(t in n=1,"."!==o.delimiters.decimal&&(e=e.replace(/\./g,"").replace(o.delimiters.decimal,".")),s)if(r=new RegExp("[^a-zA-Z]"+o.abbreviations[t]+"(?:\\)|(\\"+o.currency.symbol+")?(?:\\))?)?$"),i.match(r)){n*=Math.pow(10,s[t]);break}n*=(e.split("-").length+Math.min(e.split("(").length-1,e.split(")").length-1))%2?1:-1,e=e.replace(/[^0-9\.]+/g,""),n*=Number(e)}return n},isNaN:function(e){return"number"==typeof e&&isNaN(e)},includes:function(e,t){return-1!==e.indexOf(t)},insert:function(e,t,n){return e.slice(0,n)+t+e.slice(n)},reduce:function(e,t){if(null===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof t)throw new TypeError(t+" is not a function");var n,r=Object(e),o=r.length>>>0,i=0;if(3===arguments.length)n=arguments[2];else{for(;i<o&&!(i in r);)i++;if(i>=o)throw new TypeError("Reduce of empty array with no initial value");n=r[i++]}for(;i<o;i++)i in r&&(n=t(n,r[i],i,r));return n},multiplier:function(e){var t=e.toString().split(".");return t.length<2?1:Math.pow(10,t[1].length)},correctionFactor:function(){return Array.prototype.slice.call(arguments).reduce(function(e,n){var r=t.multiplier(n);return e>r?e:r},1)},toFixed:function(e,t,n,r){var o,i,a,s,l=e.toString().split("."),u=t-(r||0);return o=2===l.length?Math.min(Math.max(l[1].length,u),t):u,a=Math.pow(10,o),s=(n(e+"e+"+o)/a).toFixed(o),r>t-o&&(i=new RegExp("\\.?0{1,"+(r-(t-o))+"}$"),s=s.replace(i,"")),s}},e.options=l,e.formats=i,e.locales=a,e.locale=function(e){return e&&(l.currentLocale=e.toLowerCase()),l.currentLocale},e.localeData=function(e){if(!e)return a[l.currentLocale];if(e=e.toLowerCase(),!a[e])throw new Error("Unknown locale : "+e);return a[e]},e.reset=function(){for(var e in s)l[e]=s[e]},e.zeroFormat=function(e){l.zeroFormat="string"==typeof e?e:null},e.nullFormat=function(e){l.nullFormat="string"==typeof e?e:null},e.defaultFormat=function(e){l.defaultFormat="string"==typeof e?e:"0.0"},e.register=function(e,t,n){if(t=t.toLowerCase(),this[e+"s"][t])throw new TypeError(t+" "+e+" already registered.");return this[e+"s"][t]=n,n},e.validate=function(t,n){var r,o,i,a,s,l,u,c;if("string"!=typeof t&&(t+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",t)),(t=t.trim()).match(/^\d+$/))return!0;if(""===t)return!1;try{u=e.localeData(n)}catch(t){u=e.localeData(e.locale())}return i=u.currency.symbol,s=u.abbreviations,r=u.delimiters.decimal,o="."===u.delimiters.thousands?"\\.":u.delimiters.thousands,!(null!==(c=t.match(/^[^\d]+/))&&(t=t.substr(1),c[0]!==i)||null!==(c=t.match(/[^\d]+$/))&&(t=t.slice(0,-1),c[0]!==s.thousand&&c[0]!==s.million&&c[0]!==s.billion&&c[0]!==s.trillion)||(l=new RegExp(o+"{2}"),t.match(/[^\d.,]/g)||(a=t.split(r)).length>2||(a.length<2?!a[0].match(/^\d+.*\d$/)||a[0].match(l):1===a[0].length?!a[0].match(/^\d+$/)||a[0].match(l)||!a[1].match(/^\d+$/):!a[0].match(/^\d+.*\d$/)||a[0].match(l)||!a[1].match(/^\d+$/))))},e.fn=u.prototype={clone:function(){return e(this)},format:function(t,n){var r,o,a,s=this._value,u=t||l.defaultFormat;if(n=n||Math.round,0===s&&null!==l.zeroFormat)o=l.zeroFormat;else if(null===s&&null!==l.nullFormat)o=l.nullFormat;else{for(r in i)if(u.match(i[r].regexps.format)){a=i[r].format;break}o=(a=a||e._.numberToFormat)(s,u,n)}return o},value:function(){return this._value},input:function(){return this._input},set:function(e){return this._value=Number(e),this},add:function(e){var n=t.correctionFactor.call(null,this._value,e);return this._value=t.reduce([this._value,e],function(e,t,r,o){return e+Math.round(n*t)},0)/n,this},subtract:function(e){var n=t.correctionFactor.call(null,this._value,e);return this._value=t.reduce([e],function(e,t,r,o){return e-Math.round(n*t)},Math.round(this._value*n))/n,this},multiply:function(e){return this._value=t.reduce([this._value,e],function(e,n,r,o){var i=t.correctionFactor(e,n);return Math.round(e*i)*Math.round(n*i)/Math.round(i*i)},1),this},divide:function(e){return this._value=t.reduce([this._value,e],function(e,n,r,o){var i=t.correctionFactor(e,n);return Math.round(e*i)/Math.round(n*i)}),this},difference:function(t){return Math.abs(e(this._value).subtract(t).value())}},e.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$"}}),e.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(t,n,r){var o,i=e._.includes(n," BPS")?" ":"";return t*=1e4,n=n.replace(/\s?BPS/,""),o=e._.numberToFormat(t,n,r),e._.includes(o,")")?((o=o.split("")).splice(-1,0,i+"BPS"),o=o.join("")):o=o+i+"BPS",o},unformat:function(t){return+(1e-4*e._.stringToNumber(t)).toFixed(15)}}),r={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},o="("+(o=(n={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}).suffixes.concat(r.suffixes.filter(function(e){return n.suffixes.indexOf(e)<0})).join("|")).replace("B","B(?!PS)")+")",e.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(o)},format:function(t,o,i){var a,s,l,u=e._.includes(o,"ib")?r:n,c=e._.includes(o," b")||e._.includes(o," ib")?" ":"";for(o=o.replace(/\s?i?b/,""),a=0;a<=u.suffixes.length;a++)if(s=Math.pow(u.base,a),l=Math.pow(u.base,a+1),null===t||0===t||t>=s&&t<l){c+=u.suffixes[a],s>0&&(t/=s);break}return e._.numberToFormat(t,o,i)+c},unformat:function(t){var o,i,a=e._.stringToNumber(t);if(a){for(o=n.suffixes.length-1;o>=0;o--){if(e._.includes(t,n.suffixes[o])){i=Math.pow(n.base,o);break}if(e._.includes(t,r.suffixes[o])){i=Math.pow(r.base,o);break}}a*=i||1}return a}}),e.register("format","currency",{regexps:{format:/(\$)/},format:function(t,n,r){var o,i,a=e.locales[e.options.currentLocale],s={before:n.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:n.match(/([\+|\-|\)|\s|\$]*)$/)[0]};for(n=n.replace(/\s?\$\s?/,""),o=e._.numberToFormat(t,n,r),t>=0?(s.before=s.before.replace(/[\-\(]/,""),s.after=s.after.replace(/[\-\)]/,"")):t<0&&!e._.includes(s.before,"-")&&!e._.includes(s.before,"(")&&(s.before="-"+s.before),i=0;i<s.before.length;i++)switch(s.before[i]){case"$":o=e._.insert(o,a.currency.symbol,i);break;case" ":o=e._.insert(o," ",i+a.currency.symbol.length-1)}for(i=s.after.length-1;i>=0;i--)switch(s.after[i]){case"$":o=i===s.after.length-1?o+a.currency.symbol:e._.insert(o,a.currency.symbol,-(s.after.length-(1+i)));break;case" ":o=i===s.after.length-1?o+" ":e._.insert(o," ",-(s.after.length-(1+i)+a.currency.symbol.length-1))}return o}}),e.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(t,n,r){var o=("number"!=typeof t||e._.isNaN(t)?"0e+0":t.toExponential()).split("e");return n=n.replace(/e[\+|\-]{1}0/,""),e._.numberToFormat(Number(o[0]),n,r)+"e"+o[1]},unformat:function(t){var n=e._.includes(t,"e+")?t.split("e+"):t.split("e-"),r=Number(n[0]),o=Number(n[1]);return o=e._.includes(t,"e-")?o*=-1:o,e._.reduce([r,Math.pow(10,o)],function(t,n,r,o){var i=e._.correctionFactor(t,n);return t*i*(n*i)/(i*i)},1)}}),e.register("format","ordinal",{regexps:{format:/(o)/},format:function(t,n,r){var o=e.locales[e.options.currentLocale],i=e._.includes(n," o")?" ":"";return n=n.replace(/\s?o/,""),i+=o.ordinal(t),e._.numberToFormat(t,n,r)+i}}),e.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(t,n,r){var o,i=e._.includes(n," %")?" ":"";return e.options.scalePercentBy100&&(t*=100),n=n.replace(/\s?\%/,""),o=e._.numberToFormat(t,n,r),e._.includes(o,")")?((o=o.split("")).splice(-1,0,i+"%"),o=o.join("")):o=o+i+"%",o},unformat:function(t){var n=e._.stringToNumber(t);return e.options.scalePercentBy100?.01*n:n}}),e.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(e,t,n){var r=Math.floor(e/60/60),o=Math.floor((e-60*r*60)/60),i=Math.round(e-60*r*60-60*o);return r+":"+(o<10?"0"+o:o)+":"+(i<10?"0"+i:i)},unformat:function(e){var t=e.split(":"),n=0;return 3===t.length?(n+=60*Number(t[0])*60,n+=60*Number(t[1]),n+=Number(t[2])):2===t.length&&(n+=60*Number(t[0]),n+=Number(t[1])),Number(n)}}),e})),Ga.exports),Qa=t(Xa);function Ja(e,t,n="array"){const r=e.columns,o=[...t.doc.metrics,...t.doc.dimensions].reduce((e,t)=>(e[t.name]=t,e),{});return e=>{const t="array"===n?[]:{};return r.reduce((t,r)=>{const i=e[r.name],a=o[r.name];let s=i;return s="timestamp"===a.type?new Date(i):a.format?a.format&&a.prefix?{v:+i,f:a.prefix+" "+Qa(i).format(a.format)}:a.format?{v:+i,f:Qa(i).format(a.format)}:i:i,"array"===n?t.push(s):t[r.name]=s?.f||s,t},t)}}function Za(e,t){return function(){return e.apply(t,arguments)}}const{toString:es}=Object.prototype,{getPrototypeOf:ts}=Object,{iterator:ns,toStringTag:rs}=Symbol,os=(e=>t=>{const n=es.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),is=e=>(e=e.toLowerCase(),t=>os(t)===e),as=e=>t=>typeof t===e,{isArray:ss}=Array,ls=as("undefined");const us=is("ArrayBuffer");const cs=as("string"),ds=as("function"),ps=as("number"),fs=e=>null!==e&&"object"==typeof e,hs=e=>{if("object"!==os(e))return!1;const t=ts(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||rs in e||ns in e)},ms=is("Date"),gs=is("File"),vs=is("Blob"),ys=is("FileList"),bs=is("URLSearchParams"),[ws,xs,ks,Ss]=["ReadableStream","Request","Response","Headers"].map(is);function Es(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),ss(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(r=0;r<i;r++)a=o[r],t.call(null,e[a],a,e)}}function Cs(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const Os="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,_s=e=>!ls(e)&&e!==Os;const Ts=(Rs="undefined"!=typeof Uint8Array&&ts(Uint8Array),e=>Rs&&e instanceof Rs);var Rs;const Ps=is("HTMLFormElement"),As=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Ls=is("RegExp"),Ns=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Es(n,(n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)}),Object.defineProperties(e,r)};const Ms=is("AsyncFunction"),Is=(Fs="function"==typeof setImmediate,$s=ds(Os.postMessage),Fs?setImmediate:$s?((e,t)=>(Os.addEventListener("message",({source:n,data:r})=>{n===Os&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),Os.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e));var Fs,$s;const js="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Os):"undefined"!=typeof process&&process.nextTick||Is;var zs={isArray:ss,isArrayBuffer:us,isBuffer:function(e){return null!==e&&!ls(e)&&null!==e.constructor&&!ls(e.constructor)&&ds(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||ds(e.append)&&("formdata"===(t=os(e))||"object"===t&&ds(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&us(e.buffer),t},isString:cs,isNumber:ps,isBoolean:e=>!0===e||!1===e,isObject:fs,isPlainObject:hs,isReadableStream:ws,isRequest:xs,isResponse:ks,isHeaders:Ss,isUndefined:ls,isDate:ms,isFile:gs,isBlob:vs,isRegExp:Ls,isFunction:ds,isStream:e=>fs(e)&&ds(e.pipe),isURLSearchParams:bs,isTypedArray:Ts,isFileList:ys,forEach:Es,merge:function e(){const{caseless:t}=_s(this)&&this||{},n={},r=(r,o)=>{const i=t&&Cs(n,o)||o;hs(n[i])&&hs(r)?n[i]=e(n[i],r):hs(r)?n[i]=e({},r):ss(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&Es(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(Es(t,(t,r)=>{n&&ds(t)?e[r]=Za(t,n):e[r]=t},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&ts(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:os,kindOfTest:is,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(ss(e))return e;let t=e.length;if(!ps(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[ns]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Ps,hasOwnProperty:As,hasOwnProp:As,reduceDescriptors:Ns,freezeMethods:e=>{Ns(e,(t,n)=>{if(ds(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];ds(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return ss(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:Cs,global:Os,isContextDefined:_s,isSpecCompliantForm:function(e){return!!(e&&ds(e.append)&&"FormData"===e[rs]&&e[ns])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(fs(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=ss(e)?[]:{};return Es(e,(e,t)=>{const i=n(e,r+1);!ls(i)&&(o[t]=i)}),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:Ms,isThenable:e=>e&&(fs(e)||ds(e))&&ds(e.then)&&ds(e.catch),setImmediate:Is,asap:js,isIterable:e=>null!=e&&ds(e[ns])};function Bs(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}zs.inherits(Bs,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:zs.toJSONObject(this.config),code:this.code,status:this.status}}});const Ds=Bs.prototype,Ws={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Ws[e]={value:e}}),Object.defineProperties(Bs,Ws),Object.defineProperty(Ds,"isAxiosError",{value:!0}),Bs.from=(e,t,n,r,o,i)=>{const a=Object.create(Ds);return zs.toFlatObject(e,a,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e),Bs.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};function Us(e){return zs.isPlainObject(e)||zs.isArray(e)}function Vs(e){return zs.endsWith(e,"[]")?e.slice(0,-2):e}function Ks(e,t,n){return e?e.concat(t).map(function(e,t){return e=Vs(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const Hs=zs.toFlatObject(zs,{},null,function(e){return/^is[A-Z]/.test(e)});function qs(e,t,n){if(!zs.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=zs.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!zs.isUndefined(t[e])})).metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&zs.isSpecCompliantForm(t);if(!zs.isFunction(o))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(zs.isDate(e))return e.toISOString();if(zs.isBoolean(e))return e.toString();if(!s&&zs.isBlob(e))throw new Bs("Blob is not supported. Use a Buffer instead.");return zs.isArrayBuffer(e)||zs.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let s=e;if(e&&!o&&"object"==typeof e)if(zs.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(zs.isArray(e)&&function(e){return zs.isArray(e)&&!e.some(Us)}(e)||(zs.isFileList(e)||zs.endsWith(n,"[]"))&&(s=zs.toArray(e)))return n=Vs(n),s.forEach(function(e,r){!zs.isUndefined(e)&&null!==e&&t.append(!0===a?Ks([n],r,i):null===a?n:n+"[]",l(e))}),!1;return!!Us(e)||(t.append(Ks(o,n,i),l(e)),!1)}const c=[],d=Object.assign(Hs,{defaultVisitor:u,convertValue:l,isVisitable:Us});if(!zs.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!zs.isUndefined(n)){if(-1!==c.indexOf(n))throw Error("Circular reference detected in "+r.join("."));c.push(n),zs.forEach(n,function(n,i){!0===(!(zs.isUndefined(n)||null===n)&&o.call(t,n,zs.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i])}),c.pop()}}(e),t}function Gs(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Ys(e,t){this._pairs=[],e&&qs(e,this,t)}const Xs=Ys.prototype;function Qs(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Js(e,t,n){if(!t)return e;const r=n&&n.encode||Qs;zs.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(i=o?o(t,n):zs.isURLSearchParams(t)?t.toString():new Ys(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}Xs.append=function(e,t){this._pairs.push([e,t])},Xs.toString=function(e){const t=e?function(t){return e.call(this,t,Gs)}:Gs;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class Zs{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){zs.forEach(this.handlers,function(t){null!==t&&e(t)})}}var el={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},tl={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Ys,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const nl="undefined"!=typeof window&&"undefined"!=typeof document,rl="object"==typeof navigator&&navigator||void 0,ol=nl&&(!rl||["ReactNative","NativeScript","NS"].indexOf(rl.product)<0),il="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,al=nl&&window.location.href||"http://localhost";var sl={...Object.freeze({__proto__:null,hasBrowserEnv:nl,hasStandardBrowserEnv:ol,hasStandardBrowserWebWorkerEnv:il,navigator:rl,origin:al}),...tl};function ll(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;if(i=!i&&zs.isArray(r)?r.length:i,s)return zs.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a;r[i]&&zs.isObject(r[i])||(r[i]=[]);return t(e,n,r[i],o)&&zs.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!a}if(zs.isFormData(e)&&zs.isFunction(e.entries)){const n={};return zs.forEachEntry(e,(e,r)=>{t(function(e){return zs.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null}const ul={transitional:el,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=zs.isObject(e);o&&zs.isHTMLForm(e)&&(e=new FormData(e));if(zs.isFormData(e))return r?JSON.stringify(ll(e)):e;if(zs.isArrayBuffer(e)||zs.isBuffer(e)||zs.isStream(e)||zs.isFile(e)||zs.isBlob(e)||zs.isReadableStream(e))return e;if(zs.isArrayBufferView(e))return e.buffer;if(zs.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return qs(e,new sl.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return sl.isNode&&zs.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=zs.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return qs(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(zs.isString(e))try{return(t||JSON.parse)(e),zs.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ul.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(zs.isResponse(e)||zs.isReadableStream(e))return e;if(e&&zs.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw Bs.from(e,Bs.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:sl.classes.FormData,Blob:sl.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};zs.forEach(["delete","get","head","post","put","patch"],e=>{ul.headers[e]={}});const cl=zs.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const dl=Symbol("internals");function pl(e){return e&&String(e).trim().toLowerCase()}function fl(e){return!1===e||null==e?e:zs.isArray(e)?e.map(fl):String(e)}function hl(e,t,n,r,o){return zs.isFunction(r)?r.call(this,t,n):(o&&(t=n),zs.isString(t)?zs.isString(r)?-1!==t.indexOf(r):zs.isRegExp(r)?r.test(t):void 0:void 0)}let ml=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=pl(t);if(!o)throw new Error("header name must be a non-empty string");const i=zs.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=fl(e))}const i=(e,t)=>zs.forEach(e,(e,n)=>o(e,n,t));if(zs.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(zs.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&cl[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(zs.isObject(e)&&zs.isIterable(e)){let n,r,o={};for(const t of e){if(!zs.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[r=t[0]]=(n=o[r])?zs.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}i(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=pl(e)){const n=zs.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(zs.isFunction(t))return t.call(this,e,n);if(zs.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=pl(e)){const n=zs.findKey(this,e);return!(!n||void 0===this[n]||t&&!hl(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=pl(e)){const o=zs.findKey(n,e);!o||t&&!hl(0,n[o],o,t)||(delete n[o],r=!0)}}return zs.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!hl(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return zs.forEach(this,(r,o)=>{const i=zs.findKey(n,o);if(i)return t[i]=fl(r),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();a!==o&&delete t[o],t[a]=fl(r),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return zs.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&zs.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[dl]=this[dl]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=pl(e);t[r]||(!function(e,t){const n=zs.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return zs.isArray(e)?e.forEach(r):r(e),this}};function gl(e,t){const n=this||ul,r=t||n,o=ml.from(r.headers);let i=r.data;return zs.forEach(e,function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function vl(e){return!(!e||!e.__CANCEL__)}function yl(e,t,n){Bs.call(this,null==e?"canceled":e,Bs.ERR_CANCELED,t,n),this.name="CanceledError"}function bl(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Bs("Request failed with status code "+n.status,[Bs.ERR_BAD_REQUEST,Bs.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}ml.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),zs.reduceDescriptors(ml.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),zs.freezeMethods(ml),zs.inherits(yl,Bs,{__CANCEL__:!0});const wl=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),u=r[a];o||(o=l),n[i]=s,r[i]=l;let c=a,d=0;for(;c!==i;)d+=n[c++],c%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),l-o<t)return;const p=u&&l-u;return p?Math.round(1e3*d/p):void 0}}(50,250);return function(e,t){let n,r,o=0,i=1e3/t;const a=(t,i=Date.now())=>{o=i,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=i?a(e,t):(n=e,r||(r=setTimeout(()=>{r=null,a(n)},i-s)))},()=>n&&a(n)]}(n=>{const i=n.loaded,a=n.lengthComputable?n.total:void 0,s=i-r,l=o(s);r=i;e({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&i<=a?(a-i)/l:void 0,event:n,lengthComputable:null!=a,[t?"download":"upload"]:!0})},n)},xl=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},kl=e=>(...t)=>zs.asap(()=>e(...t));var Sl=sl.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,sl.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(sl.origin),sl.navigator&&/(msie|trident)/i.test(sl.navigator.userAgent)):()=>!0,El=sl.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];zs.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),zs.isString(r)&&a.push("path="+r),zs.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Cl(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Ol=e=>e instanceof ml?{...e}:e;function _l(e,t){t=t||{};const n={};function r(e,t,n,r){return zs.isPlainObject(e)&&zs.isPlainObject(t)?zs.merge.call({caseless:r},e,t):zs.isPlainObject(t)?zs.merge({},t):zs.isArray(t)?t.slice():t}function o(e,t,n,o){return zs.isUndefined(t)?zs.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!zs.isUndefined(t))return r(void 0,t)}function a(e,t){return zs.isUndefined(t)?zs.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,n)=>o(Ol(e),Ol(t),0,!0)};return zs.forEach(Object.keys(Object.assign({},e,t)),function(r){const i=l[r]||o,a=i(e[r],t[r],r);zs.isUndefined(a)&&i!==s||(n[r]=a)}),n}var Tl=e=>{const t=_l({},e);let n,{data:r,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:s,auth:l}=t;if(t.headers=s=ml.from(s),t.url=Js(Cl(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),zs.isFormData(r))if(sl.hasStandardBrowserEnv||sl.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(n=s.getContentType())){const[e,...t]=n?n.split(";").map(e=>e.trim()).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}if(sl.hasStandardBrowserEnv&&(o&&zs.isFunction(o)&&(o=o(t)),o||!1!==o&&Sl(t.url))){const e=i&&a&&El.read(a);e&&s.set(i,e)}return t};var Rl="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=Tl(e);let o=r.data;const i=ml.from(r.headers).normalize();let a,s,l,u,c,{responseType:d,onUploadProgress:p,onDownloadProgress:f}=r;function h(){u&&u(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let m=new XMLHttpRequest;function g(){if(!m)return;const r=ml.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());bl(function(e){t(e),h()},function(e){n(e),h()},{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new Bs("Request aborted",Bs.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new Bs("Network Error",Bs.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||el;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Bs(t,o.clarifyTimeoutError?Bs.ETIMEDOUT:Bs.ECONNABORTED,e,m)),m=null},void 0===o&&i.setContentType(null),"setRequestHeader"in m&&zs.forEach(i.toJSON(),function(e,t){m.setRequestHeader(t,e)}),zs.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),f&&([l,c]=wl(f,!0),m.addEventListener("progress",l)),p&&m.upload&&([s,u]=wl(p),m.upload.addEventListener("progress",s),m.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(a=t=>{m&&(n(!t||t.type?new yl(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const v=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);v&&-1===sl.protocols.indexOf(v)?n(new Bs("Unsupported protocol "+v+":",Bs.ERR_BAD_REQUEST,e)):m.send(o||null)})};const Pl=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof Bs?t:new yl(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new Bs(`timeout ${t} of ms exceeded`,Bs.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:s}=r;return s.unsubscribe=()=>zs.asap(a),s}},Al=function*(e,t){let n=e.byteLength;if(n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},Ll=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},Nl=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of Ll(e))yield*Al(n,t)}(e,t);let i,a=0,s=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return s(),void e.close();let i=r.byteLength;if(n){let e=a+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},Ml="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Il=Ml&&"function"==typeof ReadableStream,Fl=Ml&&("function"==typeof TextEncoder?($l=new TextEncoder,e=>$l.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var $l;const jl=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},zl=Il&&jl(()=>{let e=!1;const t=new Request(sl.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Bl=Il&&jl(()=>zs.isReadableStream(new Response("").body)),Dl={stream:Bl&&(e=>e.body)};var Wl;Ml&&(Wl=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Dl[e]&&(Dl[e]=zs.isFunction(Wl[e])?t=>t[e]():(t,n)=>{throw new Bs(`Response type '${e}' is not supported`,Bs.ERR_NOT_SUPPORT,n)})}));const Ul=async(e,t)=>{const n=zs.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(zs.isBlob(e))return e.size;if(zs.isSpecCompliantForm(e)){const t=new Request(sl.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return zs.isArrayBufferView(e)||zs.isArrayBuffer(e)?e.byteLength:(zs.isURLSearchParams(e)&&(e+=""),zs.isString(e)?(await Fl(e)).byteLength:void 0)})(t):n};var Vl=Ml&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:u,headers:c,withCredentials:d="same-origin",fetchOptions:p}=Tl(e);u=u?(u+"").toLowerCase():"text";let f,h=Pl([o,i&&i.toAbortSignal()],a);const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let g;try{if(l&&zl&&"get"!==n&&"head"!==n&&0!==(g=await Ul(c,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(zs.isFormData(r)&&(e=n.headers.get("content-type"))&&c.setContentType(e),n.body){const[e,t]=xl(g,wl(kl(l)));r=Nl(n.body,65536,e,t)}}zs.isString(d)||(d=d?"include":"omit");const o="credentials"in Request.prototype;f=new Request(t,{...p,signal:h,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:o?d:void 0});let i=await fetch(f,p);const a=Bl&&("stream"===u||"response"===u);if(Bl&&(s||a&&m)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=i[t]});const t=zs.toFiniteNumber(i.headers.get("content-length")),[n,r]=s&&xl(t,wl(kl(s),!0))||[];i=new Response(Nl(i.body,65536,n,()=>{r&&r(),m&&m()}),e)}u=u||"text";let v=await Dl[zs.findKey(Dl,u)||"text"](i,e);return!a&&m&&m(),await new Promise((t,n)=>{bl(t,n,{data:v,headers:ml.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:f})})}catch(t){if(m&&m(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new Bs("Network Error",Bs.ERR_NETWORK,e,f),{cause:t.cause||t});throw Bs.from(t,t&&t.code,e,f)}});const Kl={http:null,xhr:Rl,fetch:Vl};zs.forEach(Kl,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const Hl=e=>`- ${e}`,ql=e=>zs.isFunction(e)||null===e||!1===e;var Gl=e=>{e=zs.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){let t;if(n=e[i],r=n,!ql(n)&&(r=Kl[(t=String(n)).toLowerCase()],void 0===r))throw new Bs(`Unknown adapter '${t}'`);if(r)break;o[t||"#"+i]=r}if(!r){const e=Object.entries(o).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new Bs("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Hl).join("\n"):" "+Hl(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Yl(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new yl(null,e)}function Xl(e){Yl(e),e.headers=ml.from(e.headers),e.data=gl.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Gl(e.adapter||ul.adapter)(e).then(function(t){return Yl(e),t.data=gl.call(e,e.transformResponse,t),t.headers=ml.from(t.headers),t},function(t){return vl(t)||(Yl(e),t&&t.response&&(t.response.data=gl.call(e,e.transformResponse,t.response),t.response.headers=ml.from(t.response.headers))),Promise.reject(t)})}const Ql="1.10.0",Jl={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Jl[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Zl={};Jl.transitional=function(e,t,n){function r(e,t){return"[Axios v"+Ql+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new Bs(r(o," has been removed"+(t?" in "+t:"")),Bs.ERR_DEPRECATED);return t&&!Zl[o]&&(Zl[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}},Jl.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var eu={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Bs("options must be an object",Bs.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const t=e[i],n=void 0===t||a(t,i,e);if(!0!==n)throw new Bs("option "+i+" must be "+n,Bs.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new Bs("Unknown option "+i,Bs.ERR_BAD_OPTION)}},validators:Jl};const tu=eu.validators;let nu=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Zs,response:new Zs}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=_l(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&eu.assertOptions(n,{silentJSONParsing:tu.transitional(tu.boolean),forcedJSONParsing:tu.transitional(tu.boolean),clarifyTimeoutError:tu.transitional(tu.boolean)},!1),null!=r&&(zs.isFunction(r)?t.paramsSerializer={serialize:r}:eu.assertOptions(r,{encode:tu.function,serialize:tu.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),eu.assertOptions(t,{baseUrl:tu.spelling("baseURL"),withXsrfToken:tu.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&zs.merge(o.common,o[t.method]);o&&zs.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=ml.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))});const l=[];let u;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let c,d=0;if(!s){const e=[Xl.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,l),c=e.length,u=Promise.resolve(t);d<c;)u=u.then(e[d++],e[d++]);return u}c=a.length;let p=t;for(d=0;d<c;){const e=a[d++],t=a[d++];try{p=e(p)}catch(e){t.call(this,e);break}}try{u=Xl.call(this,p)}catch(e){return Promise.reject(e)}for(d=0,c=l.length;d<c;)u=u.then(l[d++],l[d++]);return u}getUri(e){return Js(Cl((e=_l(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};zs.forEach(["delete","get","head","options"],function(e){nu.prototype[e]=function(t,n){return this.request(_l(n||{},{method:e,url:t,data:(n||{}).data}))}}),zs.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,o){return this.request(_l(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}nu.prototype[e]=t(),nu.prototype[e+"Form"]=t(!0)});const ru={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ru).forEach(([e,t])=>{ru[t]=e});const ou=function e(t){const n=new nu(t),r=Za(nu.prototype.request,n);return zs.extend(r,nu.prototype,n,{allOwnKeys:!0}),zs.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(_l(t,n))},r}(ul);ou.Axios=nu,ou.CanceledError=yl,ou.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,o){n.reason||(n.reason=new yl(e,r,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}},ou.isCancel=vl,ou.VERSION=Ql,ou.toFormData=qs,ou.AxiosError=Bs,ou.Cancel=ou.CanceledError,ou.all=function(e){return Promise.all(e)},ou.spread=function(e){return function(t){return e.apply(null,t)}},ou.isAxiosError=function(e){return zs.isObject(e)&&!0===e.isAxiosError},ou.mergeConfig=_l,ou.AxiosHeaders=ml,ou.formToJSON=e=>ll(zs.isHTMLForm(e)?new FormData(e):e),ou.getAdapter=Gl,ou.HttpStatusCode=ru,ou.default=ou;const{Axios:iu,AxiosError:au,CanceledError:su,isCancel:lu,CancelToken:uu,VERSION:cu,all:du,Cancel:pu,isAxiosError:fu,spread:hu,toFormData:mu,AxiosHeaders:gu,HttpStatusCode:vu,formToJSON:yu,getAdapter:bu,mergeConfig:wu}=ou,xu="https://report-api.netcapital.pro",ku=ou.create({baseURL:xu,headers:{"Content-Type":"application/json"}}),Su={},Eu=()=>{const e=Object.keys(Su);return e.length>0?e[0]:null},Cu={setBaseUrl(e){ku.defaults.baseURL=e||xu},setToken(e){e&&(ku.defaults.headers.common.Authorization=`Bearer ${e}`)},loadDashboardMeta:async({dashboardId:e})=>{const{data:t}=await ku.get(`/dashboard-meta/${e}`);return Su[e]={dashboards:t.dashboards||{},charts:t.charts||{},reports:t.reports||{},reportMetadata:t.reportMetadata||{},dateRanges:t.dateRanges||[]},Su[e]},getDashboard:async({id:e,dashboardId:t})=>{const n=t||Eu();if(n&&Su[n]?.dashboards?.[e])return Su[n].dashboards[e];const{data:r}=await ku.get(`/entity/dashboards/${e}`);return r},getChart:async({id:e,dashboardId:t})=>{const n=t||Eu();if(n&&Su[n]?.charts?.[e])return Su[n].charts[e];const{data:r}=await ku.get(`/entity/charts/${e}`);return r},getReport:async({id:e,dashboardId:t})=>{const n=t||Eu();if(n&&Su[n]?.reports?.[e])return Su[n].reports[e];const{data:r}=await ku.get(`/entity/reports/${e}`);return r},getProviders:async()=>{const{data:e}=await ku.get("/entity/providers");return e},getReportSchema:async({id:e,dashboardId:t,query:n={}})=>{const r=t||Eu();if(r&&Su[r]?.reportMetadata?.[e])return Su[r].reportMetadata[e];const{data:o}=await ku.post(`/reports/${e}/metadata`,n);return o},runReport:async({id:e,query:t={}})=>{const{data:n}=await ku.post(`/reports/${e}/run`,t);return n},runAdHocReport:async({report:e})=>{const{data:t}=await ku.post("/report-build/run",e);return t},getDateRanges:async({dashboardId:e}={})=>{const t=e||Eu();if(t&&Su[t]?.dateRanges)return Su[t].dateRanges;const{data:n}=await ku.get("/globals/date-ranges");return n},getReportDefinitions:async()=>{const{data:e}=await ku.get("/report-definitions");return e},getReportDefinition:async({id:e})=>{const{data:t}=await ku.get(`/report-definitions/${e}`);return t},createReportDefinition:async({reportDefinition:e})=>{const{data:t}=await ku.post("/report-definitions",e);return t},updateReportDefinition:async({id:e,reportDefinition:t})=>{const{data:n}=await ku.put(`/report-definitions/${e}`,t);return n},deleteReportDefinition:async({id:e})=>{const{data:t}=await ku.delete(`/report-definitions/${e}`);return t}},Ou=Dr(e=>({headerRow:{fontFamily:e.typography.fontFamily,fontSize:e.typography.fontSize},tableRow:{fontFamily:e.typography.fontFamily,fontSize:e.typography.fontSize},oddTableRow:{fontFamily:e.typography.fontFamily,fontSize:e.typography.fontSize},headerCell:{backgroundColor:"white",padding:"4px !important"}})),_u={none:"YYYY-MM-dd",day:"MMM dd",week:"MMM dd",month:"YYYY MMM",year:"YYYY"};function Tu(){throw new Error("setTimeout has not been defined")}function Ru(){throw new Error("clearTimeout has not been defined")}var Pu=Tu,Au=Ru;function Lu(e){if(Pu===setTimeout)return setTimeout(e,0);if((Pu===Tu||!Pu)&&setTimeout)return Pu=setTimeout,setTimeout(e,0);try{return Pu(e,0)}catch(t){try{return Pu.call(null,e,0)}catch(t){return Pu.call(this,e,0)}}}"function"==typeof wa.setTimeout&&(Pu=setTimeout),"function"==typeof wa.clearTimeout&&(Au=clearTimeout);var Nu,Mu=[],Iu=!1,Fu=-1;function $u(){Iu&&Nu&&(Iu=!1,Nu.length?Mu=Nu.concat(Mu):Fu=-1,Mu.length&&ju())}function ju(){if(!Iu){var e=Lu($u);Iu=!0;for(var t=Mu.length;t;){for(Nu=Mu,Mu=[];++Fu<t;)Nu&&Nu[Fu].run();Fu=-1,t=Mu.length}Nu=null,Iu=!1,function(e){if(Au===clearTimeout)return clearTimeout(e);if((Au===Ru||!Au)&&clearTimeout)return Au=clearTimeout,clearTimeout(e);try{return Au(e)}catch(t){try{return Au.call(null,e)}catch(t){return Au.call(this,e)}}}(e)}}function zu(e,t){this.fun=e,this.array=t}zu.prototype.run=function(){this.fun.apply(null,this.array)};function Bu(){}var Du=Bu,Wu=Bu,Uu=Bu,Vu=Bu,Ku=Bu,Hu=Bu,qu=Bu;var Gu=wa.performance||{},Yu=Gu.now||Gu.mozNow||Gu.msNow||Gu.oNow||Gu.webkitNow||function(){return(new Date).getTime()};var Xu=new Date;var Qu,Ju={nextTick:function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];Mu.push(new zu(e,t)),1!==Mu.length||Iu||Lu(ju)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Du,addListener:Wu,once:Uu,off:Vu,removeListener:Ku,removeAllListeners:Hu,emit:qu,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*Yu.call(Gu),n=Math.floor(t),r=Math.floor(t%1*1e9);return e&&(n-=e[0],(r-=e[1])<0&&(n--,r+=1e9)),[n,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-Xu)/1e3}},Zu={exports:{}};var ec=(Qu||(Qu=1,function(e){var t;"undefined"!=typeof self&&self,t=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=11)}([function(e,t,n){var r=Array.prototype,o=Object.prototype,i={"&":"&",'"':""","'":"'","<":"<",">":">","\\":"\"},a=/[&"'<>\\]/g;function s(e,t){return o.hasOwnProperty.call(e,t)}function l(e){return i[e]}function u(e,t,n){var r,o,i;if(e instanceof Error&&(e=(o=e).name+": "+o.message),Object.setPrototypeOf?(r=new Error(e),Object.setPrototypeOf(r,u.prototype)):(r=this,Object.defineProperty(r,"message",{enumerable:!1,writable:!0,value:e})),Object.defineProperty(r,"name",{value:"Template render error"}),Error.captureStackTrace&&Error.captureStackTrace(r,this.constructor),o){var a=Object.getOwnPropertyDescriptor(o,"stack");(i=a&&(a.get||function(){return a.value}))||(i=function(){return o.stack})}else{var s=new Error(e).stack;i=function(){return s}}return Object.defineProperty(r,"stack",{get:function(){return i.call(r)}}),Object.defineProperty(r,"cause",{value:o}),r.lineno=t,r.colno=n,r.firstUpdate=!0,r.Update=function(e){var t="("+(e||"unknown path")+")";return this.firstUpdate&&(this.lineno&&this.colno?t+=" [Line "+this.lineno+", Column "+this.colno+"]":this.lineno&&(t+=" [Line "+this.lineno+"]")),t+="\n ",this.firstUpdate&&(t+=" "),this.message=t+(this.message||""),this.firstUpdate=!1,this},r}function c(e){return"[object Function]"===o.toString.call(e)}function d(e){return"[object Array]"===o.toString.call(e)}function p(e){return"[object String]"===o.toString.call(e)}function f(e){return"[object Object]"===o.toString.call(e)}function h(e){var t,n=(t=e)?"string"==typeof t?t.split("."):[t]:[];return function(e){for(var t=e,r=0;r<n.length;r++){var o=n[r];if(!s(t,o))return;t=t[o]}return t}}function m(e){return Array.prototype.slice.call(e)}function g(e,t,n){return Array.prototype.indexOf.call(e||[],t,n)}function v(e){var t=[];for(var n in e)s(e,n)&&t.push(n);return t}(t=e.exports={}).hasOwnProp=s,t._prettifyError=function(e,n,r){if(r.Update||(r=new t.TemplateError(r)),r.Update(e),!n){var o=r;(r=new Error(o.message)).name=o.name}return r},Object.setPrototypeOf?Object.setPrototypeOf(u.prototype,Error.prototype):u.prototype=Object.create(Error.prototype,{constructor:{value:u}}),t.TemplateError=u,t.escape=function(e){return e.replace(a,l)},t.isFunction=c,t.isArray=d,t.isString=p,t.isObject=f,t.getAttrGetter=h,t.groupBy=function(e,t,n){for(var r={},o=c(t)?t:h(t),i=0;i<e.length;i++){var a=e[i],s=o(a,i);if(void 0===s&&!0===n)throw new TypeError('groupby: attribute "'+t+'" resolved to undefined');(r[s]||(r[s]=[])).push(a)}return r},t.toArray=m,t.without=function(e){var t=[];if(!e)return t;for(var n=e.length,r=m(arguments).slice(1),o=-1;++o<n;)-1===g(r,e[o])&&t.push(e[o]);return t},t.repeat=function(e,t){for(var n="",r=0;r<t;r++)n+=e;return n},t.each=function(e,t,n){if(null!=e)if(r.forEach&&e.forEach===r.forEach)e.forEach(t,n);else if(e.length===+e.length)for(var o=0,i=e.length;o<i;o++)t.call(n,e[o],o,e)},t.map=function(e,t){var n=[];if(null==e)return n;if(r.map&&e.map===r.map)return e.map(t);for(var o=0;o<e.length;o++)n[n.length]=t(e[o],o);return e.length===+e.length&&(n.length=e.length),n},t.asyncIter=function(e,t,n){var r=-1;!function o(){++r<e.length?t(e[r],r,o,n):n()}()},t.asyncFor=function(e,t,n){var r=v(e||{}),o=r.length,i=-1;!function a(){i++;var s=r[i];i<o?t(s,e[s],i,o,a):n()}()},t.indexOf=g,t.keys=v,t._entries=function(e){return v(e).map(function(t){return[t,e[t]]})},t._values=function(e){return v(e).map(function(t){return e[t]})},t._assign=t.extend=function(e,t){return e=e||{},v(t).forEach(function(n){e[n]=t[n]}),e},t.inOperator=function(e,t){if(d(t)||p(t))return-1!==t.indexOf(e);if(f(t))return e in t;throw new Error('Cannot use "in" operator to search for "'+e+'" in unexpected types.')}},function(e,t,n){function r(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,a(e,t)}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}var s=n(16),l=n(0);function u(e,t,n){n=n||{},l.keys(n).forEach(function(t){var r,o;n[t]=(r=e.prototype[t],o=n[t],"function"!=typeof r||"function"!=typeof o?o:function(){var e=this.parent;this.parent=r;var t=o.apply(this,arguments);return this.parent=e,t})});var o=function(e){function n(){return e.apply(this,arguments)||this}return i(n,e),r(n,[{key:"typename",get:function(){return t}}]),n}(e);return l._assign(o.prototype,n),o}var c=function(){function e(){this.init.apply(this,arguments)}return e.prototype.init=function(){},e.extend=function(e,t){return"object"==typeof e&&(t=e,e="anonymous"),u(this,e,t)},r(e,[{key:"typename",get:function(){return this.constructor.name}}]),e}(),d=function(e){function t(){var t,n;return(t=n=e.call(this)||this).init.apply(t,arguments),n}return i(t,e),t.prototype.init=function(){},t.extend=function(e,t){return"object"==typeof e&&(t=e,e="anonymous"),u(this,e,t)},r(t,[{key:"typename",get:function(){return this.constructor.name}}]),t}(s);e.exports={Obj:c,EmitterObj:d}},function(e,t,n){var r=n(0),o=Array.from,i="function"==typeof Symbol&&Symbol.iterator&&"function"==typeof o,a=function(){function e(e,t){this.variables=Object.create(null),this.parent=e,this.topLevel=!1,this.isolateWrites=t}var t=e.prototype;return t.set=function(e,t,n){var r=e.split("."),o=this.variables,i=this;if(n&&(i=this.resolve(r[0],!0)))i.set(e,t);else{for(var a=0;a<r.length-1;a++){var s=r[a];o[s]||(o[s]={}),o=o[s]}o[r[r.length-1]]=t}},t.get=function(e){var t=this.variables[e];return void 0!==t?t:null},t.lookup=function(e){var t=this.parent,n=this.variables[e];return void 0!==n?n:t&&t.lookup(e)},t.resolve=function(e,t){var n=t&&this.isolateWrites?void 0:this.parent;return void 0!==this.variables[e]?this:n&&n.resolve(e)},t.push=function(t){return new e(this,t)},t.pop=function(){return this.parent},e}();function s(e){return e&&Object.prototype.hasOwnProperty.call(e,"__keywords")}function l(e){var t=e.length;return 0===t?0:s(e[t-1])?t-1:t}function u(e){if("string"!=typeof e)return e;this.val=e,this.length=e.length}u.prototype=Object.create(String.prototype,{length:{writable:!0,configurable:!0,value:0}}),u.prototype.valueOf=function(){return this.val},u.prototype.toString=function(){return this.val},e.exports={Frame:a,makeMacro:function(e,t,n){return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];var a,u=l(o),c=function(e){var t=e.length;if(t){var n=e[t-1];if(s(n))return n}return{}}(o);if(u>e.length)a=o.slice(0,e.length),o.slice(a.length,u).forEach(function(e,n){n<t.length&&(c[t[n]]=e)}),a.push(c);else if(u<e.length){a=o.slice(0,u);for(var d=u;d<e.length;d++){var p=e[d];a.push(c[p]),delete c[p]}a.push(c)}else a=o;return n.apply(this,a)}},makeKeywordArgs:function(e){return e.__keywords=!0,e},numArgs:l,suppressValue:function(e,t){return e=null!=e?e:"",!t||e instanceof u||(e=r.escape(e.toString())),e},ensureDefined:function(e,t,n){if(null==e)throw new r.TemplateError("attempted to output null or undefined value",t+1,n+1);return e},memberLookup:function(e,t){if(null!=e)return"function"==typeof e[t]?function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e[t].apply(e,r)}:e[t]},contextOrFrameLookup:function(e,t,n){var r=t.lookup(n);return void 0!==r?r:e.lookup(n)},callWrap:function(e,t,n,r){if(!e)throw new Error("Unable to call `"+t+"`, which is undefined or falsey");if("function"!=typeof e)throw new Error("Unable to call `"+t+"`, which is not a function");return e.apply(n,r)},handleError:function(e,t,n){return e.lineno?e:new r.TemplateError(e,t,n)},isArray:r.isArray,keys:r.keys,SafeString:u,copySafeness:function(e,t){return e instanceof u?new u(t):t.toString()},markSafe:function(e){var t=typeof e;return"string"===t?new u(e):"function"!==t?e:function(t){var n=e.apply(this,arguments);return"string"==typeof n?new u(n):n}},asyncEach:function(e,t,n,o){if(r.isArray(e)){var i=e.length;r.asyncIter(e,function(e,r,o){switch(t){case 1:n(e,r,i,o);break;case 2:n(e[0],e[1],r,i,o);break;case 3:n(e[0],e[1],e[2],r,i,o);break;default:e.push(r,i,o),n.apply(this,e)}},o)}else r.asyncFor(e,function(e,t,r,o,i){n(e,t,r,o,i)},o)},asyncAll:function(e,t,n,o){var i,a,s=0;function l(e,t){s++,a[e]=t,s===i&&o(null,a.join(""))}if(r.isArray(e))if(i=e.length,a=new Array(i),0===i)o(null,"");else for(var u=0;u<e.length;u++){var c=e[u];switch(t){case 1:n(c,u,i,l);break;case 2:n(c[0],c[1],u,i,l);break;case 3:n(c[0],c[1],c[2],u,i,l);break;default:c.push(u,i,l),n.apply(this,c)}}else{var d=r.keys(e||{});if(i=d.length,a=new Array(i),0===i)o(null,"");else for(var p=0;p<d.length;p++){var f=d[p];n(f,e[f],p,i,l)}}},inOperator:r.inOperator,fromIterator:function(e){return"object"!=typeof e||null===e||r.isArray(e)?e:i&&Symbol.iterator in e?o(e):e}}},function(e,t,n){function r(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,a(e,t)}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}function s(e,t,n){e instanceof t&&n.push(e),e instanceof l&&e.findAll(t,n)}var l=function(e){function t(){return e.apply(this,arguments)||this}i(t,e);var n=t.prototype;return n.init=function(e,t){for(var n=arguments,r=this,o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];this.lineno=e,this.colno=t,this.fields.forEach(function(e,t){var o=n[t+2];void 0===o&&(o=null),r[e]=o})},n.findAll=function(e,t){var n=this;return t=t||[],this instanceof c?this.children.forEach(function(n){return s(n,e,t)}):this.fields.forEach(function(r){return s(n[r],e,t)}),t},n.iterFields=function(e){var t=this;this.fields.forEach(function(n){e(t[n],n)})},t}(n(1).Obj),u=function(e){function t(){return e.apply(this,arguments)||this}return i(t,e),r(t,[{key:"typename",get:function(){return"Value"}},{key:"fields",get:function(){return["value"]}}]),t}(l),c=function(e){function t(){return e.apply(this,arguments)||this}i(t,e);var n=t.prototype;return n.init=function(t,n,r){e.prototype.init.call(this,t,n,r||[])},n.addChild=function(e){this.children.push(e)},r(t,[{key:"typename",get:function(){return"NodeList"}},{key:"fields",get:function(){return["children"]}}]),t}(l),d=c.extend("Root"),p=u.extend("Literal"),f=u.extend("Symbol"),h=c.extend("Group"),m=c.extend("Array"),g=l.extend("Pair",{fields:["key","value"]}),v=c.extend("Dict"),y=l.extend("LookupVal",{fields:["target","val"]}),b=l.extend("If",{fields:["cond","body","else_"]}),w=b.extend("IfAsync"),x=l.extend("InlineIf",{fields:["cond","body","else_"]}),k=l.extend("For",{fields:["arr","name","body","else_"]}),S=k.extend("AsyncEach"),E=k.extend("AsyncAll"),C=l.extend("Macro",{fields:["name","args","body"]}),O=C.extend("Caller"),_=l.extend("Import",{fields:["template","target","withContext"]}),T=function(e){function t(){return e.apply(this,arguments)||this}return i(t,e),t.prototype.init=function(t,n,r,o,i){e.prototype.init.call(this,t,n,r,o||new c,i)},r(t,[{key:"typename",get:function(){return"FromImport"}},{key:"fields",get:function(){return["template","names","withContext"]}}]),t}(l),R=l.extend("FunCall",{fields:["name","args"]}),P=R.extend("Filter"),A=P.extend("FilterAsync",{fields:["name","args","symbol"]}),L=v.extend("KeywordArgs"),N=l.extend("Block",{fields:["name","body"]}),M=l.extend("Super",{fields:["blockName","symbol"]}),I=l.extend("TemplateRef",{fields:["template"]}).extend("Extends"),F=l.extend("Include",{fields:["template","ignoreMissing"]}),$=l.extend("Set",{fields:["targets","value"]}),j=l.extend("Switch",{fields:["expr","cases","default"]}),z=l.extend("Case",{fields:["cond","body"]}),B=c.extend("Output"),D=l.extend("Capture",{fields:["body"]}),W=p.extend("TemplateData"),U=l.extend("UnaryOp",{fields:["target"]}),V=l.extend("BinOp",{fields:["left","right"]}),K=V.extend("In"),H=V.extend("Is"),q=V.extend("Or"),G=V.extend("And"),Y=U.extend("Not"),X=V.extend("Add"),Q=V.extend("Concat"),J=V.extend("Sub"),Z=V.extend("Mul"),ee=V.extend("Div"),te=V.extend("FloorDiv"),ne=V.extend("Mod"),re=V.extend("Pow"),oe=U.extend("Neg"),ie=U.extend("Pos"),ae=l.extend("Compare",{fields:["expr","ops"]}),se=l.extend("CompareOperand",{fields:["expr","type"]}),le=l.extend("CallExtension",{init:function(e,t,n,r){this.parent(),this.extName=e.__name||e,this.prop=t,this.args=n||new c,this.contentArgs=r||[],this.autoescape=e.autoescape},fields:["extName","prop","args","contentArgs"]}),ue=le.extend("CallExtensionAsync");function ce(e,t,n){var r=e.split("\n");r.forEach(function(e,o){e&&(n&&o>0||!n)&&Ju.stdout.write(" ".repeat(t));var i=o===r.length-1?"":"\n";Ju.stdout.write(""+e+i)})}e.exports={Node:l,Root:d,NodeList:c,Value:u,Literal:p,Symbol:f,Group:h,Array:m,Pair:g,Dict:v,Output:B,Capture:D,TemplateData:W,If:b,IfAsync:w,InlineIf:x,For:k,AsyncEach:S,AsyncAll:E,Macro:C,Caller:O,Import:_,FromImport:T,FunCall:R,Filter:P,FilterAsync:A,KeywordArgs:L,Block:N,Super:M,Extends:I,Include:F,Set:$,Switch:j,Case:z,LookupVal:y,BinOp:V,In:K,Is:H,Or:q,And:G,Not:Y,Add:X,Concat:Q,Sub:J,Mul:Z,Div:ee,FloorDiv:te,Mod:ne,Pow:re,Neg:oe,Pos:ie,Compare:ae,CompareOperand:se,CallExtension:le,CallExtensionAsync:ue,printNodes:function e(t,n){if(n=n||0,ce(t.typename+": ",n),t instanceof c)ce("\n"),t.children.forEach(function(t){e(t,n+2)});else if(t instanceof le)ce(t.extName+"."+t.prop+"\n"),t.args&&e(t.args,n+2),t.contentArgs&&t.contentArgs.forEach(function(t){e(t,n+2)});else{var r=[],o=null;t.iterFields(function(e,t){e instanceof l?r.push([t,e]):(o=o||{})[t]=e}),o?ce(JSON.stringify(o,null,2)+"\n",null,!0):ce("\n"),r.forEach(function(t){var r=t[0],o=t[1];ce("["+r+"] =>",n+2),e(o,n+4)})}}}},function(e,t){},function(e,t,n){function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}var o=n(8),i=n(17),a=n(3),s=n(0).TemplateError,l=n(2).Frame,u=n(1).Obj,c={"==":"==","===":"===","!=":"!=","!==":"!==","<":"<",">":">","<=":"<=",">=":">="},d=function(e){var t,n;function o(){return e.apply(this,arguments)||this}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n);var i=o.prototype;return i.init=function(e,t){this.templateName=e,this.codebuf=[],this.lastId=0,this.buffer=null,this.bufferStack=[],this._scopeClosers="",this.inBlock=!1,this.throwOnUndefined=t},i.fail=function(e,t,n){throw void 0!==t&&(t+=1),void 0!==n&&(n+=1),new s(e,t,n)},i._pushBuffer=function(){var e=this._tmpid();return this.bufferStack.push(this.buffer),this.buffer=e,this._emit("var "+this.buffer+' = "";'),e},i._popBuffer=function(){this.buffer=this.bufferStack.pop()},i._emit=function(e){this.codebuf.push(e)},i._emitLine=function(e){this._emit(e+"\n")},i._emitLines=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach(function(t){return e._emitLine(t)})},i._emitFuncBegin=function(e,t){this.buffer="output",this._scopeClosers="",this._emitLine("function "+t+"(env, context, frame, runtime, cb) {"),this._emitLine("var lineno = "+e.lineno+";"),this._emitLine("var colno = "+e.colno+";"),this._emitLine("var "+this.buffer+' = "";'),this._emitLine("try {")},i._emitFuncEnd=function(e){e||this._emitLine("cb(null, "+this.buffer+");"),this._closeScopeLevels(),this._emitLine("} catch (e) {"),this._emitLine(" cb(runtime.handleError(e, lineno, colno));"),this._emitLine("}"),this._emitLine("}"),this.buffer=null},i._addScopeLevel=function(){this._scopeClosers+="})"},i._closeScopeLevels=function(){this._emitLine(this._scopeClosers+";"),this._scopeClosers=""},i._withScopedSyntax=function(e){var t=this._scopeClosers;this._scopeClosers="",e.call(this),this._closeScopeLevels(),this._scopeClosers=t},i._makeCallback=function(e){var t=this._tmpid();return"function("+t+(e?","+e:"")+") {\nif("+t+") { cb("+t+"); return; }"},i._tmpid=function(){return this.lastId++,"t_"+this.lastId},i._templateName=function(){return null==this.templateName?"undefined":JSON.stringify(this.templateName)},i._compileChildren=function(e,t){var n=this;e.children.forEach(function(e){n.compile(e,t)})},i._compileAggregate=function(e,t,n,r){var o=this;n&&this._emit(n),e.children.forEach(function(e,n){n>0&&o._emit(","),o.compile(e,t)}),r&&this._emit(r)},i._compileExpression=function(e,t){this.assertType(e,a.Literal,a.Symbol,a.Group,a.Array,a.Dict,a.FunCall,a.Caller,a.Filter,a.LookupVal,a.Compare,a.InlineIf,a.In,a.Is,a.And,a.Or,a.Not,a.Add,a.Concat,a.Sub,a.Mul,a.Div,a.FloorDiv,a.Mod,a.Pow,a.Neg,a.Pos,a.Compare,a.NodeList),this.compile(e,t)},i.assertType=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];n.some(function(t){return e instanceof t})||this.fail("assertType: invalid type: "+e.typename,e.lineno,e.colno)},i.compileCallExtension=function(e,t,n){var r=this,o=e.args,i=e.contentArgs,s="boolean"!=typeof e.autoescape||e.autoescape;if(n||this._emit(this.buffer+" += runtime.suppressValue("),this._emit('env.getExtension("'+e.extName+'")["'+e.prop+'"]('),this._emit("context"),(o||i)&&this._emit(","),o&&(o instanceof a.NodeList||this.fail("compileCallExtension: arguments must be a NodeList, use `parser.parseSignature`"),o.children.forEach(function(e,n){r._compileExpression(e,t),(n!==o.children.length-1||i.length)&&r._emit(",")})),i.length&&i.forEach(function(e,n){if(n>0&&r._emit(","),e){r._emitLine("function(cb) {"),r._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}");var o=r._pushBuffer();r._withScopedSyntax(function(){r.compile(e,t),r._emitLine("cb(null, "+o+");")}),r._popBuffer(),r._emitLine("return "+o+";"),r._emitLine("}")}else r._emit("null")}),n){var l=this._tmpid();this._emitLine(", "+this._makeCallback(l)),this._emitLine(this.buffer+" += runtime.suppressValue("+l+", "+s+" && env.opts.autoescape);"),this._addScopeLevel()}else this._emit(")"),this._emit(", "+s+" && env.opts.autoescape);\n")},i.compileCallExtensionAsync=function(e,t){this.compileCallExtension(e,t,!0)},i.compileNodeList=function(e,t){this._compileChildren(e,t)},i.compileLiteral=function(e){if("string"==typeof e.value){var t=e.value.replace(/\\/g,"\\\\");t=(t=(t=(t=(t=t.replace(/"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t")).replace(/\u2028/g,"\\u2028"),this._emit('"'+t+'"')}else null===e.value?this._emit("null"):this._emit(e.value.toString())},i.compileSymbol=function(e,t){var n=e.value,r=t.lookup(n);r?this._emit(r):this._emit('runtime.contextOrFrameLookup(context, frame, "'+n+'")')},i.compileGroup=function(e,t){this._compileAggregate(e,t,"(",")")},i.compileArray=function(e,t){this._compileAggregate(e,t,"[","]")},i.compileDict=function(e,t){this._compileAggregate(e,t,"{","}")},i.compilePair=function(e,t){var n=e.key,r=e.value;n instanceof a.Symbol?n=new a.Literal(n.lineno,n.colno,n.value):n instanceof a.Literal&&"string"==typeof n.value||this.fail("compilePair: Dict keys must be strings or names",n.lineno,n.colno),this.compile(n,t),this._emit(": "),this._compileExpression(r,t)},i.compileInlineIf=function(e,t){this._emit("("),this.compile(e.cond,t),this._emit("?"),this.compile(e.body,t),this._emit(":"),null!==e.else_?this.compile(e.else_,t):this._emit('""'),this._emit(")")},i.compileIn=function(e,t){this._emit("runtime.inOperator("),this.compile(e.left,t),this._emit(","),this.compile(e.right,t),this._emit(")")},i.compileIs=function(e,t){var n=e.right.name?e.right.name.value:e.right.value;this._emit('env.getTest("'+n+'").call(context, '),this.compile(e.left,t),e.right.args&&(this._emit(","),this.compile(e.right.args,t)),this._emit(") === true")},i._binOpEmitter=function(e,t,n){this.compile(e.left,t),this._emit(n),this.compile(e.right,t)},i.compileOr=function(e,t){return this._binOpEmitter(e,t," || ")},i.compileAnd=function(e,t){return this._binOpEmitter(e,t," && ")},i.compileAdd=function(e,t){return this._binOpEmitter(e,t," + ")},i.compileConcat=function(e,t){return this._binOpEmitter(e,t,' + "" + ')},i.compileSub=function(e,t){return this._binOpEmitter(e,t," - ")},i.compileMul=function(e,t){return this._binOpEmitter(e,t," * ")},i.compileDiv=function(e,t){return this._binOpEmitter(e,t," / ")},i.compileMod=function(e,t){return this._binOpEmitter(e,t," % ")},i.compileNot=function(e,t){this._emit("!"),this.compile(e.target,t)},i.compileFloorDiv=function(e,t){this._emit("Math.floor("),this.compile(e.left,t),this._emit(" / "),this.compile(e.right,t),this._emit(")")},i.compilePow=function(e,t){this._emit("Math.pow("),this.compile(e.left,t),this._emit(", "),this.compile(e.right,t),this._emit(")")},i.compileNeg=function(e,t){this._emit("-"),this.compile(e.target,t)},i.compilePos=function(e,t){this._emit("+"),this.compile(e.target,t)},i.compileCompare=function(e,t){var n=this;this.compile(e.expr,t),e.ops.forEach(function(e){n._emit(" "+c[e.type]+" "),n.compile(e.expr,t)})},i.compileLookupVal=function(e,t){this._emit("runtime.memberLookup(("),this._compileExpression(e.target,t),this._emit("),"),this._compileExpression(e.val,t),this._emit(")")},i._getNodeName=function(e){switch(e.typename){case"Symbol":return e.value;case"FunCall":return"the return value of ("+this._getNodeName(e.name)+")";case"LookupVal":return this._getNodeName(e.target)+'["'+this._getNodeName(e.val)+'"]';case"Literal":return e.value.toString();default:return"--expression--"}},i.compileFunCall=function(e,t){this._emit("(lineno = "+e.lineno+", colno = "+e.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(e.name,t),this._emit(', "'+this._getNodeName(e.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(e.args,t,"[","])"),this._emit(")")},i.compileFilter=function(e,t){var n=e.name;this.assertType(n,a.Symbol),this._emit('env.getFilter("'+n.value+'").call(context, '),this._compileAggregate(e.args,t),this._emit(")")},i.compileFilterAsync=function(e,t){var n=e.name,r=e.symbol.value;this.assertType(n,a.Symbol),t.set(r,r),this._emit('env.getFilter("'+n.value+'").call(context, '),this._compileAggregate(e.args,t),this._emitLine(", "+this._makeCallback(r)),this._addScopeLevel()},i.compileKeywordArgs=function(e,t){this._emit("runtime.makeKeywordArgs("),this.compileDict(e,t),this._emit(")")},i.compileSet=function(e,t){var n=this,r=[];e.targets.forEach(function(e){var o=e.value,i=t.lookup(o);null==i&&(i=n._tmpid(),n._emitLine("var "+i+";")),r.push(i)}),e.value?(this._emit(r.join(" = ")+" = "),this._compileExpression(e.value,t),this._emitLine(";")):(this._emit(r.join(" = ")+" = "),this.compile(e.body,t),this._emitLine(";")),e.targets.forEach(function(e,t){var o=r[t],i=e.value;n._emitLine('frame.set("'+i+'", '+o+", true);"),n._emitLine("if(frame.topLevel) {"),n._emitLine('context.setVariable("'+i+'", '+o+");"),n._emitLine("}"),"_"!==i.charAt(0)&&(n._emitLine("if(frame.topLevel) {"),n._emitLine('context.addExport("'+i+'", '+o+");"),n._emitLine("}"))})},i.compileSwitch=function(e,t){var n=this;this._emit("switch ("),this.compile(e.expr,t),this._emit(") {"),e.cases.forEach(function(e,r){n._emit("case "),n.compile(e.cond,t),n._emit(": "),n.compile(e.body,t),e.body.children.length&&n._emitLine("break;")}),e.default&&(this._emit("default:"),this.compile(e.default,t)),this._emit("}")},i.compileIf=function(e,t,n){var r=this;this._emit("if("),this._compileExpression(e.cond,t),this._emitLine(") {"),this._withScopedSyntax(function(){r.compile(e.body,t),n&&r._emit("cb()")}),e.else_?(this._emitLine("}\nelse {"),this._withScopedSyntax(function(){r.compile(e.else_,t),n&&r._emit("cb()")})):n&&(this._emitLine("}\nelse {"),this._emit("cb()")),this._emitLine("}")},i.compileIfAsync=function(e,t){this._emit("(function(cb) {"),this.compileIf(e,t,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},i._emitLoopBindings=function(e,t,n,r){var o=this;[{name:"index",val:n+" + 1"},{name:"index0",val:n},{name:"revindex",val:r+" - "+n},{name:"revindex0",val:r+" - "+n+" - 1"},{name:"first",val:n+" === 0"},{name:"last",val:n+" === "+r+" - 1"},{name:"length",val:r}].forEach(function(e){o._emitLine('frame.set("loop.'+e.name+'", '+e.val+");")})},i.compileFor=function(e,t){var n=this,r=this._tmpid(),o=this._tmpid(),i=this._tmpid();if(t=t.push(),this._emitLine("frame = frame.push();"),this._emit("var "+i+" = "),this._compileExpression(e.arr,t),this._emitLine(";"),this._emit("if("+i+") {"),this._emitLine(i+" = runtime.fromIterator("+i+");"),e.name instanceof a.Array){this._emitLine("var "+r+";"),this._emitLine("if(runtime.isArray("+i+")) {"),this._emitLine("var "+o+" = "+i+".length;"),this._emitLine("for("+r+"=0; "+r+" < "+i+".length; "+r+"++) {"),e.name.children.forEach(function(o,a){var s=n._tmpid();n._emitLine("var "+s+" = "+i+"["+r+"]["+a+"];"),n._emitLine('frame.set("'+o+'", '+i+"["+r+"]["+a+"]);"),t.set(e.name.children[a].value,s)}),this._emitLoopBindings(e,i,r,o),this._withScopedSyntax(function(){n.compile(e.body,t)}),this._emitLine("}"),this._emitLine("} else {");var s=e.name.children,l=s[0],u=s[1],c=this._tmpid(),d=this._tmpid();t.set(l.value,c),t.set(u.value,d),this._emitLine(r+" = -1;"),this._emitLine("var "+o+" = runtime.keys("+i+").length;"),this._emitLine("for(var "+c+" in "+i+") {"),this._emitLine(r+"++;"),this._emitLine("var "+d+" = "+i+"["+c+"];"),this._emitLine('frame.set("'+l.value+'", '+c+");"),this._emitLine('frame.set("'+u.value+'", '+d+");"),this._emitLoopBindings(e,i,r,o),this._withScopedSyntax(function(){n.compile(e.body,t)}),this._emitLine("}"),this._emitLine("}")}else{var p=this._tmpid();t.set(e.name.value,p),this._emitLine("var "+o+" = "+i+".length;"),this._emitLine("for(var "+r+"=0; "+r+" < "+i+".length; "+r+"++) {"),this._emitLine("var "+p+" = "+i+"["+r+"];"),this._emitLine('frame.set("'+e.name.value+'", '+p+");"),this._emitLoopBindings(e,i,r,o),this._withScopedSyntax(function(){n.compile(e.body,t)}),this._emitLine("}")}this._emitLine("}"),e.else_&&(this._emitLine("if (!"+o+") {"),this.compile(e.else_,t),this._emitLine("}")),this._emitLine("frame = frame.pop();")},i._compileAsyncLoop=function(e,t,n){var r=this,o=this._tmpid(),i=this._tmpid(),s=this._tmpid(),l=n?"asyncAll":"asyncEach";if(t=t.push(),this._emitLine("frame = frame.push();"),this._emit("var "+s+" = runtime.fromIterator("),this._compileExpression(e.arr,t),this._emitLine(");"),e.name instanceof a.Array){var u=e.name.children.length;this._emit("runtime."+l+"("+s+", "+u+", function("),e.name.children.forEach(function(e){r._emit(e.value+",")}),this._emit(o+","+i+",next) {"),e.name.children.forEach(function(e){var n=e.value;t.set(n,n),r._emitLine('frame.set("'+n+'", '+n+");")})}else{var c=e.name.value;this._emitLine("runtime."+l+"("+s+", 1, function("+c+", "+o+", "+i+",next) {"),this._emitLine('frame.set("'+c+'", '+c+");"),t.set(c,c)}this._emitLoopBindings(e,s,o,i),this._withScopedSyntax(function(){var i;n&&(i=r._pushBuffer()),r.compile(e.body,t),r._emitLine("next("+o+(i?","+i:"")+");"),n&&r._popBuffer()});var d=this._tmpid();this._emitLine("}, "+this._makeCallback(d)),this._addScopeLevel(),n&&this._emitLine(this.buffer+" += "+d+";"),e.else_&&(this._emitLine("if (!"+s+".length) {"),this.compile(e.else_,t),this._emitLine("}")),this._emitLine("frame = frame.pop();")},i.compileAsyncEach=function(e,t){this._compileAsyncLoop(e,t)},i.compileAsyncAll=function(e,t){this._compileAsyncLoop(e,t,!0)},i._compileMacro=function(e,t){var n=this,r=[],o=null,i="macro_"+this._tmpid(),s=void 0!==t;e.args.children.forEach(function(t,i){i===e.args.children.length-1&&t instanceof a.Dict?o=t:(n.assertType(t,a.Symbol),r.push(t))});var u,c=[].concat(r.map(function(e){return"l_"+e.value}),["kwargs"]),d=r.map(function(e){return'"'+e.value+'"'}),p=(o&&o.children||[]).map(function(e){return'"'+e.key.value+'"'});u=s?t.push(!0):new l,this._emitLines("var "+i+" = runtime.makeMacro(","["+d.join(", ")+"], ","["+p.join(", ")+"], ","function ("+c.join(", ")+") {","var callerFrame = frame;","frame = "+(s?"frame.push(true);":"new runtime.Frame();"),"kwargs = kwargs || {};",'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {','frame.set("caller", kwargs.caller); }'),r.forEach(function(e){n._emitLine('frame.set("'+e.value+'", l_'+e.value+");"),u.set(e.value,"l_"+e.value)}),o&&o.children.forEach(function(e){var t=e.key.value;n._emit('frame.set("'+t+'", '),n._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+t+'")'),n._emit(' ? kwargs["'+t+'"] : '),n._compileExpression(e.value,u),n._emit(");")});var f=this._pushBuffer();return this._withScopedSyntax(function(){n.compile(e.body,u)}),this._emitLine("frame = "+(s?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+f+");"),this._emitLine("});"),this._popBuffer(),i},i.compileMacro=function(e,t){var n=this._compileMacro(e),r=e.name.value;t.set(r,n),t.parent?this._emitLine('frame.set("'+r+'", '+n+");"):("_"!==e.name.value.charAt(0)&&this._emitLine('context.addExport("'+r+'");'),this._emitLine('context.setVariable("'+r+'", '+n+");"))},i.compileCaller=function(e,t){this._emit("(function (){");var n=this._compileMacro(e,t);this._emit("return "+n+";})()")},i._compileGetTemplate=function(e,t,n,r){var o=this._tmpid(),i=this._templateName(),a=this._makeCallback(o),s=n?"true":"false",l=r?"true":"false";return this._emit("env.getTemplate("),this._compileExpression(e.template,t),this._emitLine(", "+s+", "+i+", "+l+", "+a),o},i.compileImport=function(e,t){var n=e.target.value,r=this._compileGetTemplate(e,t,!1,!1);this._addScopeLevel(),this._emitLine(r+".getExported("+(e.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(r)),this._addScopeLevel(),t.set(n,r),t.parent?this._emitLine('frame.set("'+n+'", '+r+");"):this._emitLine('context.setVariable("'+n+'", '+r+");")},i.compileFromImport=function(e,t){var n=this,r=this._compileGetTemplate(e,t,!1,!1);this._addScopeLevel(),this._emitLine(r+".getExported("+(e.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(r)),this._addScopeLevel(),e.names.children.forEach(function(e){var o,i,s=n._tmpid();e instanceof a.Pair?(o=e.key.value,i=e.value.value):i=o=e.value,n._emitLine("if(Object.prototype.hasOwnProperty.call("+r+', "'+o+'")) {'),n._emitLine("var "+s+" = "+r+"."+o+";"),n._emitLine("} else {"),n._emitLine("cb(new Error(\"cannot import '"+o+"'\")); return;"),n._emitLine("}"),t.set(i,s),t.parent?n._emitLine('frame.set("'+i+'", '+s+");"):n._emitLine('context.setVariable("'+i+'", '+s+");")})},i.compileBlock=function(e){var t=this._tmpid();this.inBlock||this._emit('(parentTemplate ? function(e, c, f, r, cb) { cb(""); } : '),this._emit('context.getBlock("'+e.name.value+'")'),this.inBlock||this._emit(")"),this._emitLine("(env, context, frame, runtime, "+this._makeCallback(t)),this._emitLine(this.buffer+" += "+t+";"),this._addScopeLevel()},i.compileSuper=function(e,t){var n=e.blockName.value,r=e.symbol.value,o=this._makeCallback(r);this._emitLine('context.getSuper(env, "'+n+'", b_'+n+", frame, runtime, "+o),this._emitLine(r+" = runtime.markSafe("+r+");"),this._addScopeLevel(),t.set(r,r)},i.compileExtends=function(e,t){var n=this._tmpid(),r=this._compileGetTemplate(e,t,!0,!1);this._emitLine("parentTemplate = "+r),this._emitLine("for(var "+n+" in parentTemplate.blocks) {"),this._emitLine("context.addBlock("+n+", parentTemplate.blocks["+n+"]);"),this._emitLine("}"),this._addScopeLevel()},i.compileInclude=function(e,t){this._emitLine("var tasks = [];"),this._emitLine("tasks.push("),this._emitLine("function(callback) {");var n=this._compileGetTemplate(e,t,!1,e.ignoreMissing);this._emitLine("callback(null,"+n+");});"),this._emitLine("});");var r=this._tmpid();this._emitLine("tasks.push("),this._emitLine("function(template, callback){"),this._emitLine("template.render(context.getVariables(), frame, "+this._makeCallback(r)),this._emitLine("callback(null,"+r+");});"),this._emitLine("});"),this._emitLine("tasks.push("),this._emitLine("function(result, callback){"),this._emitLine(this.buffer+" += result;"),this._emitLine("callback(null);"),this._emitLine("});"),this._emitLine("env.waterfall(tasks, function(){"),this._addScopeLevel()},i.compileTemplateData=function(e,t){this.compileLiteral(e,t)},i.compileCapture=function(e,t){var n=this,r=this.buffer;this.buffer="output",this._emitLine("(function() {"),this._emitLine('var output = "";'),this._withScopedSyntax(function(){n.compile(e.body,t)}),this._emitLine("return output;"),this._emitLine("})()"),this.buffer=r},i.compileOutput=function(e,t){var n=this;e.children.forEach(function(r){r instanceof a.TemplateData?r.value&&(n._emit(n.buffer+" += "),n.compileLiteral(r,t),n._emitLine(";")):(n._emit(n.buffer+" += runtime.suppressValue("),n.throwOnUndefined&&n._emit("runtime.ensureDefined("),n.compile(r,t),n.throwOnUndefined&&n._emit(","+e.lineno+","+e.colno+")"),n._emit(", env.opts.autoescape);\n"))})},i.compileRoot=function(e,t){var n=this;t&&this.fail("compileRoot: root node can't have frame"),t=new l,this._emitFuncBegin(e,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(e,t),this._emitLine("if(parentTemplate) {"),this._emitLine("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"),this._emitLine("} else {"),this._emitLine("cb(null, "+this.buffer+");"),this._emitLine("}"),this._emitFuncEnd(!0),this.inBlock=!0;var r=[],o=e.findAll(a.Block);o.forEach(function(e,t){var o=e.name.value;if(-1!==r.indexOf(o))throw new Error('Block "'+o+'" defined more than once.');r.push(o),n._emitFuncBegin(e,"b_"+o);var i=new l;n._emitLine("var frame = frame.push(true);"),n.compile(e.body,i),n._emitFuncEnd()}),this._emitLine("return {"),o.forEach(function(e,t){var r="b_"+e.name.value;n._emitLine(r+": "+r+",")}),this._emitLine("root: root\n};")},i.compile=function(e,t){var n=this["compile"+e.typename];n?n.call(this,e,t):this.fail("compile: Cannot compile node: "+e.typename,e.lineno,e.colno)},i.getCode=function(){return this.codebuf.join("")},o}(u);e.exports={compile:function(e,t,n,r,a){void 0===a&&(a={});var s=new d(r,a.throwOnUndefined),l=(n||[]).map(function(e){return e.preprocess}).filter(function(e){return!!e}).reduce(function(e,t){return t(e)},e);return s.compile(i.transform(o.parse(l,n,a),t,r)),s.getCode()},Compiler:d}},function(e,t,n){function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}var o=n(4),i=n(1).EmitterObj;e.exports=function(e){var t,n;function i(){return e.apply(this,arguments)||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n);var a=i.prototype;return a.resolve=function(e,t){return o.resolve(o.dirname(e),t)},a.isRelative=function(e){return 0===e.indexOf("./")||0===e.indexOf("../")},i}(i)},function(e,t,n){function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,o(e,t)}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}var i=n(12),a=n(15),s=n(0),l=n(5),u=n(18),c=n(10),d=c.FileSystemLoader,p=c.WebLoader,f=c.PrecompiledLoader,h=n(20),m=n(21),g=n(1),v=g.Obj,y=g.EmitterObj,b=n(2),w=b.handleError,x=b.Frame,k=n(22);function S(e,t,n){i(function(){e(t,n)})}var E={type:"code",obj:{root:function(e,t,n,r,o){try{o(null,"")}catch(e){o(w(e,null,null))}}}},C=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var n=t.prototype;return n.init=function(e,t){var n=this;t=this.opts=t||{},this.opts.dev=!!t.dev,this.opts.autoescape=null==t.autoescape||t.autoescape,this.opts.throwOnUndefined=!!t.throwOnUndefined,this.opts.trimBlocks=!!t.trimBlocks,this.opts.lstripBlocks=!!t.lstripBlocks,this.loaders=[],e?this.loaders=s.isArray(e)?e:[e]:d?this.loaders=[new d("views")]:p&&(this.loaders=[new p("/views")]),"undefined"!=typeof window&&window.nunjucksPrecompiled&&this.loaders.unshift(new f(window.nunjucksPrecompiled)),this._initLoaders(),this.globals=m(),this.filters={},this.tests={},this.asyncFilters=[],this.extensions={},this.extensionsList=[],s._entries(u).forEach(function(e){var t=e[0],r=e[1];return n.addFilter(t,r)}),s._entries(h).forEach(function(e){var t=e[0],r=e[1];return n.addTest(t,r)})},n._initLoaders=function(){var e=this;this.loaders.forEach(function(t){t.cache={},"function"==typeof t.on&&(t.on("update",function(n,r){t.cache[n]=null,e.emit("update",n,r,t)}),t.on("load",function(n,r){e.emit("load",n,r,t)}))})},n.invalidateCache=function(){this.loaders.forEach(function(e){e.cache={}})},n.addExtension=function(e,t){return t.__name=e,this.extensions[e]=t,this.extensionsList.push(t),this},n.removeExtension=function(e){var t=this.getExtension(e);t&&(this.extensionsList=s.without(this.extensionsList,t),delete this.extensions[e])},n.getExtension=function(e){return this.extensions[e]},n.hasExtension=function(e){return!!this.extensions[e]},n.addGlobal=function(e,t){return this.globals[e]=t,this},n.getGlobal=function(e){if(void 0===this.globals[e])throw new Error("global not found: "+e);return this.globals[e]},n.addFilter=function(e,t,n){var r=t;return n&&this.asyncFilters.push(e),this.filters[e]=r,this},n.getFilter=function(e){if(!this.filters[e])throw new Error("filter not found: "+e);return this.filters[e]},n.addTest=function(e,t){return this.tests[e]=t,this},n.getTest=function(e){if(!this.tests[e])throw new Error("test not found: "+e);return this.tests[e]},n.resolveTemplate=function(e,t,n){return e.isRelative&&t&&e.isRelative(n)&&e.resolve?e.resolve(t,n):n},n.getTemplate=function(e,t,n,r,o){var i,a=this,l=this,u=null;if(e&&e.raw&&(e=e.raw),s.isFunction(n)&&(o=n,n=null,t=t||!1),s.isFunction(t)&&(o=t,t=!1),e instanceof _)u=e;else{if("string"!=typeof e)throw new Error("template names must be a string: "+e);for(var c=0;c<this.loaders.length;c++){var d=this.loaders[c];if(u=d.cache[this.resolveTemplate(d,n,e)])break}}return u?(t&&u.compile(),o?void o(null,u):u):(s.asyncIter(this.loaders,function(t,r,o,i){function a(e,n){e?i(e):n?(n.loader=t,i(null,n)):o()}e=l.resolveTemplate(t,n,e),t.async?t.getSource(e,a):a(null,t.getSource(e))},function(n,s){if(s||n||r||(n=new Error("template not found: "+e)),n){if(o)return void o(n);throw n}var l;s?(l=new _(s.src,a,s.path,t),s.noCache||(s.loader.cache[e]=l)):l=new _(E,a,"",t),o?o(null,l):i=l}),i)},n.express=function(e){return k(this,e)},n.render=function(e,t,n){s.isFunction(t)&&(n=t,t=null);var r=null;return this.getTemplate(e,function(e,o){if(e&&n)S(n,e);else{if(e)throw e;r=o.render(t,n)}}),r},n.renderString=function(e,t,n,r){return s.isFunction(n)&&(r=n,n={}),new _(e,this,(n=n||{}).path).render(t,r)},n.waterfall=function(e,t,n){return a(e,t,n)},t}(y),O=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var n=t.prototype;return n.init=function(e,t,n){var r=this;this.env=n||new C,this.ctx=s.extend({},e),this.blocks={},this.exported=[],s.keys(t).forEach(function(e){r.addBlock(e,t[e])})},n.lookup=function(e){return e in this.env.globals&&!(e in this.ctx)?this.env.globals[e]:this.ctx[e]},n.setVariable=function(e,t){this.ctx[e]=t},n.getVariables=function(){return this.ctx},n.addBlock=function(e,t){return this.blocks[e]=this.blocks[e]||[],this.blocks[e].push(t),this},n.getBlock=function(e){if(!this.blocks[e])throw new Error('unknown block "'+e+'"');return this.blocks[e][0]},n.getSuper=function(e,t,n,r,o,i){var a=s.indexOf(this.blocks[t]||[],n),l=this.blocks[t][a+1];if(-1===a||!l)throw new Error('no super block available for "'+t+'"');l(e,this,r,o,i)},n.addExport=function(e){this.exported.push(e)},n.getExported=function(){var e=this,t={};return this.exported.forEach(function(n){t[n]=e.ctx[n]}),t},t}(v),_=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var n=t.prototype;return n.init=function(e,t,n,r){if(this.env=t||new C,s.isObject(e))switch(e.type){case"code":this.tmplProps=e.obj;break;case"string":this.tmplStr=e.obj;break;default:throw new Error("Unexpected template object type "+e.type+"; expected 'code', or 'string'")}else{if(!s.isString(e))throw new Error("src must be a string or an object describing the source");this.tmplStr=e}if(this.path=n,r)try{this._compile()}catch(e){throw s._prettifyError(this.path,this.env.opts.dev,e)}else this.compiled=!1},n.render=function(e,t,n){var r=this;"function"==typeof e?(n=e,e={}):"function"==typeof t&&(n=t,t=null);var o=!t;try{this.compile()}catch(e){var i=s._prettifyError(this.path,this.env.opts.dev,e);if(n)return S(n,i);throw i}var a=new O(e||{},this.blocks,this.env),l=t?t.push(!0):new x;l.topLevel=!0;var u=null,c=!1;return this.rootRenderFunc(this.env,a,l,b,function(e,t){if(!c||!n||void 0===t)if(e&&(e=s._prettifyError(r.path,r.env.opts.dev,e),c=!0),n)o?S(n,e,t):n(e,t);else{if(e)throw e;u=t}}),u},n.getExported=function(e,t,n){"function"==typeof e&&(n=e,e={}),"function"==typeof t&&(n=t,t=null);try{this.compile()}catch(e){if(n)return n(e);throw e}var r=t?t.push():new x;r.topLevel=!0;var o=new O(e||{},this.blocks,this.env);this.rootRenderFunc(this.env,o,r,b,function(e){e?n(e,null):n(null,o.getExported())})},n.compile=function(){this.compiled||this._compile()},n._compile=function(){var e;if(this.tmplProps)e=this.tmplProps;else{var t=l.compile(this.tmplStr,this.env.asyncFilters,this.env.extensionsList,this.path,this.env.opts);e=new Function(t)()}this.blocks=this._getBlocks(e),this.rootRenderFunc=e.root,this.compiled=!0},n._getBlocks=function(e){var t={};return s.keys(e).forEach(function(n){"b_"===n.slice(0,2)&&(t[n.slice(2)]=e[n])}),t},t}(v);e.exports={Environment:C,Template:_}},function(e,t,n){function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}var o=n(9),i=n(3),a=n(1).Obj,s=n(0),l=function(e){var t,n;function a(){return e.apply(this,arguments)||this}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n);var l=a.prototype;return l.init=function(e){this.tokens=e,this.peeked=null,this.breakOnBlocks=null,this.dropLeadingWhitespace=!1,this.extensions=[]},l.nextToken=function(e){var t;if(this.peeked){if(e||this.peeked.type!==o.TOKEN_WHITESPACE)return t=this.peeked,this.peeked=null,t;this.peeked=null}if(t=this.tokens.nextToken(),!e)for(;t&&t.type===o.TOKEN_WHITESPACE;)t=this.tokens.nextToken();return t},l.peekToken=function(){return this.peeked=this.peeked||this.nextToken(),this.peeked},l.pushToken=function(e){if(this.peeked)throw new Error("pushToken: can only push one token on between reads");this.peeked=e},l.error=function(e,t,n){if(void 0===t||void 0===n){var r=this.peekToken()||{};t=r.lineno,n=r.colno}return void 0!==t&&(t+=1),void 0!==n&&(n+=1),new s.TemplateError(e,t,n)},l.fail=function(e,t,n){throw this.error(e,t,n)},l.skip=function(e){var t=this.nextToken();return!(!t||t.type!==e)||(this.pushToken(t),!1)},l.expect=function(e){var t=this.nextToken();return t.type!==e&&this.fail("expected "+e+", got "+t.type,t.lineno,t.colno),t},l.skipValue=function(e,t){var n=this.nextToken();return!(!n||n.type!==e||n.value!==t)||(this.pushToken(n),!1)},l.skipSymbol=function(e){return this.skipValue(o.TOKEN_SYMBOL,e)},l.advanceAfterBlockEnd=function(e){var t;return e||((t=this.peekToken())||this.fail("unexpected end of file"),t.type!==o.TOKEN_SYMBOL&&this.fail("advanceAfterBlockEnd: expected symbol token or explicit name to be passed"),e=this.nextToken().value),(t=this.nextToken())&&t.type===o.TOKEN_BLOCK_END?"-"===t.value.charAt(0)&&(this.dropLeadingWhitespace=!0):this.fail("expected block end in "+e+" statement"),t},l.advanceAfterVariableEnd=function(){var e=this.nextToken();e&&e.type===o.TOKEN_VARIABLE_END?this.dropLeadingWhitespace="-"===e.value.charAt(e.value.length-this.tokens.tags.VARIABLE_END.length-1):(this.pushToken(e),this.fail("expected variable end"))},l.parseFor=function(){var e,t,n=this.peekToken();if(this.skipSymbol("for")?(e=new i.For(n.lineno,n.colno),t="endfor"):this.skipSymbol("asyncEach")?(e=new i.AsyncEach(n.lineno,n.colno),t="endeach"):this.skipSymbol("asyncAll")?(e=new i.AsyncAll(n.lineno,n.colno),t="endall"):this.fail("parseFor: expected for{Async}",n.lineno,n.colno),e.name=this.parsePrimary(),e.name instanceof i.Symbol||this.fail("parseFor: variable name expected for loop"),this.peekToken().type===o.TOKEN_COMMA){var r=e.name;for(e.name=new i.Array(r.lineno,r.colno),e.name.addChild(r);this.skip(o.TOKEN_COMMA);){var a=this.parsePrimary();e.name.addChild(a)}}return this.skipSymbol("in")||this.fail('parseFor: expected "in" keyword for loop',n.lineno,n.colno),e.arr=this.parseExpression(),this.advanceAfterBlockEnd(n.value),e.body=this.parseUntilBlocks(t,"else"),this.skipSymbol("else")&&(this.advanceAfterBlockEnd("else"),e.else_=this.parseUntilBlocks(t)),this.advanceAfterBlockEnd(),e},l.parseMacro=function(){var e=this.peekToken();this.skipSymbol("macro")||this.fail("expected macro");var t=this.parsePrimary(!0),n=this.parseSignature(),r=new i.Macro(e.lineno,e.colno,t,n);return this.advanceAfterBlockEnd(e.value),r.body=this.parseUntilBlocks("endmacro"),this.advanceAfterBlockEnd(),r},l.parseCall=function(){var e=this.peekToken();this.skipSymbol("call")||this.fail("expected call");var t=this.parseSignature(!0)||new i.NodeList,n=this.parsePrimary();this.advanceAfterBlockEnd(e.value);var r=this.parseUntilBlocks("endcall");this.advanceAfterBlockEnd();var o=new i.Symbol(e.lineno,e.colno,"caller"),a=new i.Caller(e.lineno,e.colno,o,t,r),s=n.args.children;return s[s.length-1]instanceof i.KeywordArgs||s.push(new i.KeywordArgs),s[s.length-1].addChild(new i.Pair(e.lineno,e.colno,o,a)),new i.Output(e.lineno,e.colno,[n])},l.parseWithContext=function(){var e=this.peekToken(),t=null;return this.skipSymbol("with")?t=!0:this.skipSymbol("without")&&(t=!1),null!==t&&(this.skipSymbol("context")||this.fail("parseFrom: expected context after with/without",e.lineno,e.colno)),t},l.parseImport=function(){var e=this.peekToken();this.skipSymbol("import")||this.fail("parseImport: expected import",e.lineno,e.colno);var t=this.parseExpression();this.skipSymbol("as")||this.fail('parseImport: expected "as" keyword',e.lineno,e.colno);var n=this.parseExpression(),r=this.parseWithContext(),o=new i.Import(e.lineno,e.colno,t,n,r);return this.advanceAfterBlockEnd(e.value),o},l.parseFrom=function(){var e=this.peekToken();this.skipSymbol("from")||this.fail("parseFrom: expected from");var t=this.parseExpression();this.skipSymbol("import")||this.fail("parseFrom: expected import",e.lineno,e.colno);for(var n,r=new i.NodeList;;){var a=this.peekToken();if(a.type===o.TOKEN_BLOCK_END){r.children.length||this.fail("parseFrom: Expected at least one import name",e.lineno,e.colno),"-"===a.value.charAt(0)&&(this.dropLeadingWhitespace=!0),this.nextToken();break}r.children.length>0&&!this.skip(o.TOKEN_COMMA)&&this.fail("parseFrom: expected comma",e.lineno,e.colno);var s=this.parsePrimary();if("_"===s.value.charAt(0)&&this.fail("parseFrom: names starting with an underscore cannot be imported",s.lineno,s.colno),this.skipSymbol("as")){var l=this.parsePrimary();r.addChild(new i.Pair(s.lineno,s.colno,s,l))}else r.addChild(s);n=this.parseWithContext()}return new i.FromImport(e.lineno,e.colno,t,r,n)},l.parseBlock=function(){var e=this.peekToken();this.skipSymbol("block")||this.fail("parseBlock: expected block",e.lineno,e.colno);var t=new i.Block(e.lineno,e.colno);t.name=this.parsePrimary(),t.name instanceof i.Symbol||this.fail("parseBlock: variable name expected",e.lineno,e.colno),this.advanceAfterBlockEnd(e.value),t.body=this.parseUntilBlocks("endblock"),this.skipSymbol("endblock"),this.skipSymbol(t.name.value);var n=this.peekToken();return n||this.fail("parseBlock: expected endblock, got end of file"),this.advanceAfterBlockEnd(n.value),t},l.parseExtends=function(){var e="extends",t=this.peekToken();this.skipSymbol(e)||this.fail("parseTemplateRef: expected "+e);var n=new i.Extends(t.lineno,t.colno);return n.template=this.parseExpression(),this.advanceAfterBlockEnd(t.value),n},l.parseInclude=function(){var e="include",t=this.peekToken();this.skipSymbol(e)||this.fail("parseInclude: expected "+e);var n=new i.Include(t.lineno,t.colno);return n.template=this.parseExpression(),this.skipSymbol("ignore")&&this.skipSymbol("missing")&&(n.ignoreMissing=!0),this.advanceAfterBlockEnd(t.value),n},l.parseIf=function(){var e,t=this.peekToken();this.skipSymbol("if")||this.skipSymbol("elif")||this.skipSymbol("elseif")?e=new i.If(t.lineno,t.colno):this.skipSymbol("ifAsync")?e=new i.IfAsync(t.lineno,t.colno):this.fail("parseIf: expected if, elif, or elseif",t.lineno,t.colno),e.cond=this.parseExpression(),this.advanceAfterBlockEnd(t.value),e.body=this.parseUntilBlocks("elif","elseif","else","endif");var n=this.peekToken();switch(n&&n.value){case"elseif":case"elif":e.else_=this.parseIf();break;case"else":this.advanceAfterBlockEnd(),e.else_=this.parseUntilBlocks("endif"),this.advanceAfterBlockEnd();break;case"endif":e.else_=null,this.advanceAfterBlockEnd();break;default:this.fail("parseIf: expected elif, else, or endif, got end of file")}return e},l.parseSet=function(){var e=this.peekToken();this.skipSymbol("set")||this.fail("parseSet: expected set",e.lineno,e.colno);for(var t,n=new i.Set(e.lineno,e.colno,[]);(t=this.parsePrimary())&&(n.targets.push(t),this.skip(o.TOKEN_COMMA)););return this.skipValue(o.TOKEN_OPERATOR,"=")?(n.value=this.parseExpression(),this.advanceAfterBlockEnd(e.value)):this.skip(o.TOKEN_BLOCK_END)?(n.body=new i.Capture(e.lineno,e.colno,this.parseUntilBlocks("endset")),n.value=null,this.advanceAfterBlockEnd()):this.fail("parseSet: expected = or block end in set tag",e.lineno,e.colno),n},l.parseSwitch=function(){var e="switch",t="endswitch",n="case",r="default",o=this.peekToken();this.skipSymbol(e)||this.skipSymbol(n)||this.skipSymbol(r)||this.fail('parseSwitch: expected "switch," "case" or "default"',o.lineno,o.colno);var a=this.parseExpression();this.advanceAfterBlockEnd(e),this.parseUntilBlocks(n,r,t);var s,l=this.peekToken(),u=[];do{this.skipSymbol(n);var c=this.parseExpression();this.advanceAfterBlockEnd(e);var d=this.parseUntilBlocks(n,r,t);u.push(new i.Case(l.line,l.col,c,d)),l=this.peekToken()}while(l&&l.value===n);switch(l.value){case r:this.advanceAfterBlockEnd(),s=this.parseUntilBlocks(t),this.advanceAfterBlockEnd();break;case t:this.advanceAfterBlockEnd();break;default:this.fail('parseSwitch: expected "case," "default" or "endswitch," got EOF.')}return new i.Switch(o.lineno,o.colno,a,u,s)},l.parseStatement=function(){var e=this.peekToken();if(e.type!==o.TOKEN_SYMBOL&&this.fail("tag name expected",e.lineno,e.colno),this.breakOnBlocks&&-1!==s.indexOf(this.breakOnBlocks,e.value))return null;switch(e.value){case"raw":return this.parseRaw();case"verbatim":return this.parseRaw("verbatim");case"if":case"ifAsync":return this.parseIf();case"for":case"asyncEach":case"asyncAll":return this.parseFor();case"block":return this.parseBlock();case"extends":return this.parseExtends();case"include":return this.parseInclude();case"set":return this.parseSet();case"macro":return this.parseMacro();case"call":return this.parseCall();case"import":return this.parseImport();case"from":return this.parseFrom();case"filter":return this.parseFilterStatement();case"switch":return this.parseSwitch();default:if(this.extensions.length)for(var t=0;t<this.extensions.length;t++){var n=this.extensions[t];if(-1!==s.indexOf(n.tags||[],e.value))return n.parse(this,i,o)}this.fail("unknown block tag: "+e.value,e.lineno,e.colno)}},l.parseRaw=function(e){for(var t="end"+(e=e||"raw"),n=new RegExp("([\\s\\S]*?){%\\s*("+e+"|"+t+")\\s*(?=%})%}"),r=1,o="",a=null,s=this.advanceAfterBlockEnd();(a=this.tokens._extractRegex(n))&&r>0;){var l=a[0],u=a[1],c=a[2];c===e?r+=1:c===t&&(r-=1),0===r?(o+=u,this.tokens.backN(l.length-u.length)):o+=l}return new i.Output(s.lineno,s.colno,[new i.TemplateData(s.lineno,s.colno,o)])},l.parsePostfix=function(e){for(var t,n=this.peekToken();n;){if(n.type===o.TOKEN_LEFT_PAREN)e=new i.FunCall(n.lineno,n.colno,e,this.parseSignature());else if(n.type===o.TOKEN_LEFT_BRACKET)(t=this.parseAggregate()).children.length>1&&this.fail("invalid index"),e=new i.LookupVal(n.lineno,n.colno,e,t.children[0]);else{if(n.type!==o.TOKEN_OPERATOR||"."!==n.value)break;this.nextToken();var r=this.nextToken();r.type!==o.TOKEN_SYMBOL&&this.fail("expected name as lookup value, got "+r.value,r.lineno,r.colno),t=new i.Literal(r.lineno,r.colno,r.value),e=new i.LookupVal(n.lineno,n.colno,e,t)}n=this.peekToken()}return e},l.parseExpression=function(){return this.parseInlineIf()},l.parseInlineIf=function(){var e=this.parseOr();if(this.skipSymbol("if")){var t=this.parseOr(),n=e;(e=new i.InlineIf(e.lineno,e.colno)).body=n,e.cond=t,this.skipSymbol("else")?e.else_=this.parseOr():e.else_=null}return e},l.parseOr=function(){for(var e=this.parseAnd();this.skipSymbol("or");){var t=this.parseAnd();e=new i.Or(e.lineno,e.colno,e,t)}return e},l.parseAnd=function(){for(var e=this.parseNot();this.skipSymbol("and");){var t=this.parseNot();e=new i.And(e.lineno,e.colno,e,t)}return e},l.parseNot=function(){var e=this.peekToken();return this.skipSymbol("not")?new i.Not(e.lineno,e.colno,this.parseNot()):this.parseIn()},l.parseIn=function(){for(var e=this.parseIs();;){var t=this.nextToken();if(!t)break;var n=t.type===o.TOKEN_SYMBOL&&"not"===t.value;if(n||this.pushToken(t),!this.skipSymbol("in")){n&&this.pushToken(t);break}var r=this.parseIs();e=new i.In(e.lineno,e.colno,e,r),n&&(e=new i.Not(e.lineno,e.colno,e))}return e},l.parseIs=function(){var e=this.parseCompare();if(this.skipSymbol("is")){var t=this.skipSymbol("not"),n=this.parseCompare();e=new i.Is(e.lineno,e.colno,e,n),t&&(e=new i.Not(e.lineno,e.colno,e))}return e},l.parseCompare=function(){for(var e=["==","===","!=","!==","<",">","<=",">="],t=this.parseConcat(),n=[];;){var r=this.nextToken();if(!r)break;if(-1===e.indexOf(r.value)){this.pushToken(r);break}n.push(new i.CompareOperand(r.lineno,r.colno,this.parseConcat(),r.value))}return n.length?new i.Compare(n[0].lineno,n[0].colno,t,n):t},l.parseConcat=function(){for(var e=this.parseAdd();this.skipValue(o.TOKEN_TILDE,"~");){var t=this.parseAdd();e=new i.Concat(e.lineno,e.colno,e,t)}return e},l.parseAdd=function(){for(var e=this.parseSub();this.skipValue(o.TOKEN_OPERATOR,"+");){var t=this.parseSub();e=new i.Add(e.lineno,e.colno,e,t)}return e},l.parseSub=function(){for(var e=this.parseMul();this.skipValue(o.TOKEN_OPERATOR,"-");){var t=this.parseMul();e=new i.Sub(e.lineno,e.colno,e,t)}return e},l.parseMul=function(){for(var e=this.parseDiv();this.skipValue(o.TOKEN_OPERATOR,"*");){var t=this.parseDiv();e=new i.Mul(e.lineno,e.colno,e,t)}return e},l.parseDiv=function(){for(var e=this.parseFloorDiv();this.skipValue(o.TOKEN_OPERATOR,"/");){var t=this.parseFloorDiv();e=new i.Div(e.lineno,e.colno,e,t)}return e},l.parseFloorDiv=function(){for(var e=this.parseMod();this.skipValue(o.TOKEN_OPERATOR,"//");){var t=this.parseMod();e=new i.FloorDiv(e.lineno,e.colno,e,t)}return e},l.parseMod=function(){for(var e=this.parsePow();this.skipValue(o.TOKEN_OPERATOR,"%");){var t=this.parsePow();e=new i.Mod(e.lineno,e.colno,e,t)}return e},l.parsePow=function(){for(var e=this.parseUnary();this.skipValue(o.TOKEN_OPERATOR,"**");){var t=this.parseUnary();e=new i.Pow(e.lineno,e.colno,e,t)}return e},l.parseUnary=function(e){var t,n=this.peekToken();return t=this.skipValue(o.TOKEN_OPERATOR,"-")?new i.Neg(n.lineno,n.colno,this.parseUnary(!0)):this.skipValue(o.TOKEN_OPERATOR,"+")?new i.Pos(n.lineno,n.colno,this.parseUnary(!0)):this.parsePrimary(),e||(t=this.parseFilter(t)),t},l.parsePrimary=function(e){var t,n=this.nextToken(),r=null;if(n?n.type===o.TOKEN_STRING?t=n.value:n.type===o.TOKEN_INT?t=parseInt(n.value,10):n.type===o.TOKEN_FLOAT?t=parseFloat(n.value):n.type===o.TOKEN_BOOLEAN?"true"===n.value?t=!0:"false"===n.value?t=!1:this.fail("invalid boolean: "+n.value,n.lineno,n.colno):n.type===o.TOKEN_NONE?t=null:n.type===o.TOKEN_REGEX&&(t=new RegExp(n.value.body,n.value.flags)):this.fail("expected expression, got end of file"),void 0!==t?r=new i.Literal(n.lineno,n.colno,t):n.type===o.TOKEN_SYMBOL?r=new i.Symbol(n.lineno,n.colno,n.value):(this.pushToken(n),r=this.parseAggregate()),e||(r=this.parsePostfix(r)),r)return r;throw this.error("unexpected token: "+n.value,n.lineno,n.colno)},l.parseFilterName=function(){for(var e=this.expect(o.TOKEN_SYMBOL),t=e.value;this.skipValue(o.TOKEN_OPERATOR,".");)t+="."+this.expect(o.TOKEN_SYMBOL).value;return new i.Symbol(e.lineno,e.colno,t)},l.parseFilterArgs=function(e){return this.peekToken().type===o.TOKEN_LEFT_PAREN?this.parsePostfix(e).args.children:[]},l.parseFilter=function(e){for(;this.skip(o.TOKEN_PIPE);){var t=this.parseFilterName();e=new i.Filter(t.lineno,t.colno,t,new i.NodeList(t.lineno,t.colno,[e].concat(this.parseFilterArgs(e))))}return e},l.parseFilterStatement=function(){var e=this.peekToken();this.skipSymbol("filter")||this.fail("parseFilterStatement: expected filter");var t=this.parseFilterName(),n=this.parseFilterArgs(t);this.advanceAfterBlockEnd(e.value);var r=new i.Capture(t.lineno,t.colno,this.parseUntilBlocks("endfilter"));this.advanceAfterBlockEnd();var o=new i.Filter(t.lineno,t.colno,t,new i.NodeList(t.lineno,t.colno,[r].concat(n)));return new i.Output(t.lineno,t.colno,[o])},l.parseAggregate=function(){var e,t=this.nextToken();switch(t.type){case o.TOKEN_LEFT_PAREN:e=new i.Group(t.lineno,t.colno);break;case o.TOKEN_LEFT_BRACKET:e=new i.Array(t.lineno,t.colno);break;case o.TOKEN_LEFT_CURLY:e=new i.Dict(t.lineno,t.colno);break;default:return null}for(;;){var n=this.peekToken().type;if(n===o.TOKEN_RIGHT_PAREN||n===o.TOKEN_RIGHT_BRACKET||n===o.TOKEN_RIGHT_CURLY){this.nextToken();break}if(e.children.length>0&&(this.skip(o.TOKEN_COMMA)||this.fail("parseAggregate: expected comma after expression",t.lineno,t.colno)),e instanceof i.Dict){var r=this.parsePrimary();this.skip(o.TOKEN_COLON)||this.fail("parseAggregate: expected colon after dict key",t.lineno,t.colno);var a=this.parseExpression();e.addChild(new i.Pair(r.lineno,r.colno,r,a))}else{var s=this.parseExpression();e.addChild(s)}}return e},l.parseSignature=function(e,t){var n=this.peekToken();if(!t&&n.type!==o.TOKEN_LEFT_PAREN){if(e)return null;this.fail("expected arguments",n.lineno,n.colno)}n.type===o.TOKEN_LEFT_PAREN&&(n=this.nextToken());for(var r=new i.NodeList(n.lineno,n.colno),a=new i.KeywordArgs(n.lineno,n.colno),s=!1;;){if(n=this.peekToken(),!t&&n.type===o.TOKEN_RIGHT_PAREN){this.nextToken();break}if(t&&n.type===o.TOKEN_BLOCK_END)break;if(s&&!this.skip(o.TOKEN_COMMA))this.fail("parseSignature: expected comma after expression",n.lineno,n.colno);else{var l=this.parseExpression();this.skipValue(o.TOKEN_OPERATOR,"=")?a.addChild(new i.Pair(l.lineno,l.colno,l,this.parseExpression())):r.addChild(l)}s=!0}return a.children.length&&r.addChild(a),r},l.parseUntilBlocks=function(){for(var e=this.breakOnBlocks,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];this.breakOnBlocks=n;var o=this.parse();return this.breakOnBlocks=e,o},l.parseNodes=function(){for(var e,t=[];e=this.nextToken();)if(e.type===o.TOKEN_DATA){var n=e.value,r=this.peekToken(),a=r&&r.value;this.dropLeadingWhitespace&&(n=n.replace(/^\s*/,""),this.dropLeadingWhitespace=!1),r&&(r.type===o.TOKEN_BLOCK_START&&"-"===a.charAt(a.length-1)||r.type===o.TOKEN_VARIABLE_START&&"-"===a.charAt(this.tokens.tags.VARIABLE_START.length)||r.type===o.TOKEN_COMMENT&&"-"===a.charAt(this.tokens.tags.COMMENT_START.length))&&(n=n.replace(/\s*$/,"")),t.push(new i.Output(e.lineno,e.colno,[new i.TemplateData(e.lineno,e.colno,n)]))}else if(e.type===o.TOKEN_BLOCK_START){this.dropLeadingWhitespace=!1;var s=this.parseStatement();if(!s)break;t.push(s)}else if(e.type===o.TOKEN_VARIABLE_START){var l=this.parseExpression();this.dropLeadingWhitespace=!1,this.advanceAfterVariableEnd(),t.push(new i.Output(e.lineno,e.colno,[l]))}else e.type===o.TOKEN_COMMENT?this.dropLeadingWhitespace="-"===e.value.charAt(e.value.length-this.tokens.tags.COMMENT_END.length-1):this.fail("Unexpected token at top-level: "+e.type,e.lineno,e.colno);return t},l.parse=function(){return new i.NodeList(0,0,this.parseNodes())},l.parseAsRoot=function(){return new i.Root(0,0,this.parseNodes())},a}(a);e.exports={parse:function(e,t,n){var r=new l(o.lex(e,n));return void 0!==t&&(r.extensions=t),r.parseAsRoot()},Parser:l}},function(e,t,n){var r=n(0),o=" \n\t\r ",i="()[]{}%*-+~/#,:|.<>=!",a="string",s="whitespace",l="data",u="block-start",c="block-end",d="variable-start",p="variable-end",f="comment",h="left-paren",m="right-paren",g="left-bracket",v="right-bracket",y="left-curly",b="right-curly",w="operator",x="comma",k="colon",S="tilde",E="pipe",C="float",O="boolean",_="none",T="symbol",R="regex";function P(e,t,n,r){return{type:e,value:t,lineno:n,colno:r}}var A=function(){function e(e,t){this.str=e,this.index=0,this.len=e.length,this.lineno=0,this.colno=0,this.in_code=!1;var n=(t=t||{}).tags||{};this.tags={BLOCK_START:n.blockStart||"{%",BLOCK_END:n.blockEnd||"%}",VARIABLE_START:n.variableStart||"{{",VARIABLE_END:n.variableEnd||"}}",COMMENT_START:n.commentStart||"{#",COMMENT_END:n.commentEnd||"#}"},this.trimBlocks=!!t.trimBlocks,this.lstripBlocks=!!t.lstripBlocks}var t=e.prototype;return t.nextToken=function(){var e,t=this.lineno,n=this.colno;if(this.in_code){var A=this.current();if(this.isFinished())return null;if('"'===A||"'"===A)return P(a,this._parseString(A),t,n);if(e=this._extract(o))return P(s,e,t,n);if((e=this._extractString(this.tags.BLOCK_END))||(e=this._extractString("-"+this.tags.BLOCK_END)))return this.in_code=!1,this.trimBlocks&&("\n"===(A=this.current())?this.forward():"\r"===A&&(this.forward(),"\n"===(A=this.current())?this.forward():this.back())),P(c,e,t,n);if((e=this._extractString(this.tags.VARIABLE_END))||(e=this._extractString("-"+this.tags.VARIABLE_END)))return this.in_code=!1,P(p,e,t,n);if("r"===A&&"/"===this.str.charAt(this.index+1)){this.forwardN(2);for(var L="";!this.isFinished();){if("/"===this.current()&&"\\"!==this.previous()){this.forward();break}L+=this.current(),this.forward()}for(var N=["g","i","m","y"],M="";!this.isFinished()&&-1!==N.indexOf(this.current());)M+=this.current(),this.forward();return P(R,{body:L,flags:M},t,n)}if(-1!==i.indexOf(A)){this.forward();var I,F=["==","===","!=","!==","<=",">=","//","**"],$=A+this.current();switch(-1!==r.indexOf(F,$)&&(this.forward(),A=$,-1!==r.indexOf(F,$+this.current())&&(A=$+this.current(),this.forward())),A){case"(":I=h;break;case")":I=m;break;case"[":I=g;break;case"]":I=v;break;case"{":I=y;break;case"}":I=b;break;case",":I=x;break;case":":I=k;break;case"~":I=S;break;case"|":I=E;break;default:I=w}return P(I,A,t,n)}if((e=this._extractUntil(o+i)).match(/^[-+]?[0-9]+$/)){if("."===this.current()){this.forward();var j=this._extract("0123456789");return P(C,e+"."+j,t,n)}return P("int",e,t,n)}if(e.match(/^(true|false)$/))return P(O,e,t,n);if("none"===e)return P(_,e,t,n);if("null"===e)return P(_,e,t,n);if(e)return P(T,e,t,n);throw new Error("Unexpected value while parsing: "+e)}var z,B=this.tags.BLOCK_START.charAt(0)+this.tags.VARIABLE_START.charAt(0)+this.tags.COMMENT_START.charAt(0)+this.tags.COMMENT_END.charAt(0);if(this.isFinished())return null;if((e=this._extractString(this.tags.BLOCK_START+"-"))||(e=this._extractString(this.tags.BLOCK_START)))return this.in_code=!0,P(u,e,t,n);if((e=this._extractString(this.tags.VARIABLE_START+"-"))||(e=this._extractString(this.tags.VARIABLE_START)))return this.in_code=!0,P(d,e,t,n);e="";var D=!1;for(this._matches(this.tags.COMMENT_START)&&(D=!0,e=this._extractString(this.tags.COMMENT_START));null!==(z=this._extractUntil(B));){if(e+=z,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!D){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&this.colno>0&&this.colno<=e.length){var W=e.slice(-this.colno);if(/^\s+$/.test(W)&&!(e=e.slice(0,-this.colno)).length)return this.nextToken()}break}if(this._matches(this.tags.COMMENT_END)){if(!D)throw new Error("unexpected end of comment");e+=this._extractString(this.tags.COMMENT_END);break}e+=this.current(),this.forward()}if(null===z&&D)throw new Error("expected end of comment, got end of file");return P(D?f:l,e,t,n)},t._parseString=function(e){this.forward();for(var t="";!this.isFinished()&&this.current()!==e;){var n=this.current();if("\\"===n){switch(this.forward(),this.current()){case"n":t+="\n";break;case"t":t+="\t";break;case"r":t+="\r";break;default:t+=this.current()}this.forward()}else t+=n,this.forward()}return this.forward(),t},t._matches=function(e){return this.index+e.length>this.len?null:this.str.slice(this.index,this.index+e.length)===e},t._extractString=function(e){return this._matches(e)?(this.forwardN(e.length),e):null},t._extractUntil=function(e){return this._extractMatching(!0,e||"")},t._extract=function(e){return this._extractMatching(!1,e)},t._extractMatching=function(e,t){if(this.isFinished())return null;var n=t.indexOf(this.current());if(e&&-1===n||!e&&-1!==n){var r=this.current();this.forward();for(var o=t.indexOf(this.current());(e&&-1===o||!e&&-1!==o)&&!this.isFinished();)r+=this.current(),this.forward(),o=t.indexOf(this.current());return r}return""},t._extractRegex=function(e){var t=this.currentStr().match(e);return t?(this.forwardN(t[0].length),t):null},t.isFinished=function(){return this.index>=this.len},t.forwardN=function(e){for(var t=0;t<e;t++)this.forward()},t.forward=function(){this.index++,"\n"===this.previous()?(this.lineno++,this.colno=0):this.colno++},t.backN=function(e){for(var t=0;t<e;t++)this.back()},t.back=function(){if(this.index--,"\n"===this.current()){this.lineno--;var e=this.src.lastIndexOf("\n",this.index-1);this.colno=-1===e?this.index:this.index-e}else this.colno--},t.current=function(){return this.isFinished()?"":this.str.charAt(this.index)},t.currentStr=function(){return this.isFinished()?"":this.str.substr(this.index)},t.previous=function(){return this.str.charAt(this.index-1)},e}();e.exports={lex:function(e,t){return new A(e,t)},TOKEN_STRING:a,TOKEN_WHITESPACE:s,TOKEN_DATA:l,TOKEN_BLOCK_START:u,TOKEN_BLOCK_END:c,TOKEN_VARIABLE_START:d,TOKEN_VARIABLE_END:p,TOKEN_COMMENT:f,TOKEN_LEFT_PAREN:h,TOKEN_RIGHT_PAREN:m,TOKEN_LEFT_BRACKET:g,TOKEN_RIGHT_BRACKET:v,TOKEN_LEFT_CURLY:y,TOKEN_RIGHT_CURLY:b,TOKEN_OPERATOR:w,TOKEN_COMMA:x,TOKEN_COLON:k,TOKEN_TILDE:S,TOKEN_PIPE:E,TOKEN_INT:"int",TOKEN_FLOAT:C,TOKEN_BOOLEAN:O,TOKEN_NONE:_,TOKEN_SYMBOL:T,TOKEN_SPECIAL:"special",TOKEN_REGEX:R}},function(e,t,n){function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}var o=n(6),i=n(19).PrecompiledLoader,a=function(e){var t,n;function o(t,n){var r;return(r=e.call(this)||this).baseURL=t||".",n=n||{},r.useCache=!!n.useCache,r.async=!!n.async,r}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n);var i=o.prototype;return i.resolve=function(e,t){throw new Error("relative templates not support in the browser yet")},i.getSource=function(e,t){var n,r=this,o=this.useCache;return this.fetch(this.baseURL+"/"+e,function(i,a){if(i)if(t)t(i.content);else{if(404!==i.status)throw i.content;n=null}else n={src:a,path:e,noCache:!o},r.emit("load",e,n),t&&t(null,n)}),n},i.fetch=function(e,t){if("undefined"==typeof window)throw new Error("WebLoader can only by used in a browser");var n=new XMLHttpRequest,r=!0;n.onreadystatechange=function(){4===n.readyState&&r&&(r=!1,0===n.status||200===n.status?t(null,n.responseText):t({status:n.status,content:n.responseText}))},e+=(-1===e.indexOf("?")?"?":"&")+"s="+(new Date).getTime(),n.open("GET",e,this.async),n.send()},o}(o);e.exports={WebLoader:a,PrecompiledLoader:i}},function(e,t,n){var r,o=n(0),i=n(7),a=i.Environment,s=i.Template,l=n(6),u=n(10),c=n(23),d=n(5),p=n(8),f=n(9),h=n(2),m=n(3),g=n(25);function v(e,t){var n;return t=t||{},o.isObject(e)&&(t=e,e=null),u.FileSystemLoader?n=new u.FileSystemLoader(e,{watch:t.watch,noCache:t.noCache}):u.WebLoader&&(n=new u.WebLoader(e,{useCache:t.web&&t.web.useCache,async:t.web&&t.web.async})),r=new a(n,t),t&&t.express&&r.express(t.express),r}e.exports={Environment:a,Template:s,Loader:l,FileSystemLoader:u.FileSystemLoader,NodeResolveLoader:u.NodeResolveLoader,PrecompiledLoader:u.PrecompiledLoader,WebLoader:u.WebLoader,compiler:d,parser:p,lexer:f,runtime:h,lib:o,nodes:m,installJinjaCompat:g,configure:v,reset:function(){r=void 0},compile:function(e,t,n,o){return r||v(),new s(e,t,n,o)},render:function(e,t,n){return r||v(),r.render(e,t,n)},renderString:function(e,t,n){return r||v(),r.renderString(e,t,n)},precompile:c?c.precompile:void 0,precompileString:c?c.precompileString:void 0}},function(e,t,n){var r=n(13),o=[],i=[],a=r.makeRequestCallFromTimer(function(){if(i.length)throw i.shift()});function s(e){var t;(t=o.length?o.pop():new l).task=e,r(t)}function l(){this.task=null}e.exports=s,l.prototype.call=function(){try{this.task.call()}catch(e){s.onerror?s.onerror(e):(i.push(e),a())}finally{this.task=null,o[o.length]=this}}},function(e,t,n){(function(t){function n(e){o.length||r(),o[o.length]=e}e.exports=n;var r,o=[],i=0;function a(){for(;i<o.length;){var e=i;if(i+=1,o[e].call(),i>1024){for(var t=0,n=o.length-i;t<n;t++)o[t]=o[t+i];o.length-=i,i=0}}o.length=0,i=0}var s=void 0!==t?t:self,l=s.MutationObserver||s.WebKitMutationObserver;function u(e){return function(){var t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}r="function"==typeof l?function(e){var t=1,n=new l(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}(a):u(a),n.requestFlush=r,n.makeRequestCallFromTimer=u}).call(t,n(14))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r,o,i,a,s;o=function(){var e=Array.prototype.slice.call(arguments);"function"==typeof e[0]&&e[0].apply(null,e.splice(1))},i=function(e){"function"==typeof setImmediate?setImmediate(e):void 0!==Ju&&Ju.nextTick?Ju.nextTick(e):setTimeout(e,0)},a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s=function(e,t,n){var r=n?i:o;if(t=t||function(){},!a(e)){var s=new Error("First argument to waterfall must be an array of functions");return t(s)}if(!e.length)return t();var l=function(e){return function(n){if(n)t.apply(null,arguments),t=function(){};else{var o=Array.prototype.slice.call(arguments,1),i=e.next();i?o.push(l(i)):o.push(t),r(function(){e.apply(null,o)})}}};l(function(e){var t=function(n){var r=function(){return e.length&&e[n].apply(null,arguments),r.next()};return r.next=function(){return n<e.length-1?t(n+1):null},r};return t(0)}(e))()},void 0===(r=function(){return s}.apply(t,[]))||(e.exports=r)},function(e,t,n){var r,o="object"==typeof Reflect?Reflect:null,i=o&&"function"==typeof o.apply?o.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise(function(n,r){function o(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}v(e,t,i,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&v(e,"error",t,n)}(e,o,{once:!0})})},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var l=10;function u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var o,i,a,s;if(u(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),a=i[t]),void 0===a)a=i[t]=n,++e._eventsCount;else if("function"==typeof a?a=i[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(o=c(e))>0&&a.length>o&&!a.warned){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=a.length,s=l,console&&console.warn&&console.warn(s)}return e}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=p.bind(r);return o.listener=n,r.wrapFn=o,o}function h(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):g(o,o.length)}function m(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function g(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function v(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function o(i){r.once&&e.removeEventListener(t,o),n(i)})}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");l=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)i(l,this,t);else{var u=l.length,c=g(l,u);for(n=0;n<u;++n)i(c[n],this,t)}return!0},s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)},s.prototype.once=function(e,t){return u(t),this.on(e,f(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,f(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,o,i,a;if(u(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){a=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return h(this,e,!0)},s.prototype.rawListeners=function(e){return h(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){var r=n(3),o=n(0),i=0;function a(){return"hole_"+i++}function s(e,t){for(var n=null,r=0;r<e.length;r++){var o=t(e[r]);o!==e[r]&&(n||(n=e.slice()),n[r]=o)}return n||e}function l(e,t,n){if(!(e instanceof r.Node))return e;if(!n){var o=t(e);if(o&&o!==e)return o}if(e instanceof r.NodeList){var i=s(e.children,function(e){return l(e,t,n)});i!==e.children&&(e=new r[e.typename](e.lineno,e.colno,i))}else if(e instanceof r.CallExtension){var a=l(e.args,t,n),u=s(e.contentArgs,function(e){return l(e,t,n)});a===e.args&&u===e.contentArgs||(e=new r[e.typename](e.extName,e.prop,a,u))}else{var c=e.fields.map(function(t){return e[t]}),d=s(c,function(e){return l(e,t,n)});d!==c&&(e=new r[e.typename](e.lineno,e.colno),d.forEach(function(t,n){e[e.fields[n]]=t}))}return n&&t(e)||e}function u(e,t){return l(e,t,!0)}function c(e,t,n){var i=[],s=u(n?e[n]:e,function(e){var n;return e instanceof r.Block?e:((e instanceof r.Filter&&-1!==o.indexOf(t,e.name.value)||e instanceof r.CallExtensionAsync)&&(n=new r.Symbol(e.lineno,e.colno,a()),i.push(new r.FilterAsync(e.lineno,e.colno,e.name,e.args,n))),n)});return n?e[n]=s:e=s,i.length?(i.push(e),new r.NodeList(e.lineno,e.colno,i)):e}function d(e,t){return function(e){return u(e,function(e){if(e instanceof r.If||e instanceof r.For){var t=!1;if(l(e,function(e){if(e instanceof r.FilterAsync||e instanceof r.IfAsync||e instanceof r.AsyncEach||e instanceof r.AsyncAll||e instanceof r.CallExtensionAsync)return t=!0,e}),t){if(e instanceof r.If)return new r.IfAsync(e.lineno,e.colno,e.cond,e.body,e.else_);if(e instanceof r.For&&!(e instanceof r.AsyncAll))return new r.AsyncEach(e.lineno,e.colno,e.arr,e.name,e.body,e.else_)}}})}(function(e){return l(e,function(e){if(e instanceof r.Block){var t=!1,n=a();e.body=l(e.body,function(e){if(e instanceof r.FunCall&&"super"===e.name.value)return t=!0,new r.Symbol(e.lineno,e.colno,n)}),t&&e.body.children.unshift(new r.Super(0,0,e.name,new r.Symbol(0,0,n)))}})}(function(e,t){return u(e,function(e){return e instanceof r.Output?c(e,t):e instanceof r.Set?c(e,t,"value"):e instanceof r.For?c(e,t,"arr"):e instanceof r.If?c(e,t,"cond"):e instanceof r.CallExtension?c(e,t,"args"):void 0})}(e,t)))}e.exports={transform:function(e,t){return d(e,t||[])}}},function(e,t,n){var r=n(0),o=n(2);function i(e,t){return null==e||!1===e?t:e}function a(e){return e!=e}function s(e){var t=(e=i(e,"")).toLowerCase();return o.copySafeness(e,t.charAt(0).toUpperCase()+t.slice(1))}function l(e){if(r.isString(e))return e.split("");if(r.isObject(e))return r._entries(e||{}).map(function(e){return{key:e[0],value:e[1]}});if(r.isArray(e))return e;throw new r.TemplateError("list filter: type not iterable")}function u(e){return function(t,n,o){void 0===n&&(n="truthy");var i=this,a=i.env.getTest(n);return r.toArray(t).filter(function(t){return a.call(i,t,o)===e})}}function c(e){return o.copySafeness(e,e.replace(/^\s*|\s*$/g,""))}(t=e.exports={}).abs=Math.abs,t.batch=function(e,t,n){var r,o=[],i=[];for(r=0;r<e.length;r++)r%t===0&&i.length&&(o.push(i),i=[]),i.push(e[r]);if(i.length){if(n)for(r=i.length;r<t;r++)i.push(n);o.push(i)}return o},t.capitalize=s,t.center=function(e,t){if(t=t||80,(e=i(e,"")).length>=t)return e;var n=t-e.length,a=r.repeat(" ",n/2-n%2),s=r.repeat(" ",n/2);return o.copySafeness(e,a+e+s)},t.default=function(e,t,n){return n?e||t:void 0!==e?e:t},t.dictsort=function(e,t,n){if(!r.isObject(e))throw new r.TemplateError("dictsort filter: val must be an object");var o,i=[];for(var a in e)i.push([a,e[a]]);if(void 0===n||"key"===n)o=0;else{if("value"!==n)throw new r.TemplateError("dictsort filter: You can only sort by either key or value");o=1}return i.sort(function(e,n){var i=e[o],a=n[o];return t||(r.isString(i)&&(i=i.toUpperCase()),r.isString(a)&&(a=a.toUpperCase())),i>a?1:i===a?0:-1}),i},t.dump=function(e,t){return JSON.stringify(e,null,t)},t.escape=function(e){return e instanceof o.SafeString?e:(e=null==e?"":e,o.markSafe(r.escape(e.toString())))},t.safe=function(e){return e instanceof o.SafeString?e:(e=null==e?"":e,o.markSafe(e.toString()))},t.first=function(e){return e[0]},t.forceescape=function(e){return e=null==e?"":e,o.markSafe(r.escape(e.toString()))},t.groupby=function(e,t){return r.groupBy(e,t,this.env.opts.throwOnUndefined)},t.indent=function(e,t,n){if(""===(e=i(e,"")))return"";t=t||4;var a=e.split("\n"),s=r.repeat(" ",t),l=a.map(function(e,t){return 0!==t||n?""+s+e:e}).join("\n");return o.copySafeness(e,l)},t.join=function(e,t,n){return t=t||"",n&&(e=r.map(e,function(e){return e[n]})),e.join(t)},t.last=function(e){return e[e.length-1]},t.length=function(e){var t=i(e,"");return void 0!==t?"function"==typeof Map&&t instanceof Map||"function"==typeof Set&&t instanceof Set?t.size:!r.isObject(t)||t instanceof o.SafeString?t.length:r.keys(t).length:0},t.list=l,t.lower=function(e){return(e=i(e,"")).toLowerCase()},t.nl2br=function(e){return null==e?"":o.copySafeness(e,e.replace(/\r\n|\n/g,"<br />\n"))},t.random=function(e){return e[Math.floor(Math.random()*e.length)]},t.reject=u(!1),t.rejectattr=function(e,t){return e.filter(function(e){return!e[t]})},t.select=u(!0),t.selectattr=function(e,t){return e.filter(function(e){return!!e[t]})},t.replace=function(e,t,n,r){var i=e;if(t instanceof RegExp)return e.replace(t,n);void 0===r&&(r=-1);var a="";if("number"==typeof t)t=""+t;else if("string"!=typeof t)return e;if("number"==typeof e&&(e=""+e),"string"!=typeof e&&!(e instanceof o.SafeString))return e;if(""===t)return a=n+e.split("").join(n)+n,o.copySafeness(e,a);var s=e.indexOf(t);if(0===r||-1===s)return e;for(var l=0,u=0;s>-1&&(-1===r||u<r);)a+=e.substring(l,s)+n,l=s+t.length,u++,s=e.indexOf(t,l);return l<e.length&&(a+=e.substring(l)),o.copySafeness(i,a)},t.reverse=function(e){var t;return(t=r.isString(e)?l(e):r.map(e,function(e){return e})).reverse(),r.isString(e)?o.copySafeness(e,t.join("")):t},t.round=function(e,t,n){t=t||0;var r=Math.pow(10,t);return("ceil"===n?Math.ceil:"floor"===n?Math.floor:Math.round)(e*r)/r},t.slice=function(e,t,n){for(var r=Math.floor(e.length/t),o=e.length%t,i=[],a=0,s=0;s<t;s++){var l=a+s*r;s<o&&a++;var u=a+(s+1)*r,c=e.slice(l,u);n&&s>=o&&c.push(n),i.push(c)}return i},t.sum=function(e,t,n){return void 0===n&&(n=0),t&&(e=r.map(e,function(e){return e[t]})),n+e.reduce(function(e,t){return e+t},0)},t.sort=o.makeMacro(["value","reverse","case_sensitive","attribute"],[],function(e,t,n,o){var i=this,a=r.map(e,function(e){return e}),s=r.getAttrGetter(o);return a.sort(function(e,a){var l=o?s(e):e,u=o?s(a):a;if(i.env.opts.throwOnUndefined&&o&&(void 0===l||void 0===u))throw new TypeError('sort: attribute "'+o+'" resolved to undefined');return!n&&r.isString(l)&&r.isString(u)&&(l=l.toLowerCase(),u=u.toLowerCase()),l<u?t?1:-1:l>u?t?-1:1:0}),a}),t.string=function(e){return o.copySafeness(e,e)},t.striptags=function(e,t){var n=c((e=i(e,"")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|<!--[\s\S]*?-->/gi,"")),r="";return r=t?n.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,"\n").replace(/\n\n\n+/g,"\n\n"):n.replace(/\s+/gi," "),o.copySafeness(e,r)},t.title=function(e){var t=(e=i(e,"")).split(" ").map(function(e){return s(e)});return o.copySafeness(e,t.join(" "))},t.trim=c,t.truncate=function(e,t,n,r){var a=e;if(t=t||255,(e=i(e,"")).length<=t)return e;if(n)e=e.substring(0,t);else{var s=e.lastIndexOf(" ",t);-1===s&&(s=t),e=e.substring(0,s)}return e+=null!=r?r:"...",o.copySafeness(a,e)},t.upper=function(e){return(e=i(e,"")).toUpperCase()},t.urlencode=function(e){var t=encodeURIComponent;return r.isString(e)?t(e):(r.isArray(e)?e:r._entries(e)).map(function(e){var n=e[0],r=e[1];return t(n)+"="+t(r)}).join("&")};var d=/^(?:\(|<|<)?(.*?)(?:\.|,|\)|\n|>)?$/,p=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,f=/^https?:\/\/.*$/,h=/^www\./,m=/\.(?:org|net|com)(?:\:|\/|$)/;t.urlize=function(e,t,n){a(t)&&(t=1/0);var r=!0===n?' rel="nofollow"':"";return e.split(/(\s+)/).filter(function(e){return e&&e.length}).map(function(e){var n=e.match(d),o=n?n[1]:e,i=o.substr(0,t);return f.test(o)?'<a href="'+o+'"'+r+">"+i+"</a>":h.test(o)?'<a href="http://'+o+'"'+r+">"+i+"</a>":p.test(o)?'<a href="mailto:'+o+'">'+o+"</a>":m.test(o)?'<a href="http://'+o+'"'+r+">"+i+"</a>":e}).join("")},t.wordcount=function(e){var t=(e=i(e,""))?e.match(/\w+/g):null;return t?t.length:null},t.float=function(e,t){var n=parseFloat(e);return a(n)?t:n};var g=o.makeMacro(["value","default","base"],[],function(e,t,n){void 0===n&&(n=10);var r=parseInt(e,n);return a(r)?t:r});t.int=g,t.d=t.default,t.e=t.escape},function(e,t,n){function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}var o=function(e){var t,n;function o(t){var n;return(n=e.call(this)||this).precompiled=t||{},n}return n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n),o.prototype.getSource=function(e){return this.precompiled[e]?{src:{type:"code",obj:this.precompiled[e]},path:e}:null},o}(n(6));e.exports={PrecompiledLoader:o}},function(e,t,n){var r=n(2).SafeString;t.callable=function(e){return"function"==typeof e},t.defined=function(e){return void 0!==e},t.divisibleby=function(e,t){return e%t===0},t.escaped=function(e){return e instanceof r},t.equalto=function(e,t){return e===t},t.eq=t.equalto,t.sameas=t.equalto,t.even=function(e){return e%2==0},t.falsy=function(e){return!e},t.ge=function(e,t){return e>=t},t.greaterthan=function(e,t){return e>t},t.gt=t.greaterthan,t.le=function(e,t){return e<=t},t.lessthan=function(e,t){return e<t},t.lt=t.lessthan,t.lower=function(e){return e.toLowerCase()===e},t.ne=function(e,t){return e!==t},t.null=function(e){return null===e},t.number=function(e){return"number"==typeof e},t.odd=function(e){return e%2==1},t.string=function(e){return"string"==typeof e},t.truthy=function(e){return!!e},t.undefined=function(e){return void 0===e},t.upper=function(e){return e.toUpperCase()===e},t.iterable=function(e){return"undefined"!=typeof Symbol?!!e[Symbol.iterator]:Array.isArray(e)||"string"==typeof e},t.mapping=function(e){var t=null!=e&&"object"==typeof e&&!Array.isArray(e);return Set?t&&!(e instanceof Set):t}},function(e,t,n){e.exports=function(){return{range:function(e,t,n){void 0===t?(t=e,e=0,n=1):n||(n=1);var r=[];if(n>0)for(var o=e;o<t;o+=n)r.push(o);else for(var i=e;i>t;i+=n)r.push(i);return r},cycler:function(){return function(e){var t=-1;return{current:null,reset:function(){t=-1,this.current=null},next:function(){return++t>=e.length&&(t=0),this.current=e[t],this.current}}}(Array.prototype.slice.call(arguments))},joiner:function(e){return function(e){e=e||",";var t=!0;return function(){var n=t?"":e;return t=!1,n}}(e)}}}},function(e,t,n){var r=n(4);e.exports=function(e,t){function n(e,t){if(this.name=e,this.path=e,this.defaultEngine=t.defaultEngine,this.ext=r.extname(e),!this.ext&&!this.defaultEngine)throw new Error("No default engine was specified and no extension was provided.");this.ext||(this.name+=this.ext=("."!==this.defaultEngine[0]?".":"")+this.defaultEngine)}return n.prototype.render=function(t,n){e.render(this.name,t,n)},t.set("view",n),t.set("nunjucksEnv",e),e}},function(e,t,n){var r=n(4),o=n(4),i=n(0)._prettifyError,a=n(5),s=n(7).Environment,l=n(24);function u(e,t){return!!Array.isArray(t)&&t.some(function(t){return e.match(t)})}function c(e,t){(t=t||{}).isString=!0;var n=t.env||new s([]),r=t.wrapper||l;if(!t.name)throw new Error('the "name" option is required when compiling a string');return r([d(e,t.name,n)],t)}function d(e,t,n){var r,o=(n=n||new s([])).asyncFilters,l=n.extensionsList;t=t.replace(/\\/g,"/");try{r=a.compile(e,o,l,t,n.opts)}catch(e){throw i(t,!1,e)}return{name:t,template:r}}e.exports={precompile:function(e,t){var n=(t=t||{}).env||new s([]),i=t.wrapper||l;if(t.isString)return c(e,t);var a=r.existsSync(e)&&r.statSync(e),p=[],f=[];if(a.isFile())p.push(d(r.readFileSync(e,"utf-8"),t.name||e,n));else if(a.isDirectory()){!function n(i){r.readdirSync(i).forEach(function(a){var s=o.join(i,a),l=s.substr(o.join(e,"/").length),c=r.statSync(s);c&&c.isDirectory()?u(l+="/",t.exclude)||n(s):u(l,t.include)&&f.push(s)})}(e);for(var h=0;h<f.length;h++){var m=f[h].replace(o.join(e,"/"),"");try{p.push(d(r.readFileSync(f[h],"utf-8"),m,n))}catch(e){if(!t.force)throw e;console.error(e)}}}return i(p,t)},precompileString:c}},function(e,t,n){e.exports=function(e,t){var n="";t=t||{};for(var r=0;r<e.length;r++){var o=JSON.stringify(e[r].name);n+="(function() {(window.nunjucksPrecompiled = window.nunjucksPrecompiled || {})["+o+"] = (function() {\n"+e[r].template+"\n})();\n",t.asFunction&&(n+="return function(ctx, cb) { return nunjucks.render("+o+", ctx, cb); }\n"),n+="})();\n"}return n}},function(e,t,n){e.exports=function(){var e,t,n=this.runtime,r=this.lib,o=this.compiler.Compiler,i=this.parser.Parser,a=this.nodes,s=this.lexer,l=n.contextOrFrameLookup,u=n.memberLookup;function c(e){return{index:e.index,lineno:e.lineno,colno:e.colno}}if(o&&(e=o.prototype.assertType),i&&(t=i.prototype.parseAggregate),n.contextOrFrameLookup=function(e,t,n){var r=l.apply(this,arguments);if(void 0!==r)return r;switch(n){case"True":return!0;case"False":return!1;case"None":return null;default:return}},a&&o&&i){var d=a.Node.extend("Slice",{fields:["start","stop","step"],init:function(e,t,n,r,o){n=n||new a.Literal(e,t,null),r=r||new a.Literal(e,t,null),o=o||new a.Literal(e,t,1),this.parent(e,t,n,r,o)}});o.prototype.assertType=function(t){t instanceof d||e.apply(this,arguments)},o.prototype.compileSlice=function(e,t){this._emit("("),this._compileExpression(e.start,t),this._emit("),("),this._compileExpression(e.stop,t),this._emit("),("),this._compileExpression(e.step,t),this._emit(")")},i.prototype.parseAggregate=function(){var e=this,n=c(this.tokens);n.colno--,n.index--;try{return t.apply(this)}catch(t){var o=c(this.tokens),i=function(){return r._assign(e.tokens,o),t};r._assign(this.tokens,n),this.peeked=!1;var l=this.peekToken();if(l.type!==s.TOKEN_LEFT_BRACKET)throw i();this.nextToken();for(var u=new d(l.lineno,l.colno),p=!1,f=0;f<=u.fields.length&&!this.skip(s.TOKEN_RIGHT_BRACKET);f++){if(f===u.fields.length){if(!p)break;this.fail("parseSlice: too many slice components",l.lineno,l.colno)}this.skip(s.TOKEN_COLON)?p=!0:(u[u.fields[f]]=this.parseExpression(),p=this.skip(s.TOKEN_COLON)||p)}if(!p)throw i();return new a.Array(l.lineno,l.colno,[u])}}}function p(e,t,r,o){e=e||[],null===t&&(t=o<0?e.length-1:0),null===r?r=o<0?-1:e.length:r<0&&(r+=e.length),t<0&&(t+=e.length);for(var i=[],a=t;!(a<0||a>e.length||o>0&&a>=r||o<0&&a<=r);a+=o)i.push(n.memberLookup(e,a));return i}function f(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var h={pop:function(e){if(void 0===e)return this.pop();if(e>=this.length||e<0)throw new Error("KeyError");return this.splice(e,1)},append:function(e){return this.push(e)},remove:function(e){for(var t=0;t<this.length;t++)if(this[t]===e)return this.splice(t,1);throw new Error("ValueError")},count:function(e){for(var t=0,n=0;n<this.length;n++)this[n]===e&&t++;return t},index:function(e){var t;if(-1===(t=this.indexOf(e)))throw new Error("ValueError");return t},find:function(e){return this.indexOf(e)},insert:function(e,t){return this.splice(e,0,t)}},m={items:function(){return r._entries(this)},values:function(){return r._values(this)},keys:function(){return r.keys(this)},get:function(e,t){var n=this[e];return void 0===n&&(n=t),n},has_key:function(e){return f(this,e)},pop:function(e,t){var n=this[e];if(void 0===n&&void 0!==t)n=t;else{if(void 0===n)throw new Error("KeyError");delete this[e]}return n},popitem:function(){var e=r.keys(this);if(!e.length)throw new Error("KeyError");var t=e[0],n=this[t];return delete this[t],[t,n]},setdefault:function(e,t){return void 0===t&&(t=null),e in this||(this[e]=t),this[e]},update:function(e){return r._assign(this,e),null}};return m.iteritems=m.items,m.itervalues=m.values,m.iterkeys=m.keys,n.memberLookup=function(e,t,n){return 4===arguments.length?p.apply(this,arguments):(e=e||{},r.isArray(e)&&f(h,t)?h[t].bind(e):r.isObject(e)&&f(m,t)?m[t].bind(e):u.apply(this,arguments))},function(){n.contextOrFrameLookup=l,n.memberLookup=u,o&&(o.prototype.assertType=e),i&&(i.prototype.parseAggregate=t)}}}])},e.exports=t()}(Zu)),Zu.exports),tc=t(ec);const nc={GoogleChart:function({chart:e,source:t,view:n,report:r,schema:o,dashboard:i,query:a}){const[s,c]=u.useState([]),d=Ou(),[p,f]=u.useState([]);l.useEffect(()=>{(async()=>{const e=await Cu.getDateRanges();f(e)})()},[]);const h=l.useMemo(()=>{const e="YYYY-MM-dd",t=a?.date_range?.name,n=p.find(e=>e.name===t);if(!n)return e;return _u[n?.granularity]||e},[p,a]);return u.useEffect(()=>{if(!(e&&n&&t&&r&&o))return;let i=[];i.push(function(e,t){const n=[...t.doc.metrics,...t.doc.dimensions],r=e.columns.reduce((e,t)=>{const r=n.find(e=>e.name===t.name)||t;return e.push(r.title||r.name),e},[]);return r}(n,o));const a=Ja(n,o);t?.forEach(e=>{const t=a(e);i.push(t)}),t?.length?c(i):c()},[e,t,n,r,o]),s?u.createElement("div",{style:{}},u.createElement(Ka,Br({width:e?.doc.size?.width||"100%",chartType:e?.doc.chart?.type,data:s,options:(t=>{const n=["#468682","#ff686b","#6c757d","#FFD700","#073b4c"];if("Table"===e?.doc.chart?.type)return{...e?.doc.chart?.options,cssClassNames:d};if("AreaChart"===e?.doc.chart?.type){const r=e?.doc.chart?.options?.hAxis||{},o={...{ticks:t.slice(1).map(e=>e[0]),format:h},...r};return{...e?.doc.chart?.options,hAxis:o,focusTarget:"category",colors:n}}return{...e?.doc.chart?.options,colors:n}})(s)},e?.doc.chart?.props))):u.createElement("div",null)},LabelChart:function({chart:e,source:t,view:n,report:r,schema:o}){const[i,a]=u.useState([]),[s,l]=u.useState(),[c,d]=u.useState();return u.useEffect(()=>{if(!(e&&n&&t&&r&&o))return;let i=[];const s=Ja(n,o);t.forEach(e=>i.push(s(e))),a(i);const u=e?.doc?.chart?.options||{},c=u?.index||0;if(i.length>0&&l(i[0][c]),u.subText?.format){tc.configure({autoescape:!1});const e=Ja(n,o,"object")(t[0]),r=tc.renderString(u.subText?.format,e);d(r)}},[e,t,n,r,o]),u.createElement("div",{style:{display:"flex",justifyContent:"center",alignContent:"center",height:"100%",flexDirection:"column"}},u.createElement(qo,{variant:"h6"},s?.f||s),u.createElement(qo,{variant:"caption"},c))}};function rc(e,t){return void 0!==nc[e]?u.createElement(nc[e],t):u.createElement(Ra,t)}var oc=new Map,ic=new WeakMap,ac=0;function sc(e){return Object.keys(e).sort().filter(t=>void 0!==e[t]).map(t=>{return`${t}_${"root"===t?(n=e.root,n?(ic.has(n)||(ac+=1,ic.set(n,ac.toString())),ic.get(n)):"0"):e[t]}`;var n}).toString()}function lc(e,t,n={},r=undefined){if(void 0===window.IntersectionObserver&&void 0!==r){const o=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:"number"==typeof n.threshold?n.threshold:0,time:0,boundingClientRect:o,intersectionRect:o,rootBounds:o}),()=>{}}const{id:o,observer:i,elements:a}=function(e){const t=sc(e);let n=oc.get(t);if(!n){const r=new Map;let o;const i=new IntersectionObserver(t=>{t.forEach(t=>{var n;const i=t.isIntersecting&&o.some(e=>t.intersectionRatio>=e);e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=i),null==(n=r.get(t.target))||n.forEach(e=>{e(i,t)})})},e);o=i.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:i,elements:r},oc.set(t,n)}return n}(n),s=a.get(e)||[];return a.has(e)||a.set(e,s),s.push(t),i.observe(e),function(){s.splice(s.indexOf(t),1),0===s.length&&(a.delete(e),i.unobserve(e)),0===a.size&&(i.disconnect(),oc.delete(o))}}const uc={black:"#000",white:"#fff"},cc="#e57373",dc="#ef5350",pc="#f44336",fc="#d32f2f",hc="#c62828",mc="#f3e5f5",gc="#ce93d8",vc="#ba68c8",yc="#ab47bc",bc="#9c27b0",wc="#7b1fa2",xc="#e3f2fd",kc="#90caf9",Sc="#42a5f5",Ec="#1976d2",Cc="#1565c0",Oc="#4fc3f7",_c="#29b6f6",Tc="#03a9f4",Rc="#0288d1",Pc="#01579b",Ac="#81c784",Lc="#66bb6a",Nc="#4caf50",Mc="#388e3c",Ic="#2e7d32",Fc="#1b5e20",$c="#ffb74d",jc="#ffa726",zc="#ff9800",Bc="#f57c00",Dc="#e65100",Wc={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function Uc(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>n.searchParams.append("args[]",e)),`Minified MUI error #${e}; visit ${n} for the full message.`}var Vc="$$material";var Kc=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),Hc="-ms-",qc="-moz-",Gc="-webkit-",Yc="comm",Xc="rule",Qc="decl",Jc="@keyframes",Zc=Math.abs,ed=String.fromCharCode,td=Object.assign;function nd(e){return e.trim()}function rd(e,t,n){return e.replace(t,n)}function od(e,t){return e.indexOf(t)}function id(e,t){return 0|e.charCodeAt(t)}function ad(e,t,n){return e.slice(t,n)}function sd(e){return e.length}function ld(e){return e.length}function ud(e,t){return t.push(e),e}var cd=1,dd=1,pd=0,fd=0,hd=0,md="";function gd(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:cd,column:dd,length:a,return:""}}function vd(e,t){return td(gd("",null,null,"",null,null,0),e,{length:-e.length},t)}function yd(){return hd=fd>0?id(md,--fd):0,dd--,10===hd&&(dd=1,cd--),hd}function bd(){return hd=fd<pd?id(md,fd++):0,dd++,10===hd&&(dd=1,cd++),hd}function wd(){return id(md,fd)}function xd(){return fd}function kd(e,t){return ad(md,e,t)}function Sd(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Ed(e){return cd=dd=1,pd=sd(md=e),fd=0,[]}function Cd(e){return md="",e}function Od(e){return nd(kd(fd-1,Rd(91===e?e+2:40===e?e+1:e)))}function _d(e){for(;(hd=wd())&&hd<33;)bd();return Sd(e)>2||Sd(hd)>3?"":" "}function Td(e,t){for(;--t&&bd()&&!(hd<48||hd>102||hd>57&&hd<65||hd>70&&hd<97););return kd(e,xd()+(t<6&&32==wd()&&32==bd()))}function Rd(e){for(;bd();)switch(hd){case e:return fd;case 34:case 39:34!==e&&39!==e&&Rd(hd);break;case 40:41===e&&Rd(e);break;case 92:bd()}return fd}function Pd(e,t){for(;bd()&&e+hd!==57&&(e+hd!==84||47!==wd()););return"/*"+kd(t,fd-1)+"*"+ed(47===e?e:bd())}function Ad(e){for(;!Sd(wd());)bd();return kd(e,fd)}function Ld(e){return Cd(Nd("",null,null,null,[""],e=Ed(e),0,[0],e))}function Nd(e,t,n,r,o,i,a,s,l){for(var u=0,c=0,d=a,p=0,f=0,h=0,m=1,g=1,v=1,y=0,b="",w=o,x=i,k=r,S=b;g;)switch(h=y,y=bd()){case 40:if(108!=h&&58==id(S,d-1)){-1!=od(S+=rd(Od(y),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:S+=Od(y);break;case 9:case 10:case 13:case 32:S+=_d(h);break;case 92:S+=Td(xd()-1,7);continue;case 47:switch(wd()){case 42:case 47:ud(Id(Pd(bd(),xd()),t,n),l);break;default:S+="/"}break;case 123*m:s[u++]=sd(S)*v;case 125*m:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+c:-1==v&&(S=rd(S,/\f/g,"")),f>0&&sd(S)-d&&ud(f>32?Fd(S+";",r,n,d-1):Fd(rd(S," ","")+";",r,n,d-2),l);break;case 59:S+=";";default:if(ud(k=Md(S,t,n,u,c,o,s,b,w=[],x=[],d),i),123===y)if(0===c)Nd(S,t,k,k,w,i,d,s,x);else switch(99===p&&110===id(S,3)?100:p){case 100:case 108:case 109:case 115:Nd(e,k,k,r&&ud(Md(e,k,k,0,0,o,s,b,o,w=[],d),x),o,x,d,s,r?w:x);break;default:Nd(S,k,k,k,[""],x,0,s,x)}}u=c=f=0,m=v=1,b=S="",d=a;break;case 58:d=1+sd(S),f=h;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==yd())continue;switch(S+=ed(y),y*m){case 38:v=c>0?1:(S+="\f",-1);break;case 44:s[u++]=(sd(S)-1)*v,v=1;break;case 64:45===wd()&&(S+=Od(bd())),p=wd(),c=d=sd(b=S+=Ad(xd())),y++;break;case 45:45===h&&2==sd(S)&&(m=0)}}return i}function Md(e,t,n,r,o,i,a,s,l,u,c){for(var d=o-1,p=0===o?i:[""],f=ld(p),h=0,m=0,g=0;h<r;++h)for(var v=0,y=ad(e,d+1,d=Zc(m=a[h])),b=e;v<f;++v)(b=nd(m>0?p[v]+" "+y:rd(y,/&\f/g,p[v])))&&(l[g++]=b);return gd(e,t,n,0===o?Xc:s,l,u,c)}function Id(e,t,n){return gd(e,t,n,Yc,ed(hd),ad(e,2,-2),0)}function Fd(e,t,n,r){return gd(e,t,n,Qc,ad(e,0,r),ad(e,r+1,-1),r)}function $d(e,t){for(var n="",r=ld(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function jd(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case Qc:return e.return=e.return||e.value;case Yc:return"";case Jc:return e.return=e.value+"{"+$d(e.children,r)+"}";case Xc:e.value=e.props.join(",")}return sd(n=$d(e.children,r))?e.return=e.value+"{"+n+"}":""}function zd(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var Bd=function(e,t,n){for(var r=0,o=0;r=o,o=wd(),38===r&&12===o&&(t[n]=1),!Sd(o);)bd();return kd(e,fd)},Dd=function(e,t){return Cd(function(e,t){var n=-1,r=44;do{switch(Sd(r)){case 0:38===r&&12===wd()&&(t[n]=1),e[n]+=Bd(fd-1,t,n);break;case 2:e[n]+=Od(r);break;case 4:if(44===r){e[++n]=58===wd()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=ed(r)}}while(r=bd());return e}(Ed(e),t))},Wd=new WeakMap,Ud=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Wd.get(n))&&!r){Wd.set(e,!0);for(var o=[],i=Dd(t,o),a=n.props,s=0,l=0;s<i.length;s++)for(var u=0;u<a.length;u++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[u]):a[u]+" "+i[s]}}},Vd=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Kd(e,t){switch(function(e,t){return 45^id(e,0)?(((t<<2^id(e,0))<<2^id(e,1))<<2^id(e,2))<<2^id(e,3):0}(e,t)){case 5103:return Gc+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Gc+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Gc+e+qc+e+Hc+e+e;case 6828:case 4268:return Gc+e+Hc+e+e;case 6165:return Gc+e+Hc+"flex-"+e+e;case 5187:return Gc+e+rd(e,/(\w+).+(:[^]+)/,Gc+"box-$1$2"+Hc+"flex-$1$2")+e;case 5443:return Gc+e+Hc+"flex-item-"+rd(e,/flex-|-self/,"")+e;case 4675:return Gc+e+Hc+"flex-line-pack"+rd(e,/align-content|flex-|-self/,"")+e;case 5548:return Gc+e+Hc+rd(e,"shrink","negative")+e;case 5292:return Gc+e+Hc+rd(e,"basis","preferred-size")+e;case 6060:return Gc+"box-"+rd(e,"-grow","")+Gc+e+Hc+rd(e,"grow","positive")+e;case 4554:return Gc+rd(e,/([^-])(transform)/g,"$1"+Gc+"$2")+e;case 6187:return rd(rd(rd(e,/(zoom-|grab)/,Gc+"$1"),/(image-set)/,Gc+"$1"),e,"")+e;case 5495:case 3959:return rd(e,/(image-set\([^]*)/,Gc+"$1$`$1");case 4968:return rd(rd(e,/(.+:)(flex-)?(.*)/,Gc+"box-pack:$3"+Hc+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Gc+e+e;case 4095:case 3583:case 4068:case 2532:return rd(e,/(.+)-inline(.+)/,Gc+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(sd(e)-1-t>6)switch(id(e,t+1)){case 109:if(45!==id(e,t+4))break;case 102:return rd(e,/(.+:)(.+)-([^]+)/,"$1"+Gc+"$2-$3$1"+qc+(108==id(e,t+3)?"$3":"$2-$3"))+e;case 115:return~od(e,"stretch")?Kd(rd(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==id(e,t+1))break;case 6444:switch(id(e,sd(e)-3-(~od(e,"!important")&&10))){case 107:return rd(e,":",":"+Gc)+e;case 101:return rd(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Gc+(45===id(e,14)?"inline-":"")+"box$3$1"+Gc+"$2$3$1"+Hc+"$2box$3")+e}break;case 5936:switch(id(e,t+11)){case 114:return Gc+e+Hc+rd(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Gc+e+Hc+rd(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Gc+e+Hc+rd(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Gc+e+Hc+e+e}return e}var Hd=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Qc:e.return=Kd(e.value,e.length);break;case Jc:return $d([vd(e,{value:rd(e.value,"@","@"+Gc)})],r);case Xc:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return $d([vd(e,{props:[rd(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return $d([vd(e,{props:[rd(t,/:(plac\w+)/,":"+Gc+"input-$1")]}),vd(e,{props:[rd(t,/:(plac\w+)/,":-moz-$1")]}),vd(e,{props:[rd(t,/:(plac\w+)/,Hc+"input-$1")]})],r)}return""})}}],qd=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var r,o,i=e.stylisPlugins||Hd,a={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)});var l,u,c=[jd,(u=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&u(e)})],d=function(e){var t=ld(e);return function(n,r,o,i){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,i)||"";return a}}([Ud,Vd].concat(i,c));o=function(e,t,n,r){l=n,function(e){$d(Ld(e),d)}(e?e+"{"+t.styles+"}":t.styles),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new Kc({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:o};return p.sheet.hydrate(s),p};function Gd(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}var Yd=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Xd=function(e,t,n){Yd(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}};var Qd={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Jd=/[A-Z]|^ms/g,Zd=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ep=function(e){return 45===e.charCodeAt(1)},tp=function(e){return null!=e&&"boolean"!=typeof e},np=zd(function(e){return ep(e)?e:e.replace(Jd,"-$&").toLowerCase()}),rp=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Zd,function(e,t,n){return ip={name:t,styles:n,next:ip},t})}return 1===Qd[e]||ep(e)||"number"!=typeof t||0===t?t:t+"px"};function op(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return ip={name:o.name,styles:o.styles,next:ip},o.name;var i=n;if(void 0!==i.styles){var a=i.next;if(void 0!==a)for(;void 0!==a;)ip={name:a.name,styles:a.styles,next:ip},a=a.next;return i.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=op(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!=typeof a){var s=a;null!=t&&void 0!==t[s]?r+=i+"{"+t[s]+"}":tp(s)&&(r+=np(i)+":"+rp(i,s)+";")}else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var l=op(e,t,a);switch(i){case"animation":case"animationName":r+=np(i)+":"+l+";";break;default:r+=i+"{"+l+"}"}}else for(var u=0;u<a.length;u++)tp(a[u])&&(r+=np(i)+":"+rp(i,a[u])+";")}return r}(e,t,n);case"function":if(void 0!==e){var s=ip,l=n(e);return ip=s,op(e,t,l)}}var u=n;if(null==t)return u;var c=t[u];return void 0!==c?c:u}var ip,ap=/label:\s*([^\s;{]+)\s*(;|$)/g;function sp(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";ip=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=op(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++){if(o+=op(n,t,e[a]),r)o+=i[a]}ap.lastIndex=0;for(var s,l="";null!==(s=ap.exec(o));)l+="-"+s[1];var u=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:u,styles:o,next:ip}}var lp=!!c.useInsertionEffect&&c.useInsertionEffect,up=lp||function(e){return e()},cp=lp||l.useLayoutEffect,dp=l.createContext("undefined"!=typeof HTMLElement?qd({key:"css"}):null);dp.Provider;var pp,fp,hp=function(e){return l.forwardRef(function(t,n){var r=l.useContext(dp);return e(t,r,n)})},mp=l.createContext({}),gp={}.hasOwnProperty,vp="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",yp=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Yd(t,n,r),up(function(){return Xd(t,n,r)}),null},bp=hp(function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var o=e[vp],i=[r],a="";"string"==typeof e.className?a=Gd(t.registered,i,e.className):null!=e.className&&(a=e.className+" ");var s=sp(i,void 0,l.useContext(mp));a+=t.key+"-"+s.name;var u={};for(var c in e)gp.call(e,c)&&"css"!==c&&c!==vp&&(u[c]=e[c]);return u.className=a,n&&(u.ref=n),l.createElement(l.Fragment,null,l.createElement(yp,{cache:t,serialized:s,isStringTag:"string"==typeof o}),l.createElement(o,u))}),wp=bp,xp=function(e,t){var n=arguments;if(null==t||!gp.call(t,"css"))return l.createElement.apply(void 0,n);var r=n.length,o=new Array(r);o[0]=wp,o[1]=function(e,t){var n={};for(var r in t)gp.call(t,r)&&(n[r]=t[r]);return n[vp]=e,n}(e,t);for(var i=2;i<r;i++)o[i]=n[i];return l.createElement.apply(null,o)};pp=xp||(xp={}),fp||(fp=pp.JSX||(pp.JSX={}));var kp=hp(function(e,t){var n=sp([e.styles],void 0,l.useContext(mp)),r=l.useRef();return cp(function(){var e=t.key+"-global",o=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),i=!1,a=document.querySelector('style[data-emotion="'+e+" "+n.name+'"]');return t.sheet.tags.length&&(o.before=t.sheet.tags[0]),null!==a&&(i=!0,a.setAttribute("data-emotion",e),o.hydrate([a])),r.current=[o,i],function(){o.flush()}},[t]),cp(function(){var e=r.current,o=e[0];if(e[1])e[1]=!1;else{if(void 0!==n.next&&Xd(t,n.next,!0),o.tags.length){var i=o.tags[o.tags.length-1].nextElementSibling;o.before=i,o.flush()}t.insert("",n,o,!1)}},[t,n.name]),null});function Sp(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return sp(t)}function Ep(){var e=Sp.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var Cp=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Op=zd(function(e){return Cp.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),_p=function(e){return"theme"!==e},Tp=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?Op:_p},Rp=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},Pp=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Yd(t,n,r),up(function(){return Xd(t,n,r)}),null},Ap=function e(t,n){var r,o,i=t.__emotion_real===t,a=i&&t.__emotion_base||t;void 0!==n&&(r=n.label,o=n.target);var s=Rp(t,n,i),u=s||Tp(a),c=!u("as");return function(){var d=arguments,p=i&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&p.push("label:"+r+";"),null==d[0]||void 0===d[0].raw)p.push.apply(p,d);else{var h=d[0];p.push(h[0]);for(var m=d.length,g=1;g<m;g++)p.push(d[g],h[g])}var v=hp(function(e,t,n){var r=c&&e.as||a,i="",d=[],f=e;if(null==e.theme){for(var h in f={},e)f[h]=e[h];f.theme=l.useContext(mp)}"string"==typeof e.className?i=Gd(t.registered,d,e.className):null!=e.className&&(i=e.className+" ");var m=sp(p.concat(d),t.registered,f);i+=t.key+"-"+m.name,void 0!==o&&(i+=" "+o);var g=c&&void 0===s?Tp(r):u,v={};for(var y in e)c&&"as"===y||g(y)&&(v[y]=e[y]);return v.className=i,n&&(v.ref=n),l.createElement(l.Fragment,null,l.createElement(Pp,{cache:t,serialized:m,isStringTag:"string"==typeof r}),l.createElement(r,v))});return v.displayName=void 0!==r?r:"Styled("+("string"==typeof a?a:a.displayName||a.name||"Component")+")",v.defaultProps=t.defaultProps,v.__emotion_real=v,v.__emotion_base=a,v.__emotion_styles=p,v.__emotion_forwardProp=s,Object.defineProperty(v,"toString",{value:function(){return"."+o}}),v.withComponent=function(t,r){return e(t,f({},n,r,{shouldForwardProp:Rp(v,r,!0)})).apply(void 0,p)},v}}.bind(null);["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach(function(e){Ap[e]=Ap(e)});var Lp,Np,Mp={exports:{}},Ip={};var Fp=(Np||(Np=1,Mp.exports=function(){if(Lp)return Ip;Lp=1;var e=s(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(e,n,a){var s,l={},u=null,c=null;for(s in void 0!==a&&(u=""+a),void 0!==n.key&&(u=""+n.key),void 0!==n.ref&&(c=n.ref),n)r.call(n,s)&&!i.hasOwnProperty(s)&&(l[s]=n[s]);if(e&&e.defaultProps)for(s in n=e.defaultProps)void 0===l[s]&&(l[s]=n[s]);return{$$typeof:t,type:e,key:u,ref:c,props:l,_owner:o.current}}return Ip.Fragment=n,Ip.jsx=a,Ip.jsxs=a,Ip}()),Mp.exports);function $p(e){const{styles:t,defaultTheme:n={}}=e,r="function"==typeof t?e=>{return t(null==(r=e)||0===Object.keys(r).length?n:e);var r}:t;return Fp.jsx(kp,{styles:r})}
|
|
24
|
+
*/var Ya,Xa=(qa||(qa=1,Ya=Ga,function(e,t){Ya.exports?Ya.exports=t():e.numeral=t()}(Ga.exports,function(){var e,t,n,r,o,i={},a={},s={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},l={currentLocale:s.currentLocale,zeroFormat:s.zeroFormat,nullFormat:s.nullFormat,defaultFormat:s.defaultFormat,scalePercentBy100:s.scalePercentBy100};function u(e,t){this._input=e,this._value=t}return(e=function(n){var r,o,a,s;if(e.isNumeral(n))r=n.value();else if(0===n||void 0===n)r=0;else if(null===n||t.isNaN(n))r=null;else if("string"==typeof n)if(l.zeroFormat&&n===l.zeroFormat)r=0;else if(l.nullFormat&&n===l.nullFormat||!n.replace(/[^0-9]+/g,"").length)r=null;else{for(o in i)if((s="function"==typeof i[o].regexps.unformat?i[o].regexps.unformat():i[o].regexps.unformat)&&n.match(s)){a=i[o].unformat;break}r=(a=a||e._.stringToNumber)(n)}else r=Number(n)||null;return new u(n,r)}).version="2.0.6",e.isNumeral=function(e){return e instanceof u},e._=t={numberToFormat:function(t,n,r){var o,i,s,l,u,c,d,p,f=a[e.options.currentLocale],h=!1,m=!1,g="",v=1e12,y=1e9,b=1e6,w="",x=!1;if(t=t||0,s=Math.abs(t),e._.includes(n,"(")?(h=!0,n=n.replace(/[\(|\)]/g,"")):(e._.includes(n,"+")||e._.includes(n,"-"))&&(c=e._.includes(n,"+")?n.indexOf("+"):t<0?n.indexOf("-"):-1,n=n.replace(/[\+|\-]/g,"")),e._.includes(n,"a")&&(i=!!(i=n.match(/a(k|m|b|t)?/))&&i[1],e._.includes(n," a")&&(g=" "),n=n.replace(new RegExp(g+"a[kmbt]?"),""),s>=v&&!i||"t"===i?(g+=f.abbreviations.trillion,t/=v):s<v&&s>=y&&!i||"b"===i?(g+=f.abbreviations.billion,t/=y):s<y&&s>=b&&!i||"m"===i?(g+=f.abbreviations.million,t/=b):(s<b&&s>=1e3&&!i||"k"===i)&&(g+=f.abbreviations.thousand,t/=1e3)),e._.includes(n,"[.]")&&(m=!0,n=n.replace("[.]",".")),l=t.toString().split(".")[0],u=n.split(".")[1],d=n.indexOf(","),o=(n.split(".")[0].split(",")[0].match(/0/g)||[]).length,u?(e._.includes(u,"[")?(u=(u=u.replace("]","")).split("["),w=e._.toFixed(t,u[0].length+u[1].length,r,u[1].length)):w=e._.toFixed(t,u.length,r),l=w.split(".")[0],w=e._.includes(w,".")?f.delimiters.decimal+w.split(".")[1]:"",m&&0===Number(w.slice(1))&&(w="")):l=e._.toFixed(t,0,r),g&&!i&&Number(l)>=1e3&&g!==f.abbreviations.trillion)switch(l=String(Number(l)/1e3),g){case f.abbreviations.thousand:g=f.abbreviations.million;break;case f.abbreviations.million:g=f.abbreviations.billion;break;case f.abbreviations.billion:g=f.abbreviations.trillion}if(e._.includes(l,"-")&&(l=l.slice(1),x=!0),l.length<o)for(var k=o-l.length;k>0;k--)l="0"+l;return d>-1&&(l=l.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+f.delimiters.thousands)),0===n.indexOf(".")&&(l=""),p=l+w+(g||""),h?p=(h&&x?"(":"")+p+(h&&x?")":""):c>=0?p=0===c?(x?"-":"+")+p:p+(x?"-":"+"):x&&(p="-"+p),p},stringToNumber:function(e){var t,n,r,o=a[l.currentLocale],i=e,s={thousand:3,million:6,billion:9,trillion:12};if(l.zeroFormat&&e===l.zeroFormat)n=0;else if(l.nullFormat&&e===l.nullFormat||!e.replace(/[^0-9]+/g,"").length)n=null;else{for(t in n=1,"."!==o.delimiters.decimal&&(e=e.replace(/\./g,"").replace(o.delimiters.decimal,".")),s)if(r=new RegExp("[^a-zA-Z]"+o.abbreviations[t]+"(?:\\)|(\\"+o.currency.symbol+")?(?:\\))?)?$"),i.match(r)){n*=Math.pow(10,s[t]);break}n*=(e.split("-").length+Math.min(e.split("(").length-1,e.split(")").length-1))%2?1:-1,e=e.replace(/[^0-9\.]+/g,""),n*=Number(e)}return n},isNaN:function(e){return"number"==typeof e&&isNaN(e)},includes:function(e,t){return-1!==e.indexOf(t)},insert:function(e,t,n){return e.slice(0,n)+t+e.slice(n)},reduce:function(e,t){if(null===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof t)throw new TypeError(t+" is not a function");var n,r=Object(e),o=r.length>>>0,i=0;if(3===arguments.length)n=arguments[2];else{for(;i<o&&!(i in r);)i++;if(i>=o)throw new TypeError("Reduce of empty array with no initial value");n=r[i++]}for(;i<o;i++)i in r&&(n=t(n,r[i],i,r));return n},multiplier:function(e){var t=e.toString().split(".");return t.length<2?1:Math.pow(10,t[1].length)},correctionFactor:function(){return Array.prototype.slice.call(arguments).reduce(function(e,n){var r=t.multiplier(n);return e>r?e:r},1)},toFixed:function(e,t,n,r){var o,i,a,s,l=e.toString().split("."),u=t-(r||0);return o=2===l.length?Math.min(Math.max(l[1].length,u),t):u,a=Math.pow(10,o),s=(n(e+"e+"+o)/a).toFixed(o),r>t-o&&(i=new RegExp("\\.?0{1,"+(r-(t-o))+"}$"),s=s.replace(i,"")),s}},e.options=l,e.formats=i,e.locales=a,e.locale=function(e){return e&&(l.currentLocale=e.toLowerCase()),l.currentLocale},e.localeData=function(e){if(!e)return a[l.currentLocale];if(e=e.toLowerCase(),!a[e])throw new Error("Unknown locale : "+e);return a[e]},e.reset=function(){for(var e in s)l[e]=s[e]},e.zeroFormat=function(e){l.zeroFormat="string"==typeof e?e:null},e.nullFormat=function(e){l.nullFormat="string"==typeof e?e:null},e.defaultFormat=function(e){l.defaultFormat="string"==typeof e?e:"0.0"},e.register=function(e,t,n){if(t=t.toLowerCase(),this[e+"s"][t])throw new TypeError(t+" "+e+" already registered.");return this[e+"s"][t]=n,n},e.validate=function(t,n){var r,o,i,a,s,l,u,c;if("string"!=typeof t&&(t+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",t)),(t=t.trim()).match(/^\d+$/))return!0;if(""===t)return!1;try{u=e.localeData(n)}catch(t){u=e.localeData(e.locale())}return i=u.currency.symbol,s=u.abbreviations,r=u.delimiters.decimal,o="."===u.delimiters.thousands?"\\.":u.delimiters.thousands,!(null!==(c=t.match(/^[^\d]+/))&&(t=t.substr(1),c[0]!==i)||null!==(c=t.match(/[^\d]+$/))&&(t=t.slice(0,-1),c[0]!==s.thousand&&c[0]!==s.million&&c[0]!==s.billion&&c[0]!==s.trillion)||(l=new RegExp(o+"{2}"),t.match(/[^\d.,]/g)||(a=t.split(r)).length>2||(a.length<2?!a[0].match(/^\d+.*\d$/)||a[0].match(l):1===a[0].length?!a[0].match(/^\d+$/)||a[0].match(l)||!a[1].match(/^\d+$/):!a[0].match(/^\d+.*\d$/)||a[0].match(l)||!a[1].match(/^\d+$/))))},e.fn=u.prototype={clone:function(){return e(this)},format:function(t,n){var r,o,a,s=this._value,u=t||l.defaultFormat;if(n=n||Math.round,0===s&&null!==l.zeroFormat)o=l.zeroFormat;else if(null===s&&null!==l.nullFormat)o=l.nullFormat;else{for(r in i)if(u.match(i[r].regexps.format)){a=i[r].format;break}o=(a=a||e._.numberToFormat)(s,u,n)}return o},value:function(){return this._value},input:function(){return this._input},set:function(e){return this._value=Number(e),this},add:function(e){var n=t.correctionFactor.call(null,this._value,e);return this._value=t.reduce([this._value,e],function(e,t,r,o){return e+Math.round(n*t)},0)/n,this},subtract:function(e){var n=t.correctionFactor.call(null,this._value,e);return this._value=t.reduce([e],function(e,t,r,o){return e-Math.round(n*t)},Math.round(this._value*n))/n,this},multiply:function(e){return this._value=t.reduce([this._value,e],function(e,n,r,o){var i=t.correctionFactor(e,n);return Math.round(e*i)*Math.round(n*i)/Math.round(i*i)},1),this},divide:function(e){return this._value=t.reduce([this._value,e],function(e,n,r,o){var i=t.correctionFactor(e,n);return Math.round(e*i)/Math.round(n*i)}),this},difference:function(t){return Math.abs(e(this._value).subtract(t).value())}},e.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$"}}),e.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(t,n,r){var o,i=e._.includes(n," BPS")?" ":"";return t*=1e4,n=n.replace(/\s?BPS/,""),o=e._.numberToFormat(t,n,r),e._.includes(o,")")?((o=o.split("")).splice(-1,0,i+"BPS"),o=o.join("")):o=o+i+"BPS",o},unformat:function(t){return+(1e-4*e._.stringToNumber(t)).toFixed(15)}}),r={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},o="("+(o=(n={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}).suffixes.concat(r.suffixes.filter(function(e){return n.suffixes.indexOf(e)<0})).join("|")).replace("B","B(?!PS)")+")",e.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(o)},format:function(t,o,i){var a,s,l,u=e._.includes(o,"ib")?r:n,c=e._.includes(o," b")||e._.includes(o," ib")?" ":"";for(o=o.replace(/\s?i?b/,""),a=0;a<=u.suffixes.length;a++)if(s=Math.pow(u.base,a),l=Math.pow(u.base,a+1),null===t||0===t||t>=s&&t<l){c+=u.suffixes[a],s>0&&(t/=s);break}return e._.numberToFormat(t,o,i)+c},unformat:function(t){var o,i,a=e._.stringToNumber(t);if(a){for(o=n.suffixes.length-1;o>=0;o--){if(e._.includes(t,n.suffixes[o])){i=Math.pow(n.base,o);break}if(e._.includes(t,r.suffixes[o])){i=Math.pow(r.base,o);break}}a*=i||1}return a}}),e.register("format","currency",{regexps:{format:/(\$)/},format:function(t,n,r){var o,i,a=e.locales[e.options.currentLocale],s={before:n.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:n.match(/([\+|\-|\)|\s|\$]*)$/)[0]};for(n=n.replace(/\s?\$\s?/,""),o=e._.numberToFormat(t,n,r),t>=0?(s.before=s.before.replace(/[\-\(]/,""),s.after=s.after.replace(/[\-\)]/,"")):t<0&&!e._.includes(s.before,"-")&&!e._.includes(s.before,"(")&&(s.before="-"+s.before),i=0;i<s.before.length;i++)switch(s.before[i]){case"$":o=e._.insert(o,a.currency.symbol,i);break;case" ":o=e._.insert(o," ",i+a.currency.symbol.length-1)}for(i=s.after.length-1;i>=0;i--)switch(s.after[i]){case"$":o=i===s.after.length-1?o+a.currency.symbol:e._.insert(o,a.currency.symbol,-(s.after.length-(1+i)));break;case" ":o=i===s.after.length-1?o+" ":e._.insert(o," ",-(s.after.length-(1+i)+a.currency.symbol.length-1))}return o}}),e.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(t,n,r){var o=("number"!=typeof t||e._.isNaN(t)?"0e+0":t.toExponential()).split("e");return n=n.replace(/e[\+|\-]{1}0/,""),e._.numberToFormat(Number(o[0]),n,r)+"e"+o[1]},unformat:function(t){var n=e._.includes(t,"e+")?t.split("e+"):t.split("e-"),r=Number(n[0]),o=Number(n[1]);return o=e._.includes(t,"e-")?o*=-1:o,e._.reduce([r,Math.pow(10,o)],function(t,n,r,o){var i=e._.correctionFactor(t,n);return t*i*(n*i)/(i*i)},1)}}),e.register("format","ordinal",{regexps:{format:/(o)/},format:function(t,n,r){var o=e.locales[e.options.currentLocale],i=e._.includes(n," o")?" ":"";return n=n.replace(/\s?o/,""),i+=o.ordinal(t),e._.numberToFormat(t,n,r)+i}}),e.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(t,n,r){var o,i=e._.includes(n," %")?" ":"";return e.options.scalePercentBy100&&(t*=100),n=n.replace(/\s?\%/,""),o=e._.numberToFormat(t,n,r),e._.includes(o,")")?((o=o.split("")).splice(-1,0,i+"%"),o=o.join("")):o=o+i+"%",o},unformat:function(t){var n=e._.stringToNumber(t);return e.options.scalePercentBy100?.01*n:n}}),e.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(e,t,n){var r=Math.floor(e/60/60),o=Math.floor((e-60*r*60)/60),i=Math.round(e-60*r*60-60*o);return r+":"+(o<10?"0"+o:o)+":"+(i<10?"0"+i:i)},unformat:function(e){var t=e.split(":"),n=0;return 3===t.length?(n+=60*Number(t[0])*60,n+=60*Number(t[1]),n+=Number(t[2])):2===t.length&&(n+=60*Number(t[0]),n+=Number(t[1])),Number(n)}}),e})),Ga.exports),Qa=t(Xa);function Ja(e,t,n="array"){const r=e.columns,o=[...t.doc.metrics,...t.doc.dimensions].reduce((e,t)=>(e[t.name]=t,e),{});return e=>{const t="array"===n?[]:{};return r.reduce((t,r)=>{const i=e[r.name],a=o[r.name];let s=i;return s="timestamp"===a.type?new Date(i):a.format?a.format&&a.prefix?{v:+i,f:a.prefix+" "+Qa(i).format(a.format)}:a.format?{v:+i,f:Qa(i).format(a.format)}:i:i,"array"===n?t.push(s):t[r.name]=s?.f||s,t},t)}}function Za(e,t){return function(){return e.apply(t,arguments)}}const{toString:es}=Object.prototype,{getPrototypeOf:ts}=Object,{iterator:ns,toStringTag:rs}=Symbol,os=(e=>t=>{const n=es.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),is=e=>(e=e.toLowerCase(),t=>os(t)===e),as=e=>t=>typeof t===e,{isArray:ss}=Array,ls=as("undefined");const us=is("ArrayBuffer");const cs=as("string"),ds=as("function"),ps=as("number"),fs=e=>null!==e&&"object"==typeof e,hs=e=>{if("object"!==os(e))return!1;const t=ts(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||rs in e||ns in e)},ms=is("Date"),gs=is("File"),vs=is("Blob"),ys=is("FileList"),bs=is("URLSearchParams"),[ws,xs,ks,Ss]=["ReadableStream","Request","Response","Headers"].map(is);function Es(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),ss(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(r=0;r<i;r++)a=o[r],t.call(null,e[a],a,e)}}function Cs(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const Os="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,_s=e=>!ls(e)&&e!==Os;const Ts=(Rs="undefined"!=typeof Uint8Array&&ts(Uint8Array),e=>Rs&&e instanceof Rs);var Rs;const Ps=is("HTMLFormElement"),As=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Ls=is("RegExp"),Ns=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Es(n,(n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)}),Object.defineProperties(e,r)};const Ms=is("AsyncFunction"),Is=(Fs="function"==typeof setImmediate,$s=ds(Os.postMessage),Fs?setImmediate:$s?((e,t)=>(Os.addEventListener("message",({source:n,data:r})=>{n===Os&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),Os.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e));var Fs,$s;const js="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Os):"undefined"!=typeof process&&process.nextTick||Is;var zs={isArray:ss,isArrayBuffer:us,isBuffer:function(e){return null!==e&&!ls(e)&&null!==e.constructor&&!ls(e.constructor)&&ds(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||ds(e.append)&&("formdata"===(t=os(e))||"object"===t&&ds(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&us(e.buffer),t},isString:cs,isNumber:ps,isBoolean:e=>!0===e||!1===e,isObject:fs,isPlainObject:hs,isReadableStream:ws,isRequest:xs,isResponse:ks,isHeaders:Ss,isUndefined:ls,isDate:ms,isFile:gs,isBlob:vs,isRegExp:Ls,isFunction:ds,isStream:e=>fs(e)&&ds(e.pipe),isURLSearchParams:bs,isTypedArray:Ts,isFileList:ys,forEach:Es,merge:function e(){const{caseless:t}=_s(this)&&this||{},n={},r=(r,o)=>{const i=t&&Cs(n,o)||o;hs(n[i])&&hs(r)?n[i]=e(n[i],r):hs(r)?n[i]=e({},r):ss(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&Es(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(Es(t,(t,r)=>{n&&ds(t)?e[r]=Za(t,n):e[r]=t},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&ts(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:os,kindOfTest:is,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(ss(e))return e;let t=e.length;if(!ps(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[ns]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Ps,hasOwnProperty:As,hasOwnProp:As,reduceDescriptors:Ns,freezeMethods:e=>{Ns(e,(t,n)=>{if(ds(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];ds(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return ss(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:Cs,global:Os,isContextDefined:_s,isSpecCompliantForm:function(e){return!!(e&&ds(e.append)&&"FormData"===e[rs]&&e[ns])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(fs(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=ss(e)?[]:{};return Es(e,(e,t)=>{const i=n(e,r+1);!ls(i)&&(o[t]=i)}),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:Ms,isThenable:e=>e&&(fs(e)||ds(e))&&ds(e.then)&&ds(e.catch),setImmediate:Is,asap:js,isIterable:e=>null!=e&&ds(e[ns])};function Bs(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}zs.inherits(Bs,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:zs.toJSONObject(this.config),code:this.code,status:this.status}}});const Ds=Bs.prototype,Ws={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Ws[e]={value:e}}),Object.defineProperties(Bs,Ws),Object.defineProperty(Ds,"isAxiosError",{value:!0}),Bs.from=(e,t,n,r,o,i)=>{const a=Object.create(Ds);return zs.toFlatObject(e,a,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e),Bs.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};function Us(e){return zs.isPlainObject(e)||zs.isArray(e)}function Vs(e){return zs.endsWith(e,"[]")?e.slice(0,-2):e}function Ks(e,t,n){return e?e.concat(t).map(function(e,t){return e=Vs(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const Hs=zs.toFlatObject(zs,{},null,function(e){return/^is[A-Z]/.test(e)});function qs(e,t,n){if(!zs.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=zs.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!zs.isUndefined(t[e])})).metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&zs.isSpecCompliantForm(t);if(!zs.isFunction(o))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(zs.isDate(e))return e.toISOString();if(zs.isBoolean(e))return e.toString();if(!s&&zs.isBlob(e))throw new Bs("Blob is not supported. Use a Buffer instead.");return zs.isArrayBuffer(e)||zs.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let s=e;if(e&&!o&&"object"==typeof e)if(zs.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(zs.isArray(e)&&function(e){return zs.isArray(e)&&!e.some(Us)}(e)||(zs.isFileList(e)||zs.endsWith(n,"[]"))&&(s=zs.toArray(e)))return n=Vs(n),s.forEach(function(e,r){!zs.isUndefined(e)&&null!==e&&t.append(!0===a?Ks([n],r,i):null===a?n:n+"[]",l(e))}),!1;return!!Us(e)||(t.append(Ks(o,n,i),l(e)),!1)}const c=[],d=Object.assign(Hs,{defaultVisitor:u,convertValue:l,isVisitable:Us});if(!zs.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!zs.isUndefined(n)){if(-1!==c.indexOf(n))throw Error("Circular reference detected in "+r.join("."));c.push(n),zs.forEach(n,function(n,i){!0===(!(zs.isUndefined(n)||null===n)&&o.call(t,n,zs.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i])}),c.pop()}}(e),t}function Gs(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Ys(e,t){this._pairs=[],e&&qs(e,this,t)}const Xs=Ys.prototype;function Qs(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Js(e,t,n){if(!t)return e;const r=n&&n.encode||Qs;zs.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(i=o?o(t,n):zs.isURLSearchParams(t)?t.toString():new Ys(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}Xs.append=function(e,t){this._pairs.push([e,t])},Xs.toString=function(e){const t=e?function(t){return e.call(this,t,Gs)}:Gs;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class Zs{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){zs.forEach(this.handlers,function(t){null!==t&&e(t)})}}var el={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},tl={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Ys,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const nl="undefined"!=typeof window&&"undefined"!=typeof document,rl="object"==typeof navigator&&navigator||void 0,ol=nl&&(!rl||["ReactNative","NativeScript","NS"].indexOf(rl.product)<0),il="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,al=nl&&window.location.href||"http://localhost";var sl={...Object.freeze({__proto__:null,hasBrowserEnv:nl,hasStandardBrowserEnv:ol,hasStandardBrowserWebWorkerEnv:il,navigator:rl,origin:al}),...tl};function ll(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;if(i=!i&&zs.isArray(r)?r.length:i,s)return zs.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a;r[i]&&zs.isObject(r[i])||(r[i]=[]);return t(e,n,r[i],o)&&zs.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!a}if(zs.isFormData(e)&&zs.isFunction(e.entries)){const n={};return zs.forEachEntry(e,(e,r)=>{t(function(e){return zs.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null}const ul={transitional:el,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=zs.isObject(e);o&&zs.isHTMLForm(e)&&(e=new FormData(e));if(zs.isFormData(e))return r?JSON.stringify(ll(e)):e;if(zs.isArrayBuffer(e)||zs.isBuffer(e)||zs.isStream(e)||zs.isFile(e)||zs.isBlob(e)||zs.isReadableStream(e))return e;if(zs.isArrayBufferView(e))return e.buffer;if(zs.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return qs(e,new sl.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return sl.isNode&&zs.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=zs.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return qs(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(zs.isString(e))try{return(t||JSON.parse)(e),zs.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ul.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(zs.isResponse(e)||zs.isReadableStream(e))return e;if(e&&zs.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw Bs.from(e,Bs.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:sl.classes.FormData,Blob:sl.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};zs.forEach(["delete","get","head","post","put","patch"],e=>{ul.headers[e]={}});const cl=zs.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const dl=Symbol("internals");function pl(e){return e&&String(e).trim().toLowerCase()}function fl(e){return!1===e||null==e?e:zs.isArray(e)?e.map(fl):String(e)}function hl(e,t,n,r,o){return zs.isFunction(r)?r.call(this,t,n):(o&&(t=n),zs.isString(t)?zs.isString(r)?-1!==t.indexOf(r):zs.isRegExp(r)?r.test(t):void 0:void 0)}let ml=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=pl(t);if(!o)throw new Error("header name must be a non-empty string");const i=zs.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=fl(e))}const i=(e,t)=>zs.forEach(e,(e,n)=>o(e,n,t));if(zs.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(zs.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&cl[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(zs.isObject(e)&&zs.isIterable(e)){let n,r,o={};for(const t of e){if(!zs.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[r=t[0]]=(n=o[r])?zs.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}i(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=pl(e)){const n=zs.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(zs.isFunction(t))return t.call(this,e,n);if(zs.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=pl(e)){const n=zs.findKey(this,e);return!(!n||void 0===this[n]||t&&!hl(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=pl(e)){const o=zs.findKey(n,e);!o||t&&!hl(0,n[o],o,t)||(delete n[o],r=!0)}}return zs.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!hl(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return zs.forEach(this,(r,o)=>{const i=zs.findKey(n,o);if(i)return t[i]=fl(r),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();a!==o&&delete t[o],t[a]=fl(r),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return zs.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&zs.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[dl]=this[dl]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=pl(e);t[r]||(!function(e,t){const n=zs.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return zs.isArray(e)?e.forEach(r):r(e),this}};function gl(e,t){const n=this||ul,r=t||n,o=ml.from(r.headers);let i=r.data;return zs.forEach(e,function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function vl(e){return!(!e||!e.__CANCEL__)}function yl(e,t,n){Bs.call(this,null==e?"canceled":e,Bs.ERR_CANCELED,t,n),this.name="CanceledError"}function bl(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Bs("Request failed with status code "+n.status,[Bs.ERR_BAD_REQUEST,Bs.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}ml.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),zs.reduceDescriptors(ml.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),zs.freezeMethods(ml),zs.inherits(yl,Bs,{__CANCEL__:!0});const wl=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),u=r[a];o||(o=l),n[i]=s,r[i]=l;let c=a,d=0;for(;c!==i;)d+=n[c++],c%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),l-o<t)return;const p=u&&l-u;return p?Math.round(1e3*d/p):void 0}}(50,250);return function(e,t){let n,r,o=0,i=1e3/t;const a=(t,i=Date.now())=>{o=i,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=i?a(e,t):(n=e,r||(r=setTimeout(()=>{r=null,a(n)},i-s)))},()=>n&&a(n)]}(n=>{const i=n.loaded,a=n.lengthComputable?n.total:void 0,s=i-r,l=o(s);r=i;e({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&i<=a?(a-i)/l:void 0,event:n,lengthComputable:null!=a,[t?"download":"upload"]:!0})},n)},xl=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},kl=e=>(...t)=>zs.asap(()=>e(...t));var Sl=sl.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,sl.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(sl.origin),sl.navigator&&/(msie|trident)/i.test(sl.navigator.userAgent)):()=>!0,El=sl.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];zs.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),zs.isString(r)&&a.push("path="+r),zs.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Cl(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Ol=e=>e instanceof ml?{...e}:e;function _l(e,t){t=t||{};const n={};function r(e,t,n,r){return zs.isPlainObject(e)&&zs.isPlainObject(t)?zs.merge.call({caseless:r},e,t):zs.isPlainObject(t)?zs.merge({},t):zs.isArray(t)?t.slice():t}function o(e,t,n,o){return zs.isUndefined(t)?zs.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!zs.isUndefined(t))return r(void 0,t)}function a(e,t){return zs.isUndefined(t)?zs.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,n)=>o(Ol(e),Ol(t),0,!0)};return zs.forEach(Object.keys(Object.assign({},e,t)),function(r){const i=l[r]||o,a=i(e[r],t[r],r);zs.isUndefined(a)&&i!==s||(n[r]=a)}),n}var Tl=e=>{const t=_l({},e);let n,{data:r,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:s,auth:l}=t;if(t.headers=s=ml.from(s),t.url=Js(Cl(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),zs.isFormData(r))if(sl.hasStandardBrowserEnv||sl.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(n=s.getContentType())){const[e,...t]=n?n.split(";").map(e=>e.trim()).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}if(sl.hasStandardBrowserEnv&&(o&&zs.isFunction(o)&&(o=o(t)),o||!1!==o&&Sl(t.url))){const e=i&&a&&El.read(a);e&&s.set(i,e)}return t};var Rl="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=Tl(e);let o=r.data;const i=ml.from(r.headers).normalize();let a,s,l,u,c,{responseType:d,onUploadProgress:p,onDownloadProgress:f}=r;function h(){u&&u(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let m=new XMLHttpRequest;function g(){if(!m)return;const r=ml.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());bl(function(e){t(e),h()},function(e){n(e),h()},{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new Bs("Request aborted",Bs.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new Bs("Network Error",Bs.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||el;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Bs(t,o.clarifyTimeoutError?Bs.ETIMEDOUT:Bs.ECONNABORTED,e,m)),m=null},void 0===o&&i.setContentType(null),"setRequestHeader"in m&&zs.forEach(i.toJSON(),function(e,t){m.setRequestHeader(t,e)}),zs.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),f&&([l,c]=wl(f,!0),m.addEventListener("progress",l)),p&&m.upload&&([s,u]=wl(p),m.upload.addEventListener("progress",s),m.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(a=t=>{m&&(n(!t||t.type?new yl(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const v=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);v&&-1===sl.protocols.indexOf(v)?n(new Bs("Unsupported protocol "+v+":",Bs.ERR_BAD_REQUEST,e)):m.send(o||null)})};const Pl=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof Bs?t:new yl(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new Bs(`timeout ${t} of ms exceeded`,Bs.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:s}=r;return s.unsubscribe=()=>zs.asap(a),s}},Al=function*(e,t){let n=e.byteLength;if(n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},Ll=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},Nl=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of Ll(e))yield*Al(n,t)}(e,t);let i,a=0,s=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return s(),void e.close();let i=r.byteLength;if(n){let e=a+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},Ml="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Il=Ml&&"function"==typeof ReadableStream,Fl=Ml&&("function"==typeof TextEncoder?($l=new TextEncoder,e=>$l.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var $l;const jl=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},zl=Il&&jl(()=>{let e=!1;const t=new Request(sl.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Bl=Il&&jl(()=>zs.isReadableStream(new Response("").body)),Dl={stream:Bl&&(e=>e.body)};var Wl;Ml&&(Wl=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Dl[e]&&(Dl[e]=zs.isFunction(Wl[e])?t=>t[e]():(t,n)=>{throw new Bs(`Response type '${e}' is not supported`,Bs.ERR_NOT_SUPPORT,n)})}));const Ul=async(e,t)=>{const n=zs.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(zs.isBlob(e))return e.size;if(zs.isSpecCompliantForm(e)){const t=new Request(sl.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return zs.isArrayBufferView(e)||zs.isArrayBuffer(e)?e.byteLength:(zs.isURLSearchParams(e)&&(e+=""),zs.isString(e)?(await Fl(e)).byteLength:void 0)})(t):n};var Vl=Ml&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:u,headers:c,withCredentials:d="same-origin",fetchOptions:p}=Tl(e);u=u?(u+"").toLowerCase():"text";let f,h=Pl([o,i&&i.toAbortSignal()],a);const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let g;try{if(l&&zl&&"get"!==n&&"head"!==n&&0!==(g=await Ul(c,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(zs.isFormData(r)&&(e=n.headers.get("content-type"))&&c.setContentType(e),n.body){const[e,t]=xl(g,wl(kl(l)));r=Nl(n.body,65536,e,t)}}zs.isString(d)||(d=d?"include":"omit");const o="credentials"in Request.prototype;f=new Request(t,{...p,signal:h,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:o?d:void 0});let i=await fetch(f,p);const a=Bl&&("stream"===u||"response"===u);if(Bl&&(s||a&&m)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=i[t]});const t=zs.toFiniteNumber(i.headers.get("content-length")),[n,r]=s&&xl(t,wl(kl(s),!0))||[];i=new Response(Nl(i.body,65536,n,()=>{r&&r(),m&&m()}),e)}u=u||"text";let v=await Dl[zs.findKey(Dl,u)||"text"](i,e);return!a&&m&&m(),await new Promise((t,n)=>{bl(t,n,{data:v,headers:ml.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:f})})}catch(t){if(m&&m(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new Bs("Network Error",Bs.ERR_NETWORK,e,f),{cause:t.cause||t});throw Bs.from(t,t&&t.code,e,f)}});const Kl={http:null,xhr:Rl,fetch:Vl};zs.forEach(Kl,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const Hl=e=>`- ${e}`,ql=e=>zs.isFunction(e)||null===e||!1===e;var Gl=e=>{e=zs.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){let t;if(n=e[i],r=n,!ql(n)&&(r=Kl[(t=String(n)).toLowerCase()],void 0===r))throw new Bs(`Unknown adapter '${t}'`);if(r)break;o[t||"#"+i]=r}if(!r){const e=Object.entries(o).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new Bs("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Hl).join("\n"):" "+Hl(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Yl(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new yl(null,e)}function Xl(e){Yl(e),e.headers=ml.from(e.headers),e.data=gl.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Gl(e.adapter||ul.adapter)(e).then(function(t){return Yl(e),t.data=gl.call(e,e.transformResponse,t),t.headers=ml.from(t.headers),t},function(t){return vl(t)||(Yl(e),t&&t.response&&(t.response.data=gl.call(e,e.transformResponse,t.response),t.response.headers=ml.from(t.response.headers))),Promise.reject(t)})}const Ql="1.10.0",Jl={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Jl[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Zl={};Jl.transitional=function(e,t,n){function r(e,t){return"[Axios v"+Ql+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new Bs(r(o," has been removed"+(t?" in "+t:"")),Bs.ERR_DEPRECATED);return t&&!Zl[o]&&(Zl[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}},Jl.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var eu={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Bs("options must be an object",Bs.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const t=e[i],n=void 0===t||a(t,i,e);if(!0!==n)throw new Bs("option "+i+" must be "+n,Bs.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new Bs("Unknown option "+i,Bs.ERR_BAD_OPTION)}},validators:Jl};const tu=eu.validators;let nu=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Zs,response:new Zs}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=_l(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&eu.assertOptions(n,{silentJSONParsing:tu.transitional(tu.boolean),forcedJSONParsing:tu.transitional(tu.boolean),clarifyTimeoutError:tu.transitional(tu.boolean)},!1),null!=r&&(zs.isFunction(r)?t.paramsSerializer={serialize:r}:eu.assertOptions(r,{encode:tu.function,serialize:tu.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),eu.assertOptions(t,{baseUrl:tu.spelling("baseURL"),withXsrfToken:tu.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&zs.merge(o.common,o[t.method]);o&&zs.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=ml.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))});const l=[];let u;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let c,d=0;if(!s){const e=[Xl.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,l),c=e.length,u=Promise.resolve(t);d<c;)u=u.then(e[d++],e[d++]);return u}c=a.length;let p=t;for(d=0;d<c;){const e=a[d++],t=a[d++];try{p=e(p)}catch(e){t.call(this,e);break}}try{u=Xl.call(this,p)}catch(e){return Promise.reject(e)}for(d=0,c=l.length;d<c;)u=u.then(l[d++],l[d++]);return u}getUri(e){return Js(Cl((e=_l(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};zs.forEach(["delete","get","head","options"],function(e){nu.prototype[e]=function(t,n){return this.request(_l(n||{},{method:e,url:t,data:(n||{}).data}))}}),zs.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,o){return this.request(_l(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}nu.prototype[e]=t(),nu.prototype[e+"Form"]=t(!0)});const ru={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ru).forEach(([e,t])=>{ru[t]=e});const ou=function e(t){const n=new nu(t),r=Za(nu.prototype.request,n);return zs.extend(r,nu.prototype,n,{allOwnKeys:!0}),zs.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(_l(t,n))},r}(ul);ou.Axios=nu,ou.CanceledError=yl,ou.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,o){n.reason||(n.reason=new yl(e,r,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}},ou.isCancel=vl,ou.VERSION=Ql,ou.toFormData=qs,ou.AxiosError=Bs,ou.Cancel=ou.CanceledError,ou.all=function(e){return Promise.all(e)},ou.spread=function(e){return function(t){return e.apply(null,t)}},ou.isAxiosError=function(e){return zs.isObject(e)&&!0===e.isAxiosError},ou.mergeConfig=_l,ou.AxiosHeaders=ml,ou.formToJSON=e=>ll(zs.isHTMLForm(e)?new FormData(e):e),ou.getAdapter=Gl,ou.HttpStatusCode=ru,ou.default=ou;const{Axios:iu,AxiosError:au,CanceledError:su,isCancel:lu,CancelToken:uu,VERSION:cu,all:du,Cancel:pu,isAxiosError:fu,spread:hu,toFormData:mu,AxiosHeaders:gu,HttpStatusCode:vu,formToJSON:yu,getAdapter:bu,mergeConfig:wu}=ou,xu="https://report-api.netcapital.pro",ku=ou.create({baseURL:xu,headers:{"Content-Type":"application/json"}}),Su={},Eu=()=>{const e=Object.keys(Su);return e.length>0?e[0]:null},Cu={setBaseUrl(e){ku.defaults.baseURL=e||xu},setToken(e){e&&(ku.defaults.headers.common.Authorization=`Bearer ${e}`)},loadDashboardMeta:async({dashboardId:e})=>{const{data:t}=await ku.get(`/dashboard-meta/${e}`);return Su[e]={dashboards:t.dashboards||{},charts:t.charts||{},reports:t.reports||{},reportMetadata:t.reportMetadata||{},dateRanges:t.dateRanges||[]},Su[e]},getDashboard:async({id:e,dashboardId:t})=>{const n=t||Eu();if(n&&Su[n]?.dashboards?.[e])return Su[n].dashboards[e];const{data:r}=await ku.get(`/entity/dashboards/${e}`);return r},getChart:async({id:e,dashboardId:t})=>{const n=t||Eu();if(n&&Su[n]?.charts?.[e])return Su[n].charts[e];const{data:r}=await ku.get(`/entity/charts/${e}`);return r},getReport:async({id:e,dashboardId:t})=>{const n=t||Eu();if(n&&Su[n]?.reports?.[e])return Su[n].reports[e];const{data:r}=await ku.get(`/entity/reports/${e}`);return r},getProviders:async()=>{const{data:e}=await ku.get("/entity/providers");return e},getReportSchema:async({id:e,dashboardId:t,query:n={}})=>{const r=t||Eu();if(r&&Su[r]?.reportMetadata?.[e])return Su[r].reportMetadata[e];const{data:o}=await ku.post(`/reports/${e}/metadata`,n);return o},runReport:async({id:e,query:t={}})=>{const{data:n}=await ku.post(`/reports/${e}/run`,t);return n},runAdHocReport:async({report:e})=>{const{data:t}=await ku.post("/report-build/run",e);return t},downloadAdHocReport:async({report:e,filename:t})=>{const n=await ku.post("/report-build/run?download=csv",e,{responseType:"blob"}),r=window.URL.createObjectURL(new Blob([n.data])),o=document.createElement("a");o.href=r;let i=t||"report.csv";if(!t){const e=n.headers["content-disposition"];if(e){const t=e.match(/filename="?(.+)"?/i);t&&t[1]&&(i=t[1])}}o.setAttribute("download",i),document.body.appendChild(o),o.click(),o.remove(),window.URL.revokeObjectURL(r)},getDateRanges:async({dashboardId:e}={})=>{const t=e||Eu();if(t&&Su[t]?.dateRanges)return Su[t].dateRanges;const{data:n}=await ku.get("/globals/date-ranges");return n},getReportDefinitions:async()=>{const{data:e}=await ku.get("/report-definitions");return e},getReportDefinition:async({id:e})=>{const{data:t}=await ku.get(`/report-definitions/${e}`);return t},createReportDefinition:async({reportDefinition:e})=>{const{data:t}=await ku.post("/report-definitions",e);return t},updateReportDefinition:async({id:e,reportDefinition:t})=>{const{data:n}=await ku.put(`/report-definitions/${e}`,t);return n},deleteReportDefinition:async({id:e})=>{const{data:t}=await ku.delete(`/report-definitions/${e}`);return t}},Ou=Dr(e=>({headerRow:{fontFamily:e.typography.fontFamily,fontSize:e.typography.fontSize},tableRow:{fontFamily:e.typography.fontFamily,fontSize:e.typography.fontSize},oddTableRow:{fontFamily:e.typography.fontFamily,fontSize:e.typography.fontSize},headerCell:{backgroundColor:"white",padding:"4px !important"}})),_u={none:"YYYY-MM-dd",day:"MMM dd",week:"MMM dd",month:"YYYY MMM",year:"YYYY"};function Tu(){throw new Error("setTimeout has not been defined")}function Ru(){throw new Error("clearTimeout has not been defined")}var Pu=Tu,Au=Ru;function Lu(e){if(Pu===setTimeout)return setTimeout(e,0);if((Pu===Tu||!Pu)&&setTimeout)return Pu=setTimeout,setTimeout(e,0);try{return Pu(e,0)}catch(t){try{return Pu.call(null,e,0)}catch(t){return Pu.call(this,e,0)}}}"function"==typeof wa.setTimeout&&(Pu=setTimeout),"function"==typeof wa.clearTimeout&&(Au=clearTimeout);var Nu,Mu=[],Iu=!1,Fu=-1;function $u(){Iu&&Nu&&(Iu=!1,Nu.length?Mu=Nu.concat(Mu):Fu=-1,Mu.length&&ju())}function ju(){if(!Iu){var e=Lu($u);Iu=!0;for(var t=Mu.length;t;){for(Nu=Mu,Mu=[];++Fu<t;)Nu&&Nu[Fu].run();Fu=-1,t=Mu.length}Nu=null,Iu=!1,function(e){if(Au===clearTimeout)return clearTimeout(e);if((Au===Ru||!Au)&&clearTimeout)return Au=clearTimeout,clearTimeout(e);try{return Au(e)}catch(t){try{return Au.call(null,e)}catch(t){return Au.call(this,e)}}}(e)}}function zu(e,t){this.fun=e,this.array=t}zu.prototype.run=function(){this.fun.apply(null,this.array)};function Bu(){}var Du=Bu,Wu=Bu,Uu=Bu,Vu=Bu,Ku=Bu,Hu=Bu,qu=Bu;var Gu=wa.performance||{},Yu=Gu.now||Gu.mozNow||Gu.msNow||Gu.oNow||Gu.webkitNow||function(){return(new Date).getTime()};var Xu=new Date;var Qu,Ju={nextTick:function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];Mu.push(new zu(e,t)),1!==Mu.length||Iu||Lu(ju)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Du,addListener:Wu,once:Uu,off:Vu,removeListener:Ku,removeAllListeners:Hu,emit:qu,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*Yu.call(Gu),n=Math.floor(t),r=Math.floor(t%1*1e9);return e&&(n-=e[0],(r-=e[1])<0&&(n--,r+=1e9)),[n,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-Xu)/1e3}},Zu={exports:{}};var ec=(Qu||(Qu=1,function(e){var t;"undefined"!=typeof self&&self,t=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=11)}([function(e,t,n){var r=Array.prototype,o=Object.prototype,i={"&":"&",'"':""","'":"'","<":"<",">":">","\\":"\"},a=/[&"'<>\\]/g;function s(e,t){return o.hasOwnProperty.call(e,t)}function l(e){return i[e]}function u(e,t,n){var r,o,i;if(e instanceof Error&&(e=(o=e).name+": "+o.message),Object.setPrototypeOf?(r=new Error(e),Object.setPrototypeOf(r,u.prototype)):(r=this,Object.defineProperty(r,"message",{enumerable:!1,writable:!0,value:e})),Object.defineProperty(r,"name",{value:"Template render error"}),Error.captureStackTrace&&Error.captureStackTrace(r,this.constructor),o){var a=Object.getOwnPropertyDescriptor(o,"stack");(i=a&&(a.get||function(){return a.value}))||(i=function(){return o.stack})}else{var s=new Error(e).stack;i=function(){return s}}return Object.defineProperty(r,"stack",{get:function(){return i.call(r)}}),Object.defineProperty(r,"cause",{value:o}),r.lineno=t,r.colno=n,r.firstUpdate=!0,r.Update=function(e){var t="("+(e||"unknown path")+")";return this.firstUpdate&&(this.lineno&&this.colno?t+=" [Line "+this.lineno+", Column "+this.colno+"]":this.lineno&&(t+=" [Line "+this.lineno+"]")),t+="\n ",this.firstUpdate&&(t+=" "),this.message=t+(this.message||""),this.firstUpdate=!1,this},r}function c(e){return"[object Function]"===o.toString.call(e)}function d(e){return"[object Array]"===o.toString.call(e)}function p(e){return"[object String]"===o.toString.call(e)}function f(e){return"[object Object]"===o.toString.call(e)}function h(e){var t,n=(t=e)?"string"==typeof t?t.split("."):[t]:[];return function(e){for(var t=e,r=0;r<n.length;r++){var o=n[r];if(!s(t,o))return;t=t[o]}return t}}function m(e){return Array.prototype.slice.call(e)}function g(e,t,n){return Array.prototype.indexOf.call(e||[],t,n)}function v(e){var t=[];for(var n in e)s(e,n)&&t.push(n);return t}(t=e.exports={}).hasOwnProp=s,t._prettifyError=function(e,n,r){if(r.Update||(r=new t.TemplateError(r)),r.Update(e),!n){var o=r;(r=new Error(o.message)).name=o.name}return r},Object.setPrototypeOf?Object.setPrototypeOf(u.prototype,Error.prototype):u.prototype=Object.create(Error.prototype,{constructor:{value:u}}),t.TemplateError=u,t.escape=function(e){return e.replace(a,l)},t.isFunction=c,t.isArray=d,t.isString=p,t.isObject=f,t.getAttrGetter=h,t.groupBy=function(e,t,n){for(var r={},o=c(t)?t:h(t),i=0;i<e.length;i++){var a=e[i],s=o(a,i);if(void 0===s&&!0===n)throw new TypeError('groupby: attribute "'+t+'" resolved to undefined');(r[s]||(r[s]=[])).push(a)}return r},t.toArray=m,t.without=function(e){var t=[];if(!e)return t;for(var n=e.length,r=m(arguments).slice(1),o=-1;++o<n;)-1===g(r,e[o])&&t.push(e[o]);return t},t.repeat=function(e,t){for(var n="",r=0;r<t;r++)n+=e;return n},t.each=function(e,t,n){if(null!=e)if(r.forEach&&e.forEach===r.forEach)e.forEach(t,n);else if(e.length===+e.length)for(var o=0,i=e.length;o<i;o++)t.call(n,e[o],o,e)},t.map=function(e,t){var n=[];if(null==e)return n;if(r.map&&e.map===r.map)return e.map(t);for(var o=0;o<e.length;o++)n[n.length]=t(e[o],o);return e.length===+e.length&&(n.length=e.length),n},t.asyncIter=function(e,t,n){var r=-1;!function o(){++r<e.length?t(e[r],r,o,n):n()}()},t.asyncFor=function(e,t,n){var r=v(e||{}),o=r.length,i=-1;!function a(){i++;var s=r[i];i<o?t(s,e[s],i,o,a):n()}()},t.indexOf=g,t.keys=v,t._entries=function(e){return v(e).map(function(t){return[t,e[t]]})},t._values=function(e){return v(e).map(function(t){return e[t]})},t._assign=t.extend=function(e,t){return e=e||{},v(t).forEach(function(n){e[n]=t[n]}),e},t.inOperator=function(e,t){if(d(t)||p(t))return-1!==t.indexOf(e);if(f(t))return e in t;throw new Error('Cannot use "in" operator to search for "'+e+'" in unexpected types.')}},function(e,t,n){function r(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,a(e,t)}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}var s=n(16),l=n(0);function u(e,t,n){n=n||{},l.keys(n).forEach(function(t){var r,o;n[t]=(r=e.prototype[t],o=n[t],"function"!=typeof r||"function"!=typeof o?o:function(){var e=this.parent;this.parent=r;var t=o.apply(this,arguments);return this.parent=e,t})});var o=function(e){function n(){return e.apply(this,arguments)||this}return i(n,e),r(n,[{key:"typename",get:function(){return t}}]),n}(e);return l._assign(o.prototype,n),o}var c=function(){function e(){this.init.apply(this,arguments)}return e.prototype.init=function(){},e.extend=function(e,t){return"object"==typeof e&&(t=e,e="anonymous"),u(this,e,t)},r(e,[{key:"typename",get:function(){return this.constructor.name}}]),e}(),d=function(e){function t(){var t,n;return(t=n=e.call(this)||this).init.apply(t,arguments),n}return i(t,e),t.prototype.init=function(){},t.extend=function(e,t){return"object"==typeof e&&(t=e,e="anonymous"),u(this,e,t)},r(t,[{key:"typename",get:function(){return this.constructor.name}}]),t}(s);e.exports={Obj:c,EmitterObj:d}},function(e,t,n){var r=n(0),o=Array.from,i="function"==typeof Symbol&&Symbol.iterator&&"function"==typeof o,a=function(){function e(e,t){this.variables=Object.create(null),this.parent=e,this.topLevel=!1,this.isolateWrites=t}var t=e.prototype;return t.set=function(e,t,n){var r=e.split("."),o=this.variables,i=this;if(n&&(i=this.resolve(r[0],!0)))i.set(e,t);else{for(var a=0;a<r.length-1;a++){var s=r[a];o[s]||(o[s]={}),o=o[s]}o[r[r.length-1]]=t}},t.get=function(e){var t=this.variables[e];return void 0!==t?t:null},t.lookup=function(e){var t=this.parent,n=this.variables[e];return void 0!==n?n:t&&t.lookup(e)},t.resolve=function(e,t){var n=t&&this.isolateWrites?void 0:this.parent;return void 0!==this.variables[e]?this:n&&n.resolve(e)},t.push=function(t){return new e(this,t)},t.pop=function(){return this.parent},e}();function s(e){return e&&Object.prototype.hasOwnProperty.call(e,"__keywords")}function l(e){var t=e.length;return 0===t?0:s(e[t-1])?t-1:t}function u(e){if("string"!=typeof e)return e;this.val=e,this.length=e.length}u.prototype=Object.create(String.prototype,{length:{writable:!0,configurable:!0,value:0}}),u.prototype.valueOf=function(){return this.val},u.prototype.toString=function(){return this.val},e.exports={Frame:a,makeMacro:function(e,t,n){return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];var a,u=l(o),c=function(e){var t=e.length;if(t){var n=e[t-1];if(s(n))return n}return{}}(o);if(u>e.length)a=o.slice(0,e.length),o.slice(a.length,u).forEach(function(e,n){n<t.length&&(c[t[n]]=e)}),a.push(c);else if(u<e.length){a=o.slice(0,u);for(var d=u;d<e.length;d++){var p=e[d];a.push(c[p]),delete c[p]}a.push(c)}else a=o;return n.apply(this,a)}},makeKeywordArgs:function(e){return e.__keywords=!0,e},numArgs:l,suppressValue:function(e,t){return e=null!=e?e:"",!t||e instanceof u||(e=r.escape(e.toString())),e},ensureDefined:function(e,t,n){if(null==e)throw new r.TemplateError("attempted to output null or undefined value",t+1,n+1);return e},memberLookup:function(e,t){if(null!=e)return"function"==typeof e[t]?function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e[t].apply(e,r)}:e[t]},contextOrFrameLookup:function(e,t,n){var r=t.lookup(n);return void 0!==r?r:e.lookup(n)},callWrap:function(e,t,n,r){if(!e)throw new Error("Unable to call `"+t+"`, which is undefined or falsey");if("function"!=typeof e)throw new Error("Unable to call `"+t+"`, which is not a function");return e.apply(n,r)},handleError:function(e,t,n){return e.lineno?e:new r.TemplateError(e,t,n)},isArray:r.isArray,keys:r.keys,SafeString:u,copySafeness:function(e,t){return e instanceof u?new u(t):t.toString()},markSafe:function(e){var t=typeof e;return"string"===t?new u(e):"function"!==t?e:function(t){var n=e.apply(this,arguments);return"string"==typeof n?new u(n):n}},asyncEach:function(e,t,n,o){if(r.isArray(e)){var i=e.length;r.asyncIter(e,function(e,r,o){switch(t){case 1:n(e,r,i,o);break;case 2:n(e[0],e[1],r,i,o);break;case 3:n(e[0],e[1],e[2],r,i,o);break;default:e.push(r,i,o),n.apply(this,e)}},o)}else r.asyncFor(e,function(e,t,r,o,i){n(e,t,r,o,i)},o)},asyncAll:function(e,t,n,o){var i,a,s=0;function l(e,t){s++,a[e]=t,s===i&&o(null,a.join(""))}if(r.isArray(e))if(i=e.length,a=new Array(i),0===i)o(null,"");else for(var u=0;u<e.length;u++){var c=e[u];switch(t){case 1:n(c,u,i,l);break;case 2:n(c[0],c[1],u,i,l);break;case 3:n(c[0],c[1],c[2],u,i,l);break;default:c.push(u,i,l),n.apply(this,c)}}else{var d=r.keys(e||{});if(i=d.length,a=new Array(i),0===i)o(null,"");else for(var p=0;p<d.length;p++){var f=d[p];n(f,e[f],p,i,l)}}},inOperator:r.inOperator,fromIterator:function(e){return"object"!=typeof e||null===e||r.isArray(e)?e:i&&Symbol.iterator in e?o(e):e}}},function(e,t,n){function r(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,a(e,t)}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}function s(e,t,n){e instanceof t&&n.push(e),e instanceof l&&e.findAll(t,n)}var l=function(e){function t(){return e.apply(this,arguments)||this}i(t,e);var n=t.prototype;return n.init=function(e,t){for(var n=arguments,r=this,o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];this.lineno=e,this.colno=t,this.fields.forEach(function(e,t){var o=n[t+2];void 0===o&&(o=null),r[e]=o})},n.findAll=function(e,t){var n=this;return t=t||[],this instanceof c?this.children.forEach(function(n){return s(n,e,t)}):this.fields.forEach(function(r){return s(n[r],e,t)}),t},n.iterFields=function(e){var t=this;this.fields.forEach(function(n){e(t[n],n)})},t}(n(1).Obj),u=function(e){function t(){return e.apply(this,arguments)||this}return i(t,e),r(t,[{key:"typename",get:function(){return"Value"}},{key:"fields",get:function(){return["value"]}}]),t}(l),c=function(e){function t(){return e.apply(this,arguments)||this}i(t,e);var n=t.prototype;return n.init=function(t,n,r){e.prototype.init.call(this,t,n,r||[])},n.addChild=function(e){this.children.push(e)},r(t,[{key:"typename",get:function(){return"NodeList"}},{key:"fields",get:function(){return["children"]}}]),t}(l),d=c.extend("Root"),p=u.extend("Literal"),f=u.extend("Symbol"),h=c.extend("Group"),m=c.extend("Array"),g=l.extend("Pair",{fields:["key","value"]}),v=c.extend("Dict"),y=l.extend("LookupVal",{fields:["target","val"]}),b=l.extend("If",{fields:["cond","body","else_"]}),w=b.extend("IfAsync"),x=l.extend("InlineIf",{fields:["cond","body","else_"]}),k=l.extend("For",{fields:["arr","name","body","else_"]}),S=k.extend("AsyncEach"),E=k.extend("AsyncAll"),C=l.extend("Macro",{fields:["name","args","body"]}),O=C.extend("Caller"),_=l.extend("Import",{fields:["template","target","withContext"]}),T=function(e){function t(){return e.apply(this,arguments)||this}return i(t,e),t.prototype.init=function(t,n,r,o,i){e.prototype.init.call(this,t,n,r,o||new c,i)},r(t,[{key:"typename",get:function(){return"FromImport"}},{key:"fields",get:function(){return["template","names","withContext"]}}]),t}(l),R=l.extend("FunCall",{fields:["name","args"]}),P=R.extend("Filter"),A=P.extend("FilterAsync",{fields:["name","args","symbol"]}),L=v.extend("KeywordArgs"),N=l.extend("Block",{fields:["name","body"]}),M=l.extend("Super",{fields:["blockName","symbol"]}),I=l.extend("TemplateRef",{fields:["template"]}).extend("Extends"),F=l.extend("Include",{fields:["template","ignoreMissing"]}),$=l.extend("Set",{fields:["targets","value"]}),j=l.extend("Switch",{fields:["expr","cases","default"]}),z=l.extend("Case",{fields:["cond","body"]}),B=c.extend("Output"),D=l.extend("Capture",{fields:["body"]}),W=p.extend("TemplateData"),U=l.extend("UnaryOp",{fields:["target"]}),V=l.extend("BinOp",{fields:["left","right"]}),K=V.extend("In"),H=V.extend("Is"),q=V.extend("Or"),G=V.extend("And"),Y=U.extend("Not"),X=V.extend("Add"),Q=V.extend("Concat"),J=V.extend("Sub"),Z=V.extend("Mul"),ee=V.extend("Div"),te=V.extend("FloorDiv"),ne=V.extend("Mod"),re=V.extend("Pow"),oe=U.extend("Neg"),ie=U.extend("Pos"),ae=l.extend("Compare",{fields:["expr","ops"]}),se=l.extend("CompareOperand",{fields:["expr","type"]}),le=l.extend("CallExtension",{init:function(e,t,n,r){this.parent(),this.extName=e.__name||e,this.prop=t,this.args=n||new c,this.contentArgs=r||[],this.autoescape=e.autoescape},fields:["extName","prop","args","contentArgs"]}),ue=le.extend("CallExtensionAsync");function ce(e,t,n){var r=e.split("\n");r.forEach(function(e,o){e&&(n&&o>0||!n)&&Ju.stdout.write(" ".repeat(t));var i=o===r.length-1?"":"\n";Ju.stdout.write(""+e+i)})}e.exports={Node:l,Root:d,NodeList:c,Value:u,Literal:p,Symbol:f,Group:h,Array:m,Pair:g,Dict:v,Output:B,Capture:D,TemplateData:W,If:b,IfAsync:w,InlineIf:x,For:k,AsyncEach:S,AsyncAll:E,Macro:C,Caller:O,Import:_,FromImport:T,FunCall:R,Filter:P,FilterAsync:A,KeywordArgs:L,Block:N,Super:M,Extends:I,Include:F,Set:$,Switch:j,Case:z,LookupVal:y,BinOp:V,In:K,Is:H,Or:q,And:G,Not:Y,Add:X,Concat:Q,Sub:J,Mul:Z,Div:ee,FloorDiv:te,Mod:ne,Pow:re,Neg:oe,Pos:ie,Compare:ae,CompareOperand:se,CallExtension:le,CallExtensionAsync:ue,printNodes:function e(t,n){if(n=n||0,ce(t.typename+": ",n),t instanceof c)ce("\n"),t.children.forEach(function(t){e(t,n+2)});else if(t instanceof le)ce(t.extName+"."+t.prop+"\n"),t.args&&e(t.args,n+2),t.contentArgs&&t.contentArgs.forEach(function(t){e(t,n+2)});else{var r=[],o=null;t.iterFields(function(e,t){e instanceof l?r.push([t,e]):(o=o||{})[t]=e}),o?ce(JSON.stringify(o,null,2)+"\n",null,!0):ce("\n"),r.forEach(function(t){var r=t[0],o=t[1];ce("["+r+"] =>",n+2),e(o,n+4)})}}}},function(e,t){},function(e,t,n){function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}var o=n(8),i=n(17),a=n(3),s=n(0).TemplateError,l=n(2).Frame,u=n(1).Obj,c={"==":"==","===":"===","!=":"!=","!==":"!==","<":"<",">":">","<=":"<=",">=":">="},d=function(e){var t,n;function o(){return e.apply(this,arguments)||this}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n);var i=o.prototype;return i.init=function(e,t){this.templateName=e,this.codebuf=[],this.lastId=0,this.buffer=null,this.bufferStack=[],this._scopeClosers="",this.inBlock=!1,this.throwOnUndefined=t},i.fail=function(e,t,n){throw void 0!==t&&(t+=1),void 0!==n&&(n+=1),new s(e,t,n)},i._pushBuffer=function(){var e=this._tmpid();return this.bufferStack.push(this.buffer),this.buffer=e,this._emit("var "+this.buffer+' = "";'),e},i._popBuffer=function(){this.buffer=this.bufferStack.pop()},i._emit=function(e){this.codebuf.push(e)},i._emitLine=function(e){this._emit(e+"\n")},i._emitLines=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach(function(t){return e._emitLine(t)})},i._emitFuncBegin=function(e,t){this.buffer="output",this._scopeClosers="",this._emitLine("function "+t+"(env, context, frame, runtime, cb) {"),this._emitLine("var lineno = "+e.lineno+";"),this._emitLine("var colno = "+e.colno+";"),this._emitLine("var "+this.buffer+' = "";'),this._emitLine("try {")},i._emitFuncEnd=function(e){e||this._emitLine("cb(null, "+this.buffer+");"),this._closeScopeLevels(),this._emitLine("} catch (e) {"),this._emitLine(" cb(runtime.handleError(e, lineno, colno));"),this._emitLine("}"),this._emitLine("}"),this.buffer=null},i._addScopeLevel=function(){this._scopeClosers+="})"},i._closeScopeLevels=function(){this._emitLine(this._scopeClosers+";"),this._scopeClosers=""},i._withScopedSyntax=function(e){var t=this._scopeClosers;this._scopeClosers="",e.call(this),this._closeScopeLevels(),this._scopeClosers=t},i._makeCallback=function(e){var t=this._tmpid();return"function("+t+(e?","+e:"")+") {\nif("+t+") { cb("+t+"); return; }"},i._tmpid=function(){return this.lastId++,"t_"+this.lastId},i._templateName=function(){return null==this.templateName?"undefined":JSON.stringify(this.templateName)},i._compileChildren=function(e,t){var n=this;e.children.forEach(function(e){n.compile(e,t)})},i._compileAggregate=function(e,t,n,r){var o=this;n&&this._emit(n),e.children.forEach(function(e,n){n>0&&o._emit(","),o.compile(e,t)}),r&&this._emit(r)},i._compileExpression=function(e,t){this.assertType(e,a.Literal,a.Symbol,a.Group,a.Array,a.Dict,a.FunCall,a.Caller,a.Filter,a.LookupVal,a.Compare,a.InlineIf,a.In,a.Is,a.And,a.Or,a.Not,a.Add,a.Concat,a.Sub,a.Mul,a.Div,a.FloorDiv,a.Mod,a.Pow,a.Neg,a.Pos,a.Compare,a.NodeList),this.compile(e,t)},i.assertType=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];n.some(function(t){return e instanceof t})||this.fail("assertType: invalid type: "+e.typename,e.lineno,e.colno)},i.compileCallExtension=function(e,t,n){var r=this,o=e.args,i=e.contentArgs,s="boolean"!=typeof e.autoescape||e.autoescape;if(n||this._emit(this.buffer+" += runtime.suppressValue("),this._emit('env.getExtension("'+e.extName+'")["'+e.prop+'"]('),this._emit("context"),(o||i)&&this._emit(","),o&&(o instanceof a.NodeList||this.fail("compileCallExtension: arguments must be a NodeList, use `parser.parseSignature`"),o.children.forEach(function(e,n){r._compileExpression(e,t),(n!==o.children.length-1||i.length)&&r._emit(",")})),i.length&&i.forEach(function(e,n){if(n>0&&r._emit(","),e){r._emitLine("function(cb) {"),r._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}");var o=r._pushBuffer();r._withScopedSyntax(function(){r.compile(e,t),r._emitLine("cb(null, "+o+");")}),r._popBuffer(),r._emitLine("return "+o+";"),r._emitLine("}")}else r._emit("null")}),n){var l=this._tmpid();this._emitLine(", "+this._makeCallback(l)),this._emitLine(this.buffer+" += runtime.suppressValue("+l+", "+s+" && env.opts.autoescape);"),this._addScopeLevel()}else this._emit(")"),this._emit(", "+s+" && env.opts.autoescape);\n")},i.compileCallExtensionAsync=function(e,t){this.compileCallExtension(e,t,!0)},i.compileNodeList=function(e,t){this._compileChildren(e,t)},i.compileLiteral=function(e){if("string"==typeof e.value){var t=e.value.replace(/\\/g,"\\\\");t=(t=(t=(t=(t=t.replace(/"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t")).replace(/\u2028/g,"\\u2028"),this._emit('"'+t+'"')}else null===e.value?this._emit("null"):this._emit(e.value.toString())},i.compileSymbol=function(e,t){var n=e.value,r=t.lookup(n);r?this._emit(r):this._emit('runtime.contextOrFrameLookup(context, frame, "'+n+'")')},i.compileGroup=function(e,t){this._compileAggregate(e,t,"(",")")},i.compileArray=function(e,t){this._compileAggregate(e,t,"[","]")},i.compileDict=function(e,t){this._compileAggregate(e,t,"{","}")},i.compilePair=function(e,t){var n=e.key,r=e.value;n instanceof a.Symbol?n=new a.Literal(n.lineno,n.colno,n.value):n instanceof a.Literal&&"string"==typeof n.value||this.fail("compilePair: Dict keys must be strings or names",n.lineno,n.colno),this.compile(n,t),this._emit(": "),this._compileExpression(r,t)},i.compileInlineIf=function(e,t){this._emit("("),this.compile(e.cond,t),this._emit("?"),this.compile(e.body,t),this._emit(":"),null!==e.else_?this.compile(e.else_,t):this._emit('""'),this._emit(")")},i.compileIn=function(e,t){this._emit("runtime.inOperator("),this.compile(e.left,t),this._emit(","),this.compile(e.right,t),this._emit(")")},i.compileIs=function(e,t){var n=e.right.name?e.right.name.value:e.right.value;this._emit('env.getTest("'+n+'").call(context, '),this.compile(e.left,t),e.right.args&&(this._emit(","),this.compile(e.right.args,t)),this._emit(") === true")},i._binOpEmitter=function(e,t,n){this.compile(e.left,t),this._emit(n),this.compile(e.right,t)},i.compileOr=function(e,t){return this._binOpEmitter(e,t," || ")},i.compileAnd=function(e,t){return this._binOpEmitter(e,t," && ")},i.compileAdd=function(e,t){return this._binOpEmitter(e,t," + ")},i.compileConcat=function(e,t){return this._binOpEmitter(e,t,' + "" + ')},i.compileSub=function(e,t){return this._binOpEmitter(e,t," - ")},i.compileMul=function(e,t){return this._binOpEmitter(e,t," * ")},i.compileDiv=function(e,t){return this._binOpEmitter(e,t," / ")},i.compileMod=function(e,t){return this._binOpEmitter(e,t," % ")},i.compileNot=function(e,t){this._emit("!"),this.compile(e.target,t)},i.compileFloorDiv=function(e,t){this._emit("Math.floor("),this.compile(e.left,t),this._emit(" / "),this.compile(e.right,t),this._emit(")")},i.compilePow=function(e,t){this._emit("Math.pow("),this.compile(e.left,t),this._emit(", "),this.compile(e.right,t),this._emit(")")},i.compileNeg=function(e,t){this._emit("-"),this.compile(e.target,t)},i.compilePos=function(e,t){this._emit("+"),this.compile(e.target,t)},i.compileCompare=function(e,t){var n=this;this.compile(e.expr,t),e.ops.forEach(function(e){n._emit(" "+c[e.type]+" "),n.compile(e.expr,t)})},i.compileLookupVal=function(e,t){this._emit("runtime.memberLookup(("),this._compileExpression(e.target,t),this._emit("),"),this._compileExpression(e.val,t),this._emit(")")},i._getNodeName=function(e){switch(e.typename){case"Symbol":return e.value;case"FunCall":return"the return value of ("+this._getNodeName(e.name)+")";case"LookupVal":return this._getNodeName(e.target)+'["'+this._getNodeName(e.val)+'"]';case"Literal":return e.value.toString();default:return"--expression--"}},i.compileFunCall=function(e,t){this._emit("(lineno = "+e.lineno+", colno = "+e.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(e.name,t),this._emit(', "'+this._getNodeName(e.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(e.args,t,"[","])"),this._emit(")")},i.compileFilter=function(e,t){var n=e.name;this.assertType(n,a.Symbol),this._emit('env.getFilter("'+n.value+'").call(context, '),this._compileAggregate(e.args,t),this._emit(")")},i.compileFilterAsync=function(e,t){var n=e.name,r=e.symbol.value;this.assertType(n,a.Symbol),t.set(r,r),this._emit('env.getFilter("'+n.value+'").call(context, '),this._compileAggregate(e.args,t),this._emitLine(", "+this._makeCallback(r)),this._addScopeLevel()},i.compileKeywordArgs=function(e,t){this._emit("runtime.makeKeywordArgs("),this.compileDict(e,t),this._emit(")")},i.compileSet=function(e,t){var n=this,r=[];e.targets.forEach(function(e){var o=e.value,i=t.lookup(o);null==i&&(i=n._tmpid(),n._emitLine("var "+i+";")),r.push(i)}),e.value?(this._emit(r.join(" = ")+" = "),this._compileExpression(e.value,t),this._emitLine(";")):(this._emit(r.join(" = ")+" = "),this.compile(e.body,t),this._emitLine(";")),e.targets.forEach(function(e,t){var o=r[t],i=e.value;n._emitLine('frame.set("'+i+'", '+o+", true);"),n._emitLine("if(frame.topLevel) {"),n._emitLine('context.setVariable("'+i+'", '+o+");"),n._emitLine("}"),"_"!==i.charAt(0)&&(n._emitLine("if(frame.topLevel) {"),n._emitLine('context.addExport("'+i+'", '+o+");"),n._emitLine("}"))})},i.compileSwitch=function(e,t){var n=this;this._emit("switch ("),this.compile(e.expr,t),this._emit(") {"),e.cases.forEach(function(e,r){n._emit("case "),n.compile(e.cond,t),n._emit(": "),n.compile(e.body,t),e.body.children.length&&n._emitLine("break;")}),e.default&&(this._emit("default:"),this.compile(e.default,t)),this._emit("}")},i.compileIf=function(e,t,n){var r=this;this._emit("if("),this._compileExpression(e.cond,t),this._emitLine(") {"),this._withScopedSyntax(function(){r.compile(e.body,t),n&&r._emit("cb()")}),e.else_?(this._emitLine("}\nelse {"),this._withScopedSyntax(function(){r.compile(e.else_,t),n&&r._emit("cb()")})):n&&(this._emitLine("}\nelse {"),this._emit("cb()")),this._emitLine("}")},i.compileIfAsync=function(e,t){this._emit("(function(cb) {"),this.compileIf(e,t,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},i._emitLoopBindings=function(e,t,n,r){var o=this;[{name:"index",val:n+" + 1"},{name:"index0",val:n},{name:"revindex",val:r+" - "+n},{name:"revindex0",val:r+" - "+n+" - 1"},{name:"first",val:n+" === 0"},{name:"last",val:n+" === "+r+" - 1"},{name:"length",val:r}].forEach(function(e){o._emitLine('frame.set("loop.'+e.name+'", '+e.val+");")})},i.compileFor=function(e,t){var n=this,r=this._tmpid(),o=this._tmpid(),i=this._tmpid();if(t=t.push(),this._emitLine("frame = frame.push();"),this._emit("var "+i+" = "),this._compileExpression(e.arr,t),this._emitLine(";"),this._emit("if("+i+") {"),this._emitLine(i+" = runtime.fromIterator("+i+");"),e.name instanceof a.Array){this._emitLine("var "+r+";"),this._emitLine("if(runtime.isArray("+i+")) {"),this._emitLine("var "+o+" = "+i+".length;"),this._emitLine("for("+r+"=0; "+r+" < "+i+".length; "+r+"++) {"),e.name.children.forEach(function(o,a){var s=n._tmpid();n._emitLine("var "+s+" = "+i+"["+r+"]["+a+"];"),n._emitLine('frame.set("'+o+'", '+i+"["+r+"]["+a+"]);"),t.set(e.name.children[a].value,s)}),this._emitLoopBindings(e,i,r,o),this._withScopedSyntax(function(){n.compile(e.body,t)}),this._emitLine("}"),this._emitLine("} else {");var s=e.name.children,l=s[0],u=s[1],c=this._tmpid(),d=this._tmpid();t.set(l.value,c),t.set(u.value,d),this._emitLine(r+" = -1;"),this._emitLine("var "+o+" = runtime.keys("+i+").length;"),this._emitLine("for(var "+c+" in "+i+") {"),this._emitLine(r+"++;"),this._emitLine("var "+d+" = "+i+"["+c+"];"),this._emitLine('frame.set("'+l.value+'", '+c+");"),this._emitLine('frame.set("'+u.value+'", '+d+");"),this._emitLoopBindings(e,i,r,o),this._withScopedSyntax(function(){n.compile(e.body,t)}),this._emitLine("}"),this._emitLine("}")}else{var p=this._tmpid();t.set(e.name.value,p),this._emitLine("var "+o+" = "+i+".length;"),this._emitLine("for(var "+r+"=0; "+r+" < "+i+".length; "+r+"++) {"),this._emitLine("var "+p+" = "+i+"["+r+"];"),this._emitLine('frame.set("'+e.name.value+'", '+p+");"),this._emitLoopBindings(e,i,r,o),this._withScopedSyntax(function(){n.compile(e.body,t)}),this._emitLine("}")}this._emitLine("}"),e.else_&&(this._emitLine("if (!"+o+") {"),this.compile(e.else_,t),this._emitLine("}")),this._emitLine("frame = frame.pop();")},i._compileAsyncLoop=function(e,t,n){var r=this,o=this._tmpid(),i=this._tmpid(),s=this._tmpid(),l=n?"asyncAll":"asyncEach";if(t=t.push(),this._emitLine("frame = frame.push();"),this._emit("var "+s+" = runtime.fromIterator("),this._compileExpression(e.arr,t),this._emitLine(");"),e.name instanceof a.Array){var u=e.name.children.length;this._emit("runtime."+l+"("+s+", "+u+", function("),e.name.children.forEach(function(e){r._emit(e.value+",")}),this._emit(o+","+i+",next) {"),e.name.children.forEach(function(e){var n=e.value;t.set(n,n),r._emitLine('frame.set("'+n+'", '+n+");")})}else{var c=e.name.value;this._emitLine("runtime."+l+"("+s+", 1, function("+c+", "+o+", "+i+",next) {"),this._emitLine('frame.set("'+c+'", '+c+");"),t.set(c,c)}this._emitLoopBindings(e,s,o,i),this._withScopedSyntax(function(){var i;n&&(i=r._pushBuffer()),r.compile(e.body,t),r._emitLine("next("+o+(i?","+i:"")+");"),n&&r._popBuffer()});var d=this._tmpid();this._emitLine("}, "+this._makeCallback(d)),this._addScopeLevel(),n&&this._emitLine(this.buffer+" += "+d+";"),e.else_&&(this._emitLine("if (!"+s+".length) {"),this.compile(e.else_,t),this._emitLine("}")),this._emitLine("frame = frame.pop();")},i.compileAsyncEach=function(e,t){this._compileAsyncLoop(e,t)},i.compileAsyncAll=function(e,t){this._compileAsyncLoop(e,t,!0)},i._compileMacro=function(e,t){var n=this,r=[],o=null,i="macro_"+this._tmpid(),s=void 0!==t;e.args.children.forEach(function(t,i){i===e.args.children.length-1&&t instanceof a.Dict?o=t:(n.assertType(t,a.Symbol),r.push(t))});var u,c=[].concat(r.map(function(e){return"l_"+e.value}),["kwargs"]),d=r.map(function(e){return'"'+e.value+'"'}),p=(o&&o.children||[]).map(function(e){return'"'+e.key.value+'"'});u=s?t.push(!0):new l,this._emitLines("var "+i+" = runtime.makeMacro(","["+d.join(", ")+"], ","["+p.join(", ")+"], ","function ("+c.join(", ")+") {","var callerFrame = frame;","frame = "+(s?"frame.push(true);":"new runtime.Frame();"),"kwargs = kwargs || {};",'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {','frame.set("caller", kwargs.caller); }'),r.forEach(function(e){n._emitLine('frame.set("'+e.value+'", l_'+e.value+");"),u.set(e.value,"l_"+e.value)}),o&&o.children.forEach(function(e){var t=e.key.value;n._emit('frame.set("'+t+'", '),n._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+t+'")'),n._emit(' ? kwargs["'+t+'"] : '),n._compileExpression(e.value,u),n._emit(");")});var f=this._pushBuffer();return this._withScopedSyntax(function(){n.compile(e.body,u)}),this._emitLine("frame = "+(s?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+f+");"),this._emitLine("});"),this._popBuffer(),i},i.compileMacro=function(e,t){var n=this._compileMacro(e),r=e.name.value;t.set(r,n),t.parent?this._emitLine('frame.set("'+r+'", '+n+");"):("_"!==e.name.value.charAt(0)&&this._emitLine('context.addExport("'+r+'");'),this._emitLine('context.setVariable("'+r+'", '+n+");"))},i.compileCaller=function(e,t){this._emit("(function (){");var n=this._compileMacro(e,t);this._emit("return "+n+";})()")},i._compileGetTemplate=function(e,t,n,r){var o=this._tmpid(),i=this._templateName(),a=this._makeCallback(o),s=n?"true":"false",l=r?"true":"false";return this._emit("env.getTemplate("),this._compileExpression(e.template,t),this._emitLine(", "+s+", "+i+", "+l+", "+a),o},i.compileImport=function(e,t){var n=e.target.value,r=this._compileGetTemplate(e,t,!1,!1);this._addScopeLevel(),this._emitLine(r+".getExported("+(e.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(r)),this._addScopeLevel(),t.set(n,r),t.parent?this._emitLine('frame.set("'+n+'", '+r+");"):this._emitLine('context.setVariable("'+n+'", '+r+");")},i.compileFromImport=function(e,t){var n=this,r=this._compileGetTemplate(e,t,!1,!1);this._addScopeLevel(),this._emitLine(r+".getExported("+(e.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(r)),this._addScopeLevel(),e.names.children.forEach(function(e){var o,i,s=n._tmpid();e instanceof a.Pair?(o=e.key.value,i=e.value.value):i=o=e.value,n._emitLine("if(Object.prototype.hasOwnProperty.call("+r+', "'+o+'")) {'),n._emitLine("var "+s+" = "+r+"."+o+";"),n._emitLine("} else {"),n._emitLine("cb(new Error(\"cannot import '"+o+"'\")); return;"),n._emitLine("}"),t.set(i,s),t.parent?n._emitLine('frame.set("'+i+'", '+s+");"):n._emitLine('context.setVariable("'+i+'", '+s+");")})},i.compileBlock=function(e){var t=this._tmpid();this.inBlock||this._emit('(parentTemplate ? function(e, c, f, r, cb) { cb(""); } : '),this._emit('context.getBlock("'+e.name.value+'")'),this.inBlock||this._emit(")"),this._emitLine("(env, context, frame, runtime, "+this._makeCallback(t)),this._emitLine(this.buffer+" += "+t+";"),this._addScopeLevel()},i.compileSuper=function(e,t){var n=e.blockName.value,r=e.symbol.value,o=this._makeCallback(r);this._emitLine('context.getSuper(env, "'+n+'", b_'+n+", frame, runtime, "+o),this._emitLine(r+" = runtime.markSafe("+r+");"),this._addScopeLevel(),t.set(r,r)},i.compileExtends=function(e,t){var n=this._tmpid(),r=this._compileGetTemplate(e,t,!0,!1);this._emitLine("parentTemplate = "+r),this._emitLine("for(var "+n+" in parentTemplate.blocks) {"),this._emitLine("context.addBlock("+n+", parentTemplate.blocks["+n+"]);"),this._emitLine("}"),this._addScopeLevel()},i.compileInclude=function(e,t){this._emitLine("var tasks = [];"),this._emitLine("tasks.push("),this._emitLine("function(callback) {");var n=this._compileGetTemplate(e,t,!1,e.ignoreMissing);this._emitLine("callback(null,"+n+");});"),this._emitLine("});");var r=this._tmpid();this._emitLine("tasks.push("),this._emitLine("function(template, callback){"),this._emitLine("template.render(context.getVariables(), frame, "+this._makeCallback(r)),this._emitLine("callback(null,"+r+");});"),this._emitLine("});"),this._emitLine("tasks.push("),this._emitLine("function(result, callback){"),this._emitLine(this.buffer+" += result;"),this._emitLine("callback(null);"),this._emitLine("});"),this._emitLine("env.waterfall(tasks, function(){"),this._addScopeLevel()},i.compileTemplateData=function(e,t){this.compileLiteral(e,t)},i.compileCapture=function(e,t){var n=this,r=this.buffer;this.buffer="output",this._emitLine("(function() {"),this._emitLine('var output = "";'),this._withScopedSyntax(function(){n.compile(e.body,t)}),this._emitLine("return output;"),this._emitLine("})()"),this.buffer=r},i.compileOutput=function(e,t){var n=this;e.children.forEach(function(r){r instanceof a.TemplateData?r.value&&(n._emit(n.buffer+" += "),n.compileLiteral(r,t),n._emitLine(";")):(n._emit(n.buffer+" += runtime.suppressValue("),n.throwOnUndefined&&n._emit("runtime.ensureDefined("),n.compile(r,t),n.throwOnUndefined&&n._emit(","+e.lineno+","+e.colno+")"),n._emit(", env.opts.autoescape);\n"))})},i.compileRoot=function(e,t){var n=this;t&&this.fail("compileRoot: root node can't have frame"),t=new l,this._emitFuncBegin(e,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(e,t),this._emitLine("if(parentTemplate) {"),this._emitLine("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"),this._emitLine("} else {"),this._emitLine("cb(null, "+this.buffer+");"),this._emitLine("}"),this._emitFuncEnd(!0),this.inBlock=!0;var r=[],o=e.findAll(a.Block);o.forEach(function(e,t){var o=e.name.value;if(-1!==r.indexOf(o))throw new Error('Block "'+o+'" defined more than once.');r.push(o),n._emitFuncBegin(e,"b_"+o);var i=new l;n._emitLine("var frame = frame.push(true);"),n.compile(e.body,i),n._emitFuncEnd()}),this._emitLine("return {"),o.forEach(function(e,t){var r="b_"+e.name.value;n._emitLine(r+": "+r+",")}),this._emitLine("root: root\n};")},i.compile=function(e,t){var n=this["compile"+e.typename];n?n.call(this,e,t):this.fail("compile: Cannot compile node: "+e.typename,e.lineno,e.colno)},i.getCode=function(){return this.codebuf.join("")},o}(u);e.exports={compile:function(e,t,n,r,a){void 0===a&&(a={});var s=new d(r,a.throwOnUndefined),l=(n||[]).map(function(e){return e.preprocess}).filter(function(e){return!!e}).reduce(function(e,t){return t(e)},e);return s.compile(i.transform(o.parse(l,n,a),t,r)),s.getCode()},Compiler:d}},function(e,t,n){function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}var o=n(4),i=n(1).EmitterObj;e.exports=function(e){var t,n;function i(){return e.apply(this,arguments)||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n);var a=i.prototype;return a.resolve=function(e,t){return o.resolve(o.dirname(e),t)},a.isRelative=function(e){return 0===e.indexOf("./")||0===e.indexOf("../")},i}(i)},function(e,t,n){function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,o(e,t)}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}var i=n(12),a=n(15),s=n(0),l=n(5),u=n(18),c=n(10),d=c.FileSystemLoader,p=c.WebLoader,f=c.PrecompiledLoader,h=n(20),m=n(21),g=n(1),v=g.Obj,y=g.EmitterObj,b=n(2),w=b.handleError,x=b.Frame,k=n(22);function S(e,t,n){i(function(){e(t,n)})}var E={type:"code",obj:{root:function(e,t,n,r,o){try{o(null,"")}catch(e){o(w(e,null,null))}}}},C=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var n=t.prototype;return n.init=function(e,t){var n=this;t=this.opts=t||{},this.opts.dev=!!t.dev,this.opts.autoescape=null==t.autoescape||t.autoescape,this.opts.throwOnUndefined=!!t.throwOnUndefined,this.opts.trimBlocks=!!t.trimBlocks,this.opts.lstripBlocks=!!t.lstripBlocks,this.loaders=[],e?this.loaders=s.isArray(e)?e:[e]:d?this.loaders=[new d("views")]:p&&(this.loaders=[new p("/views")]),"undefined"!=typeof window&&window.nunjucksPrecompiled&&this.loaders.unshift(new f(window.nunjucksPrecompiled)),this._initLoaders(),this.globals=m(),this.filters={},this.tests={},this.asyncFilters=[],this.extensions={},this.extensionsList=[],s._entries(u).forEach(function(e){var t=e[0],r=e[1];return n.addFilter(t,r)}),s._entries(h).forEach(function(e){var t=e[0],r=e[1];return n.addTest(t,r)})},n._initLoaders=function(){var e=this;this.loaders.forEach(function(t){t.cache={},"function"==typeof t.on&&(t.on("update",function(n,r){t.cache[n]=null,e.emit("update",n,r,t)}),t.on("load",function(n,r){e.emit("load",n,r,t)}))})},n.invalidateCache=function(){this.loaders.forEach(function(e){e.cache={}})},n.addExtension=function(e,t){return t.__name=e,this.extensions[e]=t,this.extensionsList.push(t),this},n.removeExtension=function(e){var t=this.getExtension(e);t&&(this.extensionsList=s.without(this.extensionsList,t),delete this.extensions[e])},n.getExtension=function(e){return this.extensions[e]},n.hasExtension=function(e){return!!this.extensions[e]},n.addGlobal=function(e,t){return this.globals[e]=t,this},n.getGlobal=function(e){if(void 0===this.globals[e])throw new Error("global not found: "+e);return this.globals[e]},n.addFilter=function(e,t,n){var r=t;return n&&this.asyncFilters.push(e),this.filters[e]=r,this},n.getFilter=function(e){if(!this.filters[e])throw new Error("filter not found: "+e);return this.filters[e]},n.addTest=function(e,t){return this.tests[e]=t,this},n.getTest=function(e){if(!this.tests[e])throw new Error("test not found: "+e);return this.tests[e]},n.resolveTemplate=function(e,t,n){return e.isRelative&&t&&e.isRelative(n)&&e.resolve?e.resolve(t,n):n},n.getTemplate=function(e,t,n,r,o){var i,a=this,l=this,u=null;if(e&&e.raw&&(e=e.raw),s.isFunction(n)&&(o=n,n=null,t=t||!1),s.isFunction(t)&&(o=t,t=!1),e instanceof _)u=e;else{if("string"!=typeof e)throw new Error("template names must be a string: "+e);for(var c=0;c<this.loaders.length;c++){var d=this.loaders[c];if(u=d.cache[this.resolveTemplate(d,n,e)])break}}return u?(t&&u.compile(),o?void o(null,u):u):(s.asyncIter(this.loaders,function(t,r,o,i){function a(e,n){e?i(e):n?(n.loader=t,i(null,n)):o()}e=l.resolveTemplate(t,n,e),t.async?t.getSource(e,a):a(null,t.getSource(e))},function(n,s){if(s||n||r||(n=new Error("template not found: "+e)),n){if(o)return void o(n);throw n}var l;s?(l=new _(s.src,a,s.path,t),s.noCache||(s.loader.cache[e]=l)):l=new _(E,a,"",t),o?o(null,l):i=l}),i)},n.express=function(e){return k(this,e)},n.render=function(e,t,n){s.isFunction(t)&&(n=t,t=null);var r=null;return this.getTemplate(e,function(e,o){if(e&&n)S(n,e);else{if(e)throw e;r=o.render(t,n)}}),r},n.renderString=function(e,t,n,r){return s.isFunction(n)&&(r=n,n={}),new _(e,this,(n=n||{}).path).render(t,r)},n.waterfall=function(e,t,n){return a(e,t,n)},t}(y),O=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var n=t.prototype;return n.init=function(e,t,n){var r=this;this.env=n||new C,this.ctx=s.extend({},e),this.blocks={},this.exported=[],s.keys(t).forEach(function(e){r.addBlock(e,t[e])})},n.lookup=function(e){return e in this.env.globals&&!(e in this.ctx)?this.env.globals[e]:this.ctx[e]},n.setVariable=function(e,t){this.ctx[e]=t},n.getVariables=function(){return this.ctx},n.addBlock=function(e,t){return this.blocks[e]=this.blocks[e]||[],this.blocks[e].push(t),this},n.getBlock=function(e){if(!this.blocks[e])throw new Error('unknown block "'+e+'"');return this.blocks[e][0]},n.getSuper=function(e,t,n,r,o,i){var a=s.indexOf(this.blocks[t]||[],n),l=this.blocks[t][a+1];if(-1===a||!l)throw new Error('no super block available for "'+t+'"');l(e,this,r,o,i)},n.addExport=function(e){this.exported.push(e)},n.getExported=function(){var e=this,t={};return this.exported.forEach(function(n){t[n]=e.ctx[n]}),t},t}(v),_=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var n=t.prototype;return n.init=function(e,t,n,r){if(this.env=t||new C,s.isObject(e))switch(e.type){case"code":this.tmplProps=e.obj;break;case"string":this.tmplStr=e.obj;break;default:throw new Error("Unexpected template object type "+e.type+"; expected 'code', or 'string'")}else{if(!s.isString(e))throw new Error("src must be a string or an object describing the source");this.tmplStr=e}if(this.path=n,r)try{this._compile()}catch(e){throw s._prettifyError(this.path,this.env.opts.dev,e)}else this.compiled=!1},n.render=function(e,t,n){var r=this;"function"==typeof e?(n=e,e={}):"function"==typeof t&&(n=t,t=null);var o=!t;try{this.compile()}catch(e){var i=s._prettifyError(this.path,this.env.opts.dev,e);if(n)return S(n,i);throw i}var a=new O(e||{},this.blocks,this.env),l=t?t.push(!0):new x;l.topLevel=!0;var u=null,c=!1;return this.rootRenderFunc(this.env,a,l,b,function(e,t){if(!c||!n||void 0===t)if(e&&(e=s._prettifyError(r.path,r.env.opts.dev,e),c=!0),n)o?S(n,e,t):n(e,t);else{if(e)throw e;u=t}}),u},n.getExported=function(e,t,n){"function"==typeof e&&(n=e,e={}),"function"==typeof t&&(n=t,t=null);try{this.compile()}catch(e){if(n)return n(e);throw e}var r=t?t.push():new x;r.topLevel=!0;var o=new O(e||{},this.blocks,this.env);this.rootRenderFunc(this.env,o,r,b,function(e){e?n(e,null):n(null,o.getExported())})},n.compile=function(){this.compiled||this._compile()},n._compile=function(){var e;if(this.tmplProps)e=this.tmplProps;else{var t=l.compile(this.tmplStr,this.env.asyncFilters,this.env.extensionsList,this.path,this.env.opts);e=new Function(t)()}this.blocks=this._getBlocks(e),this.rootRenderFunc=e.root,this.compiled=!0},n._getBlocks=function(e){var t={};return s.keys(e).forEach(function(n){"b_"===n.slice(0,2)&&(t[n.slice(2)]=e[n])}),t},t}(v);e.exports={Environment:C,Template:_}},function(e,t,n){function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}var o=n(9),i=n(3),a=n(1).Obj,s=n(0),l=function(e){var t,n;function a(){return e.apply(this,arguments)||this}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n);var l=a.prototype;return l.init=function(e){this.tokens=e,this.peeked=null,this.breakOnBlocks=null,this.dropLeadingWhitespace=!1,this.extensions=[]},l.nextToken=function(e){var t;if(this.peeked){if(e||this.peeked.type!==o.TOKEN_WHITESPACE)return t=this.peeked,this.peeked=null,t;this.peeked=null}if(t=this.tokens.nextToken(),!e)for(;t&&t.type===o.TOKEN_WHITESPACE;)t=this.tokens.nextToken();return t},l.peekToken=function(){return this.peeked=this.peeked||this.nextToken(),this.peeked},l.pushToken=function(e){if(this.peeked)throw new Error("pushToken: can only push one token on between reads");this.peeked=e},l.error=function(e,t,n){if(void 0===t||void 0===n){var r=this.peekToken()||{};t=r.lineno,n=r.colno}return void 0!==t&&(t+=1),void 0!==n&&(n+=1),new s.TemplateError(e,t,n)},l.fail=function(e,t,n){throw this.error(e,t,n)},l.skip=function(e){var t=this.nextToken();return!(!t||t.type!==e)||(this.pushToken(t),!1)},l.expect=function(e){var t=this.nextToken();return t.type!==e&&this.fail("expected "+e+", got "+t.type,t.lineno,t.colno),t},l.skipValue=function(e,t){var n=this.nextToken();return!(!n||n.type!==e||n.value!==t)||(this.pushToken(n),!1)},l.skipSymbol=function(e){return this.skipValue(o.TOKEN_SYMBOL,e)},l.advanceAfterBlockEnd=function(e){var t;return e||((t=this.peekToken())||this.fail("unexpected end of file"),t.type!==o.TOKEN_SYMBOL&&this.fail("advanceAfterBlockEnd: expected symbol token or explicit name to be passed"),e=this.nextToken().value),(t=this.nextToken())&&t.type===o.TOKEN_BLOCK_END?"-"===t.value.charAt(0)&&(this.dropLeadingWhitespace=!0):this.fail("expected block end in "+e+" statement"),t},l.advanceAfterVariableEnd=function(){var e=this.nextToken();e&&e.type===o.TOKEN_VARIABLE_END?this.dropLeadingWhitespace="-"===e.value.charAt(e.value.length-this.tokens.tags.VARIABLE_END.length-1):(this.pushToken(e),this.fail("expected variable end"))},l.parseFor=function(){var e,t,n=this.peekToken();if(this.skipSymbol("for")?(e=new i.For(n.lineno,n.colno),t="endfor"):this.skipSymbol("asyncEach")?(e=new i.AsyncEach(n.lineno,n.colno),t="endeach"):this.skipSymbol("asyncAll")?(e=new i.AsyncAll(n.lineno,n.colno),t="endall"):this.fail("parseFor: expected for{Async}",n.lineno,n.colno),e.name=this.parsePrimary(),e.name instanceof i.Symbol||this.fail("parseFor: variable name expected for loop"),this.peekToken().type===o.TOKEN_COMMA){var r=e.name;for(e.name=new i.Array(r.lineno,r.colno),e.name.addChild(r);this.skip(o.TOKEN_COMMA);){var a=this.parsePrimary();e.name.addChild(a)}}return this.skipSymbol("in")||this.fail('parseFor: expected "in" keyword for loop',n.lineno,n.colno),e.arr=this.parseExpression(),this.advanceAfterBlockEnd(n.value),e.body=this.parseUntilBlocks(t,"else"),this.skipSymbol("else")&&(this.advanceAfterBlockEnd("else"),e.else_=this.parseUntilBlocks(t)),this.advanceAfterBlockEnd(),e},l.parseMacro=function(){var e=this.peekToken();this.skipSymbol("macro")||this.fail("expected macro");var t=this.parsePrimary(!0),n=this.parseSignature(),r=new i.Macro(e.lineno,e.colno,t,n);return this.advanceAfterBlockEnd(e.value),r.body=this.parseUntilBlocks("endmacro"),this.advanceAfterBlockEnd(),r},l.parseCall=function(){var e=this.peekToken();this.skipSymbol("call")||this.fail("expected call");var t=this.parseSignature(!0)||new i.NodeList,n=this.parsePrimary();this.advanceAfterBlockEnd(e.value);var r=this.parseUntilBlocks("endcall");this.advanceAfterBlockEnd();var o=new i.Symbol(e.lineno,e.colno,"caller"),a=new i.Caller(e.lineno,e.colno,o,t,r),s=n.args.children;return s[s.length-1]instanceof i.KeywordArgs||s.push(new i.KeywordArgs),s[s.length-1].addChild(new i.Pair(e.lineno,e.colno,o,a)),new i.Output(e.lineno,e.colno,[n])},l.parseWithContext=function(){var e=this.peekToken(),t=null;return this.skipSymbol("with")?t=!0:this.skipSymbol("without")&&(t=!1),null!==t&&(this.skipSymbol("context")||this.fail("parseFrom: expected context after with/without",e.lineno,e.colno)),t},l.parseImport=function(){var e=this.peekToken();this.skipSymbol("import")||this.fail("parseImport: expected import",e.lineno,e.colno);var t=this.parseExpression();this.skipSymbol("as")||this.fail('parseImport: expected "as" keyword',e.lineno,e.colno);var n=this.parseExpression(),r=this.parseWithContext(),o=new i.Import(e.lineno,e.colno,t,n,r);return this.advanceAfterBlockEnd(e.value),o},l.parseFrom=function(){var e=this.peekToken();this.skipSymbol("from")||this.fail("parseFrom: expected from");var t=this.parseExpression();this.skipSymbol("import")||this.fail("parseFrom: expected import",e.lineno,e.colno);for(var n,r=new i.NodeList;;){var a=this.peekToken();if(a.type===o.TOKEN_BLOCK_END){r.children.length||this.fail("parseFrom: Expected at least one import name",e.lineno,e.colno),"-"===a.value.charAt(0)&&(this.dropLeadingWhitespace=!0),this.nextToken();break}r.children.length>0&&!this.skip(o.TOKEN_COMMA)&&this.fail("parseFrom: expected comma",e.lineno,e.colno);var s=this.parsePrimary();if("_"===s.value.charAt(0)&&this.fail("parseFrom: names starting with an underscore cannot be imported",s.lineno,s.colno),this.skipSymbol("as")){var l=this.parsePrimary();r.addChild(new i.Pair(s.lineno,s.colno,s,l))}else r.addChild(s);n=this.parseWithContext()}return new i.FromImport(e.lineno,e.colno,t,r,n)},l.parseBlock=function(){var e=this.peekToken();this.skipSymbol("block")||this.fail("parseBlock: expected block",e.lineno,e.colno);var t=new i.Block(e.lineno,e.colno);t.name=this.parsePrimary(),t.name instanceof i.Symbol||this.fail("parseBlock: variable name expected",e.lineno,e.colno),this.advanceAfterBlockEnd(e.value),t.body=this.parseUntilBlocks("endblock"),this.skipSymbol("endblock"),this.skipSymbol(t.name.value);var n=this.peekToken();return n||this.fail("parseBlock: expected endblock, got end of file"),this.advanceAfterBlockEnd(n.value),t},l.parseExtends=function(){var e="extends",t=this.peekToken();this.skipSymbol(e)||this.fail("parseTemplateRef: expected "+e);var n=new i.Extends(t.lineno,t.colno);return n.template=this.parseExpression(),this.advanceAfterBlockEnd(t.value),n},l.parseInclude=function(){var e="include",t=this.peekToken();this.skipSymbol(e)||this.fail("parseInclude: expected "+e);var n=new i.Include(t.lineno,t.colno);return n.template=this.parseExpression(),this.skipSymbol("ignore")&&this.skipSymbol("missing")&&(n.ignoreMissing=!0),this.advanceAfterBlockEnd(t.value),n},l.parseIf=function(){var e,t=this.peekToken();this.skipSymbol("if")||this.skipSymbol("elif")||this.skipSymbol("elseif")?e=new i.If(t.lineno,t.colno):this.skipSymbol("ifAsync")?e=new i.IfAsync(t.lineno,t.colno):this.fail("parseIf: expected if, elif, or elseif",t.lineno,t.colno),e.cond=this.parseExpression(),this.advanceAfterBlockEnd(t.value),e.body=this.parseUntilBlocks("elif","elseif","else","endif");var n=this.peekToken();switch(n&&n.value){case"elseif":case"elif":e.else_=this.parseIf();break;case"else":this.advanceAfterBlockEnd(),e.else_=this.parseUntilBlocks("endif"),this.advanceAfterBlockEnd();break;case"endif":e.else_=null,this.advanceAfterBlockEnd();break;default:this.fail("parseIf: expected elif, else, or endif, got end of file")}return e},l.parseSet=function(){var e=this.peekToken();this.skipSymbol("set")||this.fail("parseSet: expected set",e.lineno,e.colno);for(var t,n=new i.Set(e.lineno,e.colno,[]);(t=this.parsePrimary())&&(n.targets.push(t),this.skip(o.TOKEN_COMMA)););return this.skipValue(o.TOKEN_OPERATOR,"=")?(n.value=this.parseExpression(),this.advanceAfterBlockEnd(e.value)):this.skip(o.TOKEN_BLOCK_END)?(n.body=new i.Capture(e.lineno,e.colno,this.parseUntilBlocks("endset")),n.value=null,this.advanceAfterBlockEnd()):this.fail("parseSet: expected = or block end in set tag",e.lineno,e.colno),n},l.parseSwitch=function(){var e="switch",t="endswitch",n="case",r="default",o=this.peekToken();this.skipSymbol(e)||this.skipSymbol(n)||this.skipSymbol(r)||this.fail('parseSwitch: expected "switch," "case" or "default"',o.lineno,o.colno);var a=this.parseExpression();this.advanceAfterBlockEnd(e),this.parseUntilBlocks(n,r,t);var s,l=this.peekToken(),u=[];do{this.skipSymbol(n);var c=this.parseExpression();this.advanceAfterBlockEnd(e);var d=this.parseUntilBlocks(n,r,t);u.push(new i.Case(l.line,l.col,c,d)),l=this.peekToken()}while(l&&l.value===n);switch(l.value){case r:this.advanceAfterBlockEnd(),s=this.parseUntilBlocks(t),this.advanceAfterBlockEnd();break;case t:this.advanceAfterBlockEnd();break;default:this.fail('parseSwitch: expected "case," "default" or "endswitch," got EOF.')}return new i.Switch(o.lineno,o.colno,a,u,s)},l.parseStatement=function(){var e=this.peekToken();if(e.type!==o.TOKEN_SYMBOL&&this.fail("tag name expected",e.lineno,e.colno),this.breakOnBlocks&&-1!==s.indexOf(this.breakOnBlocks,e.value))return null;switch(e.value){case"raw":return this.parseRaw();case"verbatim":return this.parseRaw("verbatim");case"if":case"ifAsync":return this.parseIf();case"for":case"asyncEach":case"asyncAll":return this.parseFor();case"block":return this.parseBlock();case"extends":return this.parseExtends();case"include":return this.parseInclude();case"set":return this.parseSet();case"macro":return this.parseMacro();case"call":return this.parseCall();case"import":return this.parseImport();case"from":return this.parseFrom();case"filter":return this.parseFilterStatement();case"switch":return this.parseSwitch();default:if(this.extensions.length)for(var t=0;t<this.extensions.length;t++){var n=this.extensions[t];if(-1!==s.indexOf(n.tags||[],e.value))return n.parse(this,i,o)}this.fail("unknown block tag: "+e.value,e.lineno,e.colno)}},l.parseRaw=function(e){for(var t="end"+(e=e||"raw"),n=new RegExp("([\\s\\S]*?){%\\s*("+e+"|"+t+")\\s*(?=%})%}"),r=1,o="",a=null,s=this.advanceAfterBlockEnd();(a=this.tokens._extractRegex(n))&&r>0;){var l=a[0],u=a[1],c=a[2];c===e?r+=1:c===t&&(r-=1),0===r?(o+=u,this.tokens.backN(l.length-u.length)):o+=l}return new i.Output(s.lineno,s.colno,[new i.TemplateData(s.lineno,s.colno,o)])},l.parsePostfix=function(e){for(var t,n=this.peekToken();n;){if(n.type===o.TOKEN_LEFT_PAREN)e=new i.FunCall(n.lineno,n.colno,e,this.parseSignature());else if(n.type===o.TOKEN_LEFT_BRACKET)(t=this.parseAggregate()).children.length>1&&this.fail("invalid index"),e=new i.LookupVal(n.lineno,n.colno,e,t.children[0]);else{if(n.type!==o.TOKEN_OPERATOR||"."!==n.value)break;this.nextToken();var r=this.nextToken();r.type!==o.TOKEN_SYMBOL&&this.fail("expected name as lookup value, got "+r.value,r.lineno,r.colno),t=new i.Literal(r.lineno,r.colno,r.value),e=new i.LookupVal(n.lineno,n.colno,e,t)}n=this.peekToken()}return e},l.parseExpression=function(){return this.parseInlineIf()},l.parseInlineIf=function(){var e=this.parseOr();if(this.skipSymbol("if")){var t=this.parseOr(),n=e;(e=new i.InlineIf(e.lineno,e.colno)).body=n,e.cond=t,this.skipSymbol("else")?e.else_=this.parseOr():e.else_=null}return e},l.parseOr=function(){for(var e=this.parseAnd();this.skipSymbol("or");){var t=this.parseAnd();e=new i.Or(e.lineno,e.colno,e,t)}return e},l.parseAnd=function(){for(var e=this.parseNot();this.skipSymbol("and");){var t=this.parseNot();e=new i.And(e.lineno,e.colno,e,t)}return e},l.parseNot=function(){var e=this.peekToken();return this.skipSymbol("not")?new i.Not(e.lineno,e.colno,this.parseNot()):this.parseIn()},l.parseIn=function(){for(var e=this.parseIs();;){var t=this.nextToken();if(!t)break;var n=t.type===o.TOKEN_SYMBOL&&"not"===t.value;if(n||this.pushToken(t),!this.skipSymbol("in")){n&&this.pushToken(t);break}var r=this.parseIs();e=new i.In(e.lineno,e.colno,e,r),n&&(e=new i.Not(e.lineno,e.colno,e))}return e},l.parseIs=function(){var e=this.parseCompare();if(this.skipSymbol("is")){var t=this.skipSymbol("not"),n=this.parseCompare();e=new i.Is(e.lineno,e.colno,e,n),t&&(e=new i.Not(e.lineno,e.colno,e))}return e},l.parseCompare=function(){for(var e=["==","===","!=","!==","<",">","<=",">="],t=this.parseConcat(),n=[];;){var r=this.nextToken();if(!r)break;if(-1===e.indexOf(r.value)){this.pushToken(r);break}n.push(new i.CompareOperand(r.lineno,r.colno,this.parseConcat(),r.value))}return n.length?new i.Compare(n[0].lineno,n[0].colno,t,n):t},l.parseConcat=function(){for(var e=this.parseAdd();this.skipValue(o.TOKEN_TILDE,"~");){var t=this.parseAdd();e=new i.Concat(e.lineno,e.colno,e,t)}return e},l.parseAdd=function(){for(var e=this.parseSub();this.skipValue(o.TOKEN_OPERATOR,"+");){var t=this.parseSub();e=new i.Add(e.lineno,e.colno,e,t)}return e},l.parseSub=function(){for(var e=this.parseMul();this.skipValue(o.TOKEN_OPERATOR,"-");){var t=this.parseMul();e=new i.Sub(e.lineno,e.colno,e,t)}return e},l.parseMul=function(){for(var e=this.parseDiv();this.skipValue(o.TOKEN_OPERATOR,"*");){var t=this.parseDiv();e=new i.Mul(e.lineno,e.colno,e,t)}return e},l.parseDiv=function(){for(var e=this.parseFloorDiv();this.skipValue(o.TOKEN_OPERATOR,"/");){var t=this.parseFloorDiv();e=new i.Div(e.lineno,e.colno,e,t)}return e},l.parseFloorDiv=function(){for(var e=this.parseMod();this.skipValue(o.TOKEN_OPERATOR,"//");){var t=this.parseMod();e=new i.FloorDiv(e.lineno,e.colno,e,t)}return e},l.parseMod=function(){for(var e=this.parsePow();this.skipValue(o.TOKEN_OPERATOR,"%");){var t=this.parsePow();e=new i.Mod(e.lineno,e.colno,e,t)}return e},l.parsePow=function(){for(var e=this.parseUnary();this.skipValue(o.TOKEN_OPERATOR,"**");){var t=this.parseUnary();e=new i.Pow(e.lineno,e.colno,e,t)}return e},l.parseUnary=function(e){var t,n=this.peekToken();return t=this.skipValue(o.TOKEN_OPERATOR,"-")?new i.Neg(n.lineno,n.colno,this.parseUnary(!0)):this.skipValue(o.TOKEN_OPERATOR,"+")?new i.Pos(n.lineno,n.colno,this.parseUnary(!0)):this.parsePrimary(),e||(t=this.parseFilter(t)),t},l.parsePrimary=function(e){var t,n=this.nextToken(),r=null;if(n?n.type===o.TOKEN_STRING?t=n.value:n.type===o.TOKEN_INT?t=parseInt(n.value,10):n.type===o.TOKEN_FLOAT?t=parseFloat(n.value):n.type===o.TOKEN_BOOLEAN?"true"===n.value?t=!0:"false"===n.value?t=!1:this.fail("invalid boolean: "+n.value,n.lineno,n.colno):n.type===o.TOKEN_NONE?t=null:n.type===o.TOKEN_REGEX&&(t=new RegExp(n.value.body,n.value.flags)):this.fail("expected expression, got end of file"),void 0!==t?r=new i.Literal(n.lineno,n.colno,t):n.type===o.TOKEN_SYMBOL?r=new i.Symbol(n.lineno,n.colno,n.value):(this.pushToken(n),r=this.parseAggregate()),e||(r=this.parsePostfix(r)),r)return r;throw this.error("unexpected token: "+n.value,n.lineno,n.colno)},l.parseFilterName=function(){for(var e=this.expect(o.TOKEN_SYMBOL),t=e.value;this.skipValue(o.TOKEN_OPERATOR,".");)t+="."+this.expect(o.TOKEN_SYMBOL).value;return new i.Symbol(e.lineno,e.colno,t)},l.parseFilterArgs=function(e){return this.peekToken().type===o.TOKEN_LEFT_PAREN?this.parsePostfix(e).args.children:[]},l.parseFilter=function(e){for(;this.skip(o.TOKEN_PIPE);){var t=this.parseFilterName();e=new i.Filter(t.lineno,t.colno,t,new i.NodeList(t.lineno,t.colno,[e].concat(this.parseFilterArgs(e))))}return e},l.parseFilterStatement=function(){var e=this.peekToken();this.skipSymbol("filter")||this.fail("parseFilterStatement: expected filter");var t=this.parseFilterName(),n=this.parseFilterArgs(t);this.advanceAfterBlockEnd(e.value);var r=new i.Capture(t.lineno,t.colno,this.parseUntilBlocks("endfilter"));this.advanceAfterBlockEnd();var o=new i.Filter(t.lineno,t.colno,t,new i.NodeList(t.lineno,t.colno,[r].concat(n)));return new i.Output(t.lineno,t.colno,[o])},l.parseAggregate=function(){var e,t=this.nextToken();switch(t.type){case o.TOKEN_LEFT_PAREN:e=new i.Group(t.lineno,t.colno);break;case o.TOKEN_LEFT_BRACKET:e=new i.Array(t.lineno,t.colno);break;case o.TOKEN_LEFT_CURLY:e=new i.Dict(t.lineno,t.colno);break;default:return null}for(;;){var n=this.peekToken().type;if(n===o.TOKEN_RIGHT_PAREN||n===o.TOKEN_RIGHT_BRACKET||n===o.TOKEN_RIGHT_CURLY){this.nextToken();break}if(e.children.length>0&&(this.skip(o.TOKEN_COMMA)||this.fail("parseAggregate: expected comma after expression",t.lineno,t.colno)),e instanceof i.Dict){var r=this.parsePrimary();this.skip(o.TOKEN_COLON)||this.fail("parseAggregate: expected colon after dict key",t.lineno,t.colno);var a=this.parseExpression();e.addChild(new i.Pair(r.lineno,r.colno,r,a))}else{var s=this.parseExpression();e.addChild(s)}}return e},l.parseSignature=function(e,t){var n=this.peekToken();if(!t&&n.type!==o.TOKEN_LEFT_PAREN){if(e)return null;this.fail("expected arguments",n.lineno,n.colno)}n.type===o.TOKEN_LEFT_PAREN&&(n=this.nextToken());for(var r=new i.NodeList(n.lineno,n.colno),a=new i.KeywordArgs(n.lineno,n.colno),s=!1;;){if(n=this.peekToken(),!t&&n.type===o.TOKEN_RIGHT_PAREN){this.nextToken();break}if(t&&n.type===o.TOKEN_BLOCK_END)break;if(s&&!this.skip(o.TOKEN_COMMA))this.fail("parseSignature: expected comma after expression",n.lineno,n.colno);else{var l=this.parseExpression();this.skipValue(o.TOKEN_OPERATOR,"=")?a.addChild(new i.Pair(l.lineno,l.colno,l,this.parseExpression())):r.addChild(l)}s=!0}return a.children.length&&r.addChild(a),r},l.parseUntilBlocks=function(){for(var e=this.breakOnBlocks,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];this.breakOnBlocks=n;var o=this.parse();return this.breakOnBlocks=e,o},l.parseNodes=function(){for(var e,t=[];e=this.nextToken();)if(e.type===o.TOKEN_DATA){var n=e.value,r=this.peekToken(),a=r&&r.value;this.dropLeadingWhitespace&&(n=n.replace(/^\s*/,""),this.dropLeadingWhitespace=!1),r&&(r.type===o.TOKEN_BLOCK_START&&"-"===a.charAt(a.length-1)||r.type===o.TOKEN_VARIABLE_START&&"-"===a.charAt(this.tokens.tags.VARIABLE_START.length)||r.type===o.TOKEN_COMMENT&&"-"===a.charAt(this.tokens.tags.COMMENT_START.length))&&(n=n.replace(/\s*$/,"")),t.push(new i.Output(e.lineno,e.colno,[new i.TemplateData(e.lineno,e.colno,n)]))}else if(e.type===o.TOKEN_BLOCK_START){this.dropLeadingWhitespace=!1;var s=this.parseStatement();if(!s)break;t.push(s)}else if(e.type===o.TOKEN_VARIABLE_START){var l=this.parseExpression();this.dropLeadingWhitespace=!1,this.advanceAfterVariableEnd(),t.push(new i.Output(e.lineno,e.colno,[l]))}else e.type===o.TOKEN_COMMENT?this.dropLeadingWhitespace="-"===e.value.charAt(e.value.length-this.tokens.tags.COMMENT_END.length-1):this.fail("Unexpected token at top-level: "+e.type,e.lineno,e.colno);return t},l.parse=function(){return new i.NodeList(0,0,this.parseNodes())},l.parseAsRoot=function(){return new i.Root(0,0,this.parseNodes())},a}(a);e.exports={parse:function(e,t,n){var r=new l(o.lex(e,n));return void 0!==t&&(r.extensions=t),r.parseAsRoot()},Parser:l}},function(e,t,n){var r=n(0),o=" \n\t\r ",i="()[]{}%*-+~/#,:|.<>=!",a="string",s="whitespace",l="data",u="block-start",c="block-end",d="variable-start",p="variable-end",f="comment",h="left-paren",m="right-paren",g="left-bracket",v="right-bracket",y="left-curly",b="right-curly",w="operator",x="comma",k="colon",S="tilde",E="pipe",C="float",O="boolean",_="none",T="symbol",R="regex";function P(e,t,n,r){return{type:e,value:t,lineno:n,colno:r}}var A=function(){function e(e,t){this.str=e,this.index=0,this.len=e.length,this.lineno=0,this.colno=0,this.in_code=!1;var n=(t=t||{}).tags||{};this.tags={BLOCK_START:n.blockStart||"{%",BLOCK_END:n.blockEnd||"%}",VARIABLE_START:n.variableStart||"{{",VARIABLE_END:n.variableEnd||"}}",COMMENT_START:n.commentStart||"{#",COMMENT_END:n.commentEnd||"#}"},this.trimBlocks=!!t.trimBlocks,this.lstripBlocks=!!t.lstripBlocks}var t=e.prototype;return t.nextToken=function(){var e,t=this.lineno,n=this.colno;if(this.in_code){var A=this.current();if(this.isFinished())return null;if('"'===A||"'"===A)return P(a,this._parseString(A),t,n);if(e=this._extract(o))return P(s,e,t,n);if((e=this._extractString(this.tags.BLOCK_END))||(e=this._extractString("-"+this.tags.BLOCK_END)))return this.in_code=!1,this.trimBlocks&&("\n"===(A=this.current())?this.forward():"\r"===A&&(this.forward(),"\n"===(A=this.current())?this.forward():this.back())),P(c,e,t,n);if((e=this._extractString(this.tags.VARIABLE_END))||(e=this._extractString("-"+this.tags.VARIABLE_END)))return this.in_code=!1,P(p,e,t,n);if("r"===A&&"/"===this.str.charAt(this.index+1)){this.forwardN(2);for(var L="";!this.isFinished();){if("/"===this.current()&&"\\"!==this.previous()){this.forward();break}L+=this.current(),this.forward()}for(var N=["g","i","m","y"],M="";!this.isFinished()&&-1!==N.indexOf(this.current());)M+=this.current(),this.forward();return P(R,{body:L,flags:M},t,n)}if(-1!==i.indexOf(A)){this.forward();var I,F=["==","===","!=","!==","<=",">=","//","**"],$=A+this.current();switch(-1!==r.indexOf(F,$)&&(this.forward(),A=$,-1!==r.indexOf(F,$+this.current())&&(A=$+this.current(),this.forward())),A){case"(":I=h;break;case")":I=m;break;case"[":I=g;break;case"]":I=v;break;case"{":I=y;break;case"}":I=b;break;case",":I=x;break;case":":I=k;break;case"~":I=S;break;case"|":I=E;break;default:I=w}return P(I,A,t,n)}if((e=this._extractUntil(o+i)).match(/^[-+]?[0-9]+$/)){if("."===this.current()){this.forward();var j=this._extract("0123456789");return P(C,e+"."+j,t,n)}return P("int",e,t,n)}if(e.match(/^(true|false)$/))return P(O,e,t,n);if("none"===e)return P(_,e,t,n);if("null"===e)return P(_,e,t,n);if(e)return P(T,e,t,n);throw new Error("Unexpected value while parsing: "+e)}var z,B=this.tags.BLOCK_START.charAt(0)+this.tags.VARIABLE_START.charAt(0)+this.tags.COMMENT_START.charAt(0)+this.tags.COMMENT_END.charAt(0);if(this.isFinished())return null;if((e=this._extractString(this.tags.BLOCK_START+"-"))||(e=this._extractString(this.tags.BLOCK_START)))return this.in_code=!0,P(u,e,t,n);if((e=this._extractString(this.tags.VARIABLE_START+"-"))||(e=this._extractString(this.tags.VARIABLE_START)))return this.in_code=!0,P(d,e,t,n);e="";var D=!1;for(this._matches(this.tags.COMMENT_START)&&(D=!0,e=this._extractString(this.tags.COMMENT_START));null!==(z=this._extractUntil(B));){if(e+=z,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!D){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&this.colno>0&&this.colno<=e.length){var W=e.slice(-this.colno);if(/^\s+$/.test(W)&&!(e=e.slice(0,-this.colno)).length)return this.nextToken()}break}if(this._matches(this.tags.COMMENT_END)){if(!D)throw new Error("unexpected end of comment");e+=this._extractString(this.tags.COMMENT_END);break}e+=this.current(),this.forward()}if(null===z&&D)throw new Error("expected end of comment, got end of file");return P(D?f:l,e,t,n)},t._parseString=function(e){this.forward();for(var t="";!this.isFinished()&&this.current()!==e;){var n=this.current();if("\\"===n){switch(this.forward(),this.current()){case"n":t+="\n";break;case"t":t+="\t";break;case"r":t+="\r";break;default:t+=this.current()}this.forward()}else t+=n,this.forward()}return this.forward(),t},t._matches=function(e){return this.index+e.length>this.len?null:this.str.slice(this.index,this.index+e.length)===e},t._extractString=function(e){return this._matches(e)?(this.forwardN(e.length),e):null},t._extractUntil=function(e){return this._extractMatching(!0,e||"")},t._extract=function(e){return this._extractMatching(!1,e)},t._extractMatching=function(e,t){if(this.isFinished())return null;var n=t.indexOf(this.current());if(e&&-1===n||!e&&-1!==n){var r=this.current();this.forward();for(var o=t.indexOf(this.current());(e&&-1===o||!e&&-1!==o)&&!this.isFinished();)r+=this.current(),this.forward(),o=t.indexOf(this.current());return r}return""},t._extractRegex=function(e){var t=this.currentStr().match(e);return t?(this.forwardN(t[0].length),t):null},t.isFinished=function(){return this.index>=this.len},t.forwardN=function(e){for(var t=0;t<e;t++)this.forward()},t.forward=function(){this.index++,"\n"===this.previous()?(this.lineno++,this.colno=0):this.colno++},t.backN=function(e){for(var t=0;t<e;t++)this.back()},t.back=function(){if(this.index--,"\n"===this.current()){this.lineno--;var e=this.src.lastIndexOf("\n",this.index-1);this.colno=-1===e?this.index:this.index-e}else this.colno--},t.current=function(){return this.isFinished()?"":this.str.charAt(this.index)},t.currentStr=function(){return this.isFinished()?"":this.str.substr(this.index)},t.previous=function(){return this.str.charAt(this.index-1)},e}();e.exports={lex:function(e,t){return new A(e,t)},TOKEN_STRING:a,TOKEN_WHITESPACE:s,TOKEN_DATA:l,TOKEN_BLOCK_START:u,TOKEN_BLOCK_END:c,TOKEN_VARIABLE_START:d,TOKEN_VARIABLE_END:p,TOKEN_COMMENT:f,TOKEN_LEFT_PAREN:h,TOKEN_RIGHT_PAREN:m,TOKEN_LEFT_BRACKET:g,TOKEN_RIGHT_BRACKET:v,TOKEN_LEFT_CURLY:y,TOKEN_RIGHT_CURLY:b,TOKEN_OPERATOR:w,TOKEN_COMMA:x,TOKEN_COLON:k,TOKEN_TILDE:S,TOKEN_PIPE:E,TOKEN_INT:"int",TOKEN_FLOAT:C,TOKEN_BOOLEAN:O,TOKEN_NONE:_,TOKEN_SYMBOL:T,TOKEN_SPECIAL:"special",TOKEN_REGEX:R}},function(e,t,n){function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}var o=n(6),i=n(19).PrecompiledLoader,a=function(e){var t,n;function o(t,n){var r;return(r=e.call(this)||this).baseURL=t||".",n=n||{},r.useCache=!!n.useCache,r.async=!!n.async,r}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n);var i=o.prototype;return i.resolve=function(e,t){throw new Error("relative templates not support in the browser yet")},i.getSource=function(e,t){var n,r=this,o=this.useCache;return this.fetch(this.baseURL+"/"+e,function(i,a){if(i)if(t)t(i.content);else{if(404!==i.status)throw i.content;n=null}else n={src:a,path:e,noCache:!o},r.emit("load",e,n),t&&t(null,n)}),n},i.fetch=function(e,t){if("undefined"==typeof window)throw new Error("WebLoader can only by used in a browser");var n=new XMLHttpRequest,r=!0;n.onreadystatechange=function(){4===n.readyState&&r&&(r=!1,0===n.status||200===n.status?t(null,n.responseText):t({status:n.status,content:n.responseText}))},e+=(-1===e.indexOf("?")?"?":"&")+"s="+(new Date).getTime(),n.open("GET",e,this.async),n.send()},o}(o);e.exports={WebLoader:a,PrecompiledLoader:i}},function(e,t,n){var r,o=n(0),i=n(7),a=i.Environment,s=i.Template,l=n(6),u=n(10),c=n(23),d=n(5),p=n(8),f=n(9),h=n(2),m=n(3),g=n(25);function v(e,t){var n;return t=t||{},o.isObject(e)&&(t=e,e=null),u.FileSystemLoader?n=new u.FileSystemLoader(e,{watch:t.watch,noCache:t.noCache}):u.WebLoader&&(n=new u.WebLoader(e,{useCache:t.web&&t.web.useCache,async:t.web&&t.web.async})),r=new a(n,t),t&&t.express&&r.express(t.express),r}e.exports={Environment:a,Template:s,Loader:l,FileSystemLoader:u.FileSystemLoader,NodeResolveLoader:u.NodeResolveLoader,PrecompiledLoader:u.PrecompiledLoader,WebLoader:u.WebLoader,compiler:d,parser:p,lexer:f,runtime:h,lib:o,nodes:m,installJinjaCompat:g,configure:v,reset:function(){r=void 0},compile:function(e,t,n,o){return r||v(),new s(e,t,n,o)},render:function(e,t,n){return r||v(),r.render(e,t,n)},renderString:function(e,t,n){return r||v(),r.renderString(e,t,n)},precompile:c?c.precompile:void 0,precompileString:c?c.precompileString:void 0}},function(e,t,n){var r=n(13),o=[],i=[],a=r.makeRequestCallFromTimer(function(){if(i.length)throw i.shift()});function s(e){var t;(t=o.length?o.pop():new l).task=e,r(t)}function l(){this.task=null}e.exports=s,l.prototype.call=function(){try{this.task.call()}catch(e){s.onerror?s.onerror(e):(i.push(e),a())}finally{this.task=null,o[o.length]=this}}},function(e,t,n){(function(t){function n(e){o.length||r(),o[o.length]=e}e.exports=n;var r,o=[],i=0;function a(){for(;i<o.length;){var e=i;if(i+=1,o[e].call(),i>1024){for(var t=0,n=o.length-i;t<n;t++)o[t]=o[t+i];o.length-=i,i=0}}o.length=0,i=0}var s=void 0!==t?t:self,l=s.MutationObserver||s.WebKitMutationObserver;function u(e){return function(){var t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}r="function"==typeof l?function(e){var t=1,n=new l(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}(a):u(a),n.requestFlush=r,n.makeRequestCallFromTimer=u}).call(t,n(14))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r,o,i,a,s;o=function(){var e=Array.prototype.slice.call(arguments);"function"==typeof e[0]&&e[0].apply(null,e.splice(1))},i=function(e){"function"==typeof setImmediate?setImmediate(e):void 0!==Ju&&Ju.nextTick?Ju.nextTick(e):setTimeout(e,0)},a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s=function(e,t,n){var r=n?i:o;if(t=t||function(){},!a(e)){var s=new Error("First argument to waterfall must be an array of functions");return t(s)}if(!e.length)return t();var l=function(e){return function(n){if(n)t.apply(null,arguments),t=function(){};else{var o=Array.prototype.slice.call(arguments,1),i=e.next();i?o.push(l(i)):o.push(t),r(function(){e.apply(null,o)})}}};l(function(e){var t=function(n){var r=function(){return e.length&&e[n].apply(null,arguments),r.next()};return r.next=function(){return n<e.length-1?t(n+1):null},r};return t(0)}(e))()},void 0===(r=function(){return s}.apply(t,[]))||(e.exports=r)},function(e,t,n){var r,o="object"==typeof Reflect?Reflect:null,i=o&&"function"==typeof o.apply?o.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise(function(n,r){function o(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}v(e,t,i,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&v(e,"error",t,n)}(e,o,{once:!0})})},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var l=10;function u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var o,i,a,s;if(u(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),a=i[t]),void 0===a)a=i[t]=n,++e._eventsCount;else if("function"==typeof a?a=i[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(o=c(e))>0&&a.length>o&&!a.warned){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=a.length,s=l,console&&console.warn&&console.warn(s)}return e}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=p.bind(r);return o.listener=n,r.wrapFn=o,o}function h(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):g(o,o.length)}function m(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function g(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function v(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function o(i){r.once&&e.removeEventListener(t,o),n(i)})}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");l=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)i(l,this,t);else{var u=l.length,c=g(l,u);for(n=0;n<u;++n)i(c[n],this,t)}return!0},s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)},s.prototype.once=function(e,t){return u(t),this.on(e,f(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,f(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,o,i,a;if(u(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){a=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return h(this,e,!0)},s.prototype.rawListeners=function(e){return h(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){var r=n(3),o=n(0),i=0;function a(){return"hole_"+i++}function s(e,t){for(var n=null,r=0;r<e.length;r++){var o=t(e[r]);o!==e[r]&&(n||(n=e.slice()),n[r]=o)}return n||e}function l(e,t,n){if(!(e instanceof r.Node))return e;if(!n){var o=t(e);if(o&&o!==e)return o}if(e instanceof r.NodeList){var i=s(e.children,function(e){return l(e,t,n)});i!==e.children&&(e=new r[e.typename](e.lineno,e.colno,i))}else if(e instanceof r.CallExtension){var a=l(e.args,t,n),u=s(e.contentArgs,function(e){return l(e,t,n)});a===e.args&&u===e.contentArgs||(e=new r[e.typename](e.extName,e.prop,a,u))}else{var c=e.fields.map(function(t){return e[t]}),d=s(c,function(e){return l(e,t,n)});d!==c&&(e=new r[e.typename](e.lineno,e.colno),d.forEach(function(t,n){e[e.fields[n]]=t}))}return n&&t(e)||e}function u(e,t){return l(e,t,!0)}function c(e,t,n){var i=[],s=u(n?e[n]:e,function(e){var n;return e instanceof r.Block?e:((e instanceof r.Filter&&-1!==o.indexOf(t,e.name.value)||e instanceof r.CallExtensionAsync)&&(n=new r.Symbol(e.lineno,e.colno,a()),i.push(new r.FilterAsync(e.lineno,e.colno,e.name,e.args,n))),n)});return n?e[n]=s:e=s,i.length?(i.push(e),new r.NodeList(e.lineno,e.colno,i)):e}function d(e,t){return function(e){return u(e,function(e){if(e instanceof r.If||e instanceof r.For){var t=!1;if(l(e,function(e){if(e instanceof r.FilterAsync||e instanceof r.IfAsync||e instanceof r.AsyncEach||e instanceof r.AsyncAll||e instanceof r.CallExtensionAsync)return t=!0,e}),t){if(e instanceof r.If)return new r.IfAsync(e.lineno,e.colno,e.cond,e.body,e.else_);if(e instanceof r.For&&!(e instanceof r.AsyncAll))return new r.AsyncEach(e.lineno,e.colno,e.arr,e.name,e.body,e.else_)}}})}(function(e){return l(e,function(e){if(e instanceof r.Block){var t=!1,n=a();e.body=l(e.body,function(e){if(e instanceof r.FunCall&&"super"===e.name.value)return t=!0,new r.Symbol(e.lineno,e.colno,n)}),t&&e.body.children.unshift(new r.Super(0,0,e.name,new r.Symbol(0,0,n)))}})}(function(e,t){return u(e,function(e){return e instanceof r.Output?c(e,t):e instanceof r.Set?c(e,t,"value"):e instanceof r.For?c(e,t,"arr"):e instanceof r.If?c(e,t,"cond"):e instanceof r.CallExtension?c(e,t,"args"):void 0})}(e,t)))}e.exports={transform:function(e,t){return d(e,t||[])}}},function(e,t,n){var r=n(0),o=n(2);function i(e,t){return null==e||!1===e?t:e}function a(e){return e!=e}function s(e){var t=(e=i(e,"")).toLowerCase();return o.copySafeness(e,t.charAt(0).toUpperCase()+t.slice(1))}function l(e){if(r.isString(e))return e.split("");if(r.isObject(e))return r._entries(e||{}).map(function(e){return{key:e[0],value:e[1]}});if(r.isArray(e))return e;throw new r.TemplateError("list filter: type not iterable")}function u(e){return function(t,n,o){void 0===n&&(n="truthy");var i=this,a=i.env.getTest(n);return r.toArray(t).filter(function(t){return a.call(i,t,o)===e})}}function c(e){return o.copySafeness(e,e.replace(/^\s*|\s*$/g,""))}(t=e.exports={}).abs=Math.abs,t.batch=function(e,t,n){var r,o=[],i=[];for(r=0;r<e.length;r++)r%t===0&&i.length&&(o.push(i),i=[]),i.push(e[r]);if(i.length){if(n)for(r=i.length;r<t;r++)i.push(n);o.push(i)}return o},t.capitalize=s,t.center=function(e,t){if(t=t||80,(e=i(e,"")).length>=t)return e;var n=t-e.length,a=r.repeat(" ",n/2-n%2),s=r.repeat(" ",n/2);return o.copySafeness(e,a+e+s)},t.default=function(e,t,n){return n?e||t:void 0!==e?e:t},t.dictsort=function(e,t,n){if(!r.isObject(e))throw new r.TemplateError("dictsort filter: val must be an object");var o,i=[];for(var a in e)i.push([a,e[a]]);if(void 0===n||"key"===n)o=0;else{if("value"!==n)throw new r.TemplateError("dictsort filter: You can only sort by either key or value");o=1}return i.sort(function(e,n){var i=e[o],a=n[o];return t||(r.isString(i)&&(i=i.toUpperCase()),r.isString(a)&&(a=a.toUpperCase())),i>a?1:i===a?0:-1}),i},t.dump=function(e,t){return JSON.stringify(e,null,t)},t.escape=function(e){return e instanceof o.SafeString?e:(e=null==e?"":e,o.markSafe(r.escape(e.toString())))},t.safe=function(e){return e instanceof o.SafeString?e:(e=null==e?"":e,o.markSafe(e.toString()))},t.first=function(e){return e[0]},t.forceescape=function(e){return e=null==e?"":e,o.markSafe(r.escape(e.toString()))},t.groupby=function(e,t){return r.groupBy(e,t,this.env.opts.throwOnUndefined)},t.indent=function(e,t,n){if(""===(e=i(e,"")))return"";t=t||4;var a=e.split("\n"),s=r.repeat(" ",t),l=a.map(function(e,t){return 0!==t||n?""+s+e:e}).join("\n");return o.copySafeness(e,l)},t.join=function(e,t,n){return t=t||"",n&&(e=r.map(e,function(e){return e[n]})),e.join(t)},t.last=function(e){return e[e.length-1]},t.length=function(e){var t=i(e,"");return void 0!==t?"function"==typeof Map&&t instanceof Map||"function"==typeof Set&&t instanceof Set?t.size:!r.isObject(t)||t instanceof o.SafeString?t.length:r.keys(t).length:0},t.list=l,t.lower=function(e){return(e=i(e,"")).toLowerCase()},t.nl2br=function(e){return null==e?"":o.copySafeness(e,e.replace(/\r\n|\n/g,"<br />\n"))},t.random=function(e){return e[Math.floor(Math.random()*e.length)]},t.reject=u(!1),t.rejectattr=function(e,t){return e.filter(function(e){return!e[t]})},t.select=u(!0),t.selectattr=function(e,t){return e.filter(function(e){return!!e[t]})},t.replace=function(e,t,n,r){var i=e;if(t instanceof RegExp)return e.replace(t,n);void 0===r&&(r=-1);var a="";if("number"==typeof t)t=""+t;else if("string"!=typeof t)return e;if("number"==typeof e&&(e=""+e),"string"!=typeof e&&!(e instanceof o.SafeString))return e;if(""===t)return a=n+e.split("").join(n)+n,o.copySafeness(e,a);var s=e.indexOf(t);if(0===r||-1===s)return e;for(var l=0,u=0;s>-1&&(-1===r||u<r);)a+=e.substring(l,s)+n,l=s+t.length,u++,s=e.indexOf(t,l);return l<e.length&&(a+=e.substring(l)),o.copySafeness(i,a)},t.reverse=function(e){var t;return(t=r.isString(e)?l(e):r.map(e,function(e){return e})).reverse(),r.isString(e)?o.copySafeness(e,t.join("")):t},t.round=function(e,t,n){t=t||0;var r=Math.pow(10,t);return("ceil"===n?Math.ceil:"floor"===n?Math.floor:Math.round)(e*r)/r},t.slice=function(e,t,n){for(var r=Math.floor(e.length/t),o=e.length%t,i=[],a=0,s=0;s<t;s++){var l=a+s*r;s<o&&a++;var u=a+(s+1)*r,c=e.slice(l,u);n&&s>=o&&c.push(n),i.push(c)}return i},t.sum=function(e,t,n){return void 0===n&&(n=0),t&&(e=r.map(e,function(e){return e[t]})),n+e.reduce(function(e,t){return e+t},0)},t.sort=o.makeMacro(["value","reverse","case_sensitive","attribute"],[],function(e,t,n,o){var i=this,a=r.map(e,function(e){return e}),s=r.getAttrGetter(o);return a.sort(function(e,a){var l=o?s(e):e,u=o?s(a):a;if(i.env.opts.throwOnUndefined&&o&&(void 0===l||void 0===u))throw new TypeError('sort: attribute "'+o+'" resolved to undefined');return!n&&r.isString(l)&&r.isString(u)&&(l=l.toLowerCase(),u=u.toLowerCase()),l<u?t?1:-1:l>u?t?-1:1:0}),a}),t.string=function(e){return o.copySafeness(e,e)},t.striptags=function(e,t){var n=c((e=i(e,"")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|<!--[\s\S]*?-->/gi,"")),r="";return r=t?n.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,"\n").replace(/\n\n\n+/g,"\n\n"):n.replace(/\s+/gi," "),o.copySafeness(e,r)},t.title=function(e){var t=(e=i(e,"")).split(" ").map(function(e){return s(e)});return o.copySafeness(e,t.join(" "))},t.trim=c,t.truncate=function(e,t,n,r){var a=e;if(t=t||255,(e=i(e,"")).length<=t)return e;if(n)e=e.substring(0,t);else{var s=e.lastIndexOf(" ",t);-1===s&&(s=t),e=e.substring(0,s)}return e+=null!=r?r:"...",o.copySafeness(a,e)},t.upper=function(e){return(e=i(e,"")).toUpperCase()},t.urlencode=function(e){var t=encodeURIComponent;return r.isString(e)?t(e):(r.isArray(e)?e:r._entries(e)).map(function(e){var n=e[0],r=e[1];return t(n)+"="+t(r)}).join("&")};var d=/^(?:\(|<|<)?(.*?)(?:\.|,|\)|\n|>)?$/,p=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,f=/^https?:\/\/.*$/,h=/^www\./,m=/\.(?:org|net|com)(?:\:|\/|$)/;t.urlize=function(e,t,n){a(t)&&(t=1/0);var r=!0===n?' rel="nofollow"':"";return e.split(/(\s+)/).filter(function(e){return e&&e.length}).map(function(e){var n=e.match(d),o=n?n[1]:e,i=o.substr(0,t);return f.test(o)?'<a href="'+o+'"'+r+">"+i+"</a>":h.test(o)?'<a href="http://'+o+'"'+r+">"+i+"</a>":p.test(o)?'<a href="mailto:'+o+'">'+o+"</a>":m.test(o)?'<a href="http://'+o+'"'+r+">"+i+"</a>":e}).join("")},t.wordcount=function(e){var t=(e=i(e,""))?e.match(/\w+/g):null;return t?t.length:null},t.float=function(e,t){var n=parseFloat(e);return a(n)?t:n};var g=o.makeMacro(["value","default","base"],[],function(e,t,n){void 0===n&&(n=10);var r=parseInt(e,n);return a(r)?t:r});t.int=g,t.d=t.default,t.e=t.escape},function(e,t,n){function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}var o=function(e){var t,n;function o(t){var n;return(n=e.call(this)||this).precompiled=t||{},n}return n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n),o.prototype.getSource=function(e){return this.precompiled[e]?{src:{type:"code",obj:this.precompiled[e]},path:e}:null},o}(n(6));e.exports={PrecompiledLoader:o}},function(e,t,n){var r=n(2).SafeString;t.callable=function(e){return"function"==typeof e},t.defined=function(e){return void 0!==e},t.divisibleby=function(e,t){return e%t===0},t.escaped=function(e){return e instanceof r},t.equalto=function(e,t){return e===t},t.eq=t.equalto,t.sameas=t.equalto,t.even=function(e){return e%2==0},t.falsy=function(e){return!e},t.ge=function(e,t){return e>=t},t.greaterthan=function(e,t){return e>t},t.gt=t.greaterthan,t.le=function(e,t){return e<=t},t.lessthan=function(e,t){return e<t},t.lt=t.lessthan,t.lower=function(e){return e.toLowerCase()===e},t.ne=function(e,t){return e!==t},t.null=function(e){return null===e},t.number=function(e){return"number"==typeof e},t.odd=function(e){return e%2==1},t.string=function(e){return"string"==typeof e},t.truthy=function(e){return!!e},t.undefined=function(e){return void 0===e},t.upper=function(e){return e.toUpperCase()===e},t.iterable=function(e){return"undefined"!=typeof Symbol?!!e[Symbol.iterator]:Array.isArray(e)||"string"==typeof e},t.mapping=function(e){var t=null!=e&&"object"==typeof e&&!Array.isArray(e);return Set?t&&!(e instanceof Set):t}},function(e,t,n){e.exports=function(){return{range:function(e,t,n){void 0===t?(t=e,e=0,n=1):n||(n=1);var r=[];if(n>0)for(var o=e;o<t;o+=n)r.push(o);else for(var i=e;i>t;i+=n)r.push(i);return r},cycler:function(){return function(e){var t=-1;return{current:null,reset:function(){t=-1,this.current=null},next:function(){return++t>=e.length&&(t=0),this.current=e[t],this.current}}}(Array.prototype.slice.call(arguments))},joiner:function(e){return function(e){e=e||",";var t=!0;return function(){var n=t?"":e;return t=!1,n}}(e)}}}},function(e,t,n){var r=n(4);e.exports=function(e,t){function n(e,t){if(this.name=e,this.path=e,this.defaultEngine=t.defaultEngine,this.ext=r.extname(e),!this.ext&&!this.defaultEngine)throw new Error("No default engine was specified and no extension was provided.");this.ext||(this.name+=this.ext=("."!==this.defaultEngine[0]?".":"")+this.defaultEngine)}return n.prototype.render=function(t,n){e.render(this.name,t,n)},t.set("view",n),t.set("nunjucksEnv",e),e}},function(e,t,n){var r=n(4),o=n(4),i=n(0)._prettifyError,a=n(5),s=n(7).Environment,l=n(24);function u(e,t){return!!Array.isArray(t)&&t.some(function(t){return e.match(t)})}function c(e,t){(t=t||{}).isString=!0;var n=t.env||new s([]),r=t.wrapper||l;if(!t.name)throw new Error('the "name" option is required when compiling a string');return r([d(e,t.name,n)],t)}function d(e,t,n){var r,o=(n=n||new s([])).asyncFilters,l=n.extensionsList;t=t.replace(/\\/g,"/");try{r=a.compile(e,o,l,t,n.opts)}catch(e){throw i(t,!1,e)}return{name:t,template:r}}e.exports={precompile:function(e,t){var n=(t=t||{}).env||new s([]),i=t.wrapper||l;if(t.isString)return c(e,t);var a=r.existsSync(e)&&r.statSync(e),p=[],f=[];if(a.isFile())p.push(d(r.readFileSync(e,"utf-8"),t.name||e,n));else if(a.isDirectory()){!function n(i){r.readdirSync(i).forEach(function(a){var s=o.join(i,a),l=s.substr(o.join(e,"/").length),c=r.statSync(s);c&&c.isDirectory()?u(l+="/",t.exclude)||n(s):u(l,t.include)&&f.push(s)})}(e);for(var h=0;h<f.length;h++){var m=f[h].replace(o.join(e,"/"),"");try{p.push(d(r.readFileSync(f[h],"utf-8"),m,n))}catch(e){if(!t.force)throw e;console.error(e)}}}return i(p,t)},precompileString:c}},function(e,t,n){e.exports=function(e,t){var n="";t=t||{};for(var r=0;r<e.length;r++){var o=JSON.stringify(e[r].name);n+="(function() {(window.nunjucksPrecompiled = window.nunjucksPrecompiled || {})["+o+"] = (function() {\n"+e[r].template+"\n})();\n",t.asFunction&&(n+="return function(ctx, cb) { return nunjucks.render("+o+", ctx, cb); }\n"),n+="})();\n"}return n}},function(e,t,n){e.exports=function(){var e,t,n=this.runtime,r=this.lib,o=this.compiler.Compiler,i=this.parser.Parser,a=this.nodes,s=this.lexer,l=n.contextOrFrameLookup,u=n.memberLookup;function c(e){return{index:e.index,lineno:e.lineno,colno:e.colno}}if(o&&(e=o.prototype.assertType),i&&(t=i.prototype.parseAggregate),n.contextOrFrameLookup=function(e,t,n){var r=l.apply(this,arguments);if(void 0!==r)return r;switch(n){case"True":return!0;case"False":return!1;case"None":return null;default:return}},a&&o&&i){var d=a.Node.extend("Slice",{fields:["start","stop","step"],init:function(e,t,n,r,o){n=n||new a.Literal(e,t,null),r=r||new a.Literal(e,t,null),o=o||new a.Literal(e,t,1),this.parent(e,t,n,r,o)}});o.prototype.assertType=function(t){t instanceof d||e.apply(this,arguments)},o.prototype.compileSlice=function(e,t){this._emit("("),this._compileExpression(e.start,t),this._emit("),("),this._compileExpression(e.stop,t),this._emit("),("),this._compileExpression(e.step,t),this._emit(")")},i.prototype.parseAggregate=function(){var e=this,n=c(this.tokens);n.colno--,n.index--;try{return t.apply(this)}catch(t){var o=c(this.tokens),i=function(){return r._assign(e.tokens,o),t};r._assign(this.tokens,n),this.peeked=!1;var l=this.peekToken();if(l.type!==s.TOKEN_LEFT_BRACKET)throw i();this.nextToken();for(var u=new d(l.lineno,l.colno),p=!1,f=0;f<=u.fields.length&&!this.skip(s.TOKEN_RIGHT_BRACKET);f++){if(f===u.fields.length){if(!p)break;this.fail("parseSlice: too many slice components",l.lineno,l.colno)}this.skip(s.TOKEN_COLON)?p=!0:(u[u.fields[f]]=this.parseExpression(),p=this.skip(s.TOKEN_COLON)||p)}if(!p)throw i();return new a.Array(l.lineno,l.colno,[u])}}}function p(e,t,r,o){e=e||[],null===t&&(t=o<0?e.length-1:0),null===r?r=o<0?-1:e.length:r<0&&(r+=e.length),t<0&&(t+=e.length);for(var i=[],a=t;!(a<0||a>e.length||o>0&&a>=r||o<0&&a<=r);a+=o)i.push(n.memberLookup(e,a));return i}function f(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var h={pop:function(e){if(void 0===e)return this.pop();if(e>=this.length||e<0)throw new Error("KeyError");return this.splice(e,1)},append:function(e){return this.push(e)},remove:function(e){for(var t=0;t<this.length;t++)if(this[t]===e)return this.splice(t,1);throw new Error("ValueError")},count:function(e){for(var t=0,n=0;n<this.length;n++)this[n]===e&&t++;return t},index:function(e){var t;if(-1===(t=this.indexOf(e)))throw new Error("ValueError");return t},find:function(e){return this.indexOf(e)},insert:function(e,t){return this.splice(e,0,t)}},m={items:function(){return r._entries(this)},values:function(){return r._values(this)},keys:function(){return r.keys(this)},get:function(e,t){var n=this[e];return void 0===n&&(n=t),n},has_key:function(e){return f(this,e)},pop:function(e,t){var n=this[e];if(void 0===n&&void 0!==t)n=t;else{if(void 0===n)throw new Error("KeyError");delete this[e]}return n},popitem:function(){var e=r.keys(this);if(!e.length)throw new Error("KeyError");var t=e[0],n=this[t];return delete this[t],[t,n]},setdefault:function(e,t){return void 0===t&&(t=null),e in this||(this[e]=t),this[e]},update:function(e){return r._assign(this,e),null}};return m.iteritems=m.items,m.itervalues=m.values,m.iterkeys=m.keys,n.memberLookup=function(e,t,n){return 4===arguments.length?p.apply(this,arguments):(e=e||{},r.isArray(e)&&f(h,t)?h[t].bind(e):r.isObject(e)&&f(m,t)?m[t].bind(e):u.apply(this,arguments))},function(){n.contextOrFrameLookup=l,n.memberLookup=u,o&&(o.prototype.assertType=e),i&&(i.prototype.parseAggregate=t)}}}])},e.exports=t()}(Zu)),Zu.exports),tc=t(ec);const nc={GoogleChart:function({chart:e,source:t,view:n,report:r,schema:o,dashboard:i,query:a}){const[s,c]=u.useState([]),d=Ou(),[p,f]=u.useState([]);l.useEffect(()=>{(async()=>{const e=await Cu.getDateRanges();f(e)})()},[]);const h=l.useMemo(()=>{const e="YYYY-MM-dd",t=a?.date_range?.name,n=p.find(e=>e.name===t);if(!n)return e;return _u[n?.granularity]||e},[p,a]);return u.useEffect(()=>{if(!(e&&n&&t&&r&&o))return;let i=[];i.push(function(e,t){const n=[...t.doc.metrics,...t.doc.dimensions],r=e.columns.reduce((e,t)=>{const r=n.find(e=>e.name===t.name)||t;return e.push(r.title||r.name),e},[]);return r}(n,o));const a=Ja(n,o);t?.forEach(e=>{const t=a(e);i.push(t)}),t?.length?c(i):c()},[e,t,n,r,o]),s?u.createElement("div",{style:{}},u.createElement(Ka,Br({width:e?.doc.size?.width||"100%",chartType:e?.doc.chart?.type,data:s,options:(t=>{const n=["#468682","#ff686b","#6c757d","#FFD700","#073b4c"];if("Table"===e?.doc.chart?.type)return{...e?.doc.chart?.options,cssClassNames:d};if("AreaChart"===e?.doc.chart?.type){const r=e?.doc.chart?.options?.hAxis||{},o={...{ticks:t.slice(1).map(e=>e[0]),format:h},...r};return{...e?.doc.chart?.options,hAxis:o,focusTarget:"category",colors:n}}return{...e?.doc.chart?.options,colors:n}})(s)},e?.doc.chart?.props))):u.createElement("div",null)},LabelChart:function({chart:e,source:t,view:n,report:r,schema:o}){const[i,a]=u.useState([]),[s,l]=u.useState(),[c,d]=u.useState();return u.useEffect(()=>{if(!(e&&n&&t&&r&&o))return;let i=[];const s=Ja(n,o);t.forEach(e=>i.push(s(e))),a(i);const u=e?.doc?.chart?.options||{},c=u?.index||0;if(i.length>0&&l(i[0][c]),u.subText?.format){tc.configure({autoescape:!1});const e=Ja(n,o,"object")(t[0]),r=tc.renderString(u.subText?.format,e);d(r)}},[e,t,n,r,o]),u.createElement("div",{style:{display:"flex",justifyContent:"center",alignContent:"center",height:"100%",flexDirection:"column"}},u.createElement(qo,{variant:"h6"},s?.f||s),u.createElement(qo,{variant:"caption"},c))}};function rc(e,t){return void 0!==nc[e]?u.createElement(nc[e],t):u.createElement(Ra,t)}var oc=new Map,ic=new WeakMap,ac=0;function sc(e){return Object.keys(e).sort().filter(t=>void 0!==e[t]).map(t=>{return`${t}_${"root"===t?(n=e.root,n?(ic.has(n)||(ac+=1,ic.set(n,ac.toString())),ic.get(n)):"0"):e[t]}`;var n}).toString()}function lc(e,t,n={},r=undefined){if(void 0===window.IntersectionObserver&&void 0!==r){const o=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:"number"==typeof n.threshold?n.threshold:0,time:0,boundingClientRect:o,intersectionRect:o,rootBounds:o}),()=>{}}const{id:o,observer:i,elements:a}=function(e){const t=sc(e);let n=oc.get(t);if(!n){const r=new Map;let o;const i=new IntersectionObserver(t=>{t.forEach(t=>{var n;const i=t.isIntersecting&&o.some(e=>t.intersectionRatio>=e);e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=i),null==(n=r.get(t.target))||n.forEach(e=>{e(i,t)})})},e);o=i.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:i,elements:r},oc.set(t,n)}return n}(n),s=a.get(e)||[];return a.has(e)||a.set(e,s),s.push(t),i.observe(e),function(){s.splice(s.indexOf(t),1),0===s.length&&(a.delete(e),i.unobserve(e)),0===a.size&&(i.disconnect(),oc.delete(o))}}const uc={black:"#000",white:"#fff"},cc="#e57373",dc="#ef5350",pc="#f44336",fc="#d32f2f",hc="#c62828",mc="#f3e5f5",gc="#ce93d8",vc="#ba68c8",yc="#ab47bc",bc="#9c27b0",wc="#7b1fa2",xc="#e3f2fd",kc="#90caf9",Sc="#42a5f5",Ec="#1976d2",Cc="#1565c0",Oc="#4fc3f7",_c="#29b6f6",Tc="#03a9f4",Rc="#0288d1",Pc="#01579b",Ac="#81c784",Lc="#66bb6a",Nc="#4caf50",Mc="#388e3c",Ic="#2e7d32",Fc="#1b5e20",$c="#ffb74d",jc="#ffa726",zc="#ff9800",Bc="#f57c00",Dc="#e65100",Wc={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function Uc(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>n.searchParams.append("args[]",e)),`Minified MUI error #${e}; visit ${n} for the full message.`}var Vc="$$material";var Kc=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),Hc="-ms-",qc="-moz-",Gc="-webkit-",Yc="comm",Xc="rule",Qc="decl",Jc="@keyframes",Zc=Math.abs,ed=String.fromCharCode,td=Object.assign;function nd(e){return e.trim()}function rd(e,t,n){return e.replace(t,n)}function od(e,t){return e.indexOf(t)}function id(e,t){return 0|e.charCodeAt(t)}function ad(e,t,n){return e.slice(t,n)}function sd(e){return e.length}function ld(e){return e.length}function ud(e,t){return t.push(e),e}var cd=1,dd=1,pd=0,fd=0,hd=0,md="";function gd(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:cd,column:dd,length:a,return:""}}function vd(e,t){return td(gd("",null,null,"",null,null,0),e,{length:-e.length},t)}function yd(){return hd=fd>0?id(md,--fd):0,dd--,10===hd&&(dd=1,cd--),hd}function bd(){return hd=fd<pd?id(md,fd++):0,dd++,10===hd&&(dd=1,cd++),hd}function wd(){return id(md,fd)}function xd(){return fd}function kd(e,t){return ad(md,e,t)}function Sd(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Ed(e){return cd=dd=1,pd=sd(md=e),fd=0,[]}function Cd(e){return md="",e}function Od(e){return nd(kd(fd-1,Rd(91===e?e+2:40===e?e+1:e)))}function _d(e){for(;(hd=wd())&&hd<33;)bd();return Sd(e)>2||Sd(hd)>3?"":" "}function Td(e,t){for(;--t&&bd()&&!(hd<48||hd>102||hd>57&&hd<65||hd>70&&hd<97););return kd(e,xd()+(t<6&&32==wd()&&32==bd()))}function Rd(e){for(;bd();)switch(hd){case e:return fd;case 34:case 39:34!==e&&39!==e&&Rd(hd);break;case 40:41===e&&Rd(e);break;case 92:bd()}return fd}function Pd(e,t){for(;bd()&&e+hd!==57&&(e+hd!==84||47!==wd()););return"/*"+kd(t,fd-1)+"*"+ed(47===e?e:bd())}function Ad(e){for(;!Sd(wd());)bd();return kd(e,fd)}function Ld(e){return Cd(Nd("",null,null,null,[""],e=Ed(e),0,[0],e))}function Nd(e,t,n,r,o,i,a,s,l){for(var u=0,c=0,d=a,p=0,f=0,h=0,m=1,g=1,v=1,y=0,b="",w=o,x=i,k=r,S=b;g;)switch(h=y,y=bd()){case 40:if(108!=h&&58==id(S,d-1)){-1!=od(S+=rd(Od(y),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:S+=Od(y);break;case 9:case 10:case 13:case 32:S+=_d(h);break;case 92:S+=Td(xd()-1,7);continue;case 47:switch(wd()){case 42:case 47:ud(Id(Pd(bd(),xd()),t,n),l);break;default:S+="/"}break;case 123*m:s[u++]=sd(S)*v;case 125*m:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+c:-1==v&&(S=rd(S,/\f/g,"")),f>0&&sd(S)-d&&ud(f>32?Fd(S+";",r,n,d-1):Fd(rd(S," ","")+";",r,n,d-2),l);break;case 59:S+=";";default:if(ud(k=Md(S,t,n,u,c,o,s,b,w=[],x=[],d),i),123===y)if(0===c)Nd(S,t,k,k,w,i,d,s,x);else switch(99===p&&110===id(S,3)?100:p){case 100:case 108:case 109:case 115:Nd(e,k,k,r&&ud(Md(e,k,k,0,0,o,s,b,o,w=[],d),x),o,x,d,s,r?w:x);break;default:Nd(S,k,k,k,[""],x,0,s,x)}}u=c=f=0,m=v=1,b=S="",d=a;break;case 58:d=1+sd(S),f=h;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==yd())continue;switch(S+=ed(y),y*m){case 38:v=c>0?1:(S+="\f",-1);break;case 44:s[u++]=(sd(S)-1)*v,v=1;break;case 64:45===wd()&&(S+=Od(bd())),p=wd(),c=d=sd(b=S+=Ad(xd())),y++;break;case 45:45===h&&2==sd(S)&&(m=0)}}return i}function Md(e,t,n,r,o,i,a,s,l,u,c){for(var d=o-1,p=0===o?i:[""],f=ld(p),h=0,m=0,g=0;h<r;++h)for(var v=0,y=ad(e,d+1,d=Zc(m=a[h])),b=e;v<f;++v)(b=nd(m>0?p[v]+" "+y:rd(y,/&\f/g,p[v])))&&(l[g++]=b);return gd(e,t,n,0===o?Xc:s,l,u,c)}function Id(e,t,n){return gd(e,t,n,Yc,ed(hd),ad(e,2,-2),0)}function Fd(e,t,n,r){return gd(e,t,n,Qc,ad(e,0,r),ad(e,r+1,-1),r)}function $d(e,t){for(var n="",r=ld(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function jd(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case Qc:return e.return=e.return||e.value;case Yc:return"";case Jc:return e.return=e.value+"{"+$d(e.children,r)+"}";case Xc:e.value=e.props.join(",")}return sd(n=$d(e.children,r))?e.return=e.value+"{"+n+"}":""}function zd(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var Bd=function(e,t,n){for(var r=0,o=0;r=o,o=wd(),38===r&&12===o&&(t[n]=1),!Sd(o);)bd();return kd(e,fd)},Dd=function(e,t){return Cd(function(e,t){var n=-1,r=44;do{switch(Sd(r)){case 0:38===r&&12===wd()&&(t[n]=1),e[n]+=Bd(fd-1,t,n);break;case 2:e[n]+=Od(r);break;case 4:if(44===r){e[++n]=58===wd()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=ed(r)}}while(r=bd());return e}(Ed(e),t))},Wd=new WeakMap,Ud=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Wd.get(n))&&!r){Wd.set(e,!0);for(var o=[],i=Dd(t,o),a=n.props,s=0,l=0;s<i.length;s++)for(var u=0;u<a.length;u++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[u]):a[u]+" "+i[s]}}},Vd=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Kd(e,t){switch(function(e,t){return 45^id(e,0)?(((t<<2^id(e,0))<<2^id(e,1))<<2^id(e,2))<<2^id(e,3):0}(e,t)){case 5103:return Gc+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Gc+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Gc+e+qc+e+Hc+e+e;case 6828:case 4268:return Gc+e+Hc+e+e;case 6165:return Gc+e+Hc+"flex-"+e+e;case 5187:return Gc+e+rd(e,/(\w+).+(:[^]+)/,Gc+"box-$1$2"+Hc+"flex-$1$2")+e;case 5443:return Gc+e+Hc+"flex-item-"+rd(e,/flex-|-self/,"")+e;case 4675:return Gc+e+Hc+"flex-line-pack"+rd(e,/align-content|flex-|-self/,"")+e;case 5548:return Gc+e+Hc+rd(e,"shrink","negative")+e;case 5292:return Gc+e+Hc+rd(e,"basis","preferred-size")+e;case 6060:return Gc+"box-"+rd(e,"-grow","")+Gc+e+Hc+rd(e,"grow","positive")+e;case 4554:return Gc+rd(e,/([^-])(transform)/g,"$1"+Gc+"$2")+e;case 6187:return rd(rd(rd(e,/(zoom-|grab)/,Gc+"$1"),/(image-set)/,Gc+"$1"),e,"")+e;case 5495:case 3959:return rd(e,/(image-set\([^]*)/,Gc+"$1$`$1");case 4968:return rd(rd(e,/(.+:)(flex-)?(.*)/,Gc+"box-pack:$3"+Hc+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Gc+e+e;case 4095:case 3583:case 4068:case 2532:return rd(e,/(.+)-inline(.+)/,Gc+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(sd(e)-1-t>6)switch(id(e,t+1)){case 109:if(45!==id(e,t+4))break;case 102:return rd(e,/(.+:)(.+)-([^]+)/,"$1"+Gc+"$2-$3$1"+qc+(108==id(e,t+3)?"$3":"$2-$3"))+e;case 115:return~od(e,"stretch")?Kd(rd(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==id(e,t+1))break;case 6444:switch(id(e,sd(e)-3-(~od(e,"!important")&&10))){case 107:return rd(e,":",":"+Gc)+e;case 101:return rd(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Gc+(45===id(e,14)?"inline-":"")+"box$3$1"+Gc+"$2$3$1"+Hc+"$2box$3")+e}break;case 5936:switch(id(e,t+11)){case 114:return Gc+e+Hc+rd(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Gc+e+Hc+rd(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Gc+e+Hc+rd(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Gc+e+Hc+e+e}return e}var Hd=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Qc:e.return=Kd(e.value,e.length);break;case Jc:return $d([vd(e,{value:rd(e.value,"@","@"+Gc)})],r);case Xc:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return $d([vd(e,{props:[rd(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return $d([vd(e,{props:[rd(t,/:(plac\w+)/,":"+Gc+"input-$1")]}),vd(e,{props:[rd(t,/:(plac\w+)/,":-moz-$1")]}),vd(e,{props:[rd(t,/:(plac\w+)/,Hc+"input-$1")]})],r)}return""})}}],qd=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var r,o,i=e.stylisPlugins||Hd,a={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)});var l,u,c=[jd,(u=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&u(e)})],d=function(e){var t=ld(e);return function(n,r,o,i){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,i)||"";return a}}([Ud,Vd].concat(i,c));o=function(e,t,n,r){l=n,function(e){$d(Ld(e),d)}(e?e+"{"+t.styles+"}":t.styles),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new Kc({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:o};return p.sheet.hydrate(s),p};function Gd(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}var Yd=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Xd=function(e,t,n){Yd(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}};var Qd={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Jd=/[A-Z]|^ms/g,Zd=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ep=function(e){return 45===e.charCodeAt(1)},tp=function(e){return null!=e&&"boolean"!=typeof e},np=zd(function(e){return ep(e)?e:e.replace(Jd,"-$&").toLowerCase()}),rp=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Zd,function(e,t,n){return ip={name:t,styles:n,next:ip},t})}return 1===Qd[e]||ep(e)||"number"!=typeof t||0===t?t:t+"px"};function op(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return ip={name:o.name,styles:o.styles,next:ip},o.name;var i=n;if(void 0!==i.styles){var a=i.next;if(void 0!==a)for(;void 0!==a;)ip={name:a.name,styles:a.styles,next:ip},a=a.next;return i.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=op(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!=typeof a){var s=a;null!=t&&void 0!==t[s]?r+=i+"{"+t[s]+"}":tp(s)&&(r+=np(i)+":"+rp(i,s)+";")}else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var l=op(e,t,a);switch(i){case"animation":case"animationName":r+=np(i)+":"+l+";";break;default:r+=i+"{"+l+"}"}}else for(var u=0;u<a.length;u++)tp(a[u])&&(r+=np(i)+":"+rp(i,a[u])+";")}return r}(e,t,n);case"function":if(void 0!==e){var s=ip,l=n(e);return ip=s,op(e,t,l)}}var u=n;if(null==t)return u;var c=t[u];return void 0!==c?c:u}var ip,ap=/label:\s*([^\s;{]+)\s*(;|$)/g;function sp(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";ip=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=op(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++){if(o+=op(n,t,e[a]),r)o+=i[a]}ap.lastIndex=0;for(var s,l="";null!==(s=ap.exec(o));)l+="-"+s[1];var u=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:u,styles:o,next:ip}}var lp=!!c.useInsertionEffect&&c.useInsertionEffect,up=lp||function(e){return e()},cp=lp||l.useLayoutEffect,dp=l.createContext("undefined"!=typeof HTMLElement?qd({key:"css"}):null);dp.Provider;var pp,fp,hp=function(e){return l.forwardRef(function(t,n){var r=l.useContext(dp);return e(t,r,n)})},mp=l.createContext({}),gp={}.hasOwnProperty,vp="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",yp=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Yd(t,n,r),up(function(){return Xd(t,n,r)}),null},bp=hp(function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var o=e[vp],i=[r],a="";"string"==typeof e.className?a=Gd(t.registered,i,e.className):null!=e.className&&(a=e.className+" ");var s=sp(i,void 0,l.useContext(mp));a+=t.key+"-"+s.name;var u={};for(var c in e)gp.call(e,c)&&"css"!==c&&c!==vp&&(u[c]=e[c]);return u.className=a,n&&(u.ref=n),l.createElement(l.Fragment,null,l.createElement(yp,{cache:t,serialized:s,isStringTag:"string"==typeof o}),l.createElement(o,u))}),wp=bp,xp=function(e,t){var n=arguments;if(null==t||!gp.call(t,"css"))return l.createElement.apply(void 0,n);var r=n.length,o=new Array(r);o[0]=wp,o[1]=function(e,t){var n={};for(var r in t)gp.call(t,r)&&(n[r]=t[r]);return n[vp]=e,n}(e,t);for(var i=2;i<r;i++)o[i]=n[i];return l.createElement.apply(null,o)};pp=xp||(xp={}),fp||(fp=pp.JSX||(pp.JSX={}));var kp=hp(function(e,t){var n=sp([e.styles],void 0,l.useContext(mp)),r=l.useRef();return cp(function(){var e=t.key+"-global",o=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),i=!1,a=document.querySelector('style[data-emotion="'+e+" "+n.name+'"]');return t.sheet.tags.length&&(o.before=t.sheet.tags[0]),null!==a&&(i=!0,a.setAttribute("data-emotion",e),o.hydrate([a])),r.current=[o,i],function(){o.flush()}},[t]),cp(function(){var e=r.current,o=e[0];if(e[1])e[1]=!1;else{if(void 0!==n.next&&Xd(t,n.next,!0),o.tags.length){var i=o.tags[o.tags.length-1].nextElementSibling;o.before=i,o.flush()}t.insert("",n,o,!1)}},[t,n.name]),null});function Sp(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return sp(t)}function Ep(){var e=Sp.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var Cp=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Op=zd(function(e){return Cp.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),_p=function(e){return"theme"!==e},Tp=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?Op:_p},Rp=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},Pp=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Yd(t,n,r),up(function(){return Xd(t,n,r)}),null},Ap=function e(t,n){var r,o,i=t.__emotion_real===t,a=i&&t.__emotion_base||t;void 0!==n&&(r=n.label,o=n.target);var s=Rp(t,n,i),u=s||Tp(a),c=!u("as");return function(){var d=arguments,p=i&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&p.push("label:"+r+";"),null==d[0]||void 0===d[0].raw)p.push.apply(p,d);else{var h=d[0];p.push(h[0]);for(var m=d.length,g=1;g<m;g++)p.push(d[g],h[g])}var v=hp(function(e,t,n){var r=c&&e.as||a,i="",d=[],f=e;if(null==e.theme){for(var h in f={},e)f[h]=e[h];f.theme=l.useContext(mp)}"string"==typeof e.className?i=Gd(t.registered,d,e.className):null!=e.className&&(i=e.className+" ");var m=sp(p.concat(d),t.registered,f);i+=t.key+"-"+m.name,void 0!==o&&(i+=" "+o);var g=c&&void 0===s?Tp(r):u,v={};for(var y in e)c&&"as"===y||g(y)&&(v[y]=e[y]);return v.className=i,n&&(v.ref=n),l.createElement(l.Fragment,null,l.createElement(Pp,{cache:t,serialized:m,isStringTag:"string"==typeof r}),l.createElement(r,v))});return v.displayName=void 0!==r?r:"Styled("+("string"==typeof a?a:a.displayName||a.name||"Component")+")",v.defaultProps=t.defaultProps,v.__emotion_real=v,v.__emotion_base=a,v.__emotion_styles=p,v.__emotion_forwardProp=s,Object.defineProperty(v,"toString",{value:function(){return"."+o}}),v.withComponent=function(t,r){return e(t,f({},n,r,{shouldForwardProp:Rp(v,r,!0)})).apply(void 0,p)},v}}.bind(null);["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach(function(e){Ap[e]=Ap(e)});var Lp,Np,Mp={exports:{}},Ip={};var Fp=(Np||(Np=1,Mp.exports=function(){if(Lp)return Ip;Lp=1;var e=s(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(e,n,a){var s,l={},u=null,c=null;for(s in void 0!==a&&(u=""+a),void 0!==n.key&&(u=""+n.key),void 0!==n.ref&&(c=n.ref),n)r.call(n,s)&&!i.hasOwnProperty(s)&&(l[s]=n[s]);if(e&&e.defaultProps)for(s in n=e.defaultProps)void 0===l[s]&&(l[s]=n[s]);return{$$typeof:t,type:e,key:u,ref:c,props:l,_owner:o.current}}return Ip.Fragment=n,Ip.jsx=a,Ip.jsxs=a,Ip}()),Mp.exports);function $p(e){const{styles:t,defaultTheme:n={}}=e,r="function"==typeof t?e=>{return t(null==(r=e)||0===Object.keys(r).length?n:e);var r}:t;return Fp.jsx(kp,{styles:r})}
|
|
25
25
|
/**
|
|
26
26
|
* @mui/styled-engine v7.3.6
|
|
27
27
|
*
|
|
@@ -128,4 +128,4 @@ var _BYGD_NC_REPORT_UI=function(){"use strict";function e(e,t){return t.forEach(
|
|
|
128
128
|
animation: ${Dg} 1.4s linear infinite;
|
|
129
129
|
`:null,Vg="string"!=typeof Wg?Sp`
|
|
130
130
|
animation: ${Wg} 1.4s ease-in-out infinite;
|
|
131
|
-
`:null,Kg=Wm("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${sf(n.color)}`]]}})(qm(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:Ug||{animation:`${Dg} 1.4s linear infinite`}},...Object.entries(e.palette).filter(jg()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),Hg=Wm("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),qg=Wm("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${sf(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(qm(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink,style:Vg||{animation:`${Wg} 1.4s ease-in-out infinite`}}]}))),Gg=Wm("circle",{name:"MuiCircularProgress",slot:"Track"})(qm(({theme:e})=>({stroke:"currentColor",opacity:(e.vars||e).palette.action.activatedOpacity}))),Yg=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiCircularProgress"}),{className:r,color:o="primary",disableShrink:i=!1,enableTrackSlot:a=!1,size:s=40,style:l,thickness:u=3.6,value:c=0,variant:d="indeterminate",...p}=n,f={...n,color:o,disableShrink:i,size:s,thickness:u,value:c,variant:d,enableTrackSlot:a},h=(e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e;return Jh({root:["root",n,`color${sf(r)}`],svg:["svg"],track:["track"],circle:["circle",`circle${sf(n)}`,o&&"circleDisableShrink"]},zg,t)})(f),m={},g={},v={};if("determinate"===d){const e=2*Math.PI*((Bg-u)/2);m.strokeDasharray=e.toFixed(3),v["aria-valuenow"]=Math.round(c),m.strokeDashoffset=`${((100-c)/100*e).toFixed(3)}px`,g.transform="rotate(-90deg)"}return Fp.jsx(Kg,{className:Km(h.root,r),style:{width:s,height:s,...g,...l},ownerState:f,ref:t,role:"progressbar",...v,...p,children:Fp.jsxs(Hg,{className:h.svg,ownerState:f,viewBox:"22 22 44 44",children:[a?Fp.jsx(Gg,{className:h.track,ownerState:f,cx:Bg,cy:Bg,r:(Bg-u)/2,fill:"none",strokeWidth:u,"aria-hidden":"true"}):null,Fp.jsx(qg,{className:h.circle,style:m,ownerState:f,cx:Bg,cy:Bg,r:(Bg-u)/2,fill:"none",strokeWidth:u})]})})});function Xg(e){return fh("MuiIconButton",e)}const Qg=hh("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),Jg=Wm(Fg,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,"default"!==n.color&&t[`color${sf(n.color)}`],n.edge&&t[`edge${sf(n.edge)}`],t[`size${sf(n.size)}`]]}})(qm(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),qm(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(jg()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(jg()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${Qg.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${Qg.loading}`]:{color:"transparent"}}))),Zg=Wm("span",{name:"MuiIconButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),ev=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiIconButton"}),{edge:r=!1,children:o,className:i,color:a="default",disabled:s=!1,disableFocusRipple:l=!1,size:u="medium",id:c,loading:d=null,loadingIndicator:p,...f}=n,h=qh(c),m=p??Fp.jsx(Yg,{"aria-labelledby":h,color:"inherit",size:16}),g={...n,edge:r,color:a,disabled:s,disableFocusRipple:l,loading:d,loadingIndicator:m,size:u},v=(e=>{const{classes:t,disabled:n,color:r,edge:o,size:i,loading:a}=e;return Jh({root:["root",a&&"loading",n&&"disabled","default"!==r&&`color${sf(r)}`,o&&`edge${sf(o)}`,`size${sf(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},Xg,t)})(g);return Fp.jsxs(Jg,{id:d?h:c,className:Km(v.root,i),centerRipple:!0,focusRipple:!l,disabled:s||d,ref:t,...f,ownerState:g,children:["boolean"==typeof d&&Fp.jsx("span",{className:v.loadingWrapper,style:{display:"contents"},children:Fp.jsx(Zg,{className:v.loadingIndicator,ownerState:g,children:d&&m})}),o]})});var tv=Jm(Fp.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}));function nv({array1:e,array2:t,parser:n=e=>e}){return e&&t&&e.length===t.length&&e.every((e,r)=>n(e)===n(t[r]))}function rv(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}const ov=function(e={}){const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:o="any",stringify:i,trim:a=!1}=e;return(e,{inputValue:s,getOptionLabel:l})=>{let u=a?s.trim():s;n&&(u=u.toLowerCase()),t&&(u=rv(u));const c=u?e.filter(e=>{let r=(i||l)(e);return n&&(r=r.toLowerCase()),t&&(r=rv(r)),"start"===o?r.startsWith(u):r.includes(u)}):e;return"number"==typeof r?c.slice(0,r):c}}(),iv=e=>null!==e.current&&e.current.parentElement?.contains(document.activeElement),av=[];function sv(e,t,n,r){if(t||null==e||r)return"";const o=n(e);return"string"==typeof o?o:""}function lv(e){const{unstable_isActiveElementInListbox:t=iv,unstable_classNamePrefix:n="Mui",autoComplete:r=!1,autoHighlight:o=!1,autoSelect:i=!1,blurOnSelect:a=!1,clearOnBlur:s=!e.freeSolo,clearOnEscape:u=!1,componentName:c="useAutocomplete",defaultValue:d=(e.multiple?av:null),disableClearable:p=!1,disableCloseOnSelect:f=!1,disabled:h,disabledItemsFocusable:m=!1,disableListWrap:g=!1,filterOptions:v=ov,filterSelectedOptions:y=!1,freeSolo:b=!1,getOptionDisabled:w,getOptionKey:x,getOptionLabel:k=e=>e.label??e,groupBy:S,handleHomeEndKeys:E=!e.freeSolo,id:C,includeInputInList:O=!1,inputValue:_,isOptionEqualToValue:T=(e,t)=>e===t,multiple:R=!1,onChange:P,onClose:A,onHighlightChange:L,onInputChange:N,onOpen:M,open:I,openOnFocus:F=!1,options:$,readOnly:j=!1,renderValue:z,selectOnFocus:B=!e.freeSolo,value:D}=e,W=qh(C);let U=k;U=e=>{const t=k(e);return"string"!=typeof t?String(t):t};const V=l.useRef(!1),K=l.useRef(!0),H=l.useRef(null),q=l.useRef(null),[G,Y]=l.useState(null),[X,Q]=l.useState(-1),J=o?0:-1,Z=l.useRef(J),ee=l.useRef(sv(d??D,R,U)).current,[te,ne]=rg({controlled:D,default:d,name:c}),[re,oe]=rg({controlled:_,default:ee,name:c,state:"inputValue"}),[ie,ae]=l.useState(!1),se=l.useCallback((e,t,n)=>{if(!(R?te.length<t.length:null!==t)&&!s)return;const r=sv(t,R,U,z);re!==r&&(oe(r),N&&N(e,r,n))},[U,re,R,N,oe,s,te,z]),[le,ue]=rg({controlled:I,default:!1,name:c,state:"open"}),[ce,de]=l.useState(!0),pe=!R&&null!=te&&re===U(te),fe=le&&!j,he=fe?v($.filter(e=>!y||!(R?te:[te]).some(t=>null!==t&&T(e,t))),{inputValue:pe&&ce?"":re,getOptionLabel:U}):[],me=function(e){const t=l.useRef({});return l.useEffect(()=>{t.current=e}),t.current}({filteredOptions:he,value:te,inputValue:re});l.useEffect(()=>{const e=te!==me.value;ie&&!e||b&&!e||se(null,te,"reset")},[te,se,ie,me.value,b]);const ge=le&&he.length>0&&!j,ve=og(e=>{if(-1===e)H.current.focus();else{const t=z?"data-item-index":"data-tag-index";G.querySelector(`[${t}="${e}"]`).focus()}});l.useEffect(()=>{R&&X>te.length-1&&(Q(-1),ve(-1))},[te,R,X,ve]);const ye=og(({event:e,index:t,reason:r})=>{if(Z.current=t,-1===t?H.current.removeAttribute("aria-activedescendant"):H.current.setAttribute("aria-activedescendant",`${W}-option-${t}`),L&&["mouse","keyboard","touch"].includes(r)&&L(e,-1===t?null:he[t],r),!q.current)return;const o=q.current.querySelector(`[role="option"].${n}-focused`);o&&(o.classList.remove(`${n}-focused`),o.classList.remove(`${n}-focusVisible`));let i=q.current;if("listbox"!==q.current.getAttribute("role")&&(i=q.current.parentElement.querySelector('[role="listbox"]')),!i)return;if(-1===t)return void(i.scrollTop=0);const a=q.current.querySelector(`[data-option-index="${t}"]`);if(a&&(a.classList.add(`${n}-focused`),"keyboard"===r&&a.classList.add(`${n}-focusVisible`),i.scrollHeight>i.clientHeight&&"mouse"!==r&&"touch"!==r)){const e=a,t=i.clientHeight+i.scrollTop,n=e.offsetTop+e.offsetHeight;n>t?i.scrollTop=n-i.clientHeight:e.offsetTop-e.offsetHeight*(S?1.3:0)<i.scrollTop&&(i.scrollTop=e.offsetTop-e.offsetHeight*(S?1.3:0))}}),be=og(({event:e,diff:t,direction:n="next",reason:o})=>{if(!fe)return;const i=function(e,t){if(!q.current||e<0||e>=he.length)return-1;let n=e;for(;;){const r=q.current.querySelector(`[data-option-index="${n}"]`),o=!m&&(!r||r.disabled||"true"===r.getAttribute("aria-disabled"));if(r&&r.hasAttribute("tabindex")&&!o)return n;if(n="next"===t?(n+1)%he.length:(n-1+he.length)%he.length,n===e)return-1}}((()=>{const e=he.length-1;if("reset"===t)return J;if("start"===t)return 0;if("end"===t)return e;const n=Z.current+t;return n<0?-1===n&&O?-1:g&&-1!==Z.current||Math.abs(t)>1?0:e:n>e?n===e+1&&O?-1:g||Math.abs(t)>1?e:0:n})(),n);if(ye({index:i,reason:o,event:e}),r&&"reset"!==t)if(-1===i)H.current.value=re;else{const e=U(he[i]);H.current.value=e;0===e.toLowerCase().indexOf(re.toLowerCase())&&re.length>0&&H.current.setSelectionRange(re.length,e.length)}}),we=!nv({array1:me.filteredOptions,array2:he,parser:U}),xe=l.useCallback(()=>{if(!fe)return;const e=(()=>{if(-1!==Z.current&&!nv({array1:me.filteredOptions,array2:he,parser:U})&&me.inputValue===re&&(R?te.length===me.value.length&&me.value.every((e,t)=>U(te[t])===U(e)):(e=me.value,t=te,(e?U(e):"")===(t?U(t):"")))){const e=me.filteredOptions[Z.current];if(e)return he.findIndex(t=>U(t)===U(e))}var e,t;return-1})();if(-1!==e)return void(Z.current=e);const t=R?te[0]:te;if(0!==he.length&&null!=t){if(q.current){if(null!=t){const e=he[Z.current];if(R&&e&&-1!==te.findIndex(t=>T(e,t)))return;const n=he.findIndex(e=>T(e,t));return void(-1===n?be({diff:"reset"}):ye({index:n}))}Z.current>=he.length-1?ye({index:he.length-1}):ye({index:Z.current})}}else be({diff:"reset"})},[he.length,!R&&te,be,ye,fe,re,R]),ke=og(e=>{ng(q,e),e&&xe()});l.useEffect(()=>{(we||fe)&&xe()},[xe,we,fe]);const Se=e=>{le||(ue(!0),de(!0),M&&M(e))},Ee=(e,t)=>{le&&(ue(!1),A&&A(e,t))},Ce=(e,t,n,r)=>{if(R){if(te.length===t.length&&te.every((e,n)=>e===t[n]))return}else if(te===t)return;P&&P(e,t,n,r),ne(t)},Oe=l.useRef(!1),_e=(e,t,n="selectOption",r="options")=>{let o=n,i=t;if(R){i=Array.isArray(te)?te.slice():[];const e=i.findIndex(e=>T(t,e));-1===e?i.push(t):"freeSolo"!==r&&(i.splice(e,1),o="removeOption")}se(e,i,o),Ce(e,i,o,{option:t}),f||e&&(e.ctrlKey||e.metaKey)||Ee(e,o),(!0===a||"touch"===a&&Oe.current||"mouse"===a&&!Oe.current)&&H.current.blur()};const Te=(e,t)=>{if(!R)return;""===re&&Ee(e,"toggleInput");let n=X;-1===X?""===re&&"previous"===t&&(n=te.length-1):(n+="next"===t?1:-1,n<0&&(n=0),n===te.length&&(n=-1)),n=function(e,t){if(-1===e)return-1;let n=e;for(;;){if("next"===t&&n===te.length||"previous"===t&&-1===n)return-1;const e=z?"data-item-index":"data-tag-index",r=G.querySelector(`[${e}="${n}"]`);if(r&&r.hasAttribute("tabindex")&&!r.disabled&&"true"!==r.getAttribute("aria-disabled"))return n;n+="next"===t?1:-1}}(n,t),Q(n),ve(n)},Re=e=>{V.current=!0,oe(""),N&&N(e,"","clear"),Ce(e,R?[]:null,"clear")},Pe=e=>t=>{if(e.onKeyDown&&e.onKeyDown(t),!t.defaultMuiPrevented&&(-1===X||["ArrowLeft","ArrowRight"].includes(t.key)||(Q(-1),ve(-1)),229!==t.which))switch(t.key){case"Home":fe&&E&&(t.preventDefault(),be({diff:"start",direction:"next",reason:"keyboard",event:t}));break;case"End":fe&&E&&(t.preventDefault(),be({diff:"end",direction:"previous",reason:"keyboard",event:t}));break;case"PageUp":t.preventDefault(),be({diff:-5,direction:"previous",reason:"keyboard",event:t}),Se(t);break;case"PageDown":t.preventDefault(),be({diff:5,direction:"next",reason:"keyboard",event:t}),Se(t);break;case"ArrowDown":t.preventDefault(),be({diff:1,direction:"next",reason:"keyboard",event:t}),Se(t);break;case"ArrowUp":t.preventDefault(),be({diff:-1,direction:"previous",reason:"keyboard",event:t}),Se(t);break;case"ArrowLeft":!R&&z&&null!=te?(Q(0),ve(0)):Te(t,"previous");break;case"ArrowRight":!R&&z?(Q(-1),ve(-1)):Te(t,"next");break;case"Enter":if(-1!==Z.current&&fe){const e=he[Z.current],n=!!w&&w(e);if(t.preventDefault(),n)return;_e(t,e,"selectOption"),r&&H.current.setSelectionRange(H.current.value.length,H.current.value.length)}else b&&""!==re&&!1===pe&&(R&&t.preventDefault(),_e(t,re,"createOption","freeSolo"));break;case"Escape":fe?(t.preventDefault(),t.stopPropagation(),Ee(t,"escape")):u&&(""!==re||R&&te.length>0||z)&&(t.preventDefault(),t.stopPropagation(),Re(t));break;case"Backspace":if(R&&!j&&""===re&&te.length>0){const e=-1===X?te.length-1:X,n=te.slice();n.splice(e,1),Ce(t,n,"removeOption",{option:te[e]})}R||!z||j||(ne(null),Q(-1),ve(-1));break;case"Delete":if(R&&!j&&""===re&&te.length>0&&-1!==X){const e=X,n=te.slice();n.splice(e,1),Ce(t,n,"removeOption",{option:te[e]})}R||!z||j||(ne(null),Q(-1),ve(-1))}},Ae=e=>{ae(!0),-1!==X&&(Q(-1),ve(-1)),F&&!V.current&&Se(e)},Le=e=>{t(q)?H.current.focus():(ae(!1),K.current=!0,V.current=!1,i&&-1!==Z.current&&fe?_e(e,he[Z.current],"blur"):i&&b&&""!==re?_e(e,re,"blur","freeSolo"):s&&se(e,te,"blur"),Ee(e,"blur"))},Ne=e=>{const t=e.target.value;re!==t&&(oe(t),de(!1),N&&N(e,t,"input")),""===t?p||R||Ce(e,null,"clear"):Se(e)},Me=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));Z.current!==t&&ye({event:e,index:t,reason:"mouse"})},Ie=e=>{ye({event:e,index:Number(e.currentTarget.getAttribute("data-option-index")),reason:"touch"}),Oe.current=!0},Fe=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));_e(e,he[t],"selectOption"),Oe.current=!1},$e=e=>t=>{const n=te.slice();n.splice(e,1),Ce(t,n,"removeOption",{option:te[e]})},je=e=>{Ce(e,null,"removeOption",{option:te})},ze=e=>{le?Ee(e,"toggleInput"):Se(e)},Be=e=>{e.currentTarget.contains(e.target)&&e.target.getAttribute("id")!==W&&e.preventDefault()},De=e=>{e.currentTarget.contains(e.target)&&(H.current.focus(),B&&K.current&&H.current.selectionEnd-H.current.selectionStart===0&&H.current.select(),K.current=!1)},We=e=>{h||""!==re&&le||ze(e)};let Ue=b&&re.length>0;Ue=Ue||(R?te.length>0:null!==te);let Ve=he;return S&&(Ve=he.reduce((e,t,n)=>{const r=S(t);return e.length>0&&e[e.length-1].group===r?e[e.length-1].options.push(t):e.push({key:n,index:n,group:r,options:[t]}),e},[])),h&&ie&&Le(),{getRootProps:(e={})=>({...e,onKeyDown:Pe(e),onMouseDown:Be,onClick:De}),getInputLabelProps:()=>({id:`${W}-label`,htmlFor:W}),getInputProps:()=>({id:W,value:re,onBlur:Le,onFocus:Ae,onChange:Ne,onMouseDown:We,"aria-activedescendant":fe?"":null,"aria-autocomplete":r?"both":"list","aria-controls":ge?`${W}-listbox`:void 0,"aria-expanded":ge,autoComplete:"off",ref:H,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:h}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:Re}),getItemProps:({index:e=0}={})=>({...R&&{key:e},...z?{"data-item-index":e}:{"data-tag-index":e},tabIndex:-1,...!j&&{onDelete:R?$e(e):je}}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:ze}),getTagProps:({index:e})=>({key:e,"data-tag-index":e,tabIndex:-1,...!j&&{onDelete:$e(e)}}),getListboxProps:()=>({role:"listbox",id:`${W}-listbox`,"aria-labelledby":`${W}-label`,ref:ke,onMouseDown:e=>{e.preventDefault()}}),getOptionProps:({index:e,option:t})=>{const n=(R?te:[te]).some(e=>null!=e&&T(t,e)),r=!!w&&w(t);return{key:x?.(t)??U(t),tabIndex:-1,role:"option",id:`${W}-option-${e}`,onMouseMove:Me,onClick:Fe,onTouchStart:Ie,"data-option-index":e,"aria-disabled":r,"aria-selected":n}},id:W,inputValue:re,value:te,dirty:Ue,expanded:fe&&G,popupOpen:fe,focused:ie||-1!==X,anchorEl:G,setAnchorEl:Y,focusedItem:X,focusedTag:X,groupedOptions:Ve}}var uv="top",cv="bottom",dv="right",pv="left",fv="auto",hv=[uv,cv,dv,pv],mv="start",gv="end",vv="viewport",yv="popper",bv=hv.reduce(function(e,t){return e.concat([t+"-"+mv,t+"-"+gv])},[]),wv=[].concat(hv,[fv]).reduce(function(e,t){return e.concat([t,t+"-"+mv,t+"-"+gv])},[]),xv=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function kv(e){return e?(e.nodeName||"").toLowerCase():null}function Sv(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ev(e){return e instanceof Sv(e).Element||e instanceof Element}function Cv(e){return e instanceof Sv(e).HTMLElement||e instanceof HTMLElement}function Ov(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Sv(e).ShadowRoot||e instanceof ShadowRoot)}var _v={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];Cv(o)&&kv(o)&&(Object.assign(o.style,n),Object.keys(r).forEach(function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});Cv(r)&&kv(r)&&(Object.assign(r.style,i),Object.keys(o).forEach(function(e){r.removeAttribute(e)}))})}},requires:["computeStyles"]};function Tv(e){return e.split("-")[0]}var Rv=Math.max,Pv=Math.min,Av=Math.round;function Lv(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Nv(){return!/^((?!chrome|android).)*safari/i.test(Lv())}function Mv(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&Cv(e)&&(o=e.offsetWidth>0&&Av(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Av(r.height)/e.offsetHeight||1);var a=(Ev(e)?Sv(e):window).visualViewport,s=!Nv()&&n,l=(r.left+(s&&a?a.offsetLeft:0))/o,u=(r.top+(s&&a?a.offsetTop:0))/i,c=r.width/o,d=r.height/i;return{width:c,height:d,top:u,right:l+c,bottom:u+d,left:l,x:l,y:u}}function Iv(e){var t=Mv(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Fv(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Ov(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function $v(e){return Sv(e).getComputedStyle(e)}function jv(e){return["table","td","th"].indexOf(kv(e))>=0}function zv(e){return((Ev(e)?e.ownerDocument:e.document)||window.document).documentElement}function Bv(e){return"html"===kv(e)?e:e.assignedSlot||e.parentNode||(Ov(e)?e.host:null)||zv(e)}function Dv(e){return Cv(e)&&"fixed"!==$v(e).position?e.offsetParent:null}function Wv(e){for(var t=Sv(e),n=Dv(e);n&&jv(n)&&"static"===$v(n).position;)n=Dv(n);return n&&("html"===kv(n)||"body"===kv(n)&&"static"===$v(n).position)?t:n||function(e){var t=/firefox/i.test(Lv());if(/Trident/i.test(Lv())&&Cv(e)&&"fixed"===$v(e).position)return null;var n=Bv(e);for(Ov(n)&&(n=n.host);Cv(n)&&["html","body"].indexOf(kv(n))<0;){var r=$v(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function Uv(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Vv(e,t,n){return Rv(e,Pv(t,n))}function Kv(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Hv(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var qv={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Tv(n.placement),l=Uv(s),u=[pv,dv].indexOf(s)>=0?"height":"width";if(i&&a){var c=function(e,t){return Kv("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Hv(e,hv))}(o.padding,n),d=Iv(i),p="y"===l?uv:pv,f="y"===l?cv:dv,h=n.rects.reference[u]+n.rects.reference[l]-a[l]-n.rects.popper[u],m=a[l]-n.rects.reference[l],g=Wv(i),v=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,y=h/2-m/2,b=c[p],w=v-d[u]-c[f],x=v/2-d[u]/2+y,k=Vv(b,x,w),S=l;n.modifiersData[r]=((t={})[S]=k,t.centerOffset=k-x,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&Fv(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Gv(e){return e.split("-")[1]}var Yv={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Xv(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,d=e.isFixed,p=a.x,f=void 0===p?0:p,h=a.y,m=void 0===h?0:h,g="function"==typeof c?c({x:f,y:m}):{x:f,y:m};f=g.x,m=g.y;var v=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),b=pv,w=uv,x=window;if(u){var k=Wv(n),S="clientHeight",E="clientWidth";if(k===Sv(n)&&"static"!==$v(k=zv(n)).position&&"absolute"===s&&(S="scrollHeight",E="scrollWidth"),o===uv||(o===pv||o===dv)&&i===gv)w=cv,m-=(d&&k===x&&x.visualViewport?x.visualViewport.height:k[S])-r.height,m*=l?1:-1;if(o===pv||(o===uv||o===cv)&&i===gv)b=dv,f-=(d&&k===x&&x.visualViewport?x.visualViewport.width:k[E])-r.width,f*=l?1:-1}var C,O=Object.assign({position:s},u&&Yv),_=!0===c?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:Av(n*o)/o||0,y:Av(r*o)/o||0}}({x:f,y:m},Sv(n)):{x:f,y:m};return f=_.x,m=_.y,l?Object.assign({},O,((C={})[w]=y?"0":"",C[b]=v?"0":"",C.transform=(x.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",C)):Object.assign({},O,((t={})[w]=y?m+"px":"",t[b]=v?f+"px":"",t.transform="",t))}var Qv={passive:!0};var Jv={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,s=void 0===a||a,l=Sv(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(e){e.addEventListener("scroll",n.update,Qv)}),s&&l.addEventListener("resize",n.update,Qv),function(){i&&u.forEach(function(e){e.removeEventListener("scroll",n.update,Qv)}),s&&l.removeEventListener("resize",n.update,Qv)}},data:{}},Zv={left:"right",right:"left",bottom:"top",top:"bottom"};function ey(e){return e.replace(/left|right|bottom|top/g,function(e){return Zv[e]})}var ty={start:"end",end:"start"};function ny(e){return e.replace(/start|end/g,function(e){return ty[e]})}function ry(e){var t=Sv(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function oy(e){return Mv(zv(e)).left+ry(e).scrollLeft}function iy(e){var t=$v(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function ay(e){return["html","body","#document"].indexOf(kv(e))>=0?e.ownerDocument.body:Cv(e)&&iy(e)?e:ay(Bv(e))}function sy(e,t){var n;void 0===t&&(t=[]);var r=ay(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=Sv(r),a=o?[i].concat(i.visualViewport||[],iy(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(sy(Bv(a)))}function ly(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function uy(e,t,n){return t===vv?ly(function(e,t){var n=Sv(e),r=zv(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var u=Nv();(u||!u&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+oy(e),y:l}}(e,n)):Ev(t)?function(e,t){var n=Mv(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):ly(function(e){var t,n=zv(e),r=ry(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=Rv(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Rv(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+oy(e),l=-r.scrollTop;return"rtl"===$v(o||n).direction&&(s+=Rv(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(zv(e)))}function cy(e,t,n,r){var o="clippingParents"===t?function(e){var t=sy(Bv(e)),n=["absolute","fixed"].indexOf($v(e).position)>=0&&Cv(e)?Wv(e):e;return Ev(n)?t.filter(function(e){return Ev(e)&&Fv(e,n)&&"body"!==kv(e)}):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce(function(t,n){var o=uy(e,n,r);return t.top=Rv(o.top,t.top),t.right=Pv(o.right,t.right),t.bottom=Pv(o.bottom,t.bottom),t.left=Rv(o.left,t.left),t},uy(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function dy(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?Tv(o):null,a=o?Gv(o):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case uv:t={x:s,y:n.y-r.height};break;case cv:t={x:s,y:n.y+n.height};break;case dv:t={x:n.x+n.width,y:l};break;case pv:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var u=i?Uv(i):null;if(null!=u){var c="y"===u?"height":"width";switch(a){case mv:t[u]=t[u]-(n[c]/2-r[c]/2);break;case gv:t[u]=t[u]+(n[c]/2-r[c]/2)}}return t}function py(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,l=void 0===s?"clippingParents":s,u=n.rootBoundary,c=void 0===u?vv:u,d=n.elementContext,p=void 0===d?yv:d,f=n.altBoundary,h=void 0!==f&&f,m=n.padding,g=void 0===m?0:m,v=Kv("number"!=typeof g?g:Hv(g,hv)),y=p===yv?"reference":yv,b=e.rects.popper,w=e.elements[h?y:p],x=cy(Ev(w)?w:w.contextElement||zv(e.elements.popper),l,c,a),k=Mv(e.elements.reference),S=dy({reference:k,element:b,placement:o}),E=ly(Object.assign({},b,S)),C=p===yv?E:k,O={top:x.top-C.top+v.top,bottom:C.bottom-x.bottom+v.bottom,left:x.left-C.left+v.left,right:C.right-x.right+v.right},_=e.modifiersData.offset;if(p===yv&&_){var T=_[o];Object.keys(O).forEach(function(e){var t=[dv,cv].indexOf(e)>=0?1:-1,n=[uv,cv].indexOf(e)>=0?"y":"x";O[e]+=T[n]*t})}return O}function fy(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=void 0===l?wv:l,c=Gv(r),d=c?s?bv:bv.filter(function(e){return Gv(e)===c}):hv,p=d.filter(function(e){return u.indexOf(e)>=0});0===p.length&&(p=d);var f=p.reduce(function(t,n){return t[n]=py(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[Tv(n)],t},{});return Object.keys(f).sort(function(e,t){return f[e]-f[t]})}var hy={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,p=n.altBoundary,f=n.flipVariations,h=void 0===f||f,m=n.allowedAutoPlacements,g=t.options.placement,v=Tv(g),y=l||(v===g||!h?[ey(g)]:function(e){if(Tv(e)===fv)return[];var t=ey(e);return[ny(e),t,ny(t)]}(g)),b=[g].concat(y).reduce(function(e,n){return e.concat(Tv(n)===fv?fy(t,{placement:n,boundary:c,rootBoundary:d,padding:u,flipVariations:h,allowedAutoPlacements:m}):n)},[]),w=t.rects.reference,x=t.rects.popper,k=new Map,S=!0,E=b[0],C=0;C<b.length;C++){var O=b[C],_=Tv(O),T=Gv(O)===mv,R=[uv,cv].indexOf(_)>=0,P=R?"width":"height",A=py(t,{placement:O,boundary:c,rootBoundary:d,altBoundary:p,padding:u}),L=R?T?dv:pv:T?cv:uv;w[P]>x[P]&&(L=ey(L));var N=ey(L),M=[];if(i&&M.push(A[_]<=0),s&&M.push(A[L]<=0,A[N]<=0),M.every(function(e){return e})){E=O,S=!1;break}k.set(O,M)}if(S)for(var I=function(e){var t=b.find(function(t){var n=k.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return E=t,"break"},F=h?3:1;F>0;F--){if("break"===I(F))break}t.placement!==E&&(t.modifiersData[r]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function my(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function gy(e){return[uv,dv,cv,pv].some(function(t){return e[t]>=0})}var vy={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=py(t,{elementContext:"reference"}),s=py(t,{altBoundary:!0}),l=my(a,r),u=my(s,o,i),c=gy(l),d=gy(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}};var yy={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=wv.reduce(function(e,n){return e[n]=function(e,t,n){var r=Tv(e),o=[pv,uv].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[pv,dv].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e},{}),s=a[t.placement],l=s.x,u=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}};var by={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=dy({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})},data:{}};var wy={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,p=n.tether,f=void 0===p||p,h=n.tetherOffset,m=void 0===h?0:h,g=py(t,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),v=Tv(t.placement),y=Gv(t.placement),b=!y,w=Uv(v),x="x"===w?"y":"x",k=t.modifiersData.popperOffsets,S=t.rects.reference,E=t.rects.popper,C="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,O="number"==typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),_=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,T={x:0,y:0};if(k){if(i){var R,P="y"===w?uv:pv,A="y"===w?cv:dv,L="y"===w?"height":"width",N=k[w],M=N+g[P],I=N-g[A],F=f?-E[L]/2:0,$=y===mv?S[L]:E[L],j=y===mv?-E[L]:-S[L],z=t.elements.arrow,B=f&&z?Iv(z):{width:0,height:0},D=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},W=D[P],U=D[A],V=Vv(0,S[L],B[L]),K=b?S[L]/2-F-V-W-O.mainAxis:$-V-W-O.mainAxis,H=b?-S[L]/2+F+V+U+O.mainAxis:j+V+U+O.mainAxis,q=t.elements.arrow&&Wv(t.elements.arrow),G=q?"y"===w?q.clientTop||0:q.clientLeft||0:0,Y=null!=(R=null==_?void 0:_[w])?R:0,X=N+H-Y,Q=Vv(f?Pv(M,N+K-Y-G):M,N,f?Rv(I,X):I);k[w]=Q,T[w]=Q-N}if(s){var J,Z="x"===w?uv:pv,ee="x"===w?cv:dv,te=k[x],ne="y"===x?"height":"width",re=te+g[Z],oe=te-g[ee],ie=-1!==[uv,pv].indexOf(v),ae=null!=(J=null==_?void 0:_[x])?J:0,se=ie?re:te-S[ne]-E[ne]-ae+O.altAxis,le=ie?te+S[ne]+E[ne]-ae-O.altAxis:oe,ue=f&&ie?function(e,t,n){var r=Vv(e,t,n);return r>n?n:r}(se,te,le):Vv(f?se:re,te,f?le:oe);k[x]=ue,T[x]=ue-te}t.modifiersData[r]=T}},requiresIfExists:["offset"]};function xy(e,t,n){void 0===n&&(n=!1);var r=Cv(t),o=Cv(t)&&function(e){var t=e.getBoundingClientRect(),n=Av(t.width)/e.offsetWidth||1,r=Av(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=zv(t),a=Mv(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==kv(t)||iy(i))&&(s=function(e){return e!==Sv(e)&&Cv(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:ry(e);var t}(t)),Cv(t)?((l=Mv(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=oy(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function ky(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}}),r.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){n.has(e.name)||o(e)}),r}var Sy={placement:"bottom",modifiers:[],strategy:"absolute"};function Ey(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}function Cy(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?Sy:o;return function(e,t,n){void 0===n&&(n=i);var o,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},Sy,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],u=!1,c={state:s,setOptions:function(n){var o="function"==typeof n?n(s.options):n;d(),s.options=Object.assign({},i,s.options,o),s.scrollParents={reference:Ev(e)?sy(e):e.contextElement?sy(e.contextElement):[],popper:sy(t)};var a,u,p=function(e){var t=ky(e);return xv.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}((a=[].concat(r,s.options.modifiers),u=a.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{}),Object.keys(u).map(function(e){return u[e]})));return s.orderedModifiers=p.filter(function(e){return e.enabled}),s.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var i=o({state:s,name:t,instance:c,options:r}),a=function(){};l.push(i||a)}}),c.update()},forceUpdate:function(){if(!u){var e=s.elements,t=e.reference,n=e.popper;if(Ey(t,n)){s.rects={reference:xy(t,Wv(n),"fixed"===s.options.strategy),popper:Iv(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach(function(e){return s.modifiersData[e.name]=Object.assign({},e.data)});for(var r=0;r<s.orderedModifiers.length;r++)if(!0!==s.reset){var o=s.orderedModifiers[r],i=o.fn,a=o.options,l=void 0===a?{}:a,d=o.name;"function"==typeof i&&(s=i({state:s,options:l,name:d,instance:c})||s)}else s.reset=!1,r=-1}}},update:(o=function(){return new Promise(function(e){c.forceUpdate(),e(s)})},function(){return a||(a=new Promise(function(e){Promise.resolve().then(function(){a=void 0,e(o())})})),a}),destroy:function(){d(),u=!0}};if(!Ey(e,t))return c;function d(){l.forEach(function(e){return e()}),l=[]}return c.setOptions(n).then(function(e){!u&&n.onFirstUpdate&&n.onFirstUpdate(e)}),c}}var Oy=Cy({defaultModifiers:[Jv,by,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,l=void 0===s||s,u={placement:Tv(t.placement),variation:Gv(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Xv(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Xv(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},_v,yy,hy,wy,qv,vy]});function _y(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,a=o?{}:gg(n,r),{props:s,internalRef:l}=bg({...i,externalSlotProps:a});return mg(t,{...s,ref:ig(l,a?.ref,e.additionalProps?.ref)},r)}function Ty(e){return parseInt(l.version,10)>=19?e?.props?.ref||null:e?.ref||null}const Ry=l.forwardRef(function(e,t){const{children:n,container:r,disablePortal:o=!1}=e,[i,a]=l.useState(null),s=ig(l.isValidElement(n)?Ty(n):null,t);if(_h(()=>{o||a(function(e){return"function"==typeof e?e():e}(r)||document.body)},[r,o]),_h(()=>{if(i&&!o)return ng(t,i),()=>{ng(t,null)}},[t,i,o]),o){if(l.isValidElement(n)){const e={ref:s};return l.cloneElement(n,e)}return n}return i?po.createPortal(n,i):i});function Py(e){return fh("MuiPopper",e)}function Ay(e){return"function"==typeof e?e():e}hh("MuiPopper",["root"]);const Ly={},Ny=l.forwardRef(function(e,t){const{anchorEl:n,children:r,direction:o,disablePortal:i,modifiers:a,open:s,placement:u,popperOptions:c,popperRef:d,slotProps:p={},slots:f={},TransitionProps:h,ownerState:m,...g}=e,v=l.useRef(null),y=ig(v,t),b=l.useRef(null),w=ig(b,d),x=l.useRef(w);_h(()=>{x.current=w},[w]),l.useImperativeHandle(d,()=>b.current,[]);const k=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(u,o),[S,E]=l.useState(k),[C,O]=l.useState(Ay(n));l.useEffect(()=>{b.current&&b.current.forceUpdate()}),l.useEffect(()=>{n&&O(Ay(n))},[n]),_h(()=>{if(!C||!s)return;let e=[{name:"preventOverflow",options:{altBoundary:i}},{name:"flip",options:{altBoundary:i}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:e})=>{E(e.placement)}}];null!=a&&(e=e.concat(a)),c&&null!=c.modifiers&&(e=e.concat(c.modifiers));const t=Oy(C,v.current,{placement:k,...c,modifiers:e});return x.current(t),()=>{t.destroy(),x.current(null)}},[C,i,a,s,c,k]);const _={placement:S};null!==h&&(_.TransitionProps=h);const T=(e=>{const{classes:t}=e;return Jh({root:["root"]},Py,t)})(e),R=f.root??"div",P=_y({elementType:R,externalSlotProps:p.root,externalForwardedProps:g,additionalProps:{role:"tooltip",ref:y},ownerState:e,className:T.root});return Fp.jsx(R,{...P,children:"function"==typeof r?r(_):r})}),My=l.forwardRef(function(e,t){const{anchorEl:n,children:r,container:o,direction:i="ltr",disablePortal:a=!1,keepMounted:s=!1,modifiers:u,open:c,placement:d="bottom",popperOptions:p=Ly,popperRef:f,style:h,transition:m=!1,slotProps:g={},slots:v={},...y}=e,[b,w]=l.useState(!0);if(!s&&!c&&(!m||b))return null;let x;if(o)x=o;else if(n){const e=Ay(n);x=e&&void 0!==e.nodeType?eg(e).body:eg(null).body}const k=c||!s||m&&!b?void 0:"none",S=m?{in:c,onEnter:()=>{w(!1)},onExited:()=>{w(!0)}}:void 0;return Fp.jsx(Ry,{disablePortal:a,container:x,children:Fp.jsx(Ny,{anchorEl:n,direction:i,disablePortal:a,modifiers:u,ref:t,open:m?!b:c,placement:d,popperOptions:p,popperRef:f,slotProps:g,slots:v,...y,style:{position:"fixed",top:0,left:0,display:k,...h},TransitionProps:S,children:r})})}),Iy=Wm(My,{name:"MuiPopper",slot:"Root"})({}),Fy=l.forwardRef(function(e,t){const n=Wh(),r=Gm({props:e,name:"MuiPopper"}),{anchorEl:o,component:i,components:a,componentsProps:s,container:l,disablePortal:u,keepMounted:c,modifiers:d,open:p,placement:f,popperOptions:h,popperRef:m,transition:g,slots:v,slotProps:y,...b}=r,w=v?.root??a?.Root,x={anchorEl:o,container:l,disablePortal:u,keepMounted:c,modifiers:d,open:p,placement:f,popperOptions:h,popperRef:m,transition:g,...b};return Fp.jsx(Iy,{as:i,direction:n?"rtl":"ltr",slots:{root:w},slotProps:y??s,...x,ref:t})});function $y(e){return fh("MuiListSubheader",e)}hh("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const jy=Wm("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t[`color${sf(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(qm(({theme:e})=>({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14),variants:[{props:{color:"primary"},style:{color:(e.vars||e).palette.primary.main}},{props:{color:"inherit"},style:{color:"inherit"}},{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:72}},{props:({ownerState:e})=>!e.disableSticky,style:{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper}}]}))),zy=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiListSubheader"}),{className:r,color:o="default",component:i="li",disableGutters:a=!1,disableSticky:s=!1,inset:l=!1,...u}=n,c={...n,color:o,component:i,disableGutters:a,disableSticky:s,inset:l},d=(e=>{const{classes:t,color:n,disableGutters:r,inset:o,disableSticky:i}=e;return Jh({root:["root","default"!==n&&`color${sf(n)}`,!r&&"gutters",o&&"inset",!i&&"sticky"]},$y,t)})(c);return Fp.jsx(jy,{as:i,className:Km(d.root,r),ref:t,ownerState:c,...u})});zy&&(zy.muiSkipListHighlight=!0);var By=Jm(Fp.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}));function Dy(e){return fh("MuiChip",e)}const Wy=hh("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),Uy=Wm("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:i,onDelete:a,size:s,variant:l}=n;return[{[`& .${Wy.avatar}`]:t.avatar},{[`& .${Wy.avatar}`]:t[`avatar${sf(s)}`]},{[`& .${Wy.avatar}`]:t[`avatarColor${sf(r)}`]},{[`& .${Wy.icon}`]:t.icon},{[`& .${Wy.icon}`]:t[`icon${sf(s)}`]},{[`& .${Wy.icon}`]:t[`iconColor${sf(o)}`]},{[`& .${Wy.deleteIcon}`]:t.deleteIcon},{[`& .${Wy.deleteIcon}`]:t[`deleteIcon${sf(s)}`]},{[`& .${Wy.deleteIcon}`]:t[`deleteIconColor${sf(r)}`]},{[`& .${Wy.deleteIcon}`]:t[`deleteIcon${sf(l)}Color${sf(r)}`]},t.root,t[`size${sf(s)}`],t[`color${sf(r)}`],i&&t.clickable,i&&"default"!==r&&t[`clickableColor${sf(r)}`],a&&t.deletable,a&&"default"!==r&&t[`deletableColor${sf(r)}`],t[l],t[`${l}${sf(r)}`]]}})(qm(({theme:e})=>{const t="light"===e.palette.mode?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,lineHeight:1.5,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:16,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${Wy.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Wy.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${Wy.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${Wy.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${Wy.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Wy.icon}`]:{marginLeft:5,marginRight:-6},[`& .${Wy.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.alpha((e.vars||e).palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.alpha((e.vars||e).palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${Wy.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${Wy.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(jg(["contrastText"])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText,[`& .${Wy.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[t].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].contrastText}}}})),{props:e=>e.iconColor===e.color,style:{[`& .${Wy.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:e=>e.iconColor===e.color&&"default"!==e.color,style:{[`& .${Wy.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${Wy.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}},...Object.entries(e.palette).filter(jg(["dark"])).map(([t])=>({props:{color:t,onDelete:!0},style:{[`&.${Wy.focusVisible}`]:{background:(e.vars||e).palette[t].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`)},[`&.${Wy.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(jg(["dark"])).map(([t])=>({props:{color:t,clickable:!0},style:{[`&:hover, &.${Wy.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${"light"===e.palette.mode?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${Wy.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Wy.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Wy.avatar}`]:{marginLeft:4},[`& .${Wy.avatarSmall}`]:{marginLeft:2},[`& .${Wy.icon}`]:{marginLeft:4},[`& .${Wy.iconSmall}`]:{marginLeft:2},[`& .${Wy.deleteIcon}`]:{marginRight:5},[`& .${Wy.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(jg()).map(([t])=>({props:{variant:"outlined",color:t},style:{color:(e.vars||e).palette[t].main,border:`1px solid ${e.alpha((e.vars||e).palette[t].main,.7)}`,[`&.${Wy.clickable}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)},[`&.${Wy.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.focusOpacity)},[`& .${Wy.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[t].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].main}}}}))]}})),Vy=Wm("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${sf(r)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function Ky(e){return"Backspace"===e.key||"Delete"===e.key}const Hy=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiChip"}),{avatar:r,className:o,clickable:i,color:a="default",component:s,deleteIcon:u,disabled:c=!1,icon:d,label:p,onClick:f,onDelete:h,onKeyDown:m,onKeyUp:g,size:v="medium",variant:y="filled",tabIndex:b,skipFocusWhenDisabled:w=!1,slots:x={},slotProps:k={},...S}=n,E=ig(l.useRef(null),t),C=e=>{e.stopPropagation(),h&&h(e)},O=!(!1===i||!f)||i,_=O||h?Fg:s||"div",T={...n,component:_,disabled:c,size:v,color:a,iconColor:l.isValidElement(d)&&d.props.color||a,onDelete:!!h,clickable:O,variant:y},R=(e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:i,onDelete:a,clickable:s,variant:l}=e;return Jh({root:["root",l,n&&"disabled",`size${sf(r)}`,`color${sf(o)}`,s&&"clickable",s&&`clickableColor${sf(o)}`,a&&"deletable",a&&`deletableColor${sf(o)}`,`${l}${sf(o)}`],label:["label",`label${sf(r)}`],avatar:["avatar",`avatar${sf(r)}`,`avatarColor${sf(o)}`],icon:["icon",`icon${sf(r)}`,`iconColor${sf(i)}`],deleteIcon:["deleteIcon",`deleteIcon${sf(r)}`,`deleteIconColor${sf(o)}`,`deleteIcon${sf(l)}Color${sf(o)}`]},Dy,t)})(T),P=_===Fg?{component:s||"div",focusVisibleClassName:R.focusVisible,...h&&{disableRipple:!0}}:{};let A=null;h&&(A=u&&l.isValidElement(u)?l.cloneElement(u,{className:Km(u.props.className,R.deleteIcon),onClick:C}):Fp.jsx(By,{className:R.deleteIcon,onClick:C}));let L=null;r&&l.isValidElement(r)&&(L=l.cloneElement(r,{className:Km(R.avatar,r.props.className)}));let N=null;d&&l.isValidElement(d)&&(N=l.cloneElement(d,{className:Km(R.icon,d.props.className)}));const M={slots:x,slotProps:k},[I,F]=wg("root",{elementType:Uy,externalForwardedProps:{...M,...S},ownerState:T,shouldForwardComponentProp:!0,ref:E,className:Km(R.root,o),additionalProps:{disabled:!(!O||!c)||void 0,tabIndex:w&&c?-1:b,...P},getSlotProps:e=>({...e,onClick:t=>{e.onClick?.(t),f?.(t)},onKeyDown:t=>{e.onKeyDown?.(t),(e=>{e.currentTarget===e.target&&Ky(e)&&e.preventDefault(),m&&m(e)})(t)},onKeyUp:t=>{e.onKeyUp?.(t),(e=>{e.currentTarget===e.target&&h&&Ky(e)&&h(e),g&&g(e)})(t)}})}),[$,j]=wg("label",{elementType:Vy,externalForwardedProps:M,ownerState:T,className:R.label});return Fp.jsxs(I,{as:_,...F,children:[L||N,Fp.jsx($,{...j,children:p}),A]})});function qy(e){return parseInt(e,10)||0}const Gy={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};function Yy(e){return function(e){for(const t in e)return!1;return!0}(e)||0===e.outerHeightStyle&&!e.overflowing}const Xy=l.forwardRef(function(e,t){const{onChange:n,maxRows:r,minRows:o=1,style:i,value:a,...s}=e,{current:u}=l.useRef(null!=a),c=l.useRef(null),d=ig(t,c),p=l.useRef(null),f=l.useRef(null),h=l.useCallback(()=>{const t=c.current,n=f.current;if(!t||!n)return;const i=tg(t).getComputedStyle(t);if("0px"===i.width)return{outerHeightStyle:0,overflowing:!1};n.style.width=i.width,n.value=t.value||e.placeholder||"x","\n"===n.value.slice(-1)&&(n.value+=" ");const a=i.boxSizing,s=qy(i.paddingBottom)+qy(i.paddingTop),l=qy(i.borderBottomWidth)+qy(i.borderTopWidth),u=n.scrollHeight;n.value="x";const d=n.scrollHeight;let p=u;o&&(p=Math.max(Number(o)*d,p)),r&&(p=Math.min(Number(r)*d,p)),p=Math.max(p,d);return{outerHeightStyle:p+("border-box"===a?s+l:0),overflowing:Math.abs(p-u)<=1}},[r,o,e.placeholder]),m=og(()=>{const e=c.current,t=h();if(!e||!t||Yy(t))return!1;const n=t.outerHeightStyle;return null!=p.current&&p.current!==n}),g=l.useCallback(()=>{const e=c.current,t=h();if(!e||!t||Yy(t))return;const n=t.outerHeightStyle;p.current!==n&&(p.current=n,e.style.height=`${n}px`),e.style.overflow=t.overflowing?"hidden":""},[h]),v=l.useRef(-1);_h(()=>{const e=Zm(g),t=c?.current;if(!t)return;const n=tg(t);let r;return n.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(r=new ResizeObserver(()=>{m()&&(r.unobserve(t),cancelAnimationFrame(v.current),g(),v.current=requestAnimationFrame(()=>{r.observe(t)}))}),r.observe(t)),()=>{e.clear(),cancelAnimationFrame(v.current),n.removeEventListener("resize",e),r&&r.disconnect()}},[h,g,m]),_h(()=>{g()});return Fp.jsxs(l.Fragment,{children:[Fp.jsx("textarea",{value:a,onChange:e=>{u||g();const t=e.target,r=t.value.length,o=t.value.endsWith("\n"),i=t.selectionStart===r;o&&i&&t.setSelectionRange(r,r),n&&n(e)},ref:d,rows:o,style:i,...s}),Fp.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:f,tabIndex:-1,style:{...Gy,...i,paddingTop:0,paddingBottom:0}})]})});function Qy({props:e,states:t,muiFormControl:n}){return t.reduce((t,r)=>(t[r]=e[r],n&&void 0===e[r]&&(t[r]=n[r]),t),{})}const Jy=l.createContext(void 0);function Zy(){return l.useContext(Jy)}function eb(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function tb(e,t=!1){return e&&(eb(e.value)&&""!==e.value||t&&eb(e.defaultValue)&&""!==e.defaultValue)}function nb(e){return fh("MuiInputBase",e)}const rb=hh("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var ob;const ib=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,"small"===n.size&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${sf(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},ab=(e,t)=>{const{ownerState:n}=e;return[t.input,"small"===n.size&&t.inputSizeSmall,n.multiline&&t.inputMultiline,"search"===n.type&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},sb=Wm("div",{name:"MuiInputBase",slot:"Root",overridesResolver:ib})(qm(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${rb.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:e})=>e.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{paddingTop:1}},{props:({ownerState:e})=>e.fullWidth,style:{width:"100%"}}]}))),lb=Wm("input",{name:"MuiInputBase",slot:"Input",overridesResolver:ab})(qm(({theme:e})=>{const t="light"===e.palette.mode,n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},o=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${rb.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${rb.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:e})=>!e.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:e})=>e.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),ub=function(e){return function(t){return Fp.jsx(Hm,{styles:"function"==typeof e?n=>e({theme:n,...t}):e})}}({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),cb=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiInputBase"}),{"aria-describedby":r,autoComplete:o,autoFocus:i,className:a,color:s,components:u={},componentsProps:c={},defaultValue:d,disabled:p,disableInjectingGlobalStyles:f,endAdornment:h,error:m,fullWidth:g=!1,id:v,inputComponent:y="input",inputProps:b={},inputRef:w,margin:x,maxRows:k,minRows:S,multiline:E=!1,name:C,onBlur:O,onChange:_,onClick:T,onFocus:R,onKeyDown:P,onKeyUp:A,placeholder:L,readOnly:N,renderSuffix:M,rows:I,size:F,slotProps:$={},slots:j={},startAdornment:z,type:B="text",value:D,...W}=n,U=null!=b.value?b.value:D,{current:V}=l.useRef(null!=U),K=l.useRef(),H=l.useCallback(e=>{},[]),q=ig(K,w,b.ref,H),[G,Y]=l.useState(!1),X=Zy(),Q=Qy({props:n,muiFormControl:X,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Q.focused=X?X.focused:G,l.useEffect(()=>{!X&&p&&G&&(Y(!1),O&&O())},[X,p,G,O]);const J=X&&X.onFilled,Z=X&&X.onEmpty,ee=l.useCallback(e=>{tb(e)?J&&J():Z&&Z()},[J,Z]);_h(()=>{V&&ee({value:U})},[U,ee,V]);l.useEffect(()=>{ee(K.current)},[]);let te=y,ne=b;E&&"input"===te&&(ne=I?{type:void 0,minRows:I,maxRows:I,...ne}:{type:void 0,maxRows:k,minRows:S,...ne},te=Xy);l.useEffect(()=>{X&&X.setAdornedStart(Boolean(z))},[X,z]);const re={...n,color:Q.color||"primary",disabled:Q.disabled,endAdornment:h,error:Q.error,focused:Q.focused,formControl:X,fullWidth:g,hiddenLabel:Q.hiddenLabel,multiline:E,size:Q.size,startAdornment:z,type:B},oe=(e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:s,fullWidth:l,hiddenLabel:u,multiline:c,readOnly:d,size:p,startAdornment:f,type:h}=e;return Jh({root:["root",`color${sf(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",p&&"medium"!==p&&`size${sf(p)}`,c&&"multiline",f&&"adornedStart",i&&"adornedEnd",u&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled","search"===h&&"inputTypeSearch",c&&"inputMultiline","small"===p&&"inputSizeSmall",u&&"inputHiddenLabel",f&&"inputAdornedStart",i&&"inputAdornedEnd",d&&"readOnly"]},nb,t)})(re),ie=j.root||u.Root||sb,ae=$.root||c.root||{},se=j.input||u.Input||lb;return ne={...ne,...$.input??c.input},Fp.jsxs(l.Fragment,{children:[!f&&"function"==typeof ub&&(ob||(ob=Fp.jsx(ub,{}))),Fp.jsxs(ie,{...ae,ref:t,onClick:e=>{K.current&&e.currentTarget===e.target&&K.current.focus(),T&&T(e)},...W,...!hg(ie)&&{ownerState:{...re,...ae.ownerState}},className:Km(oe.root,ae.className,a,N&&"MuiInputBase-readOnly"),children:[z,Fp.jsx(Jy.Provider,{value:null,children:Fp.jsx(se,{"aria-invalid":Q.error,"aria-describedby":r,autoComplete:o,autoFocus:i,defaultValue:d,disabled:Q.disabled,id:v,onAnimationStart:e=>{ee("mui-auto-fill-cancel"===e.animationName?K.current:{value:"x"})},name:C,placeholder:L,readOnly:N,required:Q.required,rows:I,value:U,onKeyDown:P,onKeyUp:A,type:B,...ne,...!hg(se)&&{as:te,ownerState:{...re,...ne.ownerState}},ref:q,className:Km(oe.input,ne.className,N&&"MuiInputBase-readOnly"),onBlur:e=>{O&&O(e),b.onBlur&&b.onBlur(e),X&&X.onBlur?X.onBlur(e):Y(!1)},onChange:(e,...t)=>{if(!V){const t=e.target||K.current;if(null==t)throw new Error(Uc(1));ee({value:t.value})}b.onChange&&b.onChange(e,...t),_&&_(e,...t)},onFocus:e=>{R&&R(e),b.onFocus&&b.onFocus(e),X&&X.onFocus?X.onFocus(e):Y(!0)}})}),h,M?M({...Q,startAdornment:z}):null]})]})});function db(e){return fh("MuiInput",e)}const pb={...rb,...hh("MuiInput",["root","underline","input"])};function fb(e){return fh("MuiOutlinedInput",e)}const hb={...rb,...hh("MuiOutlinedInput",["root","notchedOutline","input"])};function mb(e){return fh("MuiFilledInput",e)}const gb={...rb,...hh("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])};var vb=Jm(Fp.jsx("path",{d:"M7 10l5 5 5-5z"}));function yb(e){return fh("MuiAutocomplete",e)}const bb=hh("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var wb,xb;const kb=Wm("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:o,hasPopupIcon:i,inputFocused:a,size:s}=n;return[{[`& .${bb.tag}`]:t.tag},{[`& .${bb.tag}`]:t[`tagSize${sf(s)}`]},{[`& .${bb.inputRoot}`]:t.inputRoot},{[`& .${bb.input}`]:t.input},{[`& .${bb.input}`]:a&&t.inputFocused},t.root,r&&t.fullWidth,i&&t.hasPopupIcon,o&&t.hasClearIcon]}})({[`&.${bb.focused} .${bb.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${bb.clearIndicator}`]:{visibility:"visible"}},[`& .${bb.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${bb.inputRoot}`]:{[`.${bb.hasPopupIcon}&, .${bb.hasClearIcon}&`]:{paddingRight:30},[`.${bb.hasPopupIcon}.${bb.hasClearIcon}&`]:{paddingRight:56},[`& .${bb.input}`]:{width:0,minWidth:30}},[`& .${pb.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${pb.root}.${rb.sizeSmall}`]:{[`& .${pb.input}`]:{padding:"2px 4px 3px 0"}},[`& .${hb.root}`]:{padding:9,[`.${bb.hasPopupIcon}&, .${bb.hasClearIcon}&`]:{paddingRight:39},[`.${bb.hasPopupIcon}.${bb.hasClearIcon}&`]:{paddingRight:65},[`& .${bb.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${bb.endAdornment}`]:{right:9}},[`& .${hb.root}.${rb.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${bb.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${gb.root}`]:{paddingTop:19,paddingLeft:8,[`.${bb.hasPopupIcon}&, .${bb.hasClearIcon}&`]:{paddingRight:39},[`.${bb.hasPopupIcon}.${bb.hasClearIcon}&`]:{paddingRight:65},[`& .${gb.input}`]:{padding:"7px 4px"},[`& .${bb.endAdornment}`]:{right:9}},[`& .${gb.root}.${rb.sizeSmall}`]:{paddingBottom:1,[`& .${gb.input}`]:{padding:"2.5px 4px"}},[`& .${rb.hiddenLabel}`]:{paddingTop:8},[`& .${gb.root}.${rb.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${bb.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${gb.root}.${rb.hiddenLabel}.${rb.sizeSmall}`]:{[`& .${bb.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${bb.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${bb.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${bb.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${bb.inputRoot}`]:{flexWrap:"wrap"}}}]}),Sb=Wm("div",{name:"MuiAutocomplete",slot:"EndAdornment"})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),Eb=Wm(ev,{name:"MuiAutocomplete",slot:"ClearIndicator"})({marginRight:-2,padding:4,visibility:"hidden"}),Cb=Wm(ev,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popupIndicator,n.popupOpen&&t.popupIndicatorOpen]}})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),Ob=Wm(Fy,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${bb.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})(qm(({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}))),_b=Wm(Sg,{name:"MuiAutocomplete",slot:"Paper"})(qm(({theme:e})=>({...e.typography.body1,overflow:"auto"}))),Tb=Wm("div",{name:"MuiAutocomplete",slot:"Loading"})(qm(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),Rb=Wm("div",{name:"MuiAutocomplete",slot:"NoOptions"})(qm(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),Pb=Wm("ul",{name:"MuiAutocomplete",slot:"Listbox"})(qm(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${bb.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${bb.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${bb.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${bb.focused}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${bb.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}}}))),Ab=Wm(zy,{name:"MuiAutocomplete",slot:"GroupLabel"})(qm(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),Lb=Wm("ul",{name:"MuiAutocomplete",slot:"GroupUl"})({padding:0,[`& .${bb.option}`]:{paddingLeft:24}}),Nb=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiAutocomplete"}),{autoComplete:r=!1,autoHighlight:o=!1,autoSelect:i=!1,blurOnSelect:a=!1,ChipProps:s,className:u,clearIcon:c=wb||(wb=Fp.jsx(tv,{fontSize:"small"})),clearOnBlur:d=!n.freeSolo,clearOnEscape:p=!1,clearText:f="Clear",closeText:h="Close",componentsProps:m,defaultValue:g=(n.multiple?[]:null),disableClearable:v=!1,disableCloseOnSelect:y=!1,disabled:b=!1,disabledItemsFocusable:w=!1,disableListWrap:x=!1,disablePortal:k=!1,filterOptions:S,filterSelectedOptions:E=!1,forcePopupIcon:C="auto",freeSolo:O=!1,fullWidth:_=!1,getLimitTagsText:T=e=>`+${e}`,getOptionDisabled:R,getOptionKey:P,getOptionLabel:A,isOptionEqualToValue:L,groupBy:N,handleHomeEndKeys:M=!n.freeSolo,id:I,includeInputInList:F=!1,inputValue:$,limitTags:j=-1,ListboxComponent:z,ListboxProps:B,loading:D=!1,loadingText:W="Loading…",multiple:U=!1,noOptionsText:V="No options",onChange:K,onClose:H,onHighlightChange:q,onInputChange:G,onOpen:Y,open:X,openOnFocus:Q=!1,openText:J="Open",options:Z,PaperComponent:ee,PopperComponent:te,popupIcon:ne=xb||(xb=Fp.jsx(vb,{})),readOnly:re=!1,renderGroup:oe,renderInput:ie,renderOption:ae,renderTags:se,renderValue:le,selectOnFocus:ue=!n.freeSolo,size:ce="medium",slots:de={},slotProps:pe={},value:fe,...he}=n,{getRootProps:me,getInputProps:ge,getInputLabelProps:ve,getPopupIndicatorProps:ye,getClearProps:be,getItemProps:we,getListboxProps:xe,getOptionProps:ke,value:Se,dirty:Ee,expanded:Ce,id:Oe,popupOpen:_e,focused:Te,focusedItem:Re,anchorEl:Pe,setAnchorEl:Ae,inputValue:Le,groupedOptions:Ne}=lv({...n,componentName:"Autocomplete"}),Me=!v&&!b&&Ee&&!re,Ie=(!O||!0===C)&&!1!==C,{onMouseDown:Fe}=ge(),{ref:$e,...je}=xe(),ze=A||(e=>e.label??e),Be={...n,disablePortal:k,expanded:Ce,focused:Te,fullWidth:_,getOptionLabel:ze,hasClearIcon:Me,hasPopupIcon:Ie,inputFocused:-1===Re,popupOpen:_e,size:ce},De=(e=>{const{classes:t,disablePortal:n,expanded:r,focused:o,fullWidth:i,hasClearIcon:a,hasPopupIcon:s,inputFocused:l,popupOpen:u,size:c}=e;return Jh({root:["root",r&&"expanded",o&&"focused",i&&"fullWidth",a&&"hasClearIcon",s&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${sf(c)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",u&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]},yb,t)})(Be),We={slots:{paper:ee,popper:te,...de},slotProps:{chip:s,listbox:B,...m,...pe}},[Ue,Ve]=wg("listbox",{elementType:Pb,externalForwardedProps:We,ownerState:Be,className:De.listbox,additionalProps:je,ref:$e}),[Ke,He]=wg("paper",{elementType:Sg,externalForwardedProps:We,ownerState:Be,className:De.paper}),[qe,Ge]=wg("popper",{elementType:Fy,externalForwardedProps:We,ownerState:Be,className:De.popper,additionalProps:{disablePortal:k,style:{width:Pe?Pe.clientWidth:null},role:"presentation",anchorEl:Pe,open:_e}});let Ye;const Xe=e=>({className:De.tag,disabled:b,...we(e)});if(U?Se.length>0&&(Ye=se?se(Se,Xe,Be):le?le(Se,Xe,Be):Se.map((e,t)=>{const{key:n,...r}=Xe({index:t});return Fp.jsx(Hy,{label:ze(e),size:ce,...r,...We.slotProps.chip},n)})):le&&null!=Se&&(Ye=le(Se,Xe,Be)),j>-1&&Array.isArray(Ye)){const e=Ye.length-j;!Te&&e>0&&(Ye=Ye.splice(0,j),Ye.push(Fp.jsx("span",{className:De.tag,children:T(e)},Ye.length)))}const Qe=oe||(e=>Fp.jsxs("li",{children:[Fp.jsx(Ab,{className:De.groupLabel,ownerState:Be,component:"div",children:e.group}),Fp.jsx(Lb,{className:De.groupUl,ownerState:Be,children:e.children})]},e.key)),Je=ae||((e,t)=>{const{key:n,...r}=e;return Fp.jsx("li",{...r,children:ze(t)},n)}),Ze=(e,t)=>{const n=ke({option:e,index:t});return Je({...n,className:De.option},e,{selected:n["aria-selected"],index:t,inputValue:Le},Be)},et=We.slotProps.clearIndicator,tt=We.slotProps.popupIndicator;return Fp.jsxs(l.Fragment,{children:[Fp.jsx(kb,{ref:t,className:Km(De.root,u),ownerState:Be,...me(he),children:ie({id:Oe,disabled:b,fullWidth:!0,size:"small"===ce?"small":void 0,InputLabelProps:ve(),InputProps:{ref:Ae,className:De.inputRoot,startAdornment:Ye,onMouseDown:e=>{e.target===e.currentTarget&&Fe(e)},...(Me||Ie)&&{endAdornment:Fp.jsxs(Sb,{className:De.endAdornment,ownerState:Be,children:[Me?Fp.jsx(Eb,{...be(),"aria-label":f,title:f,ownerState:Be,...et,className:Km(De.clearIndicator,et?.className),children:c}):null,Ie?Fp.jsx(Cb,{...ye(),disabled:b,"aria-label":_e?h:J,title:_e?h:J,ownerState:Be,...tt,className:Km(De.popupIndicator,tt?.className),children:ne}):null]})}},inputProps:{className:De.input,disabled:b,readOnly:re,...ge()}})}),Pe?Fp.jsx(Ob,{as:qe,...Ge,children:Fp.jsxs(_b,{as:Ke,...He,children:[D&&0===Ne.length?Fp.jsx(Tb,{className:De.loading,ownerState:Be,children:W}):null,0!==Ne.length||O||D?null:Fp.jsx(Rb,{className:De.noOptions,ownerState:Be,role:"presentation",onMouseDown:e=>{e.preventDefault()},children:V}),Ne.length>0?Fp.jsx(Ue,{as:z,...Ve,children:Ne.map((e,t)=>N?Qe({key:e.key,group:e.group,children:e.options.map((t,n)=>Ze(t,e.index+n))}):Ze(e,t))}):null]})}):null]})}),Mb={entering:{opacity:1},entered:{opacity:1}},Ib=l.forwardRef(function(e,t){const n=zm(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:o,appear:i=!0,children:a,easing:s,in:u,onEnter:c,onEntered:d,onEntering:p,onExit:f,onExited:h,onExiting:m,style:g,timeout:v=r,TransitionComponent:y=Ao,...b}=e,w=l.useRef(null),x=ig(w,Ty(a),t),k=e=>t=>{if(e){const n=w.current;void 0===t?e(n):e(n,t)}},S=k(p),E=k((e,t)=>{pg(e);const r=fg({style:g,timeout:v,easing:s},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),c&&c(e,t)}),C=k(d),O=k(m),_=k(e=>{const t=fg({style:g,timeout:v,easing:s},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),f&&f(e)}),T=k(h);return Fp.jsx(y,{appear:i,in:u,nodeRef:w,onEnter:E,onEntered:C,onEntering:S,onExit:_,onExited:T,onExiting:O,addEndListener:e=>{o&&o(w.current,e)},timeout:v,...b,children:(e,{ownerState:t,...n})=>l.cloneElement(a,{style:{opacity:0,visibility:"exited"!==e||u?void 0:"hidden",...Mb[e],...g,...a.props.style},ref:x,...n})})});function Fb(e){return fh("MuiBackdrop",e)}hh("MuiBackdrop",["root","invisible"]);const $b=Wm("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),jb=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiBackdrop"}),{children:r,className:o,component:i="div",invisible:a=!1,open:s,components:l={},componentsProps:u={},slotProps:c={},slots:d={},TransitionComponent:p,transitionDuration:f,...h}=n,m={...n,component:i,invisible:a},g=(e=>{const{classes:t,invisible:n}=e;return Jh({root:["root",n&&"invisible"]},Fb,t)})(m),v={component:i,slots:{transition:p,root:l.Root,...d},slotProps:{...u,...c}},[y,b]=wg("root",{elementType:$b,externalForwardedProps:v,className:Km(g.root,o),ownerState:m}),[w,x]=wg("transition",{elementType:Ib,externalForwardedProps:v,ownerState:m});return Fp.jsx(w,{in:s,timeout:f,...h,...x,children:Fp.jsx(y,{"aria-hidden":!0,...b,classes:g,ref:t,children:r})})}),zb=hh("MuiBox",["root"]),Bb=$m(),Db=function(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=e,i=jp("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(Zf);return l.forwardRef(function(e,a){const s=oh(n),{className:l,component:u="div",...c}=sh(e);return Fp.jsx(i,{as:u,ref:a,className:dh(l,o?o(r):r),theme:t&&s[t]||s,...c})})}({themeId:Vc,defaultTheme:Bb,defaultClassName:zb.root,generateClassName:uh.generate});function Wb(e){return fh("PrivateSwitchBase",e)}hh("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const Ub=Wm(Fg,{name:"MuiSwitchBase"})({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>"start"===e&&"small"!==t.size,style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>"end"===e&&"small"!==t.size,style:{marginRight:-12}}]}),Vb=Wm("input",{name:"MuiSwitchBase",shouldForwardProp:Dm})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),Kb=l.forwardRef(function(e,t){const{autoFocus:n,checked:r,checkedIcon:o,defaultChecked:i,disabled:a,disableFocusRipple:s=!1,edge:l=!1,icon:u,id:c,inputProps:d,inputRef:p,name:f,onBlur:h,onChange:m,onFocus:g,readOnly:v,required:y=!1,tabIndex:b,type:w,value:x,slots:k={},slotProps:S={},...E}=e,[C,O]=rg({controlled:r,default:Boolean(i),name:"SwitchBase",state:"checked"}),_=Zy();let T=a;_&&void 0===T&&(T=_.disabled);const R="checkbox"===w||"radio"===w,P={...e,checked:C,disabled:T,disableFocusRipple:s,edge:l},A=(e=>{const{classes:t,checked:n,disabled:r,edge:o}=e;return Jh({root:["root",n&&"checked",r&&"disabled",o&&`edge${sf(o)}`],input:["input"]},Wb,t)})(P),L={slots:k,slotProps:{input:d,...S}},[N,M]=wg("root",{ref:t,elementType:Ub,className:A.root,shouldForwardComponentProp:!0,externalForwardedProps:{...L,component:"span",...E},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),(e=>{g&&g(e),_&&_.onFocus&&_.onFocus(e)})(t)},onBlur:t=>{e.onBlur?.(t),(e=>{h&&h(e),_&&_.onBlur&&_.onBlur(e)})(t)}}),ownerState:P,additionalProps:{centerRipple:!0,focusRipple:!s,disabled:T,role:void 0,tabIndex:null}}),[I,F]=wg("input",{ref:p,elementType:Vb,className:A.input,externalForwardedProps:L,getSlotProps:e=>({...e,onChange:t=>{e.onChange?.(t),(e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;O(t),m&&m(e,t)})(t)}}),ownerState:P,additionalProps:{autoFocus:n,checked:r,defaultChecked:i,disabled:T,id:R?c:void 0,name:f,readOnly:v,required:y,tabIndex:b,type:w,..."checkbox"===w&&void 0===x?{}:{value:x}}});return Fp.jsxs(N,{...M,children:[Fp.jsx(I,{...F}),C?o:u]})});var Hb=Jm(Fp.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"})),qb=Jm(Fp.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})),Gb=Jm(Fp.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}));function Yb(e){return fh("MuiCheckbox",e)}const Xb=hh("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),Qb=Wm(Kb,{shouldForwardProp:e=>Dm(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${sf(n.size)}`],"default"!==n.color&&t[`color${sf(n.color)}`]]}})(qm(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(jg()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(jg()).map(([t])=>({props:{color:t},style:{[`&.${Xb.checked}, &.${Xb.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${Xb.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),Jb=Fp.jsx(qb,{}),Zb=Fp.jsx(Hb,{}),ew=Fp.jsx(Gb,{}),tw=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiCheckbox"}),{checkedIcon:r=Jb,color:o="primary",icon:i=Zb,indeterminate:a=!1,indeterminateIcon:s=ew,inputProps:u,size:c="medium",disableRipple:d=!1,className:p,slots:f={},slotProps:h={},...m}=n,g=a?s:i,v=a?s:r,y={...n,disableRipple:d,color:o,indeterminate:a,size:c},b=(e=>{const{classes:t,indeterminate:n,color:r,size:o}=e,i=Jh({root:["root",n&&"indeterminate",`color${sf(r)}`,`size${sf(o)}`]},Yb,t);return{...t,...i}})(y),w=h.input??u,[x,k]=wg("root",{ref:t,elementType:Qb,className:Km(b.root,p),shouldForwardComponentProp:!0,externalForwardedProps:{slots:f,slotProps:h,...m},ownerState:y,additionalProps:{type:"checkbox",icon:l.cloneElement(g,{fontSize:g.props.fontSize??c}),checkedIcon:l.cloneElement(v,{fontSize:v.props.fontSize??c}),disableRipple:d,slots:f,slotProps:{input:ag("function"==typeof w?w(y):w,{"data-indeterminate":a})}}});return Fp.jsx(x,{...k,classes:b})});function nw(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function rw(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function ow(e){return parseInt(tg(e).getComputedStyle(e).paddingRight,10)||0}function iw(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,e=>{const t=!i.includes(e),n=!function(e){const t=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&rw(e,o)})}function aw(e,t){let n=-1;return e.some((e,r)=>!!t(e)&&(n=r,!0)),n}function sw(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=eg(e);return t.body===e?tg(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=nw(tg(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${ow(r)+e}px`;const t=eg(r).querySelectorAll(".mui-fixed");[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${ow(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=eg(r).body;else{const t=r.parentElement,n=tg(r);e="HTML"===t?.nodeName&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach(({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)})}}function lw(e){let t=e.activeElement;for(;null!=t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t}const uw=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function cw(e){const t=[],n=[];return Array.from(e.querySelectorAll(uw)).forEach((e,r)=>{const o=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==o&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)&&(0===o?t.push(e):n.push({documentOrder:r,tabIndex:o,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function dw(){return!0}function pw(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=cw,isEnabled:a=dw,open:s}=e,u=l.useRef(!1),c=l.useRef(null),d=l.useRef(null),p=l.useRef(null),f=l.useRef(null),h=l.useRef(!1),m=l.useRef(null),g=ig(Ty(t),m),v=l.useRef(null);l.useEffect(()=>{s&&m.current&&(h.current=!n)},[n,s]),l.useEffect(()=>{if(!s||!m.current)return;const e=lw(eg(m.current));return m.current.contains(e)||(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex","-1"),h.current&&m.current.focus()),()=>{o||(p.current&&p.current.focus&&(u.current=!0,p.current.focus()),p.current=null)}},[s]),l.useEffect(()=>{if(!s||!m.current)return;const e=eg(m.current),t=lw(e),n=e=>{v.current=e,!r&&a()&&"Tab"===e.key&&t===m.current&&e.shiftKey&&(u.current=!0,d.current&&d.current.focus())},o=()=>{const t=m.current;if(null===t)return;const n=lw(e);if(!e.hasFocus()||!a()||u.current)return void(u.current=!1);if(t.contains(n))return;if(r&&n!==c.current&&n!==d.current)return;if(n!==f.current)f.current=null;else if(null!==f.current)return;if(!h.current)return;let o=[];if(n!==c.current&&n!==d.current||(o=i(m.current)),o.length>0){const e=Boolean(v.current?.shiftKey&&"Tab"===v.current?.key),t=o[0],n=o[o.length-1];"string"!=typeof t&&"string"!=typeof n&&(e?n.focus():t.focus())}else t.focus()};e.addEventListener("focusin",o),e.addEventListener("keydown",n,!0);const l=setInterval(()=>{const t=lw(e);t&&"BODY"===t.tagName&&o()},50);return()=>{clearInterval(l),e.removeEventListener("focusin",o),e.removeEventListener("keydown",n,!0)}},[n,r,o,a,s,i]);const y=e=>{null===p.current&&(p.current=e.relatedTarget),h.current=!0};return Fp.jsxs(l.Fragment,{children:[Fp.jsx("div",{tabIndex:s?0:-1,onFocus:y,ref:c,"data-testid":"sentinelStart"}),l.cloneElement(t,{ref:g,onFocus:e=>{null===p.current&&(p.current=e.relatedTarget),h.current=!0,f.current=e.target;const n=t.props.onFocus;n&&n(e)}}),Fp.jsx("div",{tabIndex:s?0:-1,onFocus:y,ref:d,"data-testid":"sentinelEnd"})]})}const fw=()=>{},hw=new class{constructor(){this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&rw(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)}),t}(t);iw(t,e.mount,e.modalRef,r,!0);const o=aw(this.containers,e=>e.container===t);return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=aw(this.containers,t=>t.modals.includes(e)),r=this.containers[n];r.restore||(r.restore=sw(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=aw(this.containers,t=>t.modals.includes(e)),o=this.containers[r];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(n,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&rw(e.modalRef,t),iw(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&rw(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function mw(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:o=!1,onTransitionEnter:i,onTransitionExited:a,children:s,onClose:u,open:c,rootRef:d}=e,p=l.useRef({}),f=l.useRef(null),h=l.useRef(null),m=ig(h,d),[g,v]=l.useState(!c),y=function(e){return!!e&&e.props.hasOwnProperty("in")}(s);let b=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(b=!1);const w=()=>(p.current.modalRef=h.current,p.current.mount=f.current,p.current),x=()=>{hw.mount(w(),{disableScrollLock:r}),h.current&&(h.current.scrollTop=0)},k=og(()=>{const e=function(e){return"function"==typeof e?e():e}(t)||eg(f.current).body;hw.add(w(),e),h.current&&x()}),S=()=>hw.isTopModal(w()),E=og(e=>{f.current=e,e&&(c&&S()?x():h.current&&rw(h.current,b))}),C=l.useCallback(()=>{hw.remove(w(),b)},[b]);l.useEffect(()=>()=>{C()},[C]),l.useEffect(()=>{c?k():y&&o||C()},[c,C,y,o,k]);const O=e=>t=>{e.onKeyDown?.(t),"Escape"===t.key&&229!==t.which&&S()&&(n||(t.stopPropagation(),u&&u(t,"escapeKeyDown")))},_=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&u&&u(t,"backdropClick")};return{getRootProps:(t={})=>{const n=vg(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r={...n,...t};return{role:"presentation",...r,onKeyDown:O(r),ref:m}},getBackdropProps:(e={})=>{const t=e;return{"aria-hidden":!0,...t,onClick:_(t),open:c}},getTransitionProps:()=>({onEnter:Um(()=>{v(!1),i&&i()},s?.props.onEnter??fw),onExited:Um(()=>{v(!0),a&&a(),o&&C()},s?.props.onExited??fw)}),rootRef:m,portalRef:E,isTopModal:S,exited:g,hasTransition:y}}function gw(e){return fh("MuiModal",e)}hh("MuiModal",["root","hidden","backdrop"]);const vw=Wm("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(qm(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:"hidden"}}]}))),yw=Wm(jb,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),bw=l.forwardRef(function(e,t){const n=Gm({name:"MuiModal",props:e}),{BackdropComponent:r=yw,BackdropProps:o,classes:i,className:a,closeAfterTransition:s=!1,children:u,container:c,component:d,components:p={},componentsProps:f={},disableAutoFocus:h=!1,disableEnforceFocus:m=!1,disableEscapeKeyDown:g=!1,disablePortal:v=!1,disableRestoreFocus:y=!1,disableScrollLock:b=!1,hideBackdrop:w=!1,keepMounted:x=!1,onClose:k,onTransitionEnter:S,onTransitionExited:E,open:C,slotProps:O={},slots:_={},theme:T,...R}=n,P={...n,closeAfterTransition:s,disableAutoFocus:h,disableEnforceFocus:m,disableEscapeKeyDown:g,disablePortal:v,disableRestoreFocus:y,disableScrollLock:b,hideBackdrop:w,keepMounted:x},{getRootProps:A,getBackdropProps:L,getTransitionProps:N,portalRef:M,isTopModal:I,exited:F,hasTransition:$}=mw({...P,rootRef:t}),j={...P,exited:F},z=(e=>{const{open:t,exited:n,classes:r}=e;return Jh({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},gw,r)})(j),B={};if(void 0===u.props.tabIndex&&(B.tabIndex="-1"),$){const{onEnter:e,onExited:t}=N();B.onEnter=e,B.onExited=t}const D={slots:{root:p.Root,backdrop:p.Backdrop,..._},slotProps:{...f,...O}},[W,U]=wg("root",{ref:t,elementType:vw,externalForwardedProps:{...D,...R,component:d},getSlotProps:A,ownerState:j,className:Km(a,z?.root,!j.open&&j.exited&&z?.hidden)}),[V,K]=wg("backdrop",{ref:o?.ref,elementType:r,externalForwardedProps:D,shouldForwardComponentProp:!0,additionalProps:o,getSlotProps:e=>L({...e,onClick:t=>{e?.onClick&&e.onClick(t)}}),className:Km(o?.className,z?.backdrop),ownerState:j});return x||C||$&&!F?Fp.jsx(Ry,{ref:M,container:c,disablePortal:v,children:Fp.jsxs(W,{...U,children:[!w&&r?Fp.jsx(V,{...K}):null,Fp.jsx(pw,{disableEnforceFocus:m,disableAutoFocus:h,disableRestoreFocus:y,isEnabled:I,open:C,children:l.cloneElement(u,B)})]})}):null}),ww=hh("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),xw=Wm(sb,{shouldForwardProp:e=>Dm(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...ib(e,t),!n.disableUnderline&&t.underline]}})(qm(({theme:e})=>{const t="light"===e.palette.mode,n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${gb.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${gb.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${gb.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${gb.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${gb.disabled}, .${gb.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${gb.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(jg()).map(([t])=>({props:{disableUnderline:!1,color:t},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t]?.main}`}}})),{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:12}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:12}},{props:({ownerState:e})=>e.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel&&"small"===e.size,style:{paddingTop:8,paddingBottom:9}}]}})),kw=Wm(lb,{name:"MuiFilledInput",slot:"Input",overridesResolver:ab})(qm(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}},{props:({ownerState:e})=>e.hiddenLabel&&"small"===e.size,style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:e})=>e.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),Sw=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiFilledInput"}),{disableUnderline:r=!1,components:o={},componentsProps:i,fullWidth:a=!1,hiddenLabel:s,inputComponent:l="input",multiline:u=!1,slotProps:c,slots:d={},type:p="text",...f}=n,h={...n,disableUnderline:r,fullWidth:a,inputComponent:l,multiline:u,type:p},m=(e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:o,size:i,hiddenLabel:a,multiline:s}=e,l=Jh({root:["root",!n&&"underline",r&&"adornedStart",o&&"adornedEnd","small"===i&&`size${sf(i)}`,a&&"hiddenLabel",s&&"multiline"],input:["input"]},mb,t);return{...t,...l}})(n),g={root:{ownerState:h},input:{ownerState:h}},v=c??i?Xp(g,c??i):g,y=d.root??o.Root??xw,b=d.input??o.Input??kw;return Fp.jsx(cb,{slots:{root:y,input:b},slotProps:v,fullWidth:a,inputComponent:l,multiline:u,ref:t,type:p,...f,classes:m})});function Ew(e){return fh("MuiFormControl",e)}Sw.muiName="Input",hh("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const Cw=Wm("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`margin${sf(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),Ow=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiFormControl"}),{children:r,className:o,color:i="primary",component:a="div",disabled:s=!1,error:u=!1,focused:c,fullWidth:d=!1,hiddenLabel:p=!1,margin:f="none",required:h=!1,size:m="medium",variant:g="outlined",...v}=n,y={...n,color:i,component:a,disabled:s,error:u,fullWidth:d,hiddenLabel:p,margin:f,required:h,size:m,variant:g},b=(e=>{const{classes:t,margin:n,fullWidth:r}=e;return Jh({root:["root","none"!==n&&`margin${sf(n)}`,r&&"fullWidth"]},Ew,t)})(y),[w,x]=l.useState(()=>{let e=!1;return r&&l.Children.forEach(r,t=>{if(!Zh(t,["Input","Select"]))return;const n=Zh(t,["Select"])?t.props.input:t;n&&n.props.startAdornment&&(e=!0)}),e}),[k,S]=l.useState(()=>{let e=!1;return r&&l.Children.forEach(r,t=>{Zh(t,["Input","Select"])&&(tb(t.props,!0)||tb(t.props.inputProps,!0))&&(e=!0)}),e}),[E,C]=l.useState(!1);s&&E&&C(!1);const O=void 0===c||s?E:c;let _;l.useRef(!1);const T=l.useCallback(()=>{S(!0)},[]),R=l.useCallback(()=>{S(!1)},[]),P=l.useMemo(()=>({adornedStart:w,setAdornedStart:x,color:i,disabled:s,error:u,filled:k,focused:O,fullWidth:d,hiddenLabel:p,size:m,onBlur:()=>{C(!1)},onFocus:()=>{C(!0)},onEmpty:R,onFilled:T,registerEffect:_,required:h,variant:g}),[w,i,s,u,k,O,d,p,_,R,T,h,m,g]);return Fp.jsx(Jy.Provider,{value:P,children:Fp.jsx(Cw,{as:a,ownerState:y,className:Km(b.root,o),ref:t,...v,children:r})})});function _w(e){return fh("MuiFormHelperText",e)}const Tw=hh("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var Rw;const Pw=Wm("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${sf(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(qm(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${Tw.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Tw.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:e})=>e.contained,style:{marginLeft:14,marginRight:14}}]}))),Aw=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiFormHelperText"}),{children:r,className:o,component:i="p",disabled:a,error:s,filled:l,focused:u,margin:c,required:d,variant:p,...f}=n,h=Qy({props:n,muiFormControl:Zy(),states:["variant","size","disabled","error","filled","focused","required"]}),m={...n,component:i,contained:"filled"===h.variant||"outlined"===h.variant,variant:h.variant,size:h.size,disabled:h.disabled,error:h.error,filled:h.filled,focused:h.focused,required:h.required};delete m.ownerState;const g=(e=>{const{classes:t,contained:n,size:r,disabled:o,error:i,filled:a,focused:s,required:l}=e;return Jh({root:["root",o&&"disabled",i&&"error",r&&`size${sf(r)}`,n&&"contained",s&&"focused",a&&"filled",l&&"required"]},_w,t)})(m);return Fp.jsx(Pw,{as:i,className:Km(g.root,o),ref:t,...f,ownerState:m,children:" "===r?Rw||(Rw=Fp.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):r})});function Lw(e){return fh("MuiFormLabel",e)}const Nw=hh("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),Mw=Wm("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"secondary"===n.color&&t.colorSecondary,n.filled&&t.filled]}})(qm(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(jg()).map(([t])=>({props:{color:t},style:{[`&.${Nw.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${Nw.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Nw.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),Iw=Wm("span",{name:"MuiFormLabel",slot:"Asterisk"})(qm(({theme:e})=>({[`&.${Nw.error}`]:{color:(e.vars||e).palette.error.main}}))),Fw=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiFormLabel"}),{children:r,className:o,color:i,component:a="label",disabled:s,error:l,filled:u,focused:c,required:d,...p}=n,f=Qy({props:n,muiFormControl:Zy(),states:["color","required","focused","disabled","error","filled"]}),h={...n,color:f.color||"primary",component:a,disabled:f.disabled,error:f.error,filled:f.filled,focused:f.focused,required:f.required},m=(e=>{const{classes:t,color:n,focused:r,disabled:o,error:i,filled:a,required:s}=e;return Jh({root:["root",`color${sf(n)}`,o&&"disabled",i&&"error",a&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",i&&"error"]},Lw,t)})(h);return Fp.jsxs(Mw,{as:a,ownerState:h,className:Km(m.root,o),ref:t,...p,children:[r,f.required&&Fp.jsxs(Iw,{ownerState:h,"aria-hidden":!0,className:m.asterisk,children:[" ","*"]})]})});function $w(e){return`scale(${e}, ${e**2})`}const jw={entering:{opacity:1,transform:$w(1)},entered:{opacity:1,transform:"none"}},zw="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Bw=l.forwardRef(function(e,t){const{addEndListener:n,appear:r=!0,children:o,easing:i,in:a,onEnter:s,onEntered:u,onEntering:c,onExit:d,onExited:p,onExiting:f,style:h,timeout:m="auto",TransitionComponent:g=Ao,...v}=e,y=dg(),b=l.useRef(),w=zm(),x=l.useRef(null),k=ig(x,Ty(o),t),S=e=>t=>{if(e){const n=x.current;void 0===t?e(n):e(n,t)}},E=S(c),C=S((e,t)=>{pg(e);const{duration:n,delay:r,easing:o}=fg({style:h,timeout:m,easing:i},{mode:"enter"});let a;"auto"===m?(a=w.transitions.getAutoHeightDuration(e.clientHeight),b.current=a):a=n,e.style.transition=[w.transitions.create("opacity",{duration:a,delay:r}),w.transitions.create("transform",{duration:zw?a:.666*a,delay:r,easing:o})].join(","),s&&s(e,t)}),O=S(u),_=S(f),T=S(e=>{const{duration:t,delay:n,easing:r}=fg({style:h,timeout:m,easing:i},{mode:"exit"});let o;"auto"===m?(o=w.transitions.getAutoHeightDuration(e.clientHeight),b.current=o):o=t,e.style.transition=[w.transitions.create("opacity",{duration:o,delay:n}),w.transitions.create("transform",{duration:zw?o:.666*o,delay:zw?n:n||.333*o,easing:r})].join(","),e.style.opacity=0,e.style.transform=$w(.75),d&&d(e)}),R=S(p);return Fp.jsx(g,{appear:r,in:a,nodeRef:x,onEnter:C,onEntered:O,onEntering:E,onExit:T,onExited:R,onExiting:_,addEndListener:e=>{"auto"===m&&y.start(b.current||0,e),n&&n(x.current,e)},timeout:"auto"===m?null:m,...v,children:(e,{ownerState:t,...n})=>l.cloneElement(o,{style:{opacity:0,transform:$w(.75),visibility:"exited"!==e||a?void 0:"hidden",...jw[e],...h,...o.props.style},ref:k,...n})})});Bw&&(Bw.muiSupportAuto=!0);const Dw=Wm(sb,{shouldForwardProp:e=>Dm(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...ib(e,t),!n.disableUnderline&&t.underline]}})(qm(({theme:e})=>{let t="light"===e.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(t=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:"relative",variants:[{props:({ownerState:e})=>e.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${pb.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${pb.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${pb.disabled}, .${pb.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${pb.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(jg()).map(([t])=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}}))]}})),Ww=Wm(lb,{name:"MuiInput",slot:"Input",overridesResolver:ab})({}),Uw=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiInput"}),{disableUnderline:r=!1,components:o={},componentsProps:i,fullWidth:a=!1,inputComponent:s="input",multiline:l=!1,slotProps:u,slots:c={},type:d="text",...p}=n,f=(e=>{const{classes:t,disableUnderline:n}=e,r=Jh({root:["root",!n&&"underline"],input:["input"]},db,t);return{...t,...r}})(n),h={root:{ownerState:{disableUnderline:r}}},m=u??i?Xp(u??i,h):h,g=c.root??o.Root??Dw,v=c.input??o.Input??Ww;return Fp.jsx(cb,{slots:{root:g,input:v},slotProps:m,fullWidth:a,inputComponent:s,multiline:l,ref:t,type:d,...p,classes:f})});function Vw(e){return fh("MuiInputLabel",e)}Uw.muiName="Input",hh("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const Kw=Wm(Fw,{shouldForwardProp:e=>Dm(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Nw.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,"small"===n.size&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(qm(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:e})=>e.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:e})=>e.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:e})=>!e.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:e,ownerState:t})=>"filled"===e&&t.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:e,ownerState:t,size:n})=>"filled"===e&&t.shrink&&"small"===n,style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:e,ownerState:t})=>"outlined"===e&&t.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),Hw=l.forwardRef(function(e,t){const n=Gm({name:"MuiInputLabel",props:e}),{disableAnimation:r=!1,margin:o,shrink:i,variant:a,className:s,...l}=n,u=Zy();let c=i;void 0===c&&u&&(c=u.filled||u.focused||u.adornedStart);const d=Qy({props:n,muiFormControl:u,states:["size","variant","required","focused"]}),p={...n,disableAnimation:r,formControl:u,shrink:c,size:d.size,variant:d.variant,required:d.required,focused:d.focused},f=(e=>{const{classes:t,formControl:n,size:r,shrink:o,disableAnimation:i,variant:a,required:s}=e,l=Jh({root:["root",n&&"formControl",!i&&"animated",o&&"shrink",r&&"medium"!==r&&`size${sf(r)}`,a],asterisk:[s&&"asterisk"]},Vw,t);return{...t,...l}})(p);return Fp.jsx(Kw,{"data-shrink":c,ref:t,className:Km(f.root,s),...l,ownerState:p,classes:f})}),qw=l.createContext({});function Gw(e){return fh("MuiList",e)}hh("MuiList",["root","padding","dense","subheader"]);const Yw=Wm("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),Xw=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiList"}),{children:r,className:o,component:i="ul",dense:a=!1,disablePadding:s=!1,subheader:u,...c}=n,d=l.useMemo(()=>({dense:a}),[a]),p={...n,component:i,dense:a,disablePadding:s},f=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return Jh({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},Gw,t)})(p);return Fp.jsx(qw.Provider,{value:d,children:Fp.jsxs(Yw,{as:i,className:Km(f.root,o),ref:t,ownerState:p,...c,children:[u,r]})})}),Qw=hh("MuiListItemIcon",["root","alignItemsFlexStart"]),Jw=hh("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function Zw(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function ex(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function tx(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),n=n.trim().toLowerCase(),0!==n.length&&(t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join("")))}function nx(e,t,n,r,o,i){let a=!1,s=o(e,t,!!t&&n);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const t=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&tx(s,i)&&!t)return s.focus(),!0;s=o(e,s,n)}return!1}const rx=l.forwardRef(function(e,t){const{actions:n,autoFocus:r=!1,autoFocusItem:o=!1,children:i,className:a,disabledItemsFocusable:s=!1,disableListWrap:u=!1,onKeyDown:c,variant:d="selectedMenu",...p}=e,f=l.useRef(null),h=l.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});_h(()=>{r&&f.current.focus()},[r]),l.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const n=!f.current.style.width;if(e.clientHeight<f.current.clientHeight&&n){const n=`${nw(tg(e))}px`;f.current.style["rtl"===t?"paddingLeft":"paddingRight"]=n,f.current.style.width=`calc(100% + ${n})`}return f.current}}),[]);const m=ig(f,t);let g=-1;l.Children.forEach(i,(e,t)=>{l.isValidElement(e)?(e.props.disabled||("selectedMenu"===d&&e.props.selected||-1===g)&&(g=t),g===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(g+=1,g>=i.length&&(g=-1))):g===t&&(g+=1,g>=i.length&&(g=-1))});const v=l.Children.map(i,(e,t)=>{if(t===g){const t={};return o&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===d&&(t.tabIndex=0),l.cloneElement(e,t)}return e});return Fp.jsx(Xw,{role:"menu",ref:m,className:a,onKeyDown:e=>{const t=f.current,n=e.key;if(e.ctrlKey||e.metaKey||e.altKey)return void(c&&c(e));const r=lw(eg(t));if("ArrowDown"===n)e.preventDefault(),nx(t,r,u,s,Zw);else if("ArrowUp"===n)e.preventDefault(),nx(t,r,u,s,ex);else if("Home"===n)e.preventDefault(),nx(t,null,u,s,Zw);else if("End"===n)e.preventDefault(),nx(t,null,u,s,ex);else if(1===n.length){const o=h.current,i=n.toLowerCase(),a=performance.now();o.keys.length>0&&(a-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&i!==o.keys[0]&&(o.repeating=!1)),o.lastTime=a,o.keys.push(i);const l=r&&!o.repeating&&tx(r,o);o.previousKeyMatched&&(l||nx(t,r,!1,s,Zw,o))?e.preventDefault():o.previousKeyMatched=!1}c&&c(e)},tabIndex:r?0:-1,...p,children:v})});function ox(e){return fh("MuiPopover",e)}function ix(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function ax(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function sx(e){return[e.horizontal,e.vertical].map(e=>"number"==typeof e?`${e}px`:e).join(" ")}function lx(e){return"function"==typeof e?e():e}hh("MuiPopover",["root","paper"]);const ux=Wm(bw,{name:"MuiPopover",slot:"Root"})({}),cx=Wm(Sg,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),dx=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiPopover"}),{action:r,anchorEl:o,anchorOrigin:i={vertical:"top",horizontal:"left"},anchorPosition:a,anchorReference:s="anchorEl",children:u,className:c,container:d,elevation:p=8,marginThreshold:f=16,open:h,PaperProps:m={},slots:g={},slotProps:v={},transformOrigin:y={vertical:"top",horizontal:"left"},TransitionComponent:b,transitionDuration:w="auto",TransitionProps:x={},disableScrollLock:k=!1,...S}=n,E=l.useRef(),C={...n,anchorOrigin:i,anchorReference:s,elevation:p,marginThreshold:f,transformOrigin:y,TransitionComponent:b,transitionDuration:w,TransitionProps:x},O=(e=>{const{classes:t}=e;return Jh({root:["root"],paper:["paper"]},ox,t)})(C),_=l.useCallback(()=>{if("anchorPosition"===s)return a;const e=lx(o),t=(e&&1===e.nodeType?e:eg(E.current).body).getBoundingClientRect();return{top:t.top+ix(t,i.vertical),left:t.left+ax(t,i.horizontal)}},[o,i.horizontal,i.vertical,a,s]),T=l.useCallback(e=>({vertical:ix(e,y.vertical),horizontal:ax(e,y.horizontal)}),[y.horizontal,y.vertical]),R=l.useCallback(e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=T(t);if("none"===s)return{top:null,left:null,transformOrigin:sx(n)};const r=_();let i=r.top-n.vertical,a=r.left-n.horizontal;const l=i+t.height,u=a+t.width,c=tg(lx(o)),d=c.innerHeight-f,p=c.innerWidth-f;if(null!==f&&i<f){const e=i-f;i-=e,n.vertical+=e}else if(null!==f&&l>d){const e=l-d;i-=e,n.vertical+=e}if(null!==f&&a<f){const e=a-f;a-=e,n.horizontal+=e}else if(u>p){const e=u-p;a-=e,n.horizontal+=e}return{top:`${Math.round(i)}px`,left:`${Math.round(a)}px`,transformOrigin:sx(n)}},[o,s,_,T,f]),[P,A]=l.useState(h),L=l.useCallback(()=>{const e=E.current;if(!e)return;const t=R(e);null!==t.top&&e.style.setProperty("top",t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,A(!0)},[R]);l.useEffect(()=>(k&&window.addEventListener("scroll",L),()=>window.removeEventListener("scroll",L)),[o,k,L]);l.useEffect(()=>{h&&L()}),l.useImperativeHandle(r,()=>h?{updatePosition:()=>{L()}}:null,[h,L]),l.useEffect(()=>{if(!h)return;const e=Zm(()=>{L()}),t=tg(lx(o));return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[o,h,L]);let N=w;const M={slots:{transition:b,...g},slotProps:{transition:x,paper:m,...v}},[I,F]=wg("transition",{elementType:Bw,externalForwardedProps:M,ownerState:C,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),L()},onExited:t=>{e.onExited?.(t),A(!1)}}),additionalProps:{appear:!0,in:h}});"auto"!==w||I.muiSupportAuto||(N=void 0);const $=d||(o?eg(lx(o)).body:void 0),[j,{slots:z,slotProps:B,...D}]=wg("root",{ref:t,elementType:ux,externalForwardedProps:{...M,...S},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:g.backdrop},slotProps:{backdrop:ag("function"==typeof v.backdrop?v.backdrop(C):v.backdrop,{invisible:!0})},container:$,open:h},ownerState:C,className:Km(O.root,c)}),[W,U]=wg("paper",{ref:E,className:O.paper,elementType:cx,externalForwardedProps:M,shouldForwardComponentProp:!0,additionalProps:{elevation:p,style:P?void 0:{opacity:0}},ownerState:C});return Fp.jsx(j,{...D,...!hg(j)&&{slots:z,slotProps:B,disableScrollLock:k},children:Fp.jsx(I,{...F,timeout:N,children:Fp.jsx(W,{...U,children:u})})})});function px(e){return fh("MuiMenu",e)}hh("MuiMenu",["root","paper","list"]);const fx={vertical:"top",horizontal:"right"},hx={vertical:"top",horizontal:"left"},mx=Wm(dx,{shouldForwardProp:e=>Dm(e)||"classes"===e,name:"MuiMenu",slot:"Root"})({}),gx=Wm(cx,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),vx=Wm(rx,{name:"MuiMenu",slot:"List"})({outline:0}),yx=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiMenu"}),{autoFocus:r=!0,children:o,className:i,disableAutoFocusItem:a=!1,MenuListProps:s={},onClose:u,open:c,PaperProps:d={},PopoverClasses:p,transitionDuration:f="auto",TransitionProps:{onEntering:h,...m}={},variant:g="selectedMenu",slots:v={},slotProps:y={},...b}=n,w=Wh(),x={...n,autoFocus:r,disableAutoFocusItem:a,MenuListProps:s,onEntering:h,PaperProps:d,transitionDuration:f,TransitionProps:m,variant:g},k=(e=>{const{classes:t}=e;return Jh({root:["root"],paper:["paper"],list:["list"]},px,t)})(x),S=r&&!a&&c,E=l.useRef(null);let C=-1;l.Children.map(o,(e,t)=>{l.isValidElement(e)&&(e.props.disabled||("selectedMenu"===g&&e.props.selected||-1===C)&&(C=t))});const O={slots:v,slotProps:{list:s,transition:m,paper:d,...y}},_=_y({elementType:v.root,externalSlotProps:y.root,ownerState:x,className:[k.root,i]}),[T,R]=wg("paper",{className:k.paper,elementType:gx,externalForwardedProps:O,shouldForwardComponentProp:!0,ownerState:x}),[P,A]=wg("list",{className:Km(k.list,s.className),elementType:vx,shouldForwardComponentProp:!0,externalForwardedProps:O,getSlotProps:e=>({...e,onKeyDown:t=>{(e=>{"Tab"===e.key&&(e.preventDefault(),u&&u(e,"tabKeyDown"))})(t),e.onKeyDown?.(t)}}),ownerState:x}),L="function"==typeof O.slotProps.transition?O.slotProps.transition(x):O.slotProps.transition;return Fp.jsx(mx,{onClose:u,anchorOrigin:{vertical:"bottom",horizontal:w?"right":"left"},transformOrigin:w?fx:hx,slots:{root:v.root,paper:T,backdrop:v.backdrop,...v.transition&&{transition:v.transition}},slotProps:{root:_,paper:R,backdrop:"function"==typeof y.backdrop?y.backdrop(x):y.backdrop,transition:{...L,onEntering:(...e)=>{((e,t)=>{E.current&&E.current.adjustStyleForScrollbar(e,{direction:w?"rtl":"ltr"}),h&&h(e,t)})(...e),L?.onEntering?.(...e)}}},open:c,ref:t,transitionDuration:f,ownerState:x,...b,classes:p,children:Fp.jsx(P,{actions:E,autoFocus:r&&(-1===C||a),autoFocusItem:S,variant:g,...A,children:o})})});function bx(e){return fh("MuiMenuItem",e)}const wx=hh("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),xx=Wm(Fg,{shouldForwardProp:e=>Dm(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})(qm(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${wx.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${wx.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${wx.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${wx.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${wx.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${ww.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${ww.inset}`]:{marginLeft:52},[`& .${Jw.root}`]:{marginTop:0,marginBottom:0},[`& .${Jw.inset}`]:{paddingLeft:36},[`& .${Qw.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${Qw.root} svg`]:{fontSize:"1.25rem"}}}]}))),kx=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:o="li",dense:i=!1,divider:a=!1,disableGutters:s=!1,focusVisibleClassName:u,role:c="menuitem",tabIndex:d,className:p,...f}=n,h=l.useContext(qw),m=l.useMemo(()=>({dense:i||h.dense||!1,disableGutters:s}),[h.dense,i,s]),g=l.useRef(null);_h(()=>{r&&g.current&&g.current.focus()},[r]);const v={...n,dense:m.dense,divider:a,disableGutters:s},y=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e,s=Jh({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},bx,a);return{...a,...s}})(n),b=ig(g,t);let w;return n.disabled||(w=void 0!==d?d:-1),Fp.jsx(qw.Provider,{value:m,children:Fp.jsx(xx,{ref:b,role:c,tabIndex:w,component:o,focusVisibleClassName:Km(y.focusVisible,u),className:Km(y.root,p),...f,ownerState:v,classes:y})})});function Sx(e){return fh("MuiNativeSelect",e)}const Ex=hh("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Cx=Wm("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${Ex.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:e})=>"filled"!==e.variant&&"outlined"!==e.variant,style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),Ox=Wm(Cx,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Dm,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Ex.multiple}`]:t.multiple}]}})({}),_x=Wm("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${Ex.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),Tx=Wm(_x,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${sf(n.variant)}`],n.open&&t.iconOpen]}})({}),Rx=l.forwardRef(function(e,t){const{className:n,disabled:r,error:o,IconComponent:i,inputRef:a,variant:s="standard",...u}=e,c={...e,disabled:r,variant:s,error:o},d=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e;return Jh({select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${sf(n)}`,i&&"iconOpen",r&&"disabled"]},Sx,t)})(c);return Fp.jsxs(l.Fragment,{children:[Fp.jsx(Ox,{ownerState:c,className:Km(d.select,n),disabled:r,ref:a||t,...u}),e.multiple?null:Fp.jsx(Tx,{as:i,ownerState:c,className:d.icon})]})});var Px;const Ax=Wm("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:Dm})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),Lx=Wm("legend",{name:"MuiNotchedOutlined",shouldForwardProp:Dm})(qm(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:e})=>!e.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:e})=>e.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:e})=>e.withLabel&&e.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));const Nx=Wm(sb,{shouldForwardProp:e=>Dm(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:ib})(qm(({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${hb.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${hb.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${hb.focused} .${hb.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(jg()).map(([t])=>({props:{color:t},style:{[`&.${hb.focused} .${hb.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${hb.error} .${hb.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${hb.disabled} .${hb.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:14}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:14}},{props:({ownerState:e})=>e.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{padding:"8.5px 14px"}}]}})),Mx=Wm(function(e){const{children:t,classes:n,className:r,label:o,notched:i,...a}=e,s=null!=o&&""!==o,l={...e,notched:i,withLabel:s};return Fp.jsx(Ax,{"aria-hidden":!0,className:r,ownerState:l,...a,children:Fp.jsx(Lx,{ownerState:l,children:s?Fp.jsx("span",{children:o}):Px||(Px=Fp.jsx("span",{className:"notranslate","aria-hidden":!0,children:""}))})})},{name:"MuiOutlinedInput",slot:"NotchedOutline"})(qm(({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),Ix=Wm(lb,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:ab})(qm(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:e})=>e.multiline,style:{padding:0}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}}]}))),Fx=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiOutlinedInput"}),{components:r={},fullWidth:o=!1,inputComponent:i="input",label:a,multiline:s=!1,notched:u,slots:c={},slotProps:d={},type:p="text",...f}=n,h=(e=>{const{classes:t}=e,n=Jh({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},fb,t);return{...t,...n}})(n),m=Zy(),g=Qy({props:n,muiFormControl:m,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),v={...n,color:g.color||"primary",disabled:g.disabled,error:g.error,focused:g.focused,formControl:m,fullWidth:o,hiddenLabel:g.hiddenLabel,multiline:s,size:g.size,type:p},y=c.root??r.Root??Nx,b=c.input??r.Input??Ix,[w,x]=wg("notchedOutline",{elementType:Mx,className:h.notchedOutline,shouldForwardComponentProp:!0,ownerState:v,externalForwardedProps:{slots:c,slotProps:d},additionalProps:{label:null!=a&&""!==a&&g.required?Fp.jsxs(l.Fragment,{children:[a," ","*"]}):a}});return Fp.jsx(cb,{slots:{root:y,input:b},slotProps:d,renderSuffix:e=>Fp.jsx(w,{...x,notched:void 0!==u?u:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:o,inputComponent:i,multiline:s,ref:t,type:p,...f,classes:{...h,notchedOutline:null}})});function $x(e){return fh("MuiSelect",e)}Fx.muiName="Input";const jx=hh("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var zx;const Bx=Wm(Cx,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${jx.select}`]:t.select},{[`&.${jx.select}`]:t[n.variant]},{[`&.${jx.error}`]:t.error},{[`&.${jx.multiple}`]:t.multiple}]}})({[`&.${jx.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Dx=Wm(_x,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${sf(n.variant)}`],n.open&&t.iconOpen]}})({}),Wx=Wm("input",{shouldForwardProp:e=>Bm(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function Ux(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}function Vx(e){return null==e||"string"==typeof e&&!e.trim()}const Kx=l.forwardRef(function(e,t){const{"aria-describedby":n,"aria-label":r,autoFocus:o,autoWidth:i,children:a,className:s,defaultOpen:u,defaultValue:c,disabled:d,displayEmpty:p,error:f=!1,IconComponent:h,inputRef:m,labelId:g,MenuProps:v={},multiple:y,name:b,onBlur:w,onChange:x,onClose:k,onFocus:S,onKeyDown:E,onMouseDown:C,onOpen:O,open:_,readOnly:T,renderValue:R,required:P,SelectDisplayProps:A={},tabIndex:L,type:N,value:M,variant:I="standard",...F}=e,[$,j]=rg({controlled:M,default:c,name:"Select"}),[z,B]=rg({controlled:_,default:u,name:"Select"}),D=l.useRef(null),W=l.useRef(null),[U,V]=l.useState(null),{current:K}=l.useRef(null!=_),[H,q]=l.useState(),G=ig(t,m),Y=l.useCallback(e=>{W.current=e,e&&V(e)},[]),X=U?.parentNode;l.useImperativeHandle(G,()=>({focus:()=>{W.current.focus()},node:D.current,value:$}),[$]),l.useEffect(()=>{u&&z&&U&&!K&&(q(i?null:X.clientWidth),W.current.focus())},[U,i]),l.useEffect(()=>{o&&W.current.focus()},[o]),l.useEffect(()=>{if(!g)return;const e=eg(W.current).getElementById(g);if(e){const t=()=>{getSelection().isCollapsed&&W.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}},[g]);const Q=(e,t)=>{e?O&&O(t):k&&k(t),K||(q(i?null:X.clientWidth),B(e))},J=l.Children.toArray(a),Z=e=>t=>{let n;if(t.currentTarget.hasAttribute("tabindex")){if(y){n=Array.isArray($)?$.slice():[];const t=$.indexOf(e.props.value);-1===t?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),$!==n&&(j(n),x)){const r=t.nativeEvent||t,o=new r.constructor(r.type,r);Object.defineProperty(o,"target",{writable:!0,value:{value:n,name:b}}),x(o,e)}y||Q(!1,t)}},ee=null!==U&&z;let te,ne;delete F["aria-invalid"];const re=[];let oe=!1;(tb({value:$})||p)&&(R?te=R($):oe=!0);const ie=J.map(e=>{if(!l.isValidElement(e))return null;let t;if(y){if(!Array.isArray($))throw new Error(Uc(2));t=$.some(t=>Ux(t,e.props.value)),t&&oe&&re.push(e.props.children)}else t=Ux($,e.props.value),t&&oe&&(ne=e.props.children);return l.cloneElement(e,{"aria-selected":t?"true":"false",onClick:Z(e),onKeyUp:t=>{" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})});oe&&(te=y?0===re.length?null:re.reduce((e,t,n)=>(e.push(t),n<re.length-1&&e.push(", "),e),[]):ne);let ae,se=H;!i&&K&&U&&(se=X.clientWidth),ae=void 0!==L?L:d?null:0;const le=A.id||(b?`mui-component-select-${b}`:void 0),ue={...e,variant:I,value:$,open:ee,error:f},ce=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e;return Jh({select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${sf(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]},$x,t)})(ue),de={...v.PaperProps,..."function"==typeof v.slotProps?.paper?v.slotProps.paper(ue):v.slotProps?.paper},pe={...v.MenuListProps,..."function"==typeof v.slotProps?.list?v.slotProps.list(ue):v.slotProps?.list},fe=qh();return Fp.jsxs(l.Fragment,{children:[Fp.jsx(Bx,{as:"div",ref:Y,tabIndex:ae,role:"combobox","aria-controls":ee?fe:void 0,"aria-disabled":d?"true":void 0,"aria-expanded":ee?"true":"false","aria-haspopup":"listbox","aria-label":r,"aria-labelledby":[g,le].filter(Boolean).join(" ")||void 0,"aria-describedby":n,"aria-required":P?"true":void 0,"aria-invalid":f?"true":void 0,onKeyDown:e=>{if(!T){[" ","ArrowUp","ArrowDown","Enter"].includes(e.key)&&(e.preventDefault(),Q(!0,e)),E?.(e)}},onMouseDown:d||T?null:e=>{C?.(e),0===e.button&&(e.preventDefault(),W.current.focus(),Q(!0,e))},onBlur:e=>{!ee&&w&&(Object.defineProperty(e,"target",{writable:!0,value:{value:$,name:b}}),w(e))},onFocus:S,...A,ownerState:ue,className:Km(A.className,ce.select,s),id:le,children:Vx(te)?zx||(zx=Fp.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):te}),Fp.jsx(Wx,{"aria-invalid":f,value:Array.isArray($)?$.join(","):$,name:b,ref:D,"aria-hidden":!0,onChange:e=>{const t=J.find(t=>t.props.value===e.target.value);void 0!==t&&(j(t.props.value),x&&x(e,t))},tabIndex:-1,disabled:d,className:ce.nativeInput,autoFocus:o,required:P,...F,ownerState:ue}),Fp.jsx(Dx,{as:h,className:ce.icon,ownerState:ue}),Fp.jsx(yx,{id:`menu-${b||""}`,anchorEl:X,open:ee,onClose:e=>{Q(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...v,slotProps:{...v.slotProps,list:{"aria-labelledby":g,role:"listbox","aria-multiselectable":y?"true":void 0,disableListWrap:!0,id:fe,...pe},paper:{...de,style:{minWidth:se,...null!=de?de.style:null}}},children:ie})]})}),Hx={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>Dm(e)&&"variant"!==e},qx=Wm(Uw,Hx)(""),Gx=Wm(Fx,Hx)(""),Yx=Wm(Sw,Hx)(""),Xx=l.forwardRef(function(e,t){const n=Gm({name:"MuiSelect",props:e}),{autoWidth:r=!1,children:o,classes:i={},className:a,defaultOpen:s=!1,displayEmpty:u=!1,IconComponent:c=vb,id:d,input:p,inputProps:f,label:h,labelId:m,MenuProps:g,multiple:v=!1,native:y=!1,onClose:b,onOpen:w,open:x,renderValue:k,SelectDisplayProps:S,variant:E="outlined",...C}=n,O=y?Rx:Kx,_=Qy({props:n,muiFormControl:Zy(),states:["variant","error"]}),T=_.variant||E,R={...n,variant:T,classes:i},P=(e=>{const{classes:t}=e,n=Jh({root:["root"]},$x,t);return{...t,...n}})(R),{root:A,...L}=P,N=p||{standard:Fp.jsx(qx,{ownerState:R}),outlined:Fp.jsx(Gx,{label:h,ownerState:R}),filled:Fp.jsx(Yx,{ownerState:R})}[T],M=ig(t,Ty(N));return Fp.jsx(l.Fragment,{children:l.cloneElement(N,{inputComponent:O,inputProps:{children:o,error:_.error,IconComponent:c,variant:T,type:void 0,multiple:v,...y?{id:d}:{autoWidth:r,defaultOpen:s,displayEmpty:u,labelId:m,MenuProps:g,onClose:b,onOpen:w,open:x,renderValue:k,SelectDisplayProps:{id:d,...S}},...f,classes:f?Xp(L,f.classes):L,...p?p.props.inputProps:{}},...(v&&y||u)&&"outlined"===T?{notched:!0}:{},ref:M,className:Km(N.props.className,a,P.root),...!p&&{variant:T},...C})})});function Qx(e){return fh("MuiTextField",e)}Xx.muiName="Select",hh("MuiTextField",["root"]);const Jx={standard:Uw,filled:Sw,outlined:Fx},Zx=Wm(Ow,{name:"MuiTextField",slot:"Root"})({}),ek=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiTextField"}),{autoComplete:r,autoFocus:o=!1,children:i,className:a,color:s="primary",defaultValue:l,disabled:u=!1,error:c=!1,FormHelperTextProps:d,fullWidth:p=!1,helperText:f,id:h,InputLabelProps:m,inputProps:g,InputProps:v,inputRef:y,label:b,maxRows:w,minRows:x,multiline:k=!1,name:S,onBlur:E,onChange:C,onFocus:O,placeholder:_,required:T=!1,rows:R,select:P=!1,SelectProps:A,slots:L={},slotProps:N={},type:M,value:I,variant:F="outlined",...$}=n,j={...n,autoFocus:o,color:s,disabled:u,error:c,fullWidth:p,multiline:k,required:T,select:P,variant:F},z=(e=>{const{classes:t}=e;return Jh({root:["root"]},Qx,t)})(j),B=qh(h),D=f&&B?`${B}-helper-text`:void 0,W=b&&B?`${B}-label`:void 0,U=Jx[F],V={slots:L,slotProps:{input:v,inputLabel:m,htmlInput:g,formHelperText:d,select:A,...N}},K={},H=V.slotProps.inputLabel;"outlined"===F&&(H&&void 0!==H.shrink&&(K.notched=H.shrink),K.label=b),P&&(A&&A.native||(K.id=void 0),K["aria-describedby"]=void 0);const[q,G]=wg("root",{elementType:Zx,shouldForwardComponentProp:!0,externalForwardedProps:{...V,...$},ownerState:j,className:Km(z.root,a),ref:t,additionalProps:{disabled:u,error:c,fullWidth:p,required:T,color:s,variant:F}}),[Y,X]=wg("input",{elementType:U,externalForwardedProps:V,additionalProps:K,ownerState:j}),[Q,J]=wg("inputLabel",{elementType:Hw,externalForwardedProps:V,ownerState:j}),[Z,ee]=wg("htmlInput",{elementType:"input",externalForwardedProps:V,ownerState:j}),[te,ne]=wg("formHelperText",{elementType:Aw,externalForwardedProps:V,ownerState:j}),[re,oe]=wg("select",{elementType:Xx,externalForwardedProps:V,ownerState:j}),ie=Fp.jsx(Y,{"aria-describedby":D,autoComplete:r,autoFocus:o,defaultValue:l,fullWidth:p,multiline:k,name:S,rows:R,maxRows:w,minRows:x,type:M,value:I,id:B,inputRef:y,onBlur:E,onChange:C,onFocus:O,placeholder:_,inputProps:ee,slots:{input:L.htmlInput?Z:void 0},...X});return Fp.jsxs(q,{...G,children:[null!=b&&""!==b&&Fp.jsx(Q,{htmlFor:B,id:W,...J,children:b}),P?Fp.jsx(re,{"aria-describedby":D,id:B,labelId:W,value:I,input:ie,...oe,children:i}):ie,f&&Fp.jsx(te,{id:D,...ne,children:f})]})});var tk=Jm(Fp.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"})),nk=Jm(Fp.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2m-9 14-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}));const rk=l.createElement(tk,{fontSize:"small"}),ok=l.createElement(nk,{fontSize:"small"});function ik({items:e,selectedKeys:t,defaultSelectedKeys:n,onChange:r,inputValue:o,defaultInputValue:i,onInputChange:a,debounceMs:s=300,label:u,placeholder:c,loading:d,disabled:p,size:f="small",error:h,helperText:m,limitTags:g=3,disableClearable:v,id:y,textFieldProps:b}){const w=l.useMemo(()=>Array.isArray(e)?e:[],[e]),x=Array.isArray(t),[k,S]=l.useState(Array.isArray(n)?n:[]),E=x?t:k,C=l.useMemo(()=>{const e=new Map;for(const t of w)e.set(t&&t.key,t);return e},[w]),O=l.useMemo(()=>(Array.isArray(E)?E:[]).map(e=>C.get(e)).filter(Boolean),[E,C]),_="string"==typeof o,[T,R]=l.useState("string"==typeof i?i:""),P=_?o:T,A=function(e,t=300){const n=l.useRef(e),r=l.useRef(null);return n.current=e,l.useEffect(()=>()=>{r.current&&window.clearTimeout(r.current)},[]),l.useCallback((...e)=>{n.current&&(r.current&&window.clearTimeout(r.current),r.current=window.setTimeout(()=>{n.current&&n.current(...e)},t))},[t])}(e=>{a&&a(e)},s),L=O;return l.createElement(Ow,{fullWidth:!0,error:h,disabled:p},l.createElement(Nb,{openOnFocus:!0,forcePopupIcon:!0,id:y,multiple:!0,disableCloseOnSelect:!0,options:w,value:L,inputValue:P,getOptionLabel:e=>e&&"object"==typeof e?e.value??"":"",isOptionEqualToValue:(e,t)=>e&&t&&e.key===t.key,loading:d,limitTags:g,disableClearable:v,onChange:(e,t)=>{const n=Array.isArray(t)?t.map(e=>e&&e.key):[];x||S(n),r&&r(n,Array.isArray(t)?t:[])},onInputChange:(e,t,n)=>{_||R(t??""),"input"===n?A(t??""):"clear"===n&&A("")},renderOption:(e,t,{selected:n})=>l.createElement("li",Br({},e,{key:t&&t.key||Math.random().toString(36)}),l.createElement(tw,{icon:rk,checkedIcon:ok,style:{marginRight:8},checked:!!n}),t&&t.value),renderTags:(e,t)=>(Array.isArray(e)?e:[]).map((e,n)=>l.createElement(Hy,Br({},t({index:n}),{key:e&&e.key||n,label:e&&e.value||""}))),renderInput:e=>l.createElement(ek,Br({},e,{label:u,placeholder:c,InputProps:{...e.InputProps,endAdornment:l.createElement(l.Fragment,null,d?l.createElement(Yg,{size:18}):null,e.InputProps.endAdornment)},size:f},b))}),m?l.createElement(Aw,null,m):null)}const ak=({filter:e,channel:t,query:n})=>{const[r,o]=l.useState([]),[i,a]=l.useState([]),[s,c]=l.useState(!1),[d,p]=l.useState("");return l.useEffect(()=>{a(n?.filter?.[e?.filter]||[])},[n]),l.useEffect(()=>{(async()=>{c(!0);const t=await async function(e,t){return t?.source?(await Cu.runReport({id:t.source})).map(e=>({key:e[t.field],value:e[t.field]})):[]}(0,e);o(t),c(!1)})()},[d]),u.createElement("div",{style:{display:"flex"}},u.createElement("div",{style:{maxWidth:640,minWidth:200}},u.createElement(ik,{id:e?.title,label:e?.title,placeholder:"Type to search…",items:r,selectedKeys:i,onChange:(n,r)=>{a(n),t.emit("filterChanged",e,{[e.filter]:n})},onInputChange:e=>{p(e)},loading:s,debounceMs:300,helperText:i.length?`${i.length} selected`:""})))};function sk({items:e,value:t,label:n,onChange:r,sx:o={width:"100%"}}){const i=e.some(e=>e.key===t)?t:"";return u.createElement(Db,{sx:o},u.createElement(Ow,{fullWidth:!0},u.createElement(Hw,{id:"demo-simple-select-label"},n),u.createElement(Xx,{labelId:"demo-simple-select-label",id:"demo-simple-select",value:i,label:n,onChange:r,MenuProps:{style:{maxHeight:"300px"}},size:"small"},e.map(e=>{const{key:t,value:n,disabled:r}=e;return u.createElement(kx,{key:t,value:t,disabled:r},n)}))))}const lk=({filter:e,channel:t,query:n})=>{const[r,o]=l.useState([]),[i,a]=l.useState("");return l.useEffect(()=>{a(n?.date_range?.name)},[n]),l.useEffect(()=>{(async()=>{const t=(await Cu.getDateRanges()).filter(t=>!(e.allowedOptions.length>0)||e.allowedOptions.some(e=>e===t.name)).map(e=>({key:e.name,value:e.title}));o(t)})()},[]),u.createElement("div",{style:{minWidth:"200px",maxWidth:"640px"}},u.createElement(sk,{items:r,value:i,label:e?.title,onChange:(n,r)=>{const o=n.target.value;a(o),t.emit("filterChanged",e,{date_range:{name:o}})}}))},uk=({filters:e=[],channel:t,query:n})=>u.createElement("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px"}},e.map(e=>"multi-select"===e.type?u.createElement(ak,{key:e.title,channel:t,filter:e,query:n}):"date-range"===e.type?u.createElement(lk,{key:e.title,channel:t,filter:e,query:n}):null));var ck,dk={exports:{}};var pk=(ck||(ck=1,function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new o(r,i||e,a),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function a(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,o=[];if(0===this._eventsCount)return o;for(r in e=this._events)t.call(e,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,i=r.length,a=new Array(i);o<i;o++)a[o]=r[o].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,o,i,a){var s=n?n+e:e;if(!this._events[s])return!1;var l,u,c=this._events[s],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,r),!0;case 4:return c.fn.call(c.context,t,r,o),!0;case 5:return c.fn.call(c.context,t,r,o,i),!0;case 6:return c.fn.call(c.context,t,r,o,i,a),!0}for(u=1,l=new Array(d-1);u<d;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var p,f=c.length;for(u=0;u<f;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),d){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,r);break;case 4:c[u].fn.call(c[u].context,t,r,o);break;default:if(!l)for(p=1,l=new Array(d-1);p<d;p++)l[p-1]=arguments[p];c[u].fn.apply(c[u].context,l)}}return!0},s.prototype.on=function(e,t,n){return i(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return i(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,o){var i=n?n+e:e;if(!this._events[i])return this;if(!t)return a(this,i),this;var s=this._events[i];if(s.fn)s.fn!==t||o&&!s.once||r&&s.context!==r||a(this,i);else{for(var l=0,u=[],c=s.length;l<c;l++)(s[l].fn!==t||o&&!s[l].once||r&&s[l].context!==r)&&u.push(s[l]);u.length?this._events[i]=1===u.length?u[0]:u:a(this,i)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}(dk)),dk.exports),fk=t(pk),hk=e=>u.useRef(e||new fk).current,mk=e=>{const t=u.useState({}),n=u.useCallback((n,r)=>{let o={...t.current,...r};for(var i in t.current=o,o)"date_range"===i||o[i].length||delete o[i];e?.emit("mergedFilterChanged",{value:o})},[e]);u.useEffect(()=>(e?.on("filterChanged",n),()=>{e?.off("filterChanged",n)}),[e])},gk=({id:e,cache:t,dashboard:n,channel:r,...o})=>{const[i,a]=u.useState(),[s,c]=u.useState(),[d,p]=u.useState(),[f,h]=u.useState(),[m,g]=u.useState(rc()),[v,y]=u.useState(),[b,w]=u.useState(0),[x,k]=u.useState(!1),[S,E]=u.useState(),[C,O]=u.useState(!1),_=u.useRef({value:o?.filter}),[T,R]=u.useState({}),{ref:P,inView:A}=function({threshold:e,delay:t,trackVisibility:n,rootMargin:r,root:o,triggerOnce:i,skip:a,initialInView:s,fallbackInView:u,onChange:c}={}){var d;const[p,f]=l.useState(null),h=l.useRef(c),m=l.useRef(s),[g,v]=l.useState({inView:!!s,entry:void 0});h.current=c,l.useEffect(()=>{if(void 0===m.current&&(m.current=s),a||!p)return;let l;return l=lc(p,(e,t)=>{const n=m.current;m.current=e,(void 0!==n||e)&&(v({inView:e,entry:t}),h.current&&h.current(e,t),t.isIntersecting&&i&&l&&(l(),l=void 0))},{root:o,rootMargin:r,threshold:e,trackVisibility:n,delay:t},u),()=>{l&&l()}},[Array.isArray(e)?e.toString():e,p,o,r,i,a,n,u,t]);const y=null==(d=g.entry)?void 0:d.target,b=l.useRef(void 0);p||!y||i||a||b.current===y||(b.current=y,v({inView:!!s,entry:void 0}),m.current=s);const w=[f,g.inView,g.entry];return w.ref=w[0],w.inView=w[1],w.entry=w[2],w}({threshold:.1,delay:1e3}),L=hk(r);mk(L);const N=u.useCallback(e=>{const t=e.target.value;w(t),y(i.doc.view[t])},[i]);u.useEffect(()=>{e&&(async()=>{const n=e,r=t?.[n]||await Cu.getChart({id:n}),i=r.doc.source?.id,s=i?t?.[i]||await Cu.getReport({id:i}):void 0,l=t?.[`schema_${i}`]||o?.schema||await Cu.getReportSchema({id:i}),u=r.doc?.view?.[0];w(0),c(s),a(r),y(u),p(l),O(!0)})().catch(e=>{console.error(e.message)})},[e]),u.useEffect(()=>{i&&f&&(!i?.doc?.source?.id||s)&&d&&(async()=>{g(rc(i.doc.chart?.component,{view:v,source:f,chart:i,report:s,schema:d,dashboard:n,query:T}))})().catch(e=>{console.error(e.message)})},[i,f,v,s,d]);const M=e=>{const t={...s?.doc.query.filter||{},...o?.filter,...e?.value},n=t.date_range||s?.doc.query.date_range;if(delete t.date_range,O(!1),E(),k(!0),"context"===i?.doc?.source?.type)return h({filter:t}),void k(!1);const r={filter:t,date_range:n,parameters:o?.params};R(r),Cu.runReport({id:s.id,query:r}).then(e=>{h(i.doc.source.reverse?e.reverse():e)}).catch(e=>{h([])}).finally(()=>{k(!1)})},I=e=>{_.current=e,A?M(e):(E(e),O(!0))};return u.useEffect(()=>(L?.on("mergedFilterChanged",I),()=>{L?.off("mergedFilterChanged",I)}),[L,s,i,A]),u.useEffect(()=>{A&&C&&M(S)},[A,C]),u.useEffect(()=>{O(!0)},[o.params]),u.createElement(zr,{ref:P,elevation:0,style:{borderRadius:12,padding:20,border:"1px solid #e5e5e5",background:"#fff",display:"flex",flexDirection:"column",gap:"12px",height:"100%"}},i&&u.createElement("div",{style:{display:"flex",alignItems:"center",lineHeight:0}},u.createElement(qo,{variant:"subtitle2",style:{fontWeight:600,color:"#252525"}},o?.title||i.doc.name," ")),x?u.createElement(Ra,{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",width:"100%"}}):u.createElement(u.Fragment,null,u.createElement("div",{style:{display:"flex"}},u.createElement("div",{style:{flexGrow:1}}),u.createElement("div",null,i?.doc?.view?.length>1&&u.createElement(Ti,null,u.createElement(_a,{labelId:"date-range-select-label",id:"date-range-select",value:b,onChange:N,style:{fontSize:"12px"},disableUnderline:!0},i.doc.view.map((e,t)=>u.createElement(ca,{key:t,value:t},e.title)))))),u.createElement("div",{style:{position:"relative",flexGrow:n?void 0:1,display:"flex",flexDirection:"column"}},u.createElement(uk,{filters:i?.doc?.filters,channel:L,query:T}),m)))};var vk={Chart:gk,Dashboard:function({id:e="sample_dashboard",api:t,params:n}){const[r,o]=u.useState(),[i]=u.useState(),[a,s]=u.useState([]),c=u.useRef({}),d=hk();mk(d),console.log({rows:a},{dashboard:r},{schema:i},{params:n}),l.useEffect(()=>{Cu.setBaseUrl(t.base_url),Cu.setToken(t.token)},[t]);const p=async e=>{const t=e?.doc?.rows||[],n=[];for(let e=0;e<t.length;e++){const r=t[e];r.columns?.forEach(e=>{if(e.override?.filter?.length){const t={};e.override.filter.forEach(e=>{e.hasOwnProperty("value")&&(t[e.field]=[e.value])}),e.filter=t}}),n.push(r)}s(n)};return u.useEffect(()=>{e&&(async()=>{Cu.setBaseUrl(t.base_url),Cu.setToken(t.token),await Cu.loadDashboardMeta({dashboardId:e});const n=await Cu.getDashboard({id:e});c.current[n?.id]=n,o(n),await p(n)})().catch(e=>console.error(e.message))},[e]),u.createElement(ei,{maxWidth:!1,disableGutters:!0},u.createElement(Ni,{container:!0,spacing:3},a?.map((e,o)=>{const a=(e=>0===e?12:12/e)(e.columns.length);return u.createElement(u.Fragment,{key:o},1===o?u.createElement(Ni,{item:!0,xs:12},u.createElement(Ni,{container:!0,spacing:3},e.columns.map((e,o)=>u.createElement(Ni,{key:o,item:!0,xs:12,md:a},u.createElement(gk,{api:t,cache:c.current,id:e.id,dashboard:r,schema:i,title:e.title,filter:e.filter,params:n}))))):e.columns.map((e,o)=>u.createElement(Ni,{key:o,item:!0,xs:12,md:a},u.createElement(gk,{api:t,cache:c.current,id:e.id,dashboard:r,schema:i,title:e.title,filter:e.filter,params:n}))))})))}};return vk}();
|
|
131
|
+
`:null,Kg=Wm("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${sf(n.color)}`]]}})(qm(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:Ug||{animation:`${Dg} 1.4s linear infinite`}},...Object.entries(e.palette).filter(jg()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),Hg=Wm("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),qg=Wm("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${sf(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(qm(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink,style:Vg||{animation:`${Wg} 1.4s ease-in-out infinite`}}]}))),Gg=Wm("circle",{name:"MuiCircularProgress",slot:"Track"})(qm(({theme:e})=>({stroke:"currentColor",opacity:(e.vars||e).palette.action.activatedOpacity}))),Yg=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiCircularProgress"}),{className:r,color:o="primary",disableShrink:i=!1,enableTrackSlot:a=!1,size:s=40,style:l,thickness:u=3.6,value:c=0,variant:d="indeterminate",...p}=n,f={...n,color:o,disableShrink:i,size:s,thickness:u,value:c,variant:d,enableTrackSlot:a},h=(e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e;return Jh({root:["root",n,`color${sf(r)}`],svg:["svg"],track:["track"],circle:["circle",`circle${sf(n)}`,o&&"circleDisableShrink"]},zg,t)})(f),m={},g={},v={};if("determinate"===d){const e=2*Math.PI*((Bg-u)/2);m.strokeDasharray=e.toFixed(3),v["aria-valuenow"]=Math.round(c),m.strokeDashoffset=`${((100-c)/100*e).toFixed(3)}px`,g.transform="rotate(-90deg)"}return Fp.jsx(Kg,{className:Km(h.root,r),style:{width:s,height:s,...g,...l},ownerState:f,ref:t,role:"progressbar",...v,...p,children:Fp.jsxs(Hg,{className:h.svg,ownerState:f,viewBox:"22 22 44 44",children:[a?Fp.jsx(Gg,{className:h.track,ownerState:f,cx:Bg,cy:Bg,r:(Bg-u)/2,fill:"none",strokeWidth:u,"aria-hidden":"true"}):null,Fp.jsx(qg,{className:h.circle,style:m,ownerState:f,cx:Bg,cy:Bg,r:(Bg-u)/2,fill:"none",strokeWidth:u})]})})});function Xg(e){return fh("MuiIconButton",e)}const Qg=hh("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),Jg=Wm(Fg,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,"default"!==n.color&&t[`color${sf(n.color)}`],n.edge&&t[`edge${sf(n.edge)}`],t[`size${sf(n.size)}`]]}})(qm(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),qm(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(jg()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(jg()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${Qg.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${Qg.loading}`]:{color:"transparent"}}))),Zg=Wm("span",{name:"MuiIconButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),ev=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiIconButton"}),{edge:r=!1,children:o,className:i,color:a="default",disabled:s=!1,disableFocusRipple:l=!1,size:u="medium",id:c,loading:d=null,loadingIndicator:p,...f}=n,h=qh(c),m=p??Fp.jsx(Yg,{"aria-labelledby":h,color:"inherit",size:16}),g={...n,edge:r,color:a,disabled:s,disableFocusRipple:l,loading:d,loadingIndicator:m,size:u},v=(e=>{const{classes:t,disabled:n,color:r,edge:o,size:i,loading:a}=e;return Jh({root:["root",a&&"loading",n&&"disabled","default"!==r&&`color${sf(r)}`,o&&`edge${sf(o)}`,`size${sf(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},Xg,t)})(g);return Fp.jsxs(Jg,{id:d?h:c,className:Km(v.root,i),centerRipple:!0,focusRipple:!l,disabled:s||d,ref:t,...f,ownerState:g,children:["boolean"==typeof d&&Fp.jsx("span",{className:v.loadingWrapper,style:{display:"contents"},children:Fp.jsx(Zg,{className:v.loadingIndicator,ownerState:g,children:d&&m})}),o]})});var tv=Jm(Fp.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}));function nv({array1:e,array2:t,parser:n=e=>e}){return e&&t&&e.length===t.length&&e.every((e,r)=>n(e)===n(t[r]))}function rv(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}const ov=function(e={}){const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:o="any",stringify:i,trim:a=!1}=e;return(e,{inputValue:s,getOptionLabel:l})=>{let u=a?s.trim():s;n&&(u=u.toLowerCase()),t&&(u=rv(u));const c=u?e.filter(e=>{let r=(i||l)(e);return n&&(r=r.toLowerCase()),t&&(r=rv(r)),"start"===o?r.startsWith(u):r.includes(u)}):e;return"number"==typeof r?c.slice(0,r):c}}(),iv=e=>null!==e.current&&e.current.parentElement?.contains(document.activeElement),av=[];function sv(e,t,n,r){if(t||null==e||r)return"";const o=n(e);return"string"==typeof o?o:""}function lv(e){const{unstable_isActiveElementInListbox:t=iv,unstable_classNamePrefix:n="Mui",autoComplete:r=!1,autoHighlight:o=!1,autoSelect:i=!1,blurOnSelect:a=!1,clearOnBlur:s=!e.freeSolo,clearOnEscape:u=!1,componentName:c="useAutocomplete",defaultValue:d=(e.multiple?av:null),disableClearable:p=!1,disableCloseOnSelect:f=!1,disabled:h,disabledItemsFocusable:m=!1,disableListWrap:g=!1,filterOptions:v=ov,filterSelectedOptions:y=!1,freeSolo:b=!1,getOptionDisabled:w,getOptionKey:x,getOptionLabel:k=e=>e.label??e,groupBy:S,handleHomeEndKeys:E=!e.freeSolo,id:C,includeInputInList:O=!1,inputValue:_,isOptionEqualToValue:T=(e,t)=>e===t,multiple:R=!1,onChange:P,onClose:A,onHighlightChange:L,onInputChange:N,onOpen:M,open:I,openOnFocus:F=!1,options:$,readOnly:j=!1,renderValue:z,selectOnFocus:B=!e.freeSolo,value:D}=e,W=qh(C);let U=k;U=e=>{const t=k(e);return"string"!=typeof t?String(t):t};const V=l.useRef(!1),K=l.useRef(!0),H=l.useRef(null),q=l.useRef(null),[G,Y]=l.useState(null),[X,Q]=l.useState(-1),J=o?0:-1,Z=l.useRef(J),ee=l.useRef(sv(d??D,R,U)).current,[te,ne]=rg({controlled:D,default:d,name:c}),[re,oe]=rg({controlled:_,default:ee,name:c,state:"inputValue"}),[ie,ae]=l.useState(!1),se=l.useCallback((e,t,n)=>{if(!(R?te.length<t.length:null!==t)&&!s)return;const r=sv(t,R,U,z);re!==r&&(oe(r),N&&N(e,r,n))},[U,re,R,N,oe,s,te,z]),[le,ue]=rg({controlled:I,default:!1,name:c,state:"open"}),[ce,de]=l.useState(!0),pe=!R&&null!=te&&re===U(te),fe=le&&!j,he=fe?v($.filter(e=>!y||!(R?te:[te]).some(t=>null!==t&&T(e,t))),{inputValue:pe&&ce?"":re,getOptionLabel:U}):[],me=function(e){const t=l.useRef({});return l.useEffect(()=>{t.current=e}),t.current}({filteredOptions:he,value:te,inputValue:re});l.useEffect(()=>{const e=te!==me.value;ie&&!e||b&&!e||se(null,te,"reset")},[te,se,ie,me.value,b]);const ge=le&&he.length>0&&!j,ve=og(e=>{if(-1===e)H.current.focus();else{const t=z?"data-item-index":"data-tag-index";G.querySelector(`[${t}="${e}"]`).focus()}});l.useEffect(()=>{R&&X>te.length-1&&(Q(-1),ve(-1))},[te,R,X,ve]);const ye=og(({event:e,index:t,reason:r})=>{if(Z.current=t,-1===t?H.current.removeAttribute("aria-activedescendant"):H.current.setAttribute("aria-activedescendant",`${W}-option-${t}`),L&&["mouse","keyboard","touch"].includes(r)&&L(e,-1===t?null:he[t],r),!q.current)return;const o=q.current.querySelector(`[role="option"].${n}-focused`);o&&(o.classList.remove(`${n}-focused`),o.classList.remove(`${n}-focusVisible`));let i=q.current;if("listbox"!==q.current.getAttribute("role")&&(i=q.current.parentElement.querySelector('[role="listbox"]')),!i)return;if(-1===t)return void(i.scrollTop=0);const a=q.current.querySelector(`[data-option-index="${t}"]`);if(a&&(a.classList.add(`${n}-focused`),"keyboard"===r&&a.classList.add(`${n}-focusVisible`),i.scrollHeight>i.clientHeight&&"mouse"!==r&&"touch"!==r)){const e=a,t=i.clientHeight+i.scrollTop,n=e.offsetTop+e.offsetHeight;n>t?i.scrollTop=n-i.clientHeight:e.offsetTop-e.offsetHeight*(S?1.3:0)<i.scrollTop&&(i.scrollTop=e.offsetTop-e.offsetHeight*(S?1.3:0))}}),be=og(({event:e,diff:t,direction:n="next",reason:o})=>{if(!fe)return;const i=function(e,t){if(!q.current||e<0||e>=he.length)return-1;let n=e;for(;;){const r=q.current.querySelector(`[data-option-index="${n}"]`),o=!m&&(!r||r.disabled||"true"===r.getAttribute("aria-disabled"));if(r&&r.hasAttribute("tabindex")&&!o)return n;if(n="next"===t?(n+1)%he.length:(n-1+he.length)%he.length,n===e)return-1}}((()=>{const e=he.length-1;if("reset"===t)return J;if("start"===t)return 0;if("end"===t)return e;const n=Z.current+t;return n<0?-1===n&&O?-1:g&&-1!==Z.current||Math.abs(t)>1?0:e:n>e?n===e+1&&O?-1:g||Math.abs(t)>1?e:0:n})(),n);if(ye({index:i,reason:o,event:e}),r&&"reset"!==t)if(-1===i)H.current.value=re;else{const e=U(he[i]);H.current.value=e;0===e.toLowerCase().indexOf(re.toLowerCase())&&re.length>0&&H.current.setSelectionRange(re.length,e.length)}}),we=!nv({array1:me.filteredOptions,array2:he,parser:U}),xe=l.useCallback(()=>{if(!fe)return;const e=(()=>{if(-1!==Z.current&&!nv({array1:me.filteredOptions,array2:he,parser:U})&&me.inputValue===re&&(R?te.length===me.value.length&&me.value.every((e,t)=>U(te[t])===U(e)):(e=me.value,t=te,(e?U(e):"")===(t?U(t):"")))){const e=me.filteredOptions[Z.current];if(e)return he.findIndex(t=>U(t)===U(e))}var e,t;return-1})();if(-1!==e)return void(Z.current=e);const t=R?te[0]:te;if(0!==he.length&&null!=t){if(q.current){if(null!=t){const e=he[Z.current];if(R&&e&&-1!==te.findIndex(t=>T(e,t)))return;const n=he.findIndex(e=>T(e,t));return void(-1===n?be({diff:"reset"}):ye({index:n}))}Z.current>=he.length-1?ye({index:he.length-1}):ye({index:Z.current})}}else be({diff:"reset"})},[he.length,!R&&te,be,ye,fe,re,R]),ke=og(e=>{ng(q,e),e&&xe()});l.useEffect(()=>{(we||fe)&&xe()},[xe,we,fe]);const Se=e=>{le||(ue(!0),de(!0),M&&M(e))},Ee=(e,t)=>{le&&(ue(!1),A&&A(e,t))},Ce=(e,t,n,r)=>{if(R){if(te.length===t.length&&te.every((e,n)=>e===t[n]))return}else if(te===t)return;P&&P(e,t,n,r),ne(t)},Oe=l.useRef(!1),_e=(e,t,n="selectOption",r="options")=>{let o=n,i=t;if(R){i=Array.isArray(te)?te.slice():[];const e=i.findIndex(e=>T(t,e));-1===e?i.push(t):"freeSolo"!==r&&(i.splice(e,1),o="removeOption")}se(e,i,o),Ce(e,i,o,{option:t}),f||e&&(e.ctrlKey||e.metaKey)||Ee(e,o),(!0===a||"touch"===a&&Oe.current||"mouse"===a&&!Oe.current)&&H.current.blur()};const Te=(e,t)=>{if(!R)return;""===re&&Ee(e,"toggleInput");let n=X;-1===X?""===re&&"previous"===t&&(n=te.length-1):(n+="next"===t?1:-1,n<0&&(n=0),n===te.length&&(n=-1)),n=function(e,t){if(-1===e)return-1;let n=e;for(;;){if("next"===t&&n===te.length||"previous"===t&&-1===n)return-1;const e=z?"data-item-index":"data-tag-index",r=G.querySelector(`[${e}="${n}"]`);if(r&&r.hasAttribute("tabindex")&&!r.disabled&&"true"!==r.getAttribute("aria-disabled"))return n;n+="next"===t?1:-1}}(n,t),Q(n),ve(n)},Re=e=>{V.current=!0,oe(""),N&&N(e,"","clear"),Ce(e,R?[]:null,"clear")},Pe=e=>t=>{if(e.onKeyDown&&e.onKeyDown(t),!t.defaultMuiPrevented&&(-1===X||["ArrowLeft","ArrowRight"].includes(t.key)||(Q(-1),ve(-1)),229!==t.which))switch(t.key){case"Home":fe&&E&&(t.preventDefault(),be({diff:"start",direction:"next",reason:"keyboard",event:t}));break;case"End":fe&&E&&(t.preventDefault(),be({diff:"end",direction:"previous",reason:"keyboard",event:t}));break;case"PageUp":t.preventDefault(),be({diff:-5,direction:"previous",reason:"keyboard",event:t}),Se(t);break;case"PageDown":t.preventDefault(),be({diff:5,direction:"next",reason:"keyboard",event:t}),Se(t);break;case"ArrowDown":t.preventDefault(),be({diff:1,direction:"next",reason:"keyboard",event:t}),Se(t);break;case"ArrowUp":t.preventDefault(),be({diff:-1,direction:"previous",reason:"keyboard",event:t}),Se(t);break;case"ArrowLeft":!R&&z&&null!=te?(Q(0),ve(0)):Te(t,"previous");break;case"ArrowRight":!R&&z?(Q(-1),ve(-1)):Te(t,"next");break;case"Enter":if(-1!==Z.current&&fe){const e=he[Z.current],n=!!w&&w(e);if(t.preventDefault(),n)return;_e(t,e,"selectOption"),r&&H.current.setSelectionRange(H.current.value.length,H.current.value.length)}else b&&""!==re&&!1===pe&&(R&&t.preventDefault(),_e(t,re,"createOption","freeSolo"));break;case"Escape":fe?(t.preventDefault(),t.stopPropagation(),Ee(t,"escape")):u&&(""!==re||R&&te.length>0||z)&&(t.preventDefault(),t.stopPropagation(),Re(t));break;case"Backspace":if(R&&!j&&""===re&&te.length>0){const e=-1===X?te.length-1:X,n=te.slice();n.splice(e,1),Ce(t,n,"removeOption",{option:te[e]})}R||!z||j||(ne(null),Q(-1),ve(-1));break;case"Delete":if(R&&!j&&""===re&&te.length>0&&-1!==X){const e=X,n=te.slice();n.splice(e,1),Ce(t,n,"removeOption",{option:te[e]})}R||!z||j||(ne(null),Q(-1),ve(-1))}},Ae=e=>{ae(!0),-1!==X&&(Q(-1),ve(-1)),F&&!V.current&&Se(e)},Le=e=>{t(q)?H.current.focus():(ae(!1),K.current=!0,V.current=!1,i&&-1!==Z.current&&fe?_e(e,he[Z.current],"blur"):i&&b&&""!==re?_e(e,re,"blur","freeSolo"):s&&se(e,te,"blur"),Ee(e,"blur"))},Ne=e=>{const t=e.target.value;re!==t&&(oe(t),de(!1),N&&N(e,t,"input")),""===t?p||R||Ce(e,null,"clear"):Se(e)},Me=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));Z.current!==t&&ye({event:e,index:t,reason:"mouse"})},Ie=e=>{ye({event:e,index:Number(e.currentTarget.getAttribute("data-option-index")),reason:"touch"}),Oe.current=!0},Fe=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));_e(e,he[t],"selectOption"),Oe.current=!1},$e=e=>t=>{const n=te.slice();n.splice(e,1),Ce(t,n,"removeOption",{option:te[e]})},je=e=>{Ce(e,null,"removeOption",{option:te})},ze=e=>{le?Ee(e,"toggleInput"):Se(e)},Be=e=>{e.currentTarget.contains(e.target)&&e.target.getAttribute("id")!==W&&e.preventDefault()},De=e=>{e.currentTarget.contains(e.target)&&(H.current.focus(),B&&K.current&&H.current.selectionEnd-H.current.selectionStart===0&&H.current.select(),K.current=!1)},We=e=>{h||""!==re&&le||ze(e)};let Ue=b&&re.length>0;Ue=Ue||(R?te.length>0:null!==te);let Ve=he;return S&&(Ve=he.reduce((e,t,n)=>{const r=S(t);return e.length>0&&e[e.length-1].group===r?e[e.length-1].options.push(t):e.push({key:n,index:n,group:r,options:[t]}),e},[])),h&&ie&&Le(),{getRootProps:(e={})=>({...e,onKeyDown:Pe(e),onMouseDown:Be,onClick:De}),getInputLabelProps:()=>({id:`${W}-label`,htmlFor:W}),getInputProps:()=>({id:W,value:re,onBlur:Le,onFocus:Ae,onChange:Ne,onMouseDown:We,"aria-activedescendant":fe?"":null,"aria-autocomplete":r?"both":"list","aria-controls":ge?`${W}-listbox`:void 0,"aria-expanded":ge,autoComplete:"off",ref:H,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:h}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:Re}),getItemProps:({index:e=0}={})=>({...R&&{key:e},...z?{"data-item-index":e}:{"data-tag-index":e},tabIndex:-1,...!j&&{onDelete:R?$e(e):je}}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:ze}),getTagProps:({index:e})=>({key:e,"data-tag-index":e,tabIndex:-1,...!j&&{onDelete:$e(e)}}),getListboxProps:()=>({role:"listbox",id:`${W}-listbox`,"aria-labelledby":`${W}-label`,ref:ke,onMouseDown:e=>{e.preventDefault()}}),getOptionProps:({index:e,option:t})=>{const n=(R?te:[te]).some(e=>null!=e&&T(t,e)),r=!!w&&w(t);return{key:x?.(t)??U(t),tabIndex:-1,role:"option",id:`${W}-option-${e}`,onMouseMove:Me,onClick:Fe,onTouchStart:Ie,"data-option-index":e,"aria-disabled":r,"aria-selected":n}},id:W,inputValue:re,value:te,dirty:Ue,expanded:fe&&G,popupOpen:fe,focused:ie||-1!==X,anchorEl:G,setAnchorEl:Y,focusedItem:X,focusedTag:X,groupedOptions:Ve}}var uv="top",cv="bottom",dv="right",pv="left",fv="auto",hv=[uv,cv,dv,pv],mv="start",gv="end",vv="viewport",yv="popper",bv=hv.reduce(function(e,t){return e.concat([t+"-"+mv,t+"-"+gv])},[]),wv=[].concat(hv,[fv]).reduce(function(e,t){return e.concat([t,t+"-"+mv,t+"-"+gv])},[]),xv=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function kv(e){return e?(e.nodeName||"").toLowerCase():null}function Sv(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ev(e){return e instanceof Sv(e).Element||e instanceof Element}function Cv(e){return e instanceof Sv(e).HTMLElement||e instanceof HTMLElement}function Ov(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Sv(e).ShadowRoot||e instanceof ShadowRoot)}var _v={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];Cv(o)&&kv(o)&&(Object.assign(o.style,n),Object.keys(r).forEach(function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});Cv(r)&&kv(r)&&(Object.assign(r.style,i),Object.keys(o).forEach(function(e){r.removeAttribute(e)}))})}},requires:["computeStyles"]};function Tv(e){return e.split("-")[0]}var Rv=Math.max,Pv=Math.min,Av=Math.round;function Lv(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Nv(){return!/^((?!chrome|android).)*safari/i.test(Lv())}function Mv(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&Cv(e)&&(o=e.offsetWidth>0&&Av(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Av(r.height)/e.offsetHeight||1);var a=(Ev(e)?Sv(e):window).visualViewport,s=!Nv()&&n,l=(r.left+(s&&a?a.offsetLeft:0))/o,u=(r.top+(s&&a?a.offsetTop:0))/i,c=r.width/o,d=r.height/i;return{width:c,height:d,top:u,right:l+c,bottom:u+d,left:l,x:l,y:u}}function Iv(e){var t=Mv(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Fv(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Ov(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function $v(e){return Sv(e).getComputedStyle(e)}function jv(e){return["table","td","th"].indexOf(kv(e))>=0}function zv(e){return((Ev(e)?e.ownerDocument:e.document)||window.document).documentElement}function Bv(e){return"html"===kv(e)?e:e.assignedSlot||e.parentNode||(Ov(e)?e.host:null)||zv(e)}function Dv(e){return Cv(e)&&"fixed"!==$v(e).position?e.offsetParent:null}function Wv(e){for(var t=Sv(e),n=Dv(e);n&&jv(n)&&"static"===$v(n).position;)n=Dv(n);return n&&("html"===kv(n)||"body"===kv(n)&&"static"===$v(n).position)?t:n||function(e){var t=/firefox/i.test(Lv());if(/Trident/i.test(Lv())&&Cv(e)&&"fixed"===$v(e).position)return null;var n=Bv(e);for(Ov(n)&&(n=n.host);Cv(n)&&["html","body"].indexOf(kv(n))<0;){var r=$v(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function Uv(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Vv(e,t,n){return Rv(e,Pv(t,n))}function Kv(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Hv(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var qv={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Tv(n.placement),l=Uv(s),u=[pv,dv].indexOf(s)>=0?"height":"width";if(i&&a){var c=function(e,t){return Kv("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Hv(e,hv))}(o.padding,n),d=Iv(i),p="y"===l?uv:pv,f="y"===l?cv:dv,h=n.rects.reference[u]+n.rects.reference[l]-a[l]-n.rects.popper[u],m=a[l]-n.rects.reference[l],g=Wv(i),v=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,y=h/2-m/2,b=c[p],w=v-d[u]-c[f],x=v/2-d[u]/2+y,k=Vv(b,x,w),S=l;n.modifiersData[r]=((t={})[S]=k,t.centerOffset=k-x,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&Fv(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Gv(e){return e.split("-")[1]}var Yv={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Xv(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,d=e.isFixed,p=a.x,f=void 0===p?0:p,h=a.y,m=void 0===h?0:h,g="function"==typeof c?c({x:f,y:m}):{x:f,y:m};f=g.x,m=g.y;var v=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),b=pv,w=uv,x=window;if(u){var k=Wv(n),S="clientHeight",E="clientWidth";if(k===Sv(n)&&"static"!==$v(k=zv(n)).position&&"absolute"===s&&(S="scrollHeight",E="scrollWidth"),o===uv||(o===pv||o===dv)&&i===gv)w=cv,m-=(d&&k===x&&x.visualViewport?x.visualViewport.height:k[S])-r.height,m*=l?1:-1;if(o===pv||(o===uv||o===cv)&&i===gv)b=dv,f-=(d&&k===x&&x.visualViewport?x.visualViewport.width:k[E])-r.width,f*=l?1:-1}var C,O=Object.assign({position:s},u&&Yv),_=!0===c?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:Av(n*o)/o||0,y:Av(r*o)/o||0}}({x:f,y:m},Sv(n)):{x:f,y:m};return f=_.x,m=_.y,l?Object.assign({},O,((C={})[w]=y?"0":"",C[b]=v?"0":"",C.transform=(x.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",C)):Object.assign({},O,((t={})[w]=y?m+"px":"",t[b]=v?f+"px":"",t.transform="",t))}var Qv={passive:!0};var Jv={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,s=void 0===a||a,l=Sv(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(e){e.addEventListener("scroll",n.update,Qv)}),s&&l.addEventListener("resize",n.update,Qv),function(){i&&u.forEach(function(e){e.removeEventListener("scroll",n.update,Qv)}),s&&l.removeEventListener("resize",n.update,Qv)}},data:{}},Zv={left:"right",right:"left",bottom:"top",top:"bottom"};function ey(e){return e.replace(/left|right|bottom|top/g,function(e){return Zv[e]})}var ty={start:"end",end:"start"};function ny(e){return e.replace(/start|end/g,function(e){return ty[e]})}function ry(e){var t=Sv(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function oy(e){return Mv(zv(e)).left+ry(e).scrollLeft}function iy(e){var t=$v(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function ay(e){return["html","body","#document"].indexOf(kv(e))>=0?e.ownerDocument.body:Cv(e)&&iy(e)?e:ay(Bv(e))}function sy(e,t){var n;void 0===t&&(t=[]);var r=ay(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=Sv(r),a=o?[i].concat(i.visualViewport||[],iy(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(sy(Bv(a)))}function ly(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function uy(e,t,n){return t===vv?ly(function(e,t){var n=Sv(e),r=zv(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var u=Nv();(u||!u&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+oy(e),y:l}}(e,n)):Ev(t)?function(e,t){var n=Mv(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):ly(function(e){var t,n=zv(e),r=ry(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=Rv(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Rv(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+oy(e),l=-r.scrollTop;return"rtl"===$v(o||n).direction&&(s+=Rv(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(zv(e)))}function cy(e,t,n,r){var o="clippingParents"===t?function(e){var t=sy(Bv(e)),n=["absolute","fixed"].indexOf($v(e).position)>=0&&Cv(e)?Wv(e):e;return Ev(n)?t.filter(function(e){return Ev(e)&&Fv(e,n)&&"body"!==kv(e)}):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce(function(t,n){var o=uy(e,n,r);return t.top=Rv(o.top,t.top),t.right=Pv(o.right,t.right),t.bottom=Pv(o.bottom,t.bottom),t.left=Rv(o.left,t.left),t},uy(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function dy(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?Tv(o):null,a=o?Gv(o):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case uv:t={x:s,y:n.y-r.height};break;case cv:t={x:s,y:n.y+n.height};break;case dv:t={x:n.x+n.width,y:l};break;case pv:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var u=i?Uv(i):null;if(null!=u){var c="y"===u?"height":"width";switch(a){case mv:t[u]=t[u]-(n[c]/2-r[c]/2);break;case gv:t[u]=t[u]+(n[c]/2-r[c]/2)}}return t}function py(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,l=void 0===s?"clippingParents":s,u=n.rootBoundary,c=void 0===u?vv:u,d=n.elementContext,p=void 0===d?yv:d,f=n.altBoundary,h=void 0!==f&&f,m=n.padding,g=void 0===m?0:m,v=Kv("number"!=typeof g?g:Hv(g,hv)),y=p===yv?"reference":yv,b=e.rects.popper,w=e.elements[h?y:p],x=cy(Ev(w)?w:w.contextElement||zv(e.elements.popper),l,c,a),k=Mv(e.elements.reference),S=dy({reference:k,element:b,placement:o}),E=ly(Object.assign({},b,S)),C=p===yv?E:k,O={top:x.top-C.top+v.top,bottom:C.bottom-x.bottom+v.bottom,left:x.left-C.left+v.left,right:C.right-x.right+v.right},_=e.modifiersData.offset;if(p===yv&&_){var T=_[o];Object.keys(O).forEach(function(e){var t=[dv,cv].indexOf(e)>=0?1:-1,n=[uv,cv].indexOf(e)>=0?"y":"x";O[e]+=T[n]*t})}return O}function fy(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=void 0===l?wv:l,c=Gv(r),d=c?s?bv:bv.filter(function(e){return Gv(e)===c}):hv,p=d.filter(function(e){return u.indexOf(e)>=0});0===p.length&&(p=d);var f=p.reduce(function(t,n){return t[n]=py(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[Tv(n)],t},{});return Object.keys(f).sort(function(e,t){return f[e]-f[t]})}var hy={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,p=n.altBoundary,f=n.flipVariations,h=void 0===f||f,m=n.allowedAutoPlacements,g=t.options.placement,v=Tv(g),y=l||(v===g||!h?[ey(g)]:function(e){if(Tv(e)===fv)return[];var t=ey(e);return[ny(e),t,ny(t)]}(g)),b=[g].concat(y).reduce(function(e,n){return e.concat(Tv(n)===fv?fy(t,{placement:n,boundary:c,rootBoundary:d,padding:u,flipVariations:h,allowedAutoPlacements:m}):n)},[]),w=t.rects.reference,x=t.rects.popper,k=new Map,S=!0,E=b[0],C=0;C<b.length;C++){var O=b[C],_=Tv(O),T=Gv(O)===mv,R=[uv,cv].indexOf(_)>=0,P=R?"width":"height",A=py(t,{placement:O,boundary:c,rootBoundary:d,altBoundary:p,padding:u}),L=R?T?dv:pv:T?cv:uv;w[P]>x[P]&&(L=ey(L));var N=ey(L),M=[];if(i&&M.push(A[_]<=0),s&&M.push(A[L]<=0,A[N]<=0),M.every(function(e){return e})){E=O,S=!1;break}k.set(O,M)}if(S)for(var I=function(e){var t=b.find(function(t){var n=k.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return E=t,"break"},F=h?3:1;F>0;F--){if("break"===I(F))break}t.placement!==E&&(t.modifiersData[r]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function my(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function gy(e){return[uv,dv,cv,pv].some(function(t){return e[t]>=0})}var vy={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=py(t,{elementContext:"reference"}),s=py(t,{altBoundary:!0}),l=my(a,r),u=my(s,o,i),c=gy(l),d=gy(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}};var yy={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=wv.reduce(function(e,n){return e[n]=function(e,t,n){var r=Tv(e),o=[pv,uv].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[pv,dv].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e},{}),s=a[t.placement],l=s.x,u=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}};var by={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=dy({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})},data:{}};var wy={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,p=n.tether,f=void 0===p||p,h=n.tetherOffset,m=void 0===h?0:h,g=py(t,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),v=Tv(t.placement),y=Gv(t.placement),b=!y,w=Uv(v),x="x"===w?"y":"x",k=t.modifiersData.popperOffsets,S=t.rects.reference,E=t.rects.popper,C="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,O="number"==typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),_=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,T={x:0,y:0};if(k){if(i){var R,P="y"===w?uv:pv,A="y"===w?cv:dv,L="y"===w?"height":"width",N=k[w],M=N+g[P],I=N-g[A],F=f?-E[L]/2:0,$=y===mv?S[L]:E[L],j=y===mv?-E[L]:-S[L],z=t.elements.arrow,B=f&&z?Iv(z):{width:0,height:0},D=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},W=D[P],U=D[A],V=Vv(0,S[L],B[L]),K=b?S[L]/2-F-V-W-O.mainAxis:$-V-W-O.mainAxis,H=b?-S[L]/2+F+V+U+O.mainAxis:j+V+U+O.mainAxis,q=t.elements.arrow&&Wv(t.elements.arrow),G=q?"y"===w?q.clientTop||0:q.clientLeft||0:0,Y=null!=(R=null==_?void 0:_[w])?R:0,X=N+H-Y,Q=Vv(f?Pv(M,N+K-Y-G):M,N,f?Rv(I,X):I);k[w]=Q,T[w]=Q-N}if(s){var J,Z="x"===w?uv:pv,ee="x"===w?cv:dv,te=k[x],ne="y"===x?"height":"width",re=te+g[Z],oe=te-g[ee],ie=-1!==[uv,pv].indexOf(v),ae=null!=(J=null==_?void 0:_[x])?J:0,se=ie?re:te-S[ne]-E[ne]-ae+O.altAxis,le=ie?te+S[ne]+E[ne]-ae-O.altAxis:oe,ue=f&&ie?function(e,t,n){var r=Vv(e,t,n);return r>n?n:r}(se,te,le):Vv(f?se:re,te,f?le:oe);k[x]=ue,T[x]=ue-te}t.modifiersData[r]=T}},requiresIfExists:["offset"]};function xy(e,t,n){void 0===n&&(n=!1);var r=Cv(t),o=Cv(t)&&function(e){var t=e.getBoundingClientRect(),n=Av(t.width)/e.offsetWidth||1,r=Av(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=zv(t),a=Mv(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==kv(t)||iy(i))&&(s=function(e){return e!==Sv(e)&&Cv(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:ry(e);var t}(t)),Cv(t)?((l=Mv(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=oy(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function ky(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}}),r.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){n.has(e.name)||o(e)}),r}var Sy={placement:"bottom",modifiers:[],strategy:"absolute"};function Ey(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}function Cy(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?Sy:o;return function(e,t,n){void 0===n&&(n=i);var o,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},Sy,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],u=!1,c={state:s,setOptions:function(n){var o="function"==typeof n?n(s.options):n;d(),s.options=Object.assign({},i,s.options,o),s.scrollParents={reference:Ev(e)?sy(e):e.contextElement?sy(e.contextElement):[],popper:sy(t)};var a,u,p=function(e){var t=ky(e);return xv.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}((a=[].concat(r,s.options.modifiers),u=a.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{}),Object.keys(u).map(function(e){return u[e]})));return s.orderedModifiers=p.filter(function(e){return e.enabled}),s.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var i=o({state:s,name:t,instance:c,options:r}),a=function(){};l.push(i||a)}}),c.update()},forceUpdate:function(){if(!u){var e=s.elements,t=e.reference,n=e.popper;if(Ey(t,n)){s.rects={reference:xy(t,Wv(n),"fixed"===s.options.strategy),popper:Iv(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach(function(e){return s.modifiersData[e.name]=Object.assign({},e.data)});for(var r=0;r<s.orderedModifiers.length;r++)if(!0!==s.reset){var o=s.orderedModifiers[r],i=o.fn,a=o.options,l=void 0===a?{}:a,d=o.name;"function"==typeof i&&(s=i({state:s,options:l,name:d,instance:c})||s)}else s.reset=!1,r=-1}}},update:(o=function(){return new Promise(function(e){c.forceUpdate(),e(s)})},function(){return a||(a=new Promise(function(e){Promise.resolve().then(function(){a=void 0,e(o())})})),a}),destroy:function(){d(),u=!0}};if(!Ey(e,t))return c;function d(){l.forEach(function(e){return e()}),l=[]}return c.setOptions(n).then(function(e){!u&&n.onFirstUpdate&&n.onFirstUpdate(e)}),c}}var Oy=Cy({defaultModifiers:[Jv,by,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,l=void 0===s||s,u={placement:Tv(t.placement),variation:Gv(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Xv(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Xv(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},_v,yy,hy,wy,qv,vy]});function _y(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,a=o?{}:gg(n,r),{props:s,internalRef:l}=bg({...i,externalSlotProps:a});return mg(t,{...s,ref:ig(l,a?.ref,e.additionalProps?.ref)},r)}function Ty(e){return parseInt(l.version,10)>=19?e?.props?.ref||null:e?.ref||null}const Ry=l.forwardRef(function(e,t){const{children:n,container:r,disablePortal:o=!1}=e,[i,a]=l.useState(null),s=ig(l.isValidElement(n)?Ty(n):null,t);if(_h(()=>{o||a(function(e){return"function"==typeof e?e():e}(r)||document.body)},[r,o]),_h(()=>{if(i&&!o)return ng(t,i),()=>{ng(t,null)}},[t,i,o]),o){if(l.isValidElement(n)){const e={ref:s};return l.cloneElement(n,e)}return n}return i?po.createPortal(n,i):i});function Py(e){return fh("MuiPopper",e)}function Ay(e){return"function"==typeof e?e():e}hh("MuiPopper",["root"]);const Ly={},Ny=l.forwardRef(function(e,t){const{anchorEl:n,children:r,direction:o,disablePortal:i,modifiers:a,open:s,placement:u,popperOptions:c,popperRef:d,slotProps:p={},slots:f={},TransitionProps:h,ownerState:m,...g}=e,v=l.useRef(null),y=ig(v,t),b=l.useRef(null),w=ig(b,d),x=l.useRef(w);_h(()=>{x.current=w},[w]),l.useImperativeHandle(d,()=>b.current,[]);const k=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(u,o),[S,E]=l.useState(k),[C,O]=l.useState(Ay(n));l.useEffect(()=>{b.current&&b.current.forceUpdate()}),l.useEffect(()=>{n&&O(Ay(n))},[n]),_h(()=>{if(!C||!s)return;let e=[{name:"preventOverflow",options:{altBoundary:i}},{name:"flip",options:{altBoundary:i}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:e})=>{E(e.placement)}}];null!=a&&(e=e.concat(a)),c&&null!=c.modifiers&&(e=e.concat(c.modifiers));const t=Oy(C,v.current,{placement:k,...c,modifiers:e});return x.current(t),()=>{t.destroy(),x.current(null)}},[C,i,a,s,c,k]);const _={placement:S};null!==h&&(_.TransitionProps=h);const T=(e=>{const{classes:t}=e;return Jh({root:["root"]},Py,t)})(e),R=f.root??"div",P=_y({elementType:R,externalSlotProps:p.root,externalForwardedProps:g,additionalProps:{role:"tooltip",ref:y},ownerState:e,className:T.root});return Fp.jsx(R,{...P,children:"function"==typeof r?r(_):r})}),My=l.forwardRef(function(e,t){const{anchorEl:n,children:r,container:o,direction:i="ltr",disablePortal:a=!1,keepMounted:s=!1,modifiers:u,open:c,placement:d="bottom",popperOptions:p=Ly,popperRef:f,style:h,transition:m=!1,slotProps:g={},slots:v={},...y}=e,[b,w]=l.useState(!0);if(!s&&!c&&(!m||b))return null;let x;if(o)x=o;else if(n){const e=Ay(n);x=e&&void 0!==e.nodeType?eg(e).body:eg(null).body}const k=c||!s||m&&!b?void 0:"none",S=m?{in:c,onEnter:()=>{w(!1)},onExited:()=>{w(!0)}}:void 0;return Fp.jsx(Ry,{disablePortal:a,container:x,children:Fp.jsx(Ny,{anchorEl:n,direction:i,disablePortal:a,modifiers:u,ref:t,open:m?!b:c,placement:d,popperOptions:p,popperRef:f,slotProps:g,slots:v,...y,style:{position:"fixed",top:0,left:0,display:k,...h},TransitionProps:S,children:r})})}),Iy=Wm(My,{name:"MuiPopper",slot:"Root"})({}),Fy=l.forwardRef(function(e,t){const n=Wh(),r=Gm({props:e,name:"MuiPopper"}),{anchorEl:o,component:i,components:a,componentsProps:s,container:l,disablePortal:u,keepMounted:c,modifiers:d,open:p,placement:f,popperOptions:h,popperRef:m,transition:g,slots:v,slotProps:y,...b}=r,w=v?.root??a?.Root,x={anchorEl:o,container:l,disablePortal:u,keepMounted:c,modifiers:d,open:p,placement:f,popperOptions:h,popperRef:m,transition:g,...b};return Fp.jsx(Iy,{as:i,direction:n?"rtl":"ltr",slots:{root:w},slotProps:y??s,...x,ref:t})});function $y(e){return fh("MuiListSubheader",e)}hh("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const jy=Wm("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t[`color${sf(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(qm(({theme:e})=>({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14),variants:[{props:{color:"primary"},style:{color:(e.vars||e).palette.primary.main}},{props:{color:"inherit"},style:{color:"inherit"}},{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:72}},{props:({ownerState:e})=>!e.disableSticky,style:{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper}}]}))),zy=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiListSubheader"}),{className:r,color:o="default",component:i="li",disableGutters:a=!1,disableSticky:s=!1,inset:l=!1,...u}=n,c={...n,color:o,component:i,disableGutters:a,disableSticky:s,inset:l},d=(e=>{const{classes:t,color:n,disableGutters:r,inset:o,disableSticky:i}=e;return Jh({root:["root","default"!==n&&`color${sf(n)}`,!r&&"gutters",o&&"inset",!i&&"sticky"]},$y,t)})(c);return Fp.jsx(jy,{as:i,className:Km(d.root,r),ref:t,ownerState:c,...u})});zy&&(zy.muiSkipListHighlight=!0);var By=Jm(Fp.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}));function Dy(e){return fh("MuiChip",e)}const Wy=hh("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),Uy=Wm("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:i,onDelete:a,size:s,variant:l}=n;return[{[`& .${Wy.avatar}`]:t.avatar},{[`& .${Wy.avatar}`]:t[`avatar${sf(s)}`]},{[`& .${Wy.avatar}`]:t[`avatarColor${sf(r)}`]},{[`& .${Wy.icon}`]:t.icon},{[`& .${Wy.icon}`]:t[`icon${sf(s)}`]},{[`& .${Wy.icon}`]:t[`iconColor${sf(o)}`]},{[`& .${Wy.deleteIcon}`]:t.deleteIcon},{[`& .${Wy.deleteIcon}`]:t[`deleteIcon${sf(s)}`]},{[`& .${Wy.deleteIcon}`]:t[`deleteIconColor${sf(r)}`]},{[`& .${Wy.deleteIcon}`]:t[`deleteIcon${sf(l)}Color${sf(r)}`]},t.root,t[`size${sf(s)}`],t[`color${sf(r)}`],i&&t.clickable,i&&"default"!==r&&t[`clickableColor${sf(r)}`],a&&t.deletable,a&&"default"!==r&&t[`deletableColor${sf(r)}`],t[l],t[`${l}${sf(r)}`]]}})(qm(({theme:e})=>{const t="light"===e.palette.mode?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,lineHeight:1.5,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:16,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${Wy.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Wy.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${Wy.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${Wy.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${Wy.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Wy.icon}`]:{marginLeft:5,marginRight:-6},[`& .${Wy.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.alpha((e.vars||e).palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.alpha((e.vars||e).palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${Wy.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${Wy.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(jg(["contrastText"])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText,[`& .${Wy.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[t].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].contrastText}}}})),{props:e=>e.iconColor===e.color,style:{[`& .${Wy.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:e=>e.iconColor===e.color&&"default"!==e.color,style:{[`& .${Wy.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${Wy.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}},...Object.entries(e.palette).filter(jg(["dark"])).map(([t])=>({props:{color:t,onDelete:!0},style:{[`&.${Wy.focusVisible}`]:{background:(e.vars||e).palette[t].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`)},[`&.${Wy.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(jg(["dark"])).map(([t])=>({props:{color:t,clickable:!0},style:{[`&:hover, &.${Wy.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${"light"===e.palette.mode?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${Wy.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Wy.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Wy.avatar}`]:{marginLeft:4},[`& .${Wy.avatarSmall}`]:{marginLeft:2},[`& .${Wy.icon}`]:{marginLeft:4},[`& .${Wy.iconSmall}`]:{marginLeft:2},[`& .${Wy.deleteIcon}`]:{marginRight:5},[`& .${Wy.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(jg()).map(([t])=>({props:{variant:"outlined",color:t},style:{color:(e.vars||e).palette[t].main,border:`1px solid ${e.alpha((e.vars||e).palette[t].main,.7)}`,[`&.${Wy.clickable}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)},[`&.${Wy.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.focusOpacity)},[`& .${Wy.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[t].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].main}}}}))]}})),Vy=Wm("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${sf(r)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function Ky(e){return"Backspace"===e.key||"Delete"===e.key}const Hy=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiChip"}),{avatar:r,className:o,clickable:i,color:a="default",component:s,deleteIcon:u,disabled:c=!1,icon:d,label:p,onClick:f,onDelete:h,onKeyDown:m,onKeyUp:g,size:v="medium",variant:y="filled",tabIndex:b,skipFocusWhenDisabled:w=!1,slots:x={},slotProps:k={},...S}=n,E=ig(l.useRef(null),t),C=e=>{e.stopPropagation(),h&&h(e)},O=!(!1===i||!f)||i,_=O||h?Fg:s||"div",T={...n,component:_,disabled:c,size:v,color:a,iconColor:l.isValidElement(d)&&d.props.color||a,onDelete:!!h,clickable:O,variant:y},R=(e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:i,onDelete:a,clickable:s,variant:l}=e;return Jh({root:["root",l,n&&"disabled",`size${sf(r)}`,`color${sf(o)}`,s&&"clickable",s&&`clickableColor${sf(o)}`,a&&"deletable",a&&`deletableColor${sf(o)}`,`${l}${sf(o)}`],label:["label",`label${sf(r)}`],avatar:["avatar",`avatar${sf(r)}`,`avatarColor${sf(o)}`],icon:["icon",`icon${sf(r)}`,`iconColor${sf(i)}`],deleteIcon:["deleteIcon",`deleteIcon${sf(r)}`,`deleteIconColor${sf(o)}`,`deleteIcon${sf(l)}Color${sf(o)}`]},Dy,t)})(T),P=_===Fg?{component:s||"div",focusVisibleClassName:R.focusVisible,...h&&{disableRipple:!0}}:{};let A=null;h&&(A=u&&l.isValidElement(u)?l.cloneElement(u,{className:Km(u.props.className,R.deleteIcon),onClick:C}):Fp.jsx(By,{className:R.deleteIcon,onClick:C}));let L=null;r&&l.isValidElement(r)&&(L=l.cloneElement(r,{className:Km(R.avatar,r.props.className)}));let N=null;d&&l.isValidElement(d)&&(N=l.cloneElement(d,{className:Km(R.icon,d.props.className)}));const M={slots:x,slotProps:k},[I,F]=wg("root",{elementType:Uy,externalForwardedProps:{...M,...S},ownerState:T,shouldForwardComponentProp:!0,ref:E,className:Km(R.root,o),additionalProps:{disabled:!(!O||!c)||void 0,tabIndex:w&&c?-1:b,...P},getSlotProps:e=>({...e,onClick:t=>{e.onClick?.(t),f?.(t)},onKeyDown:t=>{e.onKeyDown?.(t),(e=>{e.currentTarget===e.target&&Ky(e)&&e.preventDefault(),m&&m(e)})(t)},onKeyUp:t=>{e.onKeyUp?.(t),(e=>{e.currentTarget===e.target&&h&&Ky(e)&&h(e),g&&g(e)})(t)}})}),[$,j]=wg("label",{elementType:Vy,externalForwardedProps:M,ownerState:T,className:R.label});return Fp.jsxs(I,{as:_,...F,children:[L||N,Fp.jsx($,{...j,children:p}),A]})});function qy(e){return parseInt(e,10)||0}const Gy={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};function Yy(e){return function(e){for(const t in e)return!1;return!0}(e)||0===e.outerHeightStyle&&!e.overflowing}const Xy=l.forwardRef(function(e,t){const{onChange:n,maxRows:r,minRows:o=1,style:i,value:a,...s}=e,{current:u}=l.useRef(null!=a),c=l.useRef(null),d=ig(t,c),p=l.useRef(null),f=l.useRef(null),h=l.useCallback(()=>{const t=c.current,n=f.current;if(!t||!n)return;const i=tg(t).getComputedStyle(t);if("0px"===i.width)return{outerHeightStyle:0,overflowing:!1};n.style.width=i.width,n.value=t.value||e.placeholder||"x","\n"===n.value.slice(-1)&&(n.value+=" ");const a=i.boxSizing,s=qy(i.paddingBottom)+qy(i.paddingTop),l=qy(i.borderBottomWidth)+qy(i.borderTopWidth),u=n.scrollHeight;n.value="x";const d=n.scrollHeight;let p=u;o&&(p=Math.max(Number(o)*d,p)),r&&(p=Math.min(Number(r)*d,p)),p=Math.max(p,d);return{outerHeightStyle:p+("border-box"===a?s+l:0),overflowing:Math.abs(p-u)<=1}},[r,o,e.placeholder]),m=og(()=>{const e=c.current,t=h();if(!e||!t||Yy(t))return!1;const n=t.outerHeightStyle;return null!=p.current&&p.current!==n}),g=l.useCallback(()=>{const e=c.current,t=h();if(!e||!t||Yy(t))return;const n=t.outerHeightStyle;p.current!==n&&(p.current=n,e.style.height=`${n}px`),e.style.overflow=t.overflowing?"hidden":""},[h]),v=l.useRef(-1);_h(()=>{const e=Zm(g),t=c?.current;if(!t)return;const n=tg(t);let r;return n.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(r=new ResizeObserver(()=>{m()&&(r.unobserve(t),cancelAnimationFrame(v.current),g(),v.current=requestAnimationFrame(()=>{r.observe(t)}))}),r.observe(t)),()=>{e.clear(),cancelAnimationFrame(v.current),n.removeEventListener("resize",e),r&&r.disconnect()}},[h,g,m]),_h(()=>{g()});return Fp.jsxs(l.Fragment,{children:[Fp.jsx("textarea",{value:a,onChange:e=>{u||g();const t=e.target,r=t.value.length,o=t.value.endsWith("\n"),i=t.selectionStart===r;o&&i&&t.setSelectionRange(r,r),n&&n(e)},ref:d,rows:o,style:i,...s}),Fp.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:f,tabIndex:-1,style:{...Gy,...i,paddingTop:0,paddingBottom:0}})]})});function Qy({props:e,states:t,muiFormControl:n}){return t.reduce((t,r)=>(t[r]=e[r],n&&void 0===e[r]&&(t[r]=n[r]),t),{})}const Jy=l.createContext(void 0);function Zy(){return l.useContext(Jy)}function eb(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function tb(e,t=!1){return e&&(eb(e.value)&&""!==e.value||t&&eb(e.defaultValue)&&""!==e.defaultValue)}function nb(e){return fh("MuiInputBase",e)}const rb=hh("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var ob;const ib=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,"small"===n.size&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${sf(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},ab=(e,t)=>{const{ownerState:n}=e;return[t.input,"small"===n.size&&t.inputSizeSmall,n.multiline&&t.inputMultiline,"search"===n.type&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},sb=Wm("div",{name:"MuiInputBase",slot:"Root",overridesResolver:ib})(qm(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${rb.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:e})=>e.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{paddingTop:1}},{props:({ownerState:e})=>e.fullWidth,style:{width:"100%"}}]}))),lb=Wm("input",{name:"MuiInputBase",slot:"Input",overridesResolver:ab})(qm(({theme:e})=>{const t="light"===e.palette.mode,n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},o=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${rb.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${rb.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:e})=>!e.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:e})=>e.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),ub=function(e){return function(t){return Fp.jsx(Hm,{styles:"function"==typeof e?n=>e({theme:n,...t}):e})}}({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),cb=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiInputBase"}),{"aria-describedby":r,autoComplete:o,autoFocus:i,className:a,color:s,components:u={},componentsProps:c={},defaultValue:d,disabled:p,disableInjectingGlobalStyles:f,endAdornment:h,error:m,fullWidth:g=!1,id:v,inputComponent:y="input",inputProps:b={},inputRef:w,margin:x,maxRows:k,minRows:S,multiline:E=!1,name:C,onBlur:O,onChange:_,onClick:T,onFocus:R,onKeyDown:P,onKeyUp:A,placeholder:L,readOnly:N,renderSuffix:M,rows:I,size:F,slotProps:$={},slots:j={},startAdornment:z,type:B="text",value:D,...W}=n,U=null!=b.value?b.value:D,{current:V}=l.useRef(null!=U),K=l.useRef(),H=l.useCallback(e=>{},[]),q=ig(K,w,b.ref,H),[G,Y]=l.useState(!1),X=Zy(),Q=Qy({props:n,muiFormControl:X,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Q.focused=X?X.focused:G,l.useEffect(()=>{!X&&p&&G&&(Y(!1),O&&O())},[X,p,G,O]);const J=X&&X.onFilled,Z=X&&X.onEmpty,ee=l.useCallback(e=>{tb(e)?J&&J():Z&&Z()},[J,Z]);_h(()=>{V&&ee({value:U})},[U,ee,V]);l.useEffect(()=>{ee(K.current)},[]);let te=y,ne=b;E&&"input"===te&&(ne=I?{type:void 0,minRows:I,maxRows:I,...ne}:{type:void 0,maxRows:k,minRows:S,...ne},te=Xy);l.useEffect(()=>{X&&X.setAdornedStart(Boolean(z))},[X,z]);const re={...n,color:Q.color||"primary",disabled:Q.disabled,endAdornment:h,error:Q.error,focused:Q.focused,formControl:X,fullWidth:g,hiddenLabel:Q.hiddenLabel,multiline:E,size:Q.size,startAdornment:z,type:B},oe=(e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:s,fullWidth:l,hiddenLabel:u,multiline:c,readOnly:d,size:p,startAdornment:f,type:h}=e;return Jh({root:["root",`color${sf(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",p&&"medium"!==p&&`size${sf(p)}`,c&&"multiline",f&&"adornedStart",i&&"adornedEnd",u&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled","search"===h&&"inputTypeSearch",c&&"inputMultiline","small"===p&&"inputSizeSmall",u&&"inputHiddenLabel",f&&"inputAdornedStart",i&&"inputAdornedEnd",d&&"readOnly"]},nb,t)})(re),ie=j.root||u.Root||sb,ae=$.root||c.root||{},se=j.input||u.Input||lb;return ne={...ne,...$.input??c.input},Fp.jsxs(l.Fragment,{children:[!f&&"function"==typeof ub&&(ob||(ob=Fp.jsx(ub,{}))),Fp.jsxs(ie,{...ae,ref:t,onClick:e=>{K.current&&e.currentTarget===e.target&&K.current.focus(),T&&T(e)},...W,...!hg(ie)&&{ownerState:{...re,...ae.ownerState}},className:Km(oe.root,ae.className,a,N&&"MuiInputBase-readOnly"),children:[z,Fp.jsx(Jy.Provider,{value:null,children:Fp.jsx(se,{"aria-invalid":Q.error,"aria-describedby":r,autoComplete:o,autoFocus:i,defaultValue:d,disabled:Q.disabled,id:v,onAnimationStart:e=>{ee("mui-auto-fill-cancel"===e.animationName?K.current:{value:"x"})},name:C,placeholder:L,readOnly:N,required:Q.required,rows:I,value:U,onKeyDown:P,onKeyUp:A,type:B,...ne,...!hg(se)&&{as:te,ownerState:{...re,...ne.ownerState}},ref:q,className:Km(oe.input,ne.className,N&&"MuiInputBase-readOnly"),onBlur:e=>{O&&O(e),b.onBlur&&b.onBlur(e),X&&X.onBlur?X.onBlur(e):Y(!1)},onChange:(e,...t)=>{if(!V){const t=e.target||K.current;if(null==t)throw new Error(Uc(1));ee({value:t.value})}b.onChange&&b.onChange(e,...t),_&&_(e,...t)},onFocus:e=>{R&&R(e),b.onFocus&&b.onFocus(e),X&&X.onFocus?X.onFocus(e):Y(!0)}})}),h,M?M({...Q,startAdornment:z}):null]})]})});function db(e){return fh("MuiInput",e)}const pb={...rb,...hh("MuiInput",["root","underline","input"])};function fb(e){return fh("MuiOutlinedInput",e)}const hb={...rb,...hh("MuiOutlinedInput",["root","notchedOutline","input"])};function mb(e){return fh("MuiFilledInput",e)}const gb={...rb,...hh("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])};var vb=Jm(Fp.jsx("path",{d:"M7 10l5 5 5-5z"}));function yb(e){return fh("MuiAutocomplete",e)}const bb=hh("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var wb,xb;const kb=Wm("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:o,hasPopupIcon:i,inputFocused:a,size:s}=n;return[{[`& .${bb.tag}`]:t.tag},{[`& .${bb.tag}`]:t[`tagSize${sf(s)}`]},{[`& .${bb.inputRoot}`]:t.inputRoot},{[`& .${bb.input}`]:t.input},{[`& .${bb.input}`]:a&&t.inputFocused},t.root,r&&t.fullWidth,i&&t.hasPopupIcon,o&&t.hasClearIcon]}})({[`&.${bb.focused} .${bb.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${bb.clearIndicator}`]:{visibility:"visible"}},[`& .${bb.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${bb.inputRoot}`]:{[`.${bb.hasPopupIcon}&, .${bb.hasClearIcon}&`]:{paddingRight:30},[`.${bb.hasPopupIcon}.${bb.hasClearIcon}&`]:{paddingRight:56},[`& .${bb.input}`]:{width:0,minWidth:30}},[`& .${pb.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${pb.root}.${rb.sizeSmall}`]:{[`& .${pb.input}`]:{padding:"2px 4px 3px 0"}},[`& .${hb.root}`]:{padding:9,[`.${bb.hasPopupIcon}&, .${bb.hasClearIcon}&`]:{paddingRight:39},[`.${bb.hasPopupIcon}.${bb.hasClearIcon}&`]:{paddingRight:65},[`& .${bb.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${bb.endAdornment}`]:{right:9}},[`& .${hb.root}.${rb.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${bb.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${gb.root}`]:{paddingTop:19,paddingLeft:8,[`.${bb.hasPopupIcon}&, .${bb.hasClearIcon}&`]:{paddingRight:39},[`.${bb.hasPopupIcon}.${bb.hasClearIcon}&`]:{paddingRight:65},[`& .${gb.input}`]:{padding:"7px 4px"},[`& .${bb.endAdornment}`]:{right:9}},[`& .${gb.root}.${rb.sizeSmall}`]:{paddingBottom:1,[`& .${gb.input}`]:{padding:"2.5px 4px"}},[`& .${rb.hiddenLabel}`]:{paddingTop:8},[`& .${gb.root}.${rb.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${bb.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${gb.root}.${rb.hiddenLabel}.${rb.sizeSmall}`]:{[`& .${bb.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${bb.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${bb.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${bb.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${bb.inputRoot}`]:{flexWrap:"wrap"}}}]}),Sb=Wm("div",{name:"MuiAutocomplete",slot:"EndAdornment"})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),Eb=Wm(ev,{name:"MuiAutocomplete",slot:"ClearIndicator"})({marginRight:-2,padding:4,visibility:"hidden"}),Cb=Wm(ev,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popupIndicator,n.popupOpen&&t.popupIndicatorOpen]}})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),Ob=Wm(Fy,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${bb.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})(qm(({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}))),_b=Wm(Sg,{name:"MuiAutocomplete",slot:"Paper"})(qm(({theme:e})=>({...e.typography.body1,overflow:"auto"}))),Tb=Wm("div",{name:"MuiAutocomplete",slot:"Loading"})(qm(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),Rb=Wm("div",{name:"MuiAutocomplete",slot:"NoOptions"})(qm(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),Pb=Wm("ul",{name:"MuiAutocomplete",slot:"Listbox"})(qm(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${bb.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${bb.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${bb.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${bb.focused}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${bb.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}}}))),Ab=Wm(zy,{name:"MuiAutocomplete",slot:"GroupLabel"})(qm(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),Lb=Wm("ul",{name:"MuiAutocomplete",slot:"GroupUl"})({padding:0,[`& .${bb.option}`]:{paddingLeft:24}}),Nb=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiAutocomplete"}),{autoComplete:r=!1,autoHighlight:o=!1,autoSelect:i=!1,blurOnSelect:a=!1,ChipProps:s,className:u,clearIcon:c=wb||(wb=Fp.jsx(tv,{fontSize:"small"})),clearOnBlur:d=!n.freeSolo,clearOnEscape:p=!1,clearText:f="Clear",closeText:h="Close",componentsProps:m,defaultValue:g=(n.multiple?[]:null),disableClearable:v=!1,disableCloseOnSelect:y=!1,disabled:b=!1,disabledItemsFocusable:w=!1,disableListWrap:x=!1,disablePortal:k=!1,filterOptions:S,filterSelectedOptions:E=!1,forcePopupIcon:C="auto",freeSolo:O=!1,fullWidth:_=!1,getLimitTagsText:T=e=>`+${e}`,getOptionDisabled:R,getOptionKey:P,getOptionLabel:A,isOptionEqualToValue:L,groupBy:N,handleHomeEndKeys:M=!n.freeSolo,id:I,includeInputInList:F=!1,inputValue:$,limitTags:j=-1,ListboxComponent:z,ListboxProps:B,loading:D=!1,loadingText:W="Loading…",multiple:U=!1,noOptionsText:V="No options",onChange:K,onClose:H,onHighlightChange:q,onInputChange:G,onOpen:Y,open:X,openOnFocus:Q=!1,openText:J="Open",options:Z,PaperComponent:ee,PopperComponent:te,popupIcon:ne=xb||(xb=Fp.jsx(vb,{})),readOnly:re=!1,renderGroup:oe,renderInput:ie,renderOption:ae,renderTags:se,renderValue:le,selectOnFocus:ue=!n.freeSolo,size:ce="medium",slots:de={},slotProps:pe={},value:fe,...he}=n,{getRootProps:me,getInputProps:ge,getInputLabelProps:ve,getPopupIndicatorProps:ye,getClearProps:be,getItemProps:we,getListboxProps:xe,getOptionProps:ke,value:Se,dirty:Ee,expanded:Ce,id:Oe,popupOpen:_e,focused:Te,focusedItem:Re,anchorEl:Pe,setAnchorEl:Ae,inputValue:Le,groupedOptions:Ne}=lv({...n,componentName:"Autocomplete"}),Me=!v&&!b&&Ee&&!re,Ie=(!O||!0===C)&&!1!==C,{onMouseDown:Fe}=ge(),{ref:$e,...je}=xe(),ze=A||(e=>e.label??e),Be={...n,disablePortal:k,expanded:Ce,focused:Te,fullWidth:_,getOptionLabel:ze,hasClearIcon:Me,hasPopupIcon:Ie,inputFocused:-1===Re,popupOpen:_e,size:ce},De=(e=>{const{classes:t,disablePortal:n,expanded:r,focused:o,fullWidth:i,hasClearIcon:a,hasPopupIcon:s,inputFocused:l,popupOpen:u,size:c}=e;return Jh({root:["root",r&&"expanded",o&&"focused",i&&"fullWidth",a&&"hasClearIcon",s&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${sf(c)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",u&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]},yb,t)})(Be),We={slots:{paper:ee,popper:te,...de},slotProps:{chip:s,listbox:B,...m,...pe}},[Ue,Ve]=wg("listbox",{elementType:Pb,externalForwardedProps:We,ownerState:Be,className:De.listbox,additionalProps:je,ref:$e}),[Ke,He]=wg("paper",{elementType:Sg,externalForwardedProps:We,ownerState:Be,className:De.paper}),[qe,Ge]=wg("popper",{elementType:Fy,externalForwardedProps:We,ownerState:Be,className:De.popper,additionalProps:{disablePortal:k,style:{width:Pe?Pe.clientWidth:null},role:"presentation",anchorEl:Pe,open:_e}});let Ye;const Xe=e=>({className:De.tag,disabled:b,...we(e)});if(U?Se.length>0&&(Ye=se?se(Se,Xe,Be):le?le(Se,Xe,Be):Se.map((e,t)=>{const{key:n,...r}=Xe({index:t});return Fp.jsx(Hy,{label:ze(e),size:ce,...r,...We.slotProps.chip},n)})):le&&null!=Se&&(Ye=le(Se,Xe,Be)),j>-1&&Array.isArray(Ye)){const e=Ye.length-j;!Te&&e>0&&(Ye=Ye.splice(0,j),Ye.push(Fp.jsx("span",{className:De.tag,children:T(e)},Ye.length)))}const Qe=oe||(e=>Fp.jsxs("li",{children:[Fp.jsx(Ab,{className:De.groupLabel,ownerState:Be,component:"div",children:e.group}),Fp.jsx(Lb,{className:De.groupUl,ownerState:Be,children:e.children})]},e.key)),Je=ae||((e,t)=>{const{key:n,...r}=e;return Fp.jsx("li",{...r,children:ze(t)},n)}),Ze=(e,t)=>{const n=ke({option:e,index:t});return Je({...n,className:De.option},e,{selected:n["aria-selected"],index:t,inputValue:Le},Be)},et=We.slotProps.clearIndicator,tt=We.slotProps.popupIndicator;return Fp.jsxs(l.Fragment,{children:[Fp.jsx(kb,{ref:t,className:Km(De.root,u),ownerState:Be,...me(he),children:ie({id:Oe,disabled:b,fullWidth:!0,size:"small"===ce?"small":void 0,InputLabelProps:ve(),InputProps:{ref:Ae,className:De.inputRoot,startAdornment:Ye,onMouseDown:e=>{e.target===e.currentTarget&&Fe(e)},...(Me||Ie)&&{endAdornment:Fp.jsxs(Sb,{className:De.endAdornment,ownerState:Be,children:[Me?Fp.jsx(Eb,{...be(),"aria-label":f,title:f,ownerState:Be,...et,className:Km(De.clearIndicator,et?.className),children:c}):null,Ie?Fp.jsx(Cb,{...ye(),disabled:b,"aria-label":_e?h:J,title:_e?h:J,ownerState:Be,...tt,className:Km(De.popupIndicator,tt?.className),children:ne}):null]})}},inputProps:{className:De.input,disabled:b,readOnly:re,...ge()}})}),Pe?Fp.jsx(Ob,{as:qe,...Ge,children:Fp.jsxs(_b,{as:Ke,...He,children:[D&&0===Ne.length?Fp.jsx(Tb,{className:De.loading,ownerState:Be,children:W}):null,0!==Ne.length||O||D?null:Fp.jsx(Rb,{className:De.noOptions,ownerState:Be,role:"presentation",onMouseDown:e=>{e.preventDefault()},children:V}),Ne.length>0?Fp.jsx(Ue,{as:z,...Ve,children:Ne.map((e,t)=>N?Qe({key:e.key,group:e.group,children:e.options.map((t,n)=>Ze(t,e.index+n))}):Ze(e,t))}):null]})}):null]})}),Mb={entering:{opacity:1},entered:{opacity:1}},Ib=l.forwardRef(function(e,t){const n=zm(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:o,appear:i=!0,children:a,easing:s,in:u,onEnter:c,onEntered:d,onEntering:p,onExit:f,onExited:h,onExiting:m,style:g,timeout:v=r,TransitionComponent:y=Ao,...b}=e,w=l.useRef(null),x=ig(w,Ty(a),t),k=e=>t=>{if(e){const n=w.current;void 0===t?e(n):e(n,t)}},S=k(p),E=k((e,t)=>{pg(e);const r=fg({style:g,timeout:v,easing:s},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),c&&c(e,t)}),C=k(d),O=k(m),_=k(e=>{const t=fg({style:g,timeout:v,easing:s},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),f&&f(e)}),T=k(h);return Fp.jsx(y,{appear:i,in:u,nodeRef:w,onEnter:E,onEntered:C,onEntering:S,onExit:_,onExited:T,onExiting:O,addEndListener:e=>{o&&o(w.current,e)},timeout:v,...b,children:(e,{ownerState:t,...n})=>l.cloneElement(a,{style:{opacity:0,visibility:"exited"!==e||u?void 0:"hidden",...Mb[e],...g,...a.props.style},ref:x,...n})})});function Fb(e){return fh("MuiBackdrop",e)}hh("MuiBackdrop",["root","invisible"]);const $b=Wm("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),jb=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiBackdrop"}),{children:r,className:o,component:i="div",invisible:a=!1,open:s,components:l={},componentsProps:u={},slotProps:c={},slots:d={},TransitionComponent:p,transitionDuration:f,...h}=n,m={...n,component:i,invisible:a},g=(e=>{const{classes:t,invisible:n}=e;return Jh({root:["root",n&&"invisible"]},Fb,t)})(m),v={component:i,slots:{transition:p,root:l.Root,...d},slotProps:{...u,...c}},[y,b]=wg("root",{elementType:$b,externalForwardedProps:v,className:Km(g.root,o),ownerState:m}),[w,x]=wg("transition",{elementType:Ib,externalForwardedProps:v,ownerState:m});return Fp.jsx(w,{in:s,timeout:f,...h,...x,children:Fp.jsx(y,{"aria-hidden":!0,...b,classes:g,ref:t,children:r})})}),zb=hh("MuiBox",["root"]),Bb=$m(),Db=function(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=e,i=jp("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(Zf);return l.forwardRef(function(e,a){const s=oh(n),{className:l,component:u="div",...c}=sh(e);return Fp.jsx(i,{as:u,ref:a,className:dh(l,o?o(r):r),theme:t&&s[t]||s,...c})})}({themeId:Vc,defaultTheme:Bb,defaultClassName:zb.root,generateClassName:uh.generate});function Wb(e){return fh("PrivateSwitchBase",e)}hh("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const Ub=Wm(Fg,{name:"MuiSwitchBase"})({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>"start"===e&&"small"!==t.size,style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>"end"===e&&"small"!==t.size,style:{marginRight:-12}}]}),Vb=Wm("input",{name:"MuiSwitchBase",shouldForwardProp:Dm})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),Kb=l.forwardRef(function(e,t){const{autoFocus:n,checked:r,checkedIcon:o,defaultChecked:i,disabled:a,disableFocusRipple:s=!1,edge:l=!1,icon:u,id:c,inputProps:d,inputRef:p,name:f,onBlur:h,onChange:m,onFocus:g,readOnly:v,required:y=!1,tabIndex:b,type:w,value:x,slots:k={},slotProps:S={},...E}=e,[C,O]=rg({controlled:r,default:Boolean(i),name:"SwitchBase",state:"checked"}),_=Zy();let T=a;_&&void 0===T&&(T=_.disabled);const R="checkbox"===w||"radio"===w,P={...e,checked:C,disabled:T,disableFocusRipple:s,edge:l},A=(e=>{const{classes:t,checked:n,disabled:r,edge:o}=e;return Jh({root:["root",n&&"checked",r&&"disabled",o&&`edge${sf(o)}`],input:["input"]},Wb,t)})(P),L={slots:k,slotProps:{input:d,...S}},[N,M]=wg("root",{ref:t,elementType:Ub,className:A.root,shouldForwardComponentProp:!0,externalForwardedProps:{...L,component:"span",...E},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),(e=>{g&&g(e),_&&_.onFocus&&_.onFocus(e)})(t)},onBlur:t=>{e.onBlur?.(t),(e=>{h&&h(e),_&&_.onBlur&&_.onBlur(e)})(t)}}),ownerState:P,additionalProps:{centerRipple:!0,focusRipple:!s,disabled:T,role:void 0,tabIndex:null}}),[I,F]=wg("input",{ref:p,elementType:Vb,className:A.input,externalForwardedProps:L,getSlotProps:e=>({...e,onChange:t=>{e.onChange?.(t),(e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;O(t),m&&m(e,t)})(t)}}),ownerState:P,additionalProps:{autoFocus:n,checked:r,defaultChecked:i,disabled:T,id:R?c:void 0,name:f,readOnly:v,required:y,tabIndex:b,type:w,..."checkbox"===w&&void 0===x?{}:{value:x}}});return Fp.jsxs(N,{...M,children:[Fp.jsx(I,{...F}),C?o:u]})});var Hb=Jm(Fp.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"})),qb=Jm(Fp.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})),Gb=Jm(Fp.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}));function Yb(e){return fh("MuiCheckbox",e)}const Xb=hh("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),Qb=Wm(Kb,{shouldForwardProp:e=>Dm(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${sf(n.size)}`],"default"!==n.color&&t[`color${sf(n.color)}`]]}})(qm(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(jg()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(jg()).map(([t])=>({props:{color:t},style:{[`&.${Xb.checked}, &.${Xb.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${Xb.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),Jb=Fp.jsx(qb,{}),Zb=Fp.jsx(Hb,{}),ew=Fp.jsx(Gb,{}),tw=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiCheckbox"}),{checkedIcon:r=Jb,color:o="primary",icon:i=Zb,indeterminate:a=!1,indeterminateIcon:s=ew,inputProps:u,size:c="medium",disableRipple:d=!1,className:p,slots:f={},slotProps:h={},...m}=n,g=a?s:i,v=a?s:r,y={...n,disableRipple:d,color:o,indeterminate:a,size:c},b=(e=>{const{classes:t,indeterminate:n,color:r,size:o}=e,i=Jh({root:["root",n&&"indeterminate",`color${sf(r)}`,`size${sf(o)}`]},Yb,t);return{...t,...i}})(y),w=h.input??u,[x,k]=wg("root",{ref:t,elementType:Qb,className:Km(b.root,p),shouldForwardComponentProp:!0,externalForwardedProps:{slots:f,slotProps:h,...m},ownerState:y,additionalProps:{type:"checkbox",icon:l.cloneElement(g,{fontSize:g.props.fontSize??c}),checkedIcon:l.cloneElement(v,{fontSize:v.props.fontSize??c}),disableRipple:d,slots:f,slotProps:{input:ag("function"==typeof w?w(y):w,{"data-indeterminate":a})}}});return Fp.jsx(x,{...k,classes:b})});function nw(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function rw(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function ow(e){return parseInt(tg(e).getComputedStyle(e).paddingRight,10)||0}function iw(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,e=>{const t=!i.includes(e),n=!function(e){const t=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&rw(e,o)})}function aw(e,t){let n=-1;return e.some((e,r)=>!!t(e)&&(n=r,!0)),n}function sw(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=eg(e);return t.body===e?tg(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=nw(tg(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${ow(r)+e}px`;const t=eg(r).querySelectorAll(".mui-fixed");[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${ow(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=eg(r).body;else{const t=r.parentElement,n=tg(r);e="HTML"===t?.nodeName&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach(({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)})}}function lw(e){let t=e.activeElement;for(;null!=t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t}const uw=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function cw(e){const t=[],n=[];return Array.from(e.querySelectorAll(uw)).forEach((e,r)=>{const o=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==o&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)&&(0===o?t.push(e):n.push({documentOrder:r,tabIndex:o,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function dw(){return!0}function pw(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=cw,isEnabled:a=dw,open:s}=e,u=l.useRef(!1),c=l.useRef(null),d=l.useRef(null),p=l.useRef(null),f=l.useRef(null),h=l.useRef(!1),m=l.useRef(null),g=ig(Ty(t),m),v=l.useRef(null);l.useEffect(()=>{s&&m.current&&(h.current=!n)},[n,s]),l.useEffect(()=>{if(!s||!m.current)return;const e=lw(eg(m.current));return m.current.contains(e)||(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex","-1"),h.current&&m.current.focus()),()=>{o||(p.current&&p.current.focus&&(u.current=!0,p.current.focus()),p.current=null)}},[s]),l.useEffect(()=>{if(!s||!m.current)return;const e=eg(m.current),t=lw(e),n=e=>{v.current=e,!r&&a()&&"Tab"===e.key&&t===m.current&&e.shiftKey&&(u.current=!0,d.current&&d.current.focus())},o=()=>{const t=m.current;if(null===t)return;const n=lw(e);if(!e.hasFocus()||!a()||u.current)return void(u.current=!1);if(t.contains(n))return;if(r&&n!==c.current&&n!==d.current)return;if(n!==f.current)f.current=null;else if(null!==f.current)return;if(!h.current)return;let o=[];if(n!==c.current&&n!==d.current||(o=i(m.current)),o.length>0){const e=Boolean(v.current?.shiftKey&&"Tab"===v.current?.key),t=o[0],n=o[o.length-1];"string"!=typeof t&&"string"!=typeof n&&(e?n.focus():t.focus())}else t.focus()};e.addEventListener("focusin",o),e.addEventListener("keydown",n,!0);const l=setInterval(()=>{const t=lw(e);t&&"BODY"===t.tagName&&o()},50);return()=>{clearInterval(l),e.removeEventListener("focusin",o),e.removeEventListener("keydown",n,!0)}},[n,r,o,a,s,i]);const y=e=>{null===p.current&&(p.current=e.relatedTarget),h.current=!0};return Fp.jsxs(l.Fragment,{children:[Fp.jsx("div",{tabIndex:s?0:-1,onFocus:y,ref:c,"data-testid":"sentinelStart"}),l.cloneElement(t,{ref:g,onFocus:e=>{null===p.current&&(p.current=e.relatedTarget),h.current=!0,f.current=e.target;const n=t.props.onFocus;n&&n(e)}}),Fp.jsx("div",{tabIndex:s?0:-1,onFocus:y,ref:d,"data-testid":"sentinelEnd"})]})}const fw=()=>{},hw=new class{constructor(){this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&rw(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)}),t}(t);iw(t,e.mount,e.modalRef,r,!0);const o=aw(this.containers,e=>e.container===t);return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=aw(this.containers,t=>t.modals.includes(e)),r=this.containers[n];r.restore||(r.restore=sw(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=aw(this.containers,t=>t.modals.includes(e)),o=this.containers[r];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(n,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&rw(e.modalRef,t),iw(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&rw(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function mw(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:o=!1,onTransitionEnter:i,onTransitionExited:a,children:s,onClose:u,open:c,rootRef:d}=e,p=l.useRef({}),f=l.useRef(null),h=l.useRef(null),m=ig(h,d),[g,v]=l.useState(!c),y=function(e){return!!e&&e.props.hasOwnProperty("in")}(s);let b=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(b=!1);const w=()=>(p.current.modalRef=h.current,p.current.mount=f.current,p.current),x=()=>{hw.mount(w(),{disableScrollLock:r}),h.current&&(h.current.scrollTop=0)},k=og(()=>{const e=function(e){return"function"==typeof e?e():e}(t)||eg(f.current).body;hw.add(w(),e),h.current&&x()}),S=()=>hw.isTopModal(w()),E=og(e=>{f.current=e,e&&(c&&S()?x():h.current&&rw(h.current,b))}),C=l.useCallback(()=>{hw.remove(w(),b)},[b]);l.useEffect(()=>()=>{C()},[C]),l.useEffect(()=>{c?k():y&&o||C()},[c,C,y,o,k]);const O=e=>t=>{e.onKeyDown?.(t),"Escape"===t.key&&229!==t.which&&S()&&(n||(t.stopPropagation(),u&&u(t,"escapeKeyDown")))},_=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&u&&u(t,"backdropClick")};return{getRootProps:(t={})=>{const n=vg(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r={...n,...t};return{role:"presentation",...r,onKeyDown:O(r),ref:m}},getBackdropProps:(e={})=>{const t=e;return{"aria-hidden":!0,...t,onClick:_(t),open:c}},getTransitionProps:()=>({onEnter:Um(()=>{v(!1),i&&i()},s?.props.onEnter??fw),onExited:Um(()=>{v(!0),a&&a(),o&&C()},s?.props.onExited??fw)}),rootRef:m,portalRef:E,isTopModal:S,exited:g,hasTransition:y}}function gw(e){return fh("MuiModal",e)}hh("MuiModal",["root","hidden","backdrop"]);const vw=Wm("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(qm(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:"hidden"}}]}))),yw=Wm(jb,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),bw=l.forwardRef(function(e,t){const n=Gm({name:"MuiModal",props:e}),{BackdropComponent:r=yw,BackdropProps:o,classes:i,className:a,closeAfterTransition:s=!1,children:u,container:c,component:d,components:p={},componentsProps:f={},disableAutoFocus:h=!1,disableEnforceFocus:m=!1,disableEscapeKeyDown:g=!1,disablePortal:v=!1,disableRestoreFocus:y=!1,disableScrollLock:b=!1,hideBackdrop:w=!1,keepMounted:x=!1,onClose:k,onTransitionEnter:S,onTransitionExited:E,open:C,slotProps:O={},slots:_={},theme:T,...R}=n,P={...n,closeAfterTransition:s,disableAutoFocus:h,disableEnforceFocus:m,disableEscapeKeyDown:g,disablePortal:v,disableRestoreFocus:y,disableScrollLock:b,hideBackdrop:w,keepMounted:x},{getRootProps:A,getBackdropProps:L,getTransitionProps:N,portalRef:M,isTopModal:I,exited:F,hasTransition:$}=mw({...P,rootRef:t}),j={...P,exited:F},z=(e=>{const{open:t,exited:n,classes:r}=e;return Jh({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},gw,r)})(j),B={};if(void 0===u.props.tabIndex&&(B.tabIndex="-1"),$){const{onEnter:e,onExited:t}=N();B.onEnter=e,B.onExited=t}const D={slots:{root:p.Root,backdrop:p.Backdrop,..._},slotProps:{...f,...O}},[W,U]=wg("root",{ref:t,elementType:vw,externalForwardedProps:{...D,...R,component:d},getSlotProps:A,ownerState:j,className:Km(a,z?.root,!j.open&&j.exited&&z?.hidden)}),[V,K]=wg("backdrop",{ref:o?.ref,elementType:r,externalForwardedProps:D,shouldForwardComponentProp:!0,additionalProps:o,getSlotProps:e=>L({...e,onClick:t=>{e?.onClick&&e.onClick(t)}}),className:Km(o?.className,z?.backdrop),ownerState:j});return x||C||$&&!F?Fp.jsx(Ry,{ref:M,container:c,disablePortal:v,children:Fp.jsxs(W,{...U,children:[!w&&r?Fp.jsx(V,{...K}):null,Fp.jsx(pw,{disableEnforceFocus:m,disableAutoFocus:h,disableRestoreFocus:y,isEnabled:I,open:C,children:l.cloneElement(u,B)})]})}):null}),ww=hh("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),xw=Wm(sb,{shouldForwardProp:e=>Dm(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...ib(e,t),!n.disableUnderline&&t.underline]}})(qm(({theme:e})=>{const t="light"===e.palette.mode,n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${gb.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${gb.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${gb.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${gb.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${gb.disabled}, .${gb.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${gb.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(jg()).map(([t])=>({props:{disableUnderline:!1,color:t},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t]?.main}`}}})),{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:12}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:12}},{props:({ownerState:e})=>e.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel&&"small"===e.size,style:{paddingTop:8,paddingBottom:9}}]}})),kw=Wm(lb,{name:"MuiFilledInput",slot:"Input",overridesResolver:ab})(qm(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}},{props:({ownerState:e})=>e.hiddenLabel&&"small"===e.size,style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:e})=>e.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),Sw=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiFilledInput"}),{disableUnderline:r=!1,components:o={},componentsProps:i,fullWidth:a=!1,hiddenLabel:s,inputComponent:l="input",multiline:u=!1,slotProps:c,slots:d={},type:p="text",...f}=n,h={...n,disableUnderline:r,fullWidth:a,inputComponent:l,multiline:u,type:p},m=(e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:o,size:i,hiddenLabel:a,multiline:s}=e,l=Jh({root:["root",!n&&"underline",r&&"adornedStart",o&&"adornedEnd","small"===i&&`size${sf(i)}`,a&&"hiddenLabel",s&&"multiline"],input:["input"]},mb,t);return{...t,...l}})(n),g={root:{ownerState:h},input:{ownerState:h}},v=c??i?Xp(g,c??i):g,y=d.root??o.Root??xw,b=d.input??o.Input??kw;return Fp.jsx(cb,{slots:{root:y,input:b},slotProps:v,fullWidth:a,inputComponent:l,multiline:u,ref:t,type:p,...f,classes:m})});function Ew(e){return fh("MuiFormControl",e)}Sw.muiName="Input",hh("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const Cw=Wm("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`margin${sf(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),Ow=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiFormControl"}),{children:r,className:o,color:i="primary",component:a="div",disabled:s=!1,error:u=!1,focused:c,fullWidth:d=!1,hiddenLabel:p=!1,margin:f="none",required:h=!1,size:m="medium",variant:g="outlined",...v}=n,y={...n,color:i,component:a,disabled:s,error:u,fullWidth:d,hiddenLabel:p,margin:f,required:h,size:m,variant:g},b=(e=>{const{classes:t,margin:n,fullWidth:r}=e;return Jh({root:["root","none"!==n&&`margin${sf(n)}`,r&&"fullWidth"]},Ew,t)})(y),[w,x]=l.useState(()=>{let e=!1;return r&&l.Children.forEach(r,t=>{if(!Zh(t,["Input","Select"]))return;const n=Zh(t,["Select"])?t.props.input:t;n&&n.props.startAdornment&&(e=!0)}),e}),[k,S]=l.useState(()=>{let e=!1;return r&&l.Children.forEach(r,t=>{Zh(t,["Input","Select"])&&(tb(t.props,!0)||tb(t.props.inputProps,!0))&&(e=!0)}),e}),[E,C]=l.useState(!1);s&&E&&C(!1);const O=void 0===c||s?E:c;let _;l.useRef(!1);const T=l.useCallback(()=>{S(!0)},[]),R=l.useCallback(()=>{S(!1)},[]),P=l.useMemo(()=>({adornedStart:w,setAdornedStart:x,color:i,disabled:s,error:u,filled:k,focused:O,fullWidth:d,hiddenLabel:p,size:m,onBlur:()=>{C(!1)},onFocus:()=>{C(!0)},onEmpty:R,onFilled:T,registerEffect:_,required:h,variant:g}),[w,i,s,u,k,O,d,p,_,R,T,h,m,g]);return Fp.jsx(Jy.Provider,{value:P,children:Fp.jsx(Cw,{as:a,ownerState:y,className:Km(b.root,o),ref:t,...v,children:r})})});function _w(e){return fh("MuiFormHelperText",e)}const Tw=hh("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var Rw;const Pw=Wm("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${sf(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(qm(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${Tw.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Tw.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:e})=>e.contained,style:{marginLeft:14,marginRight:14}}]}))),Aw=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiFormHelperText"}),{children:r,className:o,component:i="p",disabled:a,error:s,filled:l,focused:u,margin:c,required:d,variant:p,...f}=n,h=Qy({props:n,muiFormControl:Zy(),states:["variant","size","disabled","error","filled","focused","required"]}),m={...n,component:i,contained:"filled"===h.variant||"outlined"===h.variant,variant:h.variant,size:h.size,disabled:h.disabled,error:h.error,filled:h.filled,focused:h.focused,required:h.required};delete m.ownerState;const g=(e=>{const{classes:t,contained:n,size:r,disabled:o,error:i,filled:a,focused:s,required:l}=e;return Jh({root:["root",o&&"disabled",i&&"error",r&&`size${sf(r)}`,n&&"contained",s&&"focused",a&&"filled",l&&"required"]},_w,t)})(m);return Fp.jsx(Pw,{as:i,className:Km(g.root,o),ref:t,...f,ownerState:m,children:" "===r?Rw||(Rw=Fp.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):r})});function Lw(e){return fh("MuiFormLabel",e)}const Nw=hh("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),Mw=Wm("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"secondary"===n.color&&t.colorSecondary,n.filled&&t.filled]}})(qm(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(jg()).map(([t])=>({props:{color:t},style:{[`&.${Nw.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${Nw.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Nw.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),Iw=Wm("span",{name:"MuiFormLabel",slot:"Asterisk"})(qm(({theme:e})=>({[`&.${Nw.error}`]:{color:(e.vars||e).palette.error.main}}))),Fw=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiFormLabel"}),{children:r,className:o,color:i,component:a="label",disabled:s,error:l,filled:u,focused:c,required:d,...p}=n,f=Qy({props:n,muiFormControl:Zy(),states:["color","required","focused","disabled","error","filled"]}),h={...n,color:f.color||"primary",component:a,disabled:f.disabled,error:f.error,filled:f.filled,focused:f.focused,required:f.required},m=(e=>{const{classes:t,color:n,focused:r,disabled:o,error:i,filled:a,required:s}=e;return Jh({root:["root",`color${sf(n)}`,o&&"disabled",i&&"error",a&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",i&&"error"]},Lw,t)})(h);return Fp.jsxs(Mw,{as:a,ownerState:h,className:Km(m.root,o),ref:t,...p,children:[r,f.required&&Fp.jsxs(Iw,{ownerState:h,"aria-hidden":!0,className:m.asterisk,children:[" ","*"]})]})});function $w(e){return`scale(${e}, ${e**2})`}const jw={entering:{opacity:1,transform:$w(1)},entered:{opacity:1,transform:"none"}},zw="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Bw=l.forwardRef(function(e,t){const{addEndListener:n,appear:r=!0,children:o,easing:i,in:a,onEnter:s,onEntered:u,onEntering:c,onExit:d,onExited:p,onExiting:f,style:h,timeout:m="auto",TransitionComponent:g=Ao,...v}=e,y=dg(),b=l.useRef(),w=zm(),x=l.useRef(null),k=ig(x,Ty(o),t),S=e=>t=>{if(e){const n=x.current;void 0===t?e(n):e(n,t)}},E=S(c),C=S((e,t)=>{pg(e);const{duration:n,delay:r,easing:o}=fg({style:h,timeout:m,easing:i},{mode:"enter"});let a;"auto"===m?(a=w.transitions.getAutoHeightDuration(e.clientHeight),b.current=a):a=n,e.style.transition=[w.transitions.create("opacity",{duration:a,delay:r}),w.transitions.create("transform",{duration:zw?a:.666*a,delay:r,easing:o})].join(","),s&&s(e,t)}),O=S(u),_=S(f),T=S(e=>{const{duration:t,delay:n,easing:r}=fg({style:h,timeout:m,easing:i},{mode:"exit"});let o;"auto"===m?(o=w.transitions.getAutoHeightDuration(e.clientHeight),b.current=o):o=t,e.style.transition=[w.transitions.create("opacity",{duration:o,delay:n}),w.transitions.create("transform",{duration:zw?o:.666*o,delay:zw?n:n||.333*o,easing:r})].join(","),e.style.opacity=0,e.style.transform=$w(.75),d&&d(e)}),R=S(p);return Fp.jsx(g,{appear:r,in:a,nodeRef:x,onEnter:C,onEntered:O,onEntering:E,onExit:T,onExited:R,onExiting:_,addEndListener:e=>{"auto"===m&&y.start(b.current||0,e),n&&n(x.current,e)},timeout:"auto"===m?null:m,...v,children:(e,{ownerState:t,...n})=>l.cloneElement(o,{style:{opacity:0,transform:$w(.75),visibility:"exited"!==e||a?void 0:"hidden",...jw[e],...h,...o.props.style},ref:k,...n})})});Bw&&(Bw.muiSupportAuto=!0);const Dw=Wm(sb,{shouldForwardProp:e=>Dm(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...ib(e,t),!n.disableUnderline&&t.underline]}})(qm(({theme:e})=>{let t="light"===e.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(t=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:"relative",variants:[{props:({ownerState:e})=>e.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${pb.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${pb.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${pb.disabled}, .${pb.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${pb.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(jg()).map(([t])=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}}))]}})),Ww=Wm(lb,{name:"MuiInput",slot:"Input",overridesResolver:ab})({}),Uw=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiInput"}),{disableUnderline:r=!1,components:o={},componentsProps:i,fullWidth:a=!1,inputComponent:s="input",multiline:l=!1,slotProps:u,slots:c={},type:d="text",...p}=n,f=(e=>{const{classes:t,disableUnderline:n}=e,r=Jh({root:["root",!n&&"underline"],input:["input"]},db,t);return{...t,...r}})(n),h={root:{ownerState:{disableUnderline:r}}},m=u??i?Xp(u??i,h):h,g=c.root??o.Root??Dw,v=c.input??o.Input??Ww;return Fp.jsx(cb,{slots:{root:g,input:v},slotProps:m,fullWidth:a,inputComponent:s,multiline:l,ref:t,type:d,...p,classes:f})});function Vw(e){return fh("MuiInputLabel",e)}Uw.muiName="Input",hh("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const Kw=Wm(Fw,{shouldForwardProp:e=>Dm(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Nw.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,"small"===n.size&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(qm(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:e})=>e.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:e})=>e.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:e})=>!e.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:e,ownerState:t})=>"filled"===e&&t.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:e,ownerState:t,size:n})=>"filled"===e&&t.shrink&&"small"===n,style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:e,ownerState:t})=>"outlined"===e&&t.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),Hw=l.forwardRef(function(e,t){const n=Gm({name:"MuiInputLabel",props:e}),{disableAnimation:r=!1,margin:o,shrink:i,variant:a,className:s,...l}=n,u=Zy();let c=i;void 0===c&&u&&(c=u.filled||u.focused||u.adornedStart);const d=Qy({props:n,muiFormControl:u,states:["size","variant","required","focused"]}),p={...n,disableAnimation:r,formControl:u,shrink:c,size:d.size,variant:d.variant,required:d.required,focused:d.focused},f=(e=>{const{classes:t,formControl:n,size:r,shrink:o,disableAnimation:i,variant:a,required:s}=e,l=Jh({root:["root",n&&"formControl",!i&&"animated",o&&"shrink",r&&"medium"!==r&&`size${sf(r)}`,a],asterisk:[s&&"asterisk"]},Vw,t);return{...t,...l}})(p);return Fp.jsx(Kw,{"data-shrink":c,ref:t,className:Km(f.root,s),...l,ownerState:p,classes:f})}),qw=l.createContext({});function Gw(e){return fh("MuiList",e)}hh("MuiList",["root","padding","dense","subheader"]);const Yw=Wm("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),Xw=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiList"}),{children:r,className:o,component:i="ul",dense:a=!1,disablePadding:s=!1,subheader:u,...c}=n,d=l.useMemo(()=>({dense:a}),[a]),p={...n,component:i,dense:a,disablePadding:s},f=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return Jh({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},Gw,t)})(p);return Fp.jsx(qw.Provider,{value:d,children:Fp.jsxs(Yw,{as:i,className:Km(f.root,o),ref:t,ownerState:p,...c,children:[u,r]})})}),Qw=hh("MuiListItemIcon",["root","alignItemsFlexStart"]),Jw=hh("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function Zw(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function ex(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function tx(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),n=n.trim().toLowerCase(),0!==n.length&&(t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join("")))}function nx(e,t,n,r,o,i){let a=!1,s=o(e,t,!!t&&n);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const t=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&tx(s,i)&&!t)return s.focus(),!0;s=o(e,s,n)}return!1}const rx=l.forwardRef(function(e,t){const{actions:n,autoFocus:r=!1,autoFocusItem:o=!1,children:i,className:a,disabledItemsFocusable:s=!1,disableListWrap:u=!1,onKeyDown:c,variant:d="selectedMenu",...p}=e,f=l.useRef(null),h=l.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});_h(()=>{r&&f.current.focus()},[r]),l.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const n=!f.current.style.width;if(e.clientHeight<f.current.clientHeight&&n){const n=`${nw(tg(e))}px`;f.current.style["rtl"===t?"paddingLeft":"paddingRight"]=n,f.current.style.width=`calc(100% + ${n})`}return f.current}}),[]);const m=ig(f,t);let g=-1;l.Children.forEach(i,(e,t)=>{l.isValidElement(e)?(e.props.disabled||("selectedMenu"===d&&e.props.selected||-1===g)&&(g=t),g===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(g+=1,g>=i.length&&(g=-1))):g===t&&(g+=1,g>=i.length&&(g=-1))});const v=l.Children.map(i,(e,t)=>{if(t===g){const t={};return o&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===d&&(t.tabIndex=0),l.cloneElement(e,t)}return e});return Fp.jsx(Xw,{role:"menu",ref:m,className:a,onKeyDown:e=>{const t=f.current,n=e.key;if(e.ctrlKey||e.metaKey||e.altKey)return void(c&&c(e));const r=lw(eg(t));if("ArrowDown"===n)e.preventDefault(),nx(t,r,u,s,Zw);else if("ArrowUp"===n)e.preventDefault(),nx(t,r,u,s,ex);else if("Home"===n)e.preventDefault(),nx(t,null,u,s,Zw);else if("End"===n)e.preventDefault(),nx(t,null,u,s,ex);else if(1===n.length){const o=h.current,i=n.toLowerCase(),a=performance.now();o.keys.length>0&&(a-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&i!==o.keys[0]&&(o.repeating=!1)),o.lastTime=a,o.keys.push(i);const l=r&&!o.repeating&&tx(r,o);o.previousKeyMatched&&(l||nx(t,r,!1,s,Zw,o))?e.preventDefault():o.previousKeyMatched=!1}c&&c(e)},tabIndex:r?0:-1,...p,children:v})});function ox(e){return fh("MuiPopover",e)}function ix(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function ax(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function sx(e){return[e.horizontal,e.vertical].map(e=>"number"==typeof e?`${e}px`:e).join(" ")}function lx(e){return"function"==typeof e?e():e}hh("MuiPopover",["root","paper"]);const ux=Wm(bw,{name:"MuiPopover",slot:"Root"})({}),cx=Wm(Sg,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),dx=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiPopover"}),{action:r,anchorEl:o,anchorOrigin:i={vertical:"top",horizontal:"left"},anchorPosition:a,anchorReference:s="anchorEl",children:u,className:c,container:d,elevation:p=8,marginThreshold:f=16,open:h,PaperProps:m={},slots:g={},slotProps:v={},transformOrigin:y={vertical:"top",horizontal:"left"},TransitionComponent:b,transitionDuration:w="auto",TransitionProps:x={},disableScrollLock:k=!1,...S}=n,E=l.useRef(),C={...n,anchorOrigin:i,anchorReference:s,elevation:p,marginThreshold:f,transformOrigin:y,TransitionComponent:b,transitionDuration:w,TransitionProps:x},O=(e=>{const{classes:t}=e;return Jh({root:["root"],paper:["paper"]},ox,t)})(C),_=l.useCallback(()=>{if("anchorPosition"===s)return a;const e=lx(o),t=(e&&1===e.nodeType?e:eg(E.current).body).getBoundingClientRect();return{top:t.top+ix(t,i.vertical),left:t.left+ax(t,i.horizontal)}},[o,i.horizontal,i.vertical,a,s]),T=l.useCallback(e=>({vertical:ix(e,y.vertical),horizontal:ax(e,y.horizontal)}),[y.horizontal,y.vertical]),R=l.useCallback(e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=T(t);if("none"===s)return{top:null,left:null,transformOrigin:sx(n)};const r=_();let i=r.top-n.vertical,a=r.left-n.horizontal;const l=i+t.height,u=a+t.width,c=tg(lx(o)),d=c.innerHeight-f,p=c.innerWidth-f;if(null!==f&&i<f){const e=i-f;i-=e,n.vertical+=e}else if(null!==f&&l>d){const e=l-d;i-=e,n.vertical+=e}if(null!==f&&a<f){const e=a-f;a-=e,n.horizontal+=e}else if(u>p){const e=u-p;a-=e,n.horizontal+=e}return{top:`${Math.round(i)}px`,left:`${Math.round(a)}px`,transformOrigin:sx(n)}},[o,s,_,T,f]),[P,A]=l.useState(h),L=l.useCallback(()=>{const e=E.current;if(!e)return;const t=R(e);null!==t.top&&e.style.setProperty("top",t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,A(!0)},[R]);l.useEffect(()=>(k&&window.addEventListener("scroll",L),()=>window.removeEventListener("scroll",L)),[o,k,L]);l.useEffect(()=>{h&&L()}),l.useImperativeHandle(r,()=>h?{updatePosition:()=>{L()}}:null,[h,L]),l.useEffect(()=>{if(!h)return;const e=Zm(()=>{L()}),t=tg(lx(o));return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[o,h,L]);let N=w;const M={slots:{transition:b,...g},slotProps:{transition:x,paper:m,...v}},[I,F]=wg("transition",{elementType:Bw,externalForwardedProps:M,ownerState:C,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),L()},onExited:t=>{e.onExited?.(t),A(!1)}}),additionalProps:{appear:!0,in:h}});"auto"!==w||I.muiSupportAuto||(N=void 0);const $=d||(o?eg(lx(o)).body:void 0),[j,{slots:z,slotProps:B,...D}]=wg("root",{ref:t,elementType:ux,externalForwardedProps:{...M,...S},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:g.backdrop},slotProps:{backdrop:ag("function"==typeof v.backdrop?v.backdrop(C):v.backdrop,{invisible:!0})},container:$,open:h},ownerState:C,className:Km(O.root,c)}),[W,U]=wg("paper",{ref:E,className:O.paper,elementType:cx,externalForwardedProps:M,shouldForwardComponentProp:!0,additionalProps:{elevation:p,style:P?void 0:{opacity:0}},ownerState:C});return Fp.jsx(j,{...D,...!hg(j)&&{slots:z,slotProps:B,disableScrollLock:k},children:Fp.jsx(I,{...F,timeout:N,children:Fp.jsx(W,{...U,children:u})})})});function px(e){return fh("MuiMenu",e)}hh("MuiMenu",["root","paper","list"]);const fx={vertical:"top",horizontal:"right"},hx={vertical:"top",horizontal:"left"},mx=Wm(dx,{shouldForwardProp:e=>Dm(e)||"classes"===e,name:"MuiMenu",slot:"Root"})({}),gx=Wm(cx,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),vx=Wm(rx,{name:"MuiMenu",slot:"List"})({outline:0}),yx=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiMenu"}),{autoFocus:r=!0,children:o,className:i,disableAutoFocusItem:a=!1,MenuListProps:s={},onClose:u,open:c,PaperProps:d={},PopoverClasses:p,transitionDuration:f="auto",TransitionProps:{onEntering:h,...m}={},variant:g="selectedMenu",slots:v={},slotProps:y={},...b}=n,w=Wh(),x={...n,autoFocus:r,disableAutoFocusItem:a,MenuListProps:s,onEntering:h,PaperProps:d,transitionDuration:f,TransitionProps:m,variant:g},k=(e=>{const{classes:t}=e;return Jh({root:["root"],paper:["paper"],list:["list"]},px,t)})(x),S=r&&!a&&c,E=l.useRef(null);let C=-1;l.Children.map(o,(e,t)=>{l.isValidElement(e)&&(e.props.disabled||("selectedMenu"===g&&e.props.selected||-1===C)&&(C=t))});const O={slots:v,slotProps:{list:s,transition:m,paper:d,...y}},_=_y({elementType:v.root,externalSlotProps:y.root,ownerState:x,className:[k.root,i]}),[T,R]=wg("paper",{className:k.paper,elementType:gx,externalForwardedProps:O,shouldForwardComponentProp:!0,ownerState:x}),[P,A]=wg("list",{className:Km(k.list,s.className),elementType:vx,shouldForwardComponentProp:!0,externalForwardedProps:O,getSlotProps:e=>({...e,onKeyDown:t=>{(e=>{"Tab"===e.key&&(e.preventDefault(),u&&u(e,"tabKeyDown"))})(t),e.onKeyDown?.(t)}}),ownerState:x}),L="function"==typeof O.slotProps.transition?O.slotProps.transition(x):O.slotProps.transition;return Fp.jsx(mx,{onClose:u,anchorOrigin:{vertical:"bottom",horizontal:w?"right":"left"},transformOrigin:w?fx:hx,slots:{root:v.root,paper:T,backdrop:v.backdrop,...v.transition&&{transition:v.transition}},slotProps:{root:_,paper:R,backdrop:"function"==typeof y.backdrop?y.backdrop(x):y.backdrop,transition:{...L,onEntering:(...e)=>{((e,t)=>{E.current&&E.current.adjustStyleForScrollbar(e,{direction:w?"rtl":"ltr"}),h&&h(e,t)})(...e),L?.onEntering?.(...e)}}},open:c,ref:t,transitionDuration:f,ownerState:x,...b,classes:p,children:Fp.jsx(P,{actions:E,autoFocus:r&&(-1===C||a),autoFocusItem:S,variant:g,...A,children:o})})});function bx(e){return fh("MuiMenuItem",e)}const wx=hh("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),xx=Wm(Fg,{shouldForwardProp:e=>Dm(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})(qm(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${wx.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${wx.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${wx.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${wx.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${wx.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${ww.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${ww.inset}`]:{marginLeft:52},[`& .${Jw.root}`]:{marginTop:0,marginBottom:0},[`& .${Jw.inset}`]:{paddingLeft:36},[`& .${Qw.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${Qw.root} svg`]:{fontSize:"1.25rem"}}}]}))),kx=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:o="li",dense:i=!1,divider:a=!1,disableGutters:s=!1,focusVisibleClassName:u,role:c="menuitem",tabIndex:d,className:p,...f}=n,h=l.useContext(qw),m=l.useMemo(()=>({dense:i||h.dense||!1,disableGutters:s}),[h.dense,i,s]),g=l.useRef(null);_h(()=>{r&&g.current&&g.current.focus()},[r]);const v={...n,dense:m.dense,divider:a,disableGutters:s},y=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e,s=Jh({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},bx,a);return{...a,...s}})(n),b=ig(g,t);let w;return n.disabled||(w=void 0!==d?d:-1),Fp.jsx(qw.Provider,{value:m,children:Fp.jsx(xx,{ref:b,role:c,tabIndex:w,component:o,focusVisibleClassName:Km(y.focusVisible,u),className:Km(y.root,p),...f,ownerState:v,classes:y})})});function Sx(e){return fh("MuiNativeSelect",e)}const Ex=hh("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Cx=Wm("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${Ex.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:e})=>"filled"!==e.variant&&"outlined"!==e.variant,style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),Ox=Wm(Cx,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Dm,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Ex.multiple}`]:t.multiple}]}})({}),_x=Wm("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${Ex.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),Tx=Wm(_x,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${sf(n.variant)}`],n.open&&t.iconOpen]}})({}),Rx=l.forwardRef(function(e,t){const{className:n,disabled:r,error:o,IconComponent:i,inputRef:a,variant:s="standard",...u}=e,c={...e,disabled:r,variant:s,error:o},d=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e;return Jh({select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${sf(n)}`,i&&"iconOpen",r&&"disabled"]},Sx,t)})(c);return Fp.jsxs(l.Fragment,{children:[Fp.jsx(Ox,{ownerState:c,className:Km(d.select,n),disabled:r,ref:a||t,...u}),e.multiple?null:Fp.jsx(Tx,{as:i,ownerState:c,className:d.icon})]})});var Px;const Ax=Wm("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:Dm})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),Lx=Wm("legend",{name:"MuiNotchedOutlined",shouldForwardProp:Dm})(qm(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:e})=>!e.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:e})=>e.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:e})=>e.withLabel&&e.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));const Nx=Wm(sb,{shouldForwardProp:e=>Dm(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:ib})(qm(({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${hb.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${hb.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${hb.focused} .${hb.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(jg()).map(([t])=>({props:{color:t},style:{[`&.${hb.focused} .${hb.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${hb.error} .${hb.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${hb.disabled} .${hb.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:14}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:14}},{props:({ownerState:e})=>e.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{padding:"8.5px 14px"}}]}})),Mx=Wm(function(e){const{children:t,classes:n,className:r,label:o,notched:i,...a}=e,s=null!=o&&""!==o,l={...e,notched:i,withLabel:s};return Fp.jsx(Ax,{"aria-hidden":!0,className:r,ownerState:l,...a,children:Fp.jsx(Lx,{ownerState:l,children:s?Fp.jsx("span",{children:o}):Px||(Px=Fp.jsx("span",{className:"notranslate","aria-hidden":!0,children:""}))})})},{name:"MuiOutlinedInput",slot:"NotchedOutline"})(qm(({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),Ix=Wm(lb,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:ab})(qm(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:e})=>e.multiline,style:{padding:0}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}}]}))),Fx=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiOutlinedInput"}),{components:r={},fullWidth:o=!1,inputComponent:i="input",label:a,multiline:s=!1,notched:u,slots:c={},slotProps:d={},type:p="text",...f}=n,h=(e=>{const{classes:t}=e,n=Jh({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},fb,t);return{...t,...n}})(n),m=Zy(),g=Qy({props:n,muiFormControl:m,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),v={...n,color:g.color||"primary",disabled:g.disabled,error:g.error,focused:g.focused,formControl:m,fullWidth:o,hiddenLabel:g.hiddenLabel,multiline:s,size:g.size,type:p},y=c.root??r.Root??Nx,b=c.input??r.Input??Ix,[w,x]=wg("notchedOutline",{elementType:Mx,className:h.notchedOutline,shouldForwardComponentProp:!0,ownerState:v,externalForwardedProps:{slots:c,slotProps:d},additionalProps:{label:null!=a&&""!==a&&g.required?Fp.jsxs(l.Fragment,{children:[a," ","*"]}):a}});return Fp.jsx(cb,{slots:{root:y,input:b},slotProps:d,renderSuffix:e=>Fp.jsx(w,{...x,notched:void 0!==u?u:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:o,inputComponent:i,multiline:s,ref:t,type:p,...f,classes:{...h,notchedOutline:null}})});function $x(e){return fh("MuiSelect",e)}Fx.muiName="Input";const jx=hh("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var zx;const Bx=Wm(Cx,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${jx.select}`]:t.select},{[`&.${jx.select}`]:t[n.variant]},{[`&.${jx.error}`]:t.error},{[`&.${jx.multiple}`]:t.multiple}]}})({[`&.${jx.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Dx=Wm(_x,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${sf(n.variant)}`],n.open&&t.iconOpen]}})({}),Wx=Wm("input",{shouldForwardProp:e=>Bm(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function Ux(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}function Vx(e){return null==e||"string"==typeof e&&!e.trim()}const Kx=l.forwardRef(function(e,t){const{"aria-describedby":n,"aria-label":r,autoFocus:o,autoWidth:i,children:a,className:s,defaultOpen:u,defaultValue:c,disabled:d,displayEmpty:p,error:f=!1,IconComponent:h,inputRef:m,labelId:g,MenuProps:v={},multiple:y,name:b,onBlur:w,onChange:x,onClose:k,onFocus:S,onKeyDown:E,onMouseDown:C,onOpen:O,open:_,readOnly:T,renderValue:R,required:P,SelectDisplayProps:A={},tabIndex:L,type:N,value:M,variant:I="standard",...F}=e,[$,j]=rg({controlled:M,default:c,name:"Select"}),[z,B]=rg({controlled:_,default:u,name:"Select"}),D=l.useRef(null),W=l.useRef(null),[U,V]=l.useState(null),{current:K}=l.useRef(null!=_),[H,q]=l.useState(),G=ig(t,m),Y=l.useCallback(e=>{W.current=e,e&&V(e)},[]),X=U?.parentNode;l.useImperativeHandle(G,()=>({focus:()=>{W.current.focus()},node:D.current,value:$}),[$]),l.useEffect(()=>{u&&z&&U&&!K&&(q(i?null:X.clientWidth),W.current.focus())},[U,i]),l.useEffect(()=>{o&&W.current.focus()},[o]),l.useEffect(()=>{if(!g)return;const e=eg(W.current).getElementById(g);if(e){const t=()=>{getSelection().isCollapsed&&W.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}},[g]);const Q=(e,t)=>{e?O&&O(t):k&&k(t),K||(q(i?null:X.clientWidth),B(e))},J=l.Children.toArray(a),Z=e=>t=>{let n;if(t.currentTarget.hasAttribute("tabindex")){if(y){n=Array.isArray($)?$.slice():[];const t=$.indexOf(e.props.value);-1===t?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),$!==n&&(j(n),x)){const r=t.nativeEvent||t,o=new r.constructor(r.type,r);Object.defineProperty(o,"target",{writable:!0,value:{value:n,name:b}}),x(o,e)}y||Q(!1,t)}},ee=null!==U&&z;let te,ne;delete F["aria-invalid"];const re=[];let oe=!1;(tb({value:$})||p)&&(R?te=R($):oe=!0);const ie=J.map(e=>{if(!l.isValidElement(e))return null;let t;if(y){if(!Array.isArray($))throw new Error(Uc(2));t=$.some(t=>Ux(t,e.props.value)),t&&oe&&re.push(e.props.children)}else t=Ux($,e.props.value),t&&oe&&(ne=e.props.children);return l.cloneElement(e,{"aria-selected":t?"true":"false",onClick:Z(e),onKeyUp:t=>{" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})});oe&&(te=y?0===re.length?null:re.reduce((e,t,n)=>(e.push(t),n<re.length-1&&e.push(", "),e),[]):ne);let ae,se=H;!i&&K&&U&&(se=X.clientWidth),ae=void 0!==L?L:d?null:0;const le=A.id||(b?`mui-component-select-${b}`:void 0),ue={...e,variant:I,value:$,open:ee,error:f},ce=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e;return Jh({select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${sf(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]},$x,t)})(ue),de={...v.PaperProps,..."function"==typeof v.slotProps?.paper?v.slotProps.paper(ue):v.slotProps?.paper},pe={...v.MenuListProps,..."function"==typeof v.slotProps?.list?v.slotProps.list(ue):v.slotProps?.list},fe=qh();return Fp.jsxs(l.Fragment,{children:[Fp.jsx(Bx,{as:"div",ref:Y,tabIndex:ae,role:"combobox","aria-controls":ee?fe:void 0,"aria-disabled":d?"true":void 0,"aria-expanded":ee?"true":"false","aria-haspopup":"listbox","aria-label":r,"aria-labelledby":[g,le].filter(Boolean).join(" ")||void 0,"aria-describedby":n,"aria-required":P?"true":void 0,"aria-invalid":f?"true":void 0,onKeyDown:e=>{if(!T){[" ","ArrowUp","ArrowDown","Enter"].includes(e.key)&&(e.preventDefault(),Q(!0,e)),E?.(e)}},onMouseDown:d||T?null:e=>{C?.(e),0===e.button&&(e.preventDefault(),W.current.focus(),Q(!0,e))},onBlur:e=>{!ee&&w&&(Object.defineProperty(e,"target",{writable:!0,value:{value:$,name:b}}),w(e))},onFocus:S,...A,ownerState:ue,className:Km(A.className,ce.select,s),id:le,children:Vx(te)?zx||(zx=Fp.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):te}),Fp.jsx(Wx,{"aria-invalid":f,value:Array.isArray($)?$.join(","):$,name:b,ref:D,"aria-hidden":!0,onChange:e=>{const t=J.find(t=>t.props.value===e.target.value);void 0!==t&&(j(t.props.value),x&&x(e,t))},tabIndex:-1,disabled:d,className:ce.nativeInput,autoFocus:o,required:P,...F,ownerState:ue}),Fp.jsx(Dx,{as:h,className:ce.icon,ownerState:ue}),Fp.jsx(yx,{id:`menu-${b||""}`,anchorEl:X,open:ee,onClose:e=>{Q(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...v,slotProps:{...v.slotProps,list:{"aria-labelledby":g,role:"listbox","aria-multiselectable":y?"true":void 0,disableListWrap:!0,id:fe,...pe},paper:{...de,style:{minWidth:se,...null!=de?de.style:null}}},children:ie})]})}),Hx={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>Dm(e)&&"variant"!==e},qx=Wm(Uw,Hx)(""),Gx=Wm(Fx,Hx)(""),Yx=Wm(Sw,Hx)(""),Xx=l.forwardRef(function(e,t){const n=Gm({name:"MuiSelect",props:e}),{autoWidth:r=!1,children:o,classes:i={},className:a,defaultOpen:s=!1,displayEmpty:u=!1,IconComponent:c=vb,id:d,input:p,inputProps:f,label:h,labelId:m,MenuProps:g,multiple:v=!1,native:y=!1,onClose:b,onOpen:w,open:x,renderValue:k,SelectDisplayProps:S,variant:E="outlined",...C}=n,O=y?Rx:Kx,_=Qy({props:n,muiFormControl:Zy(),states:["variant","error"]}),T=_.variant||E,R={...n,variant:T,classes:i},P=(e=>{const{classes:t}=e,n=Jh({root:["root"]},$x,t);return{...t,...n}})(R),{root:A,...L}=P,N=p||{standard:Fp.jsx(qx,{ownerState:R}),outlined:Fp.jsx(Gx,{label:h,ownerState:R}),filled:Fp.jsx(Yx,{ownerState:R})}[T],M=ig(t,Ty(N));return Fp.jsx(l.Fragment,{children:l.cloneElement(N,{inputComponent:O,inputProps:{children:o,error:_.error,IconComponent:c,variant:T,type:void 0,multiple:v,...y?{id:d}:{autoWidth:r,defaultOpen:s,displayEmpty:u,labelId:m,MenuProps:g,onClose:b,onOpen:w,open:x,renderValue:k,SelectDisplayProps:{id:d,...S}},...f,classes:f?Xp(L,f.classes):L,...p?p.props.inputProps:{}},...(v&&y||u)&&"outlined"===T?{notched:!0}:{},ref:M,className:Km(N.props.className,a,P.root),...!p&&{variant:T},...C})})});function Qx(e){return fh("MuiTextField",e)}Xx.muiName="Select",hh("MuiTextField",["root"]);const Jx={standard:Uw,filled:Sw,outlined:Fx},Zx=Wm(Ow,{name:"MuiTextField",slot:"Root"})({}),ek=l.forwardRef(function(e,t){const n=Gm({props:e,name:"MuiTextField"}),{autoComplete:r,autoFocus:o=!1,children:i,className:a,color:s="primary",defaultValue:l,disabled:u=!1,error:c=!1,FormHelperTextProps:d,fullWidth:p=!1,helperText:f,id:h,InputLabelProps:m,inputProps:g,InputProps:v,inputRef:y,label:b,maxRows:w,minRows:x,multiline:k=!1,name:S,onBlur:E,onChange:C,onFocus:O,placeholder:_,required:T=!1,rows:R,select:P=!1,SelectProps:A,slots:L={},slotProps:N={},type:M,value:I,variant:F="outlined",...$}=n,j={...n,autoFocus:o,color:s,disabled:u,error:c,fullWidth:p,multiline:k,required:T,select:P,variant:F},z=(e=>{const{classes:t}=e;return Jh({root:["root"]},Qx,t)})(j),B=qh(h),D=f&&B?`${B}-helper-text`:void 0,W=b&&B?`${B}-label`:void 0,U=Jx[F],V={slots:L,slotProps:{input:v,inputLabel:m,htmlInput:g,formHelperText:d,select:A,...N}},K={},H=V.slotProps.inputLabel;"outlined"===F&&(H&&void 0!==H.shrink&&(K.notched=H.shrink),K.label=b),P&&(A&&A.native||(K.id=void 0),K["aria-describedby"]=void 0);const[q,G]=wg("root",{elementType:Zx,shouldForwardComponentProp:!0,externalForwardedProps:{...V,...$},ownerState:j,className:Km(z.root,a),ref:t,additionalProps:{disabled:u,error:c,fullWidth:p,required:T,color:s,variant:F}}),[Y,X]=wg("input",{elementType:U,externalForwardedProps:V,additionalProps:K,ownerState:j}),[Q,J]=wg("inputLabel",{elementType:Hw,externalForwardedProps:V,ownerState:j}),[Z,ee]=wg("htmlInput",{elementType:"input",externalForwardedProps:V,ownerState:j}),[te,ne]=wg("formHelperText",{elementType:Aw,externalForwardedProps:V,ownerState:j}),[re,oe]=wg("select",{elementType:Xx,externalForwardedProps:V,ownerState:j}),ie=Fp.jsx(Y,{"aria-describedby":D,autoComplete:r,autoFocus:o,defaultValue:l,fullWidth:p,multiline:k,name:S,rows:R,maxRows:w,minRows:x,type:M,value:I,id:B,inputRef:y,onBlur:E,onChange:C,onFocus:O,placeholder:_,inputProps:ee,slots:{input:L.htmlInput?Z:void 0},...X});return Fp.jsxs(q,{...G,children:[null!=b&&""!==b&&Fp.jsx(Q,{htmlFor:B,id:W,...J,children:b}),P?Fp.jsx(re,{"aria-describedby":D,id:B,labelId:W,value:I,input:ie,...oe,children:i}):ie,f&&Fp.jsx(te,{id:D,...ne,children:f})]})});var tk=Jm(Fp.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"})),nk=Jm(Fp.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2m-9 14-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}));const rk=l.createElement(tk,{fontSize:"small"}),ok=l.createElement(nk,{fontSize:"small"});function ik({items:e,selectedKeys:t,defaultSelectedKeys:n,onChange:r,inputValue:o,defaultInputValue:i,onInputChange:a,debounceMs:s=300,label:u,placeholder:c,loading:d,disabled:p,size:f="small",error:h,helperText:m,limitTags:g=3,disableClearable:v,id:y,textFieldProps:b}){const w=l.useMemo(()=>Array.isArray(e)?e:[],[e]),x=Array.isArray(t),[k,S]=l.useState(Array.isArray(n)?n:[]),E=x?t:k,C=l.useMemo(()=>{const e=new Map;for(const t of w)e.set(t&&t.key,t);return e},[w]),O=l.useMemo(()=>(Array.isArray(E)?E:[]).map(e=>C.get(e)).filter(Boolean),[E,C]),_="string"==typeof o,[T,R]=l.useState("string"==typeof i?i:""),P=_?o:T,A=function(e,t=300){const n=l.useRef(e),r=l.useRef(null);return n.current=e,l.useEffect(()=>()=>{r.current&&window.clearTimeout(r.current)},[]),l.useCallback((...e)=>{n.current&&(r.current&&window.clearTimeout(r.current),r.current=window.setTimeout(()=>{n.current&&n.current(...e)},t))},[t])}(e=>{a&&a(e)},s),L=O;return l.createElement(Ow,{fullWidth:!0,error:h,disabled:p},l.createElement(Nb,{openOnFocus:!0,forcePopupIcon:!0,id:y,multiple:!0,disableCloseOnSelect:!0,options:w,value:L,inputValue:P,getOptionLabel:e=>e&&"object"==typeof e?e.value??"":"",isOptionEqualToValue:(e,t)=>e&&t&&e.key===t.key,loading:d,limitTags:g,disableClearable:v,onChange:(e,t)=>{const n=Array.isArray(t)?t.map(e=>e&&e.key):[];x||S(n),r&&r(n,Array.isArray(t)?t:[])},onInputChange:(e,t,n)=>{_||R(t??""),"input"===n?A(t??""):"clear"===n&&A("")},renderOption:(e,t,{selected:n})=>l.createElement("li",Br({},e,{key:t&&t.key||Math.random().toString(36)}),l.createElement(tw,{icon:rk,checkedIcon:ok,style:{marginRight:8},checked:!!n}),t&&t.value),renderTags:(e,t)=>(Array.isArray(e)?e:[]).map((e,n)=>l.createElement(Hy,Br({},t({index:n}),{key:e&&e.key||n,label:e&&e.value||""}))),renderInput:e=>l.createElement(ek,Br({},e,{label:u,placeholder:c,InputProps:{...e.InputProps,endAdornment:l.createElement(l.Fragment,null,d?l.createElement(Yg,{size:18}):null,e.InputProps.endAdornment)},size:f},b))}),m?l.createElement(Aw,null,m):null)}const ak=({filter:e,channel:t,query:n})=>{const[r,o]=l.useState([]),[i,a]=l.useState([]),[s,c]=l.useState(!1),[d,p]=l.useState("");return l.useEffect(()=>{a(n?.filter?.[e?.filter]||[])},[n]),l.useEffect(()=>{(async()=>{c(!0);const t=await async function(e,t){return t?.source?(await Cu.runReport({id:t.source})).map(e=>({key:e[t.field],value:e[t.field]})):[]}(0,e);o(t),c(!1)})()},[d]),u.createElement("div",{style:{display:"flex"}},u.createElement("div",{style:{maxWidth:640,minWidth:200}},u.createElement(ik,{id:e?.title,label:e?.title,placeholder:"Type to search…",items:r,selectedKeys:i,onChange:(n,r)=>{a(n),t.emit("filterChanged",e,{[e.filter]:n})},onInputChange:e=>{p(e)},loading:s,debounceMs:300,helperText:i.length?`${i.length} selected`:""})))};function sk({items:e,value:t,label:n,onChange:r,sx:o={width:"100%"},disabled:i=!1}){const a=e.some(e=>e.key===t)?t:"";return u.createElement(Db,{sx:o},u.createElement(Ow,{fullWidth:!0},u.createElement(Hw,{id:"demo-simple-select-label"},n),u.createElement(Xx,{labelId:"demo-simple-select-label",id:"demo-simple-select",value:a,label:n,onChange:r,disabled:i,MenuProps:{style:{maxHeight:"300px"}},size:"small"},e.map(e=>{const{key:t,value:n,disabled:r}=e;return u.createElement(kx,{key:t,value:t,disabled:r},n)}))))}const lk=({filter:e,channel:t,query:n})=>{const[r,o]=l.useState([]),[i,a]=l.useState("");return l.useEffect(()=>{a(n?.date_range?.name)},[n]),l.useEffect(()=>{(async()=>{const t=(await Cu.getDateRanges()).filter(t=>!(e.allowedOptions.length>0)||e.allowedOptions.some(e=>e===t.name)).map(e=>({key:e.name,value:e.title}));o(t)})()},[]),u.createElement("div",{style:{minWidth:"200px",maxWidth:"640px"}},u.createElement(sk,{items:r,value:i,label:e?.title,onChange:(n,r)=>{const o=n.target.value;a(o),t.emit("filterChanged",e,{date_range:{name:o}})}}))},uk=({filters:e=[],channel:t,query:n})=>u.createElement("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px"}},e.map(e=>"multi-select"===e.type?u.createElement(ak,{key:e.title,channel:t,filter:e,query:n}):"date-range"===e.type?u.createElement(lk,{key:e.title,channel:t,filter:e,query:n}):null));var ck,dk={exports:{}};var pk=(ck||(ck=1,function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new o(r,i||e,a),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function a(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,o=[];if(0===this._eventsCount)return o;for(r in e=this._events)t.call(e,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,i=r.length,a=new Array(i);o<i;o++)a[o]=r[o].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,o,i,a){var s=n?n+e:e;if(!this._events[s])return!1;var l,u,c=this._events[s],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,r),!0;case 4:return c.fn.call(c.context,t,r,o),!0;case 5:return c.fn.call(c.context,t,r,o,i),!0;case 6:return c.fn.call(c.context,t,r,o,i,a),!0}for(u=1,l=new Array(d-1);u<d;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var p,f=c.length;for(u=0;u<f;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),d){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,r);break;case 4:c[u].fn.call(c[u].context,t,r,o);break;default:if(!l)for(p=1,l=new Array(d-1);p<d;p++)l[p-1]=arguments[p];c[u].fn.apply(c[u].context,l)}}return!0},s.prototype.on=function(e,t,n){return i(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return i(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,o){var i=n?n+e:e;if(!this._events[i])return this;if(!t)return a(this,i),this;var s=this._events[i];if(s.fn)s.fn!==t||o&&!s.once||r&&s.context!==r||a(this,i);else{for(var l=0,u=[],c=s.length;l<c;l++)(s[l].fn!==t||o&&!s[l].once||r&&s[l].context!==r)&&u.push(s[l]);u.length?this._events[i]=1===u.length?u[0]:u:a(this,i)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}(dk)),dk.exports),fk=t(pk),hk=e=>u.useRef(e||new fk).current,mk=e=>{const t=u.useState({}),n=u.useCallback((n,r)=>{let o={...t.current,...r};for(var i in t.current=o,o)"date_range"===i||o[i].length||delete o[i];e?.emit("mergedFilterChanged",{value:o})},[e]);u.useEffect(()=>(e?.on("filterChanged",n),()=>{e?.off("filterChanged",n)}),[e])},gk=({id:e,cache:t,dashboard:n,channel:r,...o})=>{const[i,a]=u.useState(),[s,c]=u.useState(),[d,p]=u.useState(),[f,h]=u.useState(),[m,g]=u.useState(rc()),[v,y]=u.useState(),[b,w]=u.useState(0),[x,k]=u.useState(!1),[S,E]=u.useState(),[C,O]=u.useState(!1),_=u.useRef({value:o?.filter}),[T,R]=u.useState({}),{ref:P,inView:A}=function({threshold:e,delay:t,trackVisibility:n,rootMargin:r,root:o,triggerOnce:i,skip:a,initialInView:s,fallbackInView:u,onChange:c}={}){var d;const[p,f]=l.useState(null),h=l.useRef(c),m=l.useRef(s),[g,v]=l.useState({inView:!!s,entry:void 0});h.current=c,l.useEffect(()=>{if(void 0===m.current&&(m.current=s),a||!p)return;let l;return l=lc(p,(e,t)=>{const n=m.current;m.current=e,(void 0!==n||e)&&(v({inView:e,entry:t}),h.current&&h.current(e,t),t.isIntersecting&&i&&l&&(l(),l=void 0))},{root:o,rootMargin:r,threshold:e,trackVisibility:n,delay:t},u),()=>{l&&l()}},[Array.isArray(e)?e.toString():e,p,o,r,i,a,n,u,t]);const y=null==(d=g.entry)?void 0:d.target,b=l.useRef(void 0);p||!y||i||a||b.current===y||(b.current=y,v({inView:!!s,entry:void 0}),m.current=s);const w=[f,g.inView,g.entry];return w.ref=w[0],w.inView=w[1],w.entry=w[2],w}({threshold:.1,delay:1e3}),L=hk(r);mk(L);const N=u.useCallback(e=>{const t=e.target.value;w(t),y(i.doc.view[t])},[i]);u.useEffect(()=>{e&&(async()=>{const n=e,r=t?.[n]||await Cu.getChart({id:n}),i=r.doc.source?.id,s=i?t?.[i]||await Cu.getReport({id:i}):void 0,l=t?.[`schema_${i}`]||o?.schema||await Cu.getReportSchema({id:i}),u=r.doc?.view?.[0];w(0),c(s),a(r),y(u),p(l),O(!0)})().catch(e=>{console.error(e.message)})},[e]),u.useEffect(()=>{i&&f&&(!i?.doc?.source?.id||s)&&d&&(async()=>{g(rc(i.doc.chart?.component,{view:v,source:f,chart:i,report:s,schema:d,dashboard:n,query:T}))})().catch(e=>{console.error(e.message)})},[i,f,v,s,d]);const M=e=>{const t={...s?.doc.query.filter||{},...o?.filter,...e?.value},n=t.date_range||s?.doc.query.date_range;if(delete t.date_range,O(!1),E(),k(!0),"context"===i?.doc?.source?.type)return h({filter:t}),void k(!1);const r={filter:t,date_range:n,parameters:o?.params};R(r),Cu.runReport({id:s.id,query:r}).then(e=>{h(i.doc.source.reverse?e.reverse():e)}).catch(e=>{h([])}).finally(()=>{k(!1)})},I=e=>{_.current=e,A?M(e):(E(e),O(!0))};return u.useEffect(()=>(L?.on("mergedFilterChanged",I),()=>{L?.off("mergedFilterChanged",I)}),[L,s,i,A]),u.useEffect(()=>{A&&C&&M(S)},[A,C]),u.useEffect(()=>{O(!0)},[o.params]),u.createElement(zr,{ref:P,elevation:0,style:{borderRadius:12,padding:20,border:"1px solid #e5e5e5",background:"#fff",display:"flex",flexDirection:"column",gap:"12px",height:"100%"}},i&&u.createElement("div",{style:{display:"flex",alignItems:"center",lineHeight:0}},u.createElement(qo,{variant:"subtitle2",style:{fontWeight:600,color:"#252525"}},o?.title||i.doc.name," ")),x?u.createElement(Ra,{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",width:"100%"}}):u.createElement(u.Fragment,null,u.createElement("div",{style:{display:"flex"}},u.createElement("div",{style:{flexGrow:1}}),u.createElement("div",null,i?.doc?.view?.length>1&&u.createElement(Ti,null,u.createElement(_a,{labelId:"date-range-select-label",id:"date-range-select",value:b,onChange:N,style:{fontSize:"12px"},disableUnderline:!0},i.doc.view.map((e,t)=>u.createElement(ca,{key:t,value:t},e.title)))))),u.createElement("div",{style:{position:"relative",flexGrow:n?void 0:1,display:"flex",flexDirection:"column"}},u.createElement(uk,{filters:i?.doc?.filters,channel:L,query:T}),m)))};const vk=l.createContext(void 0),yk=()=>l.useContext(vk);var bk={Chart:gk,Dashboard:function({id:e="sample_dashboard",api:t,params:n}){const r=yk(),o=t||r?.api||{},i=n||r?.parameters||{},[a,s]=u.useState(),[c]=u.useState(),[d,p]=u.useState([]),f=u.useRef({}),h=hk();mk(h),console.log({rows:d},{dashboard:a},{schema:c},{params:i}),l.useEffect(()=>{Cu.setBaseUrl(o.base_url),Cu.setToken(o.token)},[o]);const m=async e=>{const t=e?.doc?.rows||[],n=[];for(let e=0;e<t.length;e++){const r=t[e];r.columns?.forEach(e=>{if(e.override?.filter?.length){const t={};e.override.filter.forEach(e=>{e.hasOwnProperty("value")&&(t[e.field]=[e.value])}),e.filter=t}}),n.push(r)}p(n)};return u.useEffect(()=>{e&&(async()=>{Cu.setBaseUrl(o.base_url),Cu.setToken(o.token),await Cu.loadDashboardMeta({dashboardId:e});const t=await Cu.getDashboard({id:e});f.current[t?.id]=t,s(t),await m(t)})().catch(e=>console.error(e.message))},[e]),u.createElement(ei,{maxWidth:!1,disableGutters:!0},u.createElement(Ni,{container:!0,spacing:3},d?.map((e,t)=>{const n=(e=>0===e?12:12/e)(e.columns.length);return u.createElement(u.Fragment,{key:t},1===t?u.createElement(Ni,{item:!0,xs:12},u.createElement(Ni,{container:!0,spacing:3},e.columns.map((e,t)=>u.createElement(Ni,{key:t,item:!0,xs:12,md:n},u.createElement(gk,{api:o,cache:f.current,id:e.id,dashboard:a,schema:c,title:e.title,filter:e.filter,params:i}))))):e.columns.map((e,t)=>u.createElement(Ni,{key:t,item:!0,xs:12,md:n},u.createElement(gk,{api:o,cache:f.current,id:e.id,dashboard:a,schema:c,title:e.title,filter:e.filter,params:i}))))})))},ReportingProvider:({defaultParameters:e={},defaultApi:t={},children:n})=>{const[r,o]=l.useState(e),[i,a]=l.useState(t),s={parameters:r,setParameters:o,api:i,setApi:a,setReportingContext:({parameters:e,api:t})=>{void 0!==e&&o(e),void 0!==t&&a(t)}};return u.createElement(vk.Provider,{value:s},n)},useReportingContext:()=>{const e=l.useContext(vk);if(void 0===e)throw new Error("useReportingContext must be used within a ReportingProvider");return e},useReportingContextOptional:yk};return bk}();
|