/")+"/"),E(i,s,n,"",function(e){return e})):null!=i&&(S(i)&&(i=function(e,r){return{$typeof:t,type:e.type,key:r,ref:e.ref,props:e.props,_owner:e._owner}}(i,n+(!i.key||l&&l.key===i.key?"":(""+i.key).replace(k,"
/")+"/")+e)),s.push(i)),1;if(l=0,a=""===a?".":a+":",b(e))for(var c=0;c 16)throw Error(l+j(e));if(!e.s)return new m(r);for(null==t?(a=!1,c=p):c=t,o=new m(.03125);e.abs().gte(.1);)e=e.times(o),h+=5;for(c+=Math.log(d(2,h))/Math.LN10*2+5|0,s=n=i=new m(r),m.precision=c;;){if(n=k(n.times(e),c),s=s.times(++u),v((o=i.plus(y(n,s,c))).d).slice(0,c)===v(i.d).slice(0,c)){for(;h--;)i=k(i.times(i),c);return m.precision=p,null==t?(a=!0,k(i,p)):i}i=o}}function j(e){for(var t=7*e.e,r=e.d[0];r>=10;r/=10)t++;return t}function w(e,t,r){if(t>e.LN10.sd())throw a=!0,r&&(e.precision=r),Error(i+"LN10 precision limit exceeded");return k(new e(e.LN10),t)}function N(e){for(var t="";e--;)t+="0";return t}function _(e,t){var s,n,o,l,c,d,u,h,m,p=1,f=e,g=f.d,x=f.constructor,b=x.precision;if(f.s<1)throw Error(i+(f.s?"NaN":"-Infinity"));if(f.eq(r))return new x(0);if(null==t?(a=!1,h=b):h=t,f.eq(10))return null==t&&(a=!0),w(x,h);if(h+=10,x.precision=h,n=(s=v(g)).charAt(0),l=j(f),!(Math.abs(l)<15e14))return u=w(x,h+2,b).times(l+""),f=_(new x(n+"."+s.slice(1)),h-10).plus(u),x.precision=b,null==t?(a=!0,k(f,b)):f;for(;n<7&&1!=n||1==n&&s.charAt(1)>3;)n=(s=v((f=f.times(e)).d)).charAt(0),p++;for(l=j(f),n>1?(f=new x("0."+s),l++):f=new x(n+"."+s.slice(1)),d=c=f=y(f.minus(r),f.plus(r),h),m=k(f.times(f),h),o=3;;){if(c=k(c.times(m),h),v((u=d.plus(y(c,new x(o),h))).d).slice(0,h)===v(d.d).slice(0,h))return d=d.times(2),0!==l&&(d=d.plus(w(x,h+2,b).times(l+""))),d=y(d,new x(p),h),x.precision=b,null==t?(a=!0,k(d,b)):d;d=u,o+=2}}function S(e,t){var r,s,n;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(s=t.search(/e/i))>0?(r<0&&(r=s),r+=+t.slice(s+1),t=t.substring(0,s)):r<0&&(r=t.length),s=0;48===t.charCodeAt(s);)++s;for(n=t.length;48===t.charCodeAt(n-1);)--n;if(t=t.slice(s,n)){if(n-=s,r=r-s-1,e.e=c(r/7),e.d=[],s=(r+1)%7,r<0&&(s+=7),s=Ar),Dr=String.fromCharCode(32),Mr=!1;function Ir(e,t){switch(e){case"keyup":return-1!==Er.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Rr(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Fr=!1;var Lr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Br(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Lr[e.type]:"textarea"===t}function zr(e,t,r,s){Se(s),0<(t=Us(t,"onChange")).length&&(r=new lr("onChange","change",null,r,s),e.push({event:r,listeners:t}))}var Ur=null,Vr=null;function $r(e){Ds(e,0)}function Hr(e){if(K(gn(e)))return e}function qr(e,t){if("change"===e)return t}var Wr=!1;if(l){var Kr;if(l){var Gr="oninput"in document;if(!Gr){var Yr=document.createElement("div");Yr.setAttribute("oninput","return;"),Gr="function"==typeof Yr.oninput}Kr=Gr}else Kr=!1;Wr=Kr&&(!document.documentMode||91e3*e,qh=e=>e/1e3,Wh=(e,t)=>t?e*(1e3/t):0,Kh=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e;function Gh(e,t,r,s){if(e===t&&r===s)return zh;const n=t=>function(e,t,r,s,n){let a,i,o=0;do{i=t+(r-t)/2,a=Kh(i,s,n)-e,a>0?r=i:t=i}while(Math.abs(a)>1e-7&&++o<12);return i}(t,0,1,e,r);return e=>0===e||1===e?e:Kh(n(e),t,s)}var Yh=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Xh=e=>t=>1-e(1-t),Qh=Gh(.33,1.53,.69,.99),Zh=Xh(Qh),Jh=Yh(Zh),em=e=>e>=1?1:(e*=2)<1?.5*Zh(e):.5*(2-Math.pow(2,-10*(e-1))),tm=e=>1-Math.sin(Math.acos(e)),rm=Xh(tm),sm=Yh(tm),nm=Gh(.42,0,1,1),am=Gh(0,0,.58,1),im=Gh(.42,0,.58,1),om=e=>Array.isArray(e)&&"number"==typeof e[0],lm={linear:zh,easeIn:nm,easeInOut:im,easeOut:am,circIn:tm,circInOut:sm,circOut:rm,backIn:Zh,backInOut:Jh,backOut:Qh,anticipate:em},cm=e=>{if(om(e)){e.length;const[t,r,s,n]=e;return Gh(t,r,s,n)}return"string"==typeof e?lm[e]:e},dm=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],um={value:null,addProjectionMetrics:null};function hm(e,t){let r=!1,s=!0;const n={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,i=dm.reduce((e,r)=>(e[r]=function(e,t){let r=new Set,s=new Set,n=!1,a=!1;const i=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1},l=0;function c(t){i.has(t)&&(d.schedule(t),e()),l++,t(o)}const d={schedule:(e,t=!1,a=!1)=>{const o=a&&n?r:s;return t&&i.add(e),o.add(e),e},cancel:e=>{s.delete(e),i.delete(e)},process:e=>{if(o=e,n)return void(a=!0);n=!0;const i=r;r=s,s=i,r.forEach(c),t&&um.value&&um.value.frameloop[t].push(l),l=0,r.clear(),n=!1,a&&(a=!1,d.process(e))}};return d}(a,t?r:void 0),e),{}),{setup:o,read:l,resolveKeyframes:c,preUpdate:d,update:u,preRender:h,render:m,postRender:p}=i,f=()=>{const a=Ih.useManualTiming,i=a?n.timestamp:performance.now();r=!1,a||(n.delta=s?1e3/60:Math.max(Math.min(i-n.timestamp,40),1)),n.timestamp=i,n.isProcessing=!0,o.process(n),l.process(n),c.process(n),d.process(n),u.process(n),h.process(n),m.process(n),p.process(n),n.isProcessing=!1,r&&t&&(s=!1,e(f))};return{schedule:dm.reduce((t,a)=>{const o=i[a];return t[a]=(t,a=!1,i=!1)=>(r||(r=!0,s=!0,n.isProcessing||e(f)),o.schedule(t,a,i)),t},{}),cancel:e=>{for(let t=0;t{for(const t in s)r[t]=s[t](e);return r}}var mp=(e,t)=>{const r=ep.createTransformer(t),s=Qm(e),n=Qm(t);return s.indexes.var.length===n.indexes.var.length&&s.indexes.color.length===n.indexes.color.length&&s.indexes.number.length>=n.indexes.number.length?lp.has(e)&&!n.values.length||lp.has(t)&&!s.values.length?function(e,t){return lp.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}(e,t):Uh(up(function(e,t){const r=[],s={color:0,var:0,number:0};for(let n=0;ne?(...t)=>e(...t):(...e)=>fetch(...e))(r)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return jj(this,arguments,void 0,function*(e,t={}){var r;let s,n;try{const{headers:a,method:i,body:o,signal:l,timeout:c}=t;let d={},{region:u}=t;u||(u=this.region);const h=new URL(`${this.url}/${e}`);let m;u&&"any"!==u&&(d["x-region"]=u,h.searchParams.set("forceFunctionRegion",u)),o&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?"undefined"!=typeof Blob&&o instanceof Blob||o instanceof ArrayBuffer?(d["Content-Type"]="application/octet-stream",m=o):"string"==typeof o?(d["Content-Type"]="text/plain",m=o):"undefined"!=typeof FormData&&o instanceof FormData?m=o:(d["Content-Type"]="application/json",m=JSON.stringify(o)):m=!o||"string"==typeof o||"undefined"!=typeof Blob&&o instanceof Blob||o instanceof ArrayBuffer||"undefined"!=typeof FormData&&o instanceof FormData?o:JSON.stringify(o);let p=l;c&&(n=new AbortController,s=setTimeout(()=>n.abort(),c),l?(p=n.signal,l.addEventListener("abort",()=>n.abort())):p=n.signal);const f=yield this.fetch(h.toString(),{method:i||"POST",headers:Object.assign(Object.assign(Object.assign({},d),this.headers),a),body:m,signal:p}).catch(e=>{throw new _j(e)}),g=f.headers.get("x-relay-error");if(g&&"true"===g)throw new Sj(f);if(!f.ok)throw new kj(f);let x,v=(null!==(r=f.headers.get("Content-Type"))&&void 0!==r?r:"text/plain").split(";")[0].trim();return x="application/json"===v?yield f.json():"application/octet-stream"===v||"application/pdf"===v?yield f.blob():"text/event-stream"===v?f:"multipart/form-data"===v?yield f.formData():yield f.text(),{data:x,error:null,response:f}}catch(a){return{data:null,error:a,response:a instanceof kj||a instanceof Sj?a.context:void 0}}finally{s&&clearTimeout(s)}})}},Ej=e=>Math.min(1e3*2**e,3e4),Tj=[520,503],Aj=["GET","HEAD","OPTIONS"],Oj=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function Pj(e,t){return new Promise(r=>{if(null==t?void 0:t.aborted)return void r();const s=setTimeout(()=>{null==t||t.removeEventListener("abort",n),r()},e);function n(){clearTimeout(s),r()}null==t||t.addEventListener("abort",n)})}function Dj(e,t,r,s){return!(!s||r>=3)&&(!!Aj.includes(e)&&!!Tj.includes(t))}var Mj=class{constructor(e){var t,r,s,n,a;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=null!==(t=e.shouldThrowOnError)&&void 0!==t&&t,this.signal=e.signal,this.isMaybeSingle=null!==(r=e.isMaybeSingle)&&void 0!==r&&r,this.shouldStripNulls=null!==(s=e.shouldStripNulls)&&void 0!==s&&s,this.urlLengthLimit=null!==(n=e.urlLengthLimit)&&void 0!==n?n:8e3,this.retryEnabled=null===(a=e.retry)||void 0===a||a,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if("text/csv"===this.headers.get("Accept"))throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var r=this;if(void 0===this.schema||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),"GET"!==this.method&&"HEAD"!==this.method&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const e=this.headers.get("Accept");"application/vnd.pgrst.object+json"===e?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):e&&"application/json"!==e||this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const s=this.fetch;let n=(async()=>{let e=0;for(;;){const i=new Headers(r.headers);let o;e>0&&i.set("X-Retry-Count",String(e));try{o=await s(r.url.toString(),{method:r.method,headers:i,body:JSON.stringify(r.body,(e,t)=>"bigint"==typeof t?t.toString():t),signal:r.signal})}catch(a){if("AbortError"===(null==a?void 0:a.name)||"ABORT_ERR"===(null==a?void 0:a.code))throw a;if(!Aj.includes(r.method))throw a;if(r.retryEnabled&&e<3){const t=Ej(e);e++,await Pj(t,r.signal);continue}throw a}if(Dj(r.method,o.status,e,r.retryEnabled)){var t,n;const s=null!==(t=null===(n=o.headers)||void 0===n?void 0:n.get("Retry-After"))&&void 0!==t?t:null,a=null!==s?1e3*Math.max(0,parseInt(s,10)||0):Ej(e);await o.text(),e++,await Pj(a,r.signal);continue}return await r.processResponse(o)}})();return this.shouldThrowOnError||(n=n.catch(e=>{var t;let r="",s="",n="";const a=null==e?void 0:e.cause;if(a){var i,o,l,c;const t=null!==(i=null==a?void 0:a.message)&&void 0!==i?i:"",s=null!==(o=null==a?void 0:a.code)&&void 0!==o?o:"";r=`${null!==(l=null==e?void 0:e.name)&&void 0!==l?l:"FetchError"}: ${null==e?void 0:e.message}`,r+=`\n\nCaused by: ${null!==(c=null==a?void 0:a.name)&&void 0!==c?c:"Error"}: ${t}`,s&&(r+=` (${s})`),(null==a?void 0:a.stack)&&(r+=`\n${a.stack}`)}else{var d;r=null!==(d=null==e?void 0:e.stack)&&void 0!==d?d:""}const u=this.url.toString().length;return"AbortError"===(null==e?void 0:e.name)||"ABORT_ERR"===(null==e?void 0:e.code)?(n="",s="Request was aborted (timeout or manual cancellation)",u>this.urlLengthLimit&&(s+=`. Note: Your request URL is ${u} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):"HeadersOverflowError"!==(null==a?void 0:a.name)&&"UND_ERR_HEADERS_OVERFLOW"!==(null==a?void 0:a.code)||(n="",s="HTTP headers exceeded server limits (typically 16KB)",u>this.urlLengthLimit&&(s+=`. Your request URL is ${u} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${null!==(t=null==e?void 0:e.name)&&void 0!==t?t:"FetchError"}: ${null==e?void 0:e.message}`,details:r,hint:s,code:n},data:null,count:null,status:0,statusText:""}})),n.then(e,t)}async processResponse(e){var t=this;let r=null,s=null,n=null,a=e.status,i=e.statusText;if(e.ok){var o,l;if("HEAD"!==t.method){var c;const r=await e.text();""===r||(s="text/csv"===t.headers.get("Accept")||t.headers.get("Accept")&&(null===(c=t.headers.get("Accept"))||void 0===c?void 0:c.includes("application/vnd.pgrst.plan+text"))?r:JSON.parse(r))}const d=null===(o=t.headers.get("Prefer"))||void 0===o?void 0:o.match(/count=(exact|planned|estimated)/),u=null===(l=e.headers.get("content-range"))||void 0===l?void 0:l.split("/");d&&u&&u.length>1&&(n=parseInt(u[1])),t.isMaybeSingle&&Array.isArray(s)&&(s.length>1?(r={code:"PGRST116",details:`Results contain ${s.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},s=null,n=null,a=406,i="Not Acceptable"):s=1===s.length?s[0]:null)}else{const n=await e.text();try{r=JSON.parse(n),Array.isArray(r)&&404===e.status&&(s=[],r=null,a=200,i="OK")}catch(d){404===e.status&&""===n?(a=204,i="No Content"):r={message:n}}if(r&&t.shouldThrowOnError)throw new Oj(r)}return{success:null===r,error:r,data:s,count:n,status:a,statusText:i}}returns(){return this}overrideTypes(){return this}},Ij=class extends Mj{select(e){let t=!1;const r=(null!=e?e:"*").split("").map(e=>/\s/.test(e)&&!t?"":('"'===e&&(t=!t),e)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:s,referencedTable:n=s}={}){const a=n?`${n}.order`:"order",i=this.url.searchParams.get(a);return this.url.searchParams.set(a,`${i?`${i},`:""}${e}.${t?"asc":"desc"}${void 0===r?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){const s=void 0===r?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:s=r}={}){const n=void 0===s?"offset":`${s}.offset`,a=void 0===s?"limit":`${s}.limit`;return this.url.searchParams.set(n,`${e}`),this.url.searchParams.set(a,""+(t-e+1)),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:e=!1,verbose:t=!1,settings:r=!1,buffers:s=!1,wal:n=!1,format:a="text"}={}){var i;const o=[e?"analyze":null,t?"verbose":null,r?"settings":null,s?"buffers":null,n?"wal":null].filter(Boolean).join("|"),l=null!==(i=this.headers.get("Accept"))&&void 0!==i?i:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${a}; for="${l}"; options=${o};`),this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}},Rj=new RegExp("[,()]"),Fj=class extends Ij{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const r=Array.from(new Set(t)).map(e=>"string"==typeof e&&Rj.test(e)?`"${e}"`:`${e}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}notIn(e,t){const r=Array.from(new Set(t)).map(e=>"string"==typeof e&&Rj.test(e)?`"${e}"`:`${e}`).join(",");return this.url.searchParams.append(e,`not.in.(${r})`),this}contains(e,t){return"string"==typeof t?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return"string"==typeof t?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return"string"==typeof t?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:r,type:s}={}){let n="";"plain"===s?n="pl":"phrase"===s?n="ph":"websearch"===s&&(n="w");const a=void 0===r?"":`(${r})`;return this.url.searchParams.append(e,`${n}fts${a}.${t}`),this}match(e){return Object.entries(e).filter(([e,t])=>void 0!==t).forEach(([e,t])=>{this.url.searchParams.append(e,`eq.${t}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const s=r?`${r}.or`:"or";return this.url.searchParams.append(s,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}},Lj=class{constructor(e,{headers:t={},schema:r,fetch:s,urlLengthLimit:n=8e3,retry:a}){this.url=e,this.headers=new Headers(t),this.schema=r,this.fetch=s,this.urlLengthLimit=n,this.retry=a}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:r=!1,count:s}=null!=t?t:{},n=r?"HEAD":"GET";let a=!1;const i=(null!=e?e:"*").split("").map(e=>/\s/.test(e)&&!a?"":('"'===e&&(a=!a),e)).join(""),{url:o,headers:l}=this.cloneRequestState();return o.searchParams.set("select",i),s&&l.append("Prefer",`count=${s}`),new Fj({method:n,url:o,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:r=!0}={}){var s;const{url:n,headers:a}=this.cloneRequestState();if(t&&a.append("Prefer",`count=${t}`),r||a.append("Prefer","missing=default"),Array.isArray(e)){const t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]);if(t.length>0){const e=[...new Set(t)].map(e=>`"${e}"`);n.searchParams.set("columns",e.join(","))}}return new Fj({method:"POST",url:n,headers:a,schema:this.schema,body:e,fetch:null!==(s=this.fetch)&&void 0!==s?s:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:s,defaultToNull:n=!0}={}){var a;const{url:i,headers:o}=this.cloneRequestState();if(o.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),void 0!==t&&i.searchParams.set("on_conflict",t),s&&o.append("Prefer",`count=${s}`),n||o.append("Prefer","missing=default"),Array.isArray(e)){const t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]);if(t.length>0){const e=[...new Set(t)].map(e=>`"${e}"`);i.searchParams.set("columns",e.join(","))}}return new Fj({method:"POST",url:i,headers:o,schema:this.schema,body:e,fetch:null!==(a=this.fetch)&&void 0!==a?a:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var r;const{url:s,headers:n}=this.cloneRequestState();return t&&n.append("Prefer",`count=${t}`),new Fj({method:"PATCH",url:s,headers:n,schema:this.schema,body:e,fetch:null!==(r=this.fetch)&&void 0!==r?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const{url:r,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new Fj({method:"DELETE",url:r,headers:s,schema:this.schema,fetch:null!==(t=this.fetch)&&void 0!==t?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Bj(e){return Bj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bj(e)}function zj(e){var t=function(e,t){if("object"!=Bj(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var s=r.call(e,t||"default");if("object"!=Bj(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Bj(t)?t:t+""}function Uj(e,t,r){return(t=zj(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}function $j(e){for(var t=1;t{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},e.join("\n"),()=>this.onerror("timeout"),e=>{this.awaitingBatchAck=!1,e&&200===e.status?this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[]):(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1))})}close(e,t,r){for(let n of this.reqs)n.abort();this.readyState=Nw;let s=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:r});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,"undefined"!=typeof CloseEvent?this.onclose(new CloseEvent("close",s)):this.onclose(s)}ajax(e,t,r,s,n){let a;a=Uw.request(e,this.endpointURL(),t,r,this.timeout,()=>{this.reqs.delete(a),s()},e=>{this.reqs.delete(a),this.isActive()&&n(e)}),this.reqs.add(a)}},$w=class e{constructor(t,r={}){let s=r.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(s.state,t=>{let{onJoin:r,onLeave:s,onSync:n}=this.caller;this.joinRef=this.channel.joinRef(),this.state=e.syncState(this.state,t,r,s),this.pendingDiffs.forEach(t=>{this.state=e.syncDiff(this.state,t,r,s)}),this.pendingDiffs=[],n()}),this.channel.on(s.diff,t=>{let{onJoin:r,onLeave:s,onSync:n}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(t):(this.state=e.syncDiff(this.state,t,r,s),n())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(t){return e.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,t,r,s){let n=this.clone(e),a={},i={};return this.map(n,(e,r)=>{t[e]||(i[e]=r)}),this.map(t,(e,t)=>{let r=n[e];if(r){let s=t.metas.map(e=>e.phx_ref),n=r.metas.map(e=>e.phx_ref),o=t.metas.filter(e=>n.indexOf(e.phx_ref)<0),l=r.metas.filter(e=>s.indexOf(e.phx_ref)<0);o.length>0&&(a[e]=t,a[e].metas=o),l.length>0&&(i[e]=this.clone(r),i[e].metas=l)}else a[e]=t}),this.syncDiff(n,{joins:a,leaves:i},r,s)}static syncDiff(e,t,r,s){let{joins:n,leaves:a}=this.clone(t);return r||(r=function(){}),s||(s=function(){}),this.map(n,(t,s)=>{let n=e[t];if(e[t]=this.clone(s),n){let r=e[t].metas.map(e=>e.phx_ref),s=n.metas.filter(e=>r.indexOf(e.phx_ref)<0);e[t].metas.unshift(...s)}r(t,n,s)}),this.map(a,(t,r)=>{let n=e[t];if(!n)return;let a=r.metas.map(e=>e.phx_ref);n.metas=n.metas.filter(e=>a.indexOf(e.phx_ref)<0),s(t,n,r),0===n.metas.length&&delete e[t]}),e}static list(e,t){return t||(t=function(e,t){return t}),this.map(e,(e,r)=>t(e,r))}static map(e,t){return Object.getOwnPropertyNames(e).map(r=>t(r,e[r]))}static clone(e){return JSON.parse(JSON.stringify(e))}},Hw={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let r=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(r))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[r,s,n,a,i]=JSON.parse(e);return t({join_ref:r,ref:s,topic:n,event:a,payload:i})}},binaryEncode(e){let{join_ref:t,ref:r,event:s,topic:n,payload:a}=e,i=this.META_LENGTH+t.length+r.length+n.length+s.length,o=new ArrayBuffer(this.HEADER_LENGTH+i),l=new DataView(o),c=0;l.setUint8(c++,this.KINDS.push),l.setUint8(c++,t.length),l.setUint8(c++,r.length),l.setUint8(c++,n.length),l.setUint8(c++,s.length),Array.from(t,e=>l.setUint8(c++,e.charCodeAt(0))),Array.from(r,e=>l.setUint8(c++,e.charCodeAt(0))),Array.from(n,e=>l.setUint8(c++,e.charCodeAt(0))),Array.from(s,e=>l.setUint8(c++,e.charCodeAt(0)));var d=new Uint8Array(o.byteLength+a.byteLength);return d.set(new Uint8Array(o),0),d.set(new Uint8Array(a),o.byteLength),d.buffer},binaryDecode(e){let t=new DataView(e),r=t.getUint8(0),s=new TextDecoder;switch(r){case this.KINDS.push:return this.decodePush(e,t,s);case this.KINDS.reply:return this.decodeReply(e,t,s);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,s)}},decodePush(e,t,r){let s=t.getUint8(1),n=t.getUint8(2),a=t.getUint8(3),i=this.HEADER_LENGTH+this.META_LENGTH-1,o=r.decode(e.slice(i,i+s));i+=s;let l=r.decode(e.slice(i,i+n));i+=n;let c=r.decode(e.slice(i,i+a));return i+=a,{join_ref:o,ref:null,topic:l,event:c,payload:e.slice(i,e.byteLength)}},decodeReply(e,t,r){let s=t.getUint8(1),n=t.getUint8(2),a=t.getUint8(3),i=t.getUint8(4),o=this.HEADER_LENGTH+this.META_LENGTH,l=r.decode(e.slice(o,o+s));o+=s;let c=r.decode(e.slice(o,o+n));o+=n;let d=r.decode(e.slice(o,o+a));o+=a;let u=r.decode(e.slice(o,o+i));o+=i;let h={status:u,response:e.slice(o,e.byteLength)};return{join_ref:l,ref:c,topic:d,event:Pw,payload:h}},decodeBroadcast(e,t,r){let s=t.getUint8(1),n=t.getUint8(2),a=this.HEADER_LENGTH+2,i=r.decode(e.slice(a,a+s));a+=s;let o=r.decode(e.slice(a,a+n));return a+=n,{join_ref:null,ref:null,topic:i,event:o,payload:e.slice(a,e.byteLength)}}},qw=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||1e4,this.transport=t.transport||yw.WebSocket||Vw,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let r=null;try{r=yw&&yw.sessionStorage}catch{}this.sessionStore=t.sessionStorage||r,this.establishedConnections=0,this.defaultEncoder=Hw.encode.bind(Hw),this.defaultDecoder=Hw.decode.bind(Hw),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==Vw?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let s=null;vw&&vw.addEventListener&&(vw.addEventListener("pagehide",e=>{this.conn&&(this.disconnect(),s=this.connectClock)}),vw.addEventListener("pageshow",e=>{s===this.connectClock&&(s=null,this.connect())}),vw.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState?this.pageHidden=!0:(this.pageHidden=!1,this.isConnected()||this.closeWasClean||this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=e=>t.rejoinAfterMs?t.rejoinAfterMs(e):[1e3,2e3,5e3][e-1]||1e4,this.reconnectAfterMs=e=>t.reconnectAfterMs?t.reconnectAfterMs(e):[10,50,100,150,200,250,500,1e3,2e3][e-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(e,t,r)=>{}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=gw(t.params||{}),this.endPoint=`${e}/${Iw}`,this.vsn=t.vsn||"2.0.0",this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Bw(()=>{if(this.pageHidden)return this.log("Not reconnecting as page is hidden!"),void this.teardown();this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return Vw}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=Uw.appendParams(Uw.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return"/"!==e.charAt(0)?e:"/"===e.charAt(1)?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,r){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,r)}connect(e){e&&(console,this.params=gw(e)),this.conn&&!this.disconnecting||(this.longPollFallbackMs&&this.transport!==Vw?this.connectWithFallback(Vw,this.longPollFallbackMs):this.transportConnect())}log(e,t,r){this.logger&&this.logger(e,t,r)}hasLogger(){return null!==this.logger}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),r=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let s=this.onMessage(n=>{n.ref===t&&(this.off([s]),e(Date.now()-r))});return!0}transportName(e){return e===Vw?"LongPoll":e.name}transportConnect(){let e;this.connectClock++,this.closeWasClean=!1,this.authToken&&(e=["phoenix",`${Fw}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let r,s=!1,n=!0,a=this.transportName(e),i=t=>{this.log("transport",`falling back to ${a}...`,t),this.off([void 0,r]),n=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${a}`))return i("memorized");this.fallbackTimer=setTimeout(i,t),r=this.onError(e=>{this.log("transport","error",e),n&&!s&&(clearTimeout(this.fallbackTimer),i(e))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(s=!0,!n){let t=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${t}`,"true"),this.log("transport",`established ${t} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(i,t),this.ping(e=>{this.log("transport","connected to primary after",e),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(PBe){this.log("error","error in heartbeat callback",PBe)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),1e3,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,r){if(!this.conn)return e&&e();const s=this.conn;this.waitForBufferDone(s,()=>{t?s.close(t,r||""):s.close(),this.waitForSocketClosed(s,()=>{this.conn===s&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,r=1){5!==r&&e.bufferedAmount?setTimeout(()=>{this.waitForBufferDone(e,t,r+1)},150*r):t()}waitForSocketClosed(e,t,r=1){5!==r&&e.readyState!==Nw?setTimeout(()=>{this.waitForSocketClosed(e,t,r+1)},150*r):t()}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(e),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport","error",e);let t=this.transport,r=this.establishedConnections;this.triggerStateCallbacks("error",e,t,r),(t===this.transport||r>0)&&this.triggerChanError(e)}triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(Aw,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case bw:return"connecting";case jw:return"open";case ww:return"closing";default:return"closed"}}isConnected(){return"open"===this.connectionState()}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([t])=>-1===e.indexOf(t))}channel(e,t={}){let r=new zw(e,t,this);return this.channels.push(r),r}push(e){if(this.hasLogger()){let{topic:t,event:r,payload:s,ref:n,join_ref:a}=e;this.log("push",`${t} ${r} (${a}, ${n})`,s)}this.isConnected()?this.encode(e,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(e,e=>this.conn.send(e)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(this.isConnected())if(this.pendingHeartbeatRef)this.heartbeatTimeout();else{this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(PBe){this.log("error","error in heartbeat callback",PBe)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}else try{this.heartbeatCallback("disconnected")}catch(PBe){this.log("error","error in heartbeat callback",PBe)}}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,e=>{let{topic:t,event:r,payload:s,ref:n,join_ref:a}=e;if(n&&n===this.pendingHeartbeatRef){const e=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback("ok"===s.status?"ok":"error",e)}catch(PBe){this.log("error","error in heartbeat callback",PBe)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${s.status||""} ${t} ${r} ${n&&"("+n+")"||""}`.trim(),s);for(let i=0;i=n.getTime()?r+1:t.getTime()>=i.getTime()?r:r-1}function cI(e){const t=QM(e);return t.setHours(0,0,0,0),t}function dI(e){const t=QM(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function uI(e,t){const r=cI(e),s=cI(t),n=+r-dI(r),a=+s-dI(s);return Math.round((n-a)/864e5)}function hI(e,t){return JM(e,7*t)}function mI(e,t){return eI(e,12*t)}function pI(e,t){const r=QM(e),s=QM(t),n=r.getTime()-s.getTime();return n<0?-1:n>0?1:n}function fI(e,t){return+cI(e)===+cI(t)}function gI(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function xI(e,t){const r=QM(e),s=QM(t);return 12*(r.getFullYear()-s.getFullYear())+(r.getMonth()-s.getMonth())}function vI(e){const t=QM(e);return t.setHours(23,59,59,999),t}function yI(e){const t=QM(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function bI(e,t){const r=QM(e),s=QM(t),n=pI(r,s),a=Math.abs(xI(r,s));let i;if(a<1)i=0;else{1===r.getMonth()&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-n*a);let t=pI(r,s)===-n;(function(e){const t=QM(e);return+vI(t)===+yI(t)})(QM(e))&&1===a&&1===pI(e,s)&&(t=!1),i=n*(a-Number(t))}return 0===i?0:i}function jI(e,t,r){const s=function(e,t){return+QM(e)-+QM(t)}(e,t)/1e3;return(n=r?.roundingMethod,e=>{const t=(n?Math[n]:Math.trunc)(e);return 0===t?0:t})(s);var n}function wI(e){const t=QM(e),r=t.getMonth(),s=r-r%3;return t.setMonth(s,1),t.setHours(0,0,0,0),t}function NI(e){const t=QM(e);return t.setDate(1),t.setHours(0,0,0,0),t}function _I(e){const t=QM(e),r=t.getFullYear();return t.setFullYear(r+1,0,0),t.setHours(23,59,59,999),t}function SI(e){const t=QM(e),r=ZM(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}function kI(e,t){const r=aI(),s=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,n=QM(e),a=n.getDay(),i=6+(a{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var OI={date:AI({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:AI({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:AI({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},PI={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function DI(e){return(t,r)=>{let s;if("formatting"===(r?.context?String(r.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,n=r?.width?String(r.width):t;s=e.formattingValues[n]||e.formattingValues[t]}else{const t=e.defaultWidth,n=r?.width?String(r.width):e.defaultWidth;s=e.values[n]||e.values[t]}return s[e.argumentCallback?e.argumentCallback(t):t]}}var MI={ordinalNumber:(e,t)=>{const r=Number(e),s=r%100;if(s>20||s<10)switch(s%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:DI({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:DI({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:DI({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:DI({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:DI({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function II(e){return(t,r={})=>{const s=r.width,n=s&&e.matchPatterns[s]||e.matchPatterns[e.defaultMatchWidth],a=t.match(n);if(!a)return null;const i=a[0],o=s&&e.parsePatterns[s]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(o)?function(e,t){for(let r=0;r1&&(l||!c),u=t>1&&(c||!l);return(0,M.jsx)(cF,{displayMonth:e.displayMonth,hideNext:d,hidePrevious:u,nextMonth:n,previousMonth:s,onPreviousClick:function(){s&&a(s)},onNextClick:function(){n&&a(n)}})}function uF(e){var t,r,s=YR(),n=s.classNames,a=s.disableNavigation,i=s.styles,o=s.captionLayout,l=s.components,c=null!==(t=null==l?void 0:l.CaptionLabel)&&void 0!==t?t:XR;return r=a?(0,M.jsx)(c,{id:e.id,displayMonth:e.displayMonth}):"dropdown"===o?(0,M.jsx)(aF,{displayMonth:e.displayMonth,id:e.id}):"dropdown-buttons"===o?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(aF,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),(0,M.jsx)(dF,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),(0,M.jsx)(dF,{displayMonth:e.displayMonth,id:e.id})]}),(0,M.jsx)("div",{className:n.caption,style:i.caption,children:r})}function hF(e){var t=YR(),r=t.footer,s=t.styles,n=t.classNames.tfoot;return r?(0,M.jsx)("tfoot",{className:n,style:s.tfoot,children:(0,M.jsx)("tr",{children:(0,M.jsx)("td",{colSpan:8,children:r})})}):(0,M.jsx)(M.Fragment,{})}function mF(){var e=YR(),t=e.classNames,r=e.styles,s=e.showWeekNumber,n=e.locale,a=e.weekStartsOn,i=e.ISOWeek,o=e.formatters.formatWeekdayName,l=e.labels.labelWeekday,c=function(e,t,r){for(var s=r?oI(new Date):iI(new Date,{locale:e,weekStartsOn:t}),n=[],a=0;a<7;a++){var i=JM(s,a);n.push(i)}return n}(n,a,i);return(0,M.jsxs)("tr",{style:r.head_row,className:t.head_row,children:[s&&(0,M.jsx)("td",{style:r.head_cell,className:t.head_cell}),c.map(function(e,s){return(0,M.jsx)("th",{scope:"col",className:t.head_cell,style:r.head_cell,"aria-label":l(e,{locale:n}),children:o(e,{locale:n})},s)})]})}function pF(){var e,t=YR(),r=t.classNames,s=t.styles,n=t.components,a=null!==(e=null==n?void 0:n.HeadRow)&&void 0!==e?e:mF;return(0,M.jsx)("thead",{style:s.head,className:r.head,children:(0,M.jsx)(a,{})})}function fF(e){var t=YR(),r=t.locale,s=t.formatters.formatDay;return(0,M.jsx)(M.Fragment,{children:s(e.date,{locale:r})})}var gF=(0,v.createContext)(void 0);function xF(e){return UR(e.initialProps)?(0,M.jsx)(vF,{initialProps:e.initialProps,children:e.children}):(0,M.jsx)(gF.Provider,{value:{selected:void 0,modifiers:{disabled:[]}},children:e.children})}function vF(e){var t=e.initialProps,r=e.children,s=t.selected,n=t.min,a=t.max,i={disabled:[]};s&&i.disabled.push(function(e){var t=a&&s.length>a-1,r=s.some(function(t){return fI(t,e)});return Boolean(t&&!r)});var o={selected:s,onDayClick:function(e,r,i){var o,l;if(null===(o=t.onDayClick)||void 0===o||o.call(t,e,r,i),!Boolean(r.selected&&n&&(null==s?void 0:s.length)===n)&&!Boolean(!r.selected&&a&&(null==s?void 0:s.length)===a)){var c=s?zR([],s,!0):[];if(r.selected){var d=c.findIndex(function(t){return fI(e,t)});c.splice(d,1)}else c.push(e);null===(l=t.onSelect)||void 0===l||l.call(t,c,e,r,i)}},modifiers:i};return(0,M.jsx)(gF.Provider,{value:o,children:r})}function yF(){var e=(0,v.useContext)(gF);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}var bF,jF=(0,v.createContext)(void 0);function wF(e){return VR(e.initialProps)?(0,M.jsx)(NF,{initialProps:e.initialProps,children:e.children}):(0,M.jsx)(jF.Provider,{value:{selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}},children:e.children})}function NF(e){var t=e.initialProps,r=e.children,s=t.selected,n=s||{},a=n.from,i=n.to,o=t.min,l=t.max,c={range_start:[],range_end:[],range_middle:[],disabled:[]};if(a?(c.range_start=[a],i?(c.range_end=[i],fI(a,i)||(c.range_middle=[{after:a,before:i}])):c.range_end=[a]):i&&(c.range_start=[i],c.range_end=[i]),o&&(a&&!i&&c.disabled.push({after:bR(a,o-1),before:JM(a,o-1)}),a&&i&&c.disabled.push({after:a,before:JM(a,o-1)}),!a&&i&&c.disabled.push({after:bR(i,o-1),before:JM(i,o-1)})),l){if(a&&!i&&(c.disabled.push({before:JM(a,1-l)}),c.disabled.push({after:JM(a,l-1)})),a&&i){var d=l-(uI(i,a)+1);c.disabled.push({before:bR(a,d)}),c.disabled.push({after:JM(i,d)})}!a&&i&&(c.disabled.push({before:JM(i,1-l)}),c.disabled.push({after:JM(i,l-1)}))}return(0,M.jsx)(jF.Provider,{value:{selected:s,onDayClick:function(e,r,n){var a,i;null===(a=t.onDayClick)||void 0===a||a.call(t,e,r,n);var o=function(e,t){var r=t||{},s=r.from,n=r.to;if(s&&n){if(fI(n,e)&&fI(s,e))return;if(fI(n,e))return{from:n,to:void 0};if(fI(s,e))return;return xR(s,e)?{from:e,to:n}:{from:s,to:e}}return n?xR(e,n)?{from:n,to:e}:{from:e,to:n}:s?vR(e,s)?{from:e,to:s}:{from:s,to:e}:{from:e,to:void 0}}(e,s);null===(i=t.onSelect)||void 0===i||i.call(t,o,e,r,n)},modifiers:c},children:r})}function _F(){var e=(0,v.useContext)(jF);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function SF(e){return Array.isArray(e)?zR([],e,!0):void 0!==e?[e]:[]}!function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"}(bF||(bF={}));var kF=bF.Selected,CF=bF.Disabled,EF=bF.Hidden,TF=bF.Today,AF=bF.RangeEnd,OF=bF.RangeMiddle,PF=bF.RangeStart,DF=bF.Outside;var MF=(0,v.createContext)(void 0);function IF(e){var t=YR(),r=function(e,t,r){var s,n=((s={})[kF]=SF(e.selected),s[CF]=SF(e.disabled),s[EF]=SF(e.hidden),s[TF]=[e.today],s[AF]=[],s[OF]=[],s[PF]=[],s[DF]=[],s);return e.fromDate&&n[CF].push({before:e.fromDate}),e.toDate&&n[CF].push({after:e.toDate}),UR(e)?n[CF]=n[CF].concat(t.modifiers[CF]):VR(e)&&(n[CF]=n[CF].concat(r.modifiers[CF]),n[PF]=r.modifiers[PF],n[OF]=r.modifiers[OF],n[AF]=r.modifiers[AF]),n}(t,yF(),_F()),s=function(e){var t={};return Object.entries(e).forEach(function(e){var r=e[0],s=e[1];t[r]=SF(s)}),t}(t.modifiers),n=BR(BR({},r),s);return(0,M.jsx)(MF.Provider,{value:n,children:e.children})}function RF(){var e=(0,v.useContext)(MF);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function FF(e,t){return t.some(function(t){if("boolean"==typeof t)return t;if(gI(t))return fI(e,t);if(function(e){return Array.isArray(e)&&e.every(gI)}(t))return t.includes(e);if(function(e){return Boolean(e&&"object"==typeof e&&"from"in e)}(t))return function(e,t){var r,s=t.from,n=t.to;return s&&n?(uI(n,s)<0&&(s=(r=[n,s])[0],n=r[1]),uI(e,s)>=0&&uI(n,e)>=0):n?fI(n,e):!!s&&fI(s,e)}(e,t);if(function(e){return Boolean(e&&"object"==typeof e&&"dayOfWeek"in e)}(t))return t.dayOfWeek.includes(e.getDay());if(function(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}(t)){var r=uI(t.before,e)>0,s=uI(t.after,e)<0;return xR(t.before,t.after)?s&&r:r||s}return function(e){return Boolean(e&&"object"==typeof e&&"after"in e)}(t)?uI(e,t.after)>0:function(e){return Boolean(e&&"object"==typeof e&&"before"in e)}(t)?uI(t.before,e)>0:"function"==typeof t&&t(e)})}function LF(e,t,r){var s=Object.keys(t).reduce(function(r,s){var n=t[s];return FF(e,n)&&r.push(s),r},[]),n={};return s.forEach(function(e){return n[e]=!0}),r&&!yR(e,r)&&(n.outside=!0),n}function BF(e,t){var r=t.moveBy,s=t.direction,n=t.context,a=t.modifiers,i=t.retry,o=void 0===i?{count:0,lastFocused:e}:i,l=n.weekStartsOn,c=n.fromDate,d=n.toDate,u=n.locale,h={day:JM,week:hI,month:eI,year:mI,startOfWeek:function(e){return n.ISOWeek?oI(e):iI(e,{locale:u,weekStartsOn:l})},endOfWeek:function(e){return n.ISOWeek?CI(e):kI(e,{locale:u,weekStartsOn:l})}}[r](e,"after"===s?1:-1);"before"===s&&c?h=function(e){let t;return e.forEach(function(e){const r=QM(e);(void 0===t||t{var r=bL(),s=lB(),n=xL(),a=SL(),i=r?r.prototype:void 0,o=i?i.toString:void 0;t.exports=function e(t){if("string"==typeof t)return t;if(n(t))return s(t,e)+"";if(a(t))return o?o.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}}),dB=i((e,t)=>{var r=cB();t.exports=function(e){return null==e?"":r(e)}}),uB=i((e,t)=>{var r=xL(),s=kL(),n=oB(),a=dB();t.exports=function(e,t){return r(e)?e:s(e,t)?[e]:n(a(e))}}),hB=i((e,t)=>{var r=SL();t.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}}),mB=i((e,t)=>{var r=uB(),s=hB();t.exports=function(e,t){for(var n=0,a=(t=r(t,e)).length;null!=e&&n{var r=mB();t.exports=function(e,t,s){var n=null==e?void 0:r(e,t);return void 0===n?s:n}}),fB=i((e,t)=>{t.exports=function(e){return null==e}}),gB=i((e,t)=>{var r=NL(),s=xL(),n=_L();t.exports=function(e){return"string"==typeof e||!s(e)&&n(e)&&"[object String]"==r(e)}}),xB=i(e=>{var t=Symbol.for("react.element"),r=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy");Symbol.for("react.offscreen"),Symbol.for("react.module.reference");e.isFragment=function(e){return function(e){if("object"==typeof e&&null!==e){var p=e.$typeof;switch(p){case t:switch(e=e.type){case s:case a:case n:case d:case u:return e;default:switch(e=e&&e.$typeof){case l:case o:case c:case m:case h:case i:return e;default:return p}}case r:return p}}}(e)===s}}),vB=i((e,t)=>{t.exports=xB()}),yB=i((e,t)=>{var r=NL(),s=_L();t.exports=function(e){return"number"==typeof e||s(e)&&"[object Number]"==r(e)}}),bB=i((e,t)=>{var r=yB();t.exports=function(e){return r(e)&&e!=+e}}),jB=c(gB()),wB=c(bB()),NB=c(pB()),_B=c(yB()),SB=c(fB()),kB=function(e){return 0===e?0:e>0?1:-1},CB=function(e){return(0,jB.default)(e)&&e.indexOf("%")===e.length-1},EB=function(e){return(0,_B.default)(e)&&!(0,wB.default)(e)},TB=function(e){return EB(e)||(0,jB.default)(e)},AB=0,OB=function(e){var t=++AB;return"".concat(e||"").concat(t)},PB=function(e,t){var r,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!EB(e)&&!(0,jB.default)(e))return s;if(CB(e)){var a=e.indexOf("%");r=t*parseFloat(e.slice(0,a))/100}else r=+e;return(0,wB.default)(r)&&(r=s),n&&r>t&&(r=t),r},DB=function(e){if(!e)return null;var t=Object.keys(e);return t&&t.length?e[t[0]]:null},MB=function(e,t){return EB(e)&&EB(t)?function(r){return e+r*(t-e)}:function(){return t}};function IB(e,t,r){return e&&e.length?e.find(function(e){return e&&("function"==typeof t?t(e):(0,NB.default)(e,t))===r}):null}var RB=function(e,t){return EB(e)&&EB(t)?e-t:(0,jB.default)(e)&&(0,jB.default)(t)?e.localeCompare(t):e instanceof Date&&t instanceof Date?e.getTime()-t.getTime():String(e).localeCompare(String(t))};function FB(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var s in t)if({}.hasOwnProperty.call(t,s)&&!{}.hasOwnProperty.call(e,s))return!1;return!0}var LB=c(CL());function BB(e){return BB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},BB(e)}var zB=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","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","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","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","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],UB=["points","pathLength"],VB={svg:["viewBox","children"],polygon:UB,polyline:UB},$B=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],HB=function(e,t){if(!e||"function"==typeof e||"boolean"==typeof e)return null;var r=e;if((0,v.isValidElement)(e)&&(r=e.props),!(0,LB.default)(r))return null;var s={};return Object.keys(r).forEach(function(e){$B.includes(e)&&(s[e]=t||function(t){return r[e](r,t)})}),s},qB=function(e,t,r){if(!(0,LB.default)(e)||"object"!==BB(e))return null;var s=null;return Object.keys(e).forEach(function(n){var a=e[n];$B.includes(n)&&"function"==typeof a&&(s||(s={}),s[n]=function(e,t,r){return function(s){return e(t,r,s),null}}(a,t,r))}),s},WB=c(EL()),KB=vB(),GB=["children"],YB=["children"];function XB(e,t){if(null==e)return{};var r,s,n=function(e,t){if(null==e)return{};var r={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;r[s]=e[s]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(s=0;s=0}(e))r.push(e);else if(e){var a=JB(e.type),i=t[a]||{},o=i.handler,l=i.once;if(o&&(!l||!s[a])){var c=o(e,a,n);r.push(c),s[a]=!0}}}),r},hz=["children","width","height","viewBox","className","style","title","desc"];function mz(){return mz=Object.assign?Object.assign.bind():function(e){for(var t=1;tFz)if(Math.abs(d*o-l*c)>Fz&&n){let h=r-a,m=s-i,p=o*o+l*l,f=h*h+m*m,g=Math.sqrt(p),x=Math.sqrt(u),v=n*Math.tan((Iz-Math.acos((p+u-f)/(2*g*x)))/2),y=v/x,b=v/g;Math.abs(y-1)>Fz&&this._append`L${e+y*c},${t+y*d}`,this._append`A${n},${n},0,0,${+(d*h>c*m)},${this._x1=e+b*o},${this._y1=t+b*l}`}else this._append`L${this._x1=e},${this._y1=t}`;else;}arc(e,t,r,s,n,a){if(e=+e,t=+t,a=!!a,(r=+r)<0)throw new Error(`negative radius: ${r}`);let i=r*Math.cos(s),o=r*Math.sin(s),l=e+i,c=t+o,d=1^a,u=a?s-n:n-s;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Fz||Math.abs(this._y1-c)>Fz)&&this._append`L${l},${c}`,r&&(u<0&&(u=u%Rz+Rz),u>Lz?this._append`A${r},${r},0,1,${d},${e-i},${t-o}A${r},${r},0,1,${d},${this._x1=l},${this._y1=c}`:u>Fz&&this._append`A${r},${r},0,${+(u>=Iz)},${d},${this._x1=e+r*Math.cos(n)},${this._y1=t+r*Math.sin(n)}`)}rect(e,t,r,s){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${r=+r}v${+s}h${-r}Z`}toString(){return this._}};function Uz(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(null==r)t=null;else{const e=Math.floor(r);if(!(e>=0))throw new RangeError(`invalid digits: ${r}`);t=e}return e},()=>new zz(t)}Array.prototype.slice;function Vz(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function $z(e){this._context=e}function Hz(e){return new $z(e)}function qz(e){return e[0]}function Wz(e){return e[1]}function Kz(e,t){var r=Tz(!0),s=null,n=Hz,a=null,i=Uz(o);function o(o){var l,c,d,u=(o=Vz(o)).length,h=!1;for(null==s&&(a=n(d=i())),l=0;l<=u;++l)!(l=u;--h)o.point(x[h],v[h]);o.lineEnd(),o.areaEnd()}g&&(x[d]=+e(m,d,c),v[d]=+t(m,d,c),o.point(s?+s(m,d,c):x[d],r?+r(m,d,c):v[d]))}if(p)return o=null,p+""||null}function d(){return Kz().defined(n).curve(i).context(a)}return e="function"==typeof e?e:void 0===e?qz:Tz(+e),t="function"==typeof t?t:Tz(void 0===t?0:+t),r="function"==typeof r?r:void 0===r?Wz:Tz(+r),c.x=function(t){return arguments.length?(e="function"==typeof t?t:Tz(+t),s=null,c):e},c.x0=function(t){return arguments.length?(e="function"==typeof t?t:Tz(+t),c):e},c.x1=function(e){return arguments.length?(s=null==e?null:"function"==typeof e?e:Tz(+e),c):s},c.y=function(e){return arguments.length?(t="function"==typeof e?e:Tz(+e),r=null,c):t},c.y0=function(e){return arguments.length?(t="function"==typeof e?e:Tz(+e),c):t},c.y1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:Tz(+e),c):r},c.lineX0=c.lineY0=function(){return d().x(e).y(t)},c.lineY1=function(){return d().x(e).y(r)},c.lineX1=function(){return d().x(s).y(t)},c.defined=function(e){return arguments.length?(n="function"==typeof e?e:Tz(!!e),c):n},c.curve=function(e){return arguments.length?(i=e,null!=a&&(o=i(a)),c):i},c.context=function(e){return arguments.length?(null==e?a=o=null:o=i(a=e),c):a},c}$z.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var Yz=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}};var Xz={draw(e,t){const r=Pz(t/Dz);e.moveTo(r,0),e.arc(0,0,r,0,Mz)}},Qz={draw(e,t){const r=Pz(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},Zz=Pz(1/3),Jz=2*Zz,eU={draw(e,t){const r=Pz(t/Jz),s=r*Zz;e.moveTo(0,-r),e.lineTo(s,0),e.lineTo(0,r),e.lineTo(-s,0),e.closePath()}},tU={draw(e,t){const r=Pz(t),s=-r/2;e.rect(s,s,r,r)}},rU=Oz(Dz/10)/Oz(7*Dz/10),sU=Oz(Mz/10)*rU,nU=-Az(Mz/10)*rU,aU={draw(e,t){const r=Pz(.8908130915292852*t),s=sU*r,n=nU*r;e.moveTo(0,-r),e.lineTo(s,n);for(let a=1;a<5;++a){const t=Mz*a/5,i=Az(t),o=Oz(t);e.lineTo(o*r,-i*r),e.lineTo(i*s-o*n,o*s+i*n)}e.closePath()}},iU=Pz(3),oU={draw(e,t){const r=-Pz(t/(3*iU));e.moveTo(0,2*r),e.lineTo(-iU*r,-r),e.lineTo(iU*r,-r),e.closePath()}},lU=-.5,cU=Pz(3)/2,dU=1/Pz(12),uU=3*(dU/2+1),hU={draw(e,t){const r=Pz(t/uU),s=r/2,n=r*dU,a=s,i=r*dU+r,o=-a,l=i;e.moveTo(s,n),e.lineTo(a,i),e.lineTo(o,l),e.lineTo(lU*s-cU*n,cU*s+lU*n),e.lineTo(lU*a-cU*i,cU*a+lU*i),e.lineTo(lU*o-cU*l,cU*o+lU*l),e.lineTo(lU*s+cU*n,lU*n-cU*s),e.lineTo(lU*a+cU*i,lU*i-cU*a),e.lineTo(lU*o+cU*l,lU*l-cU*o),e.closePath()}};function mU(){}function pU(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function fU(e){this._context=e}function gU(e){this._context=e}function xU(e){this._context=e}function vU(e){this._context=e}function yU(e){return e<0?-1:1}function bU(e,t,r){var s=e._x1-e._x0,n=t-e._x1,a=(e._y1-e._y0)/(s||n<0&&-0),i=(r-e._y1)/(n||s<0&&-0),o=(a*n+i*s)/(s+n);return(yU(a)+yU(i))*Math.min(Math.abs(a),Math.abs(i),.5*Math.abs(o))||0}function jU(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function wU(e,t,r){var s=e._x0,n=e._y0,a=e._x1,i=e._y1,o=(a-s)/3;e._context.bezierCurveTo(s+o,n+o*t,a-o,i-o*r,a,i)}function NU(e){this._context=e}function _U(e){this._context=new SU(e)}function SU(e){this._context=e}function kU(e){this._context=e}function CU(e){var t,r,s=e.length-1,n=new Array(s),a=new Array(s),i=new Array(s);for(n[0]=0,a[0]=2,i[0]=e[0]+2*e[1],t=1;t{t.exports=function(e,t){for(var r=-1,s=null==e?0:e.length;++r{t.exports=function(e,t){return e.has(t)}}),mV=i((e,t)=>{var r=dV(),s=uV(),n=hV();t.exports=function(e,t,a,i,o,l){var c=1&a,d=e.length,u=t.length;if(d!=u&&!(c&&u>d))return!1;var h=l.get(e),m=l.get(t);if(h&&m)return h==t&&m==e;var p=-1,f=!0,g=2&a?new r:void 0;for(l.set(e,t),l.set(t,e);++p{var r=vV(),s=xL();t.exports=function(e,t,n){var a=t(e);return s(e)?a:r(a,n(e))}}),bV=i((e,t)=>{t.exports=function(e,t){for(var r=-1,s=null==e?0:e.length,n=0,a=[];++r{t.exports=function(){return[]}}),wV=i((e,t)=>{var r=bV(),s=jV(),n=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,i=a?function(e){return null==e?[]:(e=Object(e),r(a(e),function(t){return n.call(e,t)}))}:s;t.exports=i}),NV=i((e,t)=>{t.exports=function(e,t){for(var r=-1,s=Array(e);++r0&&l<1?0:i,new WW(i,o,l,e.opacity)}function WW(e,t,r,s){this.h=+e,this.s=+t,this.l=+r,this.opacity=+s}function KW(e){return(e=(e||0)%360)<0?e+360:e}function GW(e){return Math.max(0,Math.min(1,e||0))}function YW(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}function XW(e,t,r,s,n){var a=e*e,i=a*e;return((1-3*e+3*a-i)*t+(4-6*a+3*i)*r+(1+3*e+3*a-3*i)*s+i*n)/6}gW(vW,MW,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:PW,formatHex:PW,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return qW(this).formatHsl()},formatRgb:DW,toString:DW}),gW(LW,FW,xW(vW,{brighter(e){return e=null==e?bW:Math.pow(bW,e),new LW(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?yW:Math.pow(yW,e),new LW(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new LW(VW(this.r),VW(this.g),VW(this.b),UW(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:BW,formatHex:BW,formatHex8:function(){return`#${$W(this.r)}${$W(this.g)}${$W(this.b)}${$W(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:zW,toString:zW})),gW(WW,function(e,t,r,s){return 1===arguments.length?qW(e):new WW(e,t,r,null==s?1:s)},xW(vW,{brighter(e){return e=null==e?bW:Math.pow(bW,e),new WW(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?yW:Math.pow(yW,e),new WW(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,s=r+(r<.5?r:1-r)*t,n=2*r-s;return new LW(YW(e>=240?e-240:e+120,n,s),YW(e,n,s),YW(e<120?e+240:e-120,n,s),this.opacity)},clamp(){return new WW(KW(this.h),GW(this.s),GW(this.l),UW(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=UW(this.opacity);return`${1===e?"hsl(":"hsla("}${KW(this.h)}, ${100*GW(this.s)}%, ${100*GW(this.l)}%${1===e?")":`, ${e})`}`}}));var QW=e=>()=>e;function ZW(e){return 1===(e=+e)?JW:function(t,r){return r-t?function(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(s){return Math.pow(e+s*t,r)}}(t,r,e):QW(isNaN(t)?r:t)}}function JW(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):QW(isNaN(e)?t:e)}var eK=function e(t){var r=ZW(t);function s(e,t){var s=r((e=FW(e)).r,(t=FW(t)).r),n=r(e.g,t.g),a=r(e.b,t.b),i=JW(e.opacity,t.opacity);return function(t){return e.r=s(t),e.g=n(t),e.b=a(t),e.opacity=i(t),e+""}}return s.gamma=e,s}(1);function tK(e){return function(t){var r,s,n=t.length,a=new Array(n),i=new Array(n),o=new Array(n);for(r=0;r0))return i;let o;do{i.push(o=new Date(+r)),t(r,a),e(r)}while(o=0?(e[i][r][0]=n,e[i][r][1]=n+o,n=e[i][r][1]):(e[i][r][0]=a,e[i][r][1]=a+o,a=e[i][r][1])}},expand:function(e,t){if((s=e.length)>0){for(var r,s,n,a=0,i=e[0].length;a0){for(var r,s=0,n=e[t[0]],a=n.length;s0&&(s=(r=e[t[0]]).length)>0){for(var r,s,n,a=0,i=1;i=0?(e[a][r][0]=n,e[a][r][1]=n+i,n=e[a][r][1]):(e[a][r][0]=0,e[a][r][1]=0)}}},xZ=function(e,t,r){var s=t.map(function(e){return e.props.dataKey}),n=gZ[r];return function(){var e=Tz([]),t=AU,r=TU,s=OU;function n(n){var a,i,o=Array.from(e.apply(this,arguments),PU),l=o.length,c=-1;for(const e of n)for(a=0,++c;a