@malloy-publisher/sdk 0.0.32 → 0.0.33
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.
- package/dist/index.cjs.js +15 -10
- package/dist/index.es.js +893 -875
- package/package.json +1 -1
- package/src/components/Notebook/NotebookCell.tsx +39 -26
- package/src/components/Package/Package.tsx +1 -1
- package/src/components/RenderedResult/ResultContainer.tsx +11 -13
- package/src/components/highlighter.ts +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";var qHt=Object.defineProperty;var UHt=(a,u,d)=>u in a?qHt(a,u,{enumerable:!0,configurable:!0,writable:!0,value:d}):a[u]=d;var Pt=(a,u,d)=>UHt(a,typeof u!="symbol"?u+"":u,d);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("./vendor-BH1c2Hhy.cjs"),Pe=require("react"),jv=require("react-dom"),zHt=require("react-router-dom");function tIe(a){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const d in a)if(d!=="default"){const f=Object.getOwnPropertyDescriptor(a,d);Object.defineProperty(u,d,f.get?f:{enumerable:!0,get:()=>a[d]})}}return u.default=a,Object.freeze(u)}const Y=tIe(Pe),RM=tIe(jv),ps="http://localhost/api/v0".replace(/\/+$/,"");class Lx{constructor(u,d=ps,f=D.axios){Pt(this,"configuration");this.basePath=d,this.axios=f,u&&(this.configuration=u,this.basePath=u.basePath??d)}}class HHt extends Error{constructor(u,d){super(d),this.field=u,this.name="RequiredError"}}const _s={},Ss="https://example.com",En=function(a,u,d){if(d==null)throw new HHt(u,`Required parameter ${u} was null or undefined when calling ${a}.`)};function une(a,u,d=""){u!=null&&(typeof u=="object"?Array.isArray(u)?u.forEach(f=>une(a,f,d)):Object.keys(u).forEach(f=>une(a,u[f],`${d}${d!==""?".":""}${f}`)):a.has(d)?a.append(d,u):a.set(d,u))}const As=function(a,...u){const d=new URLSearchParams(a.search);une(d,u),a.search=d.toString()},Cs=function(a){return a.pathname+a.search+a.hash},Rs=function(a,u,d,f){return(m=u,g=d)=>{const x={...a.options,url:(m.defaults.baseURL?"":f?.basePath??g)+a.url};return m.request(x)}},GHt=function(a){return{getConnection:async(u,d,f={})=>{En("getConnection","projectName",u),En("getConnection","connectionName",d);const m="/projects/{projectName}/connections/{connectionName}".replace("{projectName}",encodeURIComponent(String(u))).replace("{connectionName}",encodeURIComponent(String(d))),g=new URL(m,Ss);let x;a&&(x=a.baseOptions);const b={method:"GET",...x,...f},v={};As(g,{});let S=x&&x.headers?x.headers:{};return b.headers={...v,...S,...f.headers},{url:Cs(g),options:b}},getQuerydata:async(u,d,f,m,g={})=>{En("getQuerydata","projectName",u),En("getQuerydata","connectionName",d);const x="/projects/{projectName}/connections/{connectionName}/queryData".replace("{projectName}",encodeURIComponent(String(u))).replace("{connectionName}",encodeURIComponent(String(d))),b=new URL(x,Ss);let v;a&&(v=a.baseOptions);const _={method:"GET",...v,...g},S={},R={};f!==void 0&&(R.sqlStatement=f),m!==void 0&&(R.options=m),As(b,R);let w=v&&v.headers?v.headers:{};return _.headers={...S,...w,...g.headers},{url:Cs(b),options:_}},getSqlsource:async(u,d,f,m={})=>{En("getSqlsource","projectName",u),En("getSqlsource","connectionName",d);const g="/projects/{projectName}/connections/{connectionName}/sqlSource".replace("{projectName}",encodeURIComponent(String(u))).replace("{connectionName}",encodeURIComponent(String(d))),x=new URL(g,Ss);let b;a&&(b=a.baseOptions);const v={method:"GET",...b,...m},_={},S={};f!==void 0&&(S.sqlStatement=f),As(x,S);let R=b&&b.headers?b.headers:{};return v.headers={..._,...R,...m.headers},{url:Cs(x),options:v}},getTablesource:async(u,d,f,m,g={})=>{En("getTablesource","projectName",u),En("getTablesource","connectionName",d);const x="/projects/{projectName}/connections/{connectionName}/tableSource".replace("{projectName}",encodeURIComponent(String(u))).replace("{connectionName}",encodeURIComponent(String(d))),b=new URL(x,Ss);let v;a&&(v=a.baseOptions);const _={method:"GET",...v,...g},S={},R={};f!==void 0&&(R.tableKey=f),m!==void 0&&(R.tablePath=m),As(b,R);let w=v&&v.headers?v.headers:{};return _.headers={...S,...w,...g.headers},{url:Cs(b),options:_}},getTemporarytable:async(u,d,f,m={})=>{En("getTemporarytable","projectName",u),En("getTemporarytable","connectionName",d);const g="/projects/{projectName}/connections/{connectionName}/temporaryTable".replace("{projectName}",encodeURIComponent(String(u))).replace("{connectionName}",encodeURIComponent(String(d))),x=new URL(g,Ss);let b;a&&(b=a.baseOptions);const v={method:"GET",...b,...m},_={},S={};f!==void 0&&(S.sqlStatement=f),As(x,S);let R=b&&b.headers?b.headers:{};return v.headers={..._,...R,...m.headers},{url:Cs(x),options:v}},getTest:async(u,d,f={})=>{En("getTest","projectName",u),En("getTest","connectionName",d);const m="/projects/{projectName}/connections/{connectionName}/test".replace("{projectName}",encodeURIComponent(String(u))).replace("{connectionName}",encodeURIComponent(String(d))),g=new URL(m,Ss);let x;a&&(x=a.baseOptions);const b={method:"GET",...x,...f},v={};As(g,{});let S=x&&x.headers?x.headers:{};return b.headers={...v,...S,...f.headers},{url:Cs(g),options:b}},listConnections:async(u,d={})=>{En("listConnections","projectName",u);const f="/projects/{projectName}/connections".replace("{projectName}",encodeURIComponent(String(u))),m=new URL(f,Ss);let g;a&&(g=a.baseOptions);const x={method:"GET",...g,...d},b={};As(m,{});let _=g&&g.headers?g.headers:{};return x.headers={...b,..._,...d.headers},{url:Cs(m),options:x}},listSchemas:async(u,d,f={})=>{En("listSchemas","projectName",u),En("listSchemas","connectionName",d);const m="/projects/{projectName}/connections/{connectionName}/schemas".replace("{projectName}",encodeURIComponent(String(u))).replace("{connectionName}",encodeURIComponent(String(d))),g=new URL(m,Ss);let x;a&&(x=a.baseOptions);const b={method:"GET",...x,...f},v={};As(g,{});let S=x&&x.headers?x.headers:{};return b.headers={...v,...S,...f.headers},{url:Cs(g),options:b}},listTables:async(u,d,f,m={})=>{En("listTables","projectName",u),En("listTables","connectionName",d),En("listTables","schemaName",f);const g="/projects/{projectName}/connections/{connectionName}/schemas/{schemaName}/tables".replace("{projectName}",encodeURIComponent(String(u))).replace("{connectionName}",encodeURIComponent(String(d))).replace("{schemaName}",encodeURIComponent(String(f))),x=new URL(g,Ss);let b;a&&(b=a.baseOptions);const v={method:"GET",...b,...m},_={};As(x,{});let R=b&&b.headers?b.headers:{};return v.headers={..._,...R,...m.headers},{url:Cs(x),options:v}}}},Wp=function(a){const u=GHt(a);return{async getConnection(d,f,m){const g=await u.getConnection(d,f,m),x=a?.serverIndex??0,b=_s["ConnectionsApi.getConnection"]?.[x]?.url;return(v,_)=>Rs(g,D.axios,ps,a)(v,b||_)},async getQuerydata(d,f,m,g,x){const b=await u.getQuerydata(d,f,m,g,x),v=a?.serverIndex??0,_=_s["ConnectionsApi.getQuerydata"]?.[v]?.url;return(S,R)=>Rs(b,D.axios,ps,a)(S,_||R)},async getSqlsource(d,f,m,g){const x=await u.getSqlsource(d,f,m,g),b=a?.serverIndex??0,v=_s["ConnectionsApi.getSqlsource"]?.[b]?.url;return(_,S)=>Rs(x,D.axios,ps,a)(_,v||S)},async getTablesource(d,f,m,g,x){const b=await u.getTablesource(d,f,m,g,x),v=a?.serverIndex??0,_=_s["ConnectionsApi.getTablesource"]?.[v]?.url;return(S,R)=>Rs(b,D.axios,ps,a)(S,_||R)},async getTemporarytable(d,f,m,g){const x=await u.getTemporarytable(d,f,m,g),b=a?.serverIndex??0,v=_s["ConnectionsApi.getTemporarytable"]?.[b]?.url;return(_,S)=>Rs(x,D.axios,ps,a)(_,v||S)},async getTest(d,f,m){const g=await u.getTest(d,f,m),x=a?.serverIndex??0,b=_s["ConnectionsApi.getTest"]?.[x]?.url;return(v,_)=>Rs(g,D.axios,ps,a)(v,b||_)},async listConnections(d,f){const m=await u.listConnections(d,f),g=a?.serverIndex??0,x=_s["ConnectionsApi.listConnections"]?.[g]?.url;return(b,v)=>Rs(m,D.axios,ps,a)(b,x||v)},async listSchemas(d,f,m){const g=await u.listSchemas(d,f,m),x=a?.serverIndex??0,b=_s["ConnectionsApi.listSchemas"]?.[x]?.url;return(v,_)=>Rs(g,D.axios,ps,a)(v,b||_)},async listTables(d,f,m,g){const x=await u.listTables(d,f,m,g),b=a?.serverIndex??0,v=_s["ConnectionsApi.listTables"]?.[b]?.url;return(_,S)=>Rs(x,D.axios,ps,a)(_,v||S)}}};class Aie extends Lx{getConnection(u,d,f){return Wp(this.configuration).getConnection(u,d,f).then(m=>m(this.axios,this.basePath))}getQuerydata(u,d,f,m,g){return Wp(this.configuration).getQuerydata(u,d,f,m,g).then(x=>x(this.axios,this.basePath))}getSqlsource(u,d,f,m){return Wp(this.configuration).getSqlsource(u,d,f,m).then(g=>g(this.axios,this.basePath))}getTablesource(u,d,f,m,g){return Wp(this.configuration).getTablesource(u,d,f,m,g).then(x=>x(this.axios,this.basePath))}getTemporarytable(u,d,f,m){return Wp(this.configuration).getTemporarytable(u,d,f,m).then(g=>g(this.axios,this.basePath))}getTest(u,d,f){return Wp(this.configuration).getTest(u,d,f).then(m=>m(this.axios,this.basePath))}listConnections(u,d){return Wp(this.configuration).listConnections(u,d).then(f=>f(this.axios,this.basePath))}listSchemas(u,d,f){return Wp(this.configuration).listSchemas(u,d,f).then(m=>m(this.axios,this.basePath))}listTables(u,d,f,m){return Wp(this.configuration).listTables(u,d,f,m).then(g=>g(this.axios,this.basePath))}}const WHt=function(a){return{listDatabases:async(u,d,f,m={})=>{En("listDatabases","projectName",u),En("listDatabases","packageName",d);const g="/projects/{projectName}/packages/{packageName}/databases".replace("{projectName}",encodeURIComponent(String(u))).replace("{packageName}",encodeURIComponent(String(d))),x=new URL(g,Ss);let b;a&&(b=a.baseOptions);const v={method:"GET",...b,...m},_={},S={};f!==void 0&&(S.versionId=f),As(x,S);let R=b&&b.headers?b.headers:{};return v.headers={..._,...R,...m.headers},{url:Cs(x),options:v}}}},VHt=function(a){const u=WHt(a);return{async listDatabases(d,f,m,g){const x=await u.listDatabases(d,f,m,g),b=a?.serverIndex??0,v=_s["DatabasesApi.listDatabases"]?.[b]?.url;return(_,S)=>Rs(x,D.axios,ps,a)(_,v||S)}}};class QHt extends Lx{listDatabases(u,d,f,m){return VHt(this.configuration).listDatabases(u,d,f,m).then(g=>g(this.axios,this.basePath))}}const YHt=function(a){return{getModel:async(u,d,f,m,g={})=>{En("getModel","projectName",u),En("getModel","packageName",d),En("getModel","path",f);const x="/projects/{projectName}/packages/{packageName}/models/{path}".replace("{projectName}",encodeURIComponent(String(u))).replace("{packageName}",encodeURIComponent(String(d))).replace("{path}",encodeURIComponent(String(f))),b=new URL(x,Ss);let v;a&&(v=a.baseOptions);const _={method:"GET",...v,...g},S={},R={};m!==void 0&&(R.versionId=m),As(b,R);let w=v&&v.headers?v.headers:{};return _.headers={...S,...w,...g.headers},{url:Cs(b),options:_}},listModels:async(u,d,f,m={})=>{En("listModels","projectName",u),En("listModels","packageName",d);const g="/projects/{projectName}/packages/{packageName}/models".replace("{projectName}",encodeURIComponent(String(u))).replace("{packageName}",encodeURIComponent(String(d))),x=new URL(g,Ss);let b;a&&(b=a.baseOptions);const v={method:"GET",...b,...m},_={},S={};f!==void 0&&(S.versionId=f),As(x,S);let R=b&&b.headers?b.headers:{};return v.headers={..._,...R,...m.headers},{url:Cs(x),options:v}}}},SNe=function(a){const u=YHt(a);return{async getModel(d,f,m,g,x){const b=await u.getModel(d,f,m,g,x),v=a?.serverIndex??0,_=_s["ModelsApi.getModel"]?.[v]?.url;return(S,R)=>Rs(b,D.axios,ps,a)(S,_||R)},async listModels(d,f,m,g){const x=await u.listModels(d,f,m,g),b=a?.serverIndex??0,v=_s["ModelsApi.listModels"]?.[b]?.url;return(_,S)=>Rs(x,D.axios,ps,a)(_,v||S)}}};class TM extends Lx{getModel(u,d,f,m,g){return SNe(this.configuration).getModel(u,d,f,m,g).then(x=>x(this.axios,this.basePath))}listModels(u,d,f,m){return SNe(this.configuration).listModels(u,d,f,m).then(g=>g(this.axios,this.basePath))}}const KHt=function(a){return{getNotebook:async(u,d,f,m,g={})=>{En("getNotebook","projectName",u),En("getNotebook","packageName",d),En("getNotebook","path",f);const x="/projects/{projectName}/packages/{packageName}/notebooks/{path}".replace("{projectName}",encodeURIComponent(String(u))).replace("{packageName}",encodeURIComponent(String(d))).replace("{path}",encodeURIComponent(String(f))),b=new URL(x,Ss);let v;a&&(v=a.baseOptions);const _={method:"GET",...v,...g},S={},R={};m!==void 0&&(R.versionId=m),As(b,R);let w=v&&v.headers?v.headers:{};return _.headers={...S,...w,...g.headers},{url:Cs(b),options:_}},listNotebooks:async(u,d,f,m={})=>{En("listNotebooks","projectName",u),En("listNotebooks","packageName",d);const g="/projects/{projectName}/packages/{packageName}/notebooks".replace("{projectName}",encodeURIComponent(String(u))).replace("{packageName}",encodeURIComponent(String(d))),x=new URL(g,Ss);let b;a&&(b=a.baseOptions);const v={method:"GET",...b,...m},_={},S={};f!==void 0&&(S.versionId=f),As(x,S);let R=b&&b.headers?b.headers:{};return v.headers={..._,...R,...m.headers},{url:Cs(x),options:v}}}},ANe=function(a){const u=KHt(a);return{async getNotebook(d,f,m,g,x){const b=await u.getNotebook(d,f,m,g,x),v=a?.serverIndex??0,_=_s["NotebooksApi.getNotebook"]?.[v]?.url;return(S,R)=>Rs(b,D.axios,ps,a)(S,_||R)},async listNotebooks(d,f,m,g){const x=await u.listNotebooks(d,f,m,g),b=a?.serverIndex??0,v=_s["NotebooksApi.listNotebooks"]?.[b]?.url;return(_,S)=>Rs(x,D.axios,ps,a)(_,v||S)}}};class rIe extends Lx{getNotebook(u,d,f,m,g){return ANe(this.configuration).getNotebook(u,d,f,m,g).then(x=>x(this.axios,this.basePath))}listNotebooks(u,d,f,m){return ANe(this.configuration).listNotebooks(u,d,f,m).then(g=>g(this.axios,this.basePath))}}const XHt=function(a){return{getPackage:async(u,d,f,m,g={})=>{En("getPackage","projectName",u),En("getPackage","packageName",d);const x="/projects/{projectName}/packages/{packageName}".replace("{projectName}",encodeURIComponent(String(u))).replace("{packageName}",encodeURIComponent(String(d))),b=new URL(x,Ss);let v;a&&(v=a.baseOptions);const _={method:"GET",...v,...g},S={},R={};f!==void 0&&(R.versionId=f),m!==void 0&&(R.reload=m),As(b,R);let w=v&&v.headers?v.headers:{};return _.headers={...S,...w,...g.headers},{url:Cs(b),options:_}},listPackages:async(u,d={})=>{En("listPackages","projectName",u);const f="/projects/{projectName}/packages".replace("{projectName}",encodeURIComponent(String(u))),m=new URL(f,Ss);let g;a&&(g=a.baseOptions);const x={method:"GET",...g,...d},b={};As(m,{});let _=g&&g.headers?g.headers:{};return x.headers={...b,..._,...d.headers},{url:Cs(m),options:x}}}},CNe=function(a){const u=XHt(a);return{async getPackage(d,f,m,g,x){const b=await u.getPackage(d,f,m,g,x),v=a?.serverIndex??0,_=_s["PackagesApi.getPackage"]?.[v]?.url;return(S,R)=>Rs(b,D.axios,ps,a)(S,_||R)},async listPackages(d,f){const m=await u.listPackages(d,f),g=a?.serverIndex??0,x=_s["PackagesApi.listPackages"]?.[g]?.url;return(b,v)=>Rs(m,D.axios,ps,a)(b,x||v)}}};class nIe extends Lx{getPackage(u,d,f,m,g){return CNe(this.configuration).getPackage(u,d,f,m,g).then(x=>x(this.axios,this.basePath))}listPackages(u,d){return CNe(this.configuration).listPackages(u,d).then(f=>f(this.axios,this.basePath))}}const JHt=function(a){return{getProject:async(u,d,f={})=>{En("getProject","projectName",u);const m="/projects/{projectName}".replace("{projectName}",encodeURIComponent(String(u))),g=new URL(m,Ss);let x;a&&(x=a.baseOptions);const b={method:"GET",...x,...f},v={},_={};d!==void 0&&(_.reload=d),As(g,_);let S=x&&x.headers?x.headers:{};return b.headers={...v,...S,...f.headers},{url:Cs(g),options:b}},listProjects:async(u={})=>{const d="/projects",f=new URL(d,Ss);let m;a&&(m=a.baseOptions);const g={method:"GET",...m,...u},x={};As(f,{});let v=m&&m.headers?m.headers:{};return g.headers={...x,...v,...u.headers},{url:Cs(f),options:g}}}},RNe=function(a){const u=JHt(a);return{async getProject(d,f,m){const g=await u.getProject(d,f,m),x=a?.serverIndex??0,b=_s["ProjectsApi.getProject"]?.[x]?.url;return(v,_)=>Rs(g,D.axios,ps,a)(v,b||_)},async listProjects(d){const f=await u.listProjects(d),m=a?.serverIndex??0,g=_s["ProjectsApi.listProjects"]?.[m]?.url;return(x,b)=>Rs(f,D.axios,ps,a)(x,g||b)}}};class iIe extends Lx{getProject(u,d,f){return RNe(this.configuration).getProject(u,d,f).then(m=>m(this.axios,this.basePath))}listProjects(u){return RNe(this.configuration).listProjects(u).then(d=>d(this.axios,this.basePath))}}const ZHt=function(a){return{executeQuery:async(u,d,f,m,g,x,b,v={})=>{En("executeQuery","projectName",u),En("executeQuery","packageName",d),En("executeQuery","path",f);const _="/projects/{projectName}/packages/{packageName}/queryResults/{path}".replace("{projectName}",encodeURIComponent(String(u))).replace("{packageName}",encodeURIComponent(String(d))).replace("{path}",encodeURIComponent(String(f))),S=new URL(_,Ss);let R;a&&(R=a.baseOptions);const w={method:"GET",...R,...v},N={},k={};m!==void 0&&(k.query=m),g!==void 0&&(k.sourceName=g),x!==void 0&&(k.queryName=x),b!==void 0&&(k.versionId=b),As(S,k);let B=R&&R.headers?R.headers:{};return w.headers={...N,...B,...v.headers},{url:Cs(S),options:w}}}},eGt=function(a){const u=ZHt(a);return{async executeQuery(d,f,m,g,x,b,v,_){const S=await u.executeQuery(d,f,m,g,x,b,v,_),R=a?.serverIndex??0,w=_s["QueryresultsApi.executeQuery"]?.[R]?.url;return(N,k)=>Rs(S,D.axios,ps,a)(N,w||k)}}};class sIe extends Lx{executeQuery(u,d,f,m,g,x,b,v){return eGt(this.configuration).executeQuery(u,d,f,m,g,x,b,v).then(_=>_(this.axios,this.basePath))}}const tGt=function(a){return{listSchedules:async(u,d,f,m={})=>{En("listSchedules","projectName",u),En("listSchedules","packageName",d);const g="/projects/{projectName}/packages/{packageName}/schedules".replace("{projectName}",encodeURIComponent(String(u))).replace("{packageName}",encodeURIComponent(String(d))),x=new URL(g,Ss);let b;a&&(b=a.baseOptions);const v={method:"GET",...b,...m},_={},S={};f!==void 0&&(S.versionId=f),As(x,S);let R=b&&b.headers?b.headers:{};return v.headers={..._,...R,...m.headers},{url:Cs(x),options:v}}}},rGt=function(a){const u=tGt(a);return{async listSchedules(d,f,m,g){const x=await u.listSchedules(d,f,m,g),b=a?.serverIndex??0,v=_s["SchedulesApi.listSchedules"]?.[b]?.url;return(_,S)=>Rs(x,D.axios,ps,a)(_,v||S)}}};class nGt extends Lx{listSchedules(u,d,f,m){return rGt(this.configuration).listSchedules(u,d,f,m).then(g=>g(this.axios,this.basePath))}}class Oo{constructor(u={}){Pt(this,"apiKey");Pt(this,"username");Pt(this,"password");Pt(this,"accessToken");Pt(this,"basePath");Pt(this,"serverIndex");Pt(this,"baseOptions");Pt(this,"formDataCtor");this.apiKey=u.apiKey,this.username=u.username,this.password=u.password,this.accessToken=u.accessToken,this.basePath=u.basePath,this.serverIndex=u.serverIndex,this.baseOptions=u.baseOptions,this.formDataCtor=u.formDataCtor}isJsonMime(u){const d=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return u!==null&&(d.test(u)||u.toLowerCase()==="application/json-patch+json")}}const oIe=[{id:"abap",name:"ABAP",import:()=>Promise.resolve().then(()=>require("./abap-Dwt2rH6y.cjs"))},{id:"actionscript-3",name:"ActionScript",import:()=>Promise.resolve().then(()=>require("./actionscript-3-mj8Uhnsc.cjs"))},{id:"ada",name:"Ada",import:()=>Promise.resolve().then(()=>require("./ada-DZM58Vqs.cjs"))},{id:"angular-html",name:"Angular HTML",import:()=>Promise.resolve().then(()=>require("./angular-html-BqlvNDNu.cjs")).then(a=>a.angularHtml)},{id:"angular-ts",name:"Angular TypeScript",import:()=>Promise.resolve().then(()=>require("./angular-ts-4ebgyujK.cjs"))},{id:"apache",name:"Apache Conf",import:()=>Promise.resolve().then(()=>require("./apache-D7v5fxtZ.cjs"))},{id:"apex",name:"Apex",import:()=>Promise.resolve().then(()=>require("./apex-4hrAnw0a.cjs"))},{id:"apl",name:"APL",import:()=>Promise.resolve().then(()=>require("./apl-BeeGx1jW.cjs"))},{id:"applescript",name:"AppleScript",import:()=>Promise.resolve().then(()=>require("./applescript-Cnd3Dxju.cjs"))},{id:"ara",name:"Ara",import:()=>Promise.resolve().then(()=>require("./ara-BQ2aGbFQ.cjs"))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>Promise.resolve().then(()=>require("./asciidoc-C6nYvw8K.cjs"))},{id:"asm",name:"Assembly",import:()=>Promise.resolve().then(()=>require("./asm-CQnBVCj-.cjs"))},{id:"astro",name:"Astro",import:()=>Promise.resolve().then(()=>require("./astro-UBxncqOW.cjs"))},{id:"awk",name:"AWK",import:()=>Promise.resolve().then(()=>require("./awk-DUx4h__E.cjs"))},{id:"ballerina",name:"Ballerina",import:()=>Promise.resolve().then(()=>require("./ballerina-CXlzbmzl.cjs"))},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>Promise.resolve().then(()=>require("./bat-DlMT9sut.cjs"))},{id:"beancount",name:"Beancount",import:()=>Promise.resolve().then(()=>require("./beancount-CyyiuUzM.cjs"))},{id:"berry",name:"Berry",aliases:["be"],import:()=>Promise.resolve().then(()=>require("./berry-B0EjuzrL.cjs"))},{id:"bibtex",name:"BibTeX",import:()=>Promise.resolve().then(()=>require("./bibtex-CfoG9xRq.cjs"))},{id:"bicep",name:"Bicep",import:()=>Promise.resolve().then(()=>require("./bicep-D6PH_9IY.cjs"))},{id:"blade",name:"Blade",import:()=>Promise.resolve().then(()=>require("./blade-DYqOCSTj.cjs"))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>Promise.resolve().then(()=>require("./bsl-zRqJRzLj.cjs"))},{id:"c",name:"C",import:()=>Promise.resolve().then(()=>require("./c-C4sXGJZM.cjs"))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>Promise.resolve().then(()=>require("./cadence-Dq2CYzXG.cjs"))},{id:"cairo",name:"Cairo",import:()=>Promise.resolve().then(()=>require("./cairo-C5yDOd-R.cjs"))},{id:"clarity",name:"Clarity",import:()=>Promise.resolve().then(()=>require("./clarity-ytMkUD5Q.cjs"))},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>Promise.resolve().then(()=>require("./clojure-B_Wv414H.cjs"))},{id:"cmake",name:"CMake",import:()=>Promise.resolve().then(()=>require("./cmake-TBUaQXYY.cjs"))},{id:"cobol",name:"COBOL",import:()=>Promise.resolve().then(()=>require("./cobol-D9bHhy8D.cjs"))},{id:"codeowners",name:"CODEOWNERS",import:()=>Promise.resolve().then(()=>require("./codeowners-QhPK6lIJ.cjs"))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>Promise.resolve().then(()=>require("./codeql-B7Q9tkDJ.cjs"))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>Promise.resolve().then(()=>require("./coffee-ZdyLosN6.cjs"))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>Promise.resolve().then(()=>require("./common-lisp-Ced3ctK5.cjs"))},{id:"coq",name:"Coq",import:()=>Promise.resolve().then(()=>require("./coq-BTRB4iqi.cjs"))},{id:"cpp",name:"C++",aliases:["c++"],import:()=>Promise.resolve().then(()=>require("./cpp-DgQ-zDub.cjs"))},{id:"crystal",name:"Crystal",import:()=>Promise.resolve().then(()=>require("./crystal-C5h1rMTi.cjs"))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>Promise.resolve().then(()=>require("./csharp-TKds-MhG.cjs"))},{id:"css",name:"CSS",import:()=>Promise.resolve().then(()=>require("./css-B0kbn78J.cjs"))},{id:"csv",name:"CSV",import:()=>Promise.resolve().then(()=>require("./csv-BVJjiaC3.cjs"))},{id:"cue",name:"CUE",import:()=>Promise.resolve().then(()=>require("./cue-Cz4J-rnd.cjs"))},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>Promise.resolve().then(()=>require("./cypher-DuKTiyez.cjs"))},{id:"d",name:"D",import:()=>Promise.resolve().then(()=>require("./d-BW9Wd7aK.cjs"))},{id:"dart",name:"Dart",import:()=>Promise.resolve().then(()=>require("./dart-CWs-er6b.cjs"))},{id:"dax",name:"DAX",import:()=>Promise.resolve().then(()=>require("./dax-CDxFL2Kb.cjs"))},{id:"desktop",name:"Desktop",import:()=>Promise.resolve().then(()=>require("./desktop-CFgo0jo7.cjs"))},{id:"diff",name:"Diff",import:()=>Promise.resolve().then(()=>require("./diff-BsEkKwI8.cjs"))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>Promise.resolve().then(()=>require("./docker-hwiw4W8I.cjs"))},{id:"dotenv",name:"dotEnv",import:()=>Promise.resolve().then(()=>require("./dotenv-CJ5o3G1C.cjs"))},{id:"dream-maker",name:"Dream Maker",import:()=>Promise.resolve().then(()=>require("./dream-maker-DBharE9Q.cjs"))},{id:"edge",name:"Edge",import:()=>Promise.resolve().then(()=>require("./edge-D4UQJJI4.cjs"))},{id:"elixir",name:"Elixir",import:()=>Promise.resolve().then(()=>require("./elixir-Drlan-oo.cjs"))},{id:"elm",name:"Elm",import:()=>Promise.resolve().then(()=>require("./elm-BcZHvJ8F.cjs"))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>Promise.resolve().then(()=>require("./emacs-lisp-CDDyFsvQ.cjs"))},{id:"erb",name:"ERB",import:()=>Promise.resolve().then(()=>require("./erb-CnncUHI5.cjs"))},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>Promise.resolve().then(()=>require("./erlang-3VgdrQXV.cjs"))},{id:"fennel",name:"Fennel",import:()=>Promise.resolve().then(()=>require("./fennel-BvcDRFAV.cjs"))},{id:"fish",name:"Fish",import:()=>Promise.resolve().then(()=>require("./fish-CnamI0Ar.cjs"))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>Promise.resolve().then(()=>require("./fluent-DFpT66K8.cjs"))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>Promise.resolve().then(()=>require("./fortran-fixed-form-BEveYJYo.cjs"))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>Promise.resolve().then(()=>require("./fortran-free-form-IaGrWIda.cjs"))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>Promise.resolve().then(()=>require("./fsharp-JIb2RzF4.cjs"))},{id:"gdresource",name:"GDResource",import:()=>Promise.resolve().then(()=>require("./gdresource-YnzGv0RG.cjs"))},{id:"gdscript",name:"GDScript",import:()=>Promise.resolve().then(()=>require("./gdscript-5N_43TPQ.cjs"))},{id:"gdshader",name:"GDShader",import:()=>Promise.resolve().then(()=>require("./gdshader-Bl85Hrm5.cjs"))},{id:"genie",name:"Genie",import:()=>Promise.resolve().then(()=>require("./genie-DGsxMAbQ.cjs"))},{id:"gherkin",name:"Gherkin",import:()=>Promise.resolve().then(()=>require("./gherkin-CVV6nEUH.cjs"))},{id:"git-commit",name:"Git Commit Message",import:()=>Promise.resolve().then(()=>require("./git-commit-CBAAAmmS.cjs"))},{id:"git-rebase",name:"Git Rebase Message",import:()=>Promise.resolve().then(()=>require("./git-rebase-teQnnXpn.cjs"))},{id:"gleam",name:"Gleam",import:()=>Promise.resolve().then(()=>require("./gleam-nR4mjrhK.cjs"))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>Promise.resolve().then(()=>require("./glimmer-js-DAfoXdQ-.cjs"))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>Promise.resolve().then(()=>require("./glimmer-ts-CeO7A1-5.cjs"))},{id:"glsl",name:"GLSL",import:()=>Promise.resolve().then(()=>require("./glsl-RcB3ToOh.cjs"))},{id:"gnuplot",name:"Gnuplot",import:()=>Promise.resolve().then(()=>require("./gnuplot-CurtDYoJ.cjs"))},{id:"go",name:"Go",import:()=>Promise.resolve().then(()=>require("./go-CM9_GlwL.cjs"))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>Promise.resolve().then(()=>require("./graphql-DWzZPj_V.cjs"))},{id:"groovy",name:"Groovy",import:()=>Promise.resolve().then(()=>require("./groovy-BaVp9Il5.cjs"))},{id:"hack",name:"Hack",import:()=>Promise.resolve().then(()=>require("./hack-DDrvhASj.cjs"))},{id:"haml",name:"Ruby Haml",import:()=>Promise.resolve().then(()=>require("./haml-BK3-xJKV.cjs"))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>Promise.resolve().then(()=>require("./handlebars-DjnxWdl9.cjs"))},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>Promise.resolve().then(()=>require("./haskell-suhyCHEm.cjs"))},{id:"haxe",name:"Haxe",import:()=>Promise.resolve().then(()=>require("./haxe-BIQU1qHi.cjs"))},{id:"hcl",name:"HashiCorp HCL",import:()=>Promise.resolve().then(()=>require("./hcl-CbQ1yCnz.cjs"))},{id:"hjson",name:"Hjson",import:()=>Promise.resolve().then(()=>require("./hjson-Ddklb4QM.cjs"))},{id:"hlsl",name:"HLSL",import:()=>Promise.resolve().then(()=>require("./hlsl-B4NkiBfC.cjs"))},{id:"html",name:"HTML",import:()=>Promise.resolve().then(()=>require("./html-DiyIZFpA.cjs"))},{id:"html-derivative",name:"HTML (Derivative)",import:()=>Promise.resolve().then(()=>require("./html-derivative-m27xHPNF.cjs"))},{id:"http",name:"HTTP",import:()=>Promise.resolve().then(()=>require("./http-B4wR56ug.cjs"))},{id:"hxml",name:"HXML",import:()=>Promise.resolve().then(()=>require("./hxml-Bv32SKqg.cjs"))},{id:"hy",name:"Hy",import:()=>Promise.resolve().then(()=>require("./hy-DpyTdO3T.cjs"))},{id:"imba",name:"Imba",import:()=>Promise.resolve().then(()=>require("./imba-B0C0YBnY.cjs"))},{id:"ini",name:"INI",aliases:["properties"],import:()=>Promise.resolve().then(()=>require("./ini-CymULaw_.cjs"))},{id:"java",name:"Java",import:()=>Promise.resolve().then(()=>require("./java-Bn1Lvoni.cjs"))},{id:"javascript",name:"JavaScript",aliases:["js"],import:()=>Promise.resolve().then(()=>require("./javascript-Bnnicc83.cjs"))},{id:"jinja",name:"Jinja",import:()=>Promise.resolve().then(()=>require("./jinja-D8wWNdMe.cjs"))},{id:"jison",name:"Jison",import:()=>Promise.resolve().then(()=>require("./jison-f6CjvOiG.cjs"))},{id:"json",name:"JSON",import:()=>Promise.resolve().then(()=>require("./json-y-J1j5EW.cjs"))},{id:"json5",name:"JSON5",import:()=>Promise.resolve().then(()=>require("./json5-CzvlWgZ7.cjs"))},{id:"jsonc",name:"JSON with Comments",import:()=>Promise.resolve().then(()=>require("./jsonc-BnhWfmQw.cjs"))},{id:"jsonl",name:"JSON Lines",import:()=>Promise.resolve().then(()=>require("./jsonl-BbGkWPJz.cjs"))},{id:"jsonnet",name:"Jsonnet",import:()=>Promise.resolve().then(()=>require("./jsonnet-Bn--UDZ1.cjs"))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>Promise.resolve().then(()=>require("./jssm-4CSVp8lc.cjs"))},{id:"jsx",name:"JSX",import:()=>Promise.resolve().then(()=>require("./jsx-D8YwVp-7.cjs"))},{id:"julia",name:"Julia",aliases:["jl"],import:()=>Promise.resolve().then(()=>require("./julia-CPt_7dt8.cjs"))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>Promise.resolve().then(()=>require("./kotlin-DDI6myF6.cjs"))},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>Promise.resolve().then(()=>require("./kusto-OZxALJZT.cjs"))},{id:"latex",name:"LaTeX",import:()=>Promise.resolve().then(()=>require("./latex-C1zmrAP3.cjs"))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>Promise.resolve().then(()=>require("./lean-D1iY-35j.cjs"))},{id:"less",name:"Less",import:()=>Promise.resolve().then(()=>require("./less-DIaY7vQJ.cjs"))},{id:"liquid",name:"Liquid",import:()=>Promise.resolve().then(()=>require("./liquid-mYFf3Ubk.cjs"))},{id:"log",name:"Log file",import:()=>Promise.resolve().then(()=>require("./log-BIXUeBaj.cjs"))},{id:"logo",name:"Logo",import:()=>Promise.resolve().then(()=>require("./logo-B2d3b27P.cjs"))},{id:"lua",name:"Lua",import:()=>Promise.resolve().then(()=>require("./lua-BNycEOCj.cjs"))},{id:"luau",name:"Luau",import:()=>Promise.resolve().then(()=>require("./luau-CvqAeq4F.cjs"))},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>Promise.resolve().then(()=>require("./make-Oob5Z9Pk.cjs"))},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>Promise.resolve().then(()=>require("./markdown-BGBuj4LZ.cjs"))},{id:"marko",name:"Marko",import:()=>Promise.resolve().then(()=>require("./marko-orX0YPzY.cjs"))},{id:"matlab",name:"MATLAB",import:()=>Promise.resolve().then(()=>require("./matlab-CbN2rF6P.cjs"))},{id:"mdc",name:"MDC",import:()=>Promise.resolve().then(()=>require("./mdc-BNCAtGbK.cjs"))},{id:"mdx",name:"MDX",import:()=>Promise.resolve().then(()=>require("./mdx-Cl31h8mi.cjs"))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>Promise.resolve().then(()=>require("./mermaid-CSogK_LM.cjs"))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>Promise.resolve().then(()=>require("./mipsasm-BseoYJQp.cjs"))},{id:"mojo",name:"Mojo",import:()=>Promise.resolve().then(()=>require("./mojo-D8QAG3Ze.cjs"))},{id:"move",name:"Move",import:()=>Promise.resolve().then(()=>require("./move-DaBrcjat.cjs"))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>Promise.resolve().then(()=>require("./narrat-oOfAO4q8.cjs"))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>Promise.resolve().then(()=>require("./nextflow-BxJSKvPb.cjs"))},{id:"nginx",name:"Nginx",import:()=>Promise.resolve().then(()=>require("./nginx-CWVY90PN.cjs"))},{id:"nim",name:"Nim",import:()=>Promise.resolve().then(()=>require("./nim-CwodQ6jZ.cjs"))},{id:"nix",name:"Nix",import:()=>Promise.resolve().then(()=>require("./nix-DNME0Ea7.cjs"))},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>Promise.resolve().then(()=>require("./nushell-DI9Z3l3M.cjs"))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>Promise.resolve().then(()=>require("./objective-c-DVx8Rcni.cjs"))},{id:"objective-cpp",name:"Objective-C++",import:()=>Promise.resolve().then(()=>require("./objective-cpp-s6XI7Jvk.cjs"))},{id:"ocaml",name:"OCaml",import:()=>Promise.resolve().then(()=>require("./ocaml-kUzDDUf2.cjs"))},{id:"pascal",name:"Pascal",import:()=>Promise.resolve().then(()=>require("./pascal-D509_I72.cjs"))},{id:"perl",name:"Perl",import:()=>Promise.resolve().then(()=>require("./perl-CzmOInqo.cjs"))},{id:"php",name:"PHP",import:()=>Promise.resolve().then(()=>require("./php-YwMoY7CJ.cjs"))},{id:"plsql",name:"PL/SQL",import:()=>Promise.resolve().then(()=>require("./plsql-C_qH_YOK.cjs"))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>Promise.resolve().then(()=>require("./po-CBsLQIcu.cjs"))},{id:"polar",name:"Polar",import:()=>Promise.resolve().then(()=>require("./polar-De-CDeYv.cjs"))},{id:"postcss",name:"PostCSS",import:()=>Promise.resolve().then(()=>require("./postcss-BtcsgaYj.cjs"))},{id:"powerquery",name:"PowerQuery",import:()=>Promise.resolve().then(()=>require("./powerquery-B0rHn13V.cjs"))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>Promise.resolve().then(()=>require("./powershell-rCX2OYXT.cjs"))},{id:"prisma",name:"Prisma",import:()=>Promise.resolve().then(()=>require("./prisma-BaaUHYMp.cjs"))},{id:"prolog",name:"Prolog",import:()=>Promise.resolve().then(()=>require("./prolog-DrXD2tGS.cjs"))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>Promise.resolve().then(()=>require("./proto-BtmQjBQu.cjs"))},{id:"pug",name:"Pug",aliases:["jade"],import:()=>Promise.resolve().then(()=>require("./pug-CkHoCGUm.cjs"))},{id:"puppet",name:"Puppet",import:()=>Promise.resolve().then(()=>require("./puppet-cIrXIuy8.cjs"))},{id:"purescript",name:"PureScript",import:()=>Promise.resolve().then(()=>require("./purescript-CX9QPs2N.cjs"))},{id:"python",name:"Python",aliases:["py"],import:()=>Promise.resolve().then(()=>require("./python-B9x3euv6.cjs"))},{id:"qml",name:"QML",import:()=>Promise.resolve().then(()=>require("./qml-Dwwb3xcM.cjs"))},{id:"qmldir",name:"QML Directory",import:()=>Promise.resolve().then(()=>require("./qmldir-DNF9H2ir.cjs"))},{id:"qss",name:"Qt Style Sheets",import:()=>Promise.resolve().then(()=>require("./qss-C744dLby.cjs"))},{id:"r",name:"R",import:()=>Promise.resolve().then(()=>require("./r-DgOc9oMe.cjs"))},{id:"racket",name:"Racket",import:()=>Promise.resolve().then(()=>require("./racket-Do9_vqnd.cjs"))},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>Promise.resolve().then(()=>require("./raku-BW8wAUIz.cjs"))},{id:"razor",name:"ASP.NET Razor",import:()=>Promise.resolve().then(()=>require("./razor-g8HV3m4q.cjs"))},{id:"reg",name:"Windows Registry Script",import:()=>Promise.resolve().then(()=>require("./reg-CGWN_v-z.cjs"))},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>Promise.resolve().then(()=>require("./regexp-N7Z4hEeU.cjs"))},{id:"rel",name:"Rel",import:()=>Promise.resolve().then(()=>require("./rel-BYqA7mnV.cjs"))},{id:"riscv",name:"RISC-V",import:()=>Promise.resolve().then(()=>require("./riscv-ayQMUpo9.cjs"))},{id:"rst",name:"reStructuredText",import:()=>Promise.resolve().then(()=>require("./rst-MlYKz4rn.cjs"))},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>Promise.resolve().then(()=>require("./ruby-DJN5DFiR.cjs"))},{id:"rust",name:"Rust",aliases:["rs"],import:()=>Promise.resolve().then(()=>require("./rust-BnFKGEfa.cjs"))},{id:"sas",name:"SAS",import:()=>Promise.resolve().then(()=>require("./sas-F7gHsd4H.cjs"))},{id:"sass",name:"Sass",import:()=>Promise.resolve().then(()=>require("./sass-B9gYryDE.cjs"))},{id:"scala",name:"Scala",import:()=>Promise.resolve().then(()=>require("./scala-C85dOwSU.cjs"))},{id:"scheme",name:"Scheme",import:()=>Promise.resolve().then(()=>require("./scheme-B_XUaARm.cjs"))},{id:"scss",name:"SCSS",import:()=>Promise.resolve().then(()=>require("./scss-Bn9tb5MW.cjs"))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>Promise.resolve().then(()=>require("./sdbl-7Y5u0OW0.cjs"))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>Promise.resolve().then(()=>require("./shaderlab-Ca09aCzm.cjs"))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>Promise.resolve().then(()=>require("./shellscript-3DYM9fut.cjs"))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>Promise.resolve().then(()=>require("./shellsession-CpSha4Rb.cjs"))},{id:"smalltalk",name:"Smalltalk",import:()=>Promise.resolve().then(()=>require("./smalltalk-CCvytUuW.cjs"))},{id:"solidity",name:"Solidity",import:()=>Promise.resolve().then(()=>require("./solidity-BcNcjFC4.cjs"))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>Promise.resolve().then(()=>require("./soy-CeuZwkAk.cjs"))},{id:"sparql",name:"SPARQL",import:()=>Promise.resolve().then(()=>require("./sparql-BRQlWq86.cjs"))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>Promise.resolve().then(()=>require("./splunk-CzITjJj7.cjs"))},{id:"sql",name:"SQL",import:()=>Promise.resolve().then(()=>require("./sql-BqWZrLHB.cjs"))},{id:"ssh-config",name:"SSH Config",import:()=>Promise.resolve().then(()=>require("./ssh-config-DUPeuEdB.cjs"))},{id:"stata",name:"Stata",import:()=>Promise.resolve().then(()=>require("./stata-B-LlW9Cr.cjs"))},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>Promise.resolve().then(()=>require("./stylus-ByHs6N-o.cjs"))},{id:"svelte",name:"Svelte",import:()=>Promise.resolve().then(()=>require("./svelte-DXe6QUZV.cjs"))},{id:"swift",name:"Swift",import:()=>Promise.resolve().then(()=>require("./swift-C5DnOriA.cjs"))},{id:"system-verilog",name:"SystemVerilog",import:()=>Promise.resolve().then(()=>require("./system-verilog-ClPLYLwh.cjs"))},{id:"systemd",name:"Systemd Units",import:()=>Promise.resolve().then(()=>require("./systemd-BASX0DlX.cjs"))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>Promise.resolve().then(()=>require("./talonscript-DkCSnLHD.cjs"))},{id:"tasl",name:"Tasl",import:()=>Promise.resolve().then(()=>require("./tasl-BAQJK7KZ.cjs"))},{id:"tcl",name:"Tcl",import:()=>Promise.resolve().then(()=>require("./tcl-CwJAYTvh.cjs"))},{id:"templ",name:"Templ",import:()=>Promise.resolve().then(()=>require("./templ-BZj57XLK.cjs"))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>Promise.resolve().then(()=>require("./terraform-s-pzyVvp.cjs"))},{id:"tex",name:"TeX",import:()=>Promise.resolve().then(()=>require("./tex-CTRO38Wo.cjs"))},{id:"toml",name:"TOML",import:()=>Promise.resolve().then(()=>require("./toml-CyMM7IXy.cjs"))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>Promise.resolve().then(()=>require("./ts-tags-hDAF_laC.cjs"))},{id:"tsv",name:"TSV",import:()=>Promise.resolve().then(()=>require("./tsv-DqNGnuVj.cjs"))},{id:"tsx",name:"TSX",import:()=>Promise.resolve().then(()=>require("./tsx-DpBRUnKC.cjs"))},{id:"turtle",name:"Turtle",import:()=>Promise.resolve().then(()=>require("./turtle-DfO3eAsu.cjs"))},{id:"twig",name:"Twig",import:()=>Promise.resolve().then(()=>require("./twig-B2qtj3-0.cjs"))},{id:"typescript",name:"TypeScript",aliases:["ts"],import:()=>Promise.resolve().then(()=>require("./typescript-BqvpT6pB.cjs"))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>Promise.resolve().then(()=>require("./typespec-P-ZVy8yC.cjs"))},{id:"typst",name:"Typst",aliases:["typ"],import:()=>Promise.resolve().then(()=>require("./typst-BVh2IsT9.cjs"))},{id:"v",name:"V",import:()=>Promise.resolve().then(()=>require("./v-BUlE9136.cjs"))},{id:"vala",name:"Vala",import:()=>Promise.resolve().then(()=>require("./vala-BIymb2K_.cjs"))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>Promise.resolve().then(()=>require("./vb-IXOh8mqV.cjs"))},{id:"verilog",name:"Verilog",import:()=>Promise.resolve().then(()=>require("./verilog-BiglCqvO.cjs"))},{id:"vhdl",name:"VHDL",import:()=>Promise.resolve().then(()=>require("./vhdl-CJUzuS2t.cjs"))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>Promise.resolve().then(()=>require("./viml-B1nKLcgt.cjs"))},{id:"vue",name:"Vue",import:()=>Promise.resolve().then(()=>require("./vue-Bz7ob1S8.cjs"))},{id:"vue-html",name:"Vue HTML",import:()=>Promise.resolve().then(()=>require("./vue-html-rW8a786u.cjs"))},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>Promise.resolve().then(()=>require("./vyper-CO9xUkIY.cjs"))},{id:"wasm",name:"WebAssembly",import:()=>Promise.resolve().then(()=>require("./wasm-CdIThIat.cjs"))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>Promise.resolve().then(()=>require("./wenyan-BSJ3fk7e.cjs"))},{id:"wgsl",name:"WGSL",import:()=>Promise.resolve().then(()=>require("./wgsl-d3zZE7ZN.cjs"))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>Promise.resolve().then(()=>require("./wikitext-BRCqXN2g.cjs"))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>Promise.resolve().then(()=>require("./wolfram-C3rR92zj.cjs"))},{id:"xml",name:"XML",import:()=>Promise.resolve().then(()=>require("./xml-CJLy8-Dx.cjs"))},{id:"xsl",name:"XSL",import:()=>Promise.resolve().then(()=>require("./xsl-D4BTm9yO.cjs"))},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>Promise.resolve().then(()=>require("./yaml-7DV6pRKj.cjs"))},{id:"zenscript",name:"ZenScript",import:()=>Promise.resolve().then(()=>require("./zenscript-BWMxwjeH.cjs"))},{id:"zig",name:"Zig",import:()=>Promise.resolve().then(()=>require("./zig-yAcNfpgW.cjs"))}],iGt=Object.fromEntries(oIe.map(a=>[a.id,a.import])),sGt=Object.fromEntries(oIe.flatMap(a=>a.aliases?.map(u=>[u,a.import])||[])),oGt={...iGt,...sGt},aGt=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>Promise.resolve().then(()=>require("./andromeeda-BXc5FOIb.cjs"))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>Promise.resolve().then(()=>require("./aurora-x-C5IpmIOG.cjs"))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./ayu-dark-Cv7nTiif.cjs"))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>Promise.resolve().then(()=>require("./catppuccin-frappe-DXAedND3.cjs"))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>Promise.resolve().then(()=>require("./catppuccin-latte-mwGw3-Ej.cjs"))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>Promise.resolve().then(()=>require("./catppuccin-macchiato-cQCk9ADg.cjs"))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>Promise.resolve().then(()=>require("./catppuccin-mocha-ClSzDZSl.cjs"))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>Promise.resolve().then(()=>require("./dark-plus-Cd5emcYO.cjs"))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>Promise.resolve().then(()=>require("./dracula-BNgwAJ-d.cjs"))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>Promise.resolve().then(()=>require("./dracula-soft-BHZ7sHFu.cjs"))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./everforest-dark-_sBMomR1.cjs"))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>Promise.resolve().then(()=>require("./everforest-light-H0xoYxl0.cjs"))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./github-dark-BKL9xNgN.cjs"))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>Promise.resolve().then(()=>require("./github-dark-default-Dsv5MuSi.cjs"))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>Promise.resolve().then(()=>require("./github-dark-dimmed-CtB9hz8U.cjs"))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>Promise.resolve().then(()=>require("./github-dark-high-contrast-BqZVM-jF.cjs"))},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>Promise.resolve().then(()=>require("./github-light-BFTOhCbz.cjs"))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>Promise.resolve().then(()=>require("./github-light-default-BZoWH9dH.cjs"))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>Promise.resolve().then(()=>require("./github-light-high-contrast-Ks3kPGJU.cjs"))},{id:"houston",displayName:"Houston",type:"dark",import:()=>Promise.resolve().then(()=>require("./houston-T57H3gQZ.cjs"))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>Promise.resolve().then(()=>require("./kanagawa-dragon-BJZF7xDr.cjs"))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>Promise.resolve().then(()=>require("./kanagawa-lotus-BhgzmRV4.cjs"))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>Promise.resolve().then(()=>require("./kanagawa-wave-BgJip59C.cjs"))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>Promise.resolve().then(()=>require("./laserwave--izBLY1I.cjs"))},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>Promise.resolve().then(()=>require("./light-plus-B5D0le0o.cjs"))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>Promise.resolve().then(()=>require("./material-theme-Dj0-OyRN.cjs"))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>Promise.resolve().then(()=>require("./material-theme-darker-Dvfs29ir.cjs"))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>Promise.resolve().then(()=>require("./material-theme-lighter-EU3ZGl_r.cjs"))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>Promise.resolve().then(()=>require("./material-theme-ocean-px_3Pwqa.cjs"))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>Promise.resolve().then(()=>require("./material-theme-palenight-38jxvsGX.cjs"))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./min-dark-tt5o_I5e.cjs"))},{id:"min-light",displayName:"Min Light",type:"light",import:()=>Promise.resolve().then(()=>require("./min-light-tmTHl_CQ.cjs"))},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>Promise.resolve().then(()=>require("./monokai-DMIxv6MM.cjs"))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>Promise.resolve().then(()=>require("./night-owl-BN78kThQ.cjs"))},{id:"nord",displayName:"Nord",type:"dark",import:()=>Promise.resolve().then(()=>require("./nord-Ca5AGUWc.cjs"))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>Promise.resolve().then(()=>require("./one-dark-pro-JOzzHStv.cjs"))},{id:"one-light",displayName:"One Light",type:"light",import:()=>Promise.resolve().then(()=>require("./one-light-020-h_lv.cjs"))},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>Promise.resolve().then(()=>require("./plastic-r5piqq-S.cjs"))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>Promise.resolve().then(()=>require("./poimandres-BLP3NNjc.cjs"))},{id:"red",displayName:"Red",type:"dark",import:()=>Promise.resolve().then(()=>require("./red-BQGOv1D5.cjs"))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>Promise.resolve().then(()=>require("./rose-pine-DKEdv1Oe.cjs"))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>Promise.resolve().then(()=>require("./rose-pine-dawn-Bvt6DtVH.cjs"))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>Promise.resolve().then(()=>require("./rose-pine-moon-cHuJy0Ng.cjs"))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./slack-dark-akqwQ7ED.cjs"))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>Promise.resolve().then(()=>require("./slack-ochin-BoQQWmTv.cjs"))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>Promise.resolve().then(()=>require("./snazzy-light-D_IwRieF.cjs"))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./solarized-dark-gmm-WbDC.cjs"))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>Promise.resolve().then(()=>require("./solarized-light-DzcxRSZP.cjs"))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>Promise.resolve().then(()=>require("./synthwave-84-BBRLOmNT.cjs"))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>Promise.resolve().then(()=>require("./tokyo-night-9T7_vGSy.cjs"))},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>Promise.resolve().then(()=>require("./vesper-DqLWLxOu.cjs"))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>Promise.resolve().then(()=>require("./vitesse-black-MF-1S1MG.cjs"))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./vitesse-dark-SIffJYSe.cjs"))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>Promise.resolve().then(()=>require("./vitesse-light-U63SkYGT.cjs"))}],lGt=Object.fromEntries(aGt.map(a=>[a.id,a.import]));let u0=class extends Error{constructor(u){super(u),this.name="ShikiError"}},Cie=class extends Error{constructor(u){super(u),this.name="ShikiError"}};function uGt(){return 2147483648}function cGt(){return typeof performance<"u"?performance.now():Date.now()}const dGt=(a,u)=>a+(u-a%u)%u;async function fGt(a){let u,d;const f={};function m(N){d=N,f.HEAPU8=new Uint8Array(N),f.HEAPU32=new Uint32Array(N)}function g(N,k,B){f.HEAPU8.copyWithin(N,k,k+B)}function x(N){try{return u.grow(N-d.byteLength+65535>>>16),m(u.buffer),1}catch{}}function b(N){const k=f.HEAPU8.length;N=N>>>0;const B=uGt();if(N>B)return!1;for(let P=1;P<=4;P*=2){let $=k*(1+.2/P);$=Math.min($,N+100663296);const q=Math.min(B,dGt(Math.max(N,$),65536));if(x(q))return!0}return!1}const v=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function _(N,k,B=1024){const P=k+B;let $=k;for(;N[$]&&!($>=P);)++$;if($-k>16&&N.buffer&&v)return v.decode(N.subarray(k,$));let q="";for(;k<$;){let z=N[k++];if(!(z&128)){q+=String.fromCharCode(z);continue}const W=N[k++]&63;if((z&224)===192){q+=String.fromCharCode((z&31)<<6|W);continue}const X=N[k++]&63;if((z&240)===224?z=(z&15)<<12|W<<6|X:z=(z&7)<<18|W<<12|X<<6|N[k++]&63,z<65536)q+=String.fromCharCode(z);else{const J=z-65536;q+=String.fromCharCode(55296|J>>10,56320|J&1023)}}return q}function S(N,k){return N?_(f.HEAPU8,N,k):""}const R={emscripten_get_now:cGt,emscripten_memcpy_big:g,emscripten_resize_heap:b,fd_write:()=>0};async function w(){const k=await a({env:R,wasi_snapshot_preview1:R});u=k.memory,m(u.buffer),Object.assign(f,k),f.UTF8ToString=S}return await w(),f}var hGt=Object.defineProperty,pGt=(a,u,d)=>u in a?hGt(a,u,{enumerable:!0,configurable:!0,writable:!0,value:d}):a[u]=d,Ms=(a,u,d)=>(pGt(a,typeof u!="symbol"?u+"":u,d),d);let fo=null;function mGt(a){throw new Cie(a.UTF8ToString(a.getLastOnigError()))}class wM{constructor(u){Ms(this,"utf16Length"),Ms(this,"utf8Length"),Ms(this,"utf16Value"),Ms(this,"utf8Value"),Ms(this,"utf16OffsetToUtf8"),Ms(this,"utf8OffsetToUtf16");const d=u.length,f=wM._utf8ByteLength(u),m=f!==d,g=m?new Uint32Array(d+1):null;m&&(g[d]=f);const x=m?new Uint32Array(f+1):null;m&&(x[f]=d);const b=new Uint8Array(f);let v=0;for(let _=0;_<d;_++){const S=u.charCodeAt(_);let R=S,w=!1;if(S>=55296&&S<=56319&&_+1<d){const N=u.charCodeAt(_+1);N>=56320&&N<=57343&&(R=(S-55296<<10)+65536|N-56320,w=!0)}m&&(g[_]=v,w&&(g[_+1]=v),R<=127?x[v+0]=_:R<=2047?(x[v+0]=_,x[v+1]=_):R<=65535?(x[v+0]=_,x[v+1]=_,x[v+2]=_):(x[v+0]=_,x[v+1]=_,x[v+2]=_,x[v+3]=_)),R<=127?b[v++]=R:R<=2047?(b[v++]=192|(R&1984)>>>6,b[v++]=128|(R&63)>>>0):R<=65535?(b[v++]=224|(R&61440)>>>12,b[v++]=128|(R&4032)>>>6,b[v++]=128|(R&63)>>>0):(b[v++]=240|(R&1835008)>>>18,b[v++]=128|(R&258048)>>>12,b[v++]=128|(R&4032)>>>6,b[v++]=128|(R&63)>>>0),w&&_++}this.utf16Length=d,this.utf8Length=f,this.utf16Value=u,this.utf8Value=b,this.utf16OffsetToUtf8=g,this.utf8OffsetToUtf16=x}static _utf8ByteLength(u){let d=0;for(let f=0,m=u.length;f<m;f++){const g=u.charCodeAt(f);let x=g,b=!1;if(g>=55296&&g<=56319&&f+1<m){const v=u.charCodeAt(f+1);v>=56320&&v<=57343&&(x=(g-55296<<10)+65536|v-56320,b=!0)}x<=127?d+=1:x<=2047?d+=2:x<=65535?d+=3:d+=4,b&&f++}return d}createString(u){const d=u.omalloc(this.utf8Length);return u.HEAPU8.set(this.utf8Value,d),d}}const uh=class{constructor(a){if(Ms(this,"id",++uh.LAST_ID),Ms(this,"_onigBinding"),Ms(this,"content"),Ms(this,"utf16Length"),Ms(this,"utf8Length"),Ms(this,"utf16OffsetToUtf8"),Ms(this,"utf8OffsetToUtf16"),Ms(this,"ptr"),!fo)throw new Cie("Must invoke loadWasm first.");this._onigBinding=fo,this.content=a;const u=new wM(a);this.utf16Length=u.utf16Length,this.utf8Length=u.utf8Length,this.utf16OffsetToUtf8=u.utf16OffsetToUtf8,this.utf8OffsetToUtf16=u.utf8OffsetToUtf16,this.utf8Length<1e4&&!uh._sharedPtrInUse?(uh._sharedPtr||(uh._sharedPtr=fo.omalloc(1e4)),uh._sharedPtrInUse=!0,fo.HEAPU8.set(u.utf8Value,uh._sharedPtr),this.ptr=uh._sharedPtr):this.ptr=u.createString(fo)}convertUtf8OffsetToUtf16(a){return this.utf8OffsetToUtf16?a<0?0:a>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[a]:a}convertUtf16OffsetToUtf8(a){return this.utf16OffsetToUtf8?a<0?0:a>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[a]:a}dispose(){this.ptr===uh._sharedPtr?uh._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};let z5=uh;Ms(z5,"LAST_ID",0);Ms(z5,"_sharedPtr",0);Ms(z5,"_sharedPtrInUse",!1);class gGt{constructor(u){if(Ms(this,"_onigBinding"),Ms(this,"_ptr"),!fo)throw new Cie("Must invoke loadWasm first.");const d=[],f=[];for(let b=0,v=u.length;b<v;b++){const _=new wM(u[b]);d[b]=_.createString(fo),f[b]=_.utf8Length}const m=fo.omalloc(4*u.length);fo.HEAPU32.set(d,m/4);const g=fo.omalloc(4*u.length);fo.HEAPU32.set(f,g/4);const x=fo.createOnigScanner(m,g,u.length);for(let b=0,v=u.length;b<v;b++)fo.ofree(d[b]);fo.ofree(g),fo.ofree(m),x===0&&mGt(fo),this._onigBinding=fo,this._ptr=x}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(u,d,f){let m=0;if(typeof f=="number"&&(m=f),typeof u=="string"){u=new z5(u);const g=this._findNextMatchSync(u,d,!1,m);return u.dispose(),g}return this._findNextMatchSync(u,d,!1,m)}_findNextMatchSync(u,d,f,m){const g=this._onigBinding,x=g.findNextOnigScannerMatch(this._ptr,u.id,u.ptr,u.utf8Length,u.convertUtf16OffsetToUtf8(d),m);if(x===0)return null;const b=g.HEAPU32;let v=x/4;const _=b[v++],S=b[v++],R=[];for(let w=0;w<S;w++){const N=u.convertUtf8OffsetToUtf16(b[v++]),k=u.convertUtf8OffsetToUtf16(b[v++]);R[w]={start:N,end:k,length:k-N}}return{index:_,captureIndices:R}}}function xGt(a){return typeof a.instantiator=="function"}function yGt(a){return typeof a.default=="function"}function vGt(a){return typeof a.data<"u"}function bGt(a){return typeof Response<"u"&&a instanceof Response}function EGt(a){return typeof ArrayBuffer<"u"&&(a instanceof ArrayBuffer||ArrayBuffer.isView(a))||typeof Buffer<"u"&&Buffer.isBuffer?.(a)||typeof SharedArrayBuffer<"u"&&a instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&a instanceof Uint32Array}let Ij;function _Gt(a){if(Ij)return Ij;async function u(){fo=await fGt(async d=>{let f=a;return f=await f,typeof f=="function"&&(f=await f(d)),typeof f=="function"&&(f=await f(d)),xGt(f)?f=await f.instantiator(d):yGt(f)?f=await f.default(d):(vGt(f)&&(f=f.data),bGt(f)?typeof WebAssembly.instantiateStreaming=="function"?f=await SGt(f)(d):f=await AGt(f)(d):EGt(f)?f=await Tee(f)(d):f instanceof WebAssembly.Module?f=await Tee(f)(d):"default"in f&&f.default instanceof WebAssembly.Module&&(f=await Tee(f.default)(d))),"instance"in f&&(f=f.instance),"exports"in f&&(f=f.exports),f})}return Ij=u(),Ij}function Tee(a){return u=>WebAssembly.instantiate(a,u)}function SGt(a){return u=>WebAssembly.instantiateStreaming(a,u)}function AGt(a){return async u=>{const d=await a.arrayBuffer();return WebAssembly.instantiate(d,u)}}let CGt;function RGt(){return CGt}async function aIe(a){return a&&await _Gt(a),{createScanner(u){return new gGt(u.map(d=>typeof d=="string"?d:d.source))},createString(u){return new z5(u)}}}function TGt(a){return Rie(a)}function Rie(a){return Array.isArray(a)?wGt(a):a instanceof RegExp?a:typeof a=="object"?OGt(a):a}function wGt(a){let u=[];for(let d=0,f=a.length;d<f;d++)u[d]=Rie(a[d]);return u}function OGt(a){let u={};for(let d in a)u[d]=Rie(a[d]);return u}function lIe(a,...u){return u.forEach(d=>{for(let f in d)a[f]=d[f]}),a}function uIe(a){const u=~a.lastIndexOf("/")||~a.lastIndexOf("\\");return u===0?a:~u===a.length-1?uIe(a.substring(0,a.length-1)):a.substr(~u+1)}var wee=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Pj=class{static hasCaptures(u){return u===null?!1:(wee.lastIndex=0,wee.test(u))}static replaceCaptures(u,d,f){return u.replace(wee,(m,g,x,b)=>{let v=f[parseInt(g||x,10)];if(v){let _=d.substring(v.start,v.end);for(;_[0]===".";)_=_.substring(1);switch(b){case"downcase":return _.toLowerCase();case"upcase":return _.toUpperCase();default:return _}}else return m})}};function cIe(a,u){return a<u?-1:a>u?1:0}function dIe(a,u){if(a===null&&u===null)return 0;if(!a)return-1;if(!u)return 1;let d=a.length,f=u.length;if(d===f){for(let m=0;m<d;m++){let g=cIe(a[m],u[m]);if(g!==0)return g}return 0}return d-f}function TNe(a){return!!(/^#[0-9a-f]{6}$/i.test(a)||/^#[0-9a-f]{8}$/i.test(a)||/^#[0-9a-f]{3}$/i.test(a)||/^#[0-9a-f]{4}$/i.test(a))}function fIe(a){return a.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var hIe=class{constructor(u){Pt(this,"cache",new Map);this.fn=u}get(u){if(this.cache.has(u))return this.cache.get(u);const d=this.fn(u);return this.cache.set(u,d),d}},FF=class{constructor(u,d,f){Pt(this,"_cachedMatchRoot",new hIe(u=>this._root.match(u)));this._colorMap=u,this._defaults=d,this._root=f}static createFromRawTheme(u,d){return this.createFromParsedTheme(kGt(u),d)}static createFromParsedTheme(u,d){return IGt(u,d)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(u){if(u===null)return this._defaults;const d=u.scopeName,m=this._cachedMatchRoot.get(d).find(g=>NGt(u.parent,g.parentScopes));return m?new pIe(m.fontStyle,m.foreground,m.background):null}},Oee=class uF{constructor(u,d){this.parent=u,this.scopeName=d}static push(u,d){for(const f of d)u=new uF(u,f);return u}static from(...u){let d=null;for(let f=0;f<u.length;f++)d=new uF(d,u[f]);return d}push(u){return new uF(this,u)}getSegments(){let u=this;const d=[];for(;u;)d.push(u.scopeName),u=u.parent;return d.reverse(),d}toString(){return this.getSegments().join(" ")}extends(u){return this===u?!0:this.parent===null?!1:this.parent.extends(u)}getExtensionIfDefined(u){const d=[];let f=this;for(;f&&f!==u;)d.push(f.scopeName),f=f.parent;return f===u?d.reverse():void 0}};function NGt(a,u){if(u.length===0)return!0;for(let d=0;d<u.length;d++){let f=u[d],m=!1;if(f===">"){if(d===u.length-1)return!1;f=u[++d],m=!0}for(;a&&!DGt(a.scopeName,f);){if(m)return!1;a=a.parent}if(!a)return!1;a=a.parent}return!0}function DGt(a,u){return u===a||a.startsWith(u)&&a[u.length]==="."}var pIe=class{constructor(u,d,f){this.fontStyle=u,this.foregroundId=d,this.backgroundId=f}};function kGt(a){if(!a)return[];if(!a.settings||!Array.isArray(a.settings))return[];let u=a.settings,d=[],f=0;for(let m=0,g=u.length;m<g;m++){let x=u[m];if(!x.settings)continue;let b;if(typeof x.scope=="string"){let R=x.scope;R=R.replace(/^[,]+/,""),R=R.replace(/[,]+$/,""),b=R.split(",")}else Array.isArray(x.scope)?b=x.scope:b=[""];let v=-1;if(typeof x.settings.fontStyle=="string"){v=0;let R=x.settings.fontStyle.split(" ");for(let w=0,N=R.length;w<N;w++)switch(R[w]){case"italic":v=v|1;break;case"bold":v=v|2;break;case"underline":v=v|4;break;case"strikethrough":v=v|8;break}}let _=null;typeof x.settings.foreground=="string"&&TNe(x.settings.foreground)&&(_=x.settings.foreground);let S=null;typeof x.settings.background=="string"&&TNe(x.settings.background)&&(S=x.settings.background);for(let R=0,w=b.length;R<w;R++){let k=b[R].trim().split(" "),B=k[k.length-1],P=null;k.length>1&&(P=k.slice(0,k.length-1),P.reverse()),d[f++]=new LGt(B,P,m,v,_,S)}}return d}var LGt=class{constructor(u,d,f,m,g,x){this.scope=u,this.parentScopes=d,this.index=f,this.fontStyle=m,this.foreground=g,this.background=x}},s0=(a=>(a[a.NotSet=-1]="NotSet",a[a.None=0]="None",a[a.Italic=1]="Italic",a[a.Bold=2]="Bold",a[a.Underline=4]="Underline",a[a.Strikethrough=8]="Strikethrough",a))(s0||{});function IGt(a,u){a.sort((v,_)=>{let S=cIe(v.scope,_.scope);return S!==0||(S=dIe(v.parentScopes,_.parentScopes),S!==0)?S:v.index-_.index});let d=0,f="#000000",m="#ffffff";for(;a.length>=1&&a[0].scope==="";){let v=a.shift();v.fontStyle!==-1&&(d=v.fontStyle),v.foreground!==null&&(f=v.foreground),v.background!==null&&(m=v.background)}let g=new PGt(u),x=new pIe(d,g.getId(f),g.getId(m)),b=new FGt(new cne(0,null,-1,0,0),[]);for(let v=0,_=a.length;v<_;v++){let S=a[v];b.insert(0,S.scope,S.parentScopes,S.fontStyle,g.getId(S.foreground),g.getId(S.background))}return new FF(g,x,b)}var PGt=class{constructor(u){Pt(this,"_isFrozen");Pt(this,"_lastColorId");Pt(this,"_id2color");Pt(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(u)){this._isFrozen=!0;for(let d=0,f=u.length;d<f;d++)this._color2id[u[d]]=d,this._id2color[d]=u[d]}else this._isFrozen=!1}getId(u){if(u===null)return 0;u=u.toUpperCase();let d=this._color2id[u];if(d)return d;if(this._isFrozen)throw new Error(`Missing color in color map - ${u}`);return d=++this._lastColorId,this._color2id[u]=d,this._id2color[d]=u,d}getColorMap(){return this._id2color.slice(0)}},jGt=Object.freeze([]),cne=class mIe{constructor(u,d,f,m,g){Pt(this,"scopeDepth");Pt(this,"parentScopes");Pt(this,"fontStyle");Pt(this,"foreground");Pt(this,"background");this.scopeDepth=u,this.parentScopes=d||jGt,this.fontStyle=f,this.foreground=m,this.background=g}clone(){return new mIe(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(u){let d=[];for(let f=0,m=u.length;f<m;f++)d[f]=u[f].clone();return d}acceptOverwrite(u,d,f,m){this.scopeDepth>u?console.log("how did this happen?"):this.scopeDepth=u,d!==-1&&(this.fontStyle=d),f!==0&&(this.foreground=f),m!==0&&(this.background=m)}},FGt=class dne{constructor(u,d=[],f={}){Pt(this,"_rulesWithParentScopes");this._mainRule=u,this._children=f,this._rulesWithParentScopes=d}static _cmpBySpecificity(u,d){if(u.scopeDepth!==d.scopeDepth)return d.scopeDepth-u.scopeDepth;let f=0,m=0;for(;u.parentScopes[f]===">"&&f++,d.parentScopes[m]===">"&&m++,!(f>=u.parentScopes.length||m>=d.parentScopes.length);){const g=d.parentScopes[m].length-u.parentScopes[f].length;if(g!==0)return g;f++,m++}return d.parentScopes.length-u.parentScopes.length}match(u){if(u!==""){let f=u.indexOf("."),m,g;if(f===-1?(m=u,g=""):(m=u.substring(0,f),g=u.substring(f+1)),this._children.hasOwnProperty(m))return this._children[m].match(g)}const d=this._rulesWithParentScopes.concat(this._mainRule);return d.sort(dne._cmpBySpecificity),d}insert(u,d,f,m,g,x){if(d===""){this._doInsertHere(u,f,m,g,x);return}let b=d.indexOf("."),v,_;b===-1?(v=d,_=""):(v=d.substring(0,b),_=d.substring(b+1));let S;this._children.hasOwnProperty(v)?S=this._children[v]:(S=new dne(this._mainRule.clone(),cne.cloneArr(this._rulesWithParentScopes)),this._children[v]=S),S.insert(u+1,_,f,m,g,x)}_doInsertHere(u,d,f,m,g){if(d===null){this._mainRule.acceptOverwrite(u,f,m,g);return}for(let x=0,b=this._rulesWithParentScopes.length;x<b;x++){let v=this._rulesWithParentScopes[x];if(dIe(v.parentScopes,d)===0){v.acceptOverwrite(u,f,m,g);return}}f===-1&&(f=this._mainRule.fontStyle),m===0&&(m=this._mainRule.foreground),g===0&&(g=this._mainRule.background),this._rulesWithParentScopes.push(new cne(u,d,f,m,g))}},nS=class Vu{static toBinaryStr(u){return u.toString(2).padStart(32,"0")}static print(u){const d=Vu.getLanguageId(u),f=Vu.getTokenType(u),m=Vu.getFontStyle(u),g=Vu.getForeground(u),x=Vu.getBackground(u);console.log({languageId:d,tokenType:f,fontStyle:m,foreground:g,background:x})}static getLanguageId(u){return(u&255)>>>0}static getTokenType(u){return(u&768)>>>8}static containsBalancedBrackets(u){return(u&1024)!==0}static getFontStyle(u){return(u&30720)>>>11}static getForeground(u){return(u&16744448)>>>15}static getBackground(u){return(u&4278190080)>>>24}static set(u,d,f,m,g,x,b){let v=Vu.getLanguageId(u),_=Vu.getTokenType(u),S=Vu.containsBalancedBrackets(u)?1:0,R=Vu.getFontStyle(u),w=Vu.getForeground(u),N=Vu.getBackground(u);return d!==0&&(v=d),f!==8&&(_=f),m!==null&&(S=m?1:0),g!==-1&&(R=g),x!==0&&(w=x),b!==0&&(N=b),(v<<0|_<<8|S<<10|R<<11|w<<15|N<<24)>>>0}};function MF(a,u){const d=[],f=MGt(a);let m=f.next();for(;m!==null;){let v=0;if(m.length===2&&m.charAt(1)===":"){switch(m.charAt(0)){case"R":v=1;break;case"L":v=-1;break;default:console.log(`Unknown priority ${m} in scope selector`)}m=f.next()}let _=x();if(d.push({matcher:_,priority:v}),m!==",")break;m=f.next()}return d;function g(){if(m==="-"){m=f.next();const v=g();return _=>!!v&&!v(_)}if(m==="("){m=f.next();const v=b();return m===")"&&(m=f.next()),v}if(wNe(m)){const v=[];do v.push(m),m=f.next();while(wNe(m));return _=>u(v,_)}return null}function x(){const v=[];let _=g();for(;_;)v.push(_),_=g();return S=>v.every(R=>R(S))}function b(){const v=[];let _=x();for(;_&&(v.push(_),m==="|"||m===",");){do m=f.next();while(m==="|"||m===",");_=x()}return S=>v.some(R=>R(S))}}function wNe(a){return!!a&&!!a.match(/[\w\.:]+/)}function MGt(a){let u=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,d=u.exec(a);return{next:()=>{if(!d)return null;const f=d[0];return d=u.exec(a),f}}}function gIe(a){typeof a.dispose=="function"&&a.dispose()}var E5=class{constructor(u){this.scopeName=u}toKey(){return this.scopeName}},$Gt=class{constructor(u,d){this.scopeName=u,this.ruleName=d}toKey(){return`${this.scopeName}#${this.ruleName}`}},BGt=class{constructor(){Pt(this,"_references",[]);Pt(this,"_seenReferenceKeys",new Set);Pt(this,"visitedRule",new Set)}get references(){return this._references}add(u){const d=u.toKey();this._seenReferenceKeys.has(d)||(this._seenReferenceKeys.add(d),this._references.push(u))}},qGt=class{constructor(u,d){Pt(this,"seenFullScopeRequests",new Set);Pt(this,"seenPartialScopeRequests",new Set);Pt(this,"Q");this.repo=u,this.initialScopeName=d,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new E5(this.initialScopeName)]}processQueue(){const u=this.Q;this.Q=[];const d=new BGt;for(const f of u)UGt(f,this.initialScopeName,this.repo,d);for(const f of d.references)if(f instanceof E5){if(this.seenFullScopeRequests.has(f.scopeName))continue;this.seenFullScopeRequests.add(f.scopeName),this.Q.push(f)}else{if(this.seenFullScopeRequests.has(f.scopeName)||this.seenPartialScopeRequests.has(f.toKey()))continue;this.seenPartialScopeRequests.add(f.toKey()),this.Q.push(f)}}};function UGt(a,u,d,f){const m=d.lookup(a.scopeName);if(!m){if(a.scopeName===u)throw new Error(`No grammar provided for <${u}>`);return}const g=d.lookup(u);a instanceof E5?cF({baseGrammar:g,selfGrammar:m},f):fne(a.ruleName,{baseGrammar:g,selfGrammar:m,repository:m.repository},f);const x=d.injections(a.scopeName);if(x)for(const b of x)f.add(new E5(b))}function fne(a,u,d){if(u.repository&&u.repository[a]){const f=u.repository[a];$F([f],u,d)}}function cF(a,u){a.selfGrammar.patterns&&Array.isArray(a.selfGrammar.patterns)&&$F(a.selfGrammar.patterns,{...a,repository:a.selfGrammar.repository},u),a.selfGrammar.injections&&$F(Object.values(a.selfGrammar.injections),{...a,repository:a.selfGrammar.repository},u)}function $F(a,u,d){for(const f of a){if(d.visitedRule.has(f))continue;d.visitedRule.add(f);const m=f.repository?lIe({},u.repository,f.repository):u.repository;Array.isArray(f.patterns)&&$F(f.patterns,{...u,repository:m},d);const g=f.include;if(!g)continue;const x=xIe(g);switch(x.kind){case 0:cF({...u,selfGrammar:u.baseGrammar},d);break;case 1:cF(u,d);break;case 2:fne(x.ruleName,{...u,repository:m},d);break;case 3:case 4:const b=x.scopeName===u.selfGrammar.scopeName?u.selfGrammar:x.scopeName===u.baseGrammar.scopeName?u.baseGrammar:void 0;if(b){const v={baseGrammar:u.baseGrammar,selfGrammar:b,repository:m};x.kind===4?fne(x.ruleName,v,d):cF(v,d)}else x.kind===4?d.add(new $Gt(x.scopeName,x.ruleName)):d.add(new E5(x.scopeName));break}}}var zGt=class{constructor(){Pt(this,"kind",0)}},HGt=class{constructor(){Pt(this,"kind",1)}},GGt=class{constructor(u){Pt(this,"kind",2);this.ruleName=u}},WGt=class{constructor(u){Pt(this,"kind",3);this.scopeName=u}},VGt=class{constructor(u,d){Pt(this,"kind",4);this.scopeName=u,this.ruleName=d}};function xIe(a){if(a==="$base")return new zGt;if(a==="$self")return new HGt;const u=a.indexOf("#");if(u===-1)return new WGt(a);if(u===0)return new GGt(a.substring(1));{const d=a.substring(0,u),f=a.substring(u+1);return new VGt(d,f)}}var QGt=/\\(\d+)/,ONe=/\\(\d+)/g,YGt=-1,yIe=-2;var H5=class{constructor(u,d,f,m){Pt(this,"$location");Pt(this,"id");Pt(this,"_nameIsCapturing");Pt(this,"_name");Pt(this,"_contentNameIsCapturing");Pt(this,"_contentName");this.$location=u,this.id=d,this._name=f||null,this._nameIsCapturing=Pj.hasCaptures(this._name),this._contentName=m||null,this._contentNameIsCapturing=Pj.hasCaptures(this._contentName)}get debugName(){const u=this.$location?`${uIe(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${u}`}getName(u,d){return!this._nameIsCapturing||this._name===null||u===null||d===null?this._name:Pj.replaceCaptures(this._name,u,d)}getContentName(u,d){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Pj.replaceCaptures(this._contentName,u,d)}},KGt=class extends H5{constructor(d,f,m,g,x){super(d,f,m,g);Pt(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=x}dispose(){}collectPatterns(d,f){throw new Error("Not supported!")}compile(d,f){throw new Error("Not supported!")}compileAG(d,f,m,g){throw new Error("Not supported!")}},XGt=class extends H5{constructor(d,f,m,g,x){super(d,f,m,null);Pt(this,"_match");Pt(this,"captures");Pt(this,"_cachedCompiledPatterns");this._match=new _5(g,this.id),this.captures=x,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(d,f){f.push(this._match)}compile(d,f){return this._getCachedCompiledPatterns(d).compile(d)}compileAG(d,f,m,g){return this._getCachedCompiledPatterns(d).compileAG(d,m,g)}_getCachedCompiledPatterns(d){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new S5,this.collectPatterns(d,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},NNe=class extends H5{constructor(d,f,m,g,x){super(d,f,m,g);Pt(this,"hasMissingPatterns");Pt(this,"patterns");Pt(this,"_cachedCompiledPatterns");this.patterns=x.patterns,this.hasMissingPatterns=x.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(d,f){for(const m of this.patterns)d.getRule(m).collectPatterns(d,f)}compile(d,f){return this._getCachedCompiledPatterns(d).compile(d)}compileAG(d,f,m,g){return this._getCachedCompiledPatterns(d).compileAG(d,m,g)}_getCachedCompiledPatterns(d){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new S5,this.collectPatterns(d,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},hne=class extends H5{constructor(d,f,m,g,x,b,v,_,S,R){super(d,f,m,g);Pt(this,"_begin");Pt(this,"beginCaptures");Pt(this,"_end");Pt(this,"endHasBackReferences");Pt(this,"endCaptures");Pt(this,"applyEndPatternLast");Pt(this,"hasMissingPatterns");Pt(this,"patterns");Pt(this,"_cachedCompiledPatterns");this._begin=new _5(x,this.id),this.beginCaptures=b,this._end=new _5(v||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=_,this.applyEndPatternLast=S||!1,this.patterns=R.patterns,this.hasMissingPatterns=R.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(d,f){return this._end.resolveBackReferences(d,f)}collectPatterns(d,f){f.push(this._begin)}compile(d,f){return this._getCachedCompiledPatterns(d,f).compile(d)}compileAG(d,f,m,g){return this._getCachedCompiledPatterns(d,f).compileAG(d,m,g)}_getCachedCompiledPatterns(d,f){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new S5;for(const m of this.patterns)d.getRule(m).collectPatterns(d,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,f):this._cachedCompiledPatterns.setSource(0,f)),this._cachedCompiledPatterns}},BF=class extends H5{constructor(d,f,m,g,x,b,v,_,S){super(d,f,m,g);Pt(this,"_begin");Pt(this,"beginCaptures");Pt(this,"whileCaptures");Pt(this,"_while");Pt(this,"whileHasBackReferences");Pt(this,"hasMissingPatterns");Pt(this,"patterns");Pt(this,"_cachedCompiledPatterns");Pt(this,"_cachedCompiledWhilePatterns");this._begin=new _5(x,this.id),this.beginCaptures=b,this.whileCaptures=_,this._while=new _5(v,yIe),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=S.patterns,this.hasMissingPatterns=S.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(d,f){return this._while.resolveBackReferences(d,f)}collectPatterns(d,f){f.push(this._begin)}compile(d,f){return this._getCachedCompiledPatterns(d).compile(d)}compileAG(d,f,m,g){return this._getCachedCompiledPatterns(d).compileAG(d,m,g)}_getCachedCompiledPatterns(d){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new S5;for(const f of this.patterns)d.getRule(f).collectPatterns(d,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(d,f){return this._getCachedCompiledWhilePatterns(d,f).compile(d)}compileWhileAG(d,f,m,g){return this._getCachedCompiledWhilePatterns(d,f).compileAG(d,m,g)}_getCachedCompiledWhilePatterns(d,f){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new S5,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,f||""),this._cachedCompiledWhilePatterns}},vIe=class ia{static createCaptureRule(u,d,f,m,g){return u.registerRule(x=>new KGt(d,x,f,m,g))}static getCompiledRuleId(u,d,f){return u.id||d.registerRule(m=>{if(u.id=m,u.match)return new XGt(u.$vscodeTextmateLocation,u.id,u.name,u.match,ia._compileCaptures(u.captures,d,f));if(typeof u.begin>"u"){u.repository&&(f=lIe({},f,u.repository));let g=u.patterns;return typeof g>"u"&&u.include&&(g=[{include:u.include}]),new NNe(u.$vscodeTextmateLocation,u.id,u.name,u.contentName,ia._compilePatterns(g,d,f))}return u.while?new BF(u.$vscodeTextmateLocation,u.id,u.name,u.contentName,u.begin,ia._compileCaptures(u.beginCaptures||u.captures,d,f),u.while,ia._compileCaptures(u.whileCaptures||u.captures,d,f),ia._compilePatterns(u.patterns,d,f)):new hne(u.$vscodeTextmateLocation,u.id,u.name,u.contentName,u.begin,ia._compileCaptures(u.beginCaptures||u.captures,d,f),u.end,ia._compileCaptures(u.endCaptures||u.captures,d,f),u.applyEndPatternLast,ia._compilePatterns(u.patterns,d,f))}),u.id}static _compileCaptures(u,d,f){let m=[];if(u){let g=0;for(const x in u){if(x==="$vscodeTextmateLocation")continue;const b=parseInt(x,10);b>g&&(g=b)}for(let x=0;x<=g;x++)m[x]=null;for(const x in u){if(x==="$vscodeTextmateLocation")continue;const b=parseInt(x,10);let v=0;u[x].patterns&&(v=ia.getCompiledRuleId(u[x],d,f)),m[b]=ia.createCaptureRule(d,u[x].$vscodeTextmateLocation,u[x].name,u[x].contentName,v)}}return m}static _compilePatterns(u,d,f){let m=[];if(u)for(let g=0,x=u.length;g<x;g++){const b=u[g];let v=-1;if(b.include){const _=xIe(b.include);switch(_.kind){case 0:case 1:v=ia.getCompiledRuleId(f[b.include],d,f);break;case 2:let S=f[_.ruleName];S&&(v=ia.getCompiledRuleId(S,d,f));break;case 3:case 4:const R=_.scopeName,w=_.kind===4?_.ruleName:null,N=d.getExternalGrammar(R,f);if(N)if(w){let k=N.repository[w];k&&(v=ia.getCompiledRuleId(k,d,N.repository))}else v=ia.getCompiledRuleId(N.repository.$self,d,N.repository);break}}else v=ia.getCompiledRuleId(b,d,f);if(v!==-1){const _=d.getRule(v);let S=!1;if((_ instanceof NNe||_ instanceof hne||_ instanceof BF)&&_.hasMissingPatterns&&_.patterns.length===0&&(S=!0),S)continue;m.push(v)}}return{patterns:m,hasMissingPatterns:(u?u.length:0)!==m.length}}},_5=class bIe{constructor(u,d){Pt(this,"source");Pt(this,"ruleId");Pt(this,"hasAnchor");Pt(this,"hasBackReferences");Pt(this,"_anchorCache");if(u&&typeof u=="string"){const f=u.length;let m=0,g=[],x=!1;for(let b=0;b<f;b++)if(u.charAt(b)==="\\"&&b+1<f){const _=u.charAt(b+1);_==="z"?(g.push(u.substring(m,b)),g.push("$(?!\\n)(?<!\\n)"),m=b+2):(_==="A"||_==="G")&&(x=!0),b++}this.hasAnchor=x,m===0?this.source=u:(g.push(u.substring(m,f)),this.source=g.join(""))}else this.hasAnchor=!1,this.source=u;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=d,typeof this.source=="string"?this.hasBackReferences=QGt.test(this.source):this.hasBackReferences=!1}clone(){return new bIe(this.source,this.ruleId)}setSource(u){this.source!==u&&(this.source=u,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(u,d){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let f=d.map(m=>u.substring(m.start,m.end));return ONe.lastIndex=0,this.source.replace(ONe,(m,g)=>fIe(f[parseInt(g,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let u=[],d=[],f=[],m=[],g,x,b,v;for(g=0,x=this.source.length;g<x;g++)b=this.source.charAt(g),u[g]=b,d[g]=b,f[g]=b,m[g]=b,b==="\\"&&g+1<x&&(v=this.source.charAt(g+1),v==="A"?(u[g+1]="",d[g+1]="",f[g+1]="A",m[g+1]="A"):v==="G"?(u[g+1]="",d[g+1]="G",f[g+1]="",m[g+1]="G"):(u[g+1]=v,d[g+1]=v,f[g+1]=v,m[g+1]=v),g++);return{A0_G0:u.join(""),A0_G1:d.join(""),A1_G0:f.join(""),A1_G1:m.join("")}}resolveAnchors(u,d){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:u?d?this._anchorCache.A1_G1:this._anchorCache.A1_G0:d?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},S5=class{constructor(){Pt(this,"_items");Pt(this,"_hasAnchors");Pt(this,"_cached");Pt(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(u){this._items.push(u),this._hasAnchors=this._hasAnchors||u.hasAnchor}unshift(u){this._items.unshift(u),this._hasAnchors=this._hasAnchors||u.hasAnchor}length(){return this._items.length}setSource(u,d){this._items[u].source!==d&&(this._disposeCaches(),this._items[u].setSource(d))}compile(u){if(!this._cached){let d=this._items.map(f=>f.source);this._cached=new DNe(u,d,this._items.map(f=>f.ruleId))}return this._cached}compileAG(u,d,f){return this._hasAnchors?d?f?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(u,d,f)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(u,d,f)),this._anchorCache.A1_G0):f?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(u,d,f)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(u,d,f)),this._anchorCache.A0_G0):this.compile(u)}_resolveAnchors(u,d,f){let m=this._items.map(g=>g.resolveAnchors(d,f));return new DNe(u,m,this._items.map(g=>g.ruleId))}},DNe=class{constructor(u,d,f){Pt(this,"scanner");this.regExps=d,this.rules=f,this.scanner=u.createOnigScanner(d)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const u=[];for(let d=0,f=this.rules.length;d<f;d++)u.push(" - "+this.rules[d]+": "+this.regExps[d]);return u.join(`
|
|
2
2
|
`)}findNextMatchSync(u,d,f){const m=this.scanner.findNextMatchSync(u,d,f);return m?{ruleId:this.rules[m.index],captureIndices:m.captureIndices}:null}},Nee=class{constructor(u,d){this.languageId=u,this.tokenType=d}},i0,JGt=(i0=class{constructor(u,d){Pt(this,"_defaultAttributes");Pt(this,"_embeddedLanguagesMatcher");Pt(this,"_getBasicScopeAttributes",new hIe(u=>{const d=this._scopeToLanguage(u),f=this._toStandardTokenType(u);return new Nee(d,f)}));this._defaultAttributes=new Nee(u,8),this._embeddedLanguagesMatcher=new ZGt(Object.entries(d||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(u){return u===null?i0._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(u)}_scopeToLanguage(u){return this._embeddedLanguagesMatcher.match(u)||0}_toStandardTokenType(u){const d=u.match(i0.STANDARD_TOKEN_TYPE_REGEXP);if(!d)return 8;switch(d[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}},Pt(i0,"_NULL_SCOPE_METADATA",new Nee(0,0)),Pt(i0,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),i0),ZGt=class{constructor(u){Pt(this,"values");Pt(this,"scopesRegExp");if(u.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(u);const d=u.map(([f,m])=>fIe(f));d.sort(),d.reverse(),this.scopesRegExp=new RegExp(`^((${d.join(")|(")}))($|\\.)`,"")}}match(u){if(!this.scopesRegExp)return;const d=u.match(this.scopesRegExp);if(d)return this.values.get(d[1])}},kNe=class{constructor(u,d){this.stack=u,this.stoppedEarly=d}};function EIe(a,u,d,f,m,g,x,b){const v=u.content.length;let _=!1,S=-1;if(x){const N=eWt(a,u,d,f,m,g);m=N.stack,f=N.linePos,d=N.isFirstLine,S=N.anchorPosition}const R=Date.now();for(;!_;){if(b!==0&&Date.now()-R>b)return new kNe(m,!0);w()}return new kNe(m,!1);function w(){const N=tWt(a,u,d,f,m,S);if(!N){g.produce(m,v),_=!0;return}const k=N.captureIndices,B=N.matchedRuleId,P=k&&k.length>0?k[0].end>f:!1;if(B===YGt){const $=m.getRule(a);g.produce(m,k[0].start),m=m.withContentNameScopesList(m.nameScopesList),WO(a,u,d,m,g,$.endCaptures,k),g.produce(m,k[0].end);const q=m;if(m=m.parent,S=q.getAnchorPos(),!P&&q.getEnterPos()===f){m=q,g.produce(m,v),_=!0;return}}else{const $=a.getRule(B);g.produce(m,k[0].start);const q=m,z=$.getName(u.content,k),W=m.contentNameScopesList.pushAttributed(z,a);if(m=m.push(B,f,S,k[0].end===v,null,W,W),$ instanceof hne){const X=$;WO(a,u,d,m,g,X.beginCaptures,k),g.produce(m,k[0].end),S=k[0].end;const J=X.getContentName(u.content,k),ee=W.pushAttributed(J,a);if(m=m.withContentNameScopesList(ee),X.endHasBackReferences&&(m=m.withEndRule(X.getEndWithResolvedBackReferences(u.content,k))),!P&&q.hasSameRuleAs(m)){m=m.pop(),g.produce(m,v),_=!0;return}}else if($ instanceof BF){const X=$;WO(a,u,d,m,g,X.beginCaptures,k),g.produce(m,k[0].end),S=k[0].end;const J=X.getContentName(u.content,k),ee=W.pushAttributed(J,a);if(m=m.withContentNameScopesList(ee),X.whileHasBackReferences&&(m=m.withEndRule(X.getWhileWithResolvedBackReferences(u.content,k))),!P&&q.hasSameRuleAs(m)){m=m.pop(),g.produce(m,v),_=!0;return}}else if(WO(a,u,d,m,g,$.captures,k),g.produce(m,k[0].end),m=m.pop(),!P){m=m.safePop(),g.produce(m,v),_=!0;return}}k[0].end>f&&(f=k[0].end,d=!1)}}function eWt(a,u,d,f,m,g){let x=m.beginRuleCapturedEOL?0:-1;const b=[];for(let v=m;v;v=v.pop()){const _=v.getRule(a);_ instanceof BF&&b.push({rule:_,stack:v})}for(let v=b.pop();v;v=b.pop()){const{ruleScanner:_,findOptions:S}=iWt(v.rule,a,v.stack.endRule,d,f===x),R=_.findNextMatchSync(u,f,S);if(R){if(R.ruleId!==yIe){m=v.stack.pop();break}R.captureIndices&&R.captureIndices.length&&(g.produce(v.stack,R.captureIndices[0].start),WO(a,u,d,v.stack,g,v.rule.whileCaptures,R.captureIndices),g.produce(v.stack,R.captureIndices[0].end),x=R.captureIndices[0].end,R.captureIndices[0].end>f&&(f=R.captureIndices[0].end,d=!1))}else{m=v.stack.pop();break}}return{stack:m,linePos:f,anchorPosition:x,isFirstLine:d}}function tWt(a,u,d,f,m,g){const x=rWt(a,u,d,f,m,g),b=a.getInjections();if(b.length===0)return x;const v=nWt(b,a,u,d,f,m,g);if(!v)return x;if(!x)return v;const _=x.captureIndices[0].start,S=v.captureIndices[0].start;return S<_||v.priorityMatch&&S===_?v:x}function rWt(a,u,d,f,m,g){const x=m.getRule(a),{ruleScanner:b,findOptions:v}=_Ie(x,a,m.endRule,d,f===g),_=b.findNextMatchSync(u,f,v);return _?{captureIndices:_.captureIndices,matchedRuleId:_.ruleId}:null}function nWt(a,u,d,f,m,g,x){let b=Number.MAX_VALUE,v=null,_,S=0;const R=g.contentNameScopesList.getScopeNames();for(let w=0,N=a.length;w<N;w++){const k=a[w];if(!k.matcher(R))continue;const B=u.getRule(k.ruleId),{ruleScanner:P,findOptions:$}=_Ie(B,u,null,f,m===x),q=P.findNextMatchSync(d,m,$);if(!q)continue;const z=q.captureIndices[0].start;if(!(z>=b)&&(b=z,v=q.captureIndices,_=q.ruleId,S=k.priority,b===m))break}return v?{priorityMatch:S===-1,captureIndices:v,matchedRuleId:_}:null}function _Ie(a,u,d,f,m){return{ruleScanner:a.compileAG(u,d,f,m),findOptions:0}}function iWt(a,u,d,f,m){return{ruleScanner:a.compileWhileAG(u,d,f,m),findOptions:0}}function WO(a,u,d,f,m,g,x){if(g.length===0)return;const b=u.content,v=Math.min(g.length,x.length),_=[],S=x[0].end;for(let R=0;R<v;R++){const w=g[R];if(w===null)continue;const N=x[R];if(N.length===0)continue;if(N.start>S)break;for(;_.length>0&&_[_.length-1].endPos<=N.start;)m.produceFromScopes(_[_.length-1].scopes,_[_.length-1].endPos),_.pop();if(_.length>0?m.produceFromScopes(_[_.length-1].scopes,N.start):m.produce(f,N.start),w.retokenizeCapturedWithRuleId){const B=w.getName(b,x),P=f.contentNameScopesList.pushAttributed(B,a),$=w.getContentName(b,x),q=P.pushAttributed($,a),z=f.push(w.retokenizeCapturedWithRuleId,N.start,-1,!1,null,P,q),W=a.createOnigString(b.substring(0,N.end));EIe(a,W,d&&N.start===0,N.start,z,m,!1,0),gIe(W);continue}const k=w.getName(b,x);if(k!==null){const P=(_.length>0?_[_.length-1].scopes:f.contentNameScopesList).pushAttributed(k,a);_.push(new sWt(P,N.end))}}for(;_.length>0;)m.produceFromScopes(_[_.length-1].scopes,_[_.length-1].endPos),_.pop()}var sWt=class{constructor(u,d){Pt(this,"scopes");Pt(this,"endPos");this.scopes=u,this.endPos=d}};function oWt(a,u,d,f,m,g,x,b){return new lWt(a,u,d,f,m,g,x,b)}function LNe(a,u,d,f,m){const g=MF(u,qF),x=vIe.getCompiledRuleId(d,f,m.repository);for(const b of g)a.push({debugSelector:u,matcher:b.matcher,ruleId:x,grammar:m,priority:b.priority})}function qF(a,u){if(u.length<a.length)return!1;let d=0;return a.every(f=>{for(let m=d;m<u.length;m++)if(aWt(u[m],f))return d=m+1,!0;return!1})}function aWt(a,u){if(!a)return!1;if(a===u)return!0;const d=u.length;return a.length>d&&a.substr(0,d)===u&&a[d]==="."}var lWt=class{constructor(u,d,f,m,g,x,b,v){Pt(this,"_rootId");Pt(this,"_lastRuleId");Pt(this,"_ruleId2desc");Pt(this,"_includedGrammars");Pt(this,"_grammarRepository");Pt(this,"_grammar");Pt(this,"_injections");Pt(this,"_basicScopeAttributesProvider");Pt(this,"_tokenTypeMatchers");if(this._rootScopeName=u,this.balancedBracketSelectors=x,this._onigLib=v,this._basicScopeAttributesProvider=new JGt(f,m),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=b,this._grammar=INe(d,null),this._injections=null,this._tokenTypeMatchers=[],g)for(const _ of Object.keys(g)){const S=MF(_,qF);for(const R of S)this._tokenTypeMatchers.push({matcher:R.matcher,type:g[_]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const u of this._ruleId2desc)u&&u.dispose()}createOnigScanner(u){return this._onigLib.createOnigScanner(u)}createOnigString(u){return this._onigLib.createOnigString(u)}getMetadataForScope(u){return this._basicScopeAttributesProvider.getBasicScopeAttributes(u)}_collectInjections(){const u={lookup:g=>g===this._rootScopeName?this._grammar:this.getExternalGrammar(g),injections:g=>this._grammarRepository.injections(g)},d=[],f=this._rootScopeName,m=u.lookup(f);if(m){const g=m.injections;if(g)for(let b in g)LNe(d,b,g[b],this,m);const x=this._grammarRepository.injections(f);x&&x.forEach(b=>{const v=this.getExternalGrammar(b);if(v){const _=v.injectionSelector;_&&LNe(d,_,v,this,v)}})}return d.sort((g,x)=>g.priority-x.priority),d}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(u){const d=++this._lastRuleId,f=u(d);return this._ruleId2desc[d]=f,f}getRule(u){return this._ruleId2desc[u]}getExternalGrammar(u,d){if(this._includedGrammars[u])return this._includedGrammars[u];if(this._grammarRepository){const f=this._grammarRepository.lookup(u);if(f)return this._includedGrammars[u]=INe(f,d&&d.$base),this._includedGrammars[u]}}tokenizeLine(u,d,f=0){const m=this._tokenize(u,d,!1,f);return{tokens:m.lineTokens.getResult(m.ruleStack,m.lineLength),ruleStack:m.ruleStack,stoppedEarly:m.stoppedEarly}}tokenizeLine2(u,d,f=0){const m=this._tokenize(u,d,!0,f);return{tokens:m.lineTokens.getBinaryResult(m.ruleStack,m.lineLength),ruleStack:m.ruleStack,stoppedEarly:m.stoppedEarly}}_tokenize(u,d,f,m){this._rootId===-1&&(this._rootId=vIe.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let g;if(!d||d===pne.NULL){g=!0;const S=this._basicScopeAttributesProvider.getDefaultAttributes(),R=this.themeProvider.getDefaults(),w=nS.set(0,S.languageId,S.tokenType,null,R.fontStyle,R.foregroundId,R.backgroundId),N=this.getRule(this._rootId).getName(null,null);let k;N?k=a5.createRootAndLookUpScopeName(N,w,this):k=a5.createRoot("unknown",w),d=new pne(null,this._rootId,-1,-1,!1,null,k,k)}else g=!1,d.reset();u=u+`
|
|
3
3
|
`;const x=this.createOnigString(u),b=x.content.length,v=new cWt(f,u,this._tokenTypeMatchers,this.balancedBracketSelectors),_=EIe(this,x,g,0,d,v,!0,m);return gIe(x),{lineLength:b,lineTokens:v,ruleStack:_.stack,stoppedEarly:_.stoppedEarly}}};function INe(a,u){return a=TGt(a),a.repository=a.repository||{},a.repository.$self={$vscodeTextmateLocation:a.$vscodeTextmateLocation,patterns:a.patterns,name:a.scopeName},a.repository.$base=u||a.repository.$self,a}var a5=class ch{constructor(u,d,f){this.parent=u,this.scopePath=d,this.tokenAttributes=f}static fromExtension(u,d){let f=u,m=u?.scopePath??null;for(const g of d)m=Oee.push(m,g.scopeNames),f=new ch(f,m,g.encodedTokenAttributes);return f}static createRoot(u,d){return new ch(null,new Oee(null,u),d)}static createRootAndLookUpScopeName(u,d,f){const m=f.getMetadataForScope(u),g=new Oee(null,u),x=f.themeProvider.themeMatch(g),b=ch.mergeAttributes(d,m,x);return new ch(null,g,b)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(u){return ch.equals(this,u)}static equals(u,d){do{if(u===d||!u&&!d)return!0;if(!u||!d||u.scopeName!==d.scopeName||u.tokenAttributes!==d.tokenAttributes)return!1;u=u.parent,d=d.parent}while(!0)}static mergeAttributes(u,d,f){let m=-1,g=0,x=0;return f!==null&&(m=f.fontStyle,g=f.foregroundId,x=f.backgroundId),nS.set(u,d.languageId,d.tokenType,null,m,g,x)}pushAttributed(u,d){if(u===null)return this;if(u.indexOf(" ")===-1)return ch._pushAttributed(this,u,d);const f=u.split(/ /g);let m=this;for(const g of f)m=ch._pushAttributed(m,g,d);return m}static _pushAttributed(u,d,f){const m=f.getMetadataForScope(d),g=u.scopePath.push(d),x=f.themeProvider.themeMatch(g),b=ch.mergeAttributes(u.tokenAttributes,m,x);return new ch(u,g,b)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(u){const d=[];let f=this;for(;f&&f!==u;)d.push({encodedTokenAttributes:f.tokenAttributes,scopeNames:f.scopePath.getExtensionIfDefined(f.parent?.scopePath??null)}),f=f.parent;return f===u?d.reverse():void 0}},tc,pne=(tc=class{constructor(u,d,f,m,g,x,b,v){Pt(this,"_stackElementBrand");Pt(this,"_enterPos");Pt(this,"_anchorPos");Pt(this,"depth");this.parent=u,this.ruleId=d,this.beginRuleCapturedEOL=g,this.endRule=x,this.nameScopesList=b,this.contentNameScopesList=v,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=f,this._anchorPos=m}equals(u){return u===null?!1:tc._equals(this,u)}static _equals(u,d){return u===d?!0:this._structuralEquals(u,d)?a5.equals(u.contentNameScopesList,d.contentNameScopesList):!1}static _structuralEquals(u,d){do{if(u===d||!u&&!d)return!0;if(!u||!d||u.depth!==d.depth||u.ruleId!==d.ruleId||u.endRule!==d.endRule)return!1;u=u.parent,d=d.parent}while(!0)}clone(){return this}static _reset(u){for(;u;)u._enterPos=-1,u._anchorPos=-1,u=u.parent}reset(){tc._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(u,d,f,m,g,x,b){return new tc(this,u,d,f,m,g,x,b)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(u){return u.getRule(this.ruleId)}toString(){const u=[];return this._writeString(u,0),"["+u.join(",")+"]"}_writeString(u,d){return this.parent&&(d=this.parent._writeString(u,d)),u[d++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,d}withContentNameScopesList(u){return this.contentNameScopesList===u?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,u)}withEndRule(u){return this.endRule===u?this:new tc(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,u,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(u){let d=this;for(;d&&d._enterPos===u._enterPos;){if(d.ruleId===u.ruleId)return!0;d=d.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(u,d){const f=a5.fromExtension(u?.nameScopesList??null,d.nameScopesList);return new tc(u,d.ruleId,d.enterPos??-1,d.anchorPos??-1,d.beginRuleCapturedEOL,d.endRule,f,a5.fromExtension(f,d.contentNameScopesList))}},Pt(tc,"NULL",new tc(null,0,0,0,!1,null,null,null)),tc),uWt=class{constructor(u,d){Pt(this,"balancedBracketScopes");Pt(this,"unbalancedBracketScopes");Pt(this,"allowAny",!1);this.balancedBracketScopes=u.flatMap(f=>f==="*"?(this.allowAny=!0,[]):MF(f,qF).map(m=>m.matcher)),this.unbalancedBracketScopes=d.flatMap(f=>MF(f,qF).map(m=>m.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(u){for(const d of this.unbalancedBracketScopes)if(d(u))return!1;for(const d of this.balancedBracketScopes)if(d(u))return!0;return this.allowAny}},cWt=class{constructor(u,d,f,m){Pt(this,"_emitBinaryTokens");Pt(this,"_lineText");Pt(this,"_tokens");Pt(this,"_binaryTokens");Pt(this,"_lastTokenEndIndex");Pt(this,"_tokenTypeOverrides");this.balancedBracketSelectors=m,this._emitBinaryTokens=u,this._tokenTypeOverrides=f,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(u,d){this.produceFromScopes(u.contentNameScopesList,d)}produceFromScopes(u,d){if(this._lastTokenEndIndex>=d)return;if(this._emitBinaryTokens){let m=u?.tokenAttributes??0,g=!1;if(this.balancedBracketSelectors?.matchesAlways&&(g=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const x=u?.getScopeNames()??[];for(const b of this._tokenTypeOverrides)b.matcher(x)&&(m=nS.set(m,0,b.type,null,-1,0,0));this.balancedBracketSelectors&&(g=this.balancedBracketSelectors.match(x))}if(g&&(m=nS.set(m,0,8,g,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===m){this._lastTokenEndIndex=d;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(m),this._lastTokenEndIndex=d;return}const f=u?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:d,scopes:f}),this._lastTokenEndIndex=d}getResult(u,d){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===d-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(u,d),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(u,d){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===d-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(u,d),this._binaryTokens[this._binaryTokens.length-2]=0);const f=new Uint32Array(this._binaryTokens.length);for(let m=0,g=this._binaryTokens.length;m<g;m++)f[m]=this._binaryTokens[m];return f}},dWt=class{constructor(u,d){Pt(this,"_grammars",new Map);Pt(this,"_rawGrammars",new Map);Pt(this,"_injectionGrammars",new Map);Pt(this,"_theme");this._onigLib=d,this._theme=u}dispose(){for(const u of this._grammars.values())u.dispose()}setTheme(u){this._theme=u}getColorMap(){return this._theme.getColorMap()}addGrammar(u,d){this._rawGrammars.set(u.scopeName,u),d&&this._injectionGrammars.set(u.scopeName,d)}lookup(u){return this._rawGrammars.get(u)}injections(u){return this._injectionGrammars.get(u)}getDefaults(){return this._theme.getDefaults()}themeMatch(u){return this._theme.match(u)}grammarForScopeName(u,d,f,m,g){if(!this._grammars.has(u)){let x=this._rawGrammars.get(u);if(!x)return null;this._grammars.set(u,oWt(u,x,d,f,m,g,this,this._onigLib))}return this._grammars.get(u)}},fWt=class{constructor(u){Pt(this,"_options");Pt(this,"_syncRegistry");Pt(this,"_ensureGrammarCache");this._options=u,this._syncRegistry=new dWt(FF.createFromRawTheme(u.theme,u.colorMap),u.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(u,d){this._syncRegistry.setTheme(FF.createFromRawTheme(u,d))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(u,d,f){return this.loadGrammarWithConfiguration(u,d,{embeddedLanguages:f})}loadGrammarWithConfiguration(u,d,f){return this._loadGrammar(u,d,f.embeddedLanguages,f.tokenTypes,new uWt(f.balancedBracketSelectors||[],f.unbalancedBracketSelectors||[]))}loadGrammar(u){return this._loadGrammar(u,0,null,null,null)}_loadGrammar(u,d,f,m,g){const x=new qGt(this._syncRegistry,u);for(;x.Q.length>0;)x.Q.map(b=>this._loadSingleGrammar(b.scopeName)),x.processQueue();return this._grammarForScopeName(u,d,f,m,g)}_loadSingleGrammar(u){this._ensureGrammarCache.has(u)||(this._doLoadSingleGrammar(u),this._ensureGrammarCache.set(u,!0))}_doLoadSingleGrammar(u){const d=this._options.loadGrammar(u);if(d){const f=typeof this._options.getInjections=="function"?this._options.getInjections(u):void 0;this._syncRegistry.addGrammar(d,f)}}addGrammar(u,d=[],f=0,m=null){return this._syncRegistry.addGrammar(u,d),this._grammarForScopeName(u.scopeName,f,m)}_grammarForScopeName(u,d=0,f=null,m=null,g=null){return this._syncRegistry.grammarForScopeName(u,d,f,m,g)}},mne=pne.NULL;function hWt(a){return Array.isArray(a)?a:[a]}function OM(a,u=!1){const d=a.split(/(\r?\n)/g);let f=0;const m=[];for(let g=0;g<d.length;g+=2){const x=u?d[g]+(d[g+1]||""):d[g];m.push([x,f]),f+=d[g].length,f+=d[g+1]?.length||0}return m}function Tie(a){return!a||["plaintext","txt","text","plain"].includes(a)}function SIe(a){return a==="ansi"||Tie(a)}function wie(a){return a==="none"}function AIe(a){return wie(a)}function CIe(a,u){var f;if(!u)return a;a.properties||(a.properties={}),(f=a.properties).class||(f.class=[]),typeof a.properties.class=="string"&&(a.properties.class=a.properties.class.split(/\s+/g)),Array.isArray(a.properties.class)||(a.properties.class=[]);const d=Array.isArray(u)?u:u.split(/\s+/g);for(const m of d)m&&!a.properties.class.includes(m)&&a.properties.class.push(m);return a}function pWt(a,u){let d=0;const f=[];for(const m of u)m>d&&f.push({...a,content:a.content.slice(d,m),offset:a.offset+d}),d=m;return d<a.content.length&&f.push({...a,content:a.content.slice(d),offset:a.offset+d}),f}function mWt(a,u){const d=Array.from(u instanceof Set?u:new Set(u)).sort((f,m)=>f-m);return d.length?a.map(f=>f.flatMap(m=>{const g=d.filter(x=>m.offset<x&&x<m.offset+m.content.length).map(x=>x-m.offset).sort((x,b)=>x-b);return g.length?pWt(m,g):m})):a}async function RIe(a){return Promise.resolve(typeof a=="function"?a():a).then(u=>u.default||u)}function UF(a,u){const d=typeof a=="string"?{}:{...a.colorReplacements},f=typeof a=="string"?a:a.name;for(const[m,g]of Object.entries(u?.colorReplacements||{}))typeof g=="string"?d[m]=g:m===f&&Object.assign(d,g);return d}function Fv(a,u){return a&&(u?.[a?.toLowerCase()]||a)}function TIe(a){const u={};return a.color&&(u.color=a.color),a.bgColor&&(u["background-color"]=a.bgColor),a.fontStyle&&(a.fontStyle&s0.Italic&&(u["font-style"]="italic"),a.fontStyle&s0.Bold&&(u["font-weight"]="bold"),a.fontStyle&s0.Underline&&(u["text-decoration"]="underline")),u}function gWt(a){return typeof a=="string"?a:Object.entries(a).map(([u,d])=>`${u}:${d}`).join(";")}function xWt(a){const u=OM(a,!0).map(([m])=>m);function d(m){if(m===a.length)return{line:u.length-1,character:u[u.length-1].length};let g=m,x=0;for(const b of u){if(g<b.length)break;g-=b.length,x++}return{line:x,character:g}}function f(m,g){let x=0;for(let b=0;b<m;b++)x+=u[b].length;return x+=g,x}return{lines:u,indexToPos:d,posToIndex:f}}class Wa extends Error{constructor(u){super(u),this.name="ShikiError"}}const wIe=new WeakMap;function NM(a,u){wIe.set(a,u)}function A5(a){return wIe.get(a)}let DM=class OIe{constructor(...u){Pt(this,"_stacks",{});Pt(this,"lang");if(u.length===2){const[d,f]=u;this.lang=f,this._stacks=d}else{const[d,f,m]=u;this.lang=f,this._stacks={[m]:d}}}get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(u,d){return new OIe(Object.fromEntries(hWt(d).map(f=>[f,mne])),u)}getInternalStack(u=this.theme){return this._stacks[u]}get scopes(){return PNe(this._stacks[this.theme])}getScopes(u=this.theme){return PNe(this._stacks[u])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.scopes}}};function PNe(a){const u=[],d=new Set;function f(m){if(d.has(m))return;d.add(m);const g=m?.nameScopesList?.scopeName;g&&u.push(g),m.parent&&f(m.parent)}return f(a),u}function yWt(a,u){if(!(a instanceof DM))throw new Wa("Invalid grammar state");return a.getInternalStack(u)}function vWt(){const a=new WeakMap;function u(d){if(!a.has(d.meta)){let f=function(x){if(typeof x=="number"){if(x<0||x>d.source.length)throw new Wa(`Invalid decoration offset: ${x}. Code length: ${d.source.length}`);return{...m.indexToPos(x),offset:x}}else{const b=m.lines[x.line];if(b===void 0)throw new Wa(`Invalid decoration position ${JSON.stringify(x)}. Lines length: ${m.lines.length}`);if(x.character<0||x.character>b.length)throw new Wa(`Invalid decoration position ${JSON.stringify(x)}. Line ${x.line} length: ${b.length}`);return{...x,offset:m.posToIndex(x.line,x.character)}}};const m=xWt(d.source),g=(d.options.decorations||[]).map(x=>({...x,start:f(x.start),end:f(x.end)}));bWt(g),a.set(d.meta,{decorations:g,converter:m,source:d.source})}return a.get(d.meta)}return{name:"shiki:decorations",tokens(d){if(!this.options.decorations?.length)return;const m=u(this).decorations.flatMap(x=>[x.start.offset,x.end.offset]);return mWt(d,m)},code(d){if(!this.options.decorations?.length)return;const f=u(this),m=Array.from(d.children).filter(S=>S.type==="element"&&S.tagName==="span");if(m.length!==f.converter.lines.length)throw new Wa(`Number of lines in code element (${m.length}) does not match the number of lines in the source (${f.converter.lines.length}). Failed to apply decorations.`);function g(S,R,w,N){const k=m[S];let B="",P=-1,$=-1;if(R===0&&(P=0),w===0&&($=0),w===Number.POSITIVE_INFINITY&&($=k.children.length),P===-1||$===-1)for(let z=0;z<k.children.length;z++)B+=NIe(k.children[z]),P===-1&&B.length===R&&(P=z+1),$===-1&&B.length===w&&($=z+1);if(P===-1)throw new Wa(`Failed to find start index for decoration ${JSON.stringify(N.start)}`);if($===-1)throw new Wa(`Failed to find end index for decoration ${JSON.stringify(N.end)}`);const q=k.children.slice(P,$);if(!N.alwaysWrap&&q.length===k.children.length)b(k,N,"line");else if(!N.alwaysWrap&&q.length===1&&q[0].type==="element")b(q[0],N,"token");else{const z={type:"element",tagName:"span",properties:{},children:q};b(z,N,"wrapper"),k.children.splice(P,q.length,z)}}function x(S,R){m[S]=b(m[S],R,"line")}function b(S,R,w){const N=R.properties||{},k=R.transform||(B=>B);return S.tagName=R.tagName||"span",S.properties={...S.properties,...N,class:S.properties.class},R.properties?.class&&CIe(S,R.properties.class),S=k(S,w)||S,S}const v=[],_=f.decorations.sort((S,R)=>R.start.offset-S.start.offset);for(const S of _){const{start:R,end:w}=S;if(R.line===w.line)g(R.line,R.character,w.character,S);else if(R.line<w.line){g(R.line,R.character,Number.POSITIVE_INFINITY,S);for(let N=R.line+1;N<w.line;N++)v.unshift(()=>x(N,S));g(w.line,0,w.character,S)}}v.forEach(S=>S())}}}function bWt(a){for(let u=0;u<a.length;u++){const d=a[u];if(d.start.offset>d.end.offset)throw new Wa(`Invalid decoration range: ${JSON.stringify(d.start)} - ${JSON.stringify(d.end)}`);for(let f=u+1;f<a.length;f++){const m=a[f],g=d.start.offset<m.start.offset&&m.start.offset<d.end.offset,x=d.start.offset<m.end.offset&&m.end.offset<d.end.offset,b=m.start.offset<d.start.offset&&d.start.offset<m.end.offset,v=m.start.offset<d.end.offset&&d.end.offset<m.end.offset;if(g||x||b||v){if(x&&x||b&&v)continue;throw new Wa(`Decorations ${JSON.stringify(d.start)} and ${JSON.stringify(m.start)} intersect.`)}}}}function NIe(a){return a.type==="text"?a.value:a.type==="element"?a.children.map(NIe).join(""):""}const EWt=[vWt()];function zF(a){return[...a.transformers||[],...EWt]}var Mv=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Dee={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function _Wt(a,u){const d=a.indexOf("\x1B[",u);if(d!==-1){const f=a.indexOf("m",d);return{sequence:a.substring(d+2,f).split(";"),startPosition:d,position:f+1}}return{position:a.length}}function jNe(a,u){let d=1;const f=a[u+d++];let m;if(f==="2"){const g=[a[u+d++],a[u+d++],a[u+d]].map(x=>Number.parseInt(x));g.length===3&&!g.some(x=>Number.isNaN(x))&&(m={type:"rgb",rgb:g})}else if(f==="5"){const g=Number.parseInt(a[u+d]);Number.isNaN(g)||(m={type:"table",index:Number(g)})}return[d,m]}function SWt(a){const u=[];for(let d=0;d<a.length;d++){const f=a[d],m=Number.parseInt(f);if(!Number.isNaN(m))if(m===0)u.push({type:"resetAll"});else if(m<=9)Dee[m]&&u.push({type:"setDecoration",value:Dee[m]});else if(m<=29){const g=Dee[m-20];g&&u.push({type:"resetDecoration",value:g})}else if(m<=37)u.push({type:"setForegroundColor",value:{type:"named",name:Mv[m-30]}});else if(m===38){const[g,x]=jNe(a,d);x&&u.push({type:"setForegroundColor",value:x}),d+=g}else if(m===39)u.push({type:"resetForegroundColor"});else if(m<=47)u.push({type:"setBackgroundColor",value:{type:"named",name:Mv[m-40]}});else if(m===48){const[g,x]=jNe(a,d);x&&u.push({type:"setBackgroundColor",value:x}),d+=g}else m===49?u.push({type:"resetBackgroundColor"}):m>=90&&m<=97?u.push({type:"setForegroundColor",value:{type:"named",name:Mv[m-90+8]}}):m>=100&&m<=107&&u.push({type:"setBackgroundColor",value:{type:"named",name:Mv[m-100+8]}})}return u}function AWt(){let a=null,u=null,d=new Set;return{parse(f){const m=[];let g=0;do{const x=_Wt(f,g),b=x.sequence?f.substring(g,x.startPosition):f.substring(g);if(b.length>0&&m.push({value:b,foreground:a,background:u,decorations:new Set(d)}),x.sequence){const v=SWt(x.sequence);for(const _ of v)_.type==="resetAll"?(a=null,u=null,d.clear()):_.type==="resetForegroundColor"?a=null:_.type==="resetBackgroundColor"?u=null:_.type==="resetDecoration"&&d.delete(_.value);for(const _ of v)_.type==="setForegroundColor"?a=_.value:_.type==="setBackgroundColor"?u=_.value:_.type==="setDecoration"&&d.add(_.value)}g=x.position}while(g<f.length);return m}}}var CWt={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function RWt(a=CWt){function u(b){return a[b]}function d(b){return`#${b.map(v=>Math.max(0,Math.min(v,255)).toString(16).padStart(2,"0")).join("")}`}let f;function m(){if(f)return f;f=[];for(let _=0;_<Mv.length;_++)f.push(u(Mv[_]));let b=[0,95,135,175,215,255];for(let _=0;_<6;_++)for(let S=0;S<6;S++)for(let R=0;R<6;R++)f.push(d([b[_],b[S],b[R]]));let v=8;for(let _=0;_<24;_++,v+=10)f.push(d([v,v,v]));return f}function g(b){return m()[b]}function x(b){switch(b.type){case"named":return u(b.name);case"rgb":return d(b.rgb);case"table":return g(b.index)}}return{value:x}}function TWt(a,u,d){const f=UF(a,d),m=OM(u),g=RWt(Object.fromEntries(Mv.map(b=>[b,a.colors?.[`terminal.ansi${b[0].toUpperCase()}${b.substring(1)}`]]))),x=AWt();return m.map(b=>x.parse(b[0]).map(v=>{let _,S;v.decorations.has("reverse")?(_=v.background?g.value(v.background):a.bg,S=v.foreground?g.value(v.foreground):a.fg):(_=v.foreground?g.value(v.foreground):a.fg,S=v.background?g.value(v.background):void 0),_=Fv(_,f),S=Fv(S,f),v.decorations.has("dim")&&(_=wWt(_));let R=s0.None;return v.decorations.has("bold")&&(R|=s0.Bold),v.decorations.has("italic")&&(R|=s0.Italic),v.decorations.has("underline")&&(R|=s0.Underline),{content:v.value,offset:b[1],color:_,bgColor:S,fontStyle:R}}))}function wWt(a){const u=a.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(u)if(u[3]){const f=Math.round(Number.parseInt(u[3],16)/2).toString(16).padStart(2,"0");return`#${u[1]}${u[2]}${f}`}else return u[2]?`#${u[1]}${u[2]}80`:`#${Array.from(u[1]).map(f=>`${f}${f}`).join("")}80`;const d=a.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return d?`var(${d[1]}-dim)`:a}function Oie(a,u,d={}){const{lang:f="text",theme:m=a.getLoadedThemes()[0]}=d;if(Tie(f)||wie(m))return OM(u).map(v=>[{content:v[0],offset:v[1]}]);const{theme:g,colorMap:x}=a.setTheme(m);if(f==="ansi")return TWt(g,u,d);const b=a.getLanguage(f);if(d.grammarState){if(d.grammarState.lang!==b.name)throw new u0(`Grammar state language "${d.grammarState.lang}" does not match highlight language "${b.name}"`);if(!d.grammarState.themes.includes(g.name))throw new u0(`Grammar state themes "${d.grammarState.themes}" do not contain highlight theme "${g.name}"`)}return NWt(u,b,g,x,d)}function OWt(...a){if(a.length===2)return A5(a[1]);const[u,d,f={}]=a,{lang:m="text",theme:g=u.getLoadedThemes()[0]}=f;if(Tie(m)||wie(g))throw new u0("Plain language does not have grammar state");if(m==="ansi")throw new u0("ANSI language does not have grammar state");const{theme:x,colorMap:b}=u.setTheme(g),v=u.getLanguage(m);return new DM(HF(d,v,x,b,f).stateStack,v.name,x.name)}function NWt(a,u,d,f,m){const g=HF(a,u,d,f,m),x=new DM(HF(a,u,d,f,m).stateStack,u.name,d.name);return NM(g.tokens,x),g.tokens}function HF(a,u,d,f,m){const g=UF(d,m),{tokenizeMaxLineLength:x=0,tokenizeTimeLimit:b=500}=m,v=OM(a);let _=m.grammarState?yWt(m.grammarState,d.name)??mne:m.grammarContextCode!=null?HF(m.grammarContextCode,u,d,f,{...m,grammarState:void 0,grammarContextCode:void 0}).stateStack:mne,S=[];const R=[];for(let w=0,N=v.length;w<N;w++){const[k,B]=v[w];if(k===""){S=[],R.push([]);continue}if(x>0&&k.length>=x){S=[],R.push([{content:k,offset:B,color:"",fontStyle:0}]);continue}let P,$,q;m.includeExplanation&&(P=u.tokenizeLine(k,_),$=P.tokens,q=0);const z=u.tokenizeLine2(k,_,b),W=z.tokens.length/2;for(let X=0;X<W;X++){const J=z.tokens[2*X],ee=X+1<W?z.tokens[2*X+2]:k.length;if(J===ee)continue;const fe=z.tokens[2*X+1],be=Fv(f[nS.getForeground(fe)],g),je=nS.getFontStyle(fe),_e={content:k.substring(J,ee),offset:B+J,color:be,fontStyle:je};if(m.includeExplanation){const De=[];if(m.includeExplanation!=="scopeName")for(const ze of d.settings){let te;switch(typeof ze.scope){case"string":te=ze.scope.split(/,/).map(Ne=>Ne.trim());break;case"object":te=ze.scope;break;default:continue}De.push({settings:ze,selectors:te.map(Ne=>Ne.split(/ /))})}_e.explanation=[];let Xe=0;for(;J+Xe<ee;){const ze=$[q],te=k.substring(ze.startIndex,ze.endIndex);Xe+=te.length,_e.explanation.push({content:te,scopes:m.includeExplanation==="scopeName"?DWt(ze.scopes):kWt(De,ze.scopes)}),q+=1}}S.push(_e)}R.push(S),S=[],_=z.ruleStack}return{tokens:R,stateStack:_}}function DWt(a){return a.map(u=>({scopeName:u}))}function kWt(a,u){const d=[];for(let f=0,m=u.length;f<m;f++){const g=u[f];d[f]={scopeName:g,themeMatches:IWt(a,g,u.slice(0,f))}}return d}function FNe(a,u){return a===u||u.substring(0,a.length)===a&&u[a.length]==="."}function LWt(a,u,d){if(!FNe(a[a.length-1],u))return!1;let f=a.length-2,m=d.length-1;for(;f>=0&&m>=0;)FNe(a[f],d[m])&&(f-=1),m-=1;return f===-1}function IWt(a,u,d){const f=[];for(const{selectors:m,settings:g}of a)for(const x of m)if(LWt(x,u,d)){f.push(g);break}return f}function DIe(a,u,d){const f=Object.entries(d.themes).filter(v=>v[1]).map(v=>({color:v[0],theme:v[1]})),m=f.map(v=>{const _=Oie(a,u,{...d,theme:v.theme}),S=A5(_),R=typeof v.theme=="string"?v.theme:v.theme.name;return{tokens:_,state:S,theme:R}}),g=PWt(...m.map(v=>v.tokens)),x=g[0].map((v,_)=>v.map((S,R)=>{const w={content:S.content,variants:{},offset:S.offset};return"includeExplanation"in d&&d.includeExplanation&&(w.explanation=S.explanation),g.forEach((N,k)=>{const{content:B,explanation:P,offset:$,...q}=N[_][R];w.variants[f[k].color]=q}),w})),b=m[0].state?new DM(Object.fromEntries(m.map(v=>[v.theme,v.state?.getInternalStack(v.theme)])),m[0].state.lang):void 0;return b&&NM(x,b),x}function PWt(...a){const u=a.map(()=>[]),d=a.length;for(let f=0;f<a[0].length;f++){const m=a.map(v=>v[f]),g=u.map(()=>[]);u.forEach((v,_)=>v.push(g[_]));const x=m.map(()=>0),b=m.map(v=>v[0]);for(;b.every(v=>v);){const v=Math.min(...b.map(_=>_.content.length));for(let _=0;_<d;_++){const S=b[_];S.content.length===v?(g[_].push(S),x[_]+=1,b[_]=m[_][x[_]]):(g[_].push({...S,content:S.content.slice(0,v)}),b[_]={...S,content:S.content.slice(v),offset:S.offset+v})}}}return u}function GF(a,u,d){let f,m,g,x,b,v;if("themes"in d){const{defaultColor:_="light",cssVariablePrefix:S="--shiki-"}=d,R=Object.entries(d.themes).filter(P=>P[1]).map(P=>({color:P[0],theme:P[1]})).sort((P,$)=>P.color===_?-1:$.color===_?1:0);if(R.length===0)throw new u0("`themes` option must not be empty");const w=DIe(a,u,d);if(v=A5(w),_&&!R.find(P=>P.color===_))throw new u0(`\`themes\` option must contain the defaultColor key \`${_}\``);const N=R.map(P=>a.getTheme(P.theme)),k=R.map(P=>P.color);g=w.map(P=>P.map($=>jWt($,k,S,_))),v&&NM(g,v);const B=R.map(P=>UF(P.theme,d));m=R.map((P,$)=>($===0&&_?"":`${S+P.color}:`)+(Fv(N[$].fg,B[$])||"inherit")).join(";"),f=R.map((P,$)=>($===0&&_?"":`${S+P.color}-bg:`)+(Fv(N[$].bg,B[$])||"inherit")).join(";"),x=`shiki-themes ${N.map(P=>P.name).join(" ")}`,b=_?void 0:[m,f].join(";")}else if("theme"in d){const _=UF(d.theme,d);g=Oie(a,u,d);const S=a.getTheme(d.theme);f=Fv(S.bg,_),m=Fv(S.fg,_),x=S.name,v=A5(g)}else throw new u0("Invalid options, either `theme` or `themes` must be provided");return{tokens:g,fg:m,bg:f,themeName:x,rootStyle:b,grammarState:v}}function jWt(a,u,d,f){const m={content:a.content,explanation:a.explanation,offset:a.offset},g=u.map(v=>TIe(a.variants[v])),x=new Set(g.flatMap(v=>Object.keys(v))),b={};return g.forEach((v,_)=>{for(const S of x){const R=v[S]||"inherit";if(_===0&&f)b[S]=R;else{const w=S==="color"?"":S==="background-color"?"-bg":`-${S}`,N=d+u[_]+(S==="color"?"":w);b[N]=R}}}),m.htmlStyle=b,m}function WF(a,u,d,f={meta:{},options:d,codeToHast:(m,g)=>WF(a,m,g),codeToTokens:(m,g)=>GF(a,m,g)}){let m=u;for(const N of zF(d))m=N.preprocess?.call(f,m,d)||m;let{tokens:g,fg:x,bg:b,themeName:v,rootStyle:_,grammarState:S}=GF(a,m,d);const{mergeWhitespaces:R=!0}=d;R===!0?g=MWt(g):R==="never"&&(g=$Wt(g));const w={...f,get source(){return m}};for(const N of zF(d))g=N.tokens?.call(w,g)||g;return FWt(g,{...d,fg:x,bg:b,themeName:v,rootStyle:_},w,S)}function FWt(a,u,d,f=A5(a)){const m=zF(u),g=[],x={type:"root",children:[]},{structure:b="classic",tabindex:v="0"}=u;let _={type:"element",tagName:"pre",properties:{class:`shiki ${u.themeName||""}`,style:u.rootStyle||`background-color:${u.bg};color:${u.fg}`,...v!==!1&&v!=null?{tabindex:v.toString()}:{},...Object.fromEntries(Array.from(Object.entries(u.meta||{})).filter(([k])=>!k.startsWith("_")))},children:[]},S={type:"element",tagName:"code",properties:{},children:g};const R=[],w={...d,structure:b,addClassToHast:CIe,get source(){return d.source},get tokens(){return a},get options(){return u},get root(){return x},get pre(){return _},get code(){return S},get lines(){return R}};if(a.forEach((k,B)=>{B&&(b==="inline"?x.children.push({type:"element",tagName:"br",properties:{},children:[]}):b==="classic"&&g.push({type:"text",value:`
|
|
4
|
-
`}));let P={type:"element",tagName:"span",properties:{class:"line"},children:[]},$=0;for(const q of k){let z={type:"element",tagName:"span",properties:{...q.htmlAttrs},children:[{type:"text",value:q.content}]};q.htmlStyle;const W=gWt(q.htmlStyle||TIe(q));W&&(z.properties.style=W);for(const X of m)z=X?.span?.call(w,z,B+1,$,P,q)||z;b==="inline"?x.children.push(z):b==="classic"&&P.children.push(z),$+=q.content.length}if(b==="classic"){for(const q of m)P=q?.line?.call(w,P,B+1)||P;R.push(P),g.push(P)}}),b==="classic"){for(const k of m)S=k?.code?.call(w,S)||S;_.children.push(S);for(const k of m)_=k?.pre?.call(w,_)||_;x.children.push(_)}let N=x;for(const k of m)N=k?.root?.call(w,N)||N;return f&&NM(N,f),N}function MWt(a){return a.map(u=>{const d=[];let f="",m=0;return u.forEach((g,x)=>{const v=!(g.fontStyle&&g.fontStyle&s0.Underline);v&&g.content.match(/^\s+$/)&&u[x+1]?(m||(m=g.offset),f+=g.content):f?(v?d.push({...g,offset:m,content:f+g.content}):d.push({content:f,offset:m},g),m=0,f=""):d.push(g)}),d})}function $Wt(a){return a.map(u=>u.flatMap(d=>{if(d.content.match(/^\s+$/))return d;const f=d.content.match(/^(\s*)(.*?)(\s*)$/);if(!f)return d;const[,m,g,x]=f;if(!m&&!x)return d;const b=[{...d,offset:d.offset+m.length,content:g}];return m&&b.unshift({content:m,offset:d.offset}),x&&b.push({content:x,offset:d.offset+m.length+g.length}),b}))}function BWt(a,u,d){const f={meta:{},options:d,codeToHast:(g,x)=>WF(a,g,x),codeToTokens:(g,x)=>GF(a,g,x)};let m=D.toHtml(WF(a,u,d,f));for(const g of zF(d))m=g.postprocess?.call(f,m,d)||m;return m}const MNe={light:"#333333",dark:"#bbbbbb"},$Ne={light:"#fffffe",dark:"#1e1e1e"},BNe="__shiki_resolved";function Nie(a){if(a?.[BNe])return a;const u={...a};u.tokenColors&&!u.settings&&(u.settings=u.tokenColors,delete u.tokenColors),u.type||(u.type="dark"),u.colorReplacements={...u.colorReplacements},u.settings||(u.settings=[]);let{bg:d,fg:f}=u;if(!d||!f){const b=u.settings?u.settings.find(v=>!v.name&&!v.scope):void 0;b?.settings?.foreground&&(f=b.settings.foreground),b?.settings?.background&&(d=b.settings.background),!f&&u?.colors?.["editor.foreground"]&&(f=u.colors["editor.foreground"]),!d&&u?.colors?.["editor.background"]&&(d=u.colors["editor.background"]),f||(f=u.type==="light"?MNe.light:MNe.dark),d||(d=u.type==="light"?$Ne.light:$Ne.dark),u.fg=f,u.bg=d}u.settings[0]&&u.settings[0].settings&&!u.settings[0].scope||u.settings.unshift({settings:{foreground:u.fg,background:u.bg}});let m=0;const g=new Map;function x(b){if(g.has(b))return g.get(b);m+=1;const v=`#${m.toString(16).padStart(8,"0").toLowerCase()}`;return u.colorReplacements?.[`#${v}`]?x(b):(g.set(b,v),v)}u.settings=u.settings.map(b=>{const v=b.settings?.foreground&&!b.settings.foreground.startsWith("#"),_=b.settings?.background&&!b.settings.background.startsWith("#");if(!v&&!_)return b;const S={...b,settings:{...b.settings}};if(v){const R=x(b.settings.foreground);u.colorReplacements[R]=b.settings.foreground,S.settings.foreground=R}if(_){const R=x(b.settings.background);u.colorReplacements[R]=b.settings.background,S.settings.background=R}return S});for(const b of Object.keys(u.colors||{}))if((b==="editor.foreground"||b==="editor.background"||b.startsWith("terminal.ansi"))&&!u.colors[b]?.startsWith("#")){const v=x(u.colors[b]);u.colorReplacements[v]=u.colors[b],u.colors[b]=v}return Object.defineProperty(u,BNe,{enumerable:!1,writable:!1,value:!0}),u}async function kIe(a){return Array.from(new Set((await Promise.all(a.filter(u=>!SIe(u)).map(async u=>await RIe(u).then(d=>Array.isArray(d)?d:[d])))).flat()))}async function LIe(a){return(await Promise.all(a.map(async d=>AIe(d)?null:Nie(await RIe(d))))).filter(d=>!!d)}class qWt extends fWt{constructor(d,f,m,g={}){super(d);Pt(this,"_resolvedThemes",new Map);Pt(this,"_resolvedGrammars",new Map);Pt(this,"_langMap",new Map);Pt(this,"_langGraph",new Map);Pt(this,"_textmateThemeCache",new WeakMap);Pt(this,"_loadedThemesCache",null);Pt(this,"_loadedLanguagesCache",null);this._resolver=d,this._themes=f,this._langs=m,this._alias=g,this._themes.map(x=>this.loadTheme(x)),this.loadLanguages(this._langs)}getTheme(d){return typeof d=="string"?this._resolvedThemes.get(d):this.loadTheme(d)}loadTheme(d){const f=Nie(d);return f.name&&(this._resolvedThemes.set(f.name,f),this._loadedThemesCache=null),f}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(d){let f=this._textmateThemeCache.get(d);f||(f=FF.createFromRawTheme(d),this._textmateThemeCache.set(d,f)),this._syncRegistry.setTheme(f)}getGrammar(d){if(this._alias[d]){const f=new Set([d]);for(;this._alias[d];){if(d=this._alias[d],f.has(d))throw new Wa(`Circular alias \`${Array.from(f).join(" -> ")} -> ${d}\``);f.add(d)}}return this._resolvedGrammars.get(d)}loadLanguage(d){if(this.getGrammar(d.name))return;const f=new Set([...this._langMap.values()].filter(x=>x.embeddedLangsLazy?.includes(d.name)));this._resolver.addLanguage(d);const m={balancedBracketSelectors:d.balancedBracketSelectors||["*"],unbalancedBracketSelectors:d.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(d.scopeName,d);const g=this.loadGrammarWithConfiguration(d.scopeName,1,m);if(g.name=d.name,this._resolvedGrammars.set(d.name,g),d.aliases&&d.aliases.forEach(x=>{this._alias[x]=d.name}),this._loadedLanguagesCache=null,f.size)for(const x of f)this._resolvedGrammars.delete(x.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(x.scopeName),this._syncRegistry?._grammars?.delete(x.scopeName),this.loadLanguage(this._langMap.get(x.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(d){for(const g of d)this.resolveEmbeddedLanguages(g);const f=Array.from(this._langGraph.entries()),m=f.filter(([g,x])=>!x);if(m.length){const g=f.filter(([x,b])=>b&&b.embeddedLangs?.some(v=>m.map(([_])=>_).includes(v))).filter(x=>!m.includes(x));throw new Wa(`Missing languages ${m.map(([x])=>`\`${x}\``).join(", ")}, required by ${g.map(([x])=>`\`${x}\``).join(", ")}`)}for(const[g,x]of f)this._resolver.addLanguage(x);for(const[g,x]of f)this.loadLanguage(x)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(d){if(this._langMap.set(d.name,d),this._langGraph.set(d.name,d),d.embeddedLangs)for(const f of d.embeddedLangs)this._langGraph.set(f,this._langMap.get(f))}}let UWt=class{constructor(u,d){Pt(this,"_langs",new Map);Pt(this,"_scopeToLang",new Map);Pt(this,"_injections",new Map);Pt(this,"_onigLib");this._onigLib={createOnigScanner:f=>u.createScanner(f),createOnigString:f=>u.createString(f)},d.forEach(f=>this.addLanguage(f))}get onigLib(){return this._onigLib}getLangRegistration(u){return this._langs.get(u)}loadGrammar(u){return this._scopeToLang.get(u)}addLanguage(u){this._langs.set(u.name,u),u.aliases&&u.aliases.forEach(d=>{this._langs.set(d,u)}),this._scopeToLang.set(u.scopeName,u),u.injectTo&&u.injectTo.forEach(d=>{this._injections.get(d)||this._injections.set(d,[]),this._injections.get(d).push(u.scopeName)})}getInjections(u){const d=u.split(".");let f=[];for(let m=1;m<=d.length;m++){const g=d.slice(0,m).join(".");f=[...f,...this._injections.get(g)||[]]}return f}},nO=0;function zWt(a){nO+=1,a.warnings!==!1&&nO>=10&&nO%10===0&&console.warn(`[Shiki] ${nO} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let u=!1;if(!a.engine)throw new Wa("`engine` option is required for synchronous mode");const d=(a.langs||[]).flat(1),f=(a.themes||[]).flat(1).map(Nie),m=new UWt(a.engine,d),g=new qWt(m,f,d,a.langAlias);let x;function b(q){P();const z=g.getGrammar(typeof q=="string"?q:q.name);if(!z)throw new Wa(`Language \`${q}\` not found, you may need to load it first`);return z}function v(q){if(q==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};P();const z=g.getTheme(q);if(!z)throw new Wa(`Theme \`${q}\` not found, you may need to load it first`);return z}function _(q){P();const z=v(q);x!==q&&(g.setTheme(z),x=q);const W=g.getColorMap();return{theme:z,colorMap:W}}function S(){return P(),g.getLoadedThemes()}function R(){return P(),g.getLoadedLanguages()}function w(...q){P(),g.loadLanguages(q.flat(1))}async function N(...q){return w(await kIe(q))}function k(...q){P();for(const z of q.flat(1))g.loadTheme(z)}async function B(...q){return P(),k(await LIe(q))}function P(){if(u)throw new Wa("Shiki instance has been disposed")}function $(){u||(u=!0,g.dispose(),nO-=1)}return{setTheme:_,getTheme:v,getLanguage:b,getLoadedThemes:S,getLoadedLanguages:R,loadLanguage:N,loadLanguageSync:w,loadTheme:B,loadThemeSync:k,dispose:$,[Symbol.dispose]:$}}async function HWt(a={}){a.loadWasm;const[u,d,f]=await Promise.all([LIe(a.themes||[]),kIe(a.langs||[]),a.engine||aIe(a.loadWasm||RGt())]);return zWt({...a,themes:u,langs:d,engine:f})}async function GWt(a={}){const u=await HWt(a);return{getLastGrammarState:(...d)=>OWt(u,...d),codeToTokensBase:(d,f)=>Oie(u,d,f),codeToTokensWithThemes:(d,f)=>DIe(u,d,f),codeToTokens:(d,f)=>GF(u,d,f),codeToHast:(d,f)=>WF(u,d,f),codeToHtml:(d,f)=>BWt(u,d,f),...u,getInternalContext:()=>u}}function WWt(a,u,d){let f,m,g;{const b=a;f=b.langs,m=b.themes,g=b.engine}async function x(b){function v(N){if(typeof N=="string"){if(SIe(N))return[];const k=f[N];if(!k)throw new u0(`Language \`${N}\` is not included in this bundle. You may want to load it from external source.`);return k}return N}function _(N){if(AIe(N))return"none";if(typeof N=="string"){const k=m[N];if(!k)throw new u0(`Theme \`${N}\` is not included in this bundle. You may want to load it from external source.`);return k}return N}const S=(b.themes??[]).map(N=>_(N)),R=(b.langs??[]).map(N=>v(N)),w=await GWt({engine:b.engine??g(),...b,themes:S,langs:R});return{...w,loadLanguage(...N){return w.loadLanguage(...N.map(v))},loadTheme(...N){return w.loadTheme(...N.map(_))}}}return x}const VWt=WWt({langs:oGt,themes:lGt,engine:()=>aIe(Promise.resolve().then(()=>require("./wasm-Dw4u1m6u.cjs")))}),kee={scopeName:"source.malloy",patterns:[{include:"#malloy-language"}],repository:{"malloy-language":{patterns:[{include:"#sql-string"},{include:"#comments"},{include:"#tags"},{include:"#strings"},{include:"#numbers"},{include:"#keywords"},{include:"#properties"},{include:"#functions"},{include:"#datetimes"},{include:"#identifiers-quoted"},{include:"#types"},{include:"#constants"},{include:"#timeframes"},{include:"#identifiers-unquoted"}]},"malloy-matched":{begin:"{",end:"}",patterns:[{include:"#malloy-matched"},{include:"#malloy-language"}]},"malloy-in-sql":{begin:"%{",name:"source.malloy-in-sql",end:"}%?",patterns:[{include:"#malloy-matched"},{include:"#malloy-language"}]},"sql-string":{patterns:[{begin:'(\\b[A-Za-z_][A-Za-z_0-9]*)(\\s*\\.\\s*)(sql)(\\s*\\(\\s*)(""")',end:'"""',beginCaptures:{1:{name:"variable.other"},3:{name:"keyword.control.sql"},5:{name:"punctuation.sql-block.open"}},endCaptures:{0:{name:"punctuation.sql-block.close"}},name:"source.sql",patterns:[{include:"#malloy-in-sql"},{include:"source.sql"}]}]},functions:{patterns:[{match:"(?i)\\b(count)(\\s*\\()(distinct)",captures:{1:{name:"entity.name.function"},3:{name:"entity.name.function.modifier"}}},{match:"(?i)\\b(AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE|UNGROUPED)(\\s*\\()",captures:{1:{name:"entity.name.function"}}},{match:"(?i)\\b([a-zA-Z_][a-zA-Z_0-9]*)(\\s*\\()",captures:{1:{name:"entity.name.function"}}},{match:"(?i)\\b([a-zA-Z_][a-zA-Z_0-9]*)(!)(timestamp|number|string|boolean|date)?(\\s*\\()",captures:{1:{name:"entity.name.function"},3:{name:"entity.name.type"}}}]},datetimes:{patterns:[{match:"(?i)@[0-9]{4}-[0-9]{2}-[0-9]{2}[ T][0-9]{2}:[0-9]{2}((:[0-9]{2})(([\\.,][0-9]+)(\\[[A-Za-z_/]+\\])?)?)?",name:"constant.numeric.timestamp"},{match:"(?i)@[0-9]{4}(-Q[1-4]|-[0-9]{2}(-[0-9]{2}(-WK)?)?)?",name:"constant.numeric.date"}]},"identifiers-quoted":{patterns:[{match:"`[^`]*`",name:"variable.other.quoted"}]},"identifiers-unquoted":{patterns:[{match:"(?i)\\b[A-Za-z_][A-Za-z_0-9]*\\b",name:"variable.other"}]},timeframes:{patterns:[{match:"(?i)\\b((year|quarter|month|week|day|hour|minute|second)s?)\\b",name:"keyword.other.timeframe"},{match:"(?i)\\b(day_of_year|day_of_month)\\b",name:"keyword.other.timeframe"}]},comments:{patterns:[{begin:"/\\*",end:"\\*/",beginCaptures:{0:{name:"punctuation.definition.comment.begin"}},endCaptures:{0:{name:"punctuation.definition.comment.end"}},name:"comment.block"},{begin:"//",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-slash"},{begin:"--",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-hyphen"}]},tags:{patterns:[{match:"##\\n",name:"string.quoted",captures:{0:{name:"string.quoted"}}},{begin:'#"',end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-slash"},{match:"#\\n",name:"string.quoted",captures:{0:{name:"string.quoted"}}},{begin:"#\\s",end:"\\n",beginCaptures:{0:{name:"support.type.property-name.json"}},name:"comment.line.double-slash",patterns:[{include:"#tag-values"}]},{begin:"##\\s",end:"\\n",beginCaptures:{0:{name:"support.type.property-name.json"}},name:"comment.line.double-slash",patterns:[{include:"#tag-values"}]},{begin:"#",end:"\\n",beginCaptures:{0:{name:"string.quoted"}},name:"string.quoted"}],repository:{"tag-values":{name:"support.type.property-name.json",match:'(-)?((?:[^\\s=#]+)|(?:"[^#]+"))(?:\\s*(=)\\s*((?:[^\\s=#]+)|(?:"[^#]+")))?',captures:{1:{name:"keyword.control.negate"},2:{name:"support.type.property-name.json"},3:{name:"keyword.operator.comparison.ts"},4:{name:"string.quoted"}}}}},strings:{patterns:[{begin:"'",end:"'",beginCaptures:{0:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},name:"string.quoted.single",patterns:[{include:"#escapes"}]},{begin:'"',end:'"',beginCaptures:{0:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},name:"string.quoted.double",patterns:[{include:"#escapes"}]},{begin:'"""',end:'"""',beginCaptures:{0:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},name:"string.quoted.triple"},{begin:"(?i)[r|/]'",end:"'",name:"string.regexp",patterns:[{include:"#regex-escapes"}]}],repository:{escapes:{name:"constant.character.escape",match:"\\\\(u[A-Fa-f0-9]{4}|.)",captures:{0:{name:"constant.character.escape"}}},"regex-escapes":{name:"constant.character.escape",match:"\\\\.",captures:{0:{name:"constant.character.escape"}}}}},numbers:{match:"(?i)(\\b((0|[1-9][0-9]*)(E[+-]?[0-9]+|\\.[0-9]*)?)|\\.[0-9]+)",name:"constant.numeric"},constants:{patterns:[{match:"(?i)\\bnull\\b",name:"constant.language.null"},{match:"(?i)\\btrue\\b",name:"constant.language.true"},{match:"(?i)\\bfalse\\b",name:"constant.language.false"}]},types:{patterns:[{match:"(?i)\\bstring\\b",name:"entity.name.type.string"},{match:"(?i)\\bnumber\\b",name:"entity.name.type.number"},{match:"(?i)\\bdate\\b",name:"entity.name.type.date"},{match:"(?i)\\btimestamp\\b",name:"entity.name.type.timestamp"},{match:"(?i)\\bboolean\\b",name:"entity.name.type.boolean"}]},properties:{patterns:[{match:"(?i)\\baccept\\b",name:"keyword.control.accept"},{match:"(?i)\\bselect\\b",name:"keyword.control.select"},{match:"(?i)\\bconnection\\b",name:"keyword.control.connection"},{match:"(?i)\\brun\\b",name:"keyword.control.run"},{match:"(?i)\\bextend\\b",name:"keyword.control.extend"},{match:"(?i)\\brefine\\b",name:"keyword.control.refine"},{match:"(?i)\\baggregate\\b",name:"keyword.control.aggregate"},{match:"(?i)\\bsample\\b",name:"keyword.control.sample"},{match:"(?i)\\bcalculate\\b",name:"keyword.control.calculate"},{match:"(?i)\\btimezone\\b",name:"keyword.control.timezone"},{match:"(?i)\\bdimension\\b",name:"keyword.control.dimension"},{match:"(?i)\\bexcept\\b",name:"keyword.control.except"},{match:"(?i)\\bsource\\b",name:"keyword.control.source"},{match:"(?i)\\bgroup_by\\b",name:"keyword.control.group_by"},{match:"(?i)\\bhaving\\b",name:"keyword.control.having"},{match:"(?i)\\bindex\\b",name:"keyword.control.index"},{match:"(?i)\\bjoin_one\\b",name:"keyword.control.join_one"},{match:"(?i)\\bwith\\b",name:"keyword.control.with"},{match:"(?i)\\bjoin_many\\b",name:"keyword.control.join_many"},{match:"(?i)\\bjoin_cross\\b",name:"keyword.control.join_cross"},{match:"(?i)\\blimit\\b",name:"keyword.control.limit"},{match:"(?i)\\bmeasure\\b",name:"keyword.control.measure"},{match:"(?i)\\bnest\\b",name:"keyword.control.nest"},{match:"(?i)\\border_by\\b",name:"keyword.control.order_by"},{match:"(?i)\\bpartition_by\\b",name:"keyword.control.partition_by"},{match:"(?i)\\bprimary_key\\b",name:"keyword.control.primary_key"},{match:"(?i)\\bproject\\b",name:"keyword.control.project"},{match:"(?i)\\bquery\\b",name:"keyword.control.query"},{match:"(?i)\\brename\\b",name:"keyword.control.rename"},{match:"(?i)\\btop\\b",name:"keyword.control.top"},{match:"(?i)\\bview\\b",name:"keyword.control.view"},{match:"(?i)\\bwhere\\b",name:"keyword.control.where"},{match:"(?i)\\bdeclare\\b",name:"keyword.control.declare"}]},keywords:{patterns:[{match:"(?i)\\bis\\b",name:"keyword.control.is"},{match:"(?i)\\bon\\b",name:"keyword.control.on"},{match:"(?i)\\bnot\\b",name:"keyword.other.not"},{match:"(?i)\\bor\\b",name:"keyword.other.or"},{match:"(?i)\\bdesc\\b",name:"keyword.control.desc"},{match:"(?i)\\bby\\b",name:"keyword.control.by"},{match:"(?i)\\band\\b",name:"keyword.other.and"},{match:"(?i)\\basc\\b",name:"keyword.control.asc"},{match:"(?i)\\bfor\\b",name:"keyword.other.for"},{match:"(?i)\\belse\\b",name:"keyword.other.else"},{match:"(?i)\\bto\\b",name:"keyword.other.to"},{match:"(?i)\\bwhen\\b",name:"keyword.other.when"},{match:"(?i)\\bpick\\b",name:"keyword.other.pick"},{match:"(?i)\\bimport\\b",name:"keyword.control.import"}]}}},QWt={...kee,patterns:[...kee.patterns,{include:"#docvar"}],repository:{...kee.repository,docvar:{patterns:[{match:"\\<\\<[^(\\>\\>)]*\\>\\>",beginCaptures:{0:{name:"punctuation.definition.comment.begin"}},endCaptures:{0:{name:"punctuation.definition.comment.end"}},name:"markup.italic.markdown"}]}}},YWt={name:"Malloy SQL",scopeName:"source.malloy-sql",patterns:[{include:"#malloysql-sql"}],repository:{"malloysql-sql":{beginCaptures:{0:{name:"entity.other.attribute.malloy-sql"},1:{name:"entity.other.attribute.malloy-sql"},3:{name:"comment.line.double-slash"}},name:"meta.embedded.block.malloysql.sql",patterns:[{include:"#comments"},{begin:"%{",end:"}%",beginCaptures:{0:{name:"punctuation.definition.malloy-sql"}},endCaptures:{0:{name:"punctuation.definition.malloy-sql"}},name:"meta.embedded.block.malloy",patterns:[{include:"source.malloy"}]},{include:"source.sql"}]},comments:{patterns:[{begin:"/\\*",end:"\\*/",beginCaptures:{0:{name:"punctuation.definition.comment.begin"}},endCaptures:{0:{name:"punctuation.definition.comment.end"}},name:"comment.block"},{begin:"//",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-slash"},{begin:"--",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-hyphen"}]}}},IIe="light-plus",KWt=VWt({themes:[IIe],langs:["sql","json","typescript",{name:"malloy",scopeName:"source.malloy",embeddedLangs:["sql"],...QWt},{name:"malloysql",scopeName:"source.malloy-sql",embeddedLangs:["sql"],...YWt}]});async function zv(a,u){return(await KWt).codeToHtml(a,{lang:u,theme:IIe})}const mo=D.styled(D.Card)({display:"flex",flexDirection:"column",height:"100%"}),Va=D.styled(D.CardContent)({display:"flex",flexDirection:"column",padding:"0px 4px 4px 4px",flexGrow:1,"&:last-child":{paddingBottom:0}}),mS=D.styled(D.CardMedia)({padding:"0px 4px 0px 4px"}),XWt=D.styled("div")({display:"flex",flexDirection:"column",height:"100%"});D.styled("div")({height:"30px",backgroundColor:"rgba(225, 240, 255, 1)",display:"flex",padding:"2px 10px",alignItems:"center"});const JWt=D.styled("div")({display:"flex",height:"75vh",width:"100%",overflowY:"auto"});D.styled("div")({position:"relative",height:"100%",flex:"0 0 auto"});const ZWt=Pe.lazy(()=>Promise.resolve().then(()=>require("./RenderedResult-B9Gth8IY.cjs")));D.axios.defaults.baseURL="http://localhost:4000";const eVt=new sIe(new Oo),tVt=new D.QueryClient;function PIe({server:a,projectName:u,packageName:d,modelPath:f,versionId:m,query:g,sourceName:x,queryName:b,accessToken:v}){const{data:_,isSuccess:S,isError:R,error:w}=D.useQuery({queryKey:["queryResult",a,u,d,f,m,g,x,b,v],queryFn:()=>eVt.executeQuery(u,d,f,g,x,b,m,{baseURL:a,withCredentials:!v,headers:{Authorization:v&&`Bearer ${v}`}})},tVt);return D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[!S&&!R&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"20px",m:"auto"},children:"Fetching Query Results..."}),S&&D.jsxRuntimeExports.jsx(Pe.Suspense,{fallback:"Loading malloy...",children:D.jsxRuntimeExports.jsx(ZWt,{result:_.data.result})}),R&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:`${u} > ${d} > ${f} > ${m} - ${w.message}`})]})}const rVt=D.styled(D.Card)({display:"flex",flexDirection:"column",height:"100%"});function nVt({server:a,projectName:u,packageName:d,modelPath:f,versionId:m,sourceName:g,queryName:x,expandResult:b,hideResultIcon:v,expandEmbedding:_,hideEmbeddingIcon:S,accessToken:R,noView:w,annotations:N}){const[k,B]=Pe.useState(b),[P,$]=Pe.useState(_),[q,z]=Pe.useState(),[W,X]=Pe.useState();return Pe.useEffect(()=>{zv(qNe(a,u,d,f,m,g,x),"typescript").then(J=>{z(J)})},[a,u,d,f,m,g,x]),Pe.useEffect(()=>{N&&zv(iVt(N),"malloy").then(J=>{X(J)})},[N]),D.jsxRuntimeExports.jsx(D.jsxRuntimeExports.Fragment,{children:D.jsxRuntimeExports.jsxs(rVt,{variant:"outlined",sx:{padding:"0px 10px 0px 10px",borderRadius:"0px"},children:[D.jsxRuntimeExports.jsxs(D.Stack,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",width:"100%"},children:[D.jsxRuntimeExports.jsx(D.Typography,{variant:"subtitle2",sx:{mt:"auto",mb:"auto"},children:`${w?"":"View >"} ${x}`}),D.jsxRuntimeExports.jsxs(D.CardActions,{sx:{padding:"0px"},children:[!v&&D.jsxRuntimeExports.jsx(D.Tooltip,{title:k?"Hide Results":"Show Results",children:D.jsxRuntimeExports.jsx(D.IconButton,{size:"small",onClick:()=>{B(!k)},children:D.jsxRuntimeExports.jsx(D.AnalyticsOutlinedIcon,{})})}),!S&&D.jsxRuntimeExports.jsx(D.Tooltip,{title:P?"Hide Sharing":"Show Sharing",children:D.jsxRuntimeExports.jsx(D.IconButton,{size:"small",onClick:()=>{$(!P)},children:D.jsxRuntimeExports.jsx(D.LinkOutlinedIcon,{})})})]})]}),D.jsxRuntimeExports.jsxs(D.Collapse,{in:P,timeout:"auto",unmountOnExit:!0,children:[D.jsxRuntimeExports.jsx(D.Divider,{sx:{mb:"10px"}}),D.jsxRuntimeExports.jsxs(D.Stack,{sx:{borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:[D.jsxRuntimeExports.jsx(D.Typography,{fontSize:"12px",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:D.jsxRuntimeExports.jsx("div",{className:"content",dangerouslySetInnerHTML:{__html:q}})}),D.jsxRuntimeExports.jsx(D.Tooltip,{title:"View Code",children:D.jsxRuntimeExports.jsx(D.IconButton,{sx:{width:"24px",height:"24px"},onClick:()=>{navigator.clipboard.writeText(qNe(a,u,d,f,m,g,x))},children:D.jsxRuntimeExports.jsx(D.ContentCopyIcon,{})})})]})]}),D.jsxRuntimeExports.jsxs(D.Collapse,{in:k,timeout:"auto",unmountOnExit:!0,children:[D.jsxRuntimeExports.jsx(D.Divider,{sx:{mb:"10px"}}),W&&D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx(D.Stack,{sx:{borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:D.jsxRuntimeExports.jsx(D.Typography,{fontSize:"12px",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:D.jsxRuntimeExports.jsx("div",{className:"content",dangerouslySetInnerHTML:{__html:W}})})}),D.jsxRuntimeExports.jsx(D.Divider,{sx:{mb:"10px"}})]}),D.jsxRuntimeExports.jsx(D.CardContent,{children:D.jsxRuntimeExports.jsx(PIe,{server:a,projectName:u,packageName:d,modelPath:f,versionId:m,sourceName:g,queryName:x,accessToken:R})})]})]})})}function qNe(a,u,d,f,m,g,x){return`<QueryResult
|
|
4
|
+
`}));let P={type:"element",tagName:"span",properties:{class:"line"},children:[]},$=0;for(const q of k){let z={type:"element",tagName:"span",properties:{...q.htmlAttrs},children:[{type:"text",value:q.content}]};q.htmlStyle;const W=gWt(q.htmlStyle||TIe(q));W&&(z.properties.style=W);for(const X of m)z=X?.span?.call(w,z,B+1,$,P,q)||z;b==="inline"?x.children.push(z):b==="classic"&&P.children.push(z),$+=q.content.length}if(b==="classic"){for(const q of m)P=q?.line?.call(w,P,B+1)||P;R.push(P),g.push(P)}}),b==="classic"){for(const k of m)S=k?.code?.call(w,S)||S;_.children.push(S);for(const k of m)_=k?.pre?.call(w,_)||_;x.children.push(_)}let N=x;for(const k of m)N=k?.root?.call(w,N)||N;return f&&NM(N,f),N}function MWt(a){return a.map(u=>{const d=[];let f="",m=0;return u.forEach((g,x)=>{const v=!(g.fontStyle&&g.fontStyle&s0.Underline);v&&g.content.match(/^\s+$/)&&u[x+1]?(m||(m=g.offset),f+=g.content):f?(v?d.push({...g,offset:m,content:f+g.content}):d.push({content:f,offset:m},g),m=0,f=""):d.push(g)}),d})}function $Wt(a){return a.map(u=>u.flatMap(d=>{if(d.content.match(/^\s+$/))return d;const f=d.content.match(/^(\s*)(.*?)(\s*)$/);if(!f)return d;const[,m,g,x]=f;if(!m&&!x)return d;const b=[{...d,offset:d.offset+m.length,content:g}];return m&&b.unshift({content:m,offset:d.offset}),x&&b.push({content:x,offset:d.offset+m.length+g.length}),b}))}function BWt(a,u,d){const f={meta:{},options:d,codeToHast:(g,x)=>WF(a,g,x),codeToTokens:(g,x)=>GF(a,g,x)};let m=D.toHtml(WF(a,u,d,f));for(const g of zF(d))m=g.postprocess?.call(f,m,d)||m;return m}const MNe={light:"#333333",dark:"#bbbbbb"},$Ne={light:"#fffffe",dark:"#1e1e1e"},BNe="__shiki_resolved";function Nie(a){if(a?.[BNe])return a;const u={...a};u.tokenColors&&!u.settings&&(u.settings=u.tokenColors,delete u.tokenColors),u.type||(u.type="dark"),u.colorReplacements={...u.colorReplacements},u.settings||(u.settings=[]);let{bg:d,fg:f}=u;if(!d||!f){const b=u.settings?u.settings.find(v=>!v.name&&!v.scope):void 0;b?.settings?.foreground&&(f=b.settings.foreground),b?.settings?.background&&(d=b.settings.background),!f&&u?.colors?.["editor.foreground"]&&(f=u.colors["editor.foreground"]),!d&&u?.colors?.["editor.background"]&&(d=u.colors["editor.background"]),f||(f=u.type==="light"?MNe.light:MNe.dark),d||(d=u.type==="light"?$Ne.light:$Ne.dark),u.fg=f,u.bg=d}u.settings[0]&&u.settings[0].settings&&!u.settings[0].scope||u.settings.unshift({settings:{foreground:u.fg,background:u.bg}});let m=0;const g=new Map;function x(b){if(g.has(b))return g.get(b);m+=1;const v=`#${m.toString(16).padStart(8,"0").toLowerCase()}`;return u.colorReplacements?.[`#${v}`]?x(b):(g.set(b,v),v)}u.settings=u.settings.map(b=>{const v=b.settings?.foreground&&!b.settings.foreground.startsWith("#"),_=b.settings?.background&&!b.settings.background.startsWith("#");if(!v&&!_)return b;const S={...b,settings:{...b.settings}};if(v){const R=x(b.settings.foreground);u.colorReplacements[R]=b.settings.foreground,S.settings.foreground=R}if(_){const R=x(b.settings.background);u.colorReplacements[R]=b.settings.background,S.settings.background=R}return S});for(const b of Object.keys(u.colors||{}))if((b==="editor.foreground"||b==="editor.background"||b.startsWith("terminal.ansi"))&&!u.colors[b]?.startsWith("#")){const v=x(u.colors[b]);u.colorReplacements[v]=u.colors[b],u.colors[b]=v}return Object.defineProperty(u,BNe,{enumerable:!1,writable:!1,value:!0}),u}async function kIe(a){return Array.from(new Set((await Promise.all(a.filter(u=>!SIe(u)).map(async u=>await RIe(u).then(d=>Array.isArray(d)?d:[d])))).flat()))}async function LIe(a){return(await Promise.all(a.map(async d=>AIe(d)?null:Nie(await RIe(d))))).filter(d=>!!d)}class qWt extends fWt{constructor(d,f,m,g={}){super(d);Pt(this,"_resolvedThemes",new Map);Pt(this,"_resolvedGrammars",new Map);Pt(this,"_langMap",new Map);Pt(this,"_langGraph",new Map);Pt(this,"_textmateThemeCache",new WeakMap);Pt(this,"_loadedThemesCache",null);Pt(this,"_loadedLanguagesCache",null);this._resolver=d,this._themes=f,this._langs=m,this._alias=g,this._themes.map(x=>this.loadTheme(x)),this.loadLanguages(this._langs)}getTheme(d){return typeof d=="string"?this._resolvedThemes.get(d):this.loadTheme(d)}loadTheme(d){const f=Nie(d);return f.name&&(this._resolvedThemes.set(f.name,f),this._loadedThemesCache=null),f}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(d){let f=this._textmateThemeCache.get(d);f||(f=FF.createFromRawTheme(d),this._textmateThemeCache.set(d,f)),this._syncRegistry.setTheme(f)}getGrammar(d){if(this._alias[d]){const f=new Set([d]);for(;this._alias[d];){if(d=this._alias[d],f.has(d))throw new Wa(`Circular alias \`${Array.from(f).join(" -> ")} -> ${d}\``);f.add(d)}}return this._resolvedGrammars.get(d)}loadLanguage(d){if(this.getGrammar(d.name))return;const f=new Set([...this._langMap.values()].filter(x=>x.embeddedLangsLazy?.includes(d.name)));this._resolver.addLanguage(d);const m={balancedBracketSelectors:d.balancedBracketSelectors||["*"],unbalancedBracketSelectors:d.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(d.scopeName,d);const g=this.loadGrammarWithConfiguration(d.scopeName,1,m);if(g.name=d.name,this._resolvedGrammars.set(d.name,g),d.aliases&&d.aliases.forEach(x=>{this._alias[x]=d.name}),this._loadedLanguagesCache=null,f.size)for(const x of f)this._resolvedGrammars.delete(x.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(x.scopeName),this._syncRegistry?._grammars?.delete(x.scopeName),this.loadLanguage(this._langMap.get(x.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(d){for(const g of d)this.resolveEmbeddedLanguages(g);const f=Array.from(this._langGraph.entries()),m=f.filter(([g,x])=>!x);if(m.length){const g=f.filter(([x,b])=>b&&b.embeddedLangs?.some(v=>m.map(([_])=>_).includes(v))).filter(x=>!m.includes(x));throw new Wa(`Missing languages ${m.map(([x])=>`\`${x}\``).join(", ")}, required by ${g.map(([x])=>`\`${x}\``).join(", ")}`)}for(const[g,x]of f)this._resolver.addLanguage(x);for(const[g,x]of f)this.loadLanguage(x)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(d){if(this._langMap.set(d.name,d),this._langGraph.set(d.name,d),d.embeddedLangs)for(const f of d.embeddedLangs)this._langGraph.set(f,this._langMap.get(f))}}let UWt=class{constructor(u,d){Pt(this,"_langs",new Map);Pt(this,"_scopeToLang",new Map);Pt(this,"_injections",new Map);Pt(this,"_onigLib");this._onigLib={createOnigScanner:f=>u.createScanner(f),createOnigString:f=>u.createString(f)},d.forEach(f=>this.addLanguage(f))}get onigLib(){return this._onigLib}getLangRegistration(u){return this._langs.get(u)}loadGrammar(u){return this._scopeToLang.get(u)}addLanguage(u){this._langs.set(u.name,u),u.aliases&&u.aliases.forEach(d=>{this._langs.set(d,u)}),this._scopeToLang.set(u.scopeName,u),u.injectTo&&u.injectTo.forEach(d=>{this._injections.get(d)||this._injections.set(d,[]),this._injections.get(d).push(u.scopeName)})}getInjections(u){const d=u.split(".");let f=[];for(let m=1;m<=d.length;m++){const g=d.slice(0,m).join(".");f=[...f,...this._injections.get(g)||[]]}return f}},nO=0;function zWt(a){nO+=1,a.warnings!==!1&&nO>=10&&nO%10===0&&console.warn(`[Shiki] ${nO} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let u=!1;if(!a.engine)throw new Wa("`engine` option is required for synchronous mode");const d=(a.langs||[]).flat(1),f=(a.themes||[]).flat(1).map(Nie),m=new UWt(a.engine,d),g=new qWt(m,f,d,a.langAlias);let x;function b(q){P();const z=g.getGrammar(typeof q=="string"?q:q.name);if(!z)throw new Wa(`Language \`${q}\` not found, you may need to load it first`);return z}function v(q){if(q==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};P();const z=g.getTheme(q);if(!z)throw new Wa(`Theme \`${q}\` not found, you may need to load it first`);return z}function _(q){P();const z=v(q);x!==q&&(g.setTheme(z),x=q);const W=g.getColorMap();return{theme:z,colorMap:W}}function S(){return P(),g.getLoadedThemes()}function R(){return P(),g.getLoadedLanguages()}function w(...q){P(),g.loadLanguages(q.flat(1))}async function N(...q){return w(await kIe(q))}function k(...q){P();for(const z of q.flat(1))g.loadTheme(z)}async function B(...q){return P(),k(await LIe(q))}function P(){if(u)throw new Wa("Shiki instance has been disposed")}function $(){u||(u=!0,g.dispose(),nO-=1)}return{setTheme:_,getTheme:v,getLanguage:b,getLoadedThemes:S,getLoadedLanguages:R,loadLanguage:N,loadLanguageSync:w,loadTheme:B,loadThemeSync:k,dispose:$,[Symbol.dispose]:$}}async function HWt(a={}){a.loadWasm;const[u,d,f]=await Promise.all([LIe(a.themes||[]),kIe(a.langs||[]),a.engine||aIe(a.loadWasm||RGt())]);return zWt({...a,themes:u,langs:d,engine:f})}async function GWt(a={}){const u=await HWt(a);return{getLastGrammarState:(...d)=>OWt(u,...d),codeToTokensBase:(d,f)=>Oie(u,d,f),codeToTokensWithThemes:(d,f)=>DIe(u,d,f),codeToTokens:(d,f)=>GF(u,d,f),codeToHast:(d,f)=>WF(u,d,f),codeToHtml:(d,f)=>BWt(u,d,f),...u,getInternalContext:()=>u}}function WWt(a,u,d){let f,m,g;{const b=a;f=b.langs,m=b.themes,g=b.engine}async function x(b){function v(N){if(typeof N=="string"){if(SIe(N))return[];const k=f[N];if(!k)throw new u0(`Language \`${N}\` is not included in this bundle. You may want to load it from external source.`);return k}return N}function _(N){if(AIe(N))return"none";if(typeof N=="string"){const k=m[N];if(!k)throw new u0(`Theme \`${N}\` is not included in this bundle. You may want to load it from external source.`);return k}return N}const S=(b.themes??[]).map(N=>_(N)),R=(b.langs??[]).map(N=>v(N)),w=await GWt({engine:b.engine??g(),...b,themes:S,langs:R});return{...w,loadLanguage(...N){return w.loadLanguage(...N.map(v))},loadTheme(...N){return w.loadTheme(...N.map(_))}}}return x}const VWt=WWt({langs:oGt,themes:lGt,engine:()=>aIe(Promise.resolve().then(()=>require("./wasm-Dw4u1m6u.cjs")))}),kee={scopeName:"source.malloy",patterns:[{include:"#malloy-language"}],repository:{"malloy-language":{patterns:[{include:"#sql-string"},{include:"#comments"},{include:"#tags"},{include:"#strings"},{include:"#numbers"},{include:"#keywords"},{include:"#properties"},{include:"#functions"},{include:"#datetimes"},{include:"#identifiers-quoted"},{include:"#types"},{include:"#constants"},{include:"#timeframes"},{include:"#identifiers-unquoted"}]},"malloy-matched":{begin:"{",end:"}",patterns:[{include:"#malloy-matched"},{include:"#malloy-language"}]},"malloy-in-sql":{begin:"%{",name:"source.malloy-in-sql",end:"}%?",patterns:[{include:"#malloy-matched"},{include:"#malloy-language"}]},"sql-string":{patterns:[{begin:'(\\b[A-Za-z_][A-Za-z_0-9]*)(\\s*\\.\\s*)(sql)(\\s*\\(\\s*)(""")',end:'"""',beginCaptures:{1:{name:"variable.other"},3:{name:"keyword.control.sql"},5:{name:"punctuation.sql-block.open"}},endCaptures:{0:{name:"punctuation.sql-block.close"}},name:"source.sql",patterns:[{include:"#malloy-in-sql"},{include:"source.sql"}]}]},functions:{patterns:[{match:"(?i)\\b(count)(\\s*\\()(distinct)",captures:{1:{name:"entity.name.function"},3:{name:"entity.name.function.modifier"}}},{match:"(?i)\\b(AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE|UNGROUPED)(\\s*\\()",captures:{1:{name:"entity.name.function"}}},{match:"(?i)\\b([a-zA-Z_][a-zA-Z_0-9]*)(\\s*\\()",captures:{1:{name:"entity.name.function"}}},{match:"(?i)\\b([a-zA-Z_][a-zA-Z_0-9]*)(!)(timestamp|number|string|boolean|date)?(\\s*\\()",captures:{1:{name:"entity.name.function"},3:{name:"entity.name.type"}}}]},datetimes:{patterns:[{match:"(?i)@[0-9]{4}-[0-9]{2}-[0-9]{2}[ T][0-9]{2}:[0-9]{2}((:[0-9]{2})(([\\.,][0-9]+)(\\[[A-Za-z_/]+\\])?)?)?",name:"constant.numeric.timestamp"},{match:"(?i)@[0-9]{4}(-Q[1-4]|-[0-9]{2}(-[0-9]{2}(-WK)?)?)?",name:"constant.numeric.date"}]},"identifiers-quoted":{patterns:[{match:"`[^`]*`",name:"variable.other.quoted"}]},"identifiers-unquoted":{patterns:[{match:"(?i)\\b[A-Za-z_][A-Za-z_0-9]*\\b",name:"variable.other"}]},timeframes:{patterns:[{match:"(?i)\\b((year|quarter|month|week|day|hour|minute|second)s?)\\b",name:"keyword.other.timeframe"},{match:"(?i)\\b(day_of_year|day_of_month)\\b",name:"keyword.other.timeframe"}]},comments:{patterns:[{begin:"/\\*",end:"\\*/",beginCaptures:{0:{name:"punctuation.definition.comment.begin"}},endCaptures:{0:{name:"punctuation.definition.comment.end"}},name:"comment.block"},{begin:"//",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-slash"},{begin:"--",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-hyphen"}]},tags:{patterns:[{match:"##\\n",name:"string.quoted",captures:{0:{name:"string.quoted"}}},{begin:'#"',end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-slash"},{match:"#\\n",name:"string.quoted",captures:{0:{name:"string.quoted"}}},{begin:"#\\s",end:"\\n",beginCaptures:{0:{name:"support.type.property-name.json"}},name:"comment.line.double-slash",patterns:[{include:"#tag-values"}]},{begin:"##\\s",end:"\\n",beginCaptures:{0:{name:"support.type.property-name.json"}},name:"comment.line.double-slash",patterns:[{include:"#tag-values"}]},{begin:"#",end:"\\n",beginCaptures:{0:{name:"string.quoted"}},name:"string.quoted"}],repository:{"tag-values":{name:"support.type.property-name.json",match:'(-)?((?:[^\\s=#]+)|(?:"[^#]+"))(?:\\s*(=)\\s*((?:[^\\s=#]+)|(?:"[^#]+")))?',captures:{1:{name:"keyword.control.negate"},2:{name:"support.type.property-name.json"},3:{name:"keyword.operator.comparison.ts"},4:{name:"string.quoted"}}}}},strings:{patterns:[{begin:"'",end:"'",beginCaptures:{0:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},name:"string.quoted.single",patterns:[{include:"#escapes"}]},{begin:'"',end:'"',beginCaptures:{0:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},name:"string.quoted.double",patterns:[{include:"#escapes"}]},{begin:'"""',end:'"""',beginCaptures:{0:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},name:"string.quoted.triple"},{begin:"(?i)[r|/]'",end:"'",name:"string.regexp",patterns:[{include:"#regex-escapes"}]}],repository:{escapes:{name:"constant.character.escape",match:"\\\\(u[A-Fa-f0-9]{4}|.)",captures:{0:{name:"constant.character.escape"}}},"regex-escapes":{name:"constant.character.escape",match:"\\\\.",captures:{0:{name:"constant.character.escape"}}}}},numbers:{match:"(?i)(\\b((0|[1-9][0-9]*)(E[+-]?[0-9]+|\\.[0-9]*)?)|\\.[0-9]+)",name:"constant.numeric"},constants:{patterns:[{match:"(?i)\\bnull\\b",name:"constant.language.null"},{match:"(?i)\\btrue\\b",name:"constant.language.true"},{match:"(?i)\\bfalse\\b",name:"constant.language.false"}]},types:{patterns:[{match:"(?i)\\bstring\\b",name:"entity.name.type.string"},{match:"(?i)\\bnumber\\b",name:"entity.name.type.number"},{match:"(?i)\\bdate\\b",name:"entity.name.type.date"},{match:"(?i)\\btimestamp\\b",name:"entity.name.type.timestamp"},{match:"(?i)\\bboolean\\b",name:"entity.name.type.boolean"}]},properties:{patterns:[{match:"(?i)\\baccept\\b",name:"keyword.control.accept"},{match:"(?i)\\bselect\\b",name:"keyword.control.select"},{match:"(?i)\\bconnection\\b",name:"keyword.control.connection"},{match:"(?i)\\brun\\b",name:"keyword.control.run"},{match:"(?i)\\bextend\\b",name:"keyword.control.extend"},{match:"(?i)\\brefine\\b",name:"keyword.control.refine"},{match:"(?i)\\baggregate\\b",name:"keyword.control.aggregate"},{match:"(?i)\\bsample\\b",name:"keyword.control.sample"},{match:"(?i)\\bcalculate\\b",name:"keyword.control.calculate"},{match:"(?i)\\btimezone\\b",name:"keyword.control.timezone"},{match:"(?i)\\bdimension\\b",name:"keyword.control.dimension"},{match:"(?i)\\bexcept\\b",name:"keyword.control.except"},{match:"(?i)\\bsource\\b",name:"keyword.control.source"},{match:"(?i)\\bgroup_by\\b",name:"keyword.control.group_by"},{match:"(?i)\\bhaving\\b",name:"keyword.control.having"},{match:"(?i)\\bindex\\b",name:"keyword.control.index"},{match:"(?i)\\bjoin_one\\b",name:"keyword.control.join_one"},{match:"(?i)\\bwith\\b",name:"keyword.control.with"},{match:"(?i)\\bjoin_many\\b",name:"keyword.control.join_many"},{match:"(?i)\\bjoin_cross\\b",name:"keyword.control.join_cross"},{match:"(?i)\\blimit\\b",name:"keyword.control.limit"},{match:"(?i)\\bmeasure\\b",name:"keyword.control.measure"},{match:"(?i)\\bnest\\b",name:"keyword.control.nest"},{match:"(?i)\\border_by\\b",name:"keyword.control.order_by"},{match:"(?i)\\bpartition_by\\b",name:"keyword.control.partition_by"},{match:"(?i)\\bprimary_key\\b",name:"keyword.control.primary_key"},{match:"(?i)\\bproject\\b",name:"keyword.control.project"},{match:"(?i)\\bquery\\b",name:"keyword.control.query"},{match:"(?i)\\brename\\b",name:"keyword.control.rename"},{match:"(?i)\\btop\\b",name:"keyword.control.top"},{match:"(?i)\\bview\\b",name:"keyword.control.view"},{match:"(?i)\\bwhere\\b",name:"keyword.control.where"},{match:"(?i)\\bdeclare\\b",name:"keyword.control.declare"}]},keywords:{patterns:[{match:"(?i)\\bis\\b",name:"keyword.control.is"},{match:"(?i)\\bon\\b",name:"keyword.control.on"},{match:"(?i)\\bnot\\b",name:"keyword.other.not"},{match:"(?i)\\bor\\b",name:"keyword.other.or"},{match:"(?i)\\bdesc\\b",name:"keyword.control.desc"},{match:"(?i)\\bby\\b",name:"keyword.control.by"},{match:"(?i)\\band\\b",name:"keyword.other.and"},{match:"(?i)\\basc\\b",name:"keyword.control.asc"},{match:"(?i)\\bfor\\b",name:"keyword.other.for"},{match:"(?i)\\belse\\b",name:"keyword.other.else"},{match:"(?i)\\bto\\b",name:"keyword.other.to"},{match:"(?i)\\bwhen\\b",name:"keyword.other.when"},{match:"(?i)\\bpick\\b",name:"keyword.other.pick"},{match:"(?i)\\bimport\\b",name:"keyword.control.import"}]}}},QWt={...kee,patterns:[...kee.patterns,{include:"#docvar"}],repository:{...kee.repository,docvar:{patterns:[{match:"\\<\\<[^(\\>\\>)]*\\>\\>",beginCaptures:{0:{name:"punctuation.definition.comment.begin"}},endCaptures:{0:{name:"punctuation.definition.comment.end"}},name:"markup.italic.markdown"}]}}},YWt={name:"Malloy SQL",scopeName:"source.malloy-sql",patterns:[{include:"#malloysql-sql"}],repository:{"malloysql-sql":{beginCaptures:{0:{name:"entity.other.attribute.malloy-sql"},1:{name:"entity.other.attribute.malloy-sql"},3:{name:"comment.line.double-slash"}},name:"meta.embedded.block.malloysql.sql",patterns:[{include:"#comments"},{begin:"%{",end:"}%",beginCaptures:{0:{name:"punctuation.definition.malloy-sql"}},endCaptures:{0:{name:"punctuation.definition.malloy-sql"}},name:"meta.embedded.block.malloy",patterns:[{include:"source.malloy"}]},{include:"source.sql"}]},comments:{patterns:[{begin:"/\\*",end:"\\*/",beginCaptures:{0:{name:"punctuation.definition.comment.begin"}},endCaptures:{0:{name:"punctuation.definition.comment.end"}},name:"comment.block"},{begin:"//",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-slash"},{begin:"--",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-hyphen"}]}}},IIe="catppuccin-latte",KWt=VWt({themes:[IIe],langs:["sql","json","typescript",{name:"malloy",scopeName:"source.malloy",embeddedLangs:["sql"],...QWt},{name:"malloysql",scopeName:"source.malloy-sql",embeddedLangs:["sql"],...YWt}]});async function zv(a,u){return(await KWt).codeToHtml(a,{lang:u,theme:IIe})}const mo=D.styled(D.Card)({display:"flex",flexDirection:"column",height:"100%"}),Va=D.styled(D.CardContent)({display:"flex",flexDirection:"column",padding:"0px 4px 4px 4px",flexGrow:1,"&:last-child":{paddingBottom:0}}),mS=D.styled(D.CardMedia)({padding:"0px 4px 0px 4px"}),XWt=D.styled("div")({display:"flex",flexDirection:"column",height:"100%"});D.styled("div")({height:"30px",backgroundColor:"rgba(225, 240, 255, 1)",display:"flex",padding:"2px 10px",alignItems:"center"});const JWt=D.styled("div")({display:"flex",height:"75vh",width:"100%",overflowY:"auto"});D.styled("div")({position:"relative",height:"100%",flex:"0 0 auto"});const ZWt=Pe.lazy(()=>Promise.resolve().then(()=>require("./RenderedResult-B9Gth8IY.cjs")));D.axios.defaults.baseURL="http://localhost:4000";const eVt=new sIe(new Oo),tVt=new D.QueryClient;function PIe({server:a,projectName:u,packageName:d,modelPath:f,versionId:m,query:g,sourceName:x,queryName:b,accessToken:v}){const{data:_,isSuccess:S,isError:R,error:w}=D.useQuery({queryKey:["queryResult",a,u,d,f,m,g,x,b,v],queryFn:()=>eVt.executeQuery(u,d,f,g,x,b,m,{baseURL:a,withCredentials:!v,headers:{Authorization:v&&`Bearer ${v}`}})},tVt);return D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[!S&&!R&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"20px",m:"auto"},children:"Fetching Query Results..."}),S&&D.jsxRuntimeExports.jsx(Pe.Suspense,{fallback:"Loading malloy...",children:D.jsxRuntimeExports.jsx(ZWt,{result:_.data.result})}),R&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:`${u} > ${d} > ${f} > ${m} - ${w.message}`})]})}const rVt=D.styled(D.Card)({display:"flex",flexDirection:"column",height:"100%"});function nVt({server:a,projectName:u,packageName:d,modelPath:f,versionId:m,sourceName:g,queryName:x,expandResult:b,hideResultIcon:v,expandEmbedding:_,hideEmbeddingIcon:S,accessToken:R,noView:w,annotations:N}){const[k,B]=Pe.useState(b),[P,$]=Pe.useState(_),[q,z]=Pe.useState(),[W,X]=Pe.useState();return Pe.useEffect(()=>{zv(qNe(a,u,d,f,m,g,x),"typescript").then(J=>{z(J)})},[a,u,d,f,m,g,x]),Pe.useEffect(()=>{N&&zv(iVt(N),"malloy").then(J=>{X(J)})},[N]),D.jsxRuntimeExports.jsx(D.jsxRuntimeExports.Fragment,{children:D.jsxRuntimeExports.jsxs(rVt,{variant:"outlined",sx:{padding:"0px 10px 0px 10px",borderRadius:"0px"},children:[D.jsxRuntimeExports.jsxs(D.Stack,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",width:"100%"},children:[D.jsxRuntimeExports.jsx(D.Typography,{variant:"subtitle2",sx:{mt:"auto",mb:"auto"},children:`${w?"":"View >"} ${x}`}),D.jsxRuntimeExports.jsxs(D.CardActions,{sx:{padding:"0px"},children:[!v&&D.jsxRuntimeExports.jsx(D.Tooltip,{title:k?"Hide Results":"Show Results",children:D.jsxRuntimeExports.jsx(D.IconButton,{size:"small",onClick:()=>{B(!k)},children:D.jsxRuntimeExports.jsx(D.AnalyticsOutlinedIcon,{})})}),!S&&D.jsxRuntimeExports.jsx(D.Tooltip,{title:P?"Hide Sharing":"Show Sharing",children:D.jsxRuntimeExports.jsx(D.IconButton,{size:"small",onClick:()=>{$(!P)},children:D.jsxRuntimeExports.jsx(D.LinkOutlinedIcon,{})})})]})]}),D.jsxRuntimeExports.jsxs(D.Collapse,{in:P,timeout:"auto",unmountOnExit:!0,children:[D.jsxRuntimeExports.jsx(D.Divider,{sx:{mb:"10px"}}),D.jsxRuntimeExports.jsxs(D.Stack,{sx:{borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:[D.jsxRuntimeExports.jsx(D.Typography,{fontSize:"12px",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:D.jsxRuntimeExports.jsx("div",{className:"content",dangerouslySetInnerHTML:{__html:q}})}),D.jsxRuntimeExports.jsx(D.Tooltip,{title:"View Code",children:D.jsxRuntimeExports.jsx(D.IconButton,{sx:{width:"24px",height:"24px"},onClick:()=>{navigator.clipboard.writeText(qNe(a,u,d,f,m,g,x))},children:D.jsxRuntimeExports.jsx(D.ContentCopyIcon,{})})})]})]}),D.jsxRuntimeExports.jsxs(D.Collapse,{in:k,timeout:"auto",unmountOnExit:!0,children:[D.jsxRuntimeExports.jsx(D.Divider,{sx:{mb:"10px"}}),W&&D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx(D.Stack,{sx:{borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:D.jsxRuntimeExports.jsx(D.Typography,{fontSize:"12px",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:D.jsxRuntimeExports.jsx("div",{className:"content",dangerouslySetInnerHTML:{__html:W}})})}),D.jsxRuntimeExports.jsx(D.Divider,{sx:{mb:"10px"}})]}),D.jsxRuntimeExports.jsx(D.CardContent,{children:D.jsxRuntimeExports.jsx(PIe,{server:a,projectName:u,packageName:d,modelPath:f,versionId:m,sourceName:g,queryName:x,accessToken:R})})]})]})})}function qNe(a,u,d,f,m,g,x){return`<QueryResult
|
|
5
5
|
server="${a}"
|
|
6
6
|
accessToken={accessToken}
|
|
7
7
|
projectName="${u}"
|
|
@@ -2671,7 +2671,7 @@ ${r.map(s=>` ${s}`).join(`,
|
|
|
2671
2671
|
--malloy-render--table-pinned-background: ${E};
|
|
2672
2672
|
--malloy-render--table-pinned-border: ${A};
|
|
2673
2673
|
}
|
|
2674
|
-
`}var MHt=br("<div>");function $Ht(t,{element:e}){const r=e.renderRoot;r instanceof ShadowRoot&&t.stylesheet&&r.adoptedStyleSheets.push(t.stylesheet);const i=[...e.childNodes];return(()=>{var s=MHt();return Tr(s,i),s})()}function BHt({customElements:t=window.customElements,HTMLElement:e=window.HTMLElement}){t.get("malloy-render")?console.warn("The custom element 'malloy-render' has already been defined. Make sure you are not loading multiple versions of the malloy-render package as they could conflict."):w(N("malloy-render",{malloyResult:void 0,result:void 0,queryResult:void 0,modelDef:void 0,scrollEl:void 0,onClick:void 0,onDrill:void 0,vegaConfigOverride:void 0,tableConfig:void 0,dashboardConfig:void 0,modalElement:void 0,renderAs:void 0},{customElements:t,BaseElement:e}),Hoe)(PHt),t.get("malloy-modal")||w(N("malloy-modal",{stylesheet:void 0},{customElements:t,BaseElement:e}),Hoe)($Ht)}BHt({})})),Zke}KYt();var XYt=Object.defineProperty,JYt=Object.getPrototypeOf,ZYt=Reflect.get,QPe=a=>{throw TypeError(a)},eKt=(a,u,d)=>u in a?XYt(a,u,{enumerable:!0,configurable:!0,writable:!0,value:d}):a[u]=d,Ht=(a,u,d)=>eKt(a,typeof u!="symbol"?u+"":u,d),tse=(a,u,d)=>u.has(a)||QPe("Cannot "+d),_l=(a,u,d)=>(tse(a,u,"read from private field"),d?d.call(a):u.get(a)),D_=(a,u,d)=>u.has(a)?QPe("Cannot add the same private member more than once"):u instanceof WeakSet?u.add(a):u.set(a,d),oh=(a,u,d,f)=>(tse(a,u,"write to private field"),u.set(a,d),d),tLe=(a,u,d)=>(tse(a,u,"access private method"),d),tKt=(a,u,d)=>ZYt(JYt(a),d,u),k_,Jm,Ov,fx,L_,Nv,I_,Uj,Ere,PO;function xr(a,u,{checkForDefaultPrevented:d=!0}={}){return function(m){if(a?.(m),d===!1||!m.defaultPrevented)return u?.(m)}}function rLe(a,u){if(typeof a=="function")return a(u);a!=null&&(a.current=u)}function GM(...a){return u=>{let d=!1;const f=a.map(m=>{const g=rLe(m,u);return!d&&typeof g=="function"&&(d=!0),g});if(d)return()=>{for(let m=0;m<f.length;m++){const g=f[m];typeof g=="function"?g():rLe(a[m],null)}}}}function Cn(...a){return Y.useCallback(GM(...a),a)}function rKt(a,u){const d=Y.createContext(u),f=g=>{const{children:x,...b}=g,v=Y.useMemo(()=>b,Object.values(b));return D.jsxRuntimeExports.jsx(d.Provider,{value:v,children:x})};f.displayName=a+"Provider";function m(g){const x=Y.useContext(d);if(x)return x;if(u!==void 0)return u;throw new Error(`\`${g}\` must be used within \`${a}\``)}return[f,m]}function Md(a,u=[]){let d=[];function f(g,x){const b=Y.createContext(x),v=d.length;d=[...d,x];const _=R=>{var w;const{scope:N,children:k,...B}=R,P=((w=N?.[a])==null?void 0:w[v])||b,$=Y.useMemo(()=>B,Object.values(B));return D.jsxRuntimeExports.jsx(P.Provider,{value:$,children:k})};_.displayName=g+"Provider";function S(R,w){var N;const k=((N=w?.[a])==null?void 0:N[v])||b,B=Y.useContext(k);if(B)return B;if(x!==void 0)return x;throw new Error(`\`${R}\` must be used within \`${g}\``)}return[_,S]}const m=()=>{const g=d.map(x=>Y.createContext(x));return function(b){const v=b?.[a]||g;return Y.useMemo(()=>({[`__scope${a}`]:{...b,[a]:v}}),[b,v])}};return m.scopeName=a,[f,nKt(m,...u)]}function nKt(...a){const u=a[0];if(a.length===1)return u;const d=()=>{const f=a.map(m=>({useScope:m(),scopeName:m.scopeName}));return function(g){const x=f.reduce((b,{useScope:v,scopeName:_})=>{const R=v(g)[`__scope${_}`];return{...b,...R}},{});return Y.useMemo(()=>({[`__scope${u.scopeName}`]:x}),[x])}};return d.scopeName=u.scopeName,d}var Tx=Y.forwardRef((a,u)=>{const{children:d,...f}=a,m=Y.Children.toArray(d),g=m.find(iKt);if(g){const x=g.props.children,b=m.map(v=>v===g?Y.Children.count(x)>1?Y.Children.only(null):Y.isValidElement(x)?x.props.children:null:v);return D.jsxRuntimeExports.jsx(One,{...f,ref:u,children:Y.isValidElement(x)?Y.cloneElement(x,void 0,b):null})}return D.jsxRuntimeExports.jsx(One,{...f,ref:u,children:d})});Tx.displayName="Slot";var One=Y.forwardRef((a,u)=>{const{children:d,...f}=a;if(Y.isValidElement(d)){const m=oKt(d),g=sKt(f,d.props);return d.type!==Y.Fragment&&(g.ref=u?GM(u,m):m),Y.cloneElement(d,g)}return Y.Children.count(d)>1?Y.Children.only(null):null});One.displayName="SlotClone";var YPe=({children:a})=>D.jsxRuntimeExports.jsx(D.jsxRuntimeExports.Fragment,{children:a});function iKt(a){return Y.isValidElement(a)&&a.type===YPe}function sKt(a,u){const d={...u};for(const f in u){const m=a[f],g=u[f];/^on[A-Z]/.test(f)?m&&g?d[f]=(...b)=>{g(...b),m(...b)}:m&&(d[f]=m):f==="style"?d[f]={...m,...g}:f==="className"&&(d[f]=[m,g].filter(Boolean).join(" "))}return{...a,...d}}function oKt(a){var u,d;let f=(u=Object.getOwnPropertyDescriptor(a.props,"ref"))==null?void 0:u.get,m=f&&"isReactWarning"in f&&f.isReactWarning;return m?a.ref:(f=(d=Object.getOwnPropertyDescriptor(a,"ref"))==null?void 0:d.get,m=f&&"isReactWarning"in f&&f.isReactWarning,m?a.props.ref:a.props.ref||a.ref)}var aKt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],rn=aKt.reduce((a,u)=>{const d=Y.forwardRef((f,m)=>{const{asChild:g,...x}=f,b=g?Tx:u;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),D.jsxRuntimeExports.jsx(b,{...x,ref:m})});return d.displayName=`Primitive.${u}`,{...a,[u]:d}},{});function KPe(a,u){a&&RM.flushSync(()=>a.dispatchEvent(u))}function Us(a){const u=Y.useRef(a);return Y.useEffect(()=>{u.current=a}),Y.useMemo(()=>(...d)=>{var f;return(f=u.current)==null?void 0:f.call(u,...d)},[])}function lKt(a,u=globalThis?.document){const d=Us(a);Y.useEffect(()=>{const f=m=>{m.key==="Escape"&&d(m)};return u.addEventListener("keydown",f,{capture:!0}),()=>u.removeEventListener("keydown",f,{capture:!0})},[d,u])}var uKt="DismissableLayer",Nne="dismissableLayer.update",cKt="dismissableLayer.pointerDownOutside",dKt="dismissableLayer.focusOutside",nLe,XPe=Y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),OS=Y.forwardRef((a,u)=>{const{disableOutsidePointerEvents:d=!1,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:g,onInteractOutside:x,onDismiss:b,...v}=a,_=Y.useContext(XPe),[S,R]=Y.useState(null),w=S?.ownerDocument??globalThis?.document,[,N]=Y.useState({}),k=Cn(u,ee=>R(ee)),B=Array.from(_.layers),[P]=[..._.layersWithOutsidePointerEventsDisabled].slice(-1),$=B.indexOf(P),q=S?B.indexOf(S):-1,z=_.layersWithOutsidePointerEventsDisabled.size>0,W=q>=$,X=pKt(ee=>{const fe=ee.target,be=[..._.branches].some(je=>je.contains(fe));!W||be||(m?.(ee),x?.(ee),ee.defaultPrevented||b?.())},w),J=mKt(ee=>{const fe=ee.target;[..._.branches].some(je=>je.contains(fe))||(g?.(ee),x?.(ee),ee.defaultPrevented||b?.())},w);return lKt(ee=>{q===_.layers.size-1&&(f?.(ee),!ee.defaultPrevented&&b&&(ee.preventDefault(),b()))},w),Y.useEffect(()=>{if(S)return d&&(_.layersWithOutsidePointerEventsDisabled.size===0&&(nLe=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),_.layersWithOutsidePointerEventsDisabled.add(S)),_.layers.add(S),iLe(),()=>{d&&_.layersWithOutsidePointerEventsDisabled.size===1&&(w.body.style.pointerEvents=nLe)}},[S,w,d,_]),Y.useEffect(()=>()=>{S&&(_.layers.delete(S),_.layersWithOutsidePointerEventsDisabled.delete(S),iLe())},[S,_]),Y.useEffect(()=>{const ee=()=>N({});return document.addEventListener(Nne,ee),()=>document.removeEventListener(Nne,ee)},[]),D.jsxRuntimeExports.jsx(rn.div,{...v,ref:k,style:{pointerEvents:z?W?"auto":"none":void 0,...a.style},onFocusCapture:xr(a.onFocusCapture,J.onFocusCapture),onBlurCapture:xr(a.onBlurCapture,J.onBlurCapture),onPointerDownCapture:xr(a.onPointerDownCapture,X.onPointerDownCapture)})});OS.displayName=uKt;var fKt="DismissableLayerBranch",hKt=Y.forwardRef((a,u)=>{const d=Y.useContext(XPe),f=Y.useRef(null),m=Cn(u,f);return Y.useEffect(()=>{const g=f.current;if(g)return d.branches.add(g),()=>{d.branches.delete(g)}},[d.branches]),D.jsxRuntimeExports.jsx(rn.div,{...a,ref:m})});hKt.displayName=fKt;function pKt(a,u=globalThis?.document){const d=Us(a),f=Y.useRef(!1),m=Y.useRef(()=>{});return Y.useEffect(()=>{const g=b=>{if(b.target&&!f.current){let v=function(){JPe(cKt,d,_,{discrete:!0})};const _={originalEvent:b};b.pointerType==="touch"?(u.removeEventListener("click",m.current),m.current=v,u.addEventListener("click",m.current,{once:!0})):v()}else u.removeEventListener("click",m.current);f.current=!1},x=window.setTimeout(()=>{u.addEventListener("pointerdown",g)},0);return()=>{window.clearTimeout(x),u.removeEventListener("pointerdown",g),u.removeEventListener("click",m.current)}},[u,d]),{onPointerDownCapture:()=>f.current=!0}}function mKt(a,u=globalThis?.document){const d=Us(a),f=Y.useRef(!1);return Y.useEffect(()=>{const m=g=>{g.target&&!f.current&&JPe(dKt,d,{originalEvent:g},{discrete:!1})};return u.addEventListener("focusin",m),()=>u.removeEventListener("focusin",m)},[u,d]),{onFocusCapture:()=>f.current=!0,onBlurCapture:()=>f.current=!1}}function iLe(){const a=new CustomEvent(Nne);document.dispatchEvent(a)}function JPe(a,u,d,{discrete:f}){const m=d.originalEvent.target,g=new CustomEvent(a,{bubbles:!1,cancelable:!0,detail:d});u&&m.addEventListener(a,u,{once:!0}),f?KPe(m,g):m.dispatchEvent(g)}var ca=globalThis?.document?Y.useLayoutEffect:()=>{},gKt=Y.useId||(()=>{}),xKt=0;function ic(a){const[u,d]=Y.useState(gKt());return ca(()=>{d(f=>f??String(xKt++))},[a]),u?`radix-${u}`:""}const yKt=["top","right","bottom","left"],wx=Math.min,ou=Math.max,VF=Math.round,zj=Math.floor,mh=a=>({x:a,y:a}),vKt={left:"right",right:"left",bottom:"top",top:"bottom"},bKt={start:"end",end:"start"};function Dne(a,u,d){return ou(a,wx(u,d))}function p0(a,u){return typeof a=="function"?a(u):a}function m0(a){return a.split("-")[0]}function NS(a){return a.split("-")[1]}function rse(a){return a==="x"?"y":"x"}function nse(a){return a==="y"?"height":"width"}function Ox(a){return["top","bottom"].includes(m0(a))?"y":"x"}function ise(a){return rse(Ox(a))}function EKt(a,u,d){d===void 0&&(d=!1);const f=NS(a),m=ise(a),g=nse(m);let x=m==="x"?f===(d?"end":"start")?"right":"left":f==="start"?"bottom":"top";return u.reference[g]>u.floating[g]&&(x=QF(x)),[x,QF(x)]}function _Kt(a){const u=QF(a);return[kne(a),u,kne(u)]}function kne(a){return a.replace(/start|end/g,u=>bKt[u])}function SKt(a,u,d){const f=["left","right"],m=["right","left"],g=["top","bottom"],x=["bottom","top"];switch(a){case"top":case"bottom":return d?u?m:f:u?f:m;case"left":case"right":return u?g:x;default:return[]}}function AKt(a,u,d,f){const m=NS(a);let g=SKt(m0(a),d==="start",f);return m&&(g=g.map(x=>x+"-"+m),u&&(g=g.concat(g.map(kne)))),g}function QF(a){return a.replace(/left|right|bottom|top/g,u=>vKt[u])}function CKt(a){return{top:0,right:0,bottom:0,left:0,...a}}function ZPe(a){return typeof a!="number"?CKt(a):{top:a,right:a,bottom:a,left:a}}function YF(a){const{x:u,y:d,width:f,height:m}=a;return{width:f,height:m,top:d,left:u,right:u+f,bottom:d+m,x:u,y:d}}function sLe(a,u,d){let{reference:f,floating:m}=a;const g=Ox(u),x=ise(u),b=nse(x),v=m0(u),_=g==="y",S=f.x+f.width/2-m.width/2,R=f.y+f.height/2-m.height/2,w=f[b]/2-m[b]/2;let N;switch(v){case"top":N={x:S,y:f.y-m.height};break;case"bottom":N={x:S,y:f.y+f.height};break;case"right":N={x:f.x+f.width,y:R};break;case"left":N={x:f.x-m.width,y:R};break;default:N={x:f.x,y:f.y}}switch(NS(u)){case"start":N[x]-=w*(d&&_?-1:1);break;case"end":N[x]+=w*(d&&_?-1:1);break}return N}const RKt=async(a,u,d)=>{const{placement:f="bottom",strategy:m="absolute",middleware:g=[],platform:x}=d,b=g.filter(Boolean),v=await(x.isRTL==null?void 0:x.isRTL(u));let _=await x.getElementRects({reference:a,floating:u,strategy:m}),{x:S,y:R}=sLe(_,f,v),w=f,N={},k=0;for(let B=0;B<b.length;B++){const{name:P,fn:$}=b[B],{x:q,y:z,data:W,reset:X}=await $({x:S,y:R,initialPlacement:f,placement:w,strategy:m,middlewareData:N,rects:_,platform:x,elements:{reference:a,floating:u}});S=q??S,R=z??R,N={...N,[P]:{...N[P],...W}},X&&k<=50&&(k++,typeof X=="object"&&(X.placement&&(w=X.placement),X.rects&&(_=X.rects===!0?await x.getElementRects({reference:a,floating:u,strategy:m}):X.rects),{x:S,y:R}=sLe(_,w,v)),B=-1)}return{x:S,y:R,placement:w,strategy:m,middlewareData:N}};async function C5(a,u){var d;u===void 0&&(u={});const{x:f,y:m,platform:g,rects:x,elements:b,strategy:v}=a,{boundary:_="clippingAncestors",rootBoundary:S="viewport",elementContext:R="floating",altBoundary:w=!1,padding:N=0}=p0(u,a),k=ZPe(N),P=b[w?R==="floating"?"reference":"floating":R],$=YF(await g.getClippingRect({element:(d=await(g.isElement==null?void 0:g.isElement(P)))==null||d?P:P.contextElement||await(g.getDocumentElement==null?void 0:g.getDocumentElement(b.floating)),boundary:_,rootBoundary:S,strategy:v})),q=R==="floating"?{x:f,y:m,width:x.floating.width,height:x.floating.height}:x.reference,z=await(g.getOffsetParent==null?void 0:g.getOffsetParent(b.floating)),W=await(g.isElement==null?void 0:g.isElement(z))?await(g.getScale==null?void 0:g.getScale(z))||{x:1,y:1}:{x:1,y:1},X=YF(g.convertOffsetParentRelativeRectToViewportRelativeRect?await g.convertOffsetParentRelativeRectToViewportRelativeRect({elements:b,rect:q,offsetParent:z,strategy:v}):q);return{top:($.top-X.top+k.top)/W.y,bottom:(X.bottom-$.bottom+k.bottom)/W.y,left:($.left-X.left+k.left)/W.x,right:(X.right-$.right+k.right)/W.x}}const TKt=a=>({name:"arrow",options:a,async fn(u){const{x:d,y:f,placement:m,rects:g,platform:x,elements:b,middlewareData:v}=u,{element:_,padding:S=0}=p0(a,u)||{};if(_==null)return{};const R=ZPe(S),w={x:d,y:f},N=ise(m),k=nse(N),B=await x.getDimensions(_),P=N==="y",$=P?"top":"left",q=P?"bottom":"right",z=P?"clientHeight":"clientWidth",W=g.reference[k]+g.reference[N]-w[N]-g.floating[k],X=w[N]-g.reference[N],J=await(x.getOffsetParent==null?void 0:x.getOffsetParent(_));let ee=J?J[z]:0;(!ee||!await(x.isElement==null?void 0:x.isElement(J)))&&(ee=b.floating[z]||g.floating[k]);const fe=W/2-X/2,be=ee/2-B[k]/2-1,je=wx(R[$],be),_e=wx(R[q],be),De=je,Xe=ee-B[k]-_e,ze=ee/2-B[k]/2+fe,te=Dne(De,ze,Xe),Ne=!v.arrow&&NS(m)!=null&&ze!==te&&g.reference[k]/2-(ze<De?je:_e)-B[k]/2<0,Ge=Ne?ze<De?ze-De:ze-Xe:0;return{[N]:w[N]+Ge,data:{[N]:te,centerOffset:ze-te-Ge,...Ne&&{alignmentOffset:Ge}},reset:Ne}}}),wKt=function(a){return a===void 0&&(a={}),{name:"flip",options:a,async fn(u){var d,f;const{placement:m,middlewareData:g,rects:x,initialPlacement:b,platform:v,elements:_}=u,{mainAxis:S=!0,crossAxis:R=!0,fallbackPlacements:w,fallbackStrategy:N="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:B=!0,...P}=p0(a,u);if((d=g.arrow)!=null&&d.alignmentOffset)return{};const $=m0(m),q=Ox(b),z=m0(b)===b,W=await(v.isRTL==null?void 0:v.isRTL(_.floating)),X=w||(z||!B?[QF(b)]:_Kt(b)),J=k!=="none";!w&&J&&X.push(...AKt(b,B,k,W));const ee=[b,...X],fe=await C5(u,P),be=[];let je=((f=g.flip)==null?void 0:f.overflows)||[];if(S&&be.push(fe[$]),R){const ze=EKt(m,x,W);be.push(fe[ze[0]],fe[ze[1]])}if(je=[...je,{placement:m,overflows:be}],!be.every(ze=>ze<=0)){var _e,De;const ze=(((_e=g.flip)==null?void 0:_e.index)||0)+1,te=ee[ze];if(te)return{data:{index:ze,overflows:je},reset:{placement:te}};let Ne=(De=je.filter(Ge=>Ge.overflows[0]<=0).sort((Ge,mt)=>Ge.overflows[1]-mt.overflows[1])[0])==null?void 0:De.placement;if(!Ne)switch(N){case"bestFit":{var Xe;const Ge=(Xe=je.filter(mt=>{if(J){const Je=Ox(mt.placement);return Je===q||Je==="y"}return!0}).map(mt=>[mt.placement,mt.overflows.filter(Je=>Je>0).reduce((Je,rt)=>Je+rt,0)]).sort((mt,Je)=>mt[1]-Je[1])[0])==null?void 0:Xe[0];Ge&&(Ne=Ge);break}case"initialPlacement":Ne=b;break}if(m!==Ne)return{reset:{placement:Ne}}}return{}}}};function oLe(a,u){return{top:a.top-u.height,right:a.right-u.width,bottom:a.bottom-u.height,left:a.left-u.width}}function aLe(a){return yKt.some(u=>a[u]>=0)}const OKt=function(a){return a===void 0&&(a={}),{name:"hide",options:a,async fn(u){const{rects:d}=u,{strategy:f="referenceHidden",...m}=p0(a,u);switch(f){case"referenceHidden":{const g=await C5(u,{...m,elementContext:"reference"}),x=oLe(g,d.reference);return{data:{referenceHiddenOffsets:x,referenceHidden:aLe(x)}}}case"escaped":{const g=await C5(u,{...m,altBoundary:!0}),x=oLe(g,d.floating);return{data:{escapedOffsets:x,escaped:aLe(x)}}}default:return{}}}}};async function NKt(a,u){const{placement:d,platform:f,elements:m}=a,g=await(f.isRTL==null?void 0:f.isRTL(m.floating)),x=m0(d),b=NS(d),v=Ox(d)==="y",_=["left","top"].includes(x)?-1:1,S=g&&v?-1:1,R=p0(u,a);let{mainAxis:w,crossAxis:N,alignmentAxis:k}=typeof R=="number"?{mainAxis:R,crossAxis:0,alignmentAxis:null}:{mainAxis:R.mainAxis||0,crossAxis:R.crossAxis||0,alignmentAxis:R.alignmentAxis};return b&&typeof k=="number"&&(N=b==="end"?k*-1:k),v?{x:N*S,y:w*_}:{x:w*_,y:N*S}}const DKt=function(a){return a===void 0&&(a=0),{name:"offset",options:a,async fn(u){var d,f;const{x:m,y:g,placement:x,middlewareData:b}=u,v=await NKt(u,a);return x===((d=b.offset)==null?void 0:d.placement)&&(f=b.arrow)!=null&&f.alignmentOffset?{}:{x:m+v.x,y:g+v.y,data:{...v,placement:x}}}}},kKt=function(a){return a===void 0&&(a={}),{name:"shift",options:a,async fn(u){const{x:d,y:f,placement:m}=u,{mainAxis:g=!0,crossAxis:x=!1,limiter:b={fn:P=>{let{x:$,y:q}=P;return{x:$,y:q}}},...v}=p0(a,u),_={x:d,y:f},S=await C5(u,v),R=Ox(m0(m)),w=rse(R);let N=_[w],k=_[R];if(g){const P=w==="y"?"top":"left",$=w==="y"?"bottom":"right",q=N+S[P],z=N-S[$];N=Dne(q,N,z)}if(x){const P=R==="y"?"top":"left",$=R==="y"?"bottom":"right",q=k+S[P],z=k-S[$];k=Dne(q,k,z)}const B=b.fn({...u,[w]:N,[R]:k});return{...B,data:{x:B.x-d,y:B.y-f,enabled:{[w]:g,[R]:x}}}}}},LKt=function(a){return a===void 0&&(a={}),{options:a,fn(u){const{x:d,y:f,placement:m,rects:g,middlewareData:x}=u,{offset:b=0,mainAxis:v=!0,crossAxis:_=!0}=p0(a,u),S={x:d,y:f},R=Ox(m),w=rse(R);let N=S[w],k=S[R];const B=p0(b,u),P=typeof B=="number"?{mainAxis:B,crossAxis:0}:{mainAxis:0,crossAxis:0,...B};if(v){const z=w==="y"?"height":"width",W=g.reference[w]-g.floating[z]+P.mainAxis,X=g.reference[w]+g.reference[z]-P.mainAxis;N<W?N=W:N>X&&(N=X)}if(_){var $,q;const z=w==="y"?"width":"height",W=["top","left"].includes(m0(m)),X=g.reference[R]-g.floating[z]+(W&&(($=x.offset)==null?void 0:$[R])||0)+(W?0:P.crossAxis),J=g.reference[R]+g.reference[z]+(W?0:((q=x.offset)==null?void 0:q[R])||0)-(W?P.crossAxis:0);k<X?k=X:k>J&&(k=J)}return{[w]:N,[R]:k}}}},IKt=function(a){return a===void 0&&(a={}),{name:"size",options:a,async fn(u){var d,f;const{placement:m,rects:g,platform:x,elements:b}=u,{apply:v=()=>{},..._}=p0(a,u),S=await C5(u,_),R=m0(m),w=NS(m),N=Ox(m)==="y",{width:k,height:B}=g.floating;let P,$;R==="top"||R==="bottom"?(P=R,$=w===(await(x.isRTL==null?void 0:x.isRTL(b.floating))?"start":"end")?"left":"right"):($=R,P=w==="end"?"top":"bottom");const q=B-S.top-S.bottom,z=k-S.left-S.right,W=wx(B-S[P],q),X=wx(k-S[$],z),J=!u.middlewareData.shift;let ee=W,fe=X;if((d=u.middlewareData.shift)!=null&&d.enabled.x&&(fe=z),(f=u.middlewareData.shift)!=null&&f.enabled.y&&(ee=q),J&&!w){const je=ou(S.left,0),_e=ou(S.right,0),De=ou(S.top,0),Xe=ou(S.bottom,0);N?fe=k-2*(je!==0||_e!==0?je+_e:ou(S.left,S.right)):ee=B-2*(De!==0||Xe!==0?De+Xe:ou(S.top,S.bottom))}await v({...u,availableWidth:fe,availableHeight:ee});const be=await x.getDimensions(b.floating);return k!==be.width||B!==be.height?{reset:{rects:!0}}:{}}}};function WM(){return typeof window<"u"}function DS(a){return eje(a)?(a.nodeName||"").toLowerCase():"#document"}function au(a){var u;return(a==null||(u=a.ownerDocument)==null?void 0:u.defaultView)||window}function Eh(a){var u;return(u=(eje(a)?a.ownerDocument:a.document)||window.document)==null?void 0:u.documentElement}function eje(a){return WM()?a instanceof Node||a instanceof au(a).Node:!1}function Nd(a){return WM()?a instanceof Element||a instanceof au(a).Element:!1}function gh(a){return WM()?a instanceof HTMLElement||a instanceof au(a).HTMLElement:!1}function lLe(a){return!WM()||typeof ShadowRoot>"u"?!1:a instanceof ShadowRoot||a instanceof au(a).ShadowRoot}function nN(a){const{overflow:u,overflowX:d,overflowY:f,display:m}=Dd(a);return/auto|scroll|overlay|hidden|clip/.test(u+f+d)&&!["inline","contents"].includes(m)}function PKt(a){return["table","td","th"].includes(DS(a))}function VM(a){return[":popover-open",":modal"].some(u=>{try{return a.matches(u)}catch{return!1}})}function sse(a){const u=ose(),d=Nd(a)?Dd(a):a;return["transform","translate","scale","rotate","perspective"].some(f=>d[f]?d[f]!=="none":!1)||(d.containerType?d.containerType!=="normal":!1)||!u&&(d.backdropFilter?d.backdropFilter!=="none":!1)||!u&&(d.filter?d.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(f=>(d.willChange||"").includes(f))||["paint","layout","strict","content"].some(f=>(d.contain||"").includes(f))}function jKt(a){let u=Nx(a);for(;gh(u)&&!sS(u);){if(sse(u))return u;if(VM(u))return null;u=Nx(u)}return null}function ose(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function sS(a){return["html","body","#document"].includes(DS(a))}function Dd(a){return au(a).getComputedStyle(a)}function QM(a){return Nd(a)?{scrollLeft:a.scrollLeft,scrollTop:a.scrollTop}:{scrollLeft:a.scrollX,scrollTop:a.scrollY}}function Nx(a){if(DS(a)==="html")return a;const u=a.assignedSlot||a.parentNode||lLe(a)&&a.host||Eh(a);return lLe(u)?u.host:u}function tje(a){const u=Nx(a);return sS(u)?a.ownerDocument?a.ownerDocument.body:a.body:gh(u)&&nN(u)?u:tje(u)}function R5(a,u,d){var f;u===void 0&&(u=[]),d===void 0&&(d=!0);const m=tje(a),g=m===((f=a.ownerDocument)==null?void 0:f.body),x=au(m);if(g){const b=Lne(x);return u.concat(x,x.visualViewport||[],nN(m)?m:[],b&&d?R5(b):[])}return u.concat(m,R5(m,[],d))}function Lne(a){return a.parent&&Object.getPrototypeOf(a.parent)?a.frameElement:null}function rje(a){const u=Dd(a);let d=parseFloat(u.width)||0,f=parseFloat(u.height)||0;const m=gh(a),g=m?a.offsetWidth:d,x=m?a.offsetHeight:f,b=VF(d)!==g||VF(f)!==x;return b&&(d=g,f=x),{width:d,height:f,$:b}}function ase(a){return Nd(a)?a:a.contextElement}function Q_(a){const u=ase(a);if(!gh(u))return mh(1);const d=u.getBoundingClientRect(),{width:f,height:m,$:g}=rje(u);let x=(g?VF(d.width):d.width)/f,b=(g?VF(d.height):d.height)/m;return(!x||!Number.isFinite(x))&&(x=1),(!b||!Number.isFinite(b))&&(b=1),{x,y:b}}const FKt=mh(0);function nje(a){const u=au(a);return!ose()||!u.visualViewport?FKt:{x:u.visualViewport.offsetLeft,y:u.visualViewport.offsetTop}}function MKt(a,u,d){return u===void 0&&(u=!1),!d||u&&d!==au(a)?!1:u}function Hv(a,u,d,f){u===void 0&&(u=!1),d===void 0&&(d=!1);const m=a.getBoundingClientRect(),g=ase(a);let x=mh(1);u&&(f?Nd(f)&&(x=Q_(f)):x=Q_(a));const b=MKt(g,d,f)?nje(g):mh(0);let v=(m.left+b.x)/x.x,_=(m.top+b.y)/x.y,S=m.width/x.x,R=m.height/x.y;if(g){const w=au(g),N=f&&Nd(f)?au(f):f;let k=w,B=Lne(k);for(;B&&f&&N!==k;){const P=Q_(B),$=B.getBoundingClientRect(),q=Dd(B),z=$.left+(B.clientLeft+parseFloat(q.paddingLeft))*P.x,W=$.top+(B.clientTop+parseFloat(q.paddingTop))*P.y;v*=P.x,_*=P.y,S*=P.x,R*=P.y,v+=z,_+=W,k=au(B),B=Lne(k)}}return YF({width:S,height:R,x:v,y:_})}function lse(a,u){const d=QM(a).scrollLeft;return u?u.left+d:Hv(Eh(a)).left+d}function ije(a,u,d){d===void 0&&(d=!1);const f=a.getBoundingClientRect(),m=f.left+u.scrollLeft-(d?0:lse(a,f)),g=f.top+u.scrollTop;return{x:m,y:g}}function $Kt(a){let{elements:u,rect:d,offsetParent:f,strategy:m}=a;const g=m==="fixed",x=Eh(f),b=u?VM(u.floating):!1;if(f===x||b&&g)return d;let v={scrollLeft:0,scrollTop:0},_=mh(1);const S=mh(0),R=gh(f);if((R||!R&&!g)&&((DS(f)!=="body"||nN(x))&&(v=QM(f)),gh(f))){const N=Hv(f);_=Q_(f),S.x=N.x+f.clientLeft,S.y=N.y+f.clientTop}const w=x&&!R&&!g?ije(x,v,!0):mh(0);return{width:d.width*_.x,height:d.height*_.y,x:d.x*_.x-v.scrollLeft*_.x+S.x+w.x,y:d.y*_.y-v.scrollTop*_.y+S.y+w.y}}function BKt(a){return Array.from(a.getClientRects())}function qKt(a){const u=Eh(a),d=QM(a),f=a.ownerDocument.body,m=ou(u.scrollWidth,u.clientWidth,f.scrollWidth,f.clientWidth),g=ou(u.scrollHeight,u.clientHeight,f.scrollHeight,f.clientHeight);let x=-d.scrollLeft+lse(a);const b=-d.scrollTop;return Dd(f).direction==="rtl"&&(x+=ou(u.clientWidth,f.clientWidth)-m),{width:m,height:g,x,y:b}}function UKt(a,u){const d=au(a),f=Eh(a),m=d.visualViewport;let g=f.clientWidth,x=f.clientHeight,b=0,v=0;if(m){g=m.width,x=m.height;const _=ose();(!_||_&&u==="fixed")&&(b=m.offsetLeft,v=m.offsetTop)}return{width:g,height:x,x:b,y:v}}function zKt(a,u){const d=Hv(a,!0,u==="fixed"),f=d.top+a.clientTop,m=d.left+a.clientLeft,g=gh(a)?Q_(a):mh(1),x=a.clientWidth*g.x,b=a.clientHeight*g.y,v=m*g.x,_=f*g.y;return{width:x,height:b,x:v,y:_}}function uLe(a,u,d){let f;if(u==="viewport")f=UKt(a,d);else if(u==="document")f=qKt(Eh(a));else if(Nd(u))f=zKt(u,d);else{const m=nje(a);f={x:u.x-m.x,y:u.y-m.y,width:u.width,height:u.height}}return YF(f)}function sje(a,u){const d=Nx(a);return d===u||!Nd(d)||sS(d)?!1:Dd(d).position==="fixed"||sje(d,u)}function HKt(a,u){const d=u.get(a);if(d)return d;let f=R5(a,[],!1).filter(b=>Nd(b)&&DS(b)!=="body"),m=null;const g=Dd(a).position==="fixed";let x=g?Nx(a):a;for(;Nd(x)&&!sS(x);){const b=Dd(x),v=sse(x);!v&&b.position==="fixed"&&(m=null),(g?!v&&!m:!v&&b.position==="static"&&!!m&&["absolute","fixed"].includes(m.position)||nN(x)&&!v&&sje(a,x))?f=f.filter(S=>S!==x):m=b,x=Nx(x)}return u.set(a,f),f}function GKt(a){let{element:u,boundary:d,rootBoundary:f,strategy:m}=a;const x=[...d==="clippingAncestors"?VM(u)?[]:HKt(u,this._c):[].concat(d),f],b=x[0],v=x.reduce((_,S)=>{const R=uLe(u,S,m);return _.top=ou(R.top,_.top),_.right=wx(R.right,_.right),_.bottom=wx(R.bottom,_.bottom),_.left=ou(R.left,_.left),_},uLe(u,b,m));return{width:v.right-v.left,height:v.bottom-v.top,x:v.left,y:v.top}}function WKt(a){const{width:u,height:d}=rje(a);return{width:u,height:d}}function VKt(a,u,d){const f=gh(u),m=Eh(u),g=d==="fixed",x=Hv(a,!0,g,u);let b={scrollLeft:0,scrollTop:0};const v=mh(0);if(f||!f&&!g)if((DS(u)!=="body"||nN(m))&&(b=QM(u)),f){const w=Hv(u,!0,g,u);v.x=w.x+u.clientLeft,v.y=w.y+u.clientTop}else m&&(v.x=lse(m));const _=m&&!f&&!g?ije(m,b):mh(0),S=x.left+b.scrollLeft-v.x-_.x,R=x.top+b.scrollTop-v.y-_.y;return{x:S,y:R,width:x.width,height:x.height}}function _re(a){return Dd(a).position==="static"}function cLe(a,u){if(!gh(a)||Dd(a).position==="fixed")return null;if(u)return u(a);let d=a.offsetParent;return Eh(a)===d&&(d=d.ownerDocument.body),d}function oje(a,u){const d=au(a);if(VM(a))return d;if(!gh(a)){let m=Nx(a);for(;m&&!sS(m);){if(Nd(m)&&!_re(m))return m;m=Nx(m)}return d}let f=cLe(a,u);for(;f&&PKt(f)&&_re(f);)f=cLe(f,u);return f&&sS(f)&&_re(f)&&!sse(f)?d:f||jKt(a)||d}const QKt=async function(a){const u=this.getOffsetParent||oje,d=this.getDimensions,f=await d(a.floating);return{reference:VKt(a.reference,await u(a.floating),a.strategy),floating:{x:0,y:0,width:f.width,height:f.height}}};function YKt(a){return Dd(a).direction==="rtl"}const KKt={convertOffsetParentRelativeRectToViewportRelativeRect:$Kt,getDocumentElement:Eh,getClippingRect:GKt,getOffsetParent:oje,getElementRects:QKt,getClientRects:BKt,getDimensions:WKt,getScale:Q_,isElement:Nd,isRTL:YKt};function aje(a,u){return a.x===u.x&&a.y===u.y&&a.width===u.width&&a.height===u.height}function XKt(a,u){let d=null,f;const m=Eh(a);function g(){var b;clearTimeout(f),(b=d)==null||b.disconnect(),d=null}function x(b,v){b===void 0&&(b=!1),v===void 0&&(v=1),g();const _=a.getBoundingClientRect(),{left:S,top:R,width:w,height:N}=_;if(b||u(),!w||!N)return;const k=zj(R),B=zj(m.clientWidth-(S+w)),P=zj(m.clientHeight-(R+N)),$=zj(S),z={rootMargin:-k+"px "+-B+"px "+-P+"px "+-$+"px",threshold:ou(0,wx(1,v))||1};let W=!0;function X(J){const ee=J[0].intersectionRatio;if(ee!==v){if(!W)return x();ee?x(!1,ee):f=setTimeout(()=>{x(!1,1e-7)},1e3)}ee===1&&!aje(_,a.getBoundingClientRect())&&x(),W=!1}try{d=new IntersectionObserver(X,{...z,root:m.ownerDocument})}catch{d=new IntersectionObserver(X,z)}d.observe(a)}return x(!0),g}function JKt(a,u,d,f){f===void 0&&(f={});const{ancestorScroll:m=!0,ancestorResize:g=!0,elementResize:x=typeof ResizeObserver=="function",layoutShift:b=typeof IntersectionObserver=="function",animationFrame:v=!1}=f,_=ase(a),S=m||g?[..._?R5(_):[],...R5(u)]:[];S.forEach($=>{m&&$.addEventListener("scroll",d,{passive:!0}),g&&$.addEventListener("resize",d)});const R=_&&b?XKt(_,d):null;let w=-1,N=null;x&&(N=new ResizeObserver($=>{let[q]=$;q&&q.target===_&&N&&(N.unobserve(u),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var z;(z=N)==null||z.observe(u)})),d()}),_&&!v&&N.observe(_),N.observe(u));let k,B=v?Hv(a):null;v&&P();function P(){const $=Hv(a);B&&!aje(B,$)&&d(),B=$,k=requestAnimationFrame(P)}return d(),()=>{var $;S.forEach(q=>{m&&q.removeEventListener("scroll",d),g&&q.removeEventListener("resize",d)}),R?.(),($=N)==null||$.disconnect(),N=null,v&&cancelAnimationFrame(k)}}const ZKt=DKt,eXt=kKt,tXt=wKt,rXt=IKt,nXt=OKt,dLe=TKt,iXt=LKt,sXt=(a,u,d)=>{const f=new Map,m={platform:KKt,...d},g={...m.platform,_c:f};return RKt(a,u,{...m,platform:g})};var _F=typeof document<"u"?Pe.useLayoutEffect:Pe.useEffect;function KF(a,u){if(a===u)return!0;if(typeof a!=typeof u)return!1;if(typeof a=="function"&&a.toString()===u.toString())return!0;let d,f,m;if(a&&u&&typeof a=="object"){if(Array.isArray(a)){if(d=a.length,d!==u.length)return!1;for(f=d;f--!==0;)if(!KF(a[f],u[f]))return!1;return!0}if(m=Object.keys(a),d=m.length,d!==Object.keys(u).length)return!1;for(f=d;f--!==0;)if(!{}.hasOwnProperty.call(u,m[f]))return!1;for(f=d;f--!==0;){const g=m[f];if(!(g==="_owner"&&a.$$typeof)&&!KF(a[g],u[g]))return!1}return!0}return a!==a&&u!==u}function lje(a){return typeof window>"u"?1:(a.ownerDocument.defaultView||window).devicePixelRatio||1}function fLe(a,u){const d=lje(a);return Math.round(u*d)/d}function Sre(a){const u=Y.useRef(a);return _F(()=>{u.current=a}),u}function oXt(a){a===void 0&&(a={});const{placement:u="bottom",strategy:d="absolute",middleware:f=[],platform:m,elements:{reference:g,floating:x}={},transform:b=!0,whileElementsMounted:v,open:_}=a,[S,R]=Y.useState({x:0,y:0,strategy:d,placement:u,middlewareData:{},isPositioned:!1}),[w,N]=Y.useState(f);KF(w,f)||N(f);const[k,B]=Y.useState(null),[P,$]=Y.useState(null),q=Y.useCallback(mt=>{mt!==J.current&&(J.current=mt,B(mt))},[]),z=Y.useCallback(mt=>{mt!==ee.current&&(ee.current=mt,$(mt))},[]),W=g||k,X=x||P,J=Y.useRef(null),ee=Y.useRef(null),fe=Y.useRef(S),be=v!=null,je=Sre(v),_e=Sre(m),De=Sre(_),Xe=Y.useCallback(()=>{if(!J.current||!ee.current)return;const mt={placement:u,strategy:d,middleware:w};_e.current&&(mt.platform=_e.current),sXt(J.current,ee.current,mt).then(Je=>{const rt={...Je,isPositioned:De.current!==!1};ze.current&&!KF(fe.current,rt)&&(fe.current=rt,RM.flushSync(()=>{R(rt)}))})},[w,u,d,_e,De]);_F(()=>{_===!1&&fe.current.isPositioned&&(fe.current.isPositioned=!1,R(mt=>({...mt,isPositioned:!1})))},[_]);const ze=Y.useRef(!1);_F(()=>(ze.current=!0,()=>{ze.current=!1}),[]),_F(()=>{if(W&&(J.current=W),X&&(ee.current=X),W&&X){if(je.current)return je.current(W,X,Xe);Xe()}},[W,X,Xe,je,be]);const te=Y.useMemo(()=>({reference:J,floating:ee,setReference:q,setFloating:z}),[q,z]),Ne=Y.useMemo(()=>({reference:W,floating:X}),[W,X]),Ge=Y.useMemo(()=>{const mt={position:d,left:0,top:0};if(!Ne.floating)return mt;const Je=fLe(Ne.floating,S.x),rt=fLe(Ne.floating,S.y);return b?{...mt,transform:"translate("+Je+"px, "+rt+"px)",...lje(Ne.floating)>=1.5&&{willChange:"transform"}}:{position:d,left:Je,top:rt}},[d,b,Ne.floating,S.x,S.y]);return Y.useMemo(()=>({...S,update:Xe,refs:te,elements:Ne,floatingStyles:Ge}),[S,Xe,te,Ne,Ge])}const aXt=a=>{function u(d){return{}.hasOwnProperty.call(d,"current")}return{name:"arrow",options:a,fn(d){const{element:f,padding:m}=typeof a=="function"?a(d):a;return f&&u(f)?f.current!=null?dLe({element:f.current,padding:m}).fn(d):{}:f?dLe({element:f,padding:m}).fn(d):{}}}},lXt=(a,u)=>({...ZKt(a),options:[a,u]}),uXt=(a,u)=>({...eXt(a),options:[a,u]}),cXt=(a,u)=>({...iXt(a),options:[a,u]}),dXt=(a,u)=>({...tXt(a),options:[a,u]}),fXt=(a,u)=>({...rXt(a),options:[a,u]}),hXt=(a,u)=>({...nXt(a),options:[a,u]}),pXt=(a,u)=>({...aXt(a),options:[a,u]});var mXt="Arrow",uje=Y.forwardRef((a,u)=>{const{children:d,width:f=10,height:m=5,...g}=a;return D.jsxRuntimeExports.jsx(rn.svg,{...g,ref:u,width:f,height:m,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:a.asChild?d:D.jsxRuntimeExports.jsx("polygon",{points:"0,0 30,0 15,10"})})});uje.displayName=mXt;var gXt=uje;function xXt(a){const[u,d]=Y.useState(void 0);return ca(()=>{if(a){d({width:a.offsetWidth,height:a.offsetHeight});const f=new ResizeObserver(m=>{if(!Array.isArray(m)||!m.length)return;const g=m[0];let x,b;if("borderBoxSize"in g){const v=g.borderBoxSize,_=Array.isArray(v)?v[0]:v;x=_.inlineSize,b=_.blockSize}else x=a.offsetWidth,b=a.offsetHeight;d({width:x,height:b})});return f.observe(a,{box:"border-box"}),()=>f.unobserve(a)}else d(void 0)},[a]),u}var use="Popper",[cje,Bx]=Md(use),[yXt,dje]=cje(use),fje=a=>{const{__scopePopper:u,children:d}=a,[f,m]=Y.useState(null);return D.jsxRuntimeExports.jsx(yXt,{scope:u,anchor:f,onAnchorChange:m,children:d})};fje.displayName=use;var hje="PopperAnchor",pje=Y.forwardRef((a,u)=>{const{__scopePopper:d,virtualRef:f,...m}=a,g=dje(hje,d),x=Y.useRef(null),b=Cn(u,x);return Y.useEffect(()=>{g.onAnchorChange(f?.current||x.current)}),f?null:D.jsxRuntimeExports.jsx(rn.div,{...m,ref:b})});pje.displayName=hje;var cse="PopperContent",[vXt,bXt]=cje(cse),mje=Y.forwardRef((a,u)=>{var d,f,m,g,x,b;const{__scopePopper:v,side:_="bottom",sideOffset:S=0,align:R="center",alignOffset:w=0,arrowPadding:N=0,avoidCollisions:k=!0,collisionBoundary:B=[],collisionPadding:P=0,sticky:$="partial",hideWhenDetached:q=!1,updatePositionStrategy:z="optimized",onPlaced:W,...X}=a,J=dje(cse,v),[ee,fe]=Y.useState(null),be=Cn(u,He=>fe(He)),[je,_e]=Y.useState(null),De=xXt(je),Xe=De?.width??0,ze=De?.height??0,te=_+(R!=="center"?"-"+R:""),Ne=typeof P=="number"?P:{top:0,right:0,bottom:0,left:0,...P},Ge=Array.isArray(B)?B:[B],mt=Ge.length>0,Je={padding:Ne,boundary:Ge.filter(_Xt),altBoundary:mt},{refs:rt,floatingStyles:vt,placement:qe,isPositioned:ge,middlewareData:pe}=oXt({strategy:"fixed",placement:te,whileElementsMounted:(...He)=>JKt(...He,{animationFrame:z==="always"}),elements:{reference:J.anchor},middleware:[lXt({mainAxis:S+ze,alignmentAxis:w}),k&&uXt({mainAxis:!0,crossAxis:!1,limiter:$==="partial"?cXt():void 0,...Je}),k&&dXt({...Je}),fXt({...Je,apply:({elements:He,rects:We,availableWidth:bt,availableHeight:_t})=>{const{width:Ft,height:qt}=We.reference,xt=He.floating.style;xt.setProperty("--radix-popper-available-width",`${bt}px`),xt.setProperty("--radix-popper-available-height",`${_t}px`),xt.setProperty("--radix-popper-anchor-width",`${Ft}px`),xt.setProperty("--radix-popper-anchor-height",`${qt}px`)}}),je&&pXt({element:je,padding:N}),SXt({arrowWidth:Xe,arrowHeight:ze}),q&&hXt({strategy:"referenceHidden",...Je})]}),[ye,we]=yje(qe),Ie=Us(W);ca(()=>{ge&&Ie?.()},[ge,Ie]);const le=(d=pe.arrow)==null?void 0:d.x,Se=(f=pe.arrow)==null?void 0:f.y,Le=((m=pe.arrow)==null?void 0:m.centerOffset)!==0,[Ye,ot]=Y.useState();return ca(()=>{ee&&ot(window.getComputedStyle(ee).zIndex)},[ee]),D.jsxRuntimeExports.jsx("div",{ref:rt.setFloating,"data-radix-popper-content-wrapper":"",style:{...vt,transform:ge?vt.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ye,"--radix-popper-transform-origin":[(g=pe.transformOrigin)==null?void 0:g.x,(x=pe.transformOrigin)==null?void 0:x.y].join(" "),...((b=pe.hide)==null?void 0:b.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:a.dir,children:D.jsxRuntimeExports.jsx(vXt,{scope:v,placedSide:ye,onArrowChange:_e,arrowX:le,arrowY:Se,shouldHideArrow:Le,children:D.jsxRuntimeExports.jsx(rn.div,{"data-side":ye,"data-align":we,...X,ref:be,style:{...X.style,animation:ge?void 0:"none"}})})})});mje.displayName=cse;var gje="PopperArrow",EXt={top:"bottom",right:"left",bottom:"top",left:"right"},xje=Y.forwardRef(function(u,d){const{__scopePopper:f,...m}=u,g=bXt(gje,f),x=EXt[g.placedSide];return D.jsxRuntimeExports.jsx("span",{ref:g.onArrowChange,style:{position:"absolute",left:g.arrowX,top:g.arrowY,[x]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[g.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[g.placedSide],visibility:g.shouldHideArrow?"hidden":void 0},children:D.jsxRuntimeExports.jsx(gXt,{...m,ref:d,style:{...m.style,display:"block"}})})});xje.displayName=gje;function _Xt(a){return a!==null}var SXt=a=>({name:"transformOrigin",options:a,fn(u){var d,f,m;const{placement:g,rects:x,middlewareData:b}=u,_=((d=b.arrow)==null?void 0:d.centerOffset)!==0,S=_?0:a.arrowWidth,R=_?0:a.arrowHeight,[w,N]=yje(g),k={start:"0%",center:"50%",end:"100%"}[N],B=(((f=b.arrow)==null?void 0:f.x)??0)+S/2,P=(((m=b.arrow)==null?void 0:m.y)??0)+R/2;let $="",q="";return w==="bottom"?($=_?k:`${B}px`,q=`${-R}px`):w==="top"?($=_?k:`${B}px`,q=`${x.floating.height+R}px`):w==="right"?($=`${-R}px`,q=_?k:`${P}px`):w==="left"&&($=`${x.floating.width+R}px`,q=_?k:`${P}px`),{data:{x:$,y:q}}}});function yje(a){const[u,d="center"]=a.split("-");return[u,d]}var YM=fje,iN=pje,KM=mje,XM=xje,AXt="Portal",kS=Y.forwardRef((a,u)=>{var d;const{container:f,...m}=a,[g,x]=Y.useState(!1);ca(()=>x(!0),[]);const b=f||g&&((d=globalThis?.document)==null?void 0:d.body);return b?jv.createPortal(D.jsxRuntimeExports.jsx(rn.div,{...m,ref:u}),b):null});kS.displayName=AXt;function CXt(a,u){return Y.useReducer((d,f)=>u[d][f]??d,a)}var Do=a=>{const{present:u,children:d}=a,f=RXt(u),m=typeof d=="function"?d({present:f.isPresent}):Y.Children.only(d),g=Cn(f.ref,TXt(m));return typeof d=="function"||f.isPresent?Y.cloneElement(m,{ref:g}):null};Do.displayName="Presence";function RXt(a){const[u,d]=Y.useState(),f=Y.useRef({}),m=Y.useRef(a),g=Y.useRef("none"),x=a?"mounted":"unmounted",[b,v]=CXt(x,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Y.useEffect(()=>{const _=Hj(f.current);g.current=b==="mounted"?_:"none"},[b]),ca(()=>{const _=f.current,S=m.current;if(S!==a){const w=g.current,N=Hj(_);a?v("MOUNT"):N==="none"||_?.display==="none"?v("UNMOUNT"):v(S&&w!==N?"ANIMATION_OUT":"UNMOUNT"),m.current=a}},[a,v]),ca(()=>{if(u){let _;const S=u.ownerDocument.defaultView??window,R=N=>{const B=Hj(f.current).includes(N.animationName);if(N.target===u&&B&&(v("ANIMATION_END"),!m.current)){const P=u.style.animationFillMode;u.style.animationFillMode="forwards",_=S.setTimeout(()=>{u.style.animationFillMode==="forwards"&&(u.style.animationFillMode=P)})}},w=N=>{N.target===u&&(g.current=Hj(f.current))};return u.addEventListener("animationstart",w),u.addEventListener("animationcancel",R),u.addEventListener("animationend",R),()=>{S.clearTimeout(_),u.removeEventListener("animationstart",w),u.removeEventListener("animationcancel",R),u.removeEventListener("animationend",R)}}else v("ANIMATION_END")},[u,v]),{isPresent:["mounted","unmountSuspended"].includes(b),ref:Y.useCallback(_=>{_&&(f.current=getComputedStyle(_)),d(_)},[])}}function Hj(a){return a?.animationName||"none"}function TXt(a){var u,d;let f=(u=Object.getOwnPropertyDescriptor(a.props,"ref"))==null?void 0:u.get,m=f&&"isReactWarning"in f&&f.isReactWarning;return m?a.ref:(f=(d=Object.getOwnPropertyDescriptor(a,"ref"))==null?void 0:d.get,m=f&&"isReactWarning"in f&&f.isReactWarning,m?a.props.ref:a.props.ref||a.ref)}function Dx({prop:a,defaultProp:u,onChange:d=()=>{}}){const[f,m]=wXt({defaultProp:u,onChange:d}),g=a!==void 0,x=g?a:f,b=Us(d),v=Y.useCallback(_=>{if(g){const R=typeof _=="function"?_(a):_;R!==a&&b(R)}else m(_)},[g,a,m,b]);return[x,v]}function wXt({defaultProp:a,onChange:u}){const d=Y.useState(a),[f]=d,m=Y.useRef(f),g=Us(u);return Y.useEffect(()=>{m.current!==f&&(g(f),m.current=f)},[f,m,g]),d}var OXt="VisuallyHidden",dse=Y.forwardRef((a,u)=>D.jsxRuntimeExports.jsx(rn.span,{...a,ref:u,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...a.style}}));dse.displayName=OXt;var NXt=dse,[JM,Cyr]=Md("Tooltip",[Bx]),ZM=Bx(),vje="TooltipProvider",DXt=700,Ine="tooltip.open",[kXt,fse]=JM(vje),bje=a=>{const{__scopeTooltip:u,delayDuration:d=DXt,skipDelayDuration:f=300,disableHoverableContent:m=!1,children:g}=a,[x,b]=Y.useState(!0),v=Y.useRef(!1),_=Y.useRef(0);return Y.useEffect(()=>{const S=_.current;return()=>window.clearTimeout(S)},[]),D.jsxRuntimeExports.jsx(kXt,{scope:u,isOpenDelayed:x,delayDuration:d,onOpen:Y.useCallback(()=>{window.clearTimeout(_.current),b(!1)},[]),onClose:Y.useCallback(()=>{window.clearTimeout(_.current),_.current=window.setTimeout(()=>b(!0),f)},[f]),isPointerInTransitRef:v,onPointerInTransitChange:Y.useCallback(S=>{v.current=S},[]),disableHoverableContent:m,children:g})};bje.displayName=vje;var e$="Tooltip",[LXt,sN]=JM(e$),LS=a=>{const{__scopeTooltip:u,children:d,open:f,defaultOpen:m=!1,onOpenChange:g,disableHoverableContent:x,delayDuration:b}=a,v=fse(e$,a.__scopeTooltip),_=ZM(u),[S,R]=Y.useState(null),w=ic(),N=Y.useRef(0),k=x??v.disableHoverableContent,B=b??v.delayDuration,P=Y.useRef(!1),[$=!1,q]=Dx({prop:f,defaultProp:m,onChange:ee=>{ee?(v.onOpen(),document.dispatchEvent(new CustomEvent(Ine))):v.onClose(),g?.(ee)}}),z=Y.useMemo(()=>$?P.current?"delayed-open":"instant-open":"closed",[$]),W=Y.useCallback(()=>{window.clearTimeout(N.current),N.current=0,P.current=!1,q(!0)},[q]),X=Y.useCallback(()=>{window.clearTimeout(N.current),N.current=0,q(!1)},[q]),J=Y.useCallback(()=>{window.clearTimeout(N.current),N.current=window.setTimeout(()=>{P.current=!0,q(!0),N.current=0},B)},[B,q]);return Y.useEffect(()=>()=>{N.current&&(window.clearTimeout(N.current),N.current=0)},[]),D.jsxRuntimeExports.jsx(YM,{..._,children:D.jsxRuntimeExports.jsx(LXt,{scope:u,contentId:w,open:$,stateAttribute:z,trigger:S,onTriggerChange:R,onTriggerEnter:Y.useCallback(()=>{v.isOpenDelayed?J():W()},[v.isOpenDelayed,J,W]),onTriggerLeave:Y.useCallback(()=>{k?X():(window.clearTimeout(N.current),N.current=0)},[X,k]),onOpen:W,onClose:X,disableHoverableContent:k,children:d})})};LS.displayName=e$;var Pne="TooltipTrigger",IS=Y.forwardRef((a,u)=>{const{__scopeTooltip:d,...f}=a,m=sN(Pne,d),g=fse(Pne,d),x=ZM(d),b=Y.useRef(null),v=Cn(u,b,m.onTriggerChange),_=Y.useRef(!1),S=Y.useRef(!1),R=Y.useCallback(()=>_.current=!1,[]);return Y.useEffect(()=>()=>document.removeEventListener("pointerup",R),[R]),D.jsxRuntimeExports.jsx(iN,{asChild:!0,...x,children:D.jsxRuntimeExports.jsx(rn.button,{"aria-describedby":m.open?m.contentId:void 0,"data-state":m.stateAttribute,...f,ref:v,onPointerMove:xr(a.onPointerMove,w=>{w.pointerType!=="touch"&&!S.current&&!g.isPointerInTransitRef.current&&(m.onTriggerEnter(),S.current=!0)}),onPointerLeave:xr(a.onPointerLeave,()=>{m.onTriggerLeave(),S.current=!1}),onPointerDown:xr(a.onPointerDown,()=>{_.current=!0,document.addEventListener("pointerup",R,{once:!0})}),onFocus:xr(a.onFocus,()=>{_.current||m.onOpen()}),onBlur:xr(a.onBlur,m.onClose),onClick:xr(a.onClick,m.onClose)})})});IS.displayName=Pne;var hse="TooltipPortal",[IXt,PXt]=JM(hse,{forceMount:void 0}),PS=a=>{const{__scopeTooltip:u,forceMount:d,children:f,container:m}=a,g=sN(hse,u);return D.jsxRuntimeExports.jsx(IXt,{scope:u,forceMount:d,children:D.jsxRuntimeExports.jsx(Do,{present:d||g.open,children:D.jsxRuntimeExports.jsx(kS,{asChild:!0,container:m,children:f})})})};PS.displayName=hse;var oS="TooltipContent",jS=Y.forwardRef((a,u)=>{const d=PXt(oS,a.__scopeTooltip),{forceMount:f=d.forceMount,side:m="top",...g}=a,x=sN(oS,a.__scopeTooltip);return D.jsxRuntimeExports.jsx(Do,{present:f||x.open,children:x.disableHoverableContent?D.jsxRuntimeExports.jsx(Eje,{side:m,...g,ref:u}):D.jsxRuntimeExports.jsx(jXt,{side:m,...g,ref:u})})}),jXt=Y.forwardRef((a,u)=>{const d=sN(oS,a.__scopeTooltip),f=fse(oS,a.__scopeTooltip),m=Y.useRef(null),g=Cn(u,m),[x,b]=Y.useState(null),{trigger:v,onClose:_}=d,S=m.current,{onPointerInTransitChange:R}=f,w=Y.useCallback(()=>{b(null),R(!1)},[R]),N=Y.useCallback((k,B)=>{const P=k.currentTarget,$={x:k.clientX,y:k.clientY},q=BXt($,P.getBoundingClientRect()),z=qXt($,q),W=UXt(B.getBoundingClientRect()),X=HXt([...z,...W]);b(X),R(!0)},[R]);return Y.useEffect(()=>()=>w(),[w]),Y.useEffect(()=>{if(v&&S){const k=P=>N(P,S),B=P=>N(P,v);return v.addEventListener("pointerleave",k),S.addEventListener("pointerleave",B),()=>{v.removeEventListener("pointerleave",k),S.removeEventListener("pointerleave",B)}}},[v,S,N,w]),Y.useEffect(()=>{if(x){const k=B=>{const P=B.target,$={x:B.clientX,y:B.clientY},q=v?.contains(P)||S?.contains(P),z=!zXt($,x);q?w():z&&(w(),_())};return document.addEventListener("pointermove",k),()=>document.removeEventListener("pointermove",k)}},[v,S,x,_,w]),D.jsxRuntimeExports.jsx(Eje,{...a,ref:g})}),[FXt,MXt]=JM(e$,{isInside:!1}),Eje=Y.forwardRef((a,u)=>{const{__scopeTooltip:d,children:f,"aria-label":m,onEscapeKeyDown:g,onPointerDownOutside:x,...b}=a,v=sN(oS,d),_=ZM(d),{onClose:S}=v;return Y.useEffect(()=>(document.addEventListener(Ine,S),()=>document.removeEventListener(Ine,S)),[S]),Y.useEffect(()=>{if(v.trigger){const R=w=>{const N=w.target;N?.contains(v.trigger)&&S()};return window.addEventListener("scroll",R,{capture:!0}),()=>window.removeEventListener("scroll",R,{capture:!0})}},[v.trigger,S]),D.jsxRuntimeExports.jsx(OS,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:g,onPointerDownOutside:x,onFocusOutside:R=>R.preventDefault(),onDismiss:S,children:D.jsxRuntimeExports.jsxs(KM,{"data-state":v.stateAttribute,..._,...b,ref:u,style:{...b.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[D.jsxRuntimeExports.jsx(YPe,{children:f}),D.jsxRuntimeExports.jsx(FXt,{scope:d,isInside:!0,children:D.jsxRuntimeExports.jsx(NXt,{id:v.contentId,role:"tooltip",children:m||f})})]})})});jS.displayName=oS;var _je="TooltipArrow",$Xt=Y.forwardRef((a,u)=>{const{__scopeTooltip:d,...f}=a,m=ZM(d);return MXt(_je,d).isInside?null:D.jsxRuntimeExports.jsx(XM,{...m,...f,ref:u})});$Xt.displayName=_je;function BXt(a,u){const d=Math.abs(u.top-a.y),f=Math.abs(u.bottom-a.y),m=Math.abs(u.right-a.x),g=Math.abs(u.left-a.x);switch(Math.min(d,f,m,g)){case g:return"left";case m:return"right";case d:return"top";case f:return"bottom";default:throw new Error("unreachable")}}function qXt(a,u,d=5){const f=[];switch(u){case"top":f.push({x:a.x-d,y:a.y+d},{x:a.x+d,y:a.y+d});break;case"bottom":f.push({x:a.x-d,y:a.y-d},{x:a.x+d,y:a.y-d});break;case"left":f.push({x:a.x+d,y:a.y-d},{x:a.x+d,y:a.y+d});break;case"right":f.push({x:a.x-d,y:a.y-d},{x:a.x-d,y:a.y+d});break}return f}function UXt(a){const{top:u,right:d,bottom:f,left:m}=a;return[{x:m,y:u},{x:d,y:u},{x:d,y:f},{x:m,y:f}]}function zXt(a,u){const{x:d,y:f}=a;let m=!1;for(let g=0,x=u.length-1;g<u.length;x=g++){const b=u[g].x,v=u[g].y,_=u[x].x,S=u[x].y;v>f!=S>f&&d<(_-b)*(f-v)/(S-v)+b&&(m=!m)}return m}function HXt(a){const u=a.slice();return u.sort((d,f)=>d.x<f.x?-1:d.x>f.x?1:d.y<f.y?-1:d.y>f.y?1:0),GXt(u)}function GXt(a){if(a.length<=1)return a.slice();const u=[];for(let f=0;f<a.length;f++){const m=a[f];for(;u.length>=2;){const g=u[u.length-1],x=u[u.length-2];if((g.x-x.x)*(m.y-x.y)>=(g.y-x.y)*(m.x-x.x))u.pop();else break}u.push(m)}u.pop();const d=[];for(let f=a.length-1;f>=0;f--){const m=a[f];for(;d.length>=2;){const g=d[d.length-1],x=d[d.length-2];if((g.x-x.x)*(m.y-x.y)>=(g.y-x.y)*(m.x-x.x))d.pop();else break}d.push(m)}return d.pop(),u.length===1&&d.length===1&&u[0].x===d[0].x&&u[0].y===d[0].y?u:u.concat(d)}var oN=LS,aN=IS,lN=PS,uN=jS;const ai=Y.createContext({});function Sje(a,u){return Pe.useMemo(()=>{if(a)return new Zr.ASTQuery({query:u,source:a})},[a,u])}const Aje=Y.createContext({focusMainView:()=>{},isMainViewFocused:!0,focusNestView:()=>{},isNestViewFocused:()=>!1,focusedNestView:null});function WXt({rootQuery:a,focusedNestViewPath:u,onFocusedNestViewPathChange:d,children:f}){const m=Y.useMemo(()=>{if(u.length===0)return null;if(a){const _=a.definition;if(_ instanceof Zr.ASTArrowQueryDefinition)return SF(_.view,[...u].reverse())}return null},[a,u]),g=Y.useCallback(()=>{d([])},[d]),x=Y.useCallback(_=>{d([..._])},[d]),b=Y.useCallback(_=>JSON.stringify(_)===JSON.stringify(u),[u]),v=u.length===0;return D.jsxRuntimeExports.jsx(Aje.Provider,{value:{focusMainView:g,isMainViewFocused:v,focusNestView:x,isNestViewFocused:b,focusedNestView:m},children:f})}function cN(){return Y.useContext(Aje)}const SF=(a,u)=>{if(u.length===0)return null;if(a instanceof Zr.ASTArrowViewDefinition)return SF(a.view,u);if(a instanceof Zr.ASTSegmentViewDefinition){const d=u.pop(),f=a.operations.items.find(m=>m instanceof Zr.ASTNestViewOperation&&m.name===d);return f===void 0?(u.push(d),null):u.length===0?f.view:SF(f.view.definition,u)}return a instanceof Zr.ASTRefinementViewDefinition?SF(a.refinement,u):null};function VXt({source:a,query:u,onQueryChange:d,focusedNestViewPath:f,onFocusedNestViewPathChange:m,children:g,topValues:x,onDrill:b}){const v=Sje(a,u);return D.jsxRuntimeExports.jsx(bje,{children:D.jsxRuntimeExports.jsx(WXt,{rootQuery:v,focusedNestViewPath:f,onFocusedNestViewPathChange:m,children:D.jsxRuntimeExports.jsx(ai.Provider,{value:{source:a,rootQuery:v,setQuery:d,topValues:x,onDrill:b},children:g})})})}var jO={},hLe;function QXt(){if(hLe)return jO;hLe=1,Object.defineProperty(jO,"__esModule",{value:!0}),jO.styleq=void 0;var a=new WeakMap,u="$$css";function d(m){var g,x,b;return m!=null&&(g=m.disableCache===!0,x=m.disableMix===!0,b=m.transform),function(){for(var _=[],S="",R=null,w=g?null:a,N=new Array(arguments.length),k=0;k<arguments.length;k++)N[k]=arguments[k];for(;N.length>0;){var B=N.pop();if(!(B==null||B===!1)){if(Array.isArray(B)){for(var P=0;P<B.length;P++)N.push(B[P]);continue}var $=b!=null?b(B):B;if($.$$css){var q="";if(w!=null&&w.has($)){var z=w.get($);z!=null&&(q=z[0],_.push.apply(_,z[1]),w=z[2])}else{var W=[];for(var X in $){var J=$[X];X!==u&&(typeof J=="string"||J===null?_.includes(X)||(_.push(X),w!=null&&W.push(X),typeof J=="string"&&(q+=q?" "+J:J)):console.error("styleq: ".concat(X," typeof ").concat(String(J),' is not "string" or "null".')))}if(w!=null){var ee=new WeakMap;w.set($,[q,W,ee]),w=ee}}q&&(S=S?q+" "+S:q)}else if(x)R==null&&(R={}),R=Object.assign({},$,R);else{var fe=null;for(var be in $){var je=$[be];je!==void 0&&(_.includes(be)||(je!=null&&(R==null&&(R={}),fe==null&&(fe={}),fe[be]=je),_.push(be),w=null))}fe!=null&&(R=Object.assign(fe,R))}}}var _e=[S,R];return _e}}var f=d();return jO.styleq=f,f.factory=d,jO}var Cje=QXt();const Yv=a=>new Error(`'stylex.${a}' should never be called at runtime. It should be compiled away by '@stylexjs/babel-plugin'`),eu=a=>Yv(`types.${a}`);function Rje(){for(var a=arguments.length,u=new Array(a),d=0;d<a;d++)u[d]=arguments[d];const[f,m]=Cje.styleq(u),g={};return f!=null&&f!==""&&(g.className=f),m!=null&&Object.keys(m).length>0&&(g.style=m),g}function YXt(){const{className:a,style:u}=Rje(...arguments),d={};return a!=null&&a!==""&&(d.class=a),u!=null&&Object.keys(u).length>0&&(d.style=Object.keys(u).map(f=>`${f}:${u[f]};`).join("")),d}function KXt(a){throw Yv("create")}function XXt(a){throw Yv("defineVars")}const JXt=(a,u)=>{throw Yv("createTheme")},ZXt=a=>{throw Yv("include")},eJt=KXt,tJt=XXt,rJt=JXt,nJt=ZXt,iJt={angle:a=>{throw eu("angle")},color:a=>{throw eu("color")},url:a=>{throw eu("url")},image:a=>{throw eu("image")},integer:a=>{throw eu("integer")},lengthPercentage:a=>{throw eu("lengthPercentage")},length:a=>{throw eu("length")},percentage:a=>{throw eu("percentage")},number:a=>{throw eu("number")},resolution:a=>{throw eu("resolution")},time:a=>{throw eu("time")},transformFunction:a=>{throw eu("transformFunction")},transformList:a=>{throw eu("transformList")}},sJt=a=>{throw Yv("keyframes")},oJt=function(){throw Yv("firstThatWorks")};function Lt(){for(var a=arguments.length,u=new Array(a),d=0;d<a;d++)u[d]=arguments[d];const[f]=Cje.styleq(u);return f}Lt.props=Rje;Lt.attrs=YXt;Lt.create=eJt;Lt.defineVars=tJt;Lt.createTheme=rJt;Lt.include=nJt;Lt.keyframes=sJt;Lt.firstThatWorks=oJt;Lt.types=iJt;const g0={default:{padding:"mlydqdrvq",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,borderRadius:"mly4pepcl",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,color:"mly1rs82da",backgroundColor:"mly1jmk7v",maxWidth:"mlyxc7z9f",boxShadow:"mly17fq3gk",zIndex:"mlyhtitgo",$$css:!0},card:{width:"mly1g65f5b",maxHeight:"mly1kbvuzt",zIndex:"mlyhtitgo",$$css:!0}},Fr={largeBody:{fontFamily:"mly1rj5sg5",color:"mly1dhlylr",fontWeight:"mlyo1l8bm",fontSize:"mly1j61zf2",lineHeight:"mly1fc57z9",letterSpacing:"mly12oo3zp",$$css:!0},emphasized:{fontFamily:"mly1rj5sg5",color:"mly1dhlylr",fontWeight:"mly1xlr1w8",fontSize:"mlyif65rj",lineHeight:"mly1fc57z9",letterSpacing:"mly1gu5id8",$$css:!0},body:{fontFamily:"mly1rj5sg5",color:"mly1dhlylr",fontWeight:"mlyo1l8bm",fontSize:"mlyif65rj",lineHeight:"mly1fc57z9",letterSpacing:"mly12oo3zp",$$css:!0},link:{fontFamily:"mly1rj5sg5",color:"mlykfrnou",fontWeight:"mlyo1l8bm",fontSize:"mlyif65rj",lineHeight:"mly1fc57z9",letterSpacing:"mly12oo3zp",$$css:!0},supporting:{fontFamily:"mly1rj5sg5",color:"mly1dhlylr",fontWeight:"mlyo1l8bm",fontSize:"mlyfifm61",lineHeight:"mly1d3mw78",letterSpacing:"mly12oo3zp",$$css:!0},badge:{fontFamily:"mly1rj5sg5",color:"mly183j0n7",fontWeight:"mly1s688f",fontSize:"mlyfifm61",lineHeight:"mly1d3mw78",letterSpacing:"mly1gu5id8",$$css:!0}},aJt=a=>Y.createElement("svg",{width:110,height:110,viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"cahevron_down",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M52.9466923,41.3127809 C54.0529774,40.2742275 55.7502198,40.2309545 56.9057514,41.1829617 L57.0533077,41.3127809 L81.5533077,64.3127809 C82.7612755,65.4467914 82.8212296,67.34534 81.6872191,68.5533077 C80.5968243,69.7148152 78.7995712,69.8149195 77.5890551,68.8127704 L77.4466923,68.6872191 L54.9999906,47.615 L32.5533077,68.6872191 C31.3918003,69.7776139 29.5918121,69.7641211 28.4469384,68.6875913 L28.3127809,68.5533077 C27.2223861,67.3918003 27.2358789,65.5918121 28.3124087,64.4469384 L28.4466923,64.3127809 L52.9466923,41.3127809 Z",id:"Path",fill:"currentColor",fillRule:"nonzero",transform:"translate(55.000000, 55.000005) rotate(-180.000000) translate(-55.000000, -55.000005) "}))),lJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"chevron_left",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M52.9466923,41.3127809 C54.0529774,40.2742275 55.7502198,40.2309545 56.9057514,41.1829617 L57.0533077,41.3127809 L81.5533077,64.3127809 C82.7612755,65.4467914 82.8212296,67.34534 81.6872191,68.5533077 C80.5968243,69.7148152 78.7995712,69.8149195 77.5890551,68.8127704 L77.4466923,68.6872191 L54.9999906,47.615 L32.5533077,68.6872191 C31.3918003,69.7776139 29.5918121,69.7641211 28.4469384,68.6875913 L28.3127809,68.5533077 C27.2223861,67.3918003 27.2358789,65.5918121 28.3124087,64.4469384 L28.4466923,64.3127809 L52.9466923,41.3127809 Z",id:"Path",fill:"currentColor",fillRule:"nonzero",transform:"translate(55.000000, 55.000005) rotate(-90.000000) translate(-55.000000, -55.000005) "}))),uJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"chevron_right",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M52.9466923,41.3127809 C54.0529774,40.2742275 55.7502198,40.2309545 56.9057514,41.1829617 L57.0533077,41.3127809 L81.5533077,64.3127809 C82.7612755,65.4467914 82.8212296,67.34534 81.6872191,68.5533077 C80.5968243,69.7148152 78.7995712,69.8149195 77.5890551,68.8127704 L77.4466923,68.6872191 L54.9999906,47.615 L32.5533077,68.6872191 C31.3918003,69.7776139 29.5918121,69.7641211 28.4469384,68.6875913 L28.3127809,68.5533077 C27.2223861,67.3918003 27.2358789,65.5918121 28.3124087,64.4469384 L28.4466923,64.3127809 L52.9466923,41.3127809 Z",id:"Path",fill:"currentColor",fillRule:"nonzero",transform:"translate(55.000000, 55.000005) rotate(-270.000000) translate(-55.000000, -55.000005) "}))),cJt=a=>Y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:24,viewBox:"0 0 24 24",width:24,...a},Y.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),Y.createElement("path",{fill:"currentColor",d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})),Tje=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"query_clear_hover",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("circle",{className:"circle hoverfill",fill:"transparent",cx:55,cy:55,r:55}),Y.createElement("path",{d:"M78.1428571,25 L85,31.8571429 L61.857,55 L85,78.1428571 L78.1428571,85 L55,61.857 L31.8571429,85 L25,78.1428571 L48.142,55 L25,31.8571429 L31.8571429,25 L55,48.143 L78.1428571,25 Z",className:"cross primaryfill",fill:"currentColor"}))),dJt=a=>Y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...a},Y.createElement("path",{d:"M360-240q-33 0-56.5-23.5T280-320v-480q0-33 23.5-56.5T360-880h360q33 0 56.5 23.5T800-800v480q0 33-23.5 56.5T720-240H360Zm0-80h360v-480H360v480ZM200-80q-33 0-56.5-23.5T120-160v-560h80v560h440v80H200Zm160-240v-480 480Z"})),fJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"query_add",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M75.8285714,28 L82,34.1714286 L61.171,55 L82,75.8285714 L75.8285714,82 L54.999,61.171 L34.1714286,82 L28,75.8285714 L48.828,55 L28,34.1714286 L34.1714286,28 L55,48.829 L75.8285714,28 Z",id:"Combined-Shape-Copy",fill:"currentColor",transform:"translate(55.000000, 55.000000) rotate(-315.000000) translate(-55.000000, -55.000000) ",className:"primaryfill"}))),hJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"5 5 100 100",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"insert_measure",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M64.4079772,43.4952662 C64.4079772,65.775216 64.4079772,77.6781315 64.4079772,79.2040126 C64.4079772,81.4928343 72.4309475,81.4935567 72.4309475,79.2040126 C72.4309475,77.6776499 72.4309475,65.7747344 72.4309475,43.4952662 L82.1242499,53.5032288 C82.9082803,54.3127101 83.9390395,54.7167092 84.9596343,54.7167092 C85.980229,54.7167092 87.0118722,54.3119686 87.7950187,53.5032288 C89.3623612,51.8850077 89.3623612,49.2552488 87.7950187,47.6371608 L71.2655269,30.5703346 C70.8943747,30.1871342 70.4404886,29.8781937 69.9456129,29.6650532 C69.9247535,29.6546561 69.9046123,29.6546561 69.883753,29.6435167 C69.4298852,29.4519166 68.9350096,29.3457171 68.4192709,29.3457171 C67.9035322,29.3457171 67.4086565,29.4519147 66.9547887,29.6435167 C66.9339294,29.6539139 66.9137882,29.6539139 66.8929288,29.6650532 C66.3980532,29.8781937 65.9441854,30.1863928 65.5730149,30.5703346 L49.0328429,47.6474271 C47.4655004,49.2656482 47.4655004,51.8954071 49.0328429,53.5134951 C50.6001855,55.1205753 53.1472623,55.1205753 54.714476,53.5023554 L64.4079772,43.4952662 Z",id:"Path-Copy-3",fill:"currentColor",className:"primaryfill",fillRule:"nonzero",transform:"translate(68.413931, 55.133308) rotate(-270.000000) translate(-68.413931, -55.133308) "}),Y.createElement("rect",{id:"Rectangle-Copy-50",className:"primaryfill",fill:"currentColor",fillRule:"nonzero",transform:"translate(32.019040, 39.025784) rotate(-90.000000) translate(-32.019040, -39.025784) ",x:24.0122609,y:34.8667243,width:16.0135574,height:8.31811859}),Y.createElement("rect",{id:"Rectangle-Copy-51",className:"primaryfill",fill:"currentColor",fillRule:"nonzero",transform:"translate(32.019040, 72.330197) rotate(-90.000000) translate(-32.019040, -72.330197) ",x:24.0122609,y:68.1711376,width:16.0135574,height:8.31811859}),Y.createElement("circle",{id:"Oval-Copy-16",className:"primarystroke",stroke:"currentColor",strokeWidth:7,fillRule:"nonzero",transform:"translate(32.019040, 88.946306) rotate(-180.000000) translate(-32.019040, -88.946306) ",cx:32.0190396,cy:88.9463056,r:9.09652528}),Y.createElement("circle",{id:"Oval-Copy-20",className:"primarystroke",stroke:"currentColor",strokeWidth:7,fillRule:"nonzero",transform:"translate(32.019040, 55.133308) rotate(-90.000000) translate(-32.019040, -55.133308) ",cx:32.0190396,cy:55.1333084,r:9.09652528}),Y.createElement("circle",{id:"Oval-Copy-21",className:"primarystroke",stroke:"currentColor",strokeWidth:7,fillRule:"nonzero",cx:32.0190396,cy:23.2007668,r:9.09652528}))),pJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"insert_filter",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M87.3843313,20.5 C88.0702245,20.5 88.6794354,20.684137 89.1839151,20.9924545 C89.72968,21.3260038 90.1536978,21.8060023 90.4194477,22.364077 C90.6824778,22.9164401 90.7905536,23.5453405 90.7077209,24.1843828 C90.641307,24.6967561 90.4522801,25.21669 90.1181537,25.7073778 L89.9660074,25.9157747 L65.9667297,54.9330833 L65.9667297,86.0952768 C65.9667297,87.3578277 65.3421199,88.3687734 64.46847,88.9512067 C64.0000984,89.2634544 63.4591929,89.4523731 62.9014864,89.49211 C62.4335638,89.5254497 61.9536386,89.4542406 61.4987219,89.2647425 L61.3053966,89.1762469 L45.2981054,81.501442 C44.7448345,81.2248066 44.1940182,80.794047 43.8075879,80.2144017 C43.516589,79.7779032 43.3168206,79.2579753 43.2760203,78.6543848 L43.268304,78.4241163 L43.268304,54.9330833 L19.2778986,25.9265022 C18.8405281,25.4244753 18.5999563,24.8470099 18.5253334,24.2601464 C18.4451968,23.6299215 18.5577673,22.9877736 18.8297244,22.4166636 C19.0989541,21.8512813 19.5239716,21.3563425 20.06756,21.0111708 C20.5069962,20.7321343 21.0239609,20.5500465 21.6001779,20.5088845 L21.8507024,20.5 L87.3843313,20.5 Z M80.4108174,26.9794004 L28.8312662,26.9794004 L49.2106529,51.6044926 L49.3557497,51.8317181 C49.767411,52.5135117 49.9668805,53.1962297 49.9668805,53.8764024 L49.9668805,53.8764024 L49.9668805,76.3587304 L59.2681532,80.9104171 L59.2681532,53.6572264 L59.2765596,53.4785743 C59.3429907,52.7639199 59.7932531,52.0547544 60.2732157,51.568472 L60.2732157,51.568472 L80.4108174,26.9794004 Z",id:"Shape-Copy-2",stroke:"currentColor",fill:"currentColor",className:"primaryfill primarystroke",fillRule:"nonzero"}))),mJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"insert_group_by",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M31.7463881,49.3114698 C32.6824928,49.3083801 33.6154932,49.1963884 34.5261904,48.9793527 L45.0010173,67.8024842 L45.0010173,67.8032565 C43.2956473,70.2493007 42.5480527,73.2367133 42.8986175,76.1988173 C43.2492613,79.1601303 44.6742783,81.890304 46.9033203,83.870708 C49.1330544,85.851903 52.0117188,86.9463056 54.9937928,86.9463056 C57.9758669,86.9463056 60.8545313,85.8518634 63.0834745,83.870708 C65.3132086,81.890304 66.7382058,79.1601303 67.0889682,76.1988173 C67.4396121,73.2369111 66.6919779,70.2493007 64.9865684,67.8032565 L75.4613953,48.980125 L75.4613953,48.9793527 C78.5099046,49.699958 81.7183727,49.2180056 84.4200741,47.6338999 C87.1225664,46.0505653 89.1106817,43.4862425 89.9717699,40.4749053 C90.8328581,37.4635681 90.5008399,34.235723 89.0449384,31.4630387 C87.5882658,28.6903544 85.1197206,26.584791 82.151685,25.5847028 C79.1834516,24.5837248 75.9441385,24.7652355 73.1066007,26.0913707 C70.2688652,27.4167347 68.0507969,29.7848559 66.9138836,32.7028673 L43.0841815,32.7028673 C42.0044302,29.9371034 39.9514417,27.6601133 37.310837,26.3015513 C34.6702324,24.9429696 31.623898,24.5961814 28.7454313,25.32606 C25.8669647,26.0559385 23.3534966,27.8122421 21.6791694,30.2652067 C20.0046839,32.7173803 19.284138,35.6972794 19.6532888,38.644554 C20.021708,41.5910378 21.4544362,44.3012413 23.6819162,46.2662229 C25.9086844,48.2303345 28.776474,49.3139413 31.7460915,49.3115686 L31.7463881,49.3114698 Z M54.9987359,80.3146003 C53.5304767,80.3146003 52.1224442,79.7314725 51.0836021,78.6934213 C50.0455509,77.6545989 49.4624231,76.2465862 49.4624231,74.7782874 C49.4624231,73.3099887 50.0455509,71.9019957 51.0836021,70.8639445 C52.1224245,69.8251221 53.5304372,69.2419944 54.9987359,69.2419944 C56.4670347,69.2419944 57.8750277,69.8251221 58.9138698,70.8639445 C59.951921,71.9019957 60.5350488,73.3099887 60.5350488,74.7782874 C60.5350488,76.2465862 59.951921,77.6545792 58.9138698,78.6934213 C57.8750474,79.7314725 56.4670347,80.3146003 54.9987359,80.3146003 Z M78.2510838,31.5953952 C79.7193431,31.5953952 81.1273755,32.1785229 82.1654268,33.2165742 C83.203478,34.2553966 83.7873769,35.6634093 83.7873769,37.131708 C83.7873769,38.6000068 83.203478,40.0079998 82.1654268,41.046051 C81.1273755,42.0848734 79.7193826,42.6680011 78.2510838,42.6680011 C76.7828246,42.6680011 75.3740012,42.0848734 74.33595,41.046051 C73.2978987,40.0079998 72.714771,38.6000068 72.714771,37.131708 C72.714771,35.6634093 73.2978987,34.2554163 74.33595,33.2165742 C75.3740012,32.1785229 76.7827851,31.5953952 78.2510838,31.5953952 Z M43.7166018,39.3459801 L66.2808701,39.3459801 C66.7149337,41.7696815 67.8734779,44.0047541 69.6028318,45.75738 L59.7591401,63.5727121 C56.7137943,62.2774614 53.2720118,62.2774614 50.2258752,63.5727121 L40.3380911,45.75738 C42.0882652,44.0118524 43.2661865,41.7758109 43.7156132,39.3459801 L43.7166018,39.3459801 Z M31.7465858,31.5953952 C33.214845,31.5953952 34.6236684,32.1785229 35.6617196,33.2165742 C36.6997709,34.2553966 37.2828986,35.6634093 37.2828986,37.131708 C37.2828986,38.6000068 36.6997709,40.0079998 35.6617196,41.046051 C34.6236684,42.0848734 33.2148846,42.6680011 31.7465858,42.6680011 C30.2783266,42.6680011 28.8702941,42.0848734 27.8322428,41.046051 C26.7941916,40.0079998 26.2102927,38.6000068 26.2102927,37.131708 C26.2102927,35.6634093 26.7941916,34.2554163 27.8322428,33.2165742 C28.8702941,32.1785229 30.278287,31.5953952 31.7465858,31.5953952 L31.7465858,31.5953952 Z",id:"Shape-Copy-3",fill:"currentColor",fillRule:"nonzero",className:"primaryfill"}))),gJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"insert_limit",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("rect",{id:"Rectangle-Copy-46",className:"primaryfill",fill:"currentColor",x:24,y:23,width:61.9377906,height:8,rx:4}),Y.createElement("rect",{id:"Rectangle-Copy-47",className:"primaryfill",fill:"currentColor",x:24,y:39,width:61.9377906,height:8,rx:4}),Y.createElement("rect",{id:"Rectangle-Copy-48",className:"primaryfill",fill:"currentColor",x:24,y:55,width:53.5,height:8,rx:4}),Y.createElement("rect",{id:"Rectangle-Copy-49",className:"primaryfill",fill:"currentColor",x:24,y:71.1904762,width:40,height:7.61904762,rx:3.80952381}),Y.createElement("path",{d:"M77.1113683,65.3807638 L87.6203313,83.396129 C87.8986116,83.8731809 87.7374754,84.4854986 87.2604234,84.7637789 C87.1074874,84.8529916 86.933607,84.9 86.7565524,84.9 L65.7386264,84.9 C65.1863417,84.9 64.7386264,84.4522847 64.7386264,83.9 C64.7386264,83.7229454 64.7856348,83.549065 64.8748475,83.396129 L75.3838105,65.3807638 C75.6620908,64.9037119 76.2744085,64.7425757 76.7514604,65.020856 C76.9004641,65.1077747 77.0244495,65.2317602 77.1113683,65.3807638 Z",id:"Triangle-Copy-2",fill:"currentColor",className:"primaryfill",transform:"translate(76.247589, 74.400000) rotate(-90.000000) translate(-76.247589, -74.400000) "}))),xJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"insert_nest",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M27.3181186,27 C29.5272576,27 31.3181186,28.790861 31.3181186,31 L31.318,59.317 L72.9431634,59.317258 L62.9360743,49.6237568 C61.3178543,48.0565431 61.3178543,45.5094664 62.9249345,43.9421238 C64.5430225,42.3747812 67.1727815,42.3747812 68.7910025,43.9421238 L68.7910025,43.9421238 L85.8680951,60.4822957 C86.2520369,60.8534663 86.560236,61.307334 86.7733764,61.8022097 C86.7845158,61.823069 86.7845158,61.8432103 86.7949129,61.8640696 C86.986515,62.3179374 87.0927126,62.812813 87.0927126,63.3285517 C87.0927126,63.8442904 86.9865131,64.3391661 86.7949129,64.7930338 C86.7837736,64.8138932 86.7837736,64.8340344 86.7733764,64.8548938 C86.560236,65.3497694 86.2512954,65.8036556 85.8680951,66.1748077 L85.8680951,66.1748077 L68.8012688,82.7042995 C67.1831809,84.2716421 64.5534219,84.2716421 62.9352009,82.7042995 C62.1264611,81.921153 61.7217204,80.8895099 61.7217204,79.8689151 C61.7217204,78.8483204 62.1257196,77.8175611 62.9352009,77.0335308 L62.9352009,77.0335308 L72.9431634,67.3402284 L27.234417,67.3402284 C25.2840646,67.3402284 23.6511005,66.037955 23.2100653,64.2817501 C23.0737364,63.8793045 23,63.4482633 23,63 L23,31 C23,28.790861 24.790861,27 27,27 L27.3181186,27 Z",id:"Combined-Shape-Copy",fill:"currentColor",className:"primaryfill",fillRule:"nonzero"}))),yJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"10 10 90 90",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"insert_order_by",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M30.5506412,37.7046734 L30.5506412,81.9762916 C30.5506412,84.1931505 32.3445678,85.9877768 34.5621264,85.9877768 C36.7789852,85.9877768 38.5736115,84.1938502 38.5736115,81.9762916 L38.5736115,37.7046734 L48.2669139,47.3979757 C49.0509443,48.1820061 50.0817035,48.5733031 51.1022983,48.5733031 C52.122893,48.5733031 53.1545362,48.1812879 53.9376827,47.3979757 C55.5050252,45.8306331 55.5050252,43.2835564 53.9376827,41.7163427 L37.4081909,25.1861143 C37.0370387,24.8149622 36.5831526,24.515735 36.0882769,24.3092959 C36.0674175,24.2992257 36.0472763,24.2992257 36.026417,24.2884366 C35.5725492,24.1028605 35.0776736,24 34.5619349,24 C34.0461961,24 33.5513205,24.1028586 33.0974527,24.2884366 C33.0765934,24.2985068 33.0564522,24.2985068 33.0355928,24.3092959 C32.5407172,24.515735 32.0868494,24.814244 31.7156789,25.1861143 L15.1755069,41.7262862 C13.6081644,43.2936288 13.6081644,45.8407055 15.1755069,47.4079192 C16.7428495,48.9644712 19.2899263,48.9644712 20.85714,47.3971298 L30.5506412,37.7046734 Z",id:"Path-Copy",fill:"currentColor",fillRule:"nonzero",className:"primaryfill"}),Y.createElement("path",{d:"M79.9439284,72.2964315 L79.9439284,28.0137648 C79.9439284,25.796906 78.1500018,24.0022797 75.9324432,24.0022797 C73.7155844,24.0022797 71.920958,25.7962062 71.920958,28.0137648 L71.920958,72.2853831 L62.2276557,62.5920808 C60.6603131,61.0247382 58.1233641,61.0247382 56.5460227,62.5920808 C54.9786801,64.1594234 54.9786801,66.7065001 56.5460227,68.2737138 L73.0861946,84.8138857 C73.4573467,85.1850378 73.9112329,85.484265 74.4061086,85.6907041 C74.4269679,85.7007743 74.4471091,85.7007743 74.4679685,85.7115634 C74.9218362,85.8971395 75.4167119,86 75.9324506,86 C76.4481893,86 76.943065,85.8971414 77.3969327,85.7115634 C77.4177921,85.7014932 77.4379333,85.7014932 77.4587926,85.6907041 C77.9536683,85.484265 78.407536,85.185756 78.7787066,84.8138857 L95.3188785,68.2737138 C96.8862211,66.7063712 96.8862211,64.1592945 95.3188785,62.5920808 C93.7515359,61.0355288 91.2044592,61.0355288 89.6372455,62.6028702 L79.9439284,72.2964315 Z",id:"Path-Copy-2",className:"primaryfill",fill:"currentColor",fillRule:"nonzero"}))),vJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"0 0 25 25",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("title",null,"join_icon_one_to_many"),Y.createElement("g",{id:"join_icon_one_to_many",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"Group",transform:"translate(12.759300, 12.500000) rotate(-180.000000) translate(-12.759300, -12.500000) translate(4.000000, 3.712487)",fill:"currentColor"},Y.createElement("polygon",{id:"Path-Copy-15",fillRule:"nonzero",transform:"translate(6.382256, 8.736227) scale(-1, 1) rotate(180.000000) translate(-6.382256, -8.736227) ",points:"2.80570594 3.41828749 3.48860316 2.68777302 9.95880577 8.73622728 3.48860316 14.7846815 2.80570594 14.0541671 8.494 8.736"}),Y.createElement("rect",{id:"Rectangle-Copy-91",transform:"translate(2.000000, 2.000000) scale(-1, 1) translate(-2.000000, -2.000000) ",x:0,y:0,width:4,height:4}),Y.createElement("rect",{id:"Rectangle-Copy-92",transform:"translate(2.000000, 8.736227) scale(-1, 1) translate(-2.000000, -8.736227) ",x:0,y:6.73622728,width:4,height:4}),Y.createElement("rect",{id:"Rectangle-Copy-86",transform:"translate(15.518600, 8.736227) scale(-1, 1) translate(-15.518600, -8.736227) ",x:13.5186005,y:6.73622728,width:4,height:4}),Y.createElement("rect",{id:"Rectangle-Copy-87",transform:"translate(2.000000, 15.575026) scale(-1, 1) translate(-2.000000, -15.575026) ",x:0,y:13.5750258,width:4,height:4}),Y.createElement("polygon",{id:"Line-3-Copy-68",fillRule:"nonzero",transform:"translate(8.495445, 8.736227) scale(-1, 1) translate(-8.495445, -8.736227) ",points:"14.9954453 8.23622728 14.9954453 9.23622728 1.99544525 9.23622728 1.99544525 8.23622728"})))),bJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"0 0 25 25",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("title",null,"join_icon_many_to_one"),Y.createElement("g",{id:"join_icon_many_to_one",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("polygon",{id:"Path-Copy-14",fill:"currentColor",fillRule:"nonzero",transform:"translate(10.382256, 12.736227) scale(-1, 1) rotate(180.000000) translate(-10.382256, -12.736227) ",points:"6.80570594 7.41828749 7.48860316 6.68777302 13.9588058 12.7362273 7.48860316 18.7846815 6.80570594 18.0541671 12.494 12.736"}),Y.createElement("rect",{id:"Rectangle-Copy-90",fill:"currentColor",x:4,y:4,width:4,height:4}),Y.createElement("rect",{id:"Rectangle-Copy-89",fill:"currentColor",x:4,y:10.7362273,width:4,height:4}),Y.createElement("rect",{id:"Rectangle-Copy-85",fill:"currentColor",x:17.5186005,y:10.7362273,width:4,height:4}),Y.createElement("rect",{id:"Rectangle-Copy-84",fill:"currentColor",x:4,y:17.5750258,width:4,height:4}),Y.createElement("polygon",{id:"Line-3-Copy-67",fill:"currentColor",fillRule:"nonzero",points:"18.9954453 12.2362273 18.9954453 13.2362273 5.99544525 13.2362273 5.99544525 12.2362273"}))),EJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"0 0 25 25",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("title",null,"join_icon_one_to_one"),Y.createElement("g",{id:"join_icon_one_to_one",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("rect",{id:"Rectangle-Copy-89",fill:"currentColor",x:4,y:10.7362273,width:4,height:4}),Y.createElement("rect",{id:"Rectangle-Copy-85",fill:"currentColor",x:17.5186005,y:10.7362273,width:4,height:4}),Y.createElement("polygon",{id:"Line-3-Copy-67",fill:"currentColor",fillRule:"nonzero",points:"18.9954453 12.2362273 18.9954453 13.2362273 5.99544525 13.2362273 5.99544525 12.2362273"}))),_Jt=a=>Y.createElement("svg",{width:"78px",height:"73px",viewBox:"-5 -10 90 90",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("title",null,"database_b"),Y.createElement("g",{id:"icons",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"database_b",transform:"translate(-0.000189, 0.800000)",fill:"currentColor",fillRule:"nonzero"},Y.createElement("g",{id:"Shape-2"},Y.createElement("path",{d:"M38.9978747,0 C49.4323909,0 58.8817175,1.35601948 65.8935492,3.63769481 C69.399635,4.77856169 72.3064537,6.14483766 74.4415973,7.78792208 C76.5767408,9.43100649 78,11.4644805 78,13.7176948 L78,59.1428571 C77.5289095,61.1095617 75.9098694,63.0619481 74.4415973,64.2103247 C72.3064537,65.8534091 69.3994651,67.2213799 65.8935492,68.3623052 C58.8808682,70.6440097 49.4317114,72 38.9978747,72 C28.564038,72 19.1123333,70.6439805 12.0988029,68.3623052 C8.59271719,67.2214383 5.68589845,65.8534091 3.55075491,64.2103247 C1.77316722,62.6163312 0.466092472,61.0553571 0.000162359918,59.1428571 L0.000162359918,12.826461 C-0.00497251122,12.4857468 0.111806422,12.1513003 0.334077073,11.8687938 C0.867540225,10.3512127 2.01808874,8.96790097 3.55089079,7.78869643 C5.68603434,6.14561201 8.59302294,4.77924838 12.0989388,3.63846916 C19.1116199,1.35676461 28.562815,0.000774350649 38.9980106,0.000774350649 L38.9978747,0 Z M38.9980026,4.39968547 C29.1795807,4.39968547 20.2971169,5.97898133 14.0341392,8.43960024 C10.9023181,9.66989245 8.43317659,11.1339692 6.85248078,12.602151 C3.94393403,15.3862114 4.29446142,18.3655235 6.85248078,20.7802963 C8.43327627,22.2484263 10.9024843,23.7104505 14.0341392,24.9407772 C20.2982797,27.4014306 29.1795807,28.9827618 38.9980026,28.9827618 C48.8164245,28.9827618 57.7038721,27.4014306 63.968511,24.9407772 C67.1003321,23.710485 69.5714672,22.2484781 71.152163,20.7802963 C74.08729,18.0024452 73.4953805,14.8214996 71.152163,12.602151 C69.5713675,11.1340209 67.100166,9.66992695 63.968511,8.43960024 C57.705035,5.97894683 48.8172551,4.39968547 38.9980026,4.39968547 Z M73.3181233,24.4886668 C71.264963,26.4046321 68.5511168,28.0180283 65.3038377,29.3722628 C58.4452957,32.2325658 49.203832,33.9324103 38.9993316,33.9324103 C28.7948312,33.9324103 19.5508756,32.2325291 12.691503,29.3722628 C9.44422385,28.0179367 6.73170664,26.4046321 4.67921092,24.4886668 L4.67921092,34.5578783 C4.85118531,35.7254798 5.51373193,36.9581006 6.85314528,38.278818 C8.43394077,39.8377628 10.9031488,41.3838137 14.0348037,42.6902452 C20.2989442,45.3031082 29.1802452,46.9886668 38.9986671,46.9886668 C48.817089,46.9886668 57.7045366,45.3030899 63.9691755,42.6902452 C67.1009966,41.3838503 69.5721317,39.8378178 71.1528275,38.278818 C72.4811934,36.9688517 73.1398693,35.7461761 73.3189539,34.5871829 L73.3181233,24.4886668 Z M73.3181233,43.1016944 C71.264963,44.782251 68.5517813,46.1967717 65.3038377,47.3852582 C58.4452957,49.8941247 49.203832,51.3851147 38.9993316,51.3851147 C28.7948312,51.3851147 19.5508756,49.8940926 12.691503,47.3852582 C9.44422385,46.197334 6.73170664,44.7841788 4.67921092,43.1036222 L4.67921092,55.7057886 C4.85118531,56.7299305 5.51373193,57.811103 6.85314528,58.9695481 C8.43394077,60.3369502 10.9031488,61.6911148 14.0348037,62.8370291 C20.2989442,65.1288579 29.1802452,66.6016944 38.9986671,66.6016944 C48.817089,66.6016944 57.7045366,65.1288579 63.9691755,62.8370291 C67.1009966,61.6911469 69.5721317,60.3369984 71.1528275,58.9695481 C72.4811934,57.8205331 73.1398693,56.7480839 73.3189539,55.7314925 L73.3181233,43.1016944 Z",id:"Shape"}))))),pLe=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"2.5 2.5 11 11",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"type-icon-number",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M12,7 L12,6 L10,6 L10,4 L9,4 L9,6 L7,6 L7,4 L6,4 L6,6 L4,6 L4,7 L6,7 L6,9 L4,9 L4,10 L6,10 L6,12 L7,12 L7,10 L9,10 L9,12 L10,12 L10,10 L12,10 L12,9 L10,9 L10,7 L12,7 Z M9,9 L7,9 L7,7 L9,7 L9,9 Z",id:"Shape-Copy-21",fill:"currentColor",fillRule:"nonzero"}))),SJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"3.5 3.5 9 9",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"type-icon-projection",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M11.3362588,4 L11.3362588,12 L8,9.90676786 L4.6637412,12 L4.6637412,4 L11.3362588,4 Z M10.336,5 L5.663,5 L5.663,10.191 L8,8.72623637 L10.336,10.191 L10.336,5 Z",id:"Rectangle",fill:"currentColor",className:"primaryfill",fillRule:"nonzero"}))),mLe=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"3.5 3.5 9 9",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"type-icon-string",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M4.8045,10.45 L5.2245,9.253 L7.1425,9.253 L7.5625,10.45 L8.6055,10.45 L6.7225,5.438 L5.6375,5.438 L3.7615,10.45 L4.8045,10.45 Z M6.8345,8.385 L5.5255,8.385 L5.9735,7.125 L6.1555,6.523 L6.2115,6.523 L6.3935,7.125 L6.8345,8.385 Z M10.2505,10.562 C10.4791667,10.562 10.681,10.5176667 10.856,10.429 C11.031,10.3403333 11.1721667,10.226 11.2795,10.086 L11.2795,10.086 L11.3355,10.086 L11.3355,10.45 L12.2385,10.45 L12.2385,8.252 C12.2385,7.76666667 12.0961667,7.398 11.8115,7.146 C11.5268333,6.894 11.1115,6.768 10.5655,6.768 C10.2575,6.768 9.97283333,6.82866667 9.7115,6.95 C9.45016667,7.07133333 9.23316667,7.244 9.0605,7.468 L9.0605,7.468 L9.6485,7.93 C9.75116667,7.804 9.88066667,7.7025 10.037,7.6255 C10.1933333,7.5485 10.3555,7.51 10.5235,7.51 C10.7708333,7.51 10.968,7.57066667 11.115,7.692 C11.262,7.81333333 11.3355,7.972 11.3355,8.168 L11.3355,8.168 L11.3355,8.322 C11.0741667,8.21466667 10.7591667,8.161 10.3905,8.161 C10.1245,8.161 9.88183333,8.21 9.6625,8.308 C9.44316667,8.406 9.2705,8.546 9.1445,8.728 C9.0185,8.91 8.9555,9.12 8.9555,9.358 C8.9555,9.71733333 9.07683333,10.0078333 9.3195,10.2295 C9.56216667,10.4511667 9.8725,10.562 10.2505,10.562 Z M10.4675,9.848 C10.2761667,9.848 10.1291667,9.8025 10.0265,9.7115 C9.92383333,9.6205 9.8725,9.50266667 9.8725,9.358 C9.8725,9.00333333 10.1105,8.826 10.5865,8.826 C10.8478333,8.826 11.0975,8.882 11.3355,8.994 C11.3355,9.22266667 11.2573333,9.42216667 11.101,9.5925 C10.9446667,9.76283333 10.7335,9.848 10.4675,9.848 Z",id:"Aa-Copy",fill:"currentColor",fillRule:"nonzero"}))),AJt=a=>Y.createElement("svg",{fill:"none",height:15,viewBox:"0 0 15 15",width:15,xmlns:"http://www.w3.org/2000/svg",...a},Y.createElement("path",{clipRule:"evenodd",d:"m2.5 2c-.27614 0-.5.22386-.5.5v10c0 .2761.22386.5.5.5h2c.27614 0 .5-.2239.5-.5s-.22386-.5-.5-.5h-1.5v-9h1.5c.27614 0 .5-.22386.5-.5s-.22386-.5-.5-.5zm8 0c-.2761 0-.5.22386-.5.5s.2239.5.5.5h1.5v9h-1.5c-.2761 0-.5.2239-.5.5s.2239.5.5.5h2c.2761 0 .5-.2239.5-.5v-10c0-.27614-.2239-.5-.5-.5zm-4.5 5h-1v1h1zm1 0h1v1h-1zm3 0h-1v1h1z",fill:"currentColor",fillRule:"evenodd"})),CJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"2.5 2.5 11 11",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"type-icon-on-off",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"Group-Copy",transform:"translate(4.295444, 4.604157)",fill:"currentColor",fillRule:"nonzero"},Y.createElement("path",{d:"M1.61912392,3.08712961 L5.78998715,3.08712961 C6.6842046,3.08712961 7.40911107,2.39605211 7.40911107,1.54356481 C7.40911107,0.691077503 6.6842046,0 5.78998715,0 L1.61912392,0 C0.724906472,0 0,0.691077503 0,1.54356481 C0,2.39605211 0.724906472,3.08712961 1.61912392,3.08712961 Z M1.61912392,0.617425922 L5.78998715,0.617425922 C6.32651762,0.617425922 6.7614615,1.03207242 6.7614615,1.54356481 C6.7614615,2.05505719 6.32651762,2.46970369 5.78998715,2.46970369 L1.61912392,2.46970369 C1.08259345,2.46970369 0.647649569,2.05505719 0.647649569,1.54356481 C0.647649569,1.03207242 1.08259345,0.617425922 1.61912392,0.617425922 Z",id:"Shape-Copy-20"}),Y.createElement("path",{d:"M1.83745135,2.13685198 C2.08762004,2.13888594 2.31428875,1.98975367 2.4114368,1.75920941 C2.50858486,1.52866515 2.45700749,1.2622842 2.28082919,1.08466199 C2.10465088,0.907039785 1.83869956,0.853289683 1.60736972,0.948552441 C1.37603988,1.0438152 1.22505383,1.26925874 1.22505383,1.51943543 C1.22505383,1.85847446 1.49842318,2.13409557 1.83745135,2.13685198 L1.83745135,2.13685198 Z",id:"Path-Copy-14"}),Y.createElement("path",{d:"M5.78998714,3.70455553 L1.6191239,3.70455553 C0.724906454,3.70455553 0,4.39563305 0,5.24812034 C0,6.10060763 0.724906454,6.79168514 1.6191239,6.79168514 L5.78998714,6.79168514 C6.68420459,6.79168514 7.40911107,6.10060764 7.40911107,5.24812034 C7.40911107,4.39563304 6.68420459,3.70455553 5.78998714,3.70455553 L5.78998714,3.70455553 Z M5.78998714,6.17425922 L1.6191239,6.17425922 C1.08259342,6.17425922 0.647649538,5.75961272 0.647649538,5.24812034 C0.647649538,4.73662796 1.08259342,4.32198146 1.6191239,4.32198146 L5.78998714,4.32198146 C6.32651761,4.32198146 6.7614615,4.73662796 6.7614615,5.24812034 C6.7614615,5.75961272 6.32651761,6.17425922 5.78998714,6.17425922 L5.78998714,6.17425922 Z",id:"Shape-Copy-21"}),Y.createElement("path",{d:"M5.54392378,4.67774545 C5.2937551,4.6757115 5.06708639,4.82484377 4.96993833,5.05538803 C4.87279028,5.28593228 4.92436765,5.55231324 5.10054595,5.72993544 C5.27672426,5.90755765 5.54267558,5.96130775 5.77400542,5.86604499 C6.00533526,5.77078224 6.15632131,5.5453387 6.15632131,5.295162 C6.15632131,4.95612297 5.88295196,4.68050187 5.54392378,4.67774545 Z",id:"Path-Copy-15"})))),RJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"3.5 3.5 9 9",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"type-icon-date",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"Group-Copy-22",transform:"translate(4.753763, 4.094719)",fill:"currentColor",fillRule:"nonzero"},Y.createElement("path",{d:"M5.84322609,0.649247344 L5.51860242,0.649247344 L5.51860242,0 L4.86935508,0 L4.86935508,0.649247344 L1.62311836,0.649247344 L1.62311836,0 L0.973871015,0 L0.973871015,0.649247344 L0.649247344,0.649247344 C0.292161305,0.649247344 0,0.941408648 0,1.29849469 L0,6.49247344 C0,6.84955947 0.292161305,7.14172078 0.649247344,7.14172078 L5.84322609,7.14172078 C6.20031213,7.14172078 6.49247344,6.84955947 6.49247344,6.49247344 L6.49247344,1.29849469 C6.49247344,0.941408648 6.20031213,0.649247344 5.84322609,0.649247344 Z M5.84322609,6.49247344 L0.649247344,6.49247344 L0.649247344,2.2723657 L5.84322609,2.2723657 L5.84322609,6.49247344 Z",id:"Shape"})))),TJt=a=>Y.createElement("svg",{fill:"none",height:15,viewBox:"0 0 15 15",width:15,xmlns:"http://www.w3.org/2000/svg",...a},Y.createElement("g",{clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"},Y.createElement("path",{d:"m3 3.5c0-.82843.67157-1.5 1.5-1.5h1c.27614 0 .5.22386.5.5s-.22386.5-.5.5h-1c-.27614 0-.5.22386-.5.5v2.88197c0 .43292-.18638.83753-.49993 1.11803.31355.2805.49993.68511.49993 1.11803v2.88197c0 .2761.22386.5.5.5h1c.27614 0 .5.2239.5.5s-.22386.5-.5.5h-1c-.82843 0-1.5-.6716-1.5-1.5v-2.88197c0-.18938-.107-.36251-.27639-.44721l-.44722-.22361c-.16939-.08469-.27639-.25782-.27639-.44721s.107-.36252.27639-.44721l.44722-.22361c.16939-.0847.27639-.25783.27639-.44721z"}),Y.createElement("path",{d:"m12 3.5c0-.82843-.6716-1.5-1.5-1.5h-1c-.27614 0-.5.22386-.5.5s.22386.5.5.5h1c.2761 0 .5.22386.5.5v2.88197c0 .43292.1864.83753.4999 1.11803-.3135.2805-.4999.68511-.4999 1.11803v2.88197c0 .2761-.2239.5-.5.5h-1c-.27614 0-.5.2239-.5.5s.22386.5.5.5h1c.8284 0 1.5-.6716 1.5-1.5v-2.88197c0-.18938.107-.36251.2764-.44721l.4472-.22361c.1694-.08469.2764-.25782.2764-.44721s-.107-.36252-.2764-.44721l-.4472-.22361c-.1694-.0847-.2764-.25783-.2764-.44721z"}))),wJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"2.5 2.5 11 11",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"type-icon-number",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M12,7 L12,6 L10,6 L10,4 L9,4 L9,6 L7,6 L7,4 L6,4 L6,6 L4,6 L4,7 L6,7 L6,9 L4,9 L4,10 L6,10 L6,12 L7,12 L7,10 L9,10 L9,12 L10,12 L10,10 L12,10 L12,9 L10,9 L10,7 L12,7 Z M9,9 L7,9 L7,7 L9,7 L9,9 Z",id:"Shape-Copy-21",fill:"currentColor",fillRule:"nonzero"}))),OJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"3.5 3.5 9 9",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"type-icon-projection",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M11.3362588,4 L11.3362588,12 L8,9.90676786 L4.6637412,12 L4.6637412,4 L11.3362588,4 Z M10.336,5 L5.663,5 L5.663,10.191 L8,8.72623637 L10.336,10.191 L10.336,5 Z",id:"Rectangle",fill:"currentColor",className:"primaryfill",fillRule:"nonzero"}))),NJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"3.5 3.5 9 9",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"type-icon-projection",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M11.3362588,4 L11.3362588,12 L8,9.90676786 L4.6637412,12 L4.6637412,4 L11.3362588,4 Z",id:"Rectangle",fill:"currentColor",className:"primaryfill",fillRule:"nonzero"}))),DJt=a=>Y.createElement("svg",{fill:"none",height:110,viewBox:"1 1 12.5 12.5",width:15,xmlns:"http://www.w3.org/2000/svg",...a},Y.createElement("path",{clipRule:"evenodd",d:"m2 5.5c0-.27614.22386-.5.5-.5h2c.27614 0 .5.22386.5.5s-.22386.5-.5.5h-1.5v1h1.5c.27614 0 .5.22386.5.5v2c0 .27614-.22386.5-.5.5h-2c-.27614 0-.5-.22386-.5-.5s.22386-.5.5-.5h1.5v-1h-1.5c-.27614 0-.5-.22386-.5-.5zm4 0c0-.27614.22386-.5.5-.5h2c.27614 0 .5.22386.5.5v4.5h.5c.27614 0 .5.2239.5.5s-.22386.5-.5.5h-1c-.27614 0-.5-.2239-.5-.5v-.5h-1.5c-.27614 0-.5-.22386-.5-.5zm2 3.5h-1v-3h1zm2.5-4c.2761 0 .5.22386.5.5v3.5h1.5c.2761 0 .5.22386.5.5s-.2239.5-.5.5h-2c-.2761 0-.5-.22386-.5-.5v-4c0-.27614.2239-.5.5-.5z",fill:"currentColor",fillRule:"evenodd"})),kJt=a=>Y.createElement("svg",{fill:"none",height:15,viewBox:"0 0 15 15",width:15,xmlns:"http://www.w3.org/2000/svg",...a},Y.createElement("g",{fill:"currentColor"},Y.createElement("path",{d:"m4.5 7.5c0 .55228-.44772 1-1 1s-1-.44772-1-1 .44772-1 1-1 1 .44772 1 1z"}),Y.createElement("path",{d:"m8.5 7.5c0 .55228-.44772 1-1 1s-1-.44772-1-1 .44772-1 1-1 1 .44772 1 1z"}),Y.createElement("path",{d:"m11.5 8.5c.5523 0 1-.44772 1-1s-.4477-1-1-1-1 .44772-1 1 .4477 1 1 1z"}))),LJt=a=>Y.createElement("svg",{fill:"none",height:110,viewBox:"3 3 9 9",width:15,xmlns:"http://www.w3.org/2000/svg",...a},Y.createElement("path",{clipRule:"evenodd",d:"m4.74513 11.5809 6.48017-3.64512c.3398-.19115.3398-.68043 0-.87158l-6.48017-3.64507c-.3333-.18749-.74513.05337-.74513.43578v7.29019c0 .3824.41183.6232.74513.4358zm.25487-6.87106v5.58026l4.96027-2.79011z",fill:"currentColor",fillRule:"evenodd"})),IJt=a=>Y.createElement("svg",{height:16,viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...a},Y.createElement("circle",{cx:8,cy:8,r:8,fill:"currentColor"}),Y.createElement("circle",{cx:8,cy:8,r:4,fill:"#FFFFFF"})),PJt=a=>Y.createElement("svg",{height:16,viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...a},Y.createElement("circle",{cx:8,cy:8,r:8,fill:"currentColor"}),Y.createElement("circle",{cx:8,cy:8,r:7,fill:"#FFFFFF"})),jJt=a=>Y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...a},Y.createElement("path",{d:"m40-120 440-760 440 760H40Zm138-80h604L480-720 178-200Zm302-40q17 0 28.5-11.5T520-280q0-17-11.5-28.5T480-320q-17 0-28.5 11.5T440-280q0 17 11.5 28.5T480-240Zm-40-120h80v-200h-80v200Zm40-100Z"})),FJt=a=>Y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...a},Y.createElement("path",{d:"m424-296 282-282-56-56-226 226-114-114-56 56 170 170Zm56 216q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"})),MJt=a=>Y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...a},Y.createElement("path",{d:"M440-280h80v-240h-80v240Zm40-320q17 0 28.5-11.5T520-640q0-17-11.5-28.5T480-680q-17 0-28.5 11.5T440-640q0 17 11.5 28.5T480-600Zm0 520q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"})),$Jt=a=>Y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...a},Y.createElement("path",{d:"M480-280q17 0 28.5-11.5T520-320q0-17-11.5-28.5T480-360q-17 0-28.5 11.5T440-320q0 17 11.5 28.5T480-280Zm-40-160h80v-240h-80v240ZM330-120 120-330v-300l210-210h300l210 210v300L630-120H330Zm34-80h232l164-164v-232L596-760H364L200-596v232l164 164Zm116-280Z"})),BJt=a=>Y.createElement("svg",{height:20,viewBox:"0 0 20 20",width:20,xmlns:"http://www.w3.org/2000/svg",...a},Y.createElement("g",{fill:"none",stroke:"currentColor"},Y.createElement("path",{d:"m17.08 11.15c.01.16.02.32.02.49 0 3.89-3.16 7.05-7.05 7.05-3.89-.01-7.05-3.16-7.05-7.06 0-3.89 3.16-7.05 7.05-7.05.85 0 1.66.15 2.41.42",strokeWidth:1.1}),Y.createElement("path",{d:"m9.9 2 2.89 2.89-3 3.01"}))),qJt=a=>Y.createElement("svg",{height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",stroke:"none",...a},Y.createElement("path",{fill:"currentColor",stroke:"none",d:"m20 24h-16c-2.2 0-4-1.8-4-4v-16c0-2.2 1.8-4 4-4h16c2.2 0 4 1.8 4 4v16c0 2.2-1.8 4-4 4zm-16-22c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-16c0-1.1-.9-2-2-2z"}),Y.createElement("path",{fill:"currentColor",d:"m8 24c-.6 0-1-.4-1-1v-22c0-.6.4-1 1-1s1 .4 1 1v22c0 .6-.4 1-1 1z"}),Y.createElement("path",{fill:"currentColor",d:"m14 13c-.3 0-.5-.1-.7-.3-.4-.4-.4-1 0-1.4l3-3c.4-.4 1-.4 1.4 0s.4 1 0 1.4l-3 3c-.2.2-.4.3-.7.3z"}),Y.createElement("path",{fill:"currentColor",d:"m17 16c-.3 0-.5-.1-.7-.3l-3-3c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l3 3c.4.4.4 1 0 1.4-.2.2-.4.3-.7.3z"})),UJt=a=>Y.createElement("svg",{fill:"none",height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...a},Y.createElement("path",{d:"m11 8h10m-10 0c0 1.65685-1.34315 3-3 3s-3-1.34315-3-3m6 0c0-1.65685-1.34315-3-3-3s-3 1.34315-3 3m0 0h-2m10 8h-10m10 0c0-1.6569 1.3431-3 3-3s3 1.3431 3 3m-6 0c0 1.6569 1.3431 3 3 3s3-1.3431 3-3m0 0h2",stroke:"currentColor",strokeWidth:1.5})),zJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_bar_chart",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"Group-3",transform:"translate(20.000000, 24.000000)",fill:"currentColor"},Y.createElement("g",{id:"Group-2",transform:"translate(34.500000, 31.000000) rotate(-270.000000) translate(-34.500000, -31.000000) translate(3.500000, -3.500000)"},Y.createElement("path",{d:"M-26.056314,30.056314 L34.943686,30.056314 C37.152825,30.056314 38.943686,31.847175 38.943686,34.056314 L38.943686,34.943686 C38.943686,37.152825 37.152825,38.943686 34.943686,38.943686 L-26.056314,38.943686 C-28.265453,38.943686 -30.056314,37.152825 -30.056314,34.943686 L-30.056314,34.056314 C-30.056314,31.847175 -28.265453,30.056314 -26.056314,30.056314 Z",id:"Rectangle-Copy-59",transform:"translate(4.443686, 34.500000) rotate(-90.000000) translate(-4.443686, -34.500000) "}),Y.createElement("path",{d:"M-0.491247385,37.8466366 L44.9281075,37.8466366 C47.1372465,37.8466366 48.9281075,39.6374976 48.9281075,41.8466366 L48.9281075,42.7340086 C48.9281075,44.9431476 47.1372465,46.7340086 44.9281075,46.7340086 L-0.491247385,46.7340086 C-2.70038638,46.7340086 -4.49124739,44.9431476 -4.49124739,42.7340086 L-4.49124739,41.8466366 C-4.49124739,39.6374976 -2.70038638,37.8466366 -0.491247385,37.8466366 Z",id:"Rectangle-Copy-62",transform:"translate(22.218430, 42.290323) rotate(-90.000000) translate(-22.218430, -42.290323) "}),Y.createElement("path",{d:"M23.3837854,43.9469253 L56.6025627,43.9469253 C58.8117017,43.9469253 60.6025627,45.7377863 60.6025627,47.9469253 L60.6025627,48.8342973 C60.6025627,51.0434363 58.8117017,52.8342973 56.6025627,52.8342973 L23.3837854,52.8342973 C21.1746464,52.8342973 19.3837854,51.0434363 19.3837854,48.8342973 L19.3837854,47.9469253 C19.3837854,45.7377863 21.1746464,43.9469253 23.3837854,43.9469253 Z",id:"Rectangle-Copy-66",transform:"translate(39.993174, 48.390611) rotate(-90.000000) translate(-39.993174, -48.390611) "}),Y.createElement("path",{d:"M46.7286345,49.7286345 L68.8072017,49.7286345 C71.0163407,49.7286345 72.8072017,51.5194955 72.8072017,53.7286345 L72.8072017,54.1927983 C72.8072017,56.4019373 71.0163407,58.1927983 68.8072017,58.1927983 L46.7286345,58.1927983 C44.5194955,58.1927983 42.7286345,56.4019373 42.7286345,54.1927983 L42.7286345,53.7286345 C42.7286345,51.5194955 44.5194955,49.7286345 46.7286345,49.7286345 Z",id:"Rectangle-Copy-67",transform:"translate(57.767918, 53.960716) rotate(-90.000000) translate(-57.767918, -53.960716) "}))))),HJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_boolean",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"noun_switch_3350414-2",transform:"translate(20.000000, 22.000000)",fill:"currentColor",fillRule:"nonzero"},Y.createElement("g",{id:"noun_switch_3350414"},Y.createElement("path",{d:"M15.2972028,30.8 L54.7027972,30.8 C63.151209,30.8 70,23.9051851 70,15.4 C70,6.89481485 63.151209,0 54.7027972,0 L15.2972028,0 C6.84879098,0 0,6.89481485 0,15.4 C0,23.9051851 6.84879098,30.8 15.2972028,30.8 Z M15.2972028,6.16 L54.7027972,6.16 C59.7718443,6.16 63.8811189,10.2968889 63.8811189,15.4 C63.8811189,20.5031111 59.7718443,24.64 54.7027972,24.64 L15.2972028,24.64 C10.2281557,24.64 6.11888112,20.5031111 6.11888112,15.4 C6.11888112,10.2968889 10.2281557,6.16 15.2972028,6.16 Z",id:"Shape"}),Y.createElement("path",{d:"M19.6340542,21.9997804 C22.2930484,22.0215224 24.7022661,20.4273668 25.7348338,17.9629544 C26.7674016,15.4985421 26.2191958,12.6510518 24.3466309,10.7523518 C22.474066,8.85365189 19.6473211,8.27908795 17.1885612,9.29740315 C14.7298014,10.3157183 13.125,12.7256064 13.125,15.3998806 C13.125,19.0240523 16.0305897,21.9703156 19.6340542,21.9997804 L19.6340542,21.9997804 Z",id:"Path"}),Y.createElement("path",{d:"M54.7027971,35.2 L15.2972025,35.2 C6.84879081,35.2 0,42.094815 0,50.6 C0,59.105185 6.84879081,66 15.2972025,66 L54.7027971,66 C63.151209,66 70,59.1051851 70,50.6 C70,42.0948149 63.151209,35.2 54.7027971,35.2 L54.7027971,35.2 Z M54.7027971,59.84 L15.2972025,59.84 C10.2281554,59.84 6.11888082,55.7031111 6.11888082,50.6 C6.11888082,45.4968889 10.2281554,41.36 15.2972025,41.36 L54.7027971,41.36 C59.7718442,41.36 63.8811189,45.4968889 63.8811189,50.6 C63.8811189,55.7031111 59.7718442,59.84 54.7027971,59.84 L54.7027971,59.84 Z",id:"Shape"}),Y.createElement("path",{d:"M50.3659458,44.0002196 C47.7069516,43.9784776 45.2977339,45.5726332 44.2651662,48.0370456 C43.2325984,50.5014579 43.7808042,53.3489482 45.6533691,55.2476482 C47.525934,57.1463481 50.3526789,57.720912 52.8114388,56.7025969 C55.2701986,55.6842817 56.875,53.2743936 56.875,50.6001194 C56.875,46.9759477 53.9694103,44.0296844 50.3659458,44.0002196 Z",id:"Path"}))))),GJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_column_chart",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"Group",transform:"translate(23.500000, 19.500000)",fill:"currentColor"},Y.createElement("path",{d:"M-26.5,30.5 L35.5,30.5 C37.709139,30.5 39.5,32.290861 39.5,34.5 L39.5,35.5 C39.5,37.709139 37.709139,39.5 35.5,39.5 L-26.5,39.5 C-28.709139,39.5 -30.5,37.709139 -30.5,35.5 L-30.5,34.5 C-30.5,32.290861 -28.709139,30.5 -26.5,30.5 Z",id:"Rectangle-Copy-59",transform:"translate(4.500000, 35.000000) rotate(-90.000000) translate(-4.500000, -35.000000) "}),Y.createElement("path",{d:"M-0.5,38.5 L45.5,38.5 C47.709139,38.5 49.5,40.290861 49.5,42.5 L49.5,43.5 C49.5,45.709139 47.709139,47.5 45.5,47.5 L-0.5,47.5 C-2.709139,47.5 -4.5,45.709139 -4.5,43.5 L-4.5,42.5 C-4.5,40.290861 -2.709139,38.5 -0.5,38.5 Z",id:"Rectangle-Copy-62",transform:"translate(22.500000, 43.000000) rotate(-90.000000) translate(-22.500000, -43.000000) "}),Y.createElement("path",{d:"M23.5,45.5 L57.5,45.5 C59.709139,45.5 61.5,47.290861 61.5,49.5 L61.5,50.5 C61.5,52.709139 59.709139,54.5 57.5,54.5 L23.5,54.5 C21.290861,54.5 19.5,52.709139 19.5,50.5 L19.5,49.5 C19.5,47.290861 21.290861,45.5 23.5,45.5 Z",id:"Rectangle-Copy-66",transform:"translate(40.500000, 50.000000) rotate(-90.000000) translate(-40.500000, -50.000000) "}),Y.createElement("path",{d:"M47.5,50.5 L70.5,50.5 C72.709139,50.5 74.5,52.290861 74.5,54.5 L74.5,55.5 C74.5,57.709139 72.709139,59.5 70.5,59.5 L47.5,59.5 C45.290861,59.5 43.5,57.709139 43.5,55.5 L43.5,54.5 C43.5,52.290861 45.290861,50.5 47.5,50.5 Z",id:"Rectangle-Copy-67",transform:"translate(59.000000, 55.000000) rotate(-90.000000) translate(-59.000000, -55.000000) "})))),WJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_currency",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"Group",transform:"translate(19.000000, 19.000000)"},Y.createElement("circle",{id:"Oval",stroke:"currentColor",strokeWidth:7,cx:36,cy:36,r:32.5}),Y.createElement("path",{d:"M35.7525,20.06 C38.5425,20.06 40.7775,20.7425 42.4575,22.1075 C44.1375,23.4725 45.2775,25.01 45.8775,26.72 L41.4225,28.61 C41.1225,27.53 40.4925,26.6 39.5325,25.82 C38.5725,25.04 37.3275,24.65 35.7975,24.65 C34.3275,24.65 33.0825,25.04 32.0625,25.82 C31.0425,26.6 30.5325,27.59 30.5325,28.79 C30.5325,29.9 30.99,30.8225 31.905,31.5575 C32.759,32.2435 34.0507333,32.8968333 35.7802,33.5175 L38.2275,34.37 C40.9875,35.33 43.1175,36.575 44.6175,38.105 C46.1175,39.635 46.8675,41.675 46.8675,44.225 C46.8675,46.325 46.335,48.0875 45.27,49.5125 C44.205,50.9375 42.84,51.995 41.175,52.685 C39.51,53.375 37.8075,53.72 36.0675,53.72 C33.3975,53.72 30.9975,52.94 28.8675,51.38 C26.7375,49.82 25.2525,47.63 24.4125,44.81 L29.0925,42.92 C29.5725,44.72 30.4275,46.19 31.6575,47.33 C32.8875,48.47 34.3725,49.04 36.1125,49.04 C37.7325,49.04 39.105,48.62 40.23,47.78 C41.355,46.94 41.9175,45.785 41.9175,44.315 C41.9175,42.965 41.4225,41.8475 40.4325,40.9625 C39.4975,40.1266667 37.9202778,39.3109028 35.7008333,38.5152083 L33.2775,37.655 C31.0875,36.875 29.265,35.7875 27.81,34.3925 C26.355,32.9975 25.6275,31.145 25.6275,28.835 C25.6275,27.245 26.055,25.775 26.91,24.425 C27.765,23.075 28.965,22.01 30.51,21.23 C32.055,20.45 33.8025,20.06 35.7525,20.06 Z",id:"Path",fill:"currentColor",fillRule:"nonzero"}),Y.createElement("line",{x1:36,y1:14,x2:36,y2:21,id:"Line-Copy-4",stroke:"currentColor",strokeWidth:5}),Y.createElement("line",{x1:36,y1:52,x2:36,y2:59,id:"Line-Copy-5",stroke:"currentColor",strokeWidth:5})),Y.createElement("g",{id:"S",transform:"translate(43.412500, 37.060000)"}))),VJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_dashboard",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"dashboard_black_24dp",transform:"translate(13.000000, 13.000000)"},Y.createElement("path",{d:"M5,0 L80,0 C82.7614237,-5.07265313e-16 85,2.23857625 85,5 L85,80 C85,82.7614237 82.7614237,85 80,85 L5,85 C2.23857625,85 3.38176876e-16,82.7614237 0,80 L0,5 C-3.38176876e-16,2.23857625 2.23857625,5.07265313e-16 5,0 Z",id:"Path"}),Y.createElement("path",{d:"M67,18 L67,25 L53,25 L53,18 L67,18 M32,18 L32,39 L18,39 L18,18 L32,18 M67,46 L67,67 L53,67 L53,46 L67,46 M32,60 L32,67 L18,67 L18,60 L32,60 M69,11 L51,11 C48.2385763,11 46,13.2385763 46,16 L46,27 C46,29.7614237 48.2385763,32 51,32 L69,32 C71.7614237,32 74,29.7614237 74,27 L74,16 C74,13.2385763 71.7614237,11 69,11 Z M34,11 L16,11 C13.2385763,11 11,13.2385763 11,16 L11,41 C11,43.7614237 13.2385763,46 16,46 L34,46 C36.7614237,46 39,43.7614237 39,41 L39,16 C39,13.2385763 36.7614237,11 34,11 Z M69,39 L51,39 C48.2385763,39 46,41.2385763 46,44 L46,69 C46,71.7614237 48.2385763,74 51,74 L69,74 C71.7614237,74 74,71.7614237 74,69 L74,44 C74,41.2385763 71.7614237,39 69,39 Z M34,53 L16,53 C13.2385763,53 11,55.2385763 11,58 L11,69 C11,71.7614237 13.2385763,74 16,74 L34,74 C36.7614237,74 39,71.7614237 39,69 L39,58 C39,55.2385763 36.7614237,53 34,53 Z",id:"Shape",fill:"currentColor",fillRule:"nonzero"})))),QJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_image",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M81.4444444,28.5555556 L81.4444444,81.4444444 L28.5555556,81.4444444 L28.5555556,28.5555556 L81.4444444,28.5555556 M81.4444444,21 L28.5555556,21 C24.4,21 21,24.4 21,28.5555556 L21,81.4444444 C21,85.6 24.4,89 28.5555556,89 L81.4444444,89 C85.6,89 89,85.6 89,81.4444444 L89,28.5555556 C89,24.4 85.6,21 81.4444444,21 Z M63.0844444,54.4711111 L51.7511111,69.0911111 L43.6666667,59.3066667 L32.3333333,73.8888889 L77.6666667,73.8888889 L63.0844444,54.4711111 Z",id:"Shape",fill:"currentColor",fillRule:"nonzero"}))),YJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_json",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"{;}",transform:"translate(24.000000, 22.000000)",fill:"currentColor",fillRule:"nonzero"},Y.createElement("path",{d:"M17.0296296,66 C13.2765432,66 10.3209877,64.871179 8.16296296,62.6135371 C6.00493827,60.3558952 4.92592593,57.3296943 4.92592593,53.5349345 L4.92592593,41.6462882 C4.92592593,39.9170306 4.45679012,38.5840611 3.51851852,37.6473799 C2.58024691,36.7106987 1.40740741,36.2423581 0,36.2423581 L0,29.7576419 C1.40740741,29.7576419 2.58024691,29.2893013 3.51851852,28.3526201 C4.45679012,27.4159389 4.92592593,26.0829694 4.92592593,24.3537118 L4.92592593,12.4650655 C4.92592593,8.67030568 6.00493827,5.6441048 8.16296296,3.38646288 C10.3209877,1.12882096 13.2765432,0 17.0296296,0 L19,0 L19,6.41266376 L17.7333333,6.41266376 C16.091358,6.41266376 14.7425926,6.98908297 13.687037,8.1419214 C12.6314815,9.29475983 12.1037037,10.8318777 12.1037037,12.7532751 L12.1037037,24.3537118 C12.1037037,26.7074236 11.7166667,28.5687773 10.9425926,29.9377729 C10.1685185,31.3067686 8.93703704,32.2554585 7.24814815,32.7838428 L7.24814815,33.2161572 C8.93703704,33.7445415 10.1685185,34.6812227 10.9425926,36.0262009 C11.7166667,37.371179 12.1037037,39.2445415 12.1037037,41.6462882 L12.1037037,53.2467249 C12.1037037,55.1681223 12.6314815,56.7052402 13.687037,57.8580786 C14.7425926,59.010917 16.091358,59.5873362 17.7333333,59.5873362 L19,59.5873362 L19,66 L17.0296296,66 Z",id:"Path"}),Y.createElement("path",{d:"M44,59.5873362 L45.4074074,59.5873362 C47.0493827,59.5873362 48.3864198,59.010917 49.4185185,57.8580786 C50.4506173,56.7052402 50.9666667,55.1681223 50.9666667,53.2467249 L50.9666667,41.6462882 C50.9666667,39.2445415 51.3537037,37.371179 52.1277778,36.0262009 C52.9018519,34.6812227 54.1333333,33.7445415 55.8222222,33.2161572 L55.8222222,32.7838428 C54.1333333,32.2554585 52.9018519,31.3067686 52.1277778,29.9377729 C51.3537037,28.5687773 50.9666667,26.7074236 50.9666667,24.3537118 L50.9666667,12.7532751 C50.9666667,10.8318777 50.4506173,9.29475983 49.4185185,8.1419214 C48.3864198,6.98908297 47.0493827,6.41266376 45.4074074,6.41266376 L44,6.41266376 L44,0 L46.0407407,0 C49.7938272,0 52.7493827,1.12882096 54.9074074,3.38646288 C57.0654321,5.6441048 58.1444444,8.67030568 58.1444444,12.4650655 L58.1444444,24.3537118 C58.1444444,26.0829694 58.6018519,27.4159389 59.5166667,28.3526201 C60.4314815,29.2893013 61.5925926,29.7576419 63,29.7576419 L63,36.2423581 C61.5925926,36.2423581 60.4314815,36.7106987 59.5166667,37.6473799 C58.6018519,38.5840611 58.1444444,39.9170306 58.1444444,41.6462882 L58.1444444,53.5349345 C58.1444444,57.3296943 57.0654321,60.3558952 54.9074074,62.6135371 C52.7493827,64.871179 49.7938272,66 46.0407407,66 L44,66 L44,59.5873362 Z",id:"Path"})))),Are=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"10 10 90 90",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_line",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M88.1848681,33.1583406 C89.7542734,31.6035859 92.2869054,31.6154626 93.8416601,33.1848679 C95.3445896,34.7019597 95.3835892,37.1191334 93.9668812,38.6829968 L93.8151328,38.84166 L66.2578818,66.14166 C64.8378618,67.5484238 62.6084032,67.6843587 61.0319068,66.4919462 L60.8595019,66.3539866 L45.2420004,53.1430003 L21.844917,76.8176775 C20.3437446,78.336508 17.927116,78.4009733 16.3484126,77.0008213 L16.1881594,76.850753 C14.6693289,75.3495806 14.6048635,72.932952 16.0050156,71.3542486 L16.1550839,71.1939954 L42.1550839,44.8881592 C43.5729843,43.4535802 45.8262314,43.3057778 47.4155704,44.5116324 L47.583248,44.646014 L63.2290004,57.8810003 L88.1848681,33.1583406 Z",id:"Path-10",fill:"currentColor",fillRule:"nonzero"}))),gLe=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"10 10 90 90",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_link",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"link_black_24dp",transform:"translate(5.000000, 5.000000)"},Y.createElement("path",{d:"M5,0 L96,0 C98.7614237,-5.07265313e-16 101,2.23857625 101,5 L101,96 C101,98.7614237 98.7614237,101 96,101 L5,101 C2.23857625,101 3.38176876e-16,98.7614237 0,96 L0,5 C-3.38176876e-16,2.23857625 2.23857625,5.07265313e-16 5,0 Z",id:"Path"}),Y.createElement("path",{d:"M71,30 L58.4,30 C56.0804041,30 54.2,31.8804041 54.2,34.2 C54.2,36.5195959 56.0804041,38.4 58.4,38.4 L71,38.4 L71,38.4 C77.93,38.4 83.6,44.07 83.6,51 C83.6,57.93 77.93,63.6 71,63.6 L58.4,63.6 C56.0804041,63.6 54.2,65.4804041 54.2,67.8 C54.2,70.1195959 56.0804041,72 58.4,72 L71,72 L71,72 C82.592,72 92,62.592 92,51 C92,39.408 82.592,30 71,30 Z M41.6,63.6 L29,63.6 L29,63.6 C22.07,63.6 16.4,57.93 16.4,51 C16.4,44.07 22.07,38.4 29,38.4 L41.6,38.4 C43.9195959,38.4 45.8,36.5195959 45.8,34.2 C45.8,31.8804041 43.9195959,30 41.6,30 L29,30 L29,30 C17.408,30 8,39.408 8,51 C8,62.592 17.408,72 29,72 L41.6,72 C43.9195959,72 45.8,70.1195959 45.8,67.8 C45.8,65.4804041 43.9195959,63.6 41.6,63.6 Z M37.4,46.8 L62.6,46.8 C64.9195959,46.8 66.8,48.6804041 66.8,51 C66.8,53.3195959 64.9195959,55.2 62.6,55.2 L37.4,55.2 C35.0804041,55.2 33.2,53.3195959 33.2,51 C33.2,48.6804041 35.0804041,46.8 37.4,46.8 Z",id:"Shape",fill:"currentColor",fillRule:"nonzero"})))),KJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_list",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("rect",{id:"Rectangle-Copy-58",fill:"currentColor",x:24.1587742,y:27,width:61.9377906,height:8,rx:4}),Y.createElement("rect",{id:"Rectangle-Copy-61",fill:"currentColor",x:24.1587742,y:43,width:61.9377906,height:8,rx:4}),Y.createElement("rect",{id:"Rectangle-Copy-64",fill:"currentColor",x:24.1587742,y:59,width:62,height:8,rx:4}),Y.createElement("rect",{id:"Rectangle-Copy-65",fill:"currentColor",x:24.1587742,y:75.1904762,width:62,height:7.61904762,rx:3.80952381}))),XJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_list_detail",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("rect",{id:"Rectangle-Copy-58",fill:"currentColor",x:22.1587742,y:27,width:15.983946,height:8,rx:4}),Y.createElement("rect",{id:"Rectangle-Copy-59",fill:"currentColor",x:44.1587742,y:27,width:43.9558514,height:8,rx:4}),Y.createElement("rect",{id:"Rectangle-Copy-61",fill:"currentColor",x:22.1587742,y:43,width:15.983946,height:8,rx:4}),Y.createElement("rect",{id:"Rectangle-Copy-62",fill:"currentColor",x:44.1587742,y:43,width:43.9558514,height:8,rx:4}),Y.createElement("rect",{id:"Rectangle-Copy-64",fill:"currentColor",x:22.1587742,y:59,width:16,height:8,rx:4}),Y.createElement("rect",{id:"Rectangle-Copy-66",fill:"currentColor",x:44.1587742,y:59,width:44,height:8,rx:4}),Y.createElement("rect",{id:"Rectangle-Copy-65",fill:"currentColor",x:22.1587742,y:75.1904762,width:16,height:7.61904762,rx:3.80952381}),Y.createElement("rect",{id:"Rectangle-Copy-67",fill:"currentColor",x:44.1587742,y:75.1904762,width:44,height:7.61904762,rx:3.80952381}))),JJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_map_points",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"Group-Copy-36",transform:"translate(30.000000, 19.000000)",fill:"currentColor",fillRule:"nonzero"},Y.createElement("path",{d:"M25,0 C11.1785714,0 0,11.268 0,25.2 C0,44.1 25,72 25,72 C25,72 50,44.1 50,25.2 C50,11.268 38.8214286,0 25,0 Z M7.14285714,25.2 C7.14285714,15.264 15.1428571,7.2 25,7.2 C34.8571429,7.2 42.8571429,15.264 42.8571429,25.2 C42.8571429,35.568 32.5714286,51.084 25,60.768 C17.5714286,51.156 7.14285714,35.46 7.14285714,25.2 Z",id:"Shape"}),Y.createElement("path",{d:"M25,34 C29.97052,34 34,29.97052 34,25 C34,20.029444 29.97052,16 25,16 C20.02948,16 16,20.029444 16,25 C16,29.97052 20.02948,34 25,34 Z",id:"Path"})))),ZJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"10 10 90 90",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_map_segment",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"Group-Copy-36",transform:"translate(11.000000, 27.000000)",fillRule:"nonzero"},Y.createElement("path",{d:"M17,0 C7.60142857,0 0,7.6685 0,17.15 C0,30.0125 17,49 17,49 C17,49 34,30.0125 34,17.15 C34,7.6685 26.3985714,0 17,0 Z M4.85714286,17.15 C4.85714286,10.388 10.2971429,4.9 17,4.9 C23.7028571,4.9 29.1428571,10.388 29.1428571,17.15 C29.1428571,24.206 22.1485714,34.7655 17,41.356 C11.9485714,34.8145 4.85714286,24.1325 4.85714286,17.15 Z",id:"Shape",fill:"currentColor"}),Y.createElement("path",{d:"M17,24 C20.31368,24 23,21.31368 23,18 C23,14.686296 20.31368,12 17,12 C13.68632,12 11,14.686296 11,18 C11,21.31368 13.68632,24 17,24 Z",id:"Path",fill:"currentColor"})),Y.createElement("g",{id:"Group-Copy-37",transform:"translate(62.000000, 27.000000)",fillRule:"nonzero"},Y.createElement("path",{d:"M17,0 C7.60142857,0 0,7.6685 0,17.15 C0,30.0125 17,49 17,49 C17,49 34,30.0125 34,17.15 C34,7.6685 26.3985714,0 17,0 Z M4.85714286,17.15 C4.85714286,10.388 10.2971429,4.9 17,4.9 C23.7028571,4.9 29.1428571,10.388 29.1428571,17.15 C29.1428571,24.206 22.1485714,34.7655 17,41.356 C11.9485714,34.8145 4.85714286,24.1325 4.85714286,17.15 Z",id:"Shape",fill:"currentColor"}),Y.createElement("path",{d:"M17,24 C20.31368,24 23,21.31368 23,18 C23,14.686296 20.31368,12 17,12 C13.68632,12 11,14.686296 11,18 C11,21.31368 13.68632,24 17,24 Z",id:"Path",fill:"currentColor"})),Y.createElement("line",{x1:28.5,y1:81.5,x2:79.5,y2:81.5,id:"Line-3",stroke:"currentColor",strokeWidth:5,strokeLinecap:"round",strokeDasharray:"5,10"}))),eZt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_map_shape",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"noun-world-4667432-2",transform:"translate(19.000000, 19.000000)",fill:"currentColor",fillRule:"nonzero"},Y.createElement("g",{id:"noun-world-4667432"},Y.createElement("path",{d:"M36,5 C18.8798665,5 5,18.8793071 5,36 C5,53.1206929 18.8793071,67 36,67 C53.1206929,67 67,53.1206929 67,36 C67,18.8793071 53.1206929,5 36,5 Z M0,36 C0,16.1177143 16.1177143,0 36,0 C55.8822857,0 72,16.1177143 72,36 C72,55.8822857 55.8822857,72 36,72 C16.1177143,72 0,55.8822857 0,36 Z",id:"Shape"}),Y.createElement("path",{d:"M37.2848685,1.50131372 C37.8999474,1.48477633 38.4631152,1.71654937 38.8767996,2.10376364 C39.2928262,2.49317029 39.5578301,3.03960333 39.57434,3.65023916 L39.57434,3.65023916 L40.0344656,20.7428771 C40.0487121,21.2893502 39.8586306,21.8212062 39.4992535,22.2375953 L39.4992535,22.2375953 L32.1172188,30.7832284 C31.7924232,31.1592888 31.3490374,31.4169308 30.8586892,31.5134813 L30.8586892,31.5134813 L24.6865498,32.7324332 L28.0628423,42.7359018 C28.4533111,43.8925701 28.4513039,45.0197005 28.1633304,46.0321806 C27.8503264,47.132665 27.1975708,48.0987342 26.3338575,48.8190181 C25.4716664,49.5380326 24.3999821,50.0114808 23.2508211,50.1317463 C22.1949716,50.2422462 21.0728206,50.0558305 19.9867908,49.4837618 L19.9867908,49.4837618 L1.68382097,39.8433672 C1.13885361,39.5565384 0.764084629,39.078393 0.597525292,38.5380041 C0.430427538,37.9958684 0.472619244,37.3906551 0.763987861,36.8508084 C1.05393693,36.3139129 1.53648052,35.9433066 2.08313472,35.7791188 C2.62798313,35.6154734 3.2361363,35.657153 3.77860632,35.9426925 L3.77860632,35.9426925 L22.0816454,45.5831236 C22.3171919,45.7071442 22.5603781,45.7498863 22.7897862,45.7258621 C23.0398735,45.6996723 23.2725259,45.5956093 23.4599703,45.4392842 C23.6458558,45.2842591 23.7880139,45.0772117 23.8554593,44.8399997 C23.9169381,44.6237728 23.9147045,44.383346 23.8314444,44.1367864 L23.8314444,44.1367864 L19.6527943,31.7569079 C19.4493668,31.1542234 19.517516,30.4944328 19.8403231,29.9450638 C20.1614725,29.3985413 20.7046793,29.014044 21.3323155,28.8900909 L21.3323155,28.8900909 L29.2286003,27.3302661 L35.5513871,20.0108413 L35.1144494,3.7686887 C35.0979491,3.15801867 35.3331708,2.59836837 35.7276711,2.18746751 C36.1199426,1.77888802 36.6699139,1.51752889 37.2848685,1.50131372 Z",id:"Path",stroke:"currentColor"}),Y.createElement("path",{d:"M42.2538467,56.3169014 C42.834665,56.3169014 43.3919278,56.5473051 43.8025756,56.957964 L43.8025756,56.957964 L50.5634819,63.7190531 C50.990585,64.1465338 51.2042254,64.7070592 51.2042254,65.267637 C51.2042254,65.8282064 50.9905908,66.3887389 50.5631792,66.8165562 C50.1353619,67.244019 49.5748515,67.4577465 49.0143336,67.4577465 C48.453827,67.4577465 47.893307,67.2440267 47.4652769,66.8163886 L47.4652769,66.8163886 L41.3467145,60.697095 L29.639469,60.697095 L23.5207389,66.8165562 C23.0929158,67.2440249 22.5323953,67.4577465 21.9719658,67.4577465 C21.4114352,67.4577465 20.8509999,67.2439558 20.4235838,66.8165562 C19.995665,66.388992 19.7816901,65.8283383 19.7816901,65.2676696 C19.7816901,64.7070094 19.9956592,64.1463486 20.4234173,63.7189168 L20.4234173,63.7189168 L27.1839229,56.9576493 C27.5952192,56.5470739 28.1516855,56.3169014 28.7323368,56.3169014 L28.7323368,56.3169014 Z",id:"Path",stroke:"currentColor"}),Y.createElement("path",{d:"M63.9378166,21.2379048 C64.4225216,20.8714311 65.0086399,20.7379975 65.5642349,20.8181856 C66.1191803,20.8982799 66.6440521,21.191578 67.006552,21.6798365 C67.3682973,22.1662502 67.5006358,22.75458 67.4216695,23.3126471 C67.3426278,23.8712474 67.0519787,24.3991735 66.5692317,24.7645164 L66.5692317,24.7645164 L53.5947929,34.5837331 L50.8571888,42.8725775 L63.4236834,55.5534973 C63.8498746,55.9835692 64.0634024,56.5474048 64.0634024,57.111468 C64.0634024,57.6755228 63.8498803,58.2393656 63.4235328,58.6696236 C62.9952729,59.1014133 62.434079,59.3169014 61.8731786,59.3169014 C61.3121772,59.3169014 60.7510686,59.1013441 60.3230649,58.6694716 L60.3230649,58.6694716 L46.8022881,45.0255804 C46.5094233,44.730049 46.31189,44.3642735 46.2203738,43.9732706 C46.1289585,43.5826987 46.1433461,43.1669732 46.2741073,42.7711741 L46.2741073,42.7711741 L49.6544877,32.5388634 C49.7943202,32.1133276 50.0607882,31.7409505 50.416846,31.4711161 L50.416846,31.4711161 Z",id:"Path",stroke:"currentColor"}))))),xLe=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_number",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"Group",transform:"translate(20.000000, 20.000000)",fill:"currentColor"},Y.createElement("path",{d:"M-10.5,30.5 L51.5,30.5 C53.709139,30.5 55.5,32.290861 55.5,34.5 L55.5,35.5 C55.5,37.709139 53.709139,39.5 51.5,39.5 L-10.5,39.5 C-12.709139,39.5 -14.5,37.709139 -14.5,35.5 L-14.5,34.5 C-14.5,32.290861 -12.709139,30.5 -10.5,30.5 Z",id:"Rectangle-Copy-60",transform:"translate(20.500000, 35.000000) rotate(-90.000000) translate(-20.500000, -35.000000) "}),Y.createElement("path",{d:"M19.5,30.5 L81.5,30.5 C83.709139,30.5 85.5,32.290861 85.5,34.5 L85.5,35.5 C85.5,37.709139 83.709139,39.5 81.5,39.5 L19.5,39.5 C17.290861,39.5 15.5,37.709139 15.5,35.5 L15.5,34.5 C15.5,32.290861 17.290861,30.5 19.5,30.5 Z",id:"Rectangle-Copy-61",transform:"translate(50.500000, 35.000000) rotate(-90.000000) translate(-50.500000, -35.000000) "}),Y.createElement("path",{d:"M4,14 L66,14 C68.209139,14 70,15.790861 70,18 L70,19 C70,21.209139 68.209139,23 66,23 L4,23 C1.790861,23 2.705415e-16,21.209139 0,19 L0,18 C-2.705415e-16,15.790861 1.790861,14 4,14 Z",id:"Rectangle-Copy-63",transform:"translate(35.000000, 18.500000) rotate(-360.000000) translate(-35.000000, -18.500000) "}),Y.createElement("path",{d:"M4,44 L66,44 C68.209139,44 70,45.790861 70,48 L70,49 C70,51.209139 68.209139,53 66,53 L4,53 C1.790861,53 2.705415e-16,51.209139 0,49 L0,48 C-2.705415e-16,45.790861 1.790861,44 4,44 Z",id:"Rectangle-Copy-62",transform:"translate(35.000000, 48.500000) rotate(-360.000000) translate(-35.000000, -48.500000) "})))),tZt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_percent",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"%-copy-5",transform:"translate(19.000000, 22.000000)",fill:"currentColor",fillRule:"nonzero"},Y.createElement("path",{d:"M16.1194226,31.5251397 C19.1010499,31.5251397 21.8186789,30.8184358 24.2723097,29.4050279 C26.7259405,27.9916201 28.6671041,26.0712291 30.0958005,23.6438547 C31.5244969,21.2164804 32.2388451,18.5893855 32.2388451,15.7625698 C32.2388451,12.9357542 31.5244969,10.3086592 30.0958005,7.88128492 C28.6671041,5.45391061 26.7259405,3.53351955 24.2723097,2.12011173 C21.8186789,0.706703911 19.1010499,0 16.1194226,0 C13.1377953,0 10.4201662,0.706703911 7.96653543,2.12011173 C5.51290464,3.53351955 3.57174103,5.45391061 2.14304462,7.88128492 C0.714348206,10.3086592 0,12.9357542 0,15.7625698 C0,18.5893855 0.714348206,21.2164804 2.14304462,23.6438547 C3.57174103,26.0712291 5.51290464,27.9916201 7.96653543,29.4050279 C10.4201662,30.8184358 13.1377953,31.5251397 16.1194226,31.5251397 Z M19.9645575,62.4787112 L57.1929452,7.56550735 C58.3200259,5.90302296 57.8859954,3.64163362 56.223511,2.5145529 C56.2107419,2.50589603 56.1979177,2.49732049 56.1850394,2.48882682 C54.4804105,1.3645685 52.1887314,1.81914062 51.0422905,3.50893047 L13.7228276,58.5157377 C12.6107181,60.1549252 13.0379992,62.3852921 14.6771866,63.4974016 C14.7072768,63.5178164 14.7376757,63.5377723 14.7683727,63.5572626 C16.507245,64.6613129 18.8087263,64.1836036 19.9645575,62.4787112 Z M16.1194226,24.150838 C13.8832021,24.150838 12.0041557,23.3519553 10.4822835,21.7541899 C8.9604112,20.1564246 8.19947507,18.1592179 8.19947507,15.7625698 C8.19947507,13.3044693 8.9604112,11.2918994 10.4822835,9.72486034 C12.0041557,8.15782123 13.8832021,7.37430168 16.1194226,7.37430168 C18.4177603,7.37430168 20.3278653,8.15782123 21.8497375,9.72486034 C23.3716098,11.2918994 24.1325459,13.3044693 24.1325459,15.7625698 C24.1325459,18.2206704 23.3716098,20.2332402 21.8497375,21.8002793 C20.3278653,23.3673184 18.4177603,24.150838 16.1194226,24.150838 Z M54.8805774,66 C57.8622047,66 60.5798338,65.2932961 63.0334646,63.8798883 C65.4870954,62.4664804 67.428259,60.5460894 68.8569554,58.1187151 C70.2856518,55.6913408 71,53.0642458 71,50.2374302 C71,47.4106145 70.2856518,44.7835196 68.8569554,42.3561453 C67.428259,39.9287709 65.4870954,38.0083799 63.0334646,36.5949721 C60.5798338,35.1815642 57.8622047,34.4748603 54.8805774,34.4748603 C51.8989501,34.4748603 49.1813211,35.1815642 46.7276903,36.5949721 C44.2740595,38.0083799 42.3328959,39.9287709 40.9041995,42.3561453 C39.4755031,44.7835196 38.7611549,47.4106145 38.7611549,50.2374302 C38.7611549,53.0642458 39.4755031,55.6913408 40.9041995,58.1187151 C42.3328959,60.5460894 44.2740595,62.4664804 46.7276903,63.8798883 C49.1813211,65.2932961 51.8989501,66 54.8805774,66 Z M54.8805774,58.6256983 C52.644357,58.6256983 50.7653106,57.8268156 49.2434383,56.2290503 C47.7215661,54.6312849 46.9606299,52.6340782 46.9606299,50.2374302 C46.9606299,47.7793296 47.7215661,45.7667598 49.2434383,44.1997207 C50.7653106,42.6326816 52.644357,41.849162 54.8805774,41.849162 C57.1789151,41.849162 59.0890201,42.6326816 60.6108924,44.1997207 C62.1327647,45.7667598 62.8937008,47.7793296 62.8937008,50.2374302 C62.8937008,52.6340782 62.1172353,54.6312849 60.5643045,56.2290503 C59.0113736,57.8268156 57.1167979,58.6256983 54.8805774,58.6256983 Z",id:"%-copy-2"})))),rZt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"5 5 100 100",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_scatter",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M29.1340462,83.93 C36.5885775,83.93 42.6340462,77.8857969 42.6340462,70.43 C42.6340462,62.9742031 36.5885775,56.93 29.1340462,56.93 C21.679515,56.93 15.6340462,62.9742031 15.6340462,70.43 C15.6340462,77.8857969 21.679515,83.93 29.1340462,83.93 Z",id:"Path-Copy-3",stroke:"#9aa0a6",className:"primarystroke",strokeWidth:7,fillRule:"nonzero"}),Y.createElement("path",{d:"M68.2840462,92.63 C73.6709212,92.63 78.0340462,88.264925 78.0340462,82.88 C78.0340462,77.495075 73.6709212,73.13 68.2840462,73.13 C62.8971712,73.13 58.5340462,77.495075 58.5340462,82.88 C58.5340462,88.264925 62.8971712,92.63 68.2840462,92.63 Z",id:"Path-Copy-2",stroke:"#9aa0a6",className:"primarystroke",strokeWidth:7,fillRule:"nonzero",transform:"translate(68.284046, 82.880000) rotate(-360.000000) translate(-68.284046, -82.880000) "}),Y.createElement("path",{d:"M67.8242963,57.43 C78.8701296,57.43 87.8242963,48.4758333 87.8242963,37.43 C87.8242963,26.3842917 78.8701296,17.43 67.8242963,17.43 C56.7784629,17.43 47.8242963,26.3842917 47.8242963,37.43 C47.8242963,48.4758333 56.7784629,57.43 67.8242963,57.43 Z",id:"Path-Copy",stroke:"#9aa0a6",className:"primarystroke",strokeWidth:7,fillRule:"nonzero"}))),nZt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"0 0 110 110",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_sparkline",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},Y.createElement("polyline",{id:"Path-11",stroke:"#9aa0a6",strokeWidth:6,points:"10 54.8274509 25.9215088 61.0844803 40.1501567 54.8274509 53.3907166 68.7215958 69.5925598 42 83.3327332 64.4487228 100.431152 57.8274509"}))),iZt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_table",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M81.0526316,23 L28.9473684,23 C25.1263158,23 22,26.1662162 22,30.036036 L22,79.2882883 C22,83.1581081 25.1263158,86.3243243 28.9473684,86.3243243 L81.0526316,86.3243243 C84.8736842,86.3243243 88,83.1581081 88,79.2882883 L88,30.036036 C88,26.1662162 84.8736842,23 81.0526316,23 Z M80.8648649,30.1351351 L80.8648649,40.8378378 L28.2432432,40.8378378 L28.2432432,30.1351351 L80.8648649,30.1351351 Z M63.9189189,79.1891892 L46.0810811,79.1891892 L46.0810811,47.972973 L63.9189189,47.972973 L63.9189189,79.1891892 Z M28.2432432,47.972973 L38.9459459,47.972973 L38.9459459,79.1891892 L28.2432432,79.1891892 L28.2432432,47.972973 Z M71.0540541,79.1891892 L71.0540541,47.972973 L81.7567568,47.972973 L81.7567568,79.1891892 L71.0540541,79.1891892 Z",id:"Shape",fill:"currentColor",fillRule:"nonzero"}))),sZt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"10 10 90 90",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_text",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("rect",{id:"Rectangle-Copy",stroke:"currentColor",strokeWidth:6,x:15.5,y:35,width:79,height:40,rx:5}),Y.createElement("g",{id:"abc",transform:"translate(33.090000, 44.134000)",fill:"currentColor",fillRule:"nonzero"},Y.createElement("path",{d:"M4.81,19.032 C3.406,19.032 2.25333333,18.6203333 1.352,17.797 C0.450666667,16.9736667 0,15.8946667 0,14.56 C0,13.676 0.234,12.896 0.702,12.22 C1.17,11.544 1.81133333,11.024 2.626,10.66 C3.44066667,10.296 4.342,10.114 5.33,10.114 C6.69933333,10.114 7.86933333,10.3133333 8.84,10.712 L8.84,10.14 C8.84,9.412 8.567,8.82266667 8.021,8.372 C7.475,7.92133333 6.74266667,7.696 5.824,7.696 C5.2,7.696 4.59766667,7.839 4.017,8.125 C3.43633333,8.411 2.95533333,8.788 2.574,9.256 L0.39,7.54 C1.03133333,6.708 1.83733333,6.06666667 2.808,5.616 C3.77866667,5.16533333 4.836,4.94 5.98,4.94 C8.008,4.94 9.55066667,5.408 10.608,6.344 C11.6653333,7.28 12.194,8.64933333 12.194,10.452 L12.194,18.616 L8.84,18.616 L8.84,17.264 L8.632,17.264 C8.23333333,17.784 7.709,18.2086667 7.059,18.538 C6.409,18.8673333 5.65933333,19.032 4.81,19.032 Z M5.616,16.38 C6.604,16.38 7.38833333,16.0636667 7.969,15.431 C8.54966667,14.7983333 8.84,14.0573333 8.84,13.208 C7.956,12.792 7.02866667,12.584 6.058,12.584 C4.29,12.584 3.406,13.2426667 3.406,14.56 C3.406,15.0973333 3.59666667,15.535 3.978,15.873 C4.35933333,16.211 4.90533333,16.38 5.616,16.38 Z",id:"Shape"}),Y.createElement("path",{d:"M22.724,19.032 C21.8226667,19.032 21.021,18.8413333 20.319,18.46 C19.617,18.0786667 19.0926667,17.602 18.746,17.03 L18.538,17.03 L18.538,18.616 L15.34,18.616 L15.34,0 L18.746,0 L18.746,5.096 L18.538,6.968 L18.746,6.968 C19.11,6.396 19.6386667,5.915 20.332,5.525 C21.0253333,5.135 21.8226667,4.94 22.724,4.94 C23.92,4.94 25.0076667,5.239 25.987,5.837 C26.9663333,6.435 27.7333333,7.27133333 28.288,8.346 C28.8426667,9.42066667 29.12,10.634 29.12,11.986 C29.12,13.3553333 28.8426667,14.573 28.288,15.639 C27.7333333,16.705 26.9663333,17.537 25.987,18.135 C25.0076667,18.733 23.92,19.032 22.724,19.032 Z M22.126,15.886 C22.7673333,15.886 23.3653333,15.7213333 23.92,15.392 C24.4746667,15.0626667 24.9166667,14.6033333 25.246,14.014 C25.5753333,13.4246667 25.74,12.7486667 25.74,11.986 C25.74,11.2233333 25.5753333,10.5473333 25.246,9.958 C24.9166667,9.36866667 24.4746667,8.91366667 23.92,8.593 C23.3653333,8.27233333 22.7673333,8.112 22.126,8.112 C21.502,8.112 20.9126667,8.27233333 20.358,8.593 C19.8033333,8.91366667 19.3613333,9.36866667 19.032,9.958 C18.7026667,10.5473333 18.538,11.2233333 18.538,11.986 C18.538,12.7486667 18.7026667,13.4246667 19.032,14.014 C19.3613333,14.6033333 19.8033333,15.0626667 20.358,15.392 C20.9126667,15.7213333 21.502,15.886 22.126,15.886 Z",id:"Shape"}),Y.createElement("path",{d:"M37.986,19.032 C36.6513333,19.032 35.4553333,18.733 34.398,18.135 C33.3406667,17.537 32.513,16.7006667 31.915,15.626 C31.317,14.5513333 31.018,13.338 31.018,11.986 C31.018,10.634 31.317,9.425 31.915,8.359 C32.513,7.293 33.3406667,6.45666667 34.398,5.85 C35.4553333,5.24333333 36.6513333,4.94 37.986,4.94 C39.4593333,4.94 40.7246667,5.25633333 41.782,5.889 C42.8393333,6.52166667 43.602,7.41866667 44.07,8.58 L40.95,9.88 C40.3953333,8.70133333 39.4073333,8.112 37.986,8.112 C36.946,8.112 36.0923333,8.46733333 35.425,9.178 C34.7576667,9.88866667 34.424,10.8246667 34.424,11.986 C34.424,13.1646667 34.7576667,14.1093333 35.425,14.82 C36.0923333,15.5306667 36.946,15.886 37.986,15.886 C39.4246667,15.886 40.4646667,15.262 41.106,14.014 L44.2,15.366 C43.628,16.5273333 42.8133333,17.4286667 41.756,18.07 C40.6986667,18.7113333 39.442,19.032 37.986,19.032 Z",id:"Path"})))),oZt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_time",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"Group-Copy-19",transform:"translate(51.307692, 36.538462)",fill:"currentColor",fillRule:"nonzero"},Y.createElement("polygon",{id:"Path",points:"5.30769231 0 0 0 0 21.7906683 18.5769231 33.2307692 21.2307692 28.7636822 5.30769231 19.0668348"})),Y.createElement("circle",{id:"Oval",stroke:"currentColor",strokeWidth:7,cx:55,cy:55,r:32.5}))),aZt=a=>Y.createElement("svg",{height:56,viewBox:"0 0 56 56",width:56,xmlns:"http://www.w3.org/2000/svg",...a},Y.createElement("path",{fill:"currentColor",d:"m23.957 41.7695c3.8906 0 7.5234-1.2656 10.4766-3.375l11.1093 11.1094c.5156.5156 1.1953.7735 1.8985.7735 1.5234 0 2.625-1.1719 2.625-2.6719 0-.7032-.2342-1.3594-.7502-1.875l-11.0389-11.0626c2.3203-3.0468 3.7031-6.8203 3.7031-10.9218 0-9.9141-8.1094-18.0235-18.0234-18.0235-9.9375 0-18.0234 8.1094-18.0234 18.0235 0 9.914 8.0859 18.0234 18.0234 18.0234zm0-3.8906c-7.7578 0-14.1328-6.3984-14.1328-14.1328s6.375-14.1328 14.1328-14.1328c7.7344 0 14.1328 6.3984 14.1328 14.1328s-6.3984 14.1328-14.1328 14.1328z"})),lZt={chevronDown:aJt,chevronLeft:lJt,chevronRight:uJt,clear:Tje,meatballs:kJt,play:LJt,copy:dJt,checkmark:cJt,radioChecked:IJt,radioUnchecked:PJt,warning:jJt,check_circle:FJt,info:MJt,error:$Jt,refresh:BJt,sidebarCollapse:qJt,filterSliders:UJt,aggregate:hJt,dimension:mLe,filter:pJt,groupBy:mJt,insert:fJt,limit:gJt,orderBy:yJt,measure:pLe,nest:xJt,array:AJt,boolean:CJt,database:_Jt,date:RJt,json:TJt,number:wJt,query:OJt,search:aZt,sql_native:DJt,string:mLe,view:SJt,view_filled:NJt,many_to_one:vJt,one_to_many:bJt,one_to_one:EJt,viz_bar_chart:zJt,viz_boolean:HJt,viz_bytes:xLe,viz_cartesian_chart:Are,viz_column_chart:GJt,viz_currency:WJt,viz_dashboard:VJt,viz_image:QJt,viz_json:YJt,viz_line_chart:Are,viz_link:gLe,viz_list:KJt,viz_list_detail:XJt,viz_point_map:JJt,viz_segment_map:ZJt,viz_shape_map:eZt,viz_number:xLe,viz_percent:tZt,viz_scatter_chart:rZt,viz_single_value:pLe,viz_sparkline:nZt,viz_table:iZt,viz_text:sZt,viz_time:oZt,viz_url:gLe,viz_vega:Are};function An({name:a,color:u="primary",customStyle:d}){const f=lZt[a];return f?D.jsxRuntimeExports.jsx(f,{...Lt.props(uZt.main,cZt[u],d),"data-testid":`icon-${u}-${a}`}):null}const uZt={main:{display:"mly1rg5ohu",width:"mly1kky2od",height:"mlylup9mm",overflow:"mly1rea2x4",overflowX:null,overflowY:null,$$css:!0}},cZt={primary:{color:"mly1p68tcb",$$css:!0},secondary:{color:"mly1r0d382",$$css:!0},disabled:{color:"mly16un6j3",$$css:!0},primaryOnMedia:{color:"mly1kiansi",$$css:!0},gray:{color:"mlyann5r3",$$css:!0},purple:{color:"mly1ywypuw",$$css:!0},green:{color:"mly1evcnq1",$$css:!0},cyan:{color:"mly1h091fy",$$css:!0},info:{color:"mly1tw9ct1",$$css:!0},warning:{color:"mly7neac5",$$css:!0},positive:{color:"mly1l99qkd",$$css:!0},negative:{color:"mly109d434",$$css:!0}},dZt="gray";function Ex({label:a,color:u=dZt,icon:d,customStyle:f}){return D.jsxRuntimeExports.jsxs("div",{...Lt.props(yLe.main,fZt[u],f),children:[d&&D.jsxRuntimeExports.jsx(An,{color:u,name:d}),D.jsxRuntimeExports.jsx("div",{"data-testid":"badge-label",...Lt.props(Fr.badge,yLe.label),children:a})]})}const yLe={main:{display:"mly3nfvp2",height:"mly1qx5ct2",minWidth:"mlyt4ypqs",padding:"mlyxzb6uj",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,justifyContent:"mlyl56j7k",alignItems:"mly6s0dn4",gap:"mly1jnr06f",rowGap:null,columnGap:null,flexShrink:"mly2lah0s",borderRadius:"mly10hpsqq",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,background:"mlysu8s4a",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,$$css:!0},label:{overflow:"mlyb3r6kr",overflowX:null,overflowY:null,textAlign:"mly2b8uid",leadingTrim:"mly11e9jwx",textEdge:"mly1vqy1sf",textOverflow:"mlylyipyv",color:"mly1ard1hs",$$css:!0}},fZt={gray:{"--mly10mhzaa":"mly1rve117","--mly1ojyoay":"mlybcavtu",$$css:!0},purple:{"--mly10mhzaa":"mlyihc5ie","--mly1ojyoay":"mlywis56f",$$css:!0},green:{"--mly10mhzaa":"mly10cf5cp","--mly1ojyoay":"mlyy280wj",$$css:!0},cyan:{"--mly10mhzaa":"mlykvi9ht","--mly1ojyoay":"mly1eg6ybj",$$css:!0}},hZt="horizontal";function Y_({orientation:a=hZt,customStyle:u}){return D.jsxRuntimeExports.jsx("div",{...Lt.props(pZt.main,mZt[a],u)})}const pZt={main:{background:"mly1xnbgy5",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,$$css:!0}},mZt={horizontal:{height:"mlyjm9jq1",width:"mlyh8yej3",$$css:!0},vertical:{height:"mlypyat2d",width:"mly1i1rx1s",$$css:!0}};function gZt({children:a}){return D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mlydt5ytf mly167g77z",children:Y.Children.map(a,u=>u)})}var xZt=Y.createContext(void 0);function dN(a){const u=Y.useContext(xZt);return a||u||"ltr"}function jne(a,[u,d]){return Math.min(d,Math.max(u,a))}function yZt(a,u){return Y.useReducer((d,f)=>u[d][f]??d,a)}var pse="ScrollArea",[wje,Ryr]=Md(pse),[vZt,lc]=wje(pse),Oje=Y.forwardRef((a,u)=>{const{__scopeScrollArea:d,type:f="hover",dir:m,scrollHideDelay:g=600,...x}=a,[b,v]=Y.useState(null),[_,S]=Y.useState(null),[R,w]=Y.useState(null),[N,k]=Y.useState(null),[B,P]=Y.useState(null),[$,q]=Y.useState(0),[z,W]=Y.useState(0),[X,J]=Y.useState(!1),[ee,fe]=Y.useState(!1),be=Cn(u,_e=>v(_e)),je=dN(m);return D.jsxRuntimeExports.jsx(vZt,{scope:d,type:f,dir:je,scrollHideDelay:g,scrollArea:b,viewport:_,onViewportChange:S,content:R,onContentChange:w,scrollbarX:N,onScrollbarXChange:k,scrollbarXEnabled:X,onScrollbarXEnabledChange:J,scrollbarY:B,onScrollbarYChange:P,scrollbarYEnabled:ee,onScrollbarYEnabledChange:fe,onCornerWidthChange:q,onCornerHeightChange:W,children:D.jsxRuntimeExports.jsx(rn.div,{dir:je,...x,ref:be,style:{position:"relative","--radix-scroll-area-corner-width":$+"px","--radix-scroll-area-corner-height":z+"px",...a.style}})})});Oje.displayName=pse;var Nje="ScrollAreaViewport",Dje=Y.forwardRef((a,u)=>{const{__scopeScrollArea:d,children:f,nonce:m,...g}=a,x=lc(Nje,d),b=Y.useRef(null),v=Cn(u,b,x.onViewportChange);return D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:m}),D.jsxRuntimeExports.jsx(rn.div,{"data-radix-scroll-area-viewport":"",...g,ref:v,style:{overflowX:x.scrollbarXEnabled?"scroll":"hidden",overflowY:x.scrollbarYEnabled?"scroll":"hidden",...a.style},children:D.jsxRuntimeExports.jsx("div",{ref:x.onContentChange,style:{minWidth:"100%",display:"table"},children:f})})]})});Dje.displayName=Nje;var _h="ScrollAreaScrollbar",kje=Y.forwardRef((a,u)=>{const{forceMount:d,...f}=a,m=lc(_h,a.__scopeScrollArea),{onScrollbarXEnabledChange:g,onScrollbarYEnabledChange:x}=m,b=a.orientation==="horizontal";return Y.useEffect(()=>(b?g(!0):x(!0),()=>{b?g(!1):x(!1)}),[b,g,x]),m.type==="hover"?D.jsxRuntimeExports.jsx(bZt,{...f,ref:u,forceMount:d}):m.type==="scroll"?D.jsxRuntimeExports.jsx(EZt,{...f,ref:u,forceMount:d}):m.type==="auto"?D.jsxRuntimeExports.jsx(Lje,{...f,ref:u,forceMount:d}):m.type==="always"?D.jsxRuntimeExports.jsx(mse,{...f,ref:u}):null});kje.displayName=_h;var bZt=Y.forwardRef((a,u)=>{const{forceMount:d,...f}=a,m=lc(_h,a.__scopeScrollArea),[g,x]=Y.useState(!1);return Y.useEffect(()=>{const b=m.scrollArea;let v=0;if(b){const _=()=>{window.clearTimeout(v),x(!0)},S=()=>{v=window.setTimeout(()=>x(!1),m.scrollHideDelay)};return b.addEventListener("pointerenter",_),b.addEventListener("pointerleave",S),()=>{window.clearTimeout(v),b.removeEventListener("pointerenter",_),b.removeEventListener("pointerleave",S)}}},[m.scrollArea,m.scrollHideDelay]),D.jsxRuntimeExports.jsx(Do,{present:d||g,children:D.jsxRuntimeExports.jsx(Lje,{"data-state":g?"visible":"hidden",...f,ref:u})})}),EZt=Y.forwardRef((a,u)=>{const{forceMount:d,...f}=a,m=lc(_h,a.__scopeScrollArea),g=a.orientation==="horizontal",x=r$(()=>v("SCROLL_END"),100),[b,v]=yZt("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return Y.useEffect(()=>{if(b==="idle"){const _=window.setTimeout(()=>v("HIDE"),m.scrollHideDelay);return()=>window.clearTimeout(_)}},[b,m.scrollHideDelay,v]),Y.useEffect(()=>{const _=m.viewport,S=g?"scrollLeft":"scrollTop";if(_){let R=_[S];const w=()=>{const N=_[S];R!==N&&(v("SCROLL"),x()),R=N};return _.addEventListener("scroll",w),()=>_.removeEventListener("scroll",w)}},[m.viewport,g,v,x]),D.jsxRuntimeExports.jsx(Do,{present:d||b!=="hidden",children:D.jsxRuntimeExports.jsx(mse,{"data-state":b==="hidden"?"hidden":"visible",...f,ref:u,onPointerEnter:xr(a.onPointerEnter,()=>v("POINTER_ENTER")),onPointerLeave:xr(a.onPointerLeave,()=>v("POINTER_LEAVE"))})})}),Lje=Y.forwardRef((a,u)=>{const d=lc(_h,a.__scopeScrollArea),{forceMount:f,...m}=a,[g,x]=Y.useState(!1),b=a.orientation==="horizontal",v=r$(()=>{if(d.viewport){const _=d.viewport.offsetWidth<d.viewport.scrollWidth,S=d.viewport.offsetHeight<d.viewport.scrollHeight;x(b?_:S)}},10);return aS(d.viewport,v),aS(d.content,v),D.jsxRuntimeExports.jsx(Do,{present:f||g,children:D.jsxRuntimeExports.jsx(mse,{"data-state":g?"visible":"hidden",...m,ref:u})})}),mse=Y.forwardRef((a,u)=>{const{orientation:d="vertical",...f}=a,m=lc(_h,a.__scopeScrollArea),g=Y.useRef(null),x=Y.useRef(0),[b,v]=Y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),_=Mje(b.viewport,b.content),S={...f,sizes:b,onSizesChange:v,hasThumb:_>0&&_<1,onThumbChange:w=>g.current=w,onThumbPointerUp:()=>x.current=0,onThumbPointerDown:w=>x.current=w};function R(w,N){return TZt(w,x.current,b,N)}return d==="horizontal"?D.jsxRuntimeExports.jsx(_Zt,{...S,ref:u,onThumbPositionChange:()=>{if(m.viewport&&g.current){const w=m.viewport.scrollLeft,N=vLe(w,b,m.dir);g.current.style.transform=`translate3d(${N}px, 0, 0)`}},onWheelScroll:w=>{m.viewport&&(m.viewport.scrollLeft=w)},onDragScroll:w=>{m.viewport&&(m.viewport.scrollLeft=R(w,m.dir))}}):d==="vertical"?D.jsxRuntimeExports.jsx(SZt,{...S,ref:u,onThumbPositionChange:()=>{if(m.viewport&&g.current){const w=m.viewport.scrollTop,N=vLe(w,b);g.current.style.transform=`translate3d(0, ${N}px, 0)`}},onWheelScroll:w=>{m.viewport&&(m.viewport.scrollTop=w)},onDragScroll:w=>{m.viewport&&(m.viewport.scrollTop=R(w))}}):null}),_Zt=Y.forwardRef((a,u)=>{const{sizes:d,onSizesChange:f,...m}=a,g=lc(_h,a.__scopeScrollArea),[x,b]=Y.useState(),v=Y.useRef(null),_=Cn(u,v,g.onScrollbarXChange);return Y.useEffect(()=>{v.current&&b(getComputedStyle(v.current))},[v]),D.jsxRuntimeExports.jsx(Pje,{"data-orientation":"horizontal",...m,ref:_,sizes:d,style:{bottom:0,left:g.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:g.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":t$(d)+"px",...a.style},onThumbPointerDown:S=>a.onThumbPointerDown(S.x),onDragScroll:S=>a.onDragScroll(S.x),onWheelScroll:(S,R)=>{if(g.viewport){const w=g.viewport.scrollLeft+S.deltaX;a.onWheelScroll(w),Bje(w,R)&&S.preventDefault()}},onResize:()=>{v.current&&g.viewport&&x&&f({content:g.viewport.scrollWidth,viewport:g.viewport.offsetWidth,scrollbar:{size:v.current.clientWidth,paddingStart:JF(x.paddingLeft),paddingEnd:JF(x.paddingRight)}})}})}),SZt=Y.forwardRef((a,u)=>{const{sizes:d,onSizesChange:f,...m}=a,g=lc(_h,a.__scopeScrollArea),[x,b]=Y.useState(),v=Y.useRef(null),_=Cn(u,v,g.onScrollbarYChange);return Y.useEffect(()=>{v.current&&b(getComputedStyle(v.current))},[v]),D.jsxRuntimeExports.jsx(Pje,{"data-orientation":"vertical",...m,ref:_,sizes:d,style:{top:0,right:g.dir==="ltr"?0:void 0,left:g.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":t$(d)+"px",...a.style},onThumbPointerDown:S=>a.onThumbPointerDown(S.y),onDragScroll:S=>a.onDragScroll(S.y),onWheelScroll:(S,R)=>{if(g.viewport){const w=g.viewport.scrollTop+S.deltaY;a.onWheelScroll(w),Bje(w,R)&&S.preventDefault()}},onResize:()=>{v.current&&g.viewport&&x&&f({content:g.viewport.scrollHeight,viewport:g.viewport.offsetHeight,scrollbar:{size:v.current.clientHeight,paddingStart:JF(x.paddingTop),paddingEnd:JF(x.paddingBottom)}})}})}),[AZt,Ije]=wje(_h),Pje=Y.forwardRef((a,u)=>{const{__scopeScrollArea:d,sizes:f,hasThumb:m,onThumbChange:g,onThumbPointerUp:x,onThumbPointerDown:b,onThumbPositionChange:v,onDragScroll:_,onWheelScroll:S,onResize:R,...w}=a,N=lc(_h,d),[k,B]=Y.useState(null),P=Cn(u,be=>B(be)),$=Y.useRef(null),q=Y.useRef(""),z=N.viewport,W=f.content-f.viewport,X=Us(S),J=Us(v),ee=r$(R,10);function fe(be){if($.current){const je=be.clientX-$.current.left,_e=be.clientY-$.current.top;_({x:je,y:_e})}}return Y.useEffect(()=>{const be=je=>{const _e=je.target;k?.contains(_e)&&X(je,W)};return document.addEventListener("wheel",be,{passive:!1}),()=>document.removeEventListener("wheel",be,{passive:!1})},[z,k,W,X]),Y.useEffect(J,[f,J]),aS(k,ee),aS(N.content,ee),D.jsxRuntimeExports.jsx(AZt,{scope:d,scrollbar:k,hasThumb:m,onThumbChange:Us(g),onThumbPointerUp:Us(x),onThumbPositionChange:J,onThumbPointerDown:Us(b),children:D.jsxRuntimeExports.jsx(rn.div,{...w,ref:P,style:{position:"absolute",...w.style},onPointerDown:xr(a.onPointerDown,be=>{be.button===0&&(be.target.setPointerCapture(be.pointerId),$.current=k.getBoundingClientRect(),q.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",N.viewport&&(N.viewport.style.scrollBehavior="auto"),fe(be))}),onPointerMove:xr(a.onPointerMove,fe),onPointerUp:xr(a.onPointerUp,be=>{const je=be.target;je.hasPointerCapture(be.pointerId)&&je.releasePointerCapture(be.pointerId),document.body.style.webkitUserSelect=q.current,N.viewport&&(N.viewport.style.scrollBehavior=""),$.current=null})})})}),XF="ScrollAreaThumb",jje=Y.forwardRef((a,u)=>{const{forceMount:d,...f}=a,m=Ije(XF,a.__scopeScrollArea);return D.jsxRuntimeExports.jsx(Do,{present:d||m.hasThumb,children:D.jsxRuntimeExports.jsx(CZt,{ref:u,...f})})}),CZt=Y.forwardRef((a,u)=>{const{__scopeScrollArea:d,style:f,...m}=a,g=lc(XF,d),x=Ije(XF,d),{onThumbPositionChange:b}=x,v=Cn(u,R=>x.onThumbChange(R)),_=Y.useRef(void 0),S=r$(()=>{_.current&&(_.current(),_.current=void 0)},100);return Y.useEffect(()=>{const R=g.viewport;if(R){const w=()=>{if(S(),!_.current){const N=wZt(R,b);_.current=N,b()}};return b(),R.addEventListener("scroll",w),()=>R.removeEventListener("scroll",w)}},[g.viewport,S,b]),D.jsxRuntimeExports.jsx(rn.div,{"data-state":x.hasThumb?"visible":"hidden",...m,ref:v,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...f},onPointerDownCapture:xr(a.onPointerDownCapture,R=>{const N=R.target.getBoundingClientRect(),k=R.clientX-N.left,B=R.clientY-N.top;x.onThumbPointerDown({x:k,y:B})}),onPointerUp:xr(a.onPointerUp,x.onThumbPointerUp)})});jje.displayName=XF;var gse="ScrollAreaCorner",Fje=Y.forwardRef((a,u)=>{const d=lc(gse,a.__scopeScrollArea),f=!!(d.scrollbarX&&d.scrollbarY);return d.type!=="scroll"&&f?D.jsxRuntimeExports.jsx(RZt,{...a,ref:u}):null});Fje.displayName=gse;var RZt=Y.forwardRef((a,u)=>{const{__scopeScrollArea:d,...f}=a,m=lc(gse,d),[g,x]=Y.useState(0),[b,v]=Y.useState(0),_=!!(g&&b);return aS(m.scrollbarX,()=>{var S;const R=((S=m.scrollbarX)==null?void 0:S.offsetHeight)||0;m.onCornerHeightChange(R),v(R)}),aS(m.scrollbarY,()=>{var S;const R=((S=m.scrollbarY)==null?void 0:S.offsetWidth)||0;m.onCornerWidthChange(R),x(R)}),_?D.jsxRuntimeExports.jsx(rn.div,{...f,ref:u,style:{width:g,height:b,position:"absolute",right:m.dir==="ltr"?0:void 0,left:m.dir==="rtl"?0:void 0,bottom:0,...a.style}}):null});function JF(a){return a?parseInt(a,10):0}function Mje(a,u){const d=a/u;return isNaN(d)?0:d}function t$(a){const u=Mje(a.viewport,a.content),d=a.scrollbar.paddingStart+a.scrollbar.paddingEnd,f=(a.scrollbar.size-d)*u;return Math.max(f,18)}function TZt(a,u,d,f="ltr"){const m=t$(d),g=m/2,x=u||g,b=m-x,v=d.scrollbar.paddingStart+x,_=d.scrollbar.size-d.scrollbar.paddingEnd-b,S=d.content-d.viewport,R=f==="ltr"?[0,S]:[S*-1,0];return $je([v,_],R)(a)}function vLe(a,u,d="ltr"){const f=t$(u),m=u.scrollbar.paddingStart+u.scrollbar.paddingEnd,g=u.scrollbar.size-m,x=u.content-u.viewport,b=g-f,v=d==="ltr"?[0,x]:[x*-1,0],_=jne(a,v);return $je([0,x],[0,b])(_)}function $je(a,u){return d=>{if(a[0]===a[1]||u[0]===u[1])return u[0];const f=(u[1]-u[0])/(a[1]-a[0]);return u[0]+f*(d-a[0])}}function Bje(a,u){return a>0&&a<u}var wZt=(a,u=()=>{})=>{let d={left:a.scrollLeft,top:a.scrollTop},f=0;return function m(){const g={left:a.scrollLeft,top:a.scrollTop},x=d.left!==g.left,b=d.top!==g.top;(x||b)&&u(),d=g,f=window.requestAnimationFrame(m)}(),()=>window.cancelAnimationFrame(f)};function r$(a,u){const d=Us(a),f=Y.useRef(0);return Y.useEffect(()=>()=>window.clearTimeout(f.current),[]),Y.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(d,u)},[d,u])}function aS(a,u){const d=Us(u);ca(()=>{let f=0;if(a){const m=new ResizeObserver(()=>{cancelAnimationFrame(f),f=window.requestAnimationFrame(d)});return m.observe(a),()=>{window.cancelAnimationFrame(f),m.unobserve(a)}}},[a,d])}var OZt=Oje,NZt=Dje,bLe=kje,ELe=jje,DZt=Fje;function fN({children:a}){return D.jsxRuntimeExports.jsxs(OZt,{className:"mlyh8yej3 mly5yr21d mlyb3r6kr mly1bo1i26 mly1fzkygm mlynu5hmx mly1u5txqc",children:[D.jsxRuntimeExports.jsx(NZt,{className:"mlyh8yej3 mly5yr21d mly1pjcqnp",children:Y.Children.map(a,u=>u)}),D.jsxRuntimeExports.jsx(bLe,{className:"mly78zum5 mly3j5mvw mly15sj6ns mly14znju7 mlyehqz9p mly1xc55vz",orientation:"vertical",children:D.jsxRuntimeExports.jsx(ELe,{className:"mly98rzlu mly1o4sr5b mly12oqio5"})}),D.jsxRuntimeExports.jsx(bLe,{className:"mly78zum5 mly3j5mvw mly15sj6ns mly14znju7 mlydt5ytf mlyztvwtv mlydk7pt",orientation:"horizontal",children:D.jsxRuntimeExports.jsx(ELe,{className:"mly98rzlu mly1o4sr5b mly12oqio5"})}),D.jsxRuntimeExports.jsx(DZt,{className:"mly3j5mvw mly1d3ksz1 mly14znju7"})]})}const kZt="default",LZt="default";function $i({variant:a=kZt,size:u=LZt,icon:d,label:f,tooltip:m,isDisabled:g=!1,customStyle:x,...b}){const v=D.jsxRuntimeExports.jsxs("button",{...Lt.props(Cre.main,IZt[a],PZt[u],x),type:"button",disabled:g,...b,children:[D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlyl56j7k mly6s0dn4 mly167g77z",children:[d&&D.jsxRuntimeExports.jsx(An,{name:d,customStyle:Cre.icon}),f&&D.jsxRuntimeExports.jsx("div",{...Lt.props(a==="primary"?Fr.emphasized:Fr.body,Cre.label),children:f})]}),g&&D.jsxRuntimeExports.jsx("div",{className:"mly10l6tqk mlyu96u03 mly3m8u43 mlyzy8d55 mly47corl mlyur7f20 mlyh8yej3 mly5yr21d"})]});return m?D.jsxRuntimeExports.jsxs(LS,{delayDuration:300,children:[D.jsxRuntimeExports.jsx(IS,{asChild:!0,children:v}),D.jsxRuntimeExports.jsx(PS,{children:D.jsxRuntimeExports.jsx(jS,{sideOffset:8,...Lt.props(Fr.body,g0.default),children:m})})]}):v}const Cre={main:{display:"mly3nfvp2",flexDirection:"mlydt5ytf",justifyContent:"mlyl56j7k",alignItems:"mly6s0dn4",position:"mly1n2onr6",gap:"mly167g77z",rowGap:null,columnGap:null,borderRadius:"mlyur7f20",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,borderWidth:"mlyc342km",borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,cursor:"mly1ypdohk mly1s07b3s",flexShrink:"mly2lah0s",userSelect:"mly87ps6o",$$css:!0},icon:{color:"mlyuk6yi3",$$css:!0},label:{color:"mlyaerthn",whiteSpace:"mlyuxw1ft",$$css:!0}},IZt={default:{background:"mlygqa5hp mly1uceoyp mly1cncicd",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,"--mlyxo3nik":"mlypfd894 mlyiv1q3g","--mly1hpdckv":"mly5xbp4t mly1iu3zmn",$$css:!0},flat:{background:"mly1md70p1 mly14hn1a8 mlywghvya",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,"--mlyxo3nik":"mlypfd894 mlyiv1q3g","--mly1hpdckv":"mly5xbp4t mly1iu3zmn",$$css:!0},primary:{background:"mlyhcrij8 mly1vdl2d1 mly1u4cpcs",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,"--mlyxo3nik":"mly1n5rdk7 mly1dsjhx","--mly1hpdckv":"mly3mt86g mly13vk70h",$$css:!0}},PZt={default:{height:"mlyc9qbxq",padding:"mly153ncpu",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0},compact:{height:"mly1fgtraw",padding:"mlydqdrvq",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0}},Cx={main:{display:"mlywz0xwf",gridAutoFlow:"mly1mt1orb",alignItems:"mly6s0dn4",justifyContent:"mlyl56j7k",gap:"mly167g77z",rowGap:null,columnGap:null,borderRadius:"mly12oqio5",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,borderWidth:"mlyc342km",borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,outline:"mly1a2a7pz",outlineColor:null,outlineOffset:null,outlineStyle:null,outlineWidth:null,cursor:"mly1ypdohk",overflow:"mlyb3r6kr",overflowX:null,overflowY:null,background:"mly1np9qvj mly1uceoyp",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,position:"mly1n2onr6",$$css:!0},icon:{color:"mlywn9h7t",$$css:!0},label:{color:"mly1xre2ib",textOverflow:"mlylyipyv",overflow:"mlyb3r6kr",overflowX:null,overflowY:null,whiteSpace:"mlyuxw1ft",$$css:!0}},xse={default:{"--mlyvygx4q":"mly1izbou4","--mly13n7235":"mly8bgh0r",$$css:!0},purple:{"--mlyvygx4q":"mly1f8soc4","--mly13n7235":"mly1r5zvhd",$$css:!0},green:{"--mlyvygx4q":"mlyf8wvcd","--mly13n7235":"mly1u6t2w6",$$css:!0},cyan:{"--mlyvygx4q":"mlyrtwgpv","--mly13n7235":"mlys5r2en",$$css:!0}},yse={default:{padding:"mlydqdrvq",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0},compact:{padding:"mlyxzb6uj",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0}},FS="default",vse="default";function $s({label:a,icon:u,color:d=FS,size:f=vse,onClick:m,onHover:g,asButtonTrigger:x=!1,tooltip:b,tooltipProps:v,customStyle:_,dragProps:S,...R}){const w=m!==void 0||x,N=D.jsxRuntimeExports.jsxs("div",{...Lt.props(Cx.main,xse[d],yse[f],!w&&jZt.nonInteractive,_),...S?.attributes,...S?.listeners,children:[u&&D.jsxRuntimeExports.jsx(An,{name:u,customStyle:Cx.icon}),w&&D.jsxRuntimeExports.jsx("button",{className:"mlyh8yej3 mly5yr21d mly10l6tqk mly13vifvy mlyu96u03 mly1md70p1 mlyng3xce mly1ypdohk",...m&&{onClick:m},...g&&{onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1)},...R}),a&&D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.body,Cx.label),children:a})]});return b?D.jsxRuntimeExports.jsxs(oN,{delayDuration:300,children:[D.jsxRuntimeExports.jsx(aN,{asChild:!0,children:N}),D.jsxRuntimeExports.jsx(lN,{children:D.jsxRuntimeExports.jsx(uN,{...v,...Lt.props(typeof b=="string"?g0.default:g0.card),children:b})})]}):N}const jZt={nonInteractive:{cursor:"mlyt0e3qv",background:"mly1np9qvj",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,$$css:!0}};function hN({children:a,color:u=FS,customStyle:d}){const f=Y.Children.count(a);return D.jsxRuntimeExports.jsx("div",{...Lt.props(n5.main,d),children:Y.Children.map(a,(m,g)=>Y.cloneElement(m,{customStyle:{...m.props.customStyle,...FZt(g,f)},color:MZt(m,u)}))})}const FZt=(a,u)=>u===1?n5.onlyChild:a===0?n5.firstChild:a===u-1?n5.lastChild:n5.innerChild,MZt=(a,u)=>{const d=a.props.color;return d===void 0?u:d},n5={main:{display:"mlyrvj5dj",gridAutoFlow:"mly1mt1orb",alignItems:"mly6s0dn4",gap:"mly12mrbbr",rowGap:null,columnGap:null,$$css:!0},firstChild:{borderRadius:"mlytah5vv",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,$$css:!0},innerChild:{borderRadius:null,borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,$$css:!0},lastChild:{borderRadius:"mly19ctu66",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,$$css:!0},onlyChild:{borderRadius:"mly12oqio5",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,$$css:!0}};function n$({errorMessage:a}){return D.jsxRuntimeExports.jsxs(LS,{delayDuration:0,children:[D.jsxRuntimeExports.jsx(IS,{asChild:!0,children:D.jsxRuntimeExports.jsx("div",{className:"mlygd8bvy mly1fgtraw mly78zum5 mly6s0dn4 mlyl56j7k",children:D.jsxRuntimeExports.jsx(An,{name:"warning",customStyle:$Zt.errorIcon})})}),D.jsxRuntimeExports.jsx(PS,{children:D.jsxRuntimeExports.jsx(jS,{children:D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.body,g0.default),children:a})})})]})}const $Zt={errorIcon:{color:"mly1e2nbdu",$$css:!0}};function Fne({value:a,onChange:u,onRemove:d,icon:f,color:m=FS,size:g=vse,customStyle:x,type:b,errorMessage:v}){const[_,S]=Y.useState(!1),R=Y.useRef(null),w=Y.useRef(null),N=({target:P})=>{u(b==="number"?parseFloat(P.value||"0"):P.value)},k=()=>{S(!0)},B=P=>{var $;w.current==null||P.relatedTarget!==w.current?S(!1):($=R.current)==null||$.focus()};return D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly6s0dn4",children:[D.jsxRuntimeExports.jsxs("div",{...Lt.props(Cx.main,xse[m],yse[g],_&&FO.focused,!!v&&FO.hasError,x),children:[f&&D.jsxRuntimeExports.jsx(An,{name:f,customStyle:FO.icon}),D.jsxRuntimeExports.jsxs("span",{className:"mlywz0xwf",children:[D.jsxRuntimeExports.jsx("span",{...Lt.props(Fr.body,FO.placeholder),style:{whiteSpaceCollapse:"preserve"},children:a}),D.jsxRuntimeExports.jsx("input",{...Lt.props(FO.input,Fr.body),ref:R,pattern:b==="number"?"^-?[0-9.]*$":void 0,value:a,onChange:N,onFocus:k,onBlur:B,size:1})]}),d&&_&&D.jsxRuntimeExports.jsx("button",{className:"mly3nfvp2 mlyc342km mly1md70p1 mly1717udv mly1ypdohk",ref:w,onClick:d,tabIndex:0,children:D.jsxRuntimeExports.jsx(An,{name:"clear"})})]}),v&&D.jsxRuntimeExports.jsx(n$,{errorMessage:v})]})}const FO={focused:{background:"mlyotlr4g",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,boxShadow:"mlyn8fsvk",$$css:!0},hasError:{border:"mly1dc9p4k",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,$$css:!0},icon:{color:"mlywn9h7t",$$css:!0},placeholder:{background:"mly1md70p1",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,color:"mly19co3pv",gridArea:"mly15r89dc",gridRow:null,gridRowStart:null,gridRowEnd:null,gridColumn:null,gridColumnStart:null,gridColumnEnd:null,whiteSpace:"mlyuxw1ft",minWidth:"mlygc0pbm",$$css:!0},input:{color:"mly1xre2ib",gridArea:"mly15r89dc",gridRow:null,gridRowStart:null,gridRowEnd:null,gridColumn:null,gridColumnStart:null,gridColumnEnd:null,padding:"mly1717udv",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,background:"mly1md70p1",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,borderStyle:"mlyng3xce",borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,outline:"mly1a2a7pz",outlineColor:null,outlineOffset:null,outlineStyle:null,outlineWidth:null,whiteSpace:"mlyuxw1ft",minWidth:"mlygc0pbm",$$css:!0}};function bse(a){const u=a+"CollectionProvider",[d,f]=Md(u),[m,g]=d(u,{collectionRef:{current:null},itemMap:new Map}),x=N=>{const{scope:k,children:B}=N,P=Pe.useRef(null),$=Pe.useRef(new Map).current;return D.jsxRuntimeExports.jsx(m,{scope:k,itemMap:$,collectionRef:P,children:B})};x.displayName=u;const b=a+"CollectionSlot",v=Pe.forwardRef((N,k)=>{const{scope:B,children:P}=N,$=g(b,B),q=Cn(k,$.collectionRef);return D.jsxRuntimeExports.jsx(Tx,{ref:q,children:P})});v.displayName=b;const _=a+"CollectionItemSlot",S="data-radix-collection-item",R=Pe.forwardRef((N,k)=>{const{scope:B,children:P,...$}=N,q=Pe.useRef(null),z=Cn(k,q),W=g(_,B);return Pe.useEffect(()=>(W.itemMap.set(q,{ref:q,...$}),()=>void W.itemMap.delete(q))),D.jsxRuntimeExports.jsx(Tx,{[S]:"",ref:z,children:P})});R.displayName=_;function w(N){const k=g(a+"CollectionConsumer",N);return Pe.useCallback(()=>{const P=k.collectionRef.current;if(!P)return[];const $=Array.from(P.querySelectorAll(`[${S}]`));return Array.from(k.itemMap.values()).sort((W,X)=>$.indexOf(W.ref.current)-$.indexOf(X.ref.current))},[k.collectionRef,k.itemMap])}return[{Provider:x,Slot:v,ItemSlot:R},w,f]}var Rre=0;function i$(){Y.useEffect(()=>{const a=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",a[0]??_Le()),document.body.insertAdjacentElement("beforeend",a[1]??_Le()),Rre++,()=>{Rre===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(u=>u.remove()),Rre--}},[])}function _Le(){const a=document.createElement("span");return a.setAttribute("data-radix-focus-guard",""),a.tabIndex=0,a.style.outline="none",a.style.opacity="0",a.style.position="fixed",a.style.pointerEvents="none",a}var Tre="focusScope.autoFocusOnMount",wre="focusScope.autoFocusOnUnmount",SLe={bubbles:!1,cancelable:!0},BZt="FocusScope",pN=Y.forwardRef((a,u)=>{const{loop:d=!1,trapped:f=!1,onMountAutoFocus:m,onUnmountAutoFocus:g,...x}=a,[b,v]=Y.useState(null),_=Us(m),S=Us(g),R=Y.useRef(null),w=Cn(u,B=>v(B)),N=Y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;Y.useEffect(()=>{if(f){let B=function(z){if(N.paused||!b)return;const W=z.target;b.contains(W)?R.current=W:yx(R.current,{select:!0})},P=function(z){if(N.paused||!b)return;const W=z.relatedTarget;W!==null&&(b.contains(W)||yx(R.current,{select:!0}))},$=function(z){if(document.activeElement===document.body)for(const X of z)X.removedNodes.length>0&&yx(b)};document.addEventListener("focusin",B),document.addEventListener("focusout",P);const q=new MutationObserver($);return b&&q.observe(b,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",B),document.removeEventListener("focusout",P),q.disconnect()}}},[f,b,N.paused]),Y.useEffect(()=>{if(b){CLe.add(N);const B=document.activeElement;if(!b.contains(B)){const $=new CustomEvent(Tre,SLe);b.addEventListener(Tre,_),b.dispatchEvent($),$.defaultPrevented||(qZt(WZt(qje(b)),{select:!0}),document.activeElement===B&&yx(b))}return()=>{b.removeEventListener(Tre,_),setTimeout(()=>{const $=new CustomEvent(wre,SLe);b.addEventListener(wre,S),b.dispatchEvent($),$.defaultPrevented||yx(B??document.body,{select:!0}),b.removeEventListener(wre,S),CLe.remove(N)},0)}}},[b,_,S,N]);const k=Y.useCallback(B=>{if(!d&&!f||N.paused)return;const P=B.key==="Tab"&&!B.altKey&&!B.ctrlKey&&!B.metaKey,$=document.activeElement;if(P&&$){const q=B.currentTarget,[z,W]=UZt(q);z&&W?!B.shiftKey&&$===W?(B.preventDefault(),d&&yx(z,{select:!0})):B.shiftKey&&$===z&&(B.preventDefault(),d&&yx(W,{select:!0})):$===q&&B.preventDefault()}},[d,f,N.paused]);return D.jsxRuntimeExports.jsx(rn.div,{tabIndex:-1,...x,ref:w,onKeyDown:k})});pN.displayName=BZt;function qZt(a,{select:u=!1}={}){const d=document.activeElement;for(const f of a)if(yx(f,{select:u}),document.activeElement!==d)return}function UZt(a){const u=qje(a),d=ALe(u,a),f=ALe(u.reverse(),a);return[d,f]}function qje(a){const u=[],d=document.createTreeWalker(a,NodeFilter.SHOW_ELEMENT,{acceptNode:f=>{const m=f.tagName==="INPUT"&&f.type==="hidden";return f.disabled||f.hidden||m?NodeFilter.FILTER_SKIP:f.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;d.nextNode();)u.push(d.currentNode);return u}function ALe(a,u){for(const d of a)if(!zZt(d,{upTo:u}))return d}function zZt(a,{upTo:u}){if(getComputedStyle(a).visibility==="hidden")return!0;for(;a;){if(u!==void 0&&a===u)return!1;if(getComputedStyle(a).display==="none")return!0;a=a.parentElement}return!1}function HZt(a){return a instanceof HTMLInputElement&&"select"in a}function yx(a,{select:u=!1}={}){if(a&&a.focus){const d=document.activeElement;a.focus({preventScroll:!0}),a!==d&&HZt(a)&&u&&a.select()}}var CLe=GZt();function GZt(){let a=[];return{add(u){const d=a[0];u!==d&&d?.pause(),a=RLe(a,u),a.unshift(u)},remove(u){var d;a=RLe(a,u),(d=a[0])==null||d.resume()}}}function RLe(a,u){const d=[...a],f=d.indexOf(u);return f!==-1&&d.splice(f,1),d}function WZt(a){return a.filter(u=>u.tagName!=="A")}function VZt(a){const u=Y.useRef({value:a,previous:a});return Y.useMemo(()=>(u.current.value!==a&&(u.current.previous=u.current.value,u.current.value=a),u.current.previous),[a])}var QZt=function(a){if(typeof document>"u")return null;var u=Array.isArray(a)?a[0]:a;return u.ownerDocument.body},P_=new WeakMap,Gj=new WeakMap,Wj={},Ore=0,Uje=function(a){return a&&(a.host||Uje(a.parentNode))},YZt=function(a,u){return u.map(function(d){if(a.contains(d))return d;var f=Uje(d);return f&&a.contains(f)?f:(console.error("aria-hidden",d,"in not contained inside",a,". Doing nothing"),null)}).filter(function(d){return!!d})},KZt=function(a,u,d,f){var m=YZt(u,Array.isArray(a)?a:[a]);Wj[d]||(Wj[d]=new WeakMap);var g=Wj[d],x=[],b=new Set,v=new Set(m),_=function(R){!R||b.has(R)||(b.add(R),_(R.parentNode))};m.forEach(_);var S=function(R){!R||v.has(R)||Array.prototype.forEach.call(R.children,function(w){if(b.has(w))S(w);else try{var N=w.getAttribute(f),k=N!==null&&N!=="false",B=(P_.get(w)||0)+1,P=(g.get(w)||0)+1;P_.set(w,B),g.set(w,P),x.push(w),B===1&&k&&Gj.set(w,!0),P===1&&w.setAttribute(d,"true"),k||w.setAttribute(f,"true")}catch($){console.error("aria-hidden: cannot operate on ",w,$)}})};return S(u),b.clear(),Ore++,function(){x.forEach(function(R){var w=P_.get(R)-1,N=g.get(R)-1;P_.set(R,w),g.set(R,N),w||(Gj.has(R)||R.removeAttribute(f),Gj.delete(R)),N||R.removeAttribute(d)}),Ore--,Ore||(P_=new WeakMap,P_=new WeakMap,Gj=new WeakMap,Wj={})}},s$=function(a,u,d){d===void 0&&(d="data-aria-hidden");var f=Array.from(Array.isArray(a)?a:[a]),m=QZt(a);return m?(f.push.apply(f,Array.from(m.querySelectorAll("[aria-live]"))),KZt(f,m,d,"aria-hidden")):function(){return null}},fh=function(){return fh=Object.assign||function(u){for(var d,f=1,m=arguments.length;f<m;f++){d=arguments[f];for(var g in d)Object.prototype.hasOwnProperty.call(d,g)&&(u[g]=d[g])}return u},fh.apply(this,arguments)};function zje(a,u){var d={};for(var f in a)Object.prototype.hasOwnProperty.call(a,f)&&u.indexOf(f)<0&&(d[f]=a[f]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var m=0,f=Object.getOwnPropertySymbols(a);m<f.length;m++)u.indexOf(f[m])<0&&Object.prototype.propertyIsEnumerable.call(a,f[m])&&(d[f[m]]=a[f[m]]);return d}function XZt(a,u,d){for(var f=0,m=u.length,g;f<m;f++)(g||!(f in u))&&(g||(g=Array.prototype.slice.call(u,0,f)),g[f]=u[f]);return a.concat(g||Array.prototype.slice.call(u))}var AF="right-scroll-bar-position",CF="width-before-scroll-bar",JZt="with-scroll-bars-hidden",ZZt="--removed-body-scroll-bar-size";function Nre(a,u){return typeof a=="function"?a(u):a&&(a.current=u),a}function eer(a,u){var d=Pe.useState(function(){return{value:a,callback:u,facade:{get current(){return d.value},set current(f){var m=d.value;m!==f&&(d.value=f,d.callback(f,m))}}}})[0];return d.callback=u,d.facade}var ter=typeof window<"u"?Y.useLayoutEffect:Y.useEffect,TLe=new WeakMap;function rer(a,u){var d=eer(null,function(f){return a.forEach(function(m){return Nre(m,f)})});return ter(function(){var f=TLe.get(d);if(f){var m=new Set(f),g=new Set(a),x=d.current;m.forEach(function(b){g.has(b)||Nre(b,null)}),g.forEach(function(b){m.has(b)||Nre(b,x)})}TLe.set(d,a)},[a]),d}function ner(a){return a}function ier(a,u){u===void 0&&(u=ner);var d=[],f=!1,m={read:function(){if(f)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return d.length?d[d.length-1]:a},useMedium:function(g){var x=u(g,f);return d.push(x),function(){d=d.filter(function(b){return b!==x})}},assignSyncMedium:function(g){for(f=!0;d.length;){var x=d;d=[],x.forEach(g)}d={push:function(b){return g(b)},filter:function(){return d}}},assignMedium:function(g){f=!0;var x=[];if(d.length){var b=d;d=[],b.forEach(g),x=d}var v=function(){var S=x;x=[],S.forEach(g)},_=function(){return Promise.resolve().then(v)};_(),d={push:function(S){x.push(S),_()},filter:function(S){return x=x.filter(S),d}}}};return m}function ser(a){a===void 0&&(a={});var u=ier(null);return u.options=fh({async:!0,ssr:!1},a),u}var Hje=function(a){var u=a.sideCar,d=zje(a,["sideCar"]);if(!u)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var f=u.read();if(!f)throw new Error("Sidecar medium not found");return Y.createElement(f,fh({},d))};Hje.isSideCarExport=!0;function oer(a,u){return a.useMedium(u),Hje}var Gje=ser(),Dre=function(){},o$=Y.forwardRef(function(a,u){var d=Y.useRef(null),f=Y.useState({onScrollCapture:Dre,onWheelCapture:Dre,onTouchMoveCapture:Dre}),m=f[0],g=f[1],x=a.forwardProps,b=a.children,v=a.className,_=a.removeScrollBar,S=a.enabled,R=a.shards,w=a.sideCar,N=a.noIsolation,k=a.inert,B=a.allowPinchZoom,P=a.as,$=P===void 0?"div":P,q=a.gapMode,z=zje(a,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),W=w,X=rer([d,u]),J=fh(fh({},z),m);return Y.createElement(Y.Fragment,null,S&&Y.createElement(W,{sideCar:Gje,removeScrollBar:_,shards:R,noIsolation:N,inert:k,setCallbacks:g,allowPinchZoom:!!B,lockRef:d,gapMode:q}),x?Y.cloneElement(Y.Children.only(b),fh(fh({},J),{ref:X})):Y.createElement($,fh({},J,{className:v,ref:X}),b))});o$.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};o$.classNames={fullWidth:CF,zeroRight:AF};var aer=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ler(){if(!document)return null;var a=document.createElement("style");a.type="text/css";var u=aer();return u&&a.setAttribute("nonce",u),a}function uer(a,u){a.styleSheet?a.styleSheet.cssText=u:a.appendChild(document.createTextNode(u))}function cer(a){var u=document.head||document.getElementsByTagName("head")[0];u.appendChild(a)}var der=function(){var a=0,u=null;return{add:function(d){a==0&&(u=ler())&&(uer(u,d),cer(u)),a++},remove:function(){a--,!a&&u&&(u.parentNode&&u.parentNode.removeChild(u),u=null)}}},fer=function(){var a=der();return function(u,d){Y.useEffect(function(){return a.add(u),function(){a.remove()}},[u&&d])}},Wje=function(){var a=fer(),u=function(d){var f=d.styles,m=d.dynamic;return a(f,m),null};return u},her={left:0,top:0,right:0,gap:0},kre=function(a){return parseInt(a||"",10)||0},per=function(a){var u=window.getComputedStyle(document.body),d=u[a==="padding"?"paddingLeft":"marginLeft"],f=u[a==="padding"?"paddingTop":"marginTop"],m=u[a==="padding"?"paddingRight":"marginRight"];return[kre(d),kre(f),kre(m)]},mer=function(a){if(a===void 0&&(a="margin"),typeof window>"u")return her;var u=per(a),d=document.documentElement.clientWidth,f=window.innerWidth;return{left:u[0],top:u[1],right:u[2],gap:Math.max(0,f-d+u[2]-u[0])}},ger=Wje(),K_="data-scroll-locked",xer=function(a,u,d,f){var m=a.left,g=a.top,x=a.right,b=a.gap;return d===void 0&&(d="margin"),`
|
|
2674
|
+
`}var MHt=br("<div>");function $Ht(t,{element:e}){const r=e.renderRoot;r instanceof ShadowRoot&&t.stylesheet&&r.adoptedStyleSheets.push(t.stylesheet);const i=[...e.childNodes];return(()=>{var s=MHt();return Tr(s,i),s})()}function BHt({customElements:t=window.customElements,HTMLElement:e=window.HTMLElement}){t.get("malloy-render")?console.warn("The custom element 'malloy-render' has already been defined. Make sure you are not loading multiple versions of the malloy-render package as they could conflict."):w(N("malloy-render",{malloyResult:void 0,result:void 0,queryResult:void 0,modelDef:void 0,scrollEl:void 0,onClick:void 0,onDrill:void 0,vegaConfigOverride:void 0,tableConfig:void 0,dashboardConfig:void 0,modalElement:void 0,renderAs:void 0},{customElements:t,BaseElement:e}),Hoe)(PHt),t.get("malloy-modal")||w(N("malloy-modal",{stylesheet:void 0},{customElements:t,BaseElement:e}),Hoe)($Ht)}BHt({})})),Zke}KYt();var XYt=Object.defineProperty,JYt=Object.getPrototypeOf,ZYt=Reflect.get,QPe=a=>{throw TypeError(a)},eKt=(a,u,d)=>u in a?XYt(a,u,{enumerable:!0,configurable:!0,writable:!0,value:d}):a[u]=d,Ht=(a,u,d)=>eKt(a,typeof u!="symbol"?u+"":u,d),tse=(a,u,d)=>u.has(a)||QPe("Cannot "+d),_l=(a,u,d)=>(tse(a,u,"read from private field"),d?d.call(a):u.get(a)),D_=(a,u,d)=>u.has(a)?QPe("Cannot add the same private member more than once"):u instanceof WeakSet?u.add(a):u.set(a,d),oh=(a,u,d,f)=>(tse(a,u,"write to private field"),u.set(a,d),d),tLe=(a,u,d)=>(tse(a,u,"access private method"),d),tKt=(a,u,d)=>ZYt(JYt(a),d,u),k_,Jm,Ov,fx,L_,Nv,I_,Uj,Ere,PO;function xr(a,u,{checkForDefaultPrevented:d=!0}={}){return function(m){if(a?.(m),d===!1||!m.defaultPrevented)return u?.(m)}}function rLe(a,u){if(typeof a=="function")return a(u);a!=null&&(a.current=u)}function GM(...a){return u=>{let d=!1;const f=a.map(m=>{const g=rLe(m,u);return!d&&typeof g=="function"&&(d=!0),g});if(d)return()=>{for(let m=0;m<f.length;m++){const g=f[m];typeof g=="function"?g():rLe(a[m],null)}}}}function Cn(...a){return Y.useCallback(GM(...a),a)}function rKt(a,u){const d=Y.createContext(u),f=g=>{const{children:x,...b}=g,v=Y.useMemo(()=>b,Object.values(b));return D.jsxRuntimeExports.jsx(d.Provider,{value:v,children:x})};f.displayName=a+"Provider";function m(g){const x=Y.useContext(d);if(x)return x;if(u!==void 0)return u;throw new Error(`\`${g}\` must be used within \`${a}\``)}return[f,m]}function Md(a,u=[]){let d=[];function f(g,x){const b=Y.createContext(x),v=d.length;d=[...d,x];const _=R=>{var w;const{scope:N,children:k,...B}=R,P=((w=N?.[a])==null?void 0:w[v])||b,$=Y.useMemo(()=>B,Object.values(B));return D.jsxRuntimeExports.jsx(P.Provider,{value:$,children:k})};_.displayName=g+"Provider";function S(R,w){var N;const k=((N=w?.[a])==null?void 0:N[v])||b,B=Y.useContext(k);if(B)return B;if(x!==void 0)return x;throw new Error(`\`${R}\` must be used within \`${g}\``)}return[_,S]}const m=()=>{const g=d.map(x=>Y.createContext(x));return function(b){const v=b?.[a]||g;return Y.useMemo(()=>({[`__scope${a}`]:{...b,[a]:v}}),[b,v])}};return m.scopeName=a,[f,nKt(m,...u)]}function nKt(...a){const u=a[0];if(a.length===1)return u;const d=()=>{const f=a.map(m=>({useScope:m(),scopeName:m.scopeName}));return function(g){const x=f.reduce((b,{useScope:v,scopeName:_})=>{const R=v(g)[`__scope${_}`];return{...b,...R}},{});return Y.useMemo(()=>({[`__scope${u.scopeName}`]:x}),[x])}};return d.scopeName=u.scopeName,d}var Tx=Y.forwardRef((a,u)=>{const{children:d,...f}=a,m=Y.Children.toArray(d),g=m.find(iKt);if(g){const x=g.props.children,b=m.map(v=>v===g?Y.Children.count(x)>1?Y.Children.only(null):Y.isValidElement(x)?x.props.children:null:v);return D.jsxRuntimeExports.jsx(One,{...f,ref:u,children:Y.isValidElement(x)?Y.cloneElement(x,void 0,b):null})}return D.jsxRuntimeExports.jsx(One,{...f,ref:u,children:d})});Tx.displayName="Slot";var One=Y.forwardRef((a,u)=>{const{children:d,...f}=a;if(Y.isValidElement(d)){const m=oKt(d),g=sKt(f,d.props);return d.type!==Y.Fragment&&(g.ref=u?GM(u,m):m),Y.cloneElement(d,g)}return Y.Children.count(d)>1?Y.Children.only(null):null});One.displayName="SlotClone";var YPe=({children:a})=>D.jsxRuntimeExports.jsx(D.jsxRuntimeExports.Fragment,{children:a});function iKt(a){return Y.isValidElement(a)&&a.type===YPe}function sKt(a,u){const d={...u};for(const f in u){const m=a[f],g=u[f];/^on[A-Z]/.test(f)?m&&g?d[f]=(...b)=>{g(...b),m(...b)}:m&&(d[f]=m):f==="style"?d[f]={...m,...g}:f==="className"&&(d[f]=[m,g].filter(Boolean).join(" "))}return{...a,...d}}function oKt(a){var u,d;let f=(u=Object.getOwnPropertyDescriptor(a.props,"ref"))==null?void 0:u.get,m=f&&"isReactWarning"in f&&f.isReactWarning;return m?a.ref:(f=(d=Object.getOwnPropertyDescriptor(a,"ref"))==null?void 0:d.get,m=f&&"isReactWarning"in f&&f.isReactWarning,m?a.props.ref:a.props.ref||a.ref)}var aKt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],rn=aKt.reduce((a,u)=>{const d=Y.forwardRef((f,m)=>{const{asChild:g,...x}=f,b=g?Tx:u;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),D.jsxRuntimeExports.jsx(b,{...x,ref:m})});return d.displayName=`Primitive.${u}`,{...a,[u]:d}},{});function KPe(a,u){a&&RM.flushSync(()=>a.dispatchEvent(u))}function Us(a){const u=Y.useRef(a);return Y.useEffect(()=>{u.current=a}),Y.useMemo(()=>(...d)=>{var f;return(f=u.current)==null?void 0:f.call(u,...d)},[])}function lKt(a,u=globalThis?.document){const d=Us(a);Y.useEffect(()=>{const f=m=>{m.key==="Escape"&&d(m)};return u.addEventListener("keydown",f,{capture:!0}),()=>u.removeEventListener("keydown",f,{capture:!0})},[d,u])}var uKt="DismissableLayer",Nne="dismissableLayer.update",cKt="dismissableLayer.pointerDownOutside",dKt="dismissableLayer.focusOutside",nLe,XPe=Y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),OS=Y.forwardRef((a,u)=>{const{disableOutsidePointerEvents:d=!1,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:g,onInteractOutside:x,onDismiss:b,...v}=a,_=Y.useContext(XPe),[S,R]=Y.useState(null),w=S?.ownerDocument??globalThis?.document,[,N]=Y.useState({}),k=Cn(u,ee=>R(ee)),B=Array.from(_.layers),[P]=[..._.layersWithOutsidePointerEventsDisabled].slice(-1),$=B.indexOf(P),q=S?B.indexOf(S):-1,z=_.layersWithOutsidePointerEventsDisabled.size>0,W=q>=$,X=pKt(ee=>{const fe=ee.target,be=[..._.branches].some(je=>je.contains(fe));!W||be||(m?.(ee),x?.(ee),ee.defaultPrevented||b?.())},w),J=mKt(ee=>{const fe=ee.target;[..._.branches].some(je=>je.contains(fe))||(g?.(ee),x?.(ee),ee.defaultPrevented||b?.())},w);return lKt(ee=>{q===_.layers.size-1&&(f?.(ee),!ee.defaultPrevented&&b&&(ee.preventDefault(),b()))},w),Y.useEffect(()=>{if(S)return d&&(_.layersWithOutsidePointerEventsDisabled.size===0&&(nLe=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),_.layersWithOutsidePointerEventsDisabled.add(S)),_.layers.add(S),iLe(),()=>{d&&_.layersWithOutsidePointerEventsDisabled.size===1&&(w.body.style.pointerEvents=nLe)}},[S,w,d,_]),Y.useEffect(()=>()=>{S&&(_.layers.delete(S),_.layersWithOutsidePointerEventsDisabled.delete(S),iLe())},[S,_]),Y.useEffect(()=>{const ee=()=>N({});return document.addEventListener(Nne,ee),()=>document.removeEventListener(Nne,ee)},[]),D.jsxRuntimeExports.jsx(rn.div,{...v,ref:k,style:{pointerEvents:z?W?"auto":"none":void 0,...a.style},onFocusCapture:xr(a.onFocusCapture,J.onFocusCapture),onBlurCapture:xr(a.onBlurCapture,J.onBlurCapture),onPointerDownCapture:xr(a.onPointerDownCapture,X.onPointerDownCapture)})});OS.displayName=uKt;var fKt="DismissableLayerBranch",hKt=Y.forwardRef((a,u)=>{const d=Y.useContext(XPe),f=Y.useRef(null),m=Cn(u,f);return Y.useEffect(()=>{const g=f.current;if(g)return d.branches.add(g),()=>{d.branches.delete(g)}},[d.branches]),D.jsxRuntimeExports.jsx(rn.div,{...a,ref:m})});hKt.displayName=fKt;function pKt(a,u=globalThis?.document){const d=Us(a),f=Y.useRef(!1),m=Y.useRef(()=>{});return Y.useEffect(()=>{const g=b=>{if(b.target&&!f.current){let v=function(){JPe(cKt,d,_,{discrete:!0})};const _={originalEvent:b};b.pointerType==="touch"?(u.removeEventListener("click",m.current),m.current=v,u.addEventListener("click",m.current,{once:!0})):v()}else u.removeEventListener("click",m.current);f.current=!1},x=window.setTimeout(()=>{u.addEventListener("pointerdown",g)},0);return()=>{window.clearTimeout(x),u.removeEventListener("pointerdown",g),u.removeEventListener("click",m.current)}},[u,d]),{onPointerDownCapture:()=>f.current=!0}}function mKt(a,u=globalThis?.document){const d=Us(a),f=Y.useRef(!1);return Y.useEffect(()=>{const m=g=>{g.target&&!f.current&&JPe(dKt,d,{originalEvent:g},{discrete:!1})};return u.addEventListener("focusin",m),()=>u.removeEventListener("focusin",m)},[u,d]),{onFocusCapture:()=>f.current=!0,onBlurCapture:()=>f.current=!1}}function iLe(){const a=new CustomEvent(Nne);document.dispatchEvent(a)}function JPe(a,u,d,{discrete:f}){const m=d.originalEvent.target,g=new CustomEvent(a,{bubbles:!1,cancelable:!0,detail:d});u&&m.addEventListener(a,u,{once:!0}),f?KPe(m,g):m.dispatchEvent(g)}var ca=globalThis?.document?Y.useLayoutEffect:()=>{},gKt=Y.useId||(()=>{}),xKt=0;function ic(a){const[u,d]=Y.useState(gKt());return ca(()=>{d(f=>f??String(xKt++))},[a]),u?`radix-${u}`:""}const yKt=["top","right","bottom","left"],wx=Math.min,ou=Math.max,VF=Math.round,zj=Math.floor,mh=a=>({x:a,y:a}),vKt={left:"right",right:"left",bottom:"top",top:"bottom"},bKt={start:"end",end:"start"};function Dne(a,u,d){return ou(a,wx(u,d))}function p0(a,u){return typeof a=="function"?a(u):a}function m0(a){return a.split("-")[0]}function NS(a){return a.split("-")[1]}function rse(a){return a==="x"?"y":"x"}function nse(a){return a==="y"?"height":"width"}function Ox(a){return["top","bottom"].includes(m0(a))?"y":"x"}function ise(a){return rse(Ox(a))}function EKt(a,u,d){d===void 0&&(d=!1);const f=NS(a),m=ise(a),g=nse(m);let x=m==="x"?f===(d?"end":"start")?"right":"left":f==="start"?"bottom":"top";return u.reference[g]>u.floating[g]&&(x=QF(x)),[x,QF(x)]}function _Kt(a){const u=QF(a);return[kne(a),u,kne(u)]}function kne(a){return a.replace(/start|end/g,u=>bKt[u])}function SKt(a,u,d){const f=["left","right"],m=["right","left"],g=["top","bottom"],x=["bottom","top"];switch(a){case"top":case"bottom":return d?u?m:f:u?f:m;case"left":case"right":return u?g:x;default:return[]}}function AKt(a,u,d,f){const m=NS(a);let g=SKt(m0(a),d==="start",f);return m&&(g=g.map(x=>x+"-"+m),u&&(g=g.concat(g.map(kne)))),g}function QF(a){return a.replace(/left|right|bottom|top/g,u=>vKt[u])}function CKt(a){return{top:0,right:0,bottom:0,left:0,...a}}function ZPe(a){return typeof a!="number"?CKt(a):{top:a,right:a,bottom:a,left:a}}function YF(a){const{x:u,y:d,width:f,height:m}=a;return{width:f,height:m,top:d,left:u,right:u+f,bottom:d+m,x:u,y:d}}function sLe(a,u,d){let{reference:f,floating:m}=a;const g=Ox(u),x=ise(u),b=nse(x),v=m0(u),_=g==="y",S=f.x+f.width/2-m.width/2,R=f.y+f.height/2-m.height/2,w=f[b]/2-m[b]/2;let N;switch(v){case"top":N={x:S,y:f.y-m.height};break;case"bottom":N={x:S,y:f.y+f.height};break;case"right":N={x:f.x+f.width,y:R};break;case"left":N={x:f.x-m.width,y:R};break;default:N={x:f.x,y:f.y}}switch(NS(u)){case"start":N[x]-=w*(d&&_?-1:1);break;case"end":N[x]+=w*(d&&_?-1:1);break}return N}const RKt=async(a,u,d)=>{const{placement:f="bottom",strategy:m="absolute",middleware:g=[],platform:x}=d,b=g.filter(Boolean),v=await(x.isRTL==null?void 0:x.isRTL(u));let _=await x.getElementRects({reference:a,floating:u,strategy:m}),{x:S,y:R}=sLe(_,f,v),w=f,N={},k=0;for(let B=0;B<b.length;B++){const{name:P,fn:$}=b[B],{x:q,y:z,data:W,reset:X}=await $({x:S,y:R,initialPlacement:f,placement:w,strategy:m,middlewareData:N,rects:_,platform:x,elements:{reference:a,floating:u}});S=q??S,R=z??R,N={...N,[P]:{...N[P],...W}},X&&k<=50&&(k++,typeof X=="object"&&(X.placement&&(w=X.placement),X.rects&&(_=X.rects===!0?await x.getElementRects({reference:a,floating:u,strategy:m}):X.rects),{x:S,y:R}=sLe(_,w,v)),B=-1)}return{x:S,y:R,placement:w,strategy:m,middlewareData:N}};async function C5(a,u){var d;u===void 0&&(u={});const{x:f,y:m,platform:g,rects:x,elements:b,strategy:v}=a,{boundary:_="clippingAncestors",rootBoundary:S="viewport",elementContext:R="floating",altBoundary:w=!1,padding:N=0}=p0(u,a),k=ZPe(N),P=b[w?R==="floating"?"reference":"floating":R],$=YF(await g.getClippingRect({element:(d=await(g.isElement==null?void 0:g.isElement(P)))==null||d?P:P.contextElement||await(g.getDocumentElement==null?void 0:g.getDocumentElement(b.floating)),boundary:_,rootBoundary:S,strategy:v})),q=R==="floating"?{x:f,y:m,width:x.floating.width,height:x.floating.height}:x.reference,z=await(g.getOffsetParent==null?void 0:g.getOffsetParent(b.floating)),W=await(g.isElement==null?void 0:g.isElement(z))?await(g.getScale==null?void 0:g.getScale(z))||{x:1,y:1}:{x:1,y:1},X=YF(g.convertOffsetParentRelativeRectToViewportRelativeRect?await g.convertOffsetParentRelativeRectToViewportRelativeRect({elements:b,rect:q,offsetParent:z,strategy:v}):q);return{top:($.top-X.top+k.top)/W.y,bottom:(X.bottom-$.bottom+k.bottom)/W.y,left:($.left-X.left+k.left)/W.x,right:(X.right-$.right+k.right)/W.x}}const TKt=a=>({name:"arrow",options:a,async fn(u){const{x:d,y:f,placement:m,rects:g,platform:x,elements:b,middlewareData:v}=u,{element:_,padding:S=0}=p0(a,u)||{};if(_==null)return{};const R=ZPe(S),w={x:d,y:f},N=ise(m),k=nse(N),B=await x.getDimensions(_),P=N==="y",$=P?"top":"left",q=P?"bottom":"right",z=P?"clientHeight":"clientWidth",W=g.reference[k]+g.reference[N]-w[N]-g.floating[k],X=w[N]-g.reference[N],J=await(x.getOffsetParent==null?void 0:x.getOffsetParent(_));let ee=J?J[z]:0;(!ee||!await(x.isElement==null?void 0:x.isElement(J)))&&(ee=b.floating[z]||g.floating[k]);const fe=W/2-X/2,be=ee/2-B[k]/2-1,je=wx(R[$],be),_e=wx(R[q],be),De=je,Xe=ee-B[k]-_e,ze=ee/2-B[k]/2+fe,te=Dne(De,ze,Xe),Ne=!v.arrow&&NS(m)!=null&&ze!==te&&g.reference[k]/2-(ze<De?je:_e)-B[k]/2<0,Ge=Ne?ze<De?ze-De:ze-Xe:0;return{[N]:w[N]+Ge,data:{[N]:te,centerOffset:ze-te-Ge,...Ne&&{alignmentOffset:Ge}},reset:Ne}}}),wKt=function(a){return a===void 0&&(a={}),{name:"flip",options:a,async fn(u){var d,f;const{placement:m,middlewareData:g,rects:x,initialPlacement:b,platform:v,elements:_}=u,{mainAxis:S=!0,crossAxis:R=!0,fallbackPlacements:w,fallbackStrategy:N="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:B=!0,...P}=p0(a,u);if((d=g.arrow)!=null&&d.alignmentOffset)return{};const $=m0(m),q=Ox(b),z=m0(b)===b,W=await(v.isRTL==null?void 0:v.isRTL(_.floating)),X=w||(z||!B?[QF(b)]:_Kt(b)),J=k!=="none";!w&&J&&X.push(...AKt(b,B,k,W));const ee=[b,...X],fe=await C5(u,P),be=[];let je=((f=g.flip)==null?void 0:f.overflows)||[];if(S&&be.push(fe[$]),R){const ze=EKt(m,x,W);be.push(fe[ze[0]],fe[ze[1]])}if(je=[...je,{placement:m,overflows:be}],!be.every(ze=>ze<=0)){var _e,De;const ze=(((_e=g.flip)==null?void 0:_e.index)||0)+1,te=ee[ze];if(te)return{data:{index:ze,overflows:je},reset:{placement:te}};let Ne=(De=je.filter(Ge=>Ge.overflows[0]<=0).sort((Ge,mt)=>Ge.overflows[1]-mt.overflows[1])[0])==null?void 0:De.placement;if(!Ne)switch(N){case"bestFit":{var Xe;const Ge=(Xe=je.filter(mt=>{if(J){const Je=Ox(mt.placement);return Je===q||Je==="y"}return!0}).map(mt=>[mt.placement,mt.overflows.filter(Je=>Je>0).reduce((Je,rt)=>Je+rt,0)]).sort((mt,Je)=>mt[1]-Je[1])[0])==null?void 0:Xe[0];Ge&&(Ne=Ge);break}case"initialPlacement":Ne=b;break}if(m!==Ne)return{reset:{placement:Ne}}}return{}}}};function oLe(a,u){return{top:a.top-u.height,right:a.right-u.width,bottom:a.bottom-u.height,left:a.left-u.width}}function aLe(a){return yKt.some(u=>a[u]>=0)}const OKt=function(a){return a===void 0&&(a={}),{name:"hide",options:a,async fn(u){const{rects:d}=u,{strategy:f="referenceHidden",...m}=p0(a,u);switch(f){case"referenceHidden":{const g=await C5(u,{...m,elementContext:"reference"}),x=oLe(g,d.reference);return{data:{referenceHiddenOffsets:x,referenceHidden:aLe(x)}}}case"escaped":{const g=await C5(u,{...m,altBoundary:!0}),x=oLe(g,d.floating);return{data:{escapedOffsets:x,escaped:aLe(x)}}}default:return{}}}}};async function NKt(a,u){const{placement:d,platform:f,elements:m}=a,g=await(f.isRTL==null?void 0:f.isRTL(m.floating)),x=m0(d),b=NS(d),v=Ox(d)==="y",_=["left","top"].includes(x)?-1:1,S=g&&v?-1:1,R=p0(u,a);let{mainAxis:w,crossAxis:N,alignmentAxis:k}=typeof R=="number"?{mainAxis:R,crossAxis:0,alignmentAxis:null}:{mainAxis:R.mainAxis||0,crossAxis:R.crossAxis||0,alignmentAxis:R.alignmentAxis};return b&&typeof k=="number"&&(N=b==="end"?k*-1:k),v?{x:N*S,y:w*_}:{x:w*_,y:N*S}}const DKt=function(a){return a===void 0&&(a=0),{name:"offset",options:a,async fn(u){var d,f;const{x:m,y:g,placement:x,middlewareData:b}=u,v=await NKt(u,a);return x===((d=b.offset)==null?void 0:d.placement)&&(f=b.arrow)!=null&&f.alignmentOffset?{}:{x:m+v.x,y:g+v.y,data:{...v,placement:x}}}}},kKt=function(a){return a===void 0&&(a={}),{name:"shift",options:a,async fn(u){const{x:d,y:f,placement:m}=u,{mainAxis:g=!0,crossAxis:x=!1,limiter:b={fn:P=>{let{x:$,y:q}=P;return{x:$,y:q}}},...v}=p0(a,u),_={x:d,y:f},S=await C5(u,v),R=Ox(m0(m)),w=rse(R);let N=_[w],k=_[R];if(g){const P=w==="y"?"top":"left",$=w==="y"?"bottom":"right",q=N+S[P],z=N-S[$];N=Dne(q,N,z)}if(x){const P=R==="y"?"top":"left",$=R==="y"?"bottom":"right",q=k+S[P],z=k-S[$];k=Dne(q,k,z)}const B=b.fn({...u,[w]:N,[R]:k});return{...B,data:{x:B.x-d,y:B.y-f,enabled:{[w]:g,[R]:x}}}}}},LKt=function(a){return a===void 0&&(a={}),{options:a,fn(u){const{x:d,y:f,placement:m,rects:g,middlewareData:x}=u,{offset:b=0,mainAxis:v=!0,crossAxis:_=!0}=p0(a,u),S={x:d,y:f},R=Ox(m),w=rse(R);let N=S[w],k=S[R];const B=p0(b,u),P=typeof B=="number"?{mainAxis:B,crossAxis:0}:{mainAxis:0,crossAxis:0,...B};if(v){const z=w==="y"?"height":"width",W=g.reference[w]-g.floating[z]+P.mainAxis,X=g.reference[w]+g.reference[z]-P.mainAxis;N<W?N=W:N>X&&(N=X)}if(_){var $,q;const z=w==="y"?"width":"height",W=["top","left"].includes(m0(m)),X=g.reference[R]-g.floating[z]+(W&&(($=x.offset)==null?void 0:$[R])||0)+(W?0:P.crossAxis),J=g.reference[R]+g.reference[z]+(W?0:((q=x.offset)==null?void 0:q[R])||0)-(W?P.crossAxis:0);k<X?k=X:k>J&&(k=J)}return{[w]:N,[R]:k}}}},IKt=function(a){return a===void 0&&(a={}),{name:"size",options:a,async fn(u){var d,f;const{placement:m,rects:g,platform:x,elements:b}=u,{apply:v=()=>{},..._}=p0(a,u),S=await C5(u,_),R=m0(m),w=NS(m),N=Ox(m)==="y",{width:k,height:B}=g.floating;let P,$;R==="top"||R==="bottom"?(P=R,$=w===(await(x.isRTL==null?void 0:x.isRTL(b.floating))?"start":"end")?"left":"right"):($=R,P=w==="end"?"top":"bottom");const q=B-S.top-S.bottom,z=k-S.left-S.right,W=wx(B-S[P],q),X=wx(k-S[$],z),J=!u.middlewareData.shift;let ee=W,fe=X;if((d=u.middlewareData.shift)!=null&&d.enabled.x&&(fe=z),(f=u.middlewareData.shift)!=null&&f.enabled.y&&(ee=q),J&&!w){const je=ou(S.left,0),_e=ou(S.right,0),De=ou(S.top,0),Xe=ou(S.bottom,0);N?fe=k-2*(je!==0||_e!==0?je+_e:ou(S.left,S.right)):ee=B-2*(De!==0||Xe!==0?De+Xe:ou(S.top,S.bottom))}await v({...u,availableWidth:fe,availableHeight:ee});const be=await x.getDimensions(b.floating);return k!==be.width||B!==be.height?{reset:{rects:!0}}:{}}}};function WM(){return typeof window<"u"}function DS(a){return eje(a)?(a.nodeName||"").toLowerCase():"#document"}function au(a){var u;return(a==null||(u=a.ownerDocument)==null?void 0:u.defaultView)||window}function Eh(a){var u;return(u=(eje(a)?a.ownerDocument:a.document)||window.document)==null?void 0:u.documentElement}function eje(a){return WM()?a instanceof Node||a instanceof au(a).Node:!1}function Nd(a){return WM()?a instanceof Element||a instanceof au(a).Element:!1}function gh(a){return WM()?a instanceof HTMLElement||a instanceof au(a).HTMLElement:!1}function lLe(a){return!WM()||typeof ShadowRoot>"u"?!1:a instanceof ShadowRoot||a instanceof au(a).ShadowRoot}function nN(a){const{overflow:u,overflowX:d,overflowY:f,display:m}=Dd(a);return/auto|scroll|overlay|hidden|clip/.test(u+f+d)&&!["inline","contents"].includes(m)}function PKt(a){return["table","td","th"].includes(DS(a))}function VM(a){return[":popover-open",":modal"].some(u=>{try{return a.matches(u)}catch{return!1}})}function sse(a){const u=ose(),d=Nd(a)?Dd(a):a;return["transform","translate","scale","rotate","perspective"].some(f=>d[f]?d[f]!=="none":!1)||(d.containerType?d.containerType!=="normal":!1)||!u&&(d.backdropFilter?d.backdropFilter!=="none":!1)||!u&&(d.filter?d.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(f=>(d.willChange||"").includes(f))||["paint","layout","strict","content"].some(f=>(d.contain||"").includes(f))}function jKt(a){let u=Nx(a);for(;gh(u)&&!sS(u);){if(sse(u))return u;if(VM(u))return null;u=Nx(u)}return null}function ose(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function sS(a){return["html","body","#document"].includes(DS(a))}function Dd(a){return au(a).getComputedStyle(a)}function QM(a){return Nd(a)?{scrollLeft:a.scrollLeft,scrollTop:a.scrollTop}:{scrollLeft:a.scrollX,scrollTop:a.scrollY}}function Nx(a){if(DS(a)==="html")return a;const u=a.assignedSlot||a.parentNode||lLe(a)&&a.host||Eh(a);return lLe(u)?u.host:u}function tje(a){const u=Nx(a);return sS(u)?a.ownerDocument?a.ownerDocument.body:a.body:gh(u)&&nN(u)?u:tje(u)}function R5(a,u,d){var f;u===void 0&&(u=[]),d===void 0&&(d=!0);const m=tje(a),g=m===((f=a.ownerDocument)==null?void 0:f.body),x=au(m);if(g){const b=Lne(x);return u.concat(x,x.visualViewport||[],nN(m)?m:[],b&&d?R5(b):[])}return u.concat(m,R5(m,[],d))}function Lne(a){return a.parent&&Object.getPrototypeOf(a.parent)?a.frameElement:null}function rje(a){const u=Dd(a);let d=parseFloat(u.width)||0,f=parseFloat(u.height)||0;const m=gh(a),g=m?a.offsetWidth:d,x=m?a.offsetHeight:f,b=VF(d)!==g||VF(f)!==x;return b&&(d=g,f=x),{width:d,height:f,$:b}}function ase(a){return Nd(a)?a:a.contextElement}function Q_(a){const u=ase(a);if(!gh(u))return mh(1);const d=u.getBoundingClientRect(),{width:f,height:m,$:g}=rje(u);let x=(g?VF(d.width):d.width)/f,b=(g?VF(d.height):d.height)/m;return(!x||!Number.isFinite(x))&&(x=1),(!b||!Number.isFinite(b))&&(b=1),{x,y:b}}const FKt=mh(0);function nje(a){const u=au(a);return!ose()||!u.visualViewport?FKt:{x:u.visualViewport.offsetLeft,y:u.visualViewport.offsetTop}}function MKt(a,u,d){return u===void 0&&(u=!1),!d||u&&d!==au(a)?!1:u}function Hv(a,u,d,f){u===void 0&&(u=!1),d===void 0&&(d=!1);const m=a.getBoundingClientRect(),g=ase(a);let x=mh(1);u&&(f?Nd(f)&&(x=Q_(f)):x=Q_(a));const b=MKt(g,d,f)?nje(g):mh(0);let v=(m.left+b.x)/x.x,_=(m.top+b.y)/x.y,S=m.width/x.x,R=m.height/x.y;if(g){const w=au(g),N=f&&Nd(f)?au(f):f;let k=w,B=Lne(k);for(;B&&f&&N!==k;){const P=Q_(B),$=B.getBoundingClientRect(),q=Dd(B),z=$.left+(B.clientLeft+parseFloat(q.paddingLeft))*P.x,W=$.top+(B.clientTop+parseFloat(q.paddingTop))*P.y;v*=P.x,_*=P.y,S*=P.x,R*=P.y,v+=z,_+=W,k=au(B),B=Lne(k)}}return YF({width:S,height:R,x:v,y:_})}function lse(a,u){const d=QM(a).scrollLeft;return u?u.left+d:Hv(Eh(a)).left+d}function ije(a,u,d){d===void 0&&(d=!1);const f=a.getBoundingClientRect(),m=f.left+u.scrollLeft-(d?0:lse(a,f)),g=f.top+u.scrollTop;return{x:m,y:g}}function $Kt(a){let{elements:u,rect:d,offsetParent:f,strategy:m}=a;const g=m==="fixed",x=Eh(f),b=u?VM(u.floating):!1;if(f===x||b&&g)return d;let v={scrollLeft:0,scrollTop:0},_=mh(1);const S=mh(0),R=gh(f);if((R||!R&&!g)&&((DS(f)!=="body"||nN(x))&&(v=QM(f)),gh(f))){const N=Hv(f);_=Q_(f),S.x=N.x+f.clientLeft,S.y=N.y+f.clientTop}const w=x&&!R&&!g?ije(x,v,!0):mh(0);return{width:d.width*_.x,height:d.height*_.y,x:d.x*_.x-v.scrollLeft*_.x+S.x+w.x,y:d.y*_.y-v.scrollTop*_.y+S.y+w.y}}function BKt(a){return Array.from(a.getClientRects())}function qKt(a){const u=Eh(a),d=QM(a),f=a.ownerDocument.body,m=ou(u.scrollWidth,u.clientWidth,f.scrollWidth,f.clientWidth),g=ou(u.scrollHeight,u.clientHeight,f.scrollHeight,f.clientHeight);let x=-d.scrollLeft+lse(a);const b=-d.scrollTop;return Dd(f).direction==="rtl"&&(x+=ou(u.clientWidth,f.clientWidth)-m),{width:m,height:g,x,y:b}}function UKt(a,u){const d=au(a),f=Eh(a),m=d.visualViewport;let g=f.clientWidth,x=f.clientHeight,b=0,v=0;if(m){g=m.width,x=m.height;const _=ose();(!_||_&&u==="fixed")&&(b=m.offsetLeft,v=m.offsetTop)}return{width:g,height:x,x:b,y:v}}function zKt(a,u){const d=Hv(a,!0,u==="fixed"),f=d.top+a.clientTop,m=d.left+a.clientLeft,g=gh(a)?Q_(a):mh(1),x=a.clientWidth*g.x,b=a.clientHeight*g.y,v=m*g.x,_=f*g.y;return{width:x,height:b,x:v,y:_}}function uLe(a,u,d){let f;if(u==="viewport")f=UKt(a,d);else if(u==="document")f=qKt(Eh(a));else if(Nd(u))f=zKt(u,d);else{const m=nje(a);f={x:u.x-m.x,y:u.y-m.y,width:u.width,height:u.height}}return YF(f)}function sje(a,u){const d=Nx(a);return d===u||!Nd(d)||sS(d)?!1:Dd(d).position==="fixed"||sje(d,u)}function HKt(a,u){const d=u.get(a);if(d)return d;let f=R5(a,[],!1).filter(b=>Nd(b)&&DS(b)!=="body"),m=null;const g=Dd(a).position==="fixed";let x=g?Nx(a):a;for(;Nd(x)&&!sS(x);){const b=Dd(x),v=sse(x);!v&&b.position==="fixed"&&(m=null),(g?!v&&!m:!v&&b.position==="static"&&!!m&&["absolute","fixed"].includes(m.position)||nN(x)&&!v&&sje(a,x))?f=f.filter(S=>S!==x):m=b,x=Nx(x)}return u.set(a,f),f}function GKt(a){let{element:u,boundary:d,rootBoundary:f,strategy:m}=a;const x=[...d==="clippingAncestors"?VM(u)?[]:HKt(u,this._c):[].concat(d),f],b=x[0],v=x.reduce((_,S)=>{const R=uLe(u,S,m);return _.top=ou(R.top,_.top),_.right=wx(R.right,_.right),_.bottom=wx(R.bottom,_.bottom),_.left=ou(R.left,_.left),_},uLe(u,b,m));return{width:v.right-v.left,height:v.bottom-v.top,x:v.left,y:v.top}}function WKt(a){const{width:u,height:d}=rje(a);return{width:u,height:d}}function VKt(a,u,d){const f=gh(u),m=Eh(u),g=d==="fixed",x=Hv(a,!0,g,u);let b={scrollLeft:0,scrollTop:0};const v=mh(0);if(f||!f&&!g)if((DS(u)!=="body"||nN(m))&&(b=QM(u)),f){const w=Hv(u,!0,g,u);v.x=w.x+u.clientLeft,v.y=w.y+u.clientTop}else m&&(v.x=lse(m));const _=m&&!f&&!g?ije(m,b):mh(0),S=x.left+b.scrollLeft-v.x-_.x,R=x.top+b.scrollTop-v.y-_.y;return{x:S,y:R,width:x.width,height:x.height}}function _re(a){return Dd(a).position==="static"}function cLe(a,u){if(!gh(a)||Dd(a).position==="fixed")return null;if(u)return u(a);let d=a.offsetParent;return Eh(a)===d&&(d=d.ownerDocument.body),d}function oje(a,u){const d=au(a);if(VM(a))return d;if(!gh(a)){let m=Nx(a);for(;m&&!sS(m);){if(Nd(m)&&!_re(m))return m;m=Nx(m)}return d}let f=cLe(a,u);for(;f&&PKt(f)&&_re(f);)f=cLe(f,u);return f&&sS(f)&&_re(f)&&!sse(f)?d:f||jKt(a)||d}const QKt=async function(a){const u=this.getOffsetParent||oje,d=this.getDimensions,f=await d(a.floating);return{reference:VKt(a.reference,await u(a.floating),a.strategy),floating:{x:0,y:0,width:f.width,height:f.height}}};function YKt(a){return Dd(a).direction==="rtl"}const KKt={convertOffsetParentRelativeRectToViewportRelativeRect:$Kt,getDocumentElement:Eh,getClippingRect:GKt,getOffsetParent:oje,getElementRects:QKt,getClientRects:BKt,getDimensions:WKt,getScale:Q_,isElement:Nd,isRTL:YKt};function aje(a,u){return a.x===u.x&&a.y===u.y&&a.width===u.width&&a.height===u.height}function XKt(a,u){let d=null,f;const m=Eh(a);function g(){var b;clearTimeout(f),(b=d)==null||b.disconnect(),d=null}function x(b,v){b===void 0&&(b=!1),v===void 0&&(v=1),g();const _=a.getBoundingClientRect(),{left:S,top:R,width:w,height:N}=_;if(b||u(),!w||!N)return;const k=zj(R),B=zj(m.clientWidth-(S+w)),P=zj(m.clientHeight-(R+N)),$=zj(S),z={rootMargin:-k+"px "+-B+"px "+-P+"px "+-$+"px",threshold:ou(0,wx(1,v))||1};let W=!0;function X(J){const ee=J[0].intersectionRatio;if(ee!==v){if(!W)return x();ee?x(!1,ee):f=setTimeout(()=>{x(!1,1e-7)},1e3)}ee===1&&!aje(_,a.getBoundingClientRect())&&x(),W=!1}try{d=new IntersectionObserver(X,{...z,root:m.ownerDocument})}catch{d=new IntersectionObserver(X,z)}d.observe(a)}return x(!0),g}function JKt(a,u,d,f){f===void 0&&(f={});const{ancestorScroll:m=!0,ancestorResize:g=!0,elementResize:x=typeof ResizeObserver=="function",layoutShift:b=typeof IntersectionObserver=="function",animationFrame:v=!1}=f,_=ase(a),S=m||g?[..._?R5(_):[],...R5(u)]:[];S.forEach($=>{m&&$.addEventListener("scroll",d,{passive:!0}),g&&$.addEventListener("resize",d)});const R=_&&b?XKt(_,d):null;let w=-1,N=null;x&&(N=new ResizeObserver($=>{let[q]=$;q&&q.target===_&&N&&(N.unobserve(u),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var z;(z=N)==null||z.observe(u)})),d()}),_&&!v&&N.observe(_),N.observe(u));let k,B=v?Hv(a):null;v&&P();function P(){const $=Hv(a);B&&!aje(B,$)&&d(),B=$,k=requestAnimationFrame(P)}return d(),()=>{var $;S.forEach(q=>{m&&q.removeEventListener("scroll",d),g&&q.removeEventListener("resize",d)}),R?.(),($=N)==null||$.disconnect(),N=null,v&&cancelAnimationFrame(k)}}const ZKt=DKt,eXt=kKt,tXt=wKt,rXt=IKt,nXt=OKt,dLe=TKt,iXt=LKt,sXt=(a,u,d)=>{const f=new Map,m={platform:KKt,...d},g={...m.platform,_c:f};return RKt(a,u,{...m,platform:g})};var _F=typeof document<"u"?Pe.useLayoutEffect:Pe.useEffect;function KF(a,u){if(a===u)return!0;if(typeof a!=typeof u)return!1;if(typeof a=="function"&&a.toString()===u.toString())return!0;let d,f,m;if(a&&u&&typeof a=="object"){if(Array.isArray(a)){if(d=a.length,d!==u.length)return!1;for(f=d;f--!==0;)if(!KF(a[f],u[f]))return!1;return!0}if(m=Object.keys(a),d=m.length,d!==Object.keys(u).length)return!1;for(f=d;f--!==0;)if(!{}.hasOwnProperty.call(u,m[f]))return!1;for(f=d;f--!==0;){const g=m[f];if(!(g==="_owner"&&a.$$typeof)&&!KF(a[g],u[g]))return!1}return!0}return a!==a&&u!==u}function lje(a){return typeof window>"u"?1:(a.ownerDocument.defaultView||window).devicePixelRatio||1}function fLe(a,u){const d=lje(a);return Math.round(u*d)/d}function Sre(a){const u=Y.useRef(a);return _F(()=>{u.current=a}),u}function oXt(a){a===void 0&&(a={});const{placement:u="bottom",strategy:d="absolute",middleware:f=[],platform:m,elements:{reference:g,floating:x}={},transform:b=!0,whileElementsMounted:v,open:_}=a,[S,R]=Y.useState({x:0,y:0,strategy:d,placement:u,middlewareData:{},isPositioned:!1}),[w,N]=Y.useState(f);KF(w,f)||N(f);const[k,B]=Y.useState(null),[P,$]=Y.useState(null),q=Y.useCallback(mt=>{mt!==J.current&&(J.current=mt,B(mt))},[]),z=Y.useCallback(mt=>{mt!==ee.current&&(ee.current=mt,$(mt))},[]),W=g||k,X=x||P,J=Y.useRef(null),ee=Y.useRef(null),fe=Y.useRef(S),be=v!=null,je=Sre(v),_e=Sre(m),De=Sre(_),Xe=Y.useCallback(()=>{if(!J.current||!ee.current)return;const mt={placement:u,strategy:d,middleware:w};_e.current&&(mt.platform=_e.current),sXt(J.current,ee.current,mt).then(Je=>{const rt={...Je,isPositioned:De.current!==!1};ze.current&&!KF(fe.current,rt)&&(fe.current=rt,RM.flushSync(()=>{R(rt)}))})},[w,u,d,_e,De]);_F(()=>{_===!1&&fe.current.isPositioned&&(fe.current.isPositioned=!1,R(mt=>({...mt,isPositioned:!1})))},[_]);const ze=Y.useRef(!1);_F(()=>(ze.current=!0,()=>{ze.current=!1}),[]),_F(()=>{if(W&&(J.current=W),X&&(ee.current=X),W&&X){if(je.current)return je.current(W,X,Xe);Xe()}},[W,X,Xe,je,be]);const te=Y.useMemo(()=>({reference:J,floating:ee,setReference:q,setFloating:z}),[q,z]),Ne=Y.useMemo(()=>({reference:W,floating:X}),[W,X]),Ge=Y.useMemo(()=>{const mt={position:d,left:0,top:0};if(!Ne.floating)return mt;const Je=fLe(Ne.floating,S.x),rt=fLe(Ne.floating,S.y);return b?{...mt,transform:"translate("+Je+"px, "+rt+"px)",...lje(Ne.floating)>=1.5&&{willChange:"transform"}}:{position:d,left:Je,top:rt}},[d,b,Ne.floating,S.x,S.y]);return Y.useMemo(()=>({...S,update:Xe,refs:te,elements:Ne,floatingStyles:Ge}),[S,Xe,te,Ne,Ge])}const aXt=a=>{function u(d){return{}.hasOwnProperty.call(d,"current")}return{name:"arrow",options:a,fn(d){const{element:f,padding:m}=typeof a=="function"?a(d):a;return f&&u(f)?f.current!=null?dLe({element:f.current,padding:m}).fn(d):{}:f?dLe({element:f,padding:m}).fn(d):{}}}},lXt=(a,u)=>({...ZKt(a),options:[a,u]}),uXt=(a,u)=>({...eXt(a),options:[a,u]}),cXt=(a,u)=>({...iXt(a),options:[a,u]}),dXt=(a,u)=>({...tXt(a),options:[a,u]}),fXt=(a,u)=>({...rXt(a),options:[a,u]}),hXt=(a,u)=>({...nXt(a),options:[a,u]}),pXt=(a,u)=>({...aXt(a),options:[a,u]});var mXt="Arrow",uje=Y.forwardRef((a,u)=>{const{children:d,width:f=10,height:m=5,...g}=a;return D.jsxRuntimeExports.jsx(rn.svg,{...g,ref:u,width:f,height:m,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:a.asChild?d:D.jsxRuntimeExports.jsx("polygon",{points:"0,0 30,0 15,10"})})});uje.displayName=mXt;var gXt=uje;function xXt(a){const[u,d]=Y.useState(void 0);return ca(()=>{if(a){d({width:a.offsetWidth,height:a.offsetHeight});const f=new ResizeObserver(m=>{if(!Array.isArray(m)||!m.length)return;const g=m[0];let x,b;if("borderBoxSize"in g){const v=g.borderBoxSize,_=Array.isArray(v)?v[0]:v;x=_.inlineSize,b=_.blockSize}else x=a.offsetWidth,b=a.offsetHeight;d({width:x,height:b})});return f.observe(a,{box:"border-box"}),()=>f.unobserve(a)}else d(void 0)},[a]),u}var use="Popper",[cje,Bx]=Md(use),[yXt,dje]=cje(use),fje=a=>{const{__scopePopper:u,children:d}=a,[f,m]=Y.useState(null);return D.jsxRuntimeExports.jsx(yXt,{scope:u,anchor:f,onAnchorChange:m,children:d})};fje.displayName=use;var hje="PopperAnchor",pje=Y.forwardRef((a,u)=>{const{__scopePopper:d,virtualRef:f,...m}=a,g=dje(hje,d),x=Y.useRef(null),b=Cn(u,x);return Y.useEffect(()=>{g.onAnchorChange(f?.current||x.current)}),f?null:D.jsxRuntimeExports.jsx(rn.div,{...m,ref:b})});pje.displayName=hje;var cse="PopperContent",[vXt,bXt]=cje(cse),mje=Y.forwardRef((a,u)=>{var d,f,m,g,x,b;const{__scopePopper:v,side:_="bottom",sideOffset:S=0,align:R="center",alignOffset:w=0,arrowPadding:N=0,avoidCollisions:k=!0,collisionBoundary:B=[],collisionPadding:P=0,sticky:$="partial",hideWhenDetached:q=!1,updatePositionStrategy:z="optimized",onPlaced:W,...X}=a,J=dje(cse,v),[ee,fe]=Y.useState(null),be=Cn(u,He=>fe(He)),[je,_e]=Y.useState(null),De=xXt(je),Xe=De?.width??0,ze=De?.height??0,te=_+(R!=="center"?"-"+R:""),Ne=typeof P=="number"?P:{top:0,right:0,bottom:0,left:0,...P},Ge=Array.isArray(B)?B:[B],mt=Ge.length>0,Je={padding:Ne,boundary:Ge.filter(_Xt),altBoundary:mt},{refs:rt,floatingStyles:vt,placement:qe,isPositioned:ge,middlewareData:pe}=oXt({strategy:"fixed",placement:te,whileElementsMounted:(...He)=>JKt(...He,{animationFrame:z==="always"}),elements:{reference:J.anchor},middleware:[lXt({mainAxis:S+ze,alignmentAxis:w}),k&&uXt({mainAxis:!0,crossAxis:!1,limiter:$==="partial"?cXt():void 0,...Je}),k&&dXt({...Je}),fXt({...Je,apply:({elements:He,rects:We,availableWidth:bt,availableHeight:_t})=>{const{width:Ft,height:qt}=We.reference,xt=He.floating.style;xt.setProperty("--radix-popper-available-width",`${bt}px`),xt.setProperty("--radix-popper-available-height",`${_t}px`),xt.setProperty("--radix-popper-anchor-width",`${Ft}px`),xt.setProperty("--radix-popper-anchor-height",`${qt}px`)}}),je&&pXt({element:je,padding:N}),SXt({arrowWidth:Xe,arrowHeight:ze}),q&&hXt({strategy:"referenceHidden",...Je})]}),[ye,we]=yje(qe),Ie=Us(W);ca(()=>{ge&&Ie?.()},[ge,Ie]);const le=(d=pe.arrow)==null?void 0:d.x,Se=(f=pe.arrow)==null?void 0:f.y,Le=((m=pe.arrow)==null?void 0:m.centerOffset)!==0,[Ye,ot]=Y.useState();return ca(()=>{ee&&ot(window.getComputedStyle(ee).zIndex)},[ee]),D.jsxRuntimeExports.jsx("div",{ref:rt.setFloating,"data-radix-popper-content-wrapper":"",style:{...vt,transform:ge?vt.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ye,"--radix-popper-transform-origin":[(g=pe.transformOrigin)==null?void 0:g.x,(x=pe.transformOrigin)==null?void 0:x.y].join(" "),...((b=pe.hide)==null?void 0:b.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:a.dir,children:D.jsxRuntimeExports.jsx(vXt,{scope:v,placedSide:ye,onArrowChange:_e,arrowX:le,arrowY:Se,shouldHideArrow:Le,children:D.jsxRuntimeExports.jsx(rn.div,{"data-side":ye,"data-align":we,...X,ref:be,style:{...X.style,animation:ge?void 0:"none"}})})})});mje.displayName=cse;var gje="PopperArrow",EXt={top:"bottom",right:"left",bottom:"top",left:"right"},xje=Y.forwardRef(function(u,d){const{__scopePopper:f,...m}=u,g=bXt(gje,f),x=EXt[g.placedSide];return D.jsxRuntimeExports.jsx("span",{ref:g.onArrowChange,style:{position:"absolute",left:g.arrowX,top:g.arrowY,[x]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[g.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[g.placedSide],visibility:g.shouldHideArrow?"hidden":void 0},children:D.jsxRuntimeExports.jsx(gXt,{...m,ref:d,style:{...m.style,display:"block"}})})});xje.displayName=gje;function _Xt(a){return a!==null}var SXt=a=>({name:"transformOrigin",options:a,fn(u){var d,f,m;const{placement:g,rects:x,middlewareData:b}=u,_=((d=b.arrow)==null?void 0:d.centerOffset)!==0,S=_?0:a.arrowWidth,R=_?0:a.arrowHeight,[w,N]=yje(g),k={start:"0%",center:"50%",end:"100%"}[N],B=(((f=b.arrow)==null?void 0:f.x)??0)+S/2,P=(((m=b.arrow)==null?void 0:m.y)??0)+R/2;let $="",q="";return w==="bottom"?($=_?k:`${B}px`,q=`${-R}px`):w==="top"?($=_?k:`${B}px`,q=`${x.floating.height+R}px`):w==="right"?($=`${-R}px`,q=_?k:`${P}px`):w==="left"&&($=`${x.floating.width+R}px`,q=_?k:`${P}px`),{data:{x:$,y:q}}}});function yje(a){const[u,d="center"]=a.split("-");return[u,d]}var YM=fje,iN=pje,KM=mje,XM=xje,AXt="Portal",kS=Y.forwardRef((a,u)=>{var d;const{container:f,...m}=a,[g,x]=Y.useState(!1);ca(()=>x(!0),[]);const b=f||g&&((d=globalThis?.document)==null?void 0:d.body);return b?jv.createPortal(D.jsxRuntimeExports.jsx(rn.div,{...m,ref:u}),b):null});kS.displayName=AXt;function CXt(a,u){return Y.useReducer((d,f)=>u[d][f]??d,a)}var Do=a=>{const{present:u,children:d}=a,f=RXt(u),m=typeof d=="function"?d({present:f.isPresent}):Y.Children.only(d),g=Cn(f.ref,TXt(m));return typeof d=="function"||f.isPresent?Y.cloneElement(m,{ref:g}):null};Do.displayName="Presence";function RXt(a){const[u,d]=Y.useState(),f=Y.useRef({}),m=Y.useRef(a),g=Y.useRef("none"),x=a?"mounted":"unmounted",[b,v]=CXt(x,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Y.useEffect(()=>{const _=Hj(f.current);g.current=b==="mounted"?_:"none"},[b]),ca(()=>{const _=f.current,S=m.current;if(S!==a){const w=g.current,N=Hj(_);a?v("MOUNT"):N==="none"||_?.display==="none"?v("UNMOUNT"):v(S&&w!==N?"ANIMATION_OUT":"UNMOUNT"),m.current=a}},[a,v]),ca(()=>{if(u){let _;const S=u.ownerDocument.defaultView??window,R=N=>{const B=Hj(f.current).includes(N.animationName);if(N.target===u&&B&&(v("ANIMATION_END"),!m.current)){const P=u.style.animationFillMode;u.style.animationFillMode="forwards",_=S.setTimeout(()=>{u.style.animationFillMode==="forwards"&&(u.style.animationFillMode=P)})}},w=N=>{N.target===u&&(g.current=Hj(f.current))};return u.addEventListener("animationstart",w),u.addEventListener("animationcancel",R),u.addEventListener("animationend",R),()=>{S.clearTimeout(_),u.removeEventListener("animationstart",w),u.removeEventListener("animationcancel",R),u.removeEventListener("animationend",R)}}else v("ANIMATION_END")},[u,v]),{isPresent:["mounted","unmountSuspended"].includes(b),ref:Y.useCallback(_=>{_&&(f.current=getComputedStyle(_)),d(_)},[])}}function Hj(a){return a?.animationName||"none"}function TXt(a){var u,d;let f=(u=Object.getOwnPropertyDescriptor(a.props,"ref"))==null?void 0:u.get,m=f&&"isReactWarning"in f&&f.isReactWarning;return m?a.ref:(f=(d=Object.getOwnPropertyDescriptor(a,"ref"))==null?void 0:d.get,m=f&&"isReactWarning"in f&&f.isReactWarning,m?a.props.ref:a.props.ref||a.ref)}function Dx({prop:a,defaultProp:u,onChange:d=()=>{}}){const[f,m]=wXt({defaultProp:u,onChange:d}),g=a!==void 0,x=g?a:f,b=Us(d),v=Y.useCallback(_=>{if(g){const R=typeof _=="function"?_(a):_;R!==a&&b(R)}else m(_)},[g,a,m,b]);return[x,v]}function wXt({defaultProp:a,onChange:u}){const d=Y.useState(a),[f]=d,m=Y.useRef(f),g=Us(u);return Y.useEffect(()=>{m.current!==f&&(g(f),m.current=f)},[f,m,g]),d}var OXt="VisuallyHidden",dse=Y.forwardRef((a,u)=>D.jsxRuntimeExports.jsx(rn.span,{...a,ref:u,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...a.style}}));dse.displayName=OXt;var NXt=dse,[JM,Ryr]=Md("Tooltip",[Bx]),ZM=Bx(),vje="TooltipProvider",DXt=700,Ine="tooltip.open",[kXt,fse]=JM(vje),bje=a=>{const{__scopeTooltip:u,delayDuration:d=DXt,skipDelayDuration:f=300,disableHoverableContent:m=!1,children:g}=a,[x,b]=Y.useState(!0),v=Y.useRef(!1),_=Y.useRef(0);return Y.useEffect(()=>{const S=_.current;return()=>window.clearTimeout(S)},[]),D.jsxRuntimeExports.jsx(kXt,{scope:u,isOpenDelayed:x,delayDuration:d,onOpen:Y.useCallback(()=>{window.clearTimeout(_.current),b(!1)},[]),onClose:Y.useCallback(()=>{window.clearTimeout(_.current),_.current=window.setTimeout(()=>b(!0),f)},[f]),isPointerInTransitRef:v,onPointerInTransitChange:Y.useCallback(S=>{v.current=S},[]),disableHoverableContent:m,children:g})};bje.displayName=vje;var e$="Tooltip",[LXt,sN]=JM(e$),LS=a=>{const{__scopeTooltip:u,children:d,open:f,defaultOpen:m=!1,onOpenChange:g,disableHoverableContent:x,delayDuration:b}=a,v=fse(e$,a.__scopeTooltip),_=ZM(u),[S,R]=Y.useState(null),w=ic(),N=Y.useRef(0),k=x??v.disableHoverableContent,B=b??v.delayDuration,P=Y.useRef(!1),[$=!1,q]=Dx({prop:f,defaultProp:m,onChange:ee=>{ee?(v.onOpen(),document.dispatchEvent(new CustomEvent(Ine))):v.onClose(),g?.(ee)}}),z=Y.useMemo(()=>$?P.current?"delayed-open":"instant-open":"closed",[$]),W=Y.useCallback(()=>{window.clearTimeout(N.current),N.current=0,P.current=!1,q(!0)},[q]),X=Y.useCallback(()=>{window.clearTimeout(N.current),N.current=0,q(!1)},[q]),J=Y.useCallback(()=>{window.clearTimeout(N.current),N.current=window.setTimeout(()=>{P.current=!0,q(!0),N.current=0},B)},[B,q]);return Y.useEffect(()=>()=>{N.current&&(window.clearTimeout(N.current),N.current=0)},[]),D.jsxRuntimeExports.jsx(YM,{..._,children:D.jsxRuntimeExports.jsx(LXt,{scope:u,contentId:w,open:$,stateAttribute:z,trigger:S,onTriggerChange:R,onTriggerEnter:Y.useCallback(()=>{v.isOpenDelayed?J():W()},[v.isOpenDelayed,J,W]),onTriggerLeave:Y.useCallback(()=>{k?X():(window.clearTimeout(N.current),N.current=0)},[X,k]),onOpen:W,onClose:X,disableHoverableContent:k,children:d})})};LS.displayName=e$;var Pne="TooltipTrigger",IS=Y.forwardRef((a,u)=>{const{__scopeTooltip:d,...f}=a,m=sN(Pne,d),g=fse(Pne,d),x=ZM(d),b=Y.useRef(null),v=Cn(u,b,m.onTriggerChange),_=Y.useRef(!1),S=Y.useRef(!1),R=Y.useCallback(()=>_.current=!1,[]);return Y.useEffect(()=>()=>document.removeEventListener("pointerup",R),[R]),D.jsxRuntimeExports.jsx(iN,{asChild:!0,...x,children:D.jsxRuntimeExports.jsx(rn.button,{"aria-describedby":m.open?m.contentId:void 0,"data-state":m.stateAttribute,...f,ref:v,onPointerMove:xr(a.onPointerMove,w=>{w.pointerType!=="touch"&&!S.current&&!g.isPointerInTransitRef.current&&(m.onTriggerEnter(),S.current=!0)}),onPointerLeave:xr(a.onPointerLeave,()=>{m.onTriggerLeave(),S.current=!1}),onPointerDown:xr(a.onPointerDown,()=>{_.current=!0,document.addEventListener("pointerup",R,{once:!0})}),onFocus:xr(a.onFocus,()=>{_.current||m.onOpen()}),onBlur:xr(a.onBlur,m.onClose),onClick:xr(a.onClick,m.onClose)})})});IS.displayName=Pne;var hse="TooltipPortal",[IXt,PXt]=JM(hse,{forceMount:void 0}),PS=a=>{const{__scopeTooltip:u,forceMount:d,children:f,container:m}=a,g=sN(hse,u);return D.jsxRuntimeExports.jsx(IXt,{scope:u,forceMount:d,children:D.jsxRuntimeExports.jsx(Do,{present:d||g.open,children:D.jsxRuntimeExports.jsx(kS,{asChild:!0,container:m,children:f})})})};PS.displayName=hse;var oS="TooltipContent",jS=Y.forwardRef((a,u)=>{const d=PXt(oS,a.__scopeTooltip),{forceMount:f=d.forceMount,side:m="top",...g}=a,x=sN(oS,a.__scopeTooltip);return D.jsxRuntimeExports.jsx(Do,{present:f||x.open,children:x.disableHoverableContent?D.jsxRuntimeExports.jsx(Eje,{side:m,...g,ref:u}):D.jsxRuntimeExports.jsx(jXt,{side:m,...g,ref:u})})}),jXt=Y.forwardRef((a,u)=>{const d=sN(oS,a.__scopeTooltip),f=fse(oS,a.__scopeTooltip),m=Y.useRef(null),g=Cn(u,m),[x,b]=Y.useState(null),{trigger:v,onClose:_}=d,S=m.current,{onPointerInTransitChange:R}=f,w=Y.useCallback(()=>{b(null),R(!1)},[R]),N=Y.useCallback((k,B)=>{const P=k.currentTarget,$={x:k.clientX,y:k.clientY},q=BXt($,P.getBoundingClientRect()),z=qXt($,q),W=UXt(B.getBoundingClientRect()),X=HXt([...z,...W]);b(X),R(!0)},[R]);return Y.useEffect(()=>()=>w(),[w]),Y.useEffect(()=>{if(v&&S){const k=P=>N(P,S),B=P=>N(P,v);return v.addEventListener("pointerleave",k),S.addEventListener("pointerleave",B),()=>{v.removeEventListener("pointerleave",k),S.removeEventListener("pointerleave",B)}}},[v,S,N,w]),Y.useEffect(()=>{if(x){const k=B=>{const P=B.target,$={x:B.clientX,y:B.clientY},q=v?.contains(P)||S?.contains(P),z=!zXt($,x);q?w():z&&(w(),_())};return document.addEventListener("pointermove",k),()=>document.removeEventListener("pointermove",k)}},[v,S,x,_,w]),D.jsxRuntimeExports.jsx(Eje,{...a,ref:g})}),[FXt,MXt]=JM(e$,{isInside:!1}),Eje=Y.forwardRef((a,u)=>{const{__scopeTooltip:d,children:f,"aria-label":m,onEscapeKeyDown:g,onPointerDownOutside:x,...b}=a,v=sN(oS,d),_=ZM(d),{onClose:S}=v;return Y.useEffect(()=>(document.addEventListener(Ine,S),()=>document.removeEventListener(Ine,S)),[S]),Y.useEffect(()=>{if(v.trigger){const R=w=>{const N=w.target;N?.contains(v.trigger)&&S()};return window.addEventListener("scroll",R,{capture:!0}),()=>window.removeEventListener("scroll",R,{capture:!0})}},[v.trigger,S]),D.jsxRuntimeExports.jsx(OS,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:g,onPointerDownOutside:x,onFocusOutside:R=>R.preventDefault(),onDismiss:S,children:D.jsxRuntimeExports.jsxs(KM,{"data-state":v.stateAttribute,..._,...b,ref:u,style:{...b.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[D.jsxRuntimeExports.jsx(YPe,{children:f}),D.jsxRuntimeExports.jsx(FXt,{scope:d,isInside:!0,children:D.jsxRuntimeExports.jsx(NXt,{id:v.contentId,role:"tooltip",children:m||f})})]})})});jS.displayName=oS;var _je="TooltipArrow",$Xt=Y.forwardRef((a,u)=>{const{__scopeTooltip:d,...f}=a,m=ZM(d);return MXt(_je,d).isInside?null:D.jsxRuntimeExports.jsx(XM,{...m,...f,ref:u})});$Xt.displayName=_je;function BXt(a,u){const d=Math.abs(u.top-a.y),f=Math.abs(u.bottom-a.y),m=Math.abs(u.right-a.x),g=Math.abs(u.left-a.x);switch(Math.min(d,f,m,g)){case g:return"left";case m:return"right";case d:return"top";case f:return"bottom";default:throw new Error("unreachable")}}function qXt(a,u,d=5){const f=[];switch(u){case"top":f.push({x:a.x-d,y:a.y+d},{x:a.x+d,y:a.y+d});break;case"bottom":f.push({x:a.x-d,y:a.y-d},{x:a.x+d,y:a.y-d});break;case"left":f.push({x:a.x+d,y:a.y-d},{x:a.x+d,y:a.y+d});break;case"right":f.push({x:a.x-d,y:a.y-d},{x:a.x-d,y:a.y+d});break}return f}function UXt(a){const{top:u,right:d,bottom:f,left:m}=a;return[{x:m,y:u},{x:d,y:u},{x:d,y:f},{x:m,y:f}]}function zXt(a,u){const{x:d,y:f}=a;let m=!1;for(let g=0,x=u.length-1;g<u.length;x=g++){const b=u[g].x,v=u[g].y,_=u[x].x,S=u[x].y;v>f!=S>f&&d<(_-b)*(f-v)/(S-v)+b&&(m=!m)}return m}function HXt(a){const u=a.slice();return u.sort((d,f)=>d.x<f.x?-1:d.x>f.x?1:d.y<f.y?-1:d.y>f.y?1:0),GXt(u)}function GXt(a){if(a.length<=1)return a.slice();const u=[];for(let f=0;f<a.length;f++){const m=a[f];for(;u.length>=2;){const g=u[u.length-1],x=u[u.length-2];if((g.x-x.x)*(m.y-x.y)>=(g.y-x.y)*(m.x-x.x))u.pop();else break}u.push(m)}u.pop();const d=[];for(let f=a.length-1;f>=0;f--){const m=a[f];for(;d.length>=2;){const g=d[d.length-1],x=d[d.length-2];if((g.x-x.x)*(m.y-x.y)>=(g.y-x.y)*(m.x-x.x))d.pop();else break}d.push(m)}return d.pop(),u.length===1&&d.length===1&&u[0].x===d[0].x&&u[0].y===d[0].y?u:u.concat(d)}var oN=LS,aN=IS,lN=PS,uN=jS;const ai=Y.createContext({});function Sje(a,u){return Pe.useMemo(()=>{if(a)return new Zr.ASTQuery({query:u,source:a})},[a,u])}const Aje=Y.createContext({focusMainView:()=>{},isMainViewFocused:!0,focusNestView:()=>{},isNestViewFocused:()=>!1,focusedNestView:null});function WXt({rootQuery:a,focusedNestViewPath:u,onFocusedNestViewPathChange:d,children:f}){const m=Y.useMemo(()=>{if(u.length===0)return null;if(a){const _=a.definition;if(_ instanceof Zr.ASTArrowQueryDefinition)return SF(_.view,[...u].reverse())}return null},[a,u]),g=Y.useCallback(()=>{d([])},[d]),x=Y.useCallback(_=>{d([..._])},[d]),b=Y.useCallback(_=>JSON.stringify(_)===JSON.stringify(u),[u]),v=u.length===0;return D.jsxRuntimeExports.jsx(Aje.Provider,{value:{focusMainView:g,isMainViewFocused:v,focusNestView:x,isNestViewFocused:b,focusedNestView:m},children:f})}function cN(){return Y.useContext(Aje)}const SF=(a,u)=>{if(u.length===0)return null;if(a instanceof Zr.ASTArrowViewDefinition)return SF(a.view,u);if(a instanceof Zr.ASTSegmentViewDefinition){const d=u.pop(),f=a.operations.items.find(m=>m instanceof Zr.ASTNestViewOperation&&m.name===d);return f===void 0?(u.push(d),null):u.length===0?f.view:SF(f.view.definition,u)}return a instanceof Zr.ASTRefinementViewDefinition?SF(a.refinement,u):null};function VXt({source:a,query:u,onQueryChange:d,focusedNestViewPath:f,onFocusedNestViewPathChange:m,children:g,topValues:x,onDrill:b}){const v=Sje(a,u);return D.jsxRuntimeExports.jsx(bje,{children:D.jsxRuntimeExports.jsx(WXt,{rootQuery:v,focusedNestViewPath:f,onFocusedNestViewPathChange:m,children:D.jsxRuntimeExports.jsx(ai.Provider,{value:{source:a,rootQuery:v,setQuery:d,topValues:x,onDrill:b},children:g})})})}var jO={},hLe;function QXt(){if(hLe)return jO;hLe=1,Object.defineProperty(jO,"__esModule",{value:!0}),jO.styleq=void 0;var a=new WeakMap,u="$$css";function d(m){var g,x,b;return m!=null&&(g=m.disableCache===!0,x=m.disableMix===!0,b=m.transform),function(){for(var _=[],S="",R=null,w=g?null:a,N=new Array(arguments.length),k=0;k<arguments.length;k++)N[k]=arguments[k];for(;N.length>0;){var B=N.pop();if(!(B==null||B===!1)){if(Array.isArray(B)){for(var P=0;P<B.length;P++)N.push(B[P]);continue}var $=b!=null?b(B):B;if($.$$css){var q="";if(w!=null&&w.has($)){var z=w.get($);z!=null&&(q=z[0],_.push.apply(_,z[1]),w=z[2])}else{var W=[];for(var X in $){var J=$[X];X!==u&&(typeof J=="string"||J===null?_.includes(X)||(_.push(X),w!=null&&W.push(X),typeof J=="string"&&(q+=q?" "+J:J)):console.error("styleq: ".concat(X," typeof ").concat(String(J),' is not "string" or "null".')))}if(w!=null){var ee=new WeakMap;w.set($,[q,W,ee]),w=ee}}q&&(S=S?q+" "+S:q)}else if(x)R==null&&(R={}),R=Object.assign({},$,R);else{var fe=null;for(var be in $){var je=$[be];je!==void 0&&(_.includes(be)||(je!=null&&(R==null&&(R={}),fe==null&&(fe={}),fe[be]=je),_.push(be),w=null))}fe!=null&&(R=Object.assign(fe,R))}}}var _e=[S,R];return _e}}var f=d();return jO.styleq=f,f.factory=d,jO}var Cje=QXt();const Yv=a=>new Error(`'stylex.${a}' should never be called at runtime. It should be compiled away by '@stylexjs/babel-plugin'`),eu=a=>Yv(`types.${a}`);function Rje(){for(var a=arguments.length,u=new Array(a),d=0;d<a;d++)u[d]=arguments[d];const[f,m]=Cje.styleq(u),g={};return f!=null&&f!==""&&(g.className=f),m!=null&&Object.keys(m).length>0&&(g.style=m),g}function YXt(){const{className:a,style:u}=Rje(...arguments),d={};return a!=null&&a!==""&&(d.class=a),u!=null&&Object.keys(u).length>0&&(d.style=Object.keys(u).map(f=>`${f}:${u[f]};`).join("")),d}function KXt(a){throw Yv("create")}function XXt(a){throw Yv("defineVars")}const JXt=(a,u)=>{throw Yv("createTheme")},ZXt=a=>{throw Yv("include")},eJt=KXt,tJt=XXt,rJt=JXt,nJt=ZXt,iJt={angle:a=>{throw eu("angle")},color:a=>{throw eu("color")},url:a=>{throw eu("url")},image:a=>{throw eu("image")},integer:a=>{throw eu("integer")},lengthPercentage:a=>{throw eu("lengthPercentage")},length:a=>{throw eu("length")},percentage:a=>{throw eu("percentage")},number:a=>{throw eu("number")},resolution:a=>{throw eu("resolution")},time:a=>{throw eu("time")},transformFunction:a=>{throw eu("transformFunction")},transformList:a=>{throw eu("transformList")}},sJt=a=>{throw Yv("keyframes")},oJt=function(){throw Yv("firstThatWorks")};function Lt(){for(var a=arguments.length,u=new Array(a),d=0;d<a;d++)u[d]=arguments[d];const[f]=Cje.styleq(u);return f}Lt.props=Rje;Lt.attrs=YXt;Lt.create=eJt;Lt.defineVars=tJt;Lt.createTheme=rJt;Lt.include=nJt;Lt.keyframes=sJt;Lt.firstThatWorks=oJt;Lt.types=iJt;const g0={default:{padding:"mlydqdrvq",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,borderRadius:"mly4pepcl",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,color:"mly1rs82da",backgroundColor:"mly1jmk7v",maxWidth:"mlyxc7z9f",boxShadow:"mly17fq3gk",zIndex:"mlyhtitgo",$$css:!0},card:{width:"mly1g65f5b",maxHeight:"mly1kbvuzt",zIndex:"mlyhtitgo",$$css:!0}},Fr={largeBody:{fontFamily:"mly1rj5sg5",color:"mly1dhlylr",fontWeight:"mlyo1l8bm",fontSize:"mly1j61zf2",lineHeight:"mly1fc57z9",letterSpacing:"mly12oo3zp",$$css:!0},emphasized:{fontFamily:"mly1rj5sg5",color:"mly1dhlylr",fontWeight:"mly1xlr1w8",fontSize:"mlyif65rj",lineHeight:"mly1fc57z9",letterSpacing:"mly1gu5id8",$$css:!0},body:{fontFamily:"mly1rj5sg5",color:"mly1dhlylr",fontWeight:"mlyo1l8bm",fontSize:"mlyif65rj",lineHeight:"mly1fc57z9",letterSpacing:"mly12oo3zp",$$css:!0},link:{fontFamily:"mly1rj5sg5",color:"mlykfrnou",fontWeight:"mlyo1l8bm",fontSize:"mlyif65rj",lineHeight:"mly1fc57z9",letterSpacing:"mly12oo3zp",$$css:!0},supporting:{fontFamily:"mly1rj5sg5",color:"mly1dhlylr",fontWeight:"mlyo1l8bm",fontSize:"mlyfifm61",lineHeight:"mly1d3mw78",letterSpacing:"mly12oo3zp",$$css:!0},badge:{fontFamily:"mly1rj5sg5",color:"mly183j0n7",fontWeight:"mly1s688f",fontSize:"mlyfifm61",lineHeight:"mly1d3mw78",letterSpacing:"mly1gu5id8",$$css:!0}},aJt=a=>Y.createElement("svg",{width:110,height:110,viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"cahevron_down",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M52.9466923,41.3127809 C54.0529774,40.2742275 55.7502198,40.2309545 56.9057514,41.1829617 L57.0533077,41.3127809 L81.5533077,64.3127809 C82.7612755,65.4467914 82.8212296,67.34534 81.6872191,68.5533077 C80.5968243,69.7148152 78.7995712,69.8149195 77.5890551,68.8127704 L77.4466923,68.6872191 L54.9999906,47.615 L32.5533077,68.6872191 C31.3918003,69.7776139 29.5918121,69.7641211 28.4469384,68.6875913 L28.3127809,68.5533077 C27.2223861,67.3918003 27.2358789,65.5918121 28.3124087,64.4469384 L28.4466923,64.3127809 L52.9466923,41.3127809 Z",id:"Path",fill:"currentColor",fillRule:"nonzero",transform:"translate(55.000000, 55.000005) rotate(-180.000000) translate(-55.000000, -55.000005) "}))),lJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"chevron_left",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M52.9466923,41.3127809 C54.0529774,40.2742275 55.7502198,40.2309545 56.9057514,41.1829617 L57.0533077,41.3127809 L81.5533077,64.3127809 C82.7612755,65.4467914 82.8212296,67.34534 81.6872191,68.5533077 C80.5968243,69.7148152 78.7995712,69.8149195 77.5890551,68.8127704 L77.4466923,68.6872191 L54.9999906,47.615 L32.5533077,68.6872191 C31.3918003,69.7776139 29.5918121,69.7641211 28.4469384,68.6875913 L28.3127809,68.5533077 C27.2223861,67.3918003 27.2358789,65.5918121 28.3124087,64.4469384 L28.4466923,64.3127809 L52.9466923,41.3127809 Z",id:"Path",fill:"currentColor",fillRule:"nonzero",transform:"translate(55.000000, 55.000005) rotate(-90.000000) translate(-55.000000, -55.000005) "}))),uJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"chevron_right",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M52.9466923,41.3127809 C54.0529774,40.2742275 55.7502198,40.2309545 56.9057514,41.1829617 L57.0533077,41.3127809 L81.5533077,64.3127809 C82.7612755,65.4467914 82.8212296,67.34534 81.6872191,68.5533077 C80.5968243,69.7148152 78.7995712,69.8149195 77.5890551,68.8127704 L77.4466923,68.6872191 L54.9999906,47.615 L32.5533077,68.6872191 C31.3918003,69.7776139 29.5918121,69.7641211 28.4469384,68.6875913 L28.3127809,68.5533077 C27.2223861,67.3918003 27.2358789,65.5918121 28.3124087,64.4469384 L28.4466923,64.3127809 L52.9466923,41.3127809 Z",id:"Path",fill:"currentColor",fillRule:"nonzero",transform:"translate(55.000000, 55.000005) rotate(-270.000000) translate(-55.000000, -55.000005) "}))),cJt=a=>Y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:24,viewBox:"0 0 24 24",width:24,...a},Y.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),Y.createElement("path",{fill:"currentColor",d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})),Tje=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"query_clear_hover",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("circle",{className:"circle hoverfill",fill:"transparent",cx:55,cy:55,r:55}),Y.createElement("path",{d:"M78.1428571,25 L85,31.8571429 L61.857,55 L85,78.1428571 L78.1428571,85 L55,61.857 L31.8571429,85 L25,78.1428571 L48.142,55 L25,31.8571429 L31.8571429,25 L55,48.143 L78.1428571,25 Z",className:"cross primaryfill",fill:"currentColor"}))),dJt=a=>Y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...a},Y.createElement("path",{d:"M360-240q-33 0-56.5-23.5T280-320v-480q0-33 23.5-56.5T360-880h360q33 0 56.5 23.5T800-800v480q0 33-23.5 56.5T720-240H360Zm0-80h360v-480H360v480ZM200-80q-33 0-56.5-23.5T120-160v-560h80v560h440v80H200Zm160-240v-480 480Z"})),fJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"query_add",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M75.8285714,28 L82,34.1714286 L61.171,55 L82,75.8285714 L75.8285714,82 L54.999,61.171 L34.1714286,82 L28,75.8285714 L48.828,55 L28,34.1714286 L34.1714286,28 L55,48.829 L75.8285714,28 Z",id:"Combined-Shape-Copy",fill:"currentColor",transform:"translate(55.000000, 55.000000) rotate(-315.000000) translate(-55.000000, -55.000000) ",className:"primaryfill"}))),hJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"5 5 100 100",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"insert_measure",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M64.4079772,43.4952662 C64.4079772,65.775216 64.4079772,77.6781315 64.4079772,79.2040126 C64.4079772,81.4928343 72.4309475,81.4935567 72.4309475,79.2040126 C72.4309475,77.6776499 72.4309475,65.7747344 72.4309475,43.4952662 L82.1242499,53.5032288 C82.9082803,54.3127101 83.9390395,54.7167092 84.9596343,54.7167092 C85.980229,54.7167092 87.0118722,54.3119686 87.7950187,53.5032288 C89.3623612,51.8850077 89.3623612,49.2552488 87.7950187,47.6371608 L71.2655269,30.5703346 C70.8943747,30.1871342 70.4404886,29.8781937 69.9456129,29.6650532 C69.9247535,29.6546561 69.9046123,29.6546561 69.883753,29.6435167 C69.4298852,29.4519166 68.9350096,29.3457171 68.4192709,29.3457171 C67.9035322,29.3457171 67.4086565,29.4519147 66.9547887,29.6435167 C66.9339294,29.6539139 66.9137882,29.6539139 66.8929288,29.6650532 C66.3980532,29.8781937 65.9441854,30.1863928 65.5730149,30.5703346 L49.0328429,47.6474271 C47.4655004,49.2656482 47.4655004,51.8954071 49.0328429,53.5134951 C50.6001855,55.1205753 53.1472623,55.1205753 54.714476,53.5023554 L64.4079772,43.4952662 Z",id:"Path-Copy-3",fill:"currentColor",className:"primaryfill",fillRule:"nonzero",transform:"translate(68.413931, 55.133308) rotate(-270.000000) translate(-68.413931, -55.133308) "}),Y.createElement("rect",{id:"Rectangle-Copy-50",className:"primaryfill",fill:"currentColor",fillRule:"nonzero",transform:"translate(32.019040, 39.025784) rotate(-90.000000) translate(-32.019040, -39.025784) ",x:24.0122609,y:34.8667243,width:16.0135574,height:8.31811859}),Y.createElement("rect",{id:"Rectangle-Copy-51",className:"primaryfill",fill:"currentColor",fillRule:"nonzero",transform:"translate(32.019040, 72.330197) rotate(-90.000000) translate(-32.019040, -72.330197) ",x:24.0122609,y:68.1711376,width:16.0135574,height:8.31811859}),Y.createElement("circle",{id:"Oval-Copy-16",className:"primarystroke",stroke:"currentColor",strokeWidth:7,fillRule:"nonzero",transform:"translate(32.019040, 88.946306) rotate(-180.000000) translate(-32.019040, -88.946306) ",cx:32.0190396,cy:88.9463056,r:9.09652528}),Y.createElement("circle",{id:"Oval-Copy-20",className:"primarystroke",stroke:"currentColor",strokeWidth:7,fillRule:"nonzero",transform:"translate(32.019040, 55.133308) rotate(-90.000000) translate(-32.019040, -55.133308) ",cx:32.0190396,cy:55.1333084,r:9.09652528}),Y.createElement("circle",{id:"Oval-Copy-21",className:"primarystroke",stroke:"currentColor",strokeWidth:7,fillRule:"nonzero",cx:32.0190396,cy:23.2007668,r:9.09652528}))),pJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"insert_filter",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M87.3843313,20.5 C88.0702245,20.5 88.6794354,20.684137 89.1839151,20.9924545 C89.72968,21.3260038 90.1536978,21.8060023 90.4194477,22.364077 C90.6824778,22.9164401 90.7905536,23.5453405 90.7077209,24.1843828 C90.641307,24.6967561 90.4522801,25.21669 90.1181537,25.7073778 L89.9660074,25.9157747 L65.9667297,54.9330833 L65.9667297,86.0952768 C65.9667297,87.3578277 65.3421199,88.3687734 64.46847,88.9512067 C64.0000984,89.2634544 63.4591929,89.4523731 62.9014864,89.49211 C62.4335638,89.5254497 61.9536386,89.4542406 61.4987219,89.2647425 L61.3053966,89.1762469 L45.2981054,81.501442 C44.7448345,81.2248066 44.1940182,80.794047 43.8075879,80.2144017 C43.516589,79.7779032 43.3168206,79.2579753 43.2760203,78.6543848 L43.268304,78.4241163 L43.268304,54.9330833 L19.2778986,25.9265022 C18.8405281,25.4244753 18.5999563,24.8470099 18.5253334,24.2601464 C18.4451968,23.6299215 18.5577673,22.9877736 18.8297244,22.4166636 C19.0989541,21.8512813 19.5239716,21.3563425 20.06756,21.0111708 C20.5069962,20.7321343 21.0239609,20.5500465 21.6001779,20.5088845 L21.8507024,20.5 L87.3843313,20.5 Z M80.4108174,26.9794004 L28.8312662,26.9794004 L49.2106529,51.6044926 L49.3557497,51.8317181 C49.767411,52.5135117 49.9668805,53.1962297 49.9668805,53.8764024 L49.9668805,53.8764024 L49.9668805,76.3587304 L59.2681532,80.9104171 L59.2681532,53.6572264 L59.2765596,53.4785743 C59.3429907,52.7639199 59.7932531,52.0547544 60.2732157,51.568472 L60.2732157,51.568472 L80.4108174,26.9794004 Z",id:"Shape-Copy-2",stroke:"currentColor",fill:"currentColor",className:"primaryfill primarystroke",fillRule:"nonzero"}))),mJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"insert_group_by",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M31.7463881,49.3114698 C32.6824928,49.3083801 33.6154932,49.1963884 34.5261904,48.9793527 L45.0010173,67.8024842 L45.0010173,67.8032565 C43.2956473,70.2493007 42.5480527,73.2367133 42.8986175,76.1988173 C43.2492613,79.1601303 44.6742783,81.890304 46.9033203,83.870708 C49.1330544,85.851903 52.0117188,86.9463056 54.9937928,86.9463056 C57.9758669,86.9463056 60.8545313,85.8518634 63.0834745,83.870708 C65.3132086,81.890304 66.7382058,79.1601303 67.0889682,76.1988173 C67.4396121,73.2369111 66.6919779,70.2493007 64.9865684,67.8032565 L75.4613953,48.980125 L75.4613953,48.9793527 C78.5099046,49.699958 81.7183727,49.2180056 84.4200741,47.6338999 C87.1225664,46.0505653 89.1106817,43.4862425 89.9717699,40.4749053 C90.8328581,37.4635681 90.5008399,34.235723 89.0449384,31.4630387 C87.5882658,28.6903544 85.1197206,26.584791 82.151685,25.5847028 C79.1834516,24.5837248 75.9441385,24.7652355 73.1066007,26.0913707 C70.2688652,27.4167347 68.0507969,29.7848559 66.9138836,32.7028673 L43.0841815,32.7028673 C42.0044302,29.9371034 39.9514417,27.6601133 37.310837,26.3015513 C34.6702324,24.9429696 31.623898,24.5961814 28.7454313,25.32606 C25.8669647,26.0559385 23.3534966,27.8122421 21.6791694,30.2652067 C20.0046839,32.7173803 19.284138,35.6972794 19.6532888,38.644554 C20.021708,41.5910378 21.4544362,44.3012413 23.6819162,46.2662229 C25.9086844,48.2303345 28.776474,49.3139413 31.7460915,49.3115686 L31.7463881,49.3114698 Z M54.9987359,80.3146003 C53.5304767,80.3146003 52.1224442,79.7314725 51.0836021,78.6934213 C50.0455509,77.6545989 49.4624231,76.2465862 49.4624231,74.7782874 C49.4624231,73.3099887 50.0455509,71.9019957 51.0836021,70.8639445 C52.1224245,69.8251221 53.5304372,69.2419944 54.9987359,69.2419944 C56.4670347,69.2419944 57.8750277,69.8251221 58.9138698,70.8639445 C59.951921,71.9019957 60.5350488,73.3099887 60.5350488,74.7782874 C60.5350488,76.2465862 59.951921,77.6545792 58.9138698,78.6934213 C57.8750474,79.7314725 56.4670347,80.3146003 54.9987359,80.3146003 Z M78.2510838,31.5953952 C79.7193431,31.5953952 81.1273755,32.1785229 82.1654268,33.2165742 C83.203478,34.2553966 83.7873769,35.6634093 83.7873769,37.131708 C83.7873769,38.6000068 83.203478,40.0079998 82.1654268,41.046051 C81.1273755,42.0848734 79.7193826,42.6680011 78.2510838,42.6680011 C76.7828246,42.6680011 75.3740012,42.0848734 74.33595,41.046051 C73.2978987,40.0079998 72.714771,38.6000068 72.714771,37.131708 C72.714771,35.6634093 73.2978987,34.2554163 74.33595,33.2165742 C75.3740012,32.1785229 76.7827851,31.5953952 78.2510838,31.5953952 Z M43.7166018,39.3459801 L66.2808701,39.3459801 C66.7149337,41.7696815 67.8734779,44.0047541 69.6028318,45.75738 L59.7591401,63.5727121 C56.7137943,62.2774614 53.2720118,62.2774614 50.2258752,63.5727121 L40.3380911,45.75738 C42.0882652,44.0118524 43.2661865,41.7758109 43.7156132,39.3459801 L43.7166018,39.3459801 Z M31.7465858,31.5953952 C33.214845,31.5953952 34.6236684,32.1785229 35.6617196,33.2165742 C36.6997709,34.2553966 37.2828986,35.6634093 37.2828986,37.131708 C37.2828986,38.6000068 36.6997709,40.0079998 35.6617196,41.046051 C34.6236684,42.0848734 33.2148846,42.6680011 31.7465858,42.6680011 C30.2783266,42.6680011 28.8702941,42.0848734 27.8322428,41.046051 C26.7941916,40.0079998 26.2102927,38.6000068 26.2102927,37.131708 C26.2102927,35.6634093 26.7941916,34.2554163 27.8322428,33.2165742 C28.8702941,32.1785229 30.278287,31.5953952 31.7465858,31.5953952 L31.7465858,31.5953952 Z",id:"Shape-Copy-3",fill:"currentColor",fillRule:"nonzero",className:"primaryfill"}))),gJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"insert_limit",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("rect",{id:"Rectangle-Copy-46",className:"primaryfill",fill:"currentColor",x:24,y:23,width:61.9377906,height:8,rx:4}),Y.createElement("rect",{id:"Rectangle-Copy-47",className:"primaryfill",fill:"currentColor",x:24,y:39,width:61.9377906,height:8,rx:4}),Y.createElement("rect",{id:"Rectangle-Copy-48",className:"primaryfill",fill:"currentColor",x:24,y:55,width:53.5,height:8,rx:4}),Y.createElement("rect",{id:"Rectangle-Copy-49",className:"primaryfill",fill:"currentColor",x:24,y:71.1904762,width:40,height:7.61904762,rx:3.80952381}),Y.createElement("path",{d:"M77.1113683,65.3807638 L87.6203313,83.396129 C87.8986116,83.8731809 87.7374754,84.4854986 87.2604234,84.7637789 C87.1074874,84.8529916 86.933607,84.9 86.7565524,84.9 L65.7386264,84.9 C65.1863417,84.9 64.7386264,84.4522847 64.7386264,83.9 C64.7386264,83.7229454 64.7856348,83.549065 64.8748475,83.396129 L75.3838105,65.3807638 C75.6620908,64.9037119 76.2744085,64.7425757 76.7514604,65.020856 C76.9004641,65.1077747 77.0244495,65.2317602 77.1113683,65.3807638 Z",id:"Triangle-Copy-2",fill:"currentColor",className:"primaryfill",transform:"translate(76.247589, 74.400000) rotate(-90.000000) translate(-76.247589, -74.400000) "}))),xJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"insert_nest",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M27.3181186,27 C29.5272576,27 31.3181186,28.790861 31.3181186,31 L31.318,59.317 L72.9431634,59.317258 L62.9360743,49.6237568 C61.3178543,48.0565431 61.3178543,45.5094664 62.9249345,43.9421238 C64.5430225,42.3747812 67.1727815,42.3747812 68.7910025,43.9421238 L68.7910025,43.9421238 L85.8680951,60.4822957 C86.2520369,60.8534663 86.560236,61.307334 86.7733764,61.8022097 C86.7845158,61.823069 86.7845158,61.8432103 86.7949129,61.8640696 C86.986515,62.3179374 87.0927126,62.812813 87.0927126,63.3285517 C87.0927126,63.8442904 86.9865131,64.3391661 86.7949129,64.7930338 C86.7837736,64.8138932 86.7837736,64.8340344 86.7733764,64.8548938 C86.560236,65.3497694 86.2512954,65.8036556 85.8680951,66.1748077 L85.8680951,66.1748077 L68.8012688,82.7042995 C67.1831809,84.2716421 64.5534219,84.2716421 62.9352009,82.7042995 C62.1264611,81.921153 61.7217204,80.8895099 61.7217204,79.8689151 C61.7217204,78.8483204 62.1257196,77.8175611 62.9352009,77.0335308 L62.9352009,77.0335308 L72.9431634,67.3402284 L27.234417,67.3402284 C25.2840646,67.3402284 23.6511005,66.037955 23.2100653,64.2817501 C23.0737364,63.8793045 23,63.4482633 23,63 L23,31 C23,28.790861 24.790861,27 27,27 L27.3181186,27 Z",id:"Combined-Shape-Copy",fill:"currentColor",className:"primaryfill",fillRule:"nonzero"}))),yJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"10 10 90 90",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"insert_order_by",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M30.5506412,37.7046734 L30.5506412,81.9762916 C30.5506412,84.1931505 32.3445678,85.9877768 34.5621264,85.9877768 C36.7789852,85.9877768 38.5736115,84.1938502 38.5736115,81.9762916 L38.5736115,37.7046734 L48.2669139,47.3979757 C49.0509443,48.1820061 50.0817035,48.5733031 51.1022983,48.5733031 C52.122893,48.5733031 53.1545362,48.1812879 53.9376827,47.3979757 C55.5050252,45.8306331 55.5050252,43.2835564 53.9376827,41.7163427 L37.4081909,25.1861143 C37.0370387,24.8149622 36.5831526,24.515735 36.0882769,24.3092959 C36.0674175,24.2992257 36.0472763,24.2992257 36.026417,24.2884366 C35.5725492,24.1028605 35.0776736,24 34.5619349,24 C34.0461961,24 33.5513205,24.1028586 33.0974527,24.2884366 C33.0765934,24.2985068 33.0564522,24.2985068 33.0355928,24.3092959 C32.5407172,24.515735 32.0868494,24.814244 31.7156789,25.1861143 L15.1755069,41.7262862 C13.6081644,43.2936288 13.6081644,45.8407055 15.1755069,47.4079192 C16.7428495,48.9644712 19.2899263,48.9644712 20.85714,47.3971298 L30.5506412,37.7046734 Z",id:"Path-Copy",fill:"currentColor",fillRule:"nonzero",className:"primaryfill"}),Y.createElement("path",{d:"M79.9439284,72.2964315 L79.9439284,28.0137648 C79.9439284,25.796906 78.1500018,24.0022797 75.9324432,24.0022797 C73.7155844,24.0022797 71.920958,25.7962062 71.920958,28.0137648 L71.920958,72.2853831 L62.2276557,62.5920808 C60.6603131,61.0247382 58.1233641,61.0247382 56.5460227,62.5920808 C54.9786801,64.1594234 54.9786801,66.7065001 56.5460227,68.2737138 L73.0861946,84.8138857 C73.4573467,85.1850378 73.9112329,85.484265 74.4061086,85.6907041 C74.4269679,85.7007743 74.4471091,85.7007743 74.4679685,85.7115634 C74.9218362,85.8971395 75.4167119,86 75.9324506,86 C76.4481893,86 76.943065,85.8971414 77.3969327,85.7115634 C77.4177921,85.7014932 77.4379333,85.7014932 77.4587926,85.6907041 C77.9536683,85.484265 78.407536,85.185756 78.7787066,84.8138857 L95.3188785,68.2737138 C96.8862211,66.7063712 96.8862211,64.1592945 95.3188785,62.5920808 C93.7515359,61.0355288 91.2044592,61.0355288 89.6372455,62.6028702 L79.9439284,72.2964315 Z",id:"Path-Copy-2",className:"primaryfill",fill:"currentColor",fillRule:"nonzero"}))),vJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"0 0 25 25",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("title",null,"join_icon_one_to_many"),Y.createElement("g",{id:"join_icon_one_to_many",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"Group",transform:"translate(12.759300, 12.500000) rotate(-180.000000) translate(-12.759300, -12.500000) translate(4.000000, 3.712487)",fill:"currentColor"},Y.createElement("polygon",{id:"Path-Copy-15",fillRule:"nonzero",transform:"translate(6.382256, 8.736227) scale(-1, 1) rotate(180.000000) translate(-6.382256, -8.736227) ",points:"2.80570594 3.41828749 3.48860316 2.68777302 9.95880577 8.73622728 3.48860316 14.7846815 2.80570594 14.0541671 8.494 8.736"}),Y.createElement("rect",{id:"Rectangle-Copy-91",transform:"translate(2.000000, 2.000000) scale(-1, 1) translate(-2.000000, -2.000000) ",x:0,y:0,width:4,height:4}),Y.createElement("rect",{id:"Rectangle-Copy-92",transform:"translate(2.000000, 8.736227) scale(-1, 1) translate(-2.000000, -8.736227) ",x:0,y:6.73622728,width:4,height:4}),Y.createElement("rect",{id:"Rectangle-Copy-86",transform:"translate(15.518600, 8.736227) scale(-1, 1) translate(-15.518600, -8.736227) ",x:13.5186005,y:6.73622728,width:4,height:4}),Y.createElement("rect",{id:"Rectangle-Copy-87",transform:"translate(2.000000, 15.575026) scale(-1, 1) translate(-2.000000, -15.575026) ",x:0,y:13.5750258,width:4,height:4}),Y.createElement("polygon",{id:"Line-3-Copy-68",fillRule:"nonzero",transform:"translate(8.495445, 8.736227) scale(-1, 1) translate(-8.495445, -8.736227) ",points:"14.9954453 8.23622728 14.9954453 9.23622728 1.99544525 9.23622728 1.99544525 8.23622728"})))),bJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"0 0 25 25",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("title",null,"join_icon_many_to_one"),Y.createElement("g",{id:"join_icon_many_to_one",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("polygon",{id:"Path-Copy-14",fill:"currentColor",fillRule:"nonzero",transform:"translate(10.382256, 12.736227) scale(-1, 1) rotate(180.000000) translate(-10.382256, -12.736227) ",points:"6.80570594 7.41828749 7.48860316 6.68777302 13.9588058 12.7362273 7.48860316 18.7846815 6.80570594 18.0541671 12.494 12.736"}),Y.createElement("rect",{id:"Rectangle-Copy-90",fill:"currentColor",x:4,y:4,width:4,height:4}),Y.createElement("rect",{id:"Rectangle-Copy-89",fill:"currentColor",x:4,y:10.7362273,width:4,height:4}),Y.createElement("rect",{id:"Rectangle-Copy-85",fill:"currentColor",x:17.5186005,y:10.7362273,width:4,height:4}),Y.createElement("rect",{id:"Rectangle-Copy-84",fill:"currentColor",x:4,y:17.5750258,width:4,height:4}),Y.createElement("polygon",{id:"Line-3-Copy-67",fill:"currentColor",fillRule:"nonzero",points:"18.9954453 12.2362273 18.9954453 13.2362273 5.99544525 13.2362273 5.99544525 12.2362273"}))),EJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"0 0 25 25",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("title",null,"join_icon_one_to_one"),Y.createElement("g",{id:"join_icon_one_to_one",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("rect",{id:"Rectangle-Copy-89",fill:"currentColor",x:4,y:10.7362273,width:4,height:4}),Y.createElement("rect",{id:"Rectangle-Copy-85",fill:"currentColor",x:17.5186005,y:10.7362273,width:4,height:4}),Y.createElement("polygon",{id:"Line-3-Copy-67",fill:"currentColor",fillRule:"nonzero",points:"18.9954453 12.2362273 18.9954453 13.2362273 5.99544525 13.2362273 5.99544525 12.2362273"}))),_Jt=a=>Y.createElement("svg",{width:"78px",height:"73px",viewBox:"-5 -10 90 90",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("title",null,"database_b"),Y.createElement("g",{id:"icons",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"database_b",transform:"translate(-0.000189, 0.800000)",fill:"currentColor",fillRule:"nonzero"},Y.createElement("g",{id:"Shape-2"},Y.createElement("path",{d:"M38.9978747,0 C49.4323909,0 58.8817175,1.35601948 65.8935492,3.63769481 C69.399635,4.77856169 72.3064537,6.14483766 74.4415973,7.78792208 C76.5767408,9.43100649 78,11.4644805 78,13.7176948 L78,59.1428571 C77.5289095,61.1095617 75.9098694,63.0619481 74.4415973,64.2103247 C72.3064537,65.8534091 69.3994651,67.2213799 65.8935492,68.3623052 C58.8808682,70.6440097 49.4317114,72 38.9978747,72 C28.564038,72 19.1123333,70.6439805 12.0988029,68.3623052 C8.59271719,67.2214383 5.68589845,65.8534091 3.55075491,64.2103247 C1.77316722,62.6163312 0.466092472,61.0553571 0.000162359918,59.1428571 L0.000162359918,12.826461 C-0.00497251122,12.4857468 0.111806422,12.1513003 0.334077073,11.8687938 C0.867540225,10.3512127 2.01808874,8.96790097 3.55089079,7.78869643 C5.68603434,6.14561201 8.59302294,4.77924838 12.0989388,3.63846916 C19.1116199,1.35676461 28.562815,0.000774350649 38.9980106,0.000774350649 L38.9978747,0 Z M38.9980026,4.39968547 C29.1795807,4.39968547 20.2971169,5.97898133 14.0341392,8.43960024 C10.9023181,9.66989245 8.43317659,11.1339692 6.85248078,12.602151 C3.94393403,15.3862114 4.29446142,18.3655235 6.85248078,20.7802963 C8.43327627,22.2484263 10.9024843,23.7104505 14.0341392,24.9407772 C20.2982797,27.4014306 29.1795807,28.9827618 38.9980026,28.9827618 C48.8164245,28.9827618 57.7038721,27.4014306 63.968511,24.9407772 C67.1003321,23.710485 69.5714672,22.2484781 71.152163,20.7802963 C74.08729,18.0024452 73.4953805,14.8214996 71.152163,12.602151 C69.5713675,11.1340209 67.100166,9.66992695 63.968511,8.43960024 C57.705035,5.97894683 48.8172551,4.39968547 38.9980026,4.39968547 Z M73.3181233,24.4886668 C71.264963,26.4046321 68.5511168,28.0180283 65.3038377,29.3722628 C58.4452957,32.2325658 49.203832,33.9324103 38.9993316,33.9324103 C28.7948312,33.9324103 19.5508756,32.2325291 12.691503,29.3722628 C9.44422385,28.0179367 6.73170664,26.4046321 4.67921092,24.4886668 L4.67921092,34.5578783 C4.85118531,35.7254798 5.51373193,36.9581006 6.85314528,38.278818 C8.43394077,39.8377628 10.9031488,41.3838137 14.0348037,42.6902452 C20.2989442,45.3031082 29.1802452,46.9886668 38.9986671,46.9886668 C48.817089,46.9886668 57.7045366,45.3030899 63.9691755,42.6902452 C67.1009966,41.3838503 69.5721317,39.8378178 71.1528275,38.278818 C72.4811934,36.9688517 73.1398693,35.7461761 73.3189539,34.5871829 L73.3181233,24.4886668 Z M73.3181233,43.1016944 C71.264963,44.782251 68.5517813,46.1967717 65.3038377,47.3852582 C58.4452957,49.8941247 49.203832,51.3851147 38.9993316,51.3851147 C28.7948312,51.3851147 19.5508756,49.8940926 12.691503,47.3852582 C9.44422385,46.197334 6.73170664,44.7841788 4.67921092,43.1036222 L4.67921092,55.7057886 C4.85118531,56.7299305 5.51373193,57.811103 6.85314528,58.9695481 C8.43394077,60.3369502 10.9031488,61.6911148 14.0348037,62.8370291 C20.2989442,65.1288579 29.1802452,66.6016944 38.9986671,66.6016944 C48.817089,66.6016944 57.7045366,65.1288579 63.9691755,62.8370291 C67.1009966,61.6911469 69.5721317,60.3369984 71.1528275,58.9695481 C72.4811934,57.8205331 73.1398693,56.7480839 73.3189539,55.7314925 L73.3181233,43.1016944 Z",id:"Shape"}))))),pLe=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"2.5 2.5 11 11",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"type-icon-number",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M12,7 L12,6 L10,6 L10,4 L9,4 L9,6 L7,6 L7,4 L6,4 L6,6 L4,6 L4,7 L6,7 L6,9 L4,9 L4,10 L6,10 L6,12 L7,12 L7,10 L9,10 L9,12 L10,12 L10,10 L12,10 L12,9 L10,9 L10,7 L12,7 Z M9,9 L7,9 L7,7 L9,7 L9,9 Z",id:"Shape-Copy-21",fill:"currentColor",fillRule:"nonzero"}))),SJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"3.5 3.5 9 9",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"type-icon-projection",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M11.3362588,4 L11.3362588,12 L8,9.90676786 L4.6637412,12 L4.6637412,4 L11.3362588,4 Z M10.336,5 L5.663,5 L5.663,10.191 L8,8.72623637 L10.336,10.191 L10.336,5 Z",id:"Rectangle",fill:"currentColor",className:"primaryfill",fillRule:"nonzero"}))),mLe=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"3.5 3.5 9 9",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"type-icon-string",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M4.8045,10.45 L5.2245,9.253 L7.1425,9.253 L7.5625,10.45 L8.6055,10.45 L6.7225,5.438 L5.6375,5.438 L3.7615,10.45 L4.8045,10.45 Z M6.8345,8.385 L5.5255,8.385 L5.9735,7.125 L6.1555,6.523 L6.2115,6.523 L6.3935,7.125 L6.8345,8.385 Z M10.2505,10.562 C10.4791667,10.562 10.681,10.5176667 10.856,10.429 C11.031,10.3403333 11.1721667,10.226 11.2795,10.086 L11.2795,10.086 L11.3355,10.086 L11.3355,10.45 L12.2385,10.45 L12.2385,8.252 C12.2385,7.76666667 12.0961667,7.398 11.8115,7.146 C11.5268333,6.894 11.1115,6.768 10.5655,6.768 C10.2575,6.768 9.97283333,6.82866667 9.7115,6.95 C9.45016667,7.07133333 9.23316667,7.244 9.0605,7.468 L9.0605,7.468 L9.6485,7.93 C9.75116667,7.804 9.88066667,7.7025 10.037,7.6255 C10.1933333,7.5485 10.3555,7.51 10.5235,7.51 C10.7708333,7.51 10.968,7.57066667 11.115,7.692 C11.262,7.81333333 11.3355,7.972 11.3355,8.168 L11.3355,8.168 L11.3355,8.322 C11.0741667,8.21466667 10.7591667,8.161 10.3905,8.161 C10.1245,8.161 9.88183333,8.21 9.6625,8.308 C9.44316667,8.406 9.2705,8.546 9.1445,8.728 C9.0185,8.91 8.9555,9.12 8.9555,9.358 C8.9555,9.71733333 9.07683333,10.0078333 9.3195,10.2295 C9.56216667,10.4511667 9.8725,10.562 10.2505,10.562 Z M10.4675,9.848 C10.2761667,9.848 10.1291667,9.8025 10.0265,9.7115 C9.92383333,9.6205 9.8725,9.50266667 9.8725,9.358 C9.8725,9.00333333 10.1105,8.826 10.5865,8.826 C10.8478333,8.826 11.0975,8.882 11.3355,8.994 C11.3355,9.22266667 11.2573333,9.42216667 11.101,9.5925 C10.9446667,9.76283333 10.7335,9.848 10.4675,9.848 Z",id:"Aa-Copy",fill:"currentColor",fillRule:"nonzero"}))),AJt=a=>Y.createElement("svg",{fill:"none",height:15,viewBox:"0 0 15 15",width:15,xmlns:"http://www.w3.org/2000/svg",...a},Y.createElement("path",{clipRule:"evenodd",d:"m2.5 2c-.27614 0-.5.22386-.5.5v10c0 .2761.22386.5.5.5h2c.27614 0 .5-.2239.5-.5s-.22386-.5-.5-.5h-1.5v-9h1.5c.27614 0 .5-.22386.5-.5s-.22386-.5-.5-.5zm8 0c-.2761 0-.5.22386-.5.5s.2239.5.5.5h1.5v9h-1.5c-.2761 0-.5.2239-.5.5s.2239.5.5.5h2c.2761 0 .5-.2239.5-.5v-10c0-.27614-.2239-.5-.5-.5zm-4.5 5h-1v1h1zm1 0h1v1h-1zm3 0h-1v1h1z",fill:"currentColor",fillRule:"evenodd"})),CJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"2.5 2.5 11 11",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"type-icon-on-off",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"Group-Copy",transform:"translate(4.295444, 4.604157)",fill:"currentColor",fillRule:"nonzero"},Y.createElement("path",{d:"M1.61912392,3.08712961 L5.78998715,3.08712961 C6.6842046,3.08712961 7.40911107,2.39605211 7.40911107,1.54356481 C7.40911107,0.691077503 6.6842046,0 5.78998715,0 L1.61912392,0 C0.724906472,0 0,0.691077503 0,1.54356481 C0,2.39605211 0.724906472,3.08712961 1.61912392,3.08712961 Z M1.61912392,0.617425922 L5.78998715,0.617425922 C6.32651762,0.617425922 6.7614615,1.03207242 6.7614615,1.54356481 C6.7614615,2.05505719 6.32651762,2.46970369 5.78998715,2.46970369 L1.61912392,2.46970369 C1.08259345,2.46970369 0.647649569,2.05505719 0.647649569,1.54356481 C0.647649569,1.03207242 1.08259345,0.617425922 1.61912392,0.617425922 Z",id:"Shape-Copy-20"}),Y.createElement("path",{d:"M1.83745135,2.13685198 C2.08762004,2.13888594 2.31428875,1.98975367 2.4114368,1.75920941 C2.50858486,1.52866515 2.45700749,1.2622842 2.28082919,1.08466199 C2.10465088,0.907039785 1.83869956,0.853289683 1.60736972,0.948552441 C1.37603988,1.0438152 1.22505383,1.26925874 1.22505383,1.51943543 C1.22505383,1.85847446 1.49842318,2.13409557 1.83745135,2.13685198 L1.83745135,2.13685198 Z",id:"Path-Copy-14"}),Y.createElement("path",{d:"M5.78998714,3.70455553 L1.6191239,3.70455553 C0.724906454,3.70455553 0,4.39563305 0,5.24812034 C0,6.10060763 0.724906454,6.79168514 1.6191239,6.79168514 L5.78998714,6.79168514 C6.68420459,6.79168514 7.40911107,6.10060764 7.40911107,5.24812034 C7.40911107,4.39563304 6.68420459,3.70455553 5.78998714,3.70455553 L5.78998714,3.70455553 Z M5.78998714,6.17425922 L1.6191239,6.17425922 C1.08259342,6.17425922 0.647649538,5.75961272 0.647649538,5.24812034 C0.647649538,4.73662796 1.08259342,4.32198146 1.6191239,4.32198146 L5.78998714,4.32198146 C6.32651761,4.32198146 6.7614615,4.73662796 6.7614615,5.24812034 C6.7614615,5.75961272 6.32651761,6.17425922 5.78998714,6.17425922 L5.78998714,6.17425922 Z",id:"Shape-Copy-21"}),Y.createElement("path",{d:"M5.54392378,4.67774545 C5.2937551,4.6757115 5.06708639,4.82484377 4.96993833,5.05538803 C4.87279028,5.28593228 4.92436765,5.55231324 5.10054595,5.72993544 C5.27672426,5.90755765 5.54267558,5.96130775 5.77400542,5.86604499 C6.00533526,5.77078224 6.15632131,5.5453387 6.15632131,5.295162 C6.15632131,4.95612297 5.88295196,4.68050187 5.54392378,4.67774545 Z",id:"Path-Copy-15"})))),RJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"3.5 3.5 9 9",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"type-icon-date",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"Group-Copy-22",transform:"translate(4.753763, 4.094719)",fill:"currentColor",fillRule:"nonzero"},Y.createElement("path",{d:"M5.84322609,0.649247344 L5.51860242,0.649247344 L5.51860242,0 L4.86935508,0 L4.86935508,0.649247344 L1.62311836,0.649247344 L1.62311836,0 L0.973871015,0 L0.973871015,0.649247344 L0.649247344,0.649247344 C0.292161305,0.649247344 0,0.941408648 0,1.29849469 L0,6.49247344 C0,6.84955947 0.292161305,7.14172078 0.649247344,7.14172078 L5.84322609,7.14172078 C6.20031213,7.14172078 6.49247344,6.84955947 6.49247344,6.49247344 L6.49247344,1.29849469 C6.49247344,0.941408648 6.20031213,0.649247344 5.84322609,0.649247344 Z M5.84322609,6.49247344 L0.649247344,6.49247344 L0.649247344,2.2723657 L5.84322609,2.2723657 L5.84322609,6.49247344 Z",id:"Shape"})))),TJt=a=>Y.createElement("svg",{fill:"none",height:15,viewBox:"0 0 15 15",width:15,xmlns:"http://www.w3.org/2000/svg",...a},Y.createElement("g",{clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"},Y.createElement("path",{d:"m3 3.5c0-.82843.67157-1.5 1.5-1.5h1c.27614 0 .5.22386.5.5s-.22386.5-.5.5h-1c-.27614 0-.5.22386-.5.5v2.88197c0 .43292-.18638.83753-.49993 1.11803.31355.2805.49993.68511.49993 1.11803v2.88197c0 .2761.22386.5.5.5h1c.27614 0 .5.2239.5.5s-.22386.5-.5.5h-1c-.82843 0-1.5-.6716-1.5-1.5v-2.88197c0-.18938-.107-.36251-.27639-.44721l-.44722-.22361c-.16939-.08469-.27639-.25782-.27639-.44721s.107-.36252.27639-.44721l.44722-.22361c.16939-.0847.27639-.25783.27639-.44721z"}),Y.createElement("path",{d:"m12 3.5c0-.82843-.6716-1.5-1.5-1.5h-1c-.27614 0-.5.22386-.5.5s.22386.5.5.5h1c.2761 0 .5.22386.5.5v2.88197c0 .43292.1864.83753.4999 1.11803-.3135.2805-.4999.68511-.4999 1.11803v2.88197c0 .2761-.2239.5-.5.5h-1c-.27614 0-.5.2239-.5.5s.22386.5.5.5h1c.8284 0 1.5-.6716 1.5-1.5v-2.88197c0-.18938.107-.36251.2764-.44721l.4472-.22361c.1694-.08469.2764-.25782.2764-.44721s-.107-.36252-.2764-.44721l-.4472-.22361c-.1694-.0847-.2764-.25783-.2764-.44721z"}))),wJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"2.5 2.5 11 11",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"type-icon-number",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M12,7 L12,6 L10,6 L10,4 L9,4 L9,6 L7,6 L7,4 L6,4 L6,6 L4,6 L4,7 L6,7 L6,9 L4,9 L4,10 L6,10 L6,12 L7,12 L7,10 L9,10 L9,12 L10,12 L10,10 L12,10 L12,9 L10,9 L10,7 L12,7 Z M9,9 L7,9 L7,7 L9,7 L9,9 Z",id:"Shape-Copy-21",fill:"currentColor",fillRule:"nonzero"}))),OJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"3.5 3.5 9 9",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"type-icon-projection",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M11.3362588,4 L11.3362588,12 L8,9.90676786 L4.6637412,12 L4.6637412,4 L11.3362588,4 Z M10.336,5 L5.663,5 L5.663,10.191 L8,8.72623637 L10.336,10.191 L10.336,5 Z",id:"Rectangle",fill:"currentColor",className:"primaryfill",fillRule:"nonzero"}))),NJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"3.5 3.5 9 9",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"type-icon-projection",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M11.3362588,4 L11.3362588,12 L8,9.90676786 L4.6637412,12 L4.6637412,4 L11.3362588,4 Z",id:"Rectangle",fill:"currentColor",className:"primaryfill",fillRule:"nonzero"}))),DJt=a=>Y.createElement("svg",{fill:"none",height:110,viewBox:"1 1 12.5 12.5",width:15,xmlns:"http://www.w3.org/2000/svg",...a},Y.createElement("path",{clipRule:"evenodd",d:"m2 5.5c0-.27614.22386-.5.5-.5h2c.27614 0 .5.22386.5.5s-.22386.5-.5.5h-1.5v1h1.5c.27614 0 .5.22386.5.5v2c0 .27614-.22386.5-.5.5h-2c-.27614 0-.5-.22386-.5-.5s.22386-.5.5-.5h1.5v-1h-1.5c-.27614 0-.5-.22386-.5-.5zm4 0c0-.27614.22386-.5.5-.5h2c.27614 0 .5.22386.5.5v4.5h.5c.27614 0 .5.2239.5.5s-.22386.5-.5.5h-1c-.27614 0-.5-.2239-.5-.5v-.5h-1.5c-.27614 0-.5-.22386-.5-.5zm2 3.5h-1v-3h1zm2.5-4c.2761 0 .5.22386.5.5v3.5h1.5c.2761 0 .5.22386.5.5s-.2239.5-.5.5h-2c-.2761 0-.5-.22386-.5-.5v-4c0-.27614.2239-.5.5-.5z",fill:"currentColor",fillRule:"evenodd"})),kJt=a=>Y.createElement("svg",{fill:"none",height:15,viewBox:"0 0 15 15",width:15,xmlns:"http://www.w3.org/2000/svg",...a},Y.createElement("g",{fill:"currentColor"},Y.createElement("path",{d:"m4.5 7.5c0 .55228-.44772 1-1 1s-1-.44772-1-1 .44772-1 1-1 1 .44772 1 1z"}),Y.createElement("path",{d:"m8.5 7.5c0 .55228-.44772 1-1 1s-1-.44772-1-1 .44772-1 1-1 1 .44772 1 1z"}),Y.createElement("path",{d:"m11.5 8.5c.5523 0 1-.44772 1-1s-.4477-1-1-1-1 .44772-1 1 .4477 1 1 1z"}))),LJt=a=>Y.createElement("svg",{fill:"none",height:110,viewBox:"3 3 9 9",width:15,xmlns:"http://www.w3.org/2000/svg",...a},Y.createElement("path",{clipRule:"evenodd",d:"m4.74513 11.5809 6.48017-3.64512c.3398-.19115.3398-.68043 0-.87158l-6.48017-3.64507c-.3333-.18749-.74513.05337-.74513.43578v7.29019c0 .3824.41183.6232.74513.4358zm.25487-6.87106v5.58026l4.96027-2.79011z",fill:"currentColor",fillRule:"evenodd"})),IJt=a=>Y.createElement("svg",{height:16,viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...a},Y.createElement("circle",{cx:8,cy:8,r:8,fill:"currentColor"}),Y.createElement("circle",{cx:8,cy:8,r:4,fill:"#FFFFFF"})),PJt=a=>Y.createElement("svg",{height:16,viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...a},Y.createElement("circle",{cx:8,cy:8,r:8,fill:"currentColor"}),Y.createElement("circle",{cx:8,cy:8,r:7,fill:"#FFFFFF"})),jJt=a=>Y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...a},Y.createElement("path",{d:"m40-120 440-760 440 760H40Zm138-80h604L480-720 178-200Zm302-40q17 0 28.5-11.5T520-280q0-17-11.5-28.5T480-320q-17 0-28.5 11.5T440-280q0 17 11.5 28.5T480-240Zm-40-120h80v-200h-80v200Zm40-100Z"})),FJt=a=>Y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...a},Y.createElement("path",{d:"m424-296 282-282-56-56-226 226-114-114-56 56 170 170Zm56 216q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"})),MJt=a=>Y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...a},Y.createElement("path",{d:"M440-280h80v-240h-80v240Zm40-320q17 0 28.5-11.5T520-640q0-17-11.5-28.5T480-680q-17 0-28.5 11.5T440-640q0 17 11.5 28.5T480-600Zm0 520q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"})),$Jt=a=>Y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...a},Y.createElement("path",{d:"M480-280q17 0 28.5-11.5T520-320q0-17-11.5-28.5T480-360q-17 0-28.5 11.5T440-320q0 17 11.5 28.5T480-280Zm-40-160h80v-240h-80v240ZM330-120 120-330v-300l210-210h300l210 210v300L630-120H330Zm34-80h232l164-164v-232L596-760H364L200-596v232l164 164Zm116-280Z"})),BJt=a=>Y.createElement("svg",{height:20,viewBox:"0 0 20 20",width:20,xmlns:"http://www.w3.org/2000/svg",...a},Y.createElement("g",{fill:"none",stroke:"currentColor"},Y.createElement("path",{d:"m17.08 11.15c.01.16.02.32.02.49 0 3.89-3.16 7.05-7.05 7.05-3.89-.01-7.05-3.16-7.05-7.06 0-3.89 3.16-7.05 7.05-7.05.85 0 1.66.15 2.41.42",strokeWidth:1.1}),Y.createElement("path",{d:"m9.9 2 2.89 2.89-3 3.01"}))),qJt=a=>Y.createElement("svg",{height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",stroke:"none",...a},Y.createElement("path",{fill:"currentColor",stroke:"none",d:"m20 24h-16c-2.2 0-4-1.8-4-4v-16c0-2.2 1.8-4 4-4h16c2.2 0 4 1.8 4 4v16c0 2.2-1.8 4-4 4zm-16-22c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-16c0-1.1-.9-2-2-2z"}),Y.createElement("path",{fill:"currentColor",d:"m8 24c-.6 0-1-.4-1-1v-22c0-.6.4-1 1-1s1 .4 1 1v22c0 .6-.4 1-1 1z"}),Y.createElement("path",{fill:"currentColor",d:"m14 13c-.3 0-.5-.1-.7-.3-.4-.4-.4-1 0-1.4l3-3c.4-.4 1-.4 1.4 0s.4 1 0 1.4l-3 3c-.2.2-.4.3-.7.3z"}),Y.createElement("path",{fill:"currentColor",d:"m17 16c-.3 0-.5-.1-.7-.3l-3-3c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l3 3c.4.4.4 1 0 1.4-.2.2-.4.3-.7.3z"})),UJt=a=>Y.createElement("svg",{fill:"none",height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...a},Y.createElement("path",{d:"m11 8h10m-10 0c0 1.65685-1.34315 3-3 3s-3-1.34315-3-3m6 0c0-1.65685-1.34315-3-3-3s-3 1.34315-3 3m0 0h-2m10 8h-10m10 0c0-1.6569 1.3431-3 3-3s3 1.3431 3 3m-6 0c0 1.6569 1.3431 3 3 3s3-1.3431 3-3m0 0h2",stroke:"currentColor",strokeWidth:1.5})),zJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_bar_chart",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"Group-3",transform:"translate(20.000000, 24.000000)",fill:"currentColor"},Y.createElement("g",{id:"Group-2",transform:"translate(34.500000, 31.000000) rotate(-270.000000) translate(-34.500000, -31.000000) translate(3.500000, -3.500000)"},Y.createElement("path",{d:"M-26.056314,30.056314 L34.943686,30.056314 C37.152825,30.056314 38.943686,31.847175 38.943686,34.056314 L38.943686,34.943686 C38.943686,37.152825 37.152825,38.943686 34.943686,38.943686 L-26.056314,38.943686 C-28.265453,38.943686 -30.056314,37.152825 -30.056314,34.943686 L-30.056314,34.056314 C-30.056314,31.847175 -28.265453,30.056314 -26.056314,30.056314 Z",id:"Rectangle-Copy-59",transform:"translate(4.443686, 34.500000) rotate(-90.000000) translate(-4.443686, -34.500000) "}),Y.createElement("path",{d:"M-0.491247385,37.8466366 L44.9281075,37.8466366 C47.1372465,37.8466366 48.9281075,39.6374976 48.9281075,41.8466366 L48.9281075,42.7340086 C48.9281075,44.9431476 47.1372465,46.7340086 44.9281075,46.7340086 L-0.491247385,46.7340086 C-2.70038638,46.7340086 -4.49124739,44.9431476 -4.49124739,42.7340086 L-4.49124739,41.8466366 C-4.49124739,39.6374976 -2.70038638,37.8466366 -0.491247385,37.8466366 Z",id:"Rectangle-Copy-62",transform:"translate(22.218430, 42.290323) rotate(-90.000000) translate(-22.218430, -42.290323) "}),Y.createElement("path",{d:"M23.3837854,43.9469253 L56.6025627,43.9469253 C58.8117017,43.9469253 60.6025627,45.7377863 60.6025627,47.9469253 L60.6025627,48.8342973 C60.6025627,51.0434363 58.8117017,52.8342973 56.6025627,52.8342973 L23.3837854,52.8342973 C21.1746464,52.8342973 19.3837854,51.0434363 19.3837854,48.8342973 L19.3837854,47.9469253 C19.3837854,45.7377863 21.1746464,43.9469253 23.3837854,43.9469253 Z",id:"Rectangle-Copy-66",transform:"translate(39.993174, 48.390611) rotate(-90.000000) translate(-39.993174, -48.390611) "}),Y.createElement("path",{d:"M46.7286345,49.7286345 L68.8072017,49.7286345 C71.0163407,49.7286345 72.8072017,51.5194955 72.8072017,53.7286345 L72.8072017,54.1927983 C72.8072017,56.4019373 71.0163407,58.1927983 68.8072017,58.1927983 L46.7286345,58.1927983 C44.5194955,58.1927983 42.7286345,56.4019373 42.7286345,54.1927983 L42.7286345,53.7286345 C42.7286345,51.5194955 44.5194955,49.7286345 46.7286345,49.7286345 Z",id:"Rectangle-Copy-67",transform:"translate(57.767918, 53.960716) rotate(-90.000000) translate(-57.767918, -53.960716) "}))))),HJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_boolean",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"noun_switch_3350414-2",transform:"translate(20.000000, 22.000000)",fill:"currentColor",fillRule:"nonzero"},Y.createElement("g",{id:"noun_switch_3350414"},Y.createElement("path",{d:"M15.2972028,30.8 L54.7027972,30.8 C63.151209,30.8 70,23.9051851 70,15.4 C70,6.89481485 63.151209,0 54.7027972,0 L15.2972028,0 C6.84879098,0 0,6.89481485 0,15.4 C0,23.9051851 6.84879098,30.8 15.2972028,30.8 Z M15.2972028,6.16 L54.7027972,6.16 C59.7718443,6.16 63.8811189,10.2968889 63.8811189,15.4 C63.8811189,20.5031111 59.7718443,24.64 54.7027972,24.64 L15.2972028,24.64 C10.2281557,24.64 6.11888112,20.5031111 6.11888112,15.4 C6.11888112,10.2968889 10.2281557,6.16 15.2972028,6.16 Z",id:"Shape"}),Y.createElement("path",{d:"M19.6340542,21.9997804 C22.2930484,22.0215224 24.7022661,20.4273668 25.7348338,17.9629544 C26.7674016,15.4985421 26.2191958,12.6510518 24.3466309,10.7523518 C22.474066,8.85365189 19.6473211,8.27908795 17.1885612,9.29740315 C14.7298014,10.3157183 13.125,12.7256064 13.125,15.3998806 C13.125,19.0240523 16.0305897,21.9703156 19.6340542,21.9997804 L19.6340542,21.9997804 Z",id:"Path"}),Y.createElement("path",{d:"M54.7027971,35.2 L15.2972025,35.2 C6.84879081,35.2 0,42.094815 0,50.6 C0,59.105185 6.84879081,66 15.2972025,66 L54.7027971,66 C63.151209,66 70,59.1051851 70,50.6 C70,42.0948149 63.151209,35.2 54.7027971,35.2 L54.7027971,35.2 Z M54.7027971,59.84 L15.2972025,59.84 C10.2281554,59.84 6.11888082,55.7031111 6.11888082,50.6 C6.11888082,45.4968889 10.2281554,41.36 15.2972025,41.36 L54.7027971,41.36 C59.7718442,41.36 63.8811189,45.4968889 63.8811189,50.6 C63.8811189,55.7031111 59.7718442,59.84 54.7027971,59.84 L54.7027971,59.84 Z",id:"Shape"}),Y.createElement("path",{d:"M50.3659458,44.0002196 C47.7069516,43.9784776 45.2977339,45.5726332 44.2651662,48.0370456 C43.2325984,50.5014579 43.7808042,53.3489482 45.6533691,55.2476482 C47.525934,57.1463481 50.3526789,57.720912 52.8114388,56.7025969 C55.2701986,55.6842817 56.875,53.2743936 56.875,50.6001194 C56.875,46.9759477 53.9694103,44.0296844 50.3659458,44.0002196 Z",id:"Path"}))))),GJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_column_chart",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"Group",transform:"translate(23.500000, 19.500000)",fill:"currentColor"},Y.createElement("path",{d:"M-26.5,30.5 L35.5,30.5 C37.709139,30.5 39.5,32.290861 39.5,34.5 L39.5,35.5 C39.5,37.709139 37.709139,39.5 35.5,39.5 L-26.5,39.5 C-28.709139,39.5 -30.5,37.709139 -30.5,35.5 L-30.5,34.5 C-30.5,32.290861 -28.709139,30.5 -26.5,30.5 Z",id:"Rectangle-Copy-59",transform:"translate(4.500000, 35.000000) rotate(-90.000000) translate(-4.500000, -35.000000) "}),Y.createElement("path",{d:"M-0.5,38.5 L45.5,38.5 C47.709139,38.5 49.5,40.290861 49.5,42.5 L49.5,43.5 C49.5,45.709139 47.709139,47.5 45.5,47.5 L-0.5,47.5 C-2.709139,47.5 -4.5,45.709139 -4.5,43.5 L-4.5,42.5 C-4.5,40.290861 -2.709139,38.5 -0.5,38.5 Z",id:"Rectangle-Copy-62",transform:"translate(22.500000, 43.000000) rotate(-90.000000) translate(-22.500000, -43.000000) "}),Y.createElement("path",{d:"M23.5,45.5 L57.5,45.5 C59.709139,45.5 61.5,47.290861 61.5,49.5 L61.5,50.5 C61.5,52.709139 59.709139,54.5 57.5,54.5 L23.5,54.5 C21.290861,54.5 19.5,52.709139 19.5,50.5 L19.5,49.5 C19.5,47.290861 21.290861,45.5 23.5,45.5 Z",id:"Rectangle-Copy-66",transform:"translate(40.500000, 50.000000) rotate(-90.000000) translate(-40.500000, -50.000000) "}),Y.createElement("path",{d:"M47.5,50.5 L70.5,50.5 C72.709139,50.5 74.5,52.290861 74.5,54.5 L74.5,55.5 C74.5,57.709139 72.709139,59.5 70.5,59.5 L47.5,59.5 C45.290861,59.5 43.5,57.709139 43.5,55.5 L43.5,54.5 C43.5,52.290861 45.290861,50.5 47.5,50.5 Z",id:"Rectangle-Copy-67",transform:"translate(59.000000, 55.000000) rotate(-90.000000) translate(-59.000000, -55.000000) "})))),WJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_currency",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"Group",transform:"translate(19.000000, 19.000000)"},Y.createElement("circle",{id:"Oval",stroke:"currentColor",strokeWidth:7,cx:36,cy:36,r:32.5}),Y.createElement("path",{d:"M35.7525,20.06 C38.5425,20.06 40.7775,20.7425 42.4575,22.1075 C44.1375,23.4725 45.2775,25.01 45.8775,26.72 L41.4225,28.61 C41.1225,27.53 40.4925,26.6 39.5325,25.82 C38.5725,25.04 37.3275,24.65 35.7975,24.65 C34.3275,24.65 33.0825,25.04 32.0625,25.82 C31.0425,26.6 30.5325,27.59 30.5325,28.79 C30.5325,29.9 30.99,30.8225 31.905,31.5575 C32.759,32.2435 34.0507333,32.8968333 35.7802,33.5175 L38.2275,34.37 C40.9875,35.33 43.1175,36.575 44.6175,38.105 C46.1175,39.635 46.8675,41.675 46.8675,44.225 C46.8675,46.325 46.335,48.0875 45.27,49.5125 C44.205,50.9375 42.84,51.995 41.175,52.685 C39.51,53.375 37.8075,53.72 36.0675,53.72 C33.3975,53.72 30.9975,52.94 28.8675,51.38 C26.7375,49.82 25.2525,47.63 24.4125,44.81 L29.0925,42.92 C29.5725,44.72 30.4275,46.19 31.6575,47.33 C32.8875,48.47 34.3725,49.04 36.1125,49.04 C37.7325,49.04 39.105,48.62 40.23,47.78 C41.355,46.94 41.9175,45.785 41.9175,44.315 C41.9175,42.965 41.4225,41.8475 40.4325,40.9625 C39.4975,40.1266667 37.9202778,39.3109028 35.7008333,38.5152083 L33.2775,37.655 C31.0875,36.875 29.265,35.7875 27.81,34.3925 C26.355,32.9975 25.6275,31.145 25.6275,28.835 C25.6275,27.245 26.055,25.775 26.91,24.425 C27.765,23.075 28.965,22.01 30.51,21.23 C32.055,20.45 33.8025,20.06 35.7525,20.06 Z",id:"Path",fill:"currentColor",fillRule:"nonzero"}),Y.createElement("line",{x1:36,y1:14,x2:36,y2:21,id:"Line-Copy-4",stroke:"currentColor",strokeWidth:5}),Y.createElement("line",{x1:36,y1:52,x2:36,y2:59,id:"Line-Copy-5",stroke:"currentColor",strokeWidth:5})),Y.createElement("g",{id:"S",transform:"translate(43.412500, 37.060000)"}))),VJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_dashboard",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"dashboard_black_24dp",transform:"translate(13.000000, 13.000000)"},Y.createElement("path",{d:"M5,0 L80,0 C82.7614237,-5.07265313e-16 85,2.23857625 85,5 L85,80 C85,82.7614237 82.7614237,85 80,85 L5,85 C2.23857625,85 3.38176876e-16,82.7614237 0,80 L0,5 C-3.38176876e-16,2.23857625 2.23857625,5.07265313e-16 5,0 Z",id:"Path"}),Y.createElement("path",{d:"M67,18 L67,25 L53,25 L53,18 L67,18 M32,18 L32,39 L18,39 L18,18 L32,18 M67,46 L67,67 L53,67 L53,46 L67,46 M32,60 L32,67 L18,67 L18,60 L32,60 M69,11 L51,11 C48.2385763,11 46,13.2385763 46,16 L46,27 C46,29.7614237 48.2385763,32 51,32 L69,32 C71.7614237,32 74,29.7614237 74,27 L74,16 C74,13.2385763 71.7614237,11 69,11 Z M34,11 L16,11 C13.2385763,11 11,13.2385763 11,16 L11,41 C11,43.7614237 13.2385763,46 16,46 L34,46 C36.7614237,46 39,43.7614237 39,41 L39,16 C39,13.2385763 36.7614237,11 34,11 Z M69,39 L51,39 C48.2385763,39 46,41.2385763 46,44 L46,69 C46,71.7614237 48.2385763,74 51,74 L69,74 C71.7614237,74 74,71.7614237 74,69 L74,44 C74,41.2385763 71.7614237,39 69,39 Z M34,53 L16,53 C13.2385763,53 11,55.2385763 11,58 L11,69 C11,71.7614237 13.2385763,74 16,74 L34,74 C36.7614237,74 39,71.7614237 39,69 L39,58 C39,55.2385763 36.7614237,53 34,53 Z",id:"Shape",fill:"currentColor",fillRule:"nonzero"})))),QJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_image",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M81.4444444,28.5555556 L81.4444444,81.4444444 L28.5555556,81.4444444 L28.5555556,28.5555556 L81.4444444,28.5555556 M81.4444444,21 L28.5555556,21 C24.4,21 21,24.4 21,28.5555556 L21,81.4444444 C21,85.6 24.4,89 28.5555556,89 L81.4444444,89 C85.6,89 89,85.6 89,81.4444444 L89,28.5555556 C89,24.4 85.6,21 81.4444444,21 Z M63.0844444,54.4711111 L51.7511111,69.0911111 L43.6666667,59.3066667 L32.3333333,73.8888889 L77.6666667,73.8888889 L63.0844444,54.4711111 Z",id:"Shape",fill:"currentColor",fillRule:"nonzero"}))),YJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_json",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"{;}",transform:"translate(24.000000, 22.000000)",fill:"currentColor",fillRule:"nonzero"},Y.createElement("path",{d:"M17.0296296,66 C13.2765432,66 10.3209877,64.871179 8.16296296,62.6135371 C6.00493827,60.3558952 4.92592593,57.3296943 4.92592593,53.5349345 L4.92592593,41.6462882 C4.92592593,39.9170306 4.45679012,38.5840611 3.51851852,37.6473799 C2.58024691,36.7106987 1.40740741,36.2423581 0,36.2423581 L0,29.7576419 C1.40740741,29.7576419 2.58024691,29.2893013 3.51851852,28.3526201 C4.45679012,27.4159389 4.92592593,26.0829694 4.92592593,24.3537118 L4.92592593,12.4650655 C4.92592593,8.67030568 6.00493827,5.6441048 8.16296296,3.38646288 C10.3209877,1.12882096 13.2765432,0 17.0296296,0 L19,0 L19,6.41266376 L17.7333333,6.41266376 C16.091358,6.41266376 14.7425926,6.98908297 13.687037,8.1419214 C12.6314815,9.29475983 12.1037037,10.8318777 12.1037037,12.7532751 L12.1037037,24.3537118 C12.1037037,26.7074236 11.7166667,28.5687773 10.9425926,29.9377729 C10.1685185,31.3067686 8.93703704,32.2554585 7.24814815,32.7838428 L7.24814815,33.2161572 C8.93703704,33.7445415 10.1685185,34.6812227 10.9425926,36.0262009 C11.7166667,37.371179 12.1037037,39.2445415 12.1037037,41.6462882 L12.1037037,53.2467249 C12.1037037,55.1681223 12.6314815,56.7052402 13.687037,57.8580786 C14.7425926,59.010917 16.091358,59.5873362 17.7333333,59.5873362 L19,59.5873362 L19,66 L17.0296296,66 Z",id:"Path"}),Y.createElement("path",{d:"M44,59.5873362 L45.4074074,59.5873362 C47.0493827,59.5873362 48.3864198,59.010917 49.4185185,57.8580786 C50.4506173,56.7052402 50.9666667,55.1681223 50.9666667,53.2467249 L50.9666667,41.6462882 C50.9666667,39.2445415 51.3537037,37.371179 52.1277778,36.0262009 C52.9018519,34.6812227 54.1333333,33.7445415 55.8222222,33.2161572 L55.8222222,32.7838428 C54.1333333,32.2554585 52.9018519,31.3067686 52.1277778,29.9377729 C51.3537037,28.5687773 50.9666667,26.7074236 50.9666667,24.3537118 L50.9666667,12.7532751 C50.9666667,10.8318777 50.4506173,9.29475983 49.4185185,8.1419214 C48.3864198,6.98908297 47.0493827,6.41266376 45.4074074,6.41266376 L44,6.41266376 L44,0 L46.0407407,0 C49.7938272,0 52.7493827,1.12882096 54.9074074,3.38646288 C57.0654321,5.6441048 58.1444444,8.67030568 58.1444444,12.4650655 L58.1444444,24.3537118 C58.1444444,26.0829694 58.6018519,27.4159389 59.5166667,28.3526201 C60.4314815,29.2893013 61.5925926,29.7576419 63,29.7576419 L63,36.2423581 C61.5925926,36.2423581 60.4314815,36.7106987 59.5166667,37.6473799 C58.6018519,38.5840611 58.1444444,39.9170306 58.1444444,41.6462882 L58.1444444,53.5349345 C58.1444444,57.3296943 57.0654321,60.3558952 54.9074074,62.6135371 C52.7493827,64.871179 49.7938272,66 46.0407407,66 L44,66 L44,59.5873362 Z",id:"Path"})))),Are=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"10 10 90 90",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_line",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M88.1848681,33.1583406 C89.7542734,31.6035859 92.2869054,31.6154626 93.8416601,33.1848679 C95.3445896,34.7019597 95.3835892,37.1191334 93.9668812,38.6829968 L93.8151328,38.84166 L66.2578818,66.14166 C64.8378618,67.5484238 62.6084032,67.6843587 61.0319068,66.4919462 L60.8595019,66.3539866 L45.2420004,53.1430003 L21.844917,76.8176775 C20.3437446,78.336508 17.927116,78.4009733 16.3484126,77.0008213 L16.1881594,76.850753 C14.6693289,75.3495806 14.6048635,72.932952 16.0050156,71.3542486 L16.1550839,71.1939954 L42.1550839,44.8881592 C43.5729843,43.4535802 45.8262314,43.3057778 47.4155704,44.5116324 L47.583248,44.646014 L63.2290004,57.8810003 L88.1848681,33.1583406 Z",id:"Path-10",fill:"currentColor",fillRule:"nonzero"}))),gLe=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"10 10 90 90",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_link",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"link_black_24dp",transform:"translate(5.000000, 5.000000)"},Y.createElement("path",{d:"M5,0 L96,0 C98.7614237,-5.07265313e-16 101,2.23857625 101,5 L101,96 C101,98.7614237 98.7614237,101 96,101 L5,101 C2.23857625,101 3.38176876e-16,98.7614237 0,96 L0,5 C-3.38176876e-16,2.23857625 2.23857625,5.07265313e-16 5,0 Z",id:"Path"}),Y.createElement("path",{d:"M71,30 L58.4,30 C56.0804041,30 54.2,31.8804041 54.2,34.2 C54.2,36.5195959 56.0804041,38.4 58.4,38.4 L71,38.4 L71,38.4 C77.93,38.4 83.6,44.07 83.6,51 C83.6,57.93 77.93,63.6 71,63.6 L58.4,63.6 C56.0804041,63.6 54.2,65.4804041 54.2,67.8 C54.2,70.1195959 56.0804041,72 58.4,72 L71,72 L71,72 C82.592,72 92,62.592 92,51 C92,39.408 82.592,30 71,30 Z M41.6,63.6 L29,63.6 L29,63.6 C22.07,63.6 16.4,57.93 16.4,51 C16.4,44.07 22.07,38.4 29,38.4 L41.6,38.4 C43.9195959,38.4 45.8,36.5195959 45.8,34.2 C45.8,31.8804041 43.9195959,30 41.6,30 L29,30 L29,30 C17.408,30 8,39.408 8,51 C8,62.592 17.408,72 29,72 L41.6,72 C43.9195959,72 45.8,70.1195959 45.8,67.8 C45.8,65.4804041 43.9195959,63.6 41.6,63.6 Z M37.4,46.8 L62.6,46.8 C64.9195959,46.8 66.8,48.6804041 66.8,51 C66.8,53.3195959 64.9195959,55.2 62.6,55.2 L37.4,55.2 C35.0804041,55.2 33.2,53.3195959 33.2,51 C33.2,48.6804041 35.0804041,46.8 37.4,46.8 Z",id:"Shape",fill:"currentColor",fillRule:"nonzero"})))),KJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_list",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("rect",{id:"Rectangle-Copy-58",fill:"currentColor",x:24.1587742,y:27,width:61.9377906,height:8,rx:4}),Y.createElement("rect",{id:"Rectangle-Copy-61",fill:"currentColor",x:24.1587742,y:43,width:61.9377906,height:8,rx:4}),Y.createElement("rect",{id:"Rectangle-Copy-64",fill:"currentColor",x:24.1587742,y:59,width:62,height:8,rx:4}),Y.createElement("rect",{id:"Rectangle-Copy-65",fill:"currentColor",x:24.1587742,y:75.1904762,width:62,height:7.61904762,rx:3.80952381}))),XJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_list_detail",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("rect",{id:"Rectangle-Copy-58",fill:"currentColor",x:22.1587742,y:27,width:15.983946,height:8,rx:4}),Y.createElement("rect",{id:"Rectangle-Copy-59",fill:"currentColor",x:44.1587742,y:27,width:43.9558514,height:8,rx:4}),Y.createElement("rect",{id:"Rectangle-Copy-61",fill:"currentColor",x:22.1587742,y:43,width:15.983946,height:8,rx:4}),Y.createElement("rect",{id:"Rectangle-Copy-62",fill:"currentColor",x:44.1587742,y:43,width:43.9558514,height:8,rx:4}),Y.createElement("rect",{id:"Rectangle-Copy-64",fill:"currentColor",x:22.1587742,y:59,width:16,height:8,rx:4}),Y.createElement("rect",{id:"Rectangle-Copy-66",fill:"currentColor",x:44.1587742,y:59,width:44,height:8,rx:4}),Y.createElement("rect",{id:"Rectangle-Copy-65",fill:"currentColor",x:22.1587742,y:75.1904762,width:16,height:7.61904762,rx:3.80952381}),Y.createElement("rect",{id:"Rectangle-Copy-67",fill:"currentColor",x:44.1587742,y:75.1904762,width:44,height:7.61904762,rx:3.80952381}))),JJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_map_points",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"Group-Copy-36",transform:"translate(30.000000, 19.000000)",fill:"currentColor",fillRule:"nonzero"},Y.createElement("path",{d:"M25,0 C11.1785714,0 0,11.268 0,25.2 C0,44.1 25,72 25,72 C25,72 50,44.1 50,25.2 C50,11.268 38.8214286,0 25,0 Z M7.14285714,25.2 C7.14285714,15.264 15.1428571,7.2 25,7.2 C34.8571429,7.2 42.8571429,15.264 42.8571429,25.2 C42.8571429,35.568 32.5714286,51.084 25,60.768 C17.5714286,51.156 7.14285714,35.46 7.14285714,25.2 Z",id:"Shape"}),Y.createElement("path",{d:"M25,34 C29.97052,34 34,29.97052 34,25 C34,20.029444 29.97052,16 25,16 C20.02948,16 16,20.029444 16,25 C16,29.97052 20.02948,34 25,34 Z",id:"Path"})))),ZJt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"10 10 90 90",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_map_segment",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"Group-Copy-36",transform:"translate(11.000000, 27.000000)",fillRule:"nonzero"},Y.createElement("path",{d:"M17,0 C7.60142857,0 0,7.6685 0,17.15 C0,30.0125 17,49 17,49 C17,49 34,30.0125 34,17.15 C34,7.6685 26.3985714,0 17,0 Z M4.85714286,17.15 C4.85714286,10.388 10.2971429,4.9 17,4.9 C23.7028571,4.9 29.1428571,10.388 29.1428571,17.15 C29.1428571,24.206 22.1485714,34.7655 17,41.356 C11.9485714,34.8145 4.85714286,24.1325 4.85714286,17.15 Z",id:"Shape",fill:"currentColor"}),Y.createElement("path",{d:"M17,24 C20.31368,24 23,21.31368 23,18 C23,14.686296 20.31368,12 17,12 C13.68632,12 11,14.686296 11,18 C11,21.31368 13.68632,24 17,24 Z",id:"Path",fill:"currentColor"})),Y.createElement("g",{id:"Group-Copy-37",transform:"translate(62.000000, 27.000000)",fillRule:"nonzero"},Y.createElement("path",{d:"M17,0 C7.60142857,0 0,7.6685 0,17.15 C0,30.0125 17,49 17,49 C17,49 34,30.0125 34,17.15 C34,7.6685 26.3985714,0 17,0 Z M4.85714286,17.15 C4.85714286,10.388 10.2971429,4.9 17,4.9 C23.7028571,4.9 29.1428571,10.388 29.1428571,17.15 C29.1428571,24.206 22.1485714,34.7655 17,41.356 C11.9485714,34.8145 4.85714286,24.1325 4.85714286,17.15 Z",id:"Shape",fill:"currentColor"}),Y.createElement("path",{d:"M17,24 C20.31368,24 23,21.31368 23,18 C23,14.686296 20.31368,12 17,12 C13.68632,12 11,14.686296 11,18 C11,21.31368 13.68632,24 17,24 Z",id:"Path",fill:"currentColor"})),Y.createElement("line",{x1:28.5,y1:81.5,x2:79.5,y2:81.5,id:"Line-3",stroke:"currentColor",strokeWidth:5,strokeLinecap:"round",strokeDasharray:"5,10"}))),eZt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_map_shape",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"noun-world-4667432-2",transform:"translate(19.000000, 19.000000)",fill:"currentColor",fillRule:"nonzero"},Y.createElement("g",{id:"noun-world-4667432"},Y.createElement("path",{d:"M36,5 C18.8798665,5 5,18.8793071 5,36 C5,53.1206929 18.8793071,67 36,67 C53.1206929,67 67,53.1206929 67,36 C67,18.8793071 53.1206929,5 36,5 Z M0,36 C0,16.1177143 16.1177143,0 36,0 C55.8822857,0 72,16.1177143 72,36 C72,55.8822857 55.8822857,72 36,72 C16.1177143,72 0,55.8822857 0,36 Z",id:"Shape"}),Y.createElement("path",{d:"M37.2848685,1.50131372 C37.8999474,1.48477633 38.4631152,1.71654937 38.8767996,2.10376364 C39.2928262,2.49317029 39.5578301,3.03960333 39.57434,3.65023916 L39.57434,3.65023916 L40.0344656,20.7428771 C40.0487121,21.2893502 39.8586306,21.8212062 39.4992535,22.2375953 L39.4992535,22.2375953 L32.1172188,30.7832284 C31.7924232,31.1592888 31.3490374,31.4169308 30.8586892,31.5134813 L30.8586892,31.5134813 L24.6865498,32.7324332 L28.0628423,42.7359018 C28.4533111,43.8925701 28.4513039,45.0197005 28.1633304,46.0321806 C27.8503264,47.132665 27.1975708,48.0987342 26.3338575,48.8190181 C25.4716664,49.5380326 24.3999821,50.0114808 23.2508211,50.1317463 C22.1949716,50.2422462 21.0728206,50.0558305 19.9867908,49.4837618 L19.9867908,49.4837618 L1.68382097,39.8433672 C1.13885361,39.5565384 0.764084629,39.078393 0.597525292,38.5380041 C0.430427538,37.9958684 0.472619244,37.3906551 0.763987861,36.8508084 C1.05393693,36.3139129 1.53648052,35.9433066 2.08313472,35.7791188 C2.62798313,35.6154734 3.2361363,35.657153 3.77860632,35.9426925 L3.77860632,35.9426925 L22.0816454,45.5831236 C22.3171919,45.7071442 22.5603781,45.7498863 22.7897862,45.7258621 C23.0398735,45.6996723 23.2725259,45.5956093 23.4599703,45.4392842 C23.6458558,45.2842591 23.7880139,45.0772117 23.8554593,44.8399997 C23.9169381,44.6237728 23.9147045,44.383346 23.8314444,44.1367864 L23.8314444,44.1367864 L19.6527943,31.7569079 C19.4493668,31.1542234 19.517516,30.4944328 19.8403231,29.9450638 C20.1614725,29.3985413 20.7046793,29.014044 21.3323155,28.8900909 L21.3323155,28.8900909 L29.2286003,27.3302661 L35.5513871,20.0108413 L35.1144494,3.7686887 C35.0979491,3.15801867 35.3331708,2.59836837 35.7276711,2.18746751 C36.1199426,1.77888802 36.6699139,1.51752889 37.2848685,1.50131372 Z",id:"Path",stroke:"currentColor"}),Y.createElement("path",{d:"M42.2538467,56.3169014 C42.834665,56.3169014 43.3919278,56.5473051 43.8025756,56.957964 L43.8025756,56.957964 L50.5634819,63.7190531 C50.990585,64.1465338 51.2042254,64.7070592 51.2042254,65.267637 C51.2042254,65.8282064 50.9905908,66.3887389 50.5631792,66.8165562 C50.1353619,67.244019 49.5748515,67.4577465 49.0143336,67.4577465 C48.453827,67.4577465 47.893307,67.2440267 47.4652769,66.8163886 L47.4652769,66.8163886 L41.3467145,60.697095 L29.639469,60.697095 L23.5207389,66.8165562 C23.0929158,67.2440249 22.5323953,67.4577465 21.9719658,67.4577465 C21.4114352,67.4577465 20.8509999,67.2439558 20.4235838,66.8165562 C19.995665,66.388992 19.7816901,65.8283383 19.7816901,65.2676696 C19.7816901,64.7070094 19.9956592,64.1463486 20.4234173,63.7189168 L20.4234173,63.7189168 L27.1839229,56.9576493 C27.5952192,56.5470739 28.1516855,56.3169014 28.7323368,56.3169014 L28.7323368,56.3169014 Z",id:"Path",stroke:"currentColor"}),Y.createElement("path",{d:"M63.9378166,21.2379048 C64.4225216,20.8714311 65.0086399,20.7379975 65.5642349,20.8181856 C66.1191803,20.8982799 66.6440521,21.191578 67.006552,21.6798365 C67.3682973,22.1662502 67.5006358,22.75458 67.4216695,23.3126471 C67.3426278,23.8712474 67.0519787,24.3991735 66.5692317,24.7645164 L66.5692317,24.7645164 L53.5947929,34.5837331 L50.8571888,42.8725775 L63.4236834,55.5534973 C63.8498746,55.9835692 64.0634024,56.5474048 64.0634024,57.111468 C64.0634024,57.6755228 63.8498803,58.2393656 63.4235328,58.6696236 C62.9952729,59.1014133 62.434079,59.3169014 61.8731786,59.3169014 C61.3121772,59.3169014 60.7510686,59.1013441 60.3230649,58.6694716 L60.3230649,58.6694716 L46.8022881,45.0255804 C46.5094233,44.730049 46.31189,44.3642735 46.2203738,43.9732706 C46.1289585,43.5826987 46.1433461,43.1669732 46.2741073,42.7711741 L46.2741073,42.7711741 L49.6544877,32.5388634 C49.7943202,32.1133276 50.0607882,31.7409505 50.416846,31.4711161 L50.416846,31.4711161 Z",id:"Path",stroke:"currentColor"}))))),xLe=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_number",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"Group",transform:"translate(20.000000, 20.000000)",fill:"currentColor"},Y.createElement("path",{d:"M-10.5,30.5 L51.5,30.5 C53.709139,30.5 55.5,32.290861 55.5,34.5 L55.5,35.5 C55.5,37.709139 53.709139,39.5 51.5,39.5 L-10.5,39.5 C-12.709139,39.5 -14.5,37.709139 -14.5,35.5 L-14.5,34.5 C-14.5,32.290861 -12.709139,30.5 -10.5,30.5 Z",id:"Rectangle-Copy-60",transform:"translate(20.500000, 35.000000) rotate(-90.000000) translate(-20.500000, -35.000000) "}),Y.createElement("path",{d:"M19.5,30.5 L81.5,30.5 C83.709139,30.5 85.5,32.290861 85.5,34.5 L85.5,35.5 C85.5,37.709139 83.709139,39.5 81.5,39.5 L19.5,39.5 C17.290861,39.5 15.5,37.709139 15.5,35.5 L15.5,34.5 C15.5,32.290861 17.290861,30.5 19.5,30.5 Z",id:"Rectangle-Copy-61",transform:"translate(50.500000, 35.000000) rotate(-90.000000) translate(-50.500000, -35.000000) "}),Y.createElement("path",{d:"M4,14 L66,14 C68.209139,14 70,15.790861 70,18 L70,19 C70,21.209139 68.209139,23 66,23 L4,23 C1.790861,23 2.705415e-16,21.209139 0,19 L0,18 C-2.705415e-16,15.790861 1.790861,14 4,14 Z",id:"Rectangle-Copy-63",transform:"translate(35.000000, 18.500000) rotate(-360.000000) translate(-35.000000, -18.500000) "}),Y.createElement("path",{d:"M4,44 L66,44 C68.209139,44 70,45.790861 70,48 L70,49 C70,51.209139 68.209139,53 66,53 L4,53 C1.790861,53 2.705415e-16,51.209139 0,49 L0,48 C-2.705415e-16,45.790861 1.790861,44 4,44 Z",id:"Rectangle-Copy-62",transform:"translate(35.000000, 48.500000) rotate(-360.000000) translate(-35.000000, -48.500000) "})))),tZt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_percent",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"%-copy-5",transform:"translate(19.000000, 22.000000)",fill:"currentColor",fillRule:"nonzero"},Y.createElement("path",{d:"M16.1194226,31.5251397 C19.1010499,31.5251397 21.8186789,30.8184358 24.2723097,29.4050279 C26.7259405,27.9916201 28.6671041,26.0712291 30.0958005,23.6438547 C31.5244969,21.2164804 32.2388451,18.5893855 32.2388451,15.7625698 C32.2388451,12.9357542 31.5244969,10.3086592 30.0958005,7.88128492 C28.6671041,5.45391061 26.7259405,3.53351955 24.2723097,2.12011173 C21.8186789,0.706703911 19.1010499,0 16.1194226,0 C13.1377953,0 10.4201662,0.706703911 7.96653543,2.12011173 C5.51290464,3.53351955 3.57174103,5.45391061 2.14304462,7.88128492 C0.714348206,10.3086592 0,12.9357542 0,15.7625698 C0,18.5893855 0.714348206,21.2164804 2.14304462,23.6438547 C3.57174103,26.0712291 5.51290464,27.9916201 7.96653543,29.4050279 C10.4201662,30.8184358 13.1377953,31.5251397 16.1194226,31.5251397 Z M19.9645575,62.4787112 L57.1929452,7.56550735 C58.3200259,5.90302296 57.8859954,3.64163362 56.223511,2.5145529 C56.2107419,2.50589603 56.1979177,2.49732049 56.1850394,2.48882682 C54.4804105,1.3645685 52.1887314,1.81914062 51.0422905,3.50893047 L13.7228276,58.5157377 C12.6107181,60.1549252 13.0379992,62.3852921 14.6771866,63.4974016 C14.7072768,63.5178164 14.7376757,63.5377723 14.7683727,63.5572626 C16.507245,64.6613129 18.8087263,64.1836036 19.9645575,62.4787112 Z M16.1194226,24.150838 C13.8832021,24.150838 12.0041557,23.3519553 10.4822835,21.7541899 C8.9604112,20.1564246 8.19947507,18.1592179 8.19947507,15.7625698 C8.19947507,13.3044693 8.9604112,11.2918994 10.4822835,9.72486034 C12.0041557,8.15782123 13.8832021,7.37430168 16.1194226,7.37430168 C18.4177603,7.37430168 20.3278653,8.15782123 21.8497375,9.72486034 C23.3716098,11.2918994 24.1325459,13.3044693 24.1325459,15.7625698 C24.1325459,18.2206704 23.3716098,20.2332402 21.8497375,21.8002793 C20.3278653,23.3673184 18.4177603,24.150838 16.1194226,24.150838 Z M54.8805774,66 C57.8622047,66 60.5798338,65.2932961 63.0334646,63.8798883 C65.4870954,62.4664804 67.428259,60.5460894 68.8569554,58.1187151 C70.2856518,55.6913408 71,53.0642458 71,50.2374302 C71,47.4106145 70.2856518,44.7835196 68.8569554,42.3561453 C67.428259,39.9287709 65.4870954,38.0083799 63.0334646,36.5949721 C60.5798338,35.1815642 57.8622047,34.4748603 54.8805774,34.4748603 C51.8989501,34.4748603 49.1813211,35.1815642 46.7276903,36.5949721 C44.2740595,38.0083799 42.3328959,39.9287709 40.9041995,42.3561453 C39.4755031,44.7835196 38.7611549,47.4106145 38.7611549,50.2374302 C38.7611549,53.0642458 39.4755031,55.6913408 40.9041995,58.1187151 C42.3328959,60.5460894 44.2740595,62.4664804 46.7276903,63.8798883 C49.1813211,65.2932961 51.8989501,66 54.8805774,66 Z M54.8805774,58.6256983 C52.644357,58.6256983 50.7653106,57.8268156 49.2434383,56.2290503 C47.7215661,54.6312849 46.9606299,52.6340782 46.9606299,50.2374302 C46.9606299,47.7793296 47.7215661,45.7667598 49.2434383,44.1997207 C50.7653106,42.6326816 52.644357,41.849162 54.8805774,41.849162 C57.1789151,41.849162 59.0890201,42.6326816 60.6108924,44.1997207 C62.1327647,45.7667598 62.8937008,47.7793296 62.8937008,50.2374302 C62.8937008,52.6340782 62.1172353,54.6312849 60.5643045,56.2290503 C59.0113736,57.8268156 57.1167979,58.6256983 54.8805774,58.6256983 Z",id:"%-copy-2"})))),rZt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"5 5 100 100",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_scatter",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M29.1340462,83.93 C36.5885775,83.93 42.6340462,77.8857969 42.6340462,70.43 C42.6340462,62.9742031 36.5885775,56.93 29.1340462,56.93 C21.679515,56.93 15.6340462,62.9742031 15.6340462,70.43 C15.6340462,77.8857969 21.679515,83.93 29.1340462,83.93 Z",id:"Path-Copy-3",stroke:"#9aa0a6",className:"primarystroke",strokeWidth:7,fillRule:"nonzero"}),Y.createElement("path",{d:"M68.2840462,92.63 C73.6709212,92.63 78.0340462,88.264925 78.0340462,82.88 C78.0340462,77.495075 73.6709212,73.13 68.2840462,73.13 C62.8971712,73.13 58.5340462,77.495075 58.5340462,82.88 C58.5340462,88.264925 62.8971712,92.63 68.2840462,92.63 Z",id:"Path-Copy-2",stroke:"#9aa0a6",className:"primarystroke",strokeWidth:7,fillRule:"nonzero",transform:"translate(68.284046, 82.880000) rotate(-360.000000) translate(-68.284046, -82.880000) "}),Y.createElement("path",{d:"M67.8242963,57.43 C78.8701296,57.43 87.8242963,48.4758333 87.8242963,37.43 C87.8242963,26.3842917 78.8701296,17.43 67.8242963,17.43 C56.7784629,17.43 47.8242963,26.3842917 47.8242963,37.43 C47.8242963,48.4758333 56.7784629,57.43 67.8242963,57.43 Z",id:"Path-Copy",stroke:"#9aa0a6",className:"primarystroke",strokeWidth:7,fillRule:"nonzero"}))),nZt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"0 0 110 110",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_sparkline",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},Y.createElement("polyline",{id:"Path-11",stroke:"#9aa0a6",strokeWidth:6,points:"10 54.8274509 25.9215088 61.0844803 40.1501567 54.8274509 53.3907166 68.7215958 69.5925598 42 83.3327332 64.4487228 100.431152 57.8274509"}))),iZt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_table",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("path",{d:"M81.0526316,23 L28.9473684,23 C25.1263158,23 22,26.1662162 22,30.036036 L22,79.2882883 C22,83.1581081 25.1263158,86.3243243 28.9473684,86.3243243 L81.0526316,86.3243243 C84.8736842,86.3243243 88,83.1581081 88,79.2882883 L88,30.036036 C88,26.1662162 84.8736842,23 81.0526316,23 Z M80.8648649,30.1351351 L80.8648649,40.8378378 L28.2432432,40.8378378 L28.2432432,30.1351351 L80.8648649,30.1351351 Z M63.9189189,79.1891892 L46.0810811,79.1891892 L46.0810811,47.972973 L63.9189189,47.972973 L63.9189189,79.1891892 Z M28.2432432,47.972973 L38.9459459,47.972973 L38.9459459,79.1891892 L28.2432432,79.1891892 L28.2432432,47.972973 Z M71.0540541,79.1891892 L71.0540541,47.972973 L81.7567568,47.972973 L81.7567568,79.1891892 L71.0540541,79.1891892 Z",id:"Shape",fill:"currentColor",fillRule:"nonzero"}))),sZt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"10 10 90 90",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_text",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("rect",{id:"Rectangle-Copy",stroke:"currentColor",strokeWidth:6,x:15.5,y:35,width:79,height:40,rx:5}),Y.createElement("g",{id:"abc",transform:"translate(33.090000, 44.134000)",fill:"currentColor",fillRule:"nonzero"},Y.createElement("path",{d:"M4.81,19.032 C3.406,19.032 2.25333333,18.6203333 1.352,17.797 C0.450666667,16.9736667 0,15.8946667 0,14.56 C0,13.676 0.234,12.896 0.702,12.22 C1.17,11.544 1.81133333,11.024 2.626,10.66 C3.44066667,10.296 4.342,10.114 5.33,10.114 C6.69933333,10.114 7.86933333,10.3133333 8.84,10.712 L8.84,10.14 C8.84,9.412 8.567,8.82266667 8.021,8.372 C7.475,7.92133333 6.74266667,7.696 5.824,7.696 C5.2,7.696 4.59766667,7.839 4.017,8.125 C3.43633333,8.411 2.95533333,8.788 2.574,9.256 L0.39,7.54 C1.03133333,6.708 1.83733333,6.06666667 2.808,5.616 C3.77866667,5.16533333 4.836,4.94 5.98,4.94 C8.008,4.94 9.55066667,5.408 10.608,6.344 C11.6653333,7.28 12.194,8.64933333 12.194,10.452 L12.194,18.616 L8.84,18.616 L8.84,17.264 L8.632,17.264 C8.23333333,17.784 7.709,18.2086667 7.059,18.538 C6.409,18.8673333 5.65933333,19.032 4.81,19.032 Z M5.616,16.38 C6.604,16.38 7.38833333,16.0636667 7.969,15.431 C8.54966667,14.7983333 8.84,14.0573333 8.84,13.208 C7.956,12.792 7.02866667,12.584 6.058,12.584 C4.29,12.584 3.406,13.2426667 3.406,14.56 C3.406,15.0973333 3.59666667,15.535 3.978,15.873 C4.35933333,16.211 4.90533333,16.38 5.616,16.38 Z",id:"Shape"}),Y.createElement("path",{d:"M22.724,19.032 C21.8226667,19.032 21.021,18.8413333 20.319,18.46 C19.617,18.0786667 19.0926667,17.602 18.746,17.03 L18.538,17.03 L18.538,18.616 L15.34,18.616 L15.34,0 L18.746,0 L18.746,5.096 L18.538,6.968 L18.746,6.968 C19.11,6.396 19.6386667,5.915 20.332,5.525 C21.0253333,5.135 21.8226667,4.94 22.724,4.94 C23.92,4.94 25.0076667,5.239 25.987,5.837 C26.9663333,6.435 27.7333333,7.27133333 28.288,8.346 C28.8426667,9.42066667 29.12,10.634 29.12,11.986 C29.12,13.3553333 28.8426667,14.573 28.288,15.639 C27.7333333,16.705 26.9663333,17.537 25.987,18.135 C25.0076667,18.733 23.92,19.032 22.724,19.032 Z M22.126,15.886 C22.7673333,15.886 23.3653333,15.7213333 23.92,15.392 C24.4746667,15.0626667 24.9166667,14.6033333 25.246,14.014 C25.5753333,13.4246667 25.74,12.7486667 25.74,11.986 C25.74,11.2233333 25.5753333,10.5473333 25.246,9.958 C24.9166667,9.36866667 24.4746667,8.91366667 23.92,8.593 C23.3653333,8.27233333 22.7673333,8.112 22.126,8.112 C21.502,8.112 20.9126667,8.27233333 20.358,8.593 C19.8033333,8.91366667 19.3613333,9.36866667 19.032,9.958 C18.7026667,10.5473333 18.538,11.2233333 18.538,11.986 C18.538,12.7486667 18.7026667,13.4246667 19.032,14.014 C19.3613333,14.6033333 19.8033333,15.0626667 20.358,15.392 C20.9126667,15.7213333 21.502,15.886 22.126,15.886 Z",id:"Shape"}),Y.createElement("path",{d:"M37.986,19.032 C36.6513333,19.032 35.4553333,18.733 34.398,18.135 C33.3406667,17.537 32.513,16.7006667 31.915,15.626 C31.317,14.5513333 31.018,13.338 31.018,11.986 C31.018,10.634 31.317,9.425 31.915,8.359 C32.513,7.293 33.3406667,6.45666667 34.398,5.85 C35.4553333,5.24333333 36.6513333,4.94 37.986,4.94 C39.4593333,4.94 40.7246667,5.25633333 41.782,5.889 C42.8393333,6.52166667 43.602,7.41866667 44.07,8.58 L40.95,9.88 C40.3953333,8.70133333 39.4073333,8.112 37.986,8.112 C36.946,8.112 36.0923333,8.46733333 35.425,9.178 C34.7576667,9.88866667 34.424,10.8246667 34.424,11.986 C34.424,13.1646667 34.7576667,14.1093333 35.425,14.82 C36.0923333,15.5306667 36.946,15.886 37.986,15.886 C39.4246667,15.886 40.4646667,15.262 41.106,14.014 L44.2,15.366 C43.628,16.5273333 42.8133333,17.4286667 41.756,18.07 C40.6986667,18.7113333 39.442,19.032 37.986,19.032 Z",id:"Path"})))),oZt=a=>Y.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...a},Y.createElement("g",{id:"viz_time",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},Y.createElement("g",{id:"Group-Copy-19",transform:"translate(51.307692, 36.538462)",fill:"currentColor",fillRule:"nonzero"},Y.createElement("polygon",{id:"Path",points:"5.30769231 0 0 0 0 21.7906683 18.5769231 33.2307692 21.2307692 28.7636822 5.30769231 19.0668348"})),Y.createElement("circle",{id:"Oval",stroke:"currentColor",strokeWidth:7,cx:55,cy:55,r:32.5}))),aZt=a=>Y.createElement("svg",{height:56,viewBox:"0 0 56 56",width:56,xmlns:"http://www.w3.org/2000/svg",...a},Y.createElement("path",{fill:"currentColor",d:"m23.957 41.7695c3.8906 0 7.5234-1.2656 10.4766-3.375l11.1093 11.1094c.5156.5156 1.1953.7735 1.8985.7735 1.5234 0 2.625-1.1719 2.625-2.6719 0-.7032-.2342-1.3594-.7502-1.875l-11.0389-11.0626c2.3203-3.0468 3.7031-6.8203 3.7031-10.9218 0-9.9141-8.1094-18.0235-18.0234-18.0235-9.9375 0-18.0234 8.1094-18.0234 18.0235 0 9.914 8.0859 18.0234 18.0234 18.0234zm0-3.8906c-7.7578 0-14.1328-6.3984-14.1328-14.1328s6.375-14.1328 14.1328-14.1328c7.7344 0 14.1328 6.3984 14.1328 14.1328s-6.3984 14.1328-14.1328 14.1328z"})),lZt={chevronDown:aJt,chevronLeft:lJt,chevronRight:uJt,clear:Tje,meatballs:kJt,play:LJt,copy:dJt,checkmark:cJt,radioChecked:IJt,radioUnchecked:PJt,warning:jJt,check_circle:FJt,info:MJt,error:$Jt,refresh:BJt,sidebarCollapse:qJt,filterSliders:UJt,aggregate:hJt,dimension:mLe,filter:pJt,groupBy:mJt,insert:fJt,limit:gJt,orderBy:yJt,measure:pLe,nest:xJt,array:AJt,boolean:CJt,database:_Jt,date:RJt,json:TJt,number:wJt,query:OJt,search:aZt,sql_native:DJt,string:mLe,view:SJt,view_filled:NJt,many_to_one:vJt,one_to_many:bJt,one_to_one:EJt,viz_bar_chart:zJt,viz_boolean:HJt,viz_bytes:xLe,viz_cartesian_chart:Are,viz_column_chart:GJt,viz_currency:WJt,viz_dashboard:VJt,viz_image:QJt,viz_json:YJt,viz_line_chart:Are,viz_link:gLe,viz_list:KJt,viz_list_detail:XJt,viz_point_map:JJt,viz_segment_map:ZJt,viz_shape_map:eZt,viz_number:xLe,viz_percent:tZt,viz_scatter_chart:rZt,viz_single_value:pLe,viz_sparkline:nZt,viz_table:iZt,viz_text:sZt,viz_time:oZt,viz_url:gLe,viz_vega:Are};function An({name:a,color:u="primary",customStyle:d}){const f=lZt[a];return f?D.jsxRuntimeExports.jsx(f,{...Lt.props(uZt.main,cZt[u],d),"data-testid":`icon-${u}-${a}`}):null}const uZt={main:{display:"mly1rg5ohu",width:"mly1kky2od",height:"mlylup9mm",overflow:"mly1rea2x4",overflowX:null,overflowY:null,$$css:!0}},cZt={primary:{color:"mly1p68tcb",$$css:!0},secondary:{color:"mly1r0d382",$$css:!0},disabled:{color:"mly16un6j3",$$css:!0},primaryOnMedia:{color:"mly1kiansi",$$css:!0},gray:{color:"mlyann5r3",$$css:!0},purple:{color:"mly1ywypuw",$$css:!0},green:{color:"mly1evcnq1",$$css:!0},cyan:{color:"mly1h091fy",$$css:!0},info:{color:"mly1tw9ct1",$$css:!0},warning:{color:"mly7neac5",$$css:!0},positive:{color:"mly1l99qkd",$$css:!0},negative:{color:"mly109d434",$$css:!0}},dZt="gray";function Ex({label:a,color:u=dZt,icon:d,customStyle:f}){return D.jsxRuntimeExports.jsxs("div",{...Lt.props(yLe.main,fZt[u],f),children:[d&&D.jsxRuntimeExports.jsx(An,{color:u,name:d}),D.jsxRuntimeExports.jsx("div",{"data-testid":"badge-label",...Lt.props(Fr.badge,yLe.label),children:a})]})}const yLe={main:{display:"mly3nfvp2",height:"mly1qx5ct2",minWidth:"mlyt4ypqs",padding:"mlyxzb6uj",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,justifyContent:"mlyl56j7k",alignItems:"mly6s0dn4",gap:"mly1jnr06f",rowGap:null,columnGap:null,flexShrink:"mly2lah0s",borderRadius:"mly10hpsqq",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,background:"mlysu8s4a",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,$$css:!0},label:{overflow:"mlyb3r6kr",overflowX:null,overflowY:null,textAlign:"mly2b8uid",leadingTrim:"mly11e9jwx",textEdge:"mly1vqy1sf",textOverflow:"mlylyipyv",color:"mly1ard1hs",$$css:!0}},fZt={gray:{"--mly10mhzaa":"mly1rve117","--mly1ojyoay":"mlybcavtu",$$css:!0},purple:{"--mly10mhzaa":"mlyihc5ie","--mly1ojyoay":"mlywis56f",$$css:!0},green:{"--mly10mhzaa":"mly10cf5cp","--mly1ojyoay":"mlyy280wj",$$css:!0},cyan:{"--mly10mhzaa":"mlykvi9ht","--mly1ojyoay":"mly1eg6ybj",$$css:!0}},hZt="horizontal";function Y_({orientation:a=hZt,customStyle:u}){return D.jsxRuntimeExports.jsx("div",{...Lt.props(pZt.main,mZt[a],u)})}const pZt={main:{background:"mly1xnbgy5",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,$$css:!0}},mZt={horizontal:{height:"mlyjm9jq1",width:"mlyh8yej3",$$css:!0},vertical:{height:"mlypyat2d",width:"mly1i1rx1s",$$css:!0}};function gZt({children:a}){return D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mlydt5ytf mly167g77z",children:Y.Children.map(a,u=>u)})}var xZt=Y.createContext(void 0);function dN(a){const u=Y.useContext(xZt);return a||u||"ltr"}function jne(a,[u,d]){return Math.min(d,Math.max(u,a))}function yZt(a,u){return Y.useReducer((d,f)=>u[d][f]??d,a)}var pse="ScrollArea",[wje,Tyr]=Md(pse),[vZt,lc]=wje(pse),Oje=Y.forwardRef((a,u)=>{const{__scopeScrollArea:d,type:f="hover",dir:m,scrollHideDelay:g=600,...x}=a,[b,v]=Y.useState(null),[_,S]=Y.useState(null),[R,w]=Y.useState(null),[N,k]=Y.useState(null),[B,P]=Y.useState(null),[$,q]=Y.useState(0),[z,W]=Y.useState(0),[X,J]=Y.useState(!1),[ee,fe]=Y.useState(!1),be=Cn(u,_e=>v(_e)),je=dN(m);return D.jsxRuntimeExports.jsx(vZt,{scope:d,type:f,dir:je,scrollHideDelay:g,scrollArea:b,viewport:_,onViewportChange:S,content:R,onContentChange:w,scrollbarX:N,onScrollbarXChange:k,scrollbarXEnabled:X,onScrollbarXEnabledChange:J,scrollbarY:B,onScrollbarYChange:P,scrollbarYEnabled:ee,onScrollbarYEnabledChange:fe,onCornerWidthChange:q,onCornerHeightChange:W,children:D.jsxRuntimeExports.jsx(rn.div,{dir:je,...x,ref:be,style:{position:"relative","--radix-scroll-area-corner-width":$+"px","--radix-scroll-area-corner-height":z+"px",...a.style}})})});Oje.displayName=pse;var Nje="ScrollAreaViewport",Dje=Y.forwardRef((a,u)=>{const{__scopeScrollArea:d,children:f,nonce:m,...g}=a,x=lc(Nje,d),b=Y.useRef(null),v=Cn(u,b,x.onViewportChange);return D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:m}),D.jsxRuntimeExports.jsx(rn.div,{"data-radix-scroll-area-viewport":"",...g,ref:v,style:{overflowX:x.scrollbarXEnabled?"scroll":"hidden",overflowY:x.scrollbarYEnabled?"scroll":"hidden",...a.style},children:D.jsxRuntimeExports.jsx("div",{ref:x.onContentChange,style:{minWidth:"100%",display:"table"},children:f})})]})});Dje.displayName=Nje;var _h="ScrollAreaScrollbar",kje=Y.forwardRef((a,u)=>{const{forceMount:d,...f}=a,m=lc(_h,a.__scopeScrollArea),{onScrollbarXEnabledChange:g,onScrollbarYEnabledChange:x}=m,b=a.orientation==="horizontal";return Y.useEffect(()=>(b?g(!0):x(!0),()=>{b?g(!1):x(!1)}),[b,g,x]),m.type==="hover"?D.jsxRuntimeExports.jsx(bZt,{...f,ref:u,forceMount:d}):m.type==="scroll"?D.jsxRuntimeExports.jsx(EZt,{...f,ref:u,forceMount:d}):m.type==="auto"?D.jsxRuntimeExports.jsx(Lje,{...f,ref:u,forceMount:d}):m.type==="always"?D.jsxRuntimeExports.jsx(mse,{...f,ref:u}):null});kje.displayName=_h;var bZt=Y.forwardRef((a,u)=>{const{forceMount:d,...f}=a,m=lc(_h,a.__scopeScrollArea),[g,x]=Y.useState(!1);return Y.useEffect(()=>{const b=m.scrollArea;let v=0;if(b){const _=()=>{window.clearTimeout(v),x(!0)},S=()=>{v=window.setTimeout(()=>x(!1),m.scrollHideDelay)};return b.addEventListener("pointerenter",_),b.addEventListener("pointerleave",S),()=>{window.clearTimeout(v),b.removeEventListener("pointerenter",_),b.removeEventListener("pointerleave",S)}}},[m.scrollArea,m.scrollHideDelay]),D.jsxRuntimeExports.jsx(Do,{present:d||g,children:D.jsxRuntimeExports.jsx(Lje,{"data-state":g?"visible":"hidden",...f,ref:u})})}),EZt=Y.forwardRef((a,u)=>{const{forceMount:d,...f}=a,m=lc(_h,a.__scopeScrollArea),g=a.orientation==="horizontal",x=r$(()=>v("SCROLL_END"),100),[b,v]=yZt("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return Y.useEffect(()=>{if(b==="idle"){const _=window.setTimeout(()=>v("HIDE"),m.scrollHideDelay);return()=>window.clearTimeout(_)}},[b,m.scrollHideDelay,v]),Y.useEffect(()=>{const _=m.viewport,S=g?"scrollLeft":"scrollTop";if(_){let R=_[S];const w=()=>{const N=_[S];R!==N&&(v("SCROLL"),x()),R=N};return _.addEventListener("scroll",w),()=>_.removeEventListener("scroll",w)}},[m.viewport,g,v,x]),D.jsxRuntimeExports.jsx(Do,{present:d||b!=="hidden",children:D.jsxRuntimeExports.jsx(mse,{"data-state":b==="hidden"?"hidden":"visible",...f,ref:u,onPointerEnter:xr(a.onPointerEnter,()=>v("POINTER_ENTER")),onPointerLeave:xr(a.onPointerLeave,()=>v("POINTER_LEAVE"))})})}),Lje=Y.forwardRef((a,u)=>{const d=lc(_h,a.__scopeScrollArea),{forceMount:f,...m}=a,[g,x]=Y.useState(!1),b=a.orientation==="horizontal",v=r$(()=>{if(d.viewport){const _=d.viewport.offsetWidth<d.viewport.scrollWidth,S=d.viewport.offsetHeight<d.viewport.scrollHeight;x(b?_:S)}},10);return aS(d.viewport,v),aS(d.content,v),D.jsxRuntimeExports.jsx(Do,{present:f||g,children:D.jsxRuntimeExports.jsx(mse,{"data-state":g?"visible":"hidden",...m,ref:u})})}),mse=Y.forwardRef((a,u)=>{const{orientation:d="vertical",...f}=a,m=lc(_h,a.__scopeScrollArea),g=Y.useRef(null),x=Y.useRef(0),[b,v]=Y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),_=Mje(b.viewport,b.content),S={...f,sizes:b,onSizesChange:v,hasThumb:_>0&&_<1,onThumbChange:w=>g.current=w,onThumbPointerUp:()=>x.current=0,onThumbPointerDown:w=>x.current=w};function R(w,N){return TZt(w,x.current,b,N)}return d==="horizontal"?D.jsxRuntimeExports.jsx(_Zt,{...S,ref:u,onThumbPositionChange:()=>{if(m.viewport&&g.current){const w=m.viewport.scrollLeft,N=vLe(w,b,m.dir);g.current.style.transform=`translate3d(${N}px, 0, 0)`}},onWheelScroll:w=>{m.viewport&&(m.viewport.scrollLeft=w)},onDragScroll:w=>{m.viewport&&(m.viewport.scrollLeft=R(w,m.dir))}}):d==="vertical"?D.jsxRuntimeExports.jsx(SZt,{...S,ref:u,onThumbPositionChange:()=>{if(m.viewport&&g.current){const w=m.viewport.scrollTop,N=vLe(w,b);g.current.style.transform=`translate3d(0, ${N}px, 0)`}},onWheelScroll:w=>{m.viewport&&(m.viewport.scrollTop=w)},onDragScroll:w=>{m.viewport&&(m.viewport.scrollTop=R(w))}}):null}),_Zt=Y.forwardRef((a,u)=>{const{sizes:d,onSizesChange:f,...m}=a,g=lc(_h,a.__scopeScrollArea),[x,b]=Y.useState(),v=Y.useRef(null),_=Cn(u,v,g.onScrollbarXChange);return Y.useEffect(()=>{v.current&&b(getComputedStyle(v.current))},[v]),D.jsxRuntimeExports.jsx(Pje,{"data-orientation":"horizontal",...m,ref:_,sizes:d,style:{bottom:0,left:g.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:g.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":t$(d)+"px",...a.style},onThumbPointerDown:S=>a.onThumbPointerDown(S.x),onDragScroll:S=>a.onDragScroll(S.x),onWheelScroll:(S,R)=>{if(g.viewport){const w=g.viewport.scrollLeft+S.deltaX;a.onWheelScroll(w),Bje(w,R)&&S.preventDefault()}},onResize:()=>{v.current&&g.viewport&&x&&f({content:g.viewport.scrollWidth,viewport:g.viewport.offsetWidth,scrollbar:{size:v.current.clientWidth,paddingStart:JF(x.paddingLeft),paddingEnd:JF(x.paddingRight)}})}})}),SZt=Y.forwardRef((a,u)=>{const{sizes:d,onSizesChange:f,...m}=a,g=lc(_h,a.__scopeScrollArea),[x,b]=Y.useState(),v=Y.useRef(null),_=Cn(u,v,g.onScrollbarYChange);return Y.useEffect(()=>{v.current&&b(getComputedStyle(v.current))},[v]),D.jsxRuntimeExports.jsx(Pje,{"data-orientation":"vertical",...m,ref:_,sizes:d,style:{top:0,right:g.dir==="ltr"?0:void 0,left:g.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":t$(d)+"px",...a.style},onThumbPointerDown:S=>a.onThumbPointerDown(S.y),onDragScroll:S=>a.onDragScroll(S.y),onWheelScroll:(S,R)=>{if(g.viewport){const w=g.viewport.scrollTop+S.deltaY;a.onWheelScroll(w),Bje(w,R)&&S.preventDefault()}},onResize:()=>{v.current&&g.viewport&&x&&f({content:g.viewport.scrollHeight,viewport:g.viewport.offsetHeight,scrollbar:{size:v.current.clientHeight,paddingStart:JF(x.paddingTop),paddingEnd:JF(x.paddingBottom)}})}})}),[AZt,Ije]=wje(_h),Pje=Y.forwardRef((a,u)=>{const{__scopeScrollArea:d,sizes:f,hasThumb:m,onThumbChange:g,onThumbPointerUp:x,onThumbPointerDown:b,onThumbPositionChange:v,onDragScroll:_,onWheelScroll:S,onResize:R,...w}=a,N=lc(_h,d),[k,B]=Y.useState(null),P=Cn(u,be=>B(be)),$=Y.useRef(null),q=Y.useRef(""),z=N.viewport,W=f.content-f.viewport,X=Us(S),J=Us(v),ee=r$(R,10);function fe(be){if($.current){const je=be.clientX-$.current.left,_e=be.clientY-$.current.top;_({x:je,y:_e})}}return Y.useEffect(()=>{const be=je=>{const _e=je.target;k?.contains(_e)&&X(je,W)};return document.addEventListener("wheel",be,{passive:!1}),()=>document.removeEventListener("wheel",be,{passive:!1})},[z,k,W,X]),Y.useEffect(J,[f,J]),aS(k,ee),aS(N.content,ee),D.jsxRuntimeExports.jsx(AZt,{scope:d,scrollbar:k,hasThumb:m,onThumbChange:Us(g),onThumbPointerUp:Us(x),onThumbPositionChange:J,onThumbPointerDown:Us(b),children:D.jsxRuntimeExports.jsx(rn.div,{...w,ref:P,style:{position:"absolute",...w.style},onPointerDown:xr(a.onPointerDown,be=>{be.button===0&&(be.target.setPointerCapture(be.pointerId),$.current=k.getBoundingClientRect(),q.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",N.viewport&&(N.viewport.style.scrollBehavior="auto"),fe(be))}),onPointerMove:xr(a.onPointerMove,fe),onPointerUp:xr(a.onPointerUp,be=>{const je=be.target;je.hasPointerCapture(be.pointerId)&&je.releasePointerCapture(be.pointerId),document.body.style.webkitUserSelect=q.current,N.viewport&&(N.viewport.style.scrollBehavior=""),$.current=null})})})}),XF="ScrollAreaThumb",jje=Y.forwardRef((a,u)=>{const{forceMount:d,...f}=a,m=Ije(XF,a.__scopeScrollArea);return D.jsxRuntimeExports.jsx(Do,{present:d||m.hasThumb,children:D.jsxRuntimeExports.jsx(CZt,{ref:u,...f})})}),CZt=Y.forwardRef((a,u)=>{const{__scopeScrollArea:d,style:f,...m}=a,g=lc(XF,d),x=Ije(XF,d),{onThumbPositionChange:b}=x,v=Cn(u,R=>x.onThumbChange(R)),_=Y.useRef(void 0),S=r$(()=>{_.current&&(_.current(),_.current=void 0)},100);return Y.useEffect(()=>{const R=g.viewport;if(R){const w=()=>{if(S(),!_.current){const N=wZt(R,b);_.current=N,b()}};return b(),R.addEventListener("scroll",w),()=>R.removeEventListener("scroll",w)}},[g.viewport,S,b]),D.jsxRuntimeExports.jsx(rn.div,{"data-state":x.hasThumb?"visible":"hidden",...m,ref:v,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...f},onPointerDownCapture:xr(a.onPointerDownCapture,R=>{const N=R.target.getBoundingClientRect(),k=R.clientX-N.left,B=R.clientY-N.top;x.onThumbPointerDown({x:k,y:B})}),onPointerUp:xr(a.onPointerUp,x.onThumbPointerUp)})});jje.displayName=XF;var gse="ScrollAreaCorner",Fje=Y.forwardRef((a,u)=>{const d=lc(gse,a.__scopeScrollArea),f=!!(d.scrollbarX&&d.scrollbarY);return d.type!=="scroll"&&f?D.jsxRuntimeExports.jsx(RZt,{...a,ref:u}):null});Fje.displayName=gse;var RZt=Y.forwardRef((a,u)=>{const{__scopeScrollArea:d,...f}=a,m=lc(gse,d),[g,x]=Y.useState(0),[b,v]=Y.useState(0),_=!!(g&&b);return aS(m.scrollbarX,()=>{var S;const R=((S=m.scrollbarX)==null?void 0:S.offsetHeight)||0;m.onCornerHeightChange(R),v(R)}),aS(m.scrollbarY,()=>{var S;const R=((S=m.scrollbarY)==null?void 0:S.offsetWidth)||0;m.onCornerWidthChange(R),x(R)}),_?D.jsxRuntimeExports.jsx(rn.div,{...f,ref:u,style:{width:g,height:b,position:"absolute",right:m.dir==="ltr"?0:void 0,left:m.dir==="rtl"?0:void 0,bottom:0,...a.style}}):null});function JF(a){return a?parseInt(a,10):0}function Mje(a,u){const d=a/u;return isNaN(d)?0:d}function t$(a){const u=Mje(a.viewport,a.content),d=a.scrollbar.paddingStart+a.scrollbar.paddingEnd,f=(a.scrollbar.size-d)*u;return Math.max(f,18)}function TZt(a,u,d,f="ltr"){const m=t$(d),g=m/2,x=u||g,b=m-x,v=d.scrollbar.paddingStart+x,_=d.scrollbar.size-d.scrollbar.paddingEnd-b,S=d.content-d.viewport,R=f==="ltr"?[0,S]:[S*-1,0];return $je([v,_],R)(a)}function vLe(a,u,d="ltr"){const f=t$(u),m=u.scrollbar.paddingStart+u.scrollbar.paddingEnd,g=u.scrollbar.size-m,x=u.content-u.viewport,b=g-f,v=d==="ltr"?[0,x]:[x*-1,0],_=jne(a,v);return $je([0,x],[0,b])(_)}function $je(a,u){return d=>{if(a[0]===a[1]||u[0]===u[1])return u[0];const f=(u[1]-u[0])/(a[1]-a[0]);return u[0]+f*(d-a[0])}}function Bje(a,u){return a>0&&a<u}var wZt=(a,u=()=>{})=>{let d={left:a.scrollLeft,top:a.scrollTop},f=0;return function m(){const g={left:a.scrollLeft,top:a.scrollTop},x=d.left!==g.left,b=d.top!==g.top;(x||b)&&u(),d=g,f=window.requestAnimationFrame(m)}(),()=>window.cancelAnimationFrame(f)};function r$(a,u){const d=Us(a),f=Y.useRef(0);return Y.useEffect(()=>()=>window.clearTimeout(f.current),[]),Y.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(d,u)},[d,u])}function aS(a,u){const d=Us(u);ca(()=>{let f=0;if(a){const m=new ResizeObserver(()=>{cancelAnimationFrame(f),f=window.requestAnimationFrame(d)});return m.observe(a),()=>{window.cancelAnimationFrame(f),m.unobserve(a)}}},[a,d])}var OZt=Oje,NZt=Dje,bLe=kje,ELe=jje,DZt=Fje;function fN({children:a}){return D.jsxRuntimeExports.jsxs(OZt,{className:"mlyh8yej3 mly5yr21d mlyb3r6kr mly1bo1i26 mly1fzkygm mlynu5hmx mly1u5txqc",children:[D.jsxRuntimeExports.jsx(NZt,{className:"mlyh8yej3 mly5yr21d mly1pjcqnp",children:Y.Children.map(a,u=>u)}),D.jsxRuntimeExports.jsx(bLe,{className:"mly78zum5 mly3j5mvw mly15sj6ns mly14znju7 mlyehqz9p mly1xc55vz",orientation:"vertical",children:D.jsxRuntimeExports.jsx(ELe,{className:"mly98rzlu mly1o4sr5b mly12oqio5"})}),D.jsxRuntimeExports.jsx(bLe,{className:"mly78zum5 mly3j5mvw mly15sj6ns mly14znju7 mlydt5ytf mlyztvwtv mlydk7pt",orientation:"horizontal",children:D.jsxRuntimeExports.jsx(ELe,{className:"mly98rzlu mly1o4sr5b mly12oqio5"})}),D.jsxRuntimeExports.jsx(DZt,{className:"mly3j5mvw mly1d3ksz1 mly14znju7"})]})}const kZt="default",LZt="default";function $i({variant:a=kZt,size:u=LZt,icon:d,label:f,tooltip:m,isDisabled:g=!1,customStyle:x,...b}){const v=D.jsxRuntimeExports.jsxs("button",{...Lt.props(Cre.main,IZt[a],PZt[u],x),type:"button",disabled:g,...b,children:[D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlyl56j7k mly6s0dn4 mly167g77z",children:[d&&D.jsxRuntimeExports.jsx(An,{name:d,customStyle:Cre.icon}),f&&D.jsxRuntimeExports.jsx("div",{...Lt.props(a==="primary"?Fr.emphasized:Fr.body,Cre.label),children:f})]}),g&&D.jsxRuntimeExports.jsx("div",{className:"mly10l6tqk mlyu96u03 mly3m8u43 mlyzy8d55 mly47corl mlyur7f20 mlyh8yej3 mly5yr21d"})]});return m?D.jsxRuntimeExports.jsxs(LS,{delayDuration:300,children:[D.jsxRuntimeExports.jsx(IS,{asChild:!0,children:v}),D.jsxRuntimeExports.jsx(PS,{children:D.jsxRuntimeExports.jsx(jS,{sideOffset:8,...Lt.props(Fr.body,g0.default),children:m})})]}):v}const Cre={main:{display:"mly3nfvp2",flexDirection:"mlydt5ytf",justifyContent:"mlyl56j7k",alignItems:"mly6s0dn4",position:"mly1n2onr6",gap:"mly167g77z",rowGap:null,columnGap:null,borderRadius:"mlyur7f20",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,borderWidth:"mlyc342km",borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,cursor:"mly1ypdohk mly1s07b3s",flexShrink:"mly2lah0s",userSelect:"mly87ps6o",$$css:!0},icon:{color:"mlyuk6yi3",$$css:!0},label:{color:"mlyaerthn",whiteSpace:"mlyuxw1ft",$$css:!0}},IZt={default:{background:"mlygqa5hp mly1uceoyp mly1cncicd",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,"--mlyxo3nik":"mlypfd894 mlyiv1q3g","--mly1hpdckv":"mly5xbp4t mly1iu3zmn",$$css:!0},flat:{background:"mly1md70p1 mly14hn1a8 mlywghvya",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,"--mlyxo3nik":"mlypfd894 mlyiv1q3g","--mly1hpdckv":"mly5xbp4t mly1iu3zmn",$$css:!0},primary:{background:"mlyhcrij8 mly1vdl2d1 mly1u4cpcs",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,"--mlyxo3nik":"mly1n5rdk7 mly1dsjhx","--mly1hpdckv":"mly3mt86g mly13vk70h",$$css:!0}},PZt={default:{height:"mlyc9qbxq",padding:"mly153ncpu",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0},compact:{height:"mly1fgtraw",padding:"mlydqdrvq",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0}},Cx={main:{display:"mlywz0xwf",gridAutoFlow:"mly1mt1orb",alignItems:"mly6s0dn4",justifyContent:"mlyl56j7k",gap:"mly167g77z",rowGap:null,columnGap:null,borderRadius:"mly12oqio5",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,borderWidth:"mlyc342km",borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,outline:"mly1a2a7pz",outlineColor:null,outlineOffset:null,outlineStyle:null,outlineWidth:null,cursor:"mly1ypdohk",overflow:"mlyb3r6kr",overflowX:null,overflowY:null,background:"mly1np9qvj mly1uceoyp",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,position:"mly1n2onr6",$$css:!0},icon:{color:"mlywn9h7t",$$css:!0},label:{color:"mly1xre2ib",textOverflow:"mlylyipyv",overflow:"mlyb3r6kr",overflowX:null,overflowY:null,whiteSpace:"mlyuxw1ft",$$css:!0}},xse={default:{"--mlyvygx4q":"mly1izbou4","--mly13n7235":"mly8bgh0r",$$css:!0},purple:{"--mlyvygx4q":"mly1f8soc4","--mly13n7235":"mly1r5zvhd",$$css:!0},green:{"--mlyvygx4q":"mlyf8wvcd","--mly13n7235":"mly1u6t2w6",$$css:!0},cyan:{"--mlyvygx4q":"mlyrtwgpv","--mly13n7235":"mlys5r2en",$$css:!0}},yse={default:{padding:"mlydqdrvq",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0},compact:{padding:"mlyxzb6uj",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0}},FS="default",vse="default";function $s({label:a,icon:u,color:d=FS,size:f=vse,onClick:m,onHover:g,asButtonTrigger:x=!1,tooltip:b,tooltipProps:v,customStyle:_,dragProps:S,...R}){const w=m!==void 0||x,N=D.jsxRuntimeExports.jsxs("div",{...Lt.props(Cx.main,xse[d],yse[f],!w&&jZt.nonInteractive,_),...S?.attributes,...S?.listeners,children:[u&&D.jsxRuntimeExports.jsx(An,{name:u,customStyle:Cx.icon}),w&&D.jsxRuntimeExports.jsx("button",{className:"mlyh8yej3 mly5yr21d mly10l6tqk mly13vifvy mlyu96u03 mly1md70p1 mlyng3xce mly1ypdohk",...m&&{onClick:m},...g&&{onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1)},...R}),a&&D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.body,Cx.label),children:a})]});return b?D.jsxRuntimeExports.jsxs(oN,{delayDuration:300,children:[D.jsxRuntimeExports.jsx(aN,{asChild:!0,children:N}),D.jsxRuntimeExports.jsx(lN,{children:D.jsxRuntimeExports.jsx(uN,{...v,...Lt.props(typeof b=="string"?g0.default:g0.card),children:b})})]}):N}const jZt={nonInteractive:{cursor:"mlyt0e3qv",background:"mly1np9qvj",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,$$css:!0}};function hN({children:a,color:u=FS,customStyle:d}){const f=Y.Children.count(a);return D.jsxRuntimeExports.jsx("div",{...Lt.props(n5.main,d),children:Y.Children.map(a,(m,g)=>Y.cloneElement(m,{customStyle:{...m.props.customStyle,...FZt(g,f)},color:MZt(m,u)}))})}const FZt=(a,u)=>u===1?n5.onlyChild:a===0?n5.firstChild:a===u-1?n5.lastChild:n5.innerChild,MZt=(a,u)=>{const d=a.props.color;return d===void 0?u:d},n5={main:{display:"mlyrvj5dj",gridAutoFlow:"mly1mt1orb",alignItems:"mly6s0dn4",gap:"mly12mrbbr",rowGap:null,columnGap:null,$$css:!0},firstChild:{borderRadius:"mlytah5vv",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,$$css:!0},innerChild:{borderRadius:null,borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,$$css:!0},lastChild:{borderRadius:"mly19ctu66",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,$$css:!0},onlyChild:{borderRadius:"mly12oqio5",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,$$css:!0}};function n$({errorMessage:a}){return D.jsxRuntimeExports.jsxs(LS,{delayDuration:0,children:[D.jsxRuntimeExports.jsx(IS,{asChild:!0,children:D.jsxRuntimeExports.jsx("div",{className:"mlygd8bvy mly1fgtraw mly78zum5 mly6s0dn4 mlyl56j7k",children:D.jsxRuntimeExports.jsx(An,{name:"warning",customStyle:$Zt.errorIcon})})}),D.jsxRuntimeExports.jsx(PS,{children:D.jsxRuntimeExports.jsx(jS,{children:D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.body,g0.default),children:a})})})]})}const $Zt={errorIcon:{color:"mly1e2nbdu",$$css:!0}};function Fne({value:a,onChange:u,onRemove:d,icon:f,color:m=FS,size:g=vse,customStyle:x,type:b,errorMessage:v}){const[_,S]=Y.useState(!1),R=Y.useRef(null),w=Y.useRef(null),N=({target:P})=>{u(b==="number"?parseFloat(P.value||"0"):P.value)},k=()=>{S(!0)},B=P=>{var $;w.current==null||P.relatedTarget!==w.current?S(!1):($=R.current)==null||$.focus()};return D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly6s0dn4",children:[D.jsxRuntimeExports.jsxs("div",{...Lt.props(Cx.main,xse[m],yse[g],_&&FO.focused,!!v&&FO.hasError,x),children:[f&&D.jsxRuntimeExports.jsx(An,{name:f,customStyle:FO.icon}),D.jsxRuntimeExports.jsxs("span",{className:"mlywz0xwf",children:[D.jsxRuntimeExports.jsx("span",{...Lt.props(Fr.body,FO.placeholder),style:{whiteSpaceCollapse:"preserve"},children:a}),D.jsxRuntimeExports.jsx("input",{...Lt.props(FO.input,Fr.body),ref:R,pattern:b==="number"?"^-?[0-9.]*$":void 0,value:a,onChange:N,onFocus:k,onBlur:B,size:1})]}),d&&_&&D.jsxRuntimeExports.jsx("button",{className:"mly3nfvp2 mlyc342km mly1md70p1 mly1717udv mly1ypdohk",ref:w,onClick:d,tabIndex:0,children:D.jsxRuntimeExports.jsx(An,{name:"clear"})})]}),v&&D.jsxRuntimeExports.jsx(n$,{errorMessage:v})]})}const FO={focused:{background:"mlyotlr4g",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,boxShadow:"mlyn8fsvk",$$css:!0},hasError:{border:"mly1dc9p4k",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,$$css:!0},icon:{color:"mlywn9h7t",$$css:!0},placeholder:{background:"mly1md70p1",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,color:"mly19co3pv",gridArea:"mly15r89dc",gridRow:null,gridRowStart:null,gridRowEnd:null,gridColumn:null,gridColumnStart:null,gridColumnEnd:null,whiteSpace:"mlyuxw1ft",minWidth:"mlygc0pbm",$$css:!0},input:{color:"mly1xre2ib",gridArea:"mly15r89dc",gridRow:null,gridRowStart:null,gridRowEnd:null,gridColumn:null,gridColumnStart:null,gridColumnEnd:null,padding:"mly1717udv",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,background:"mly1md70p1",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,borderStyle:"mlyng3xce",borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,outline:"mly1a2a7pz",outlineColor:null,outlineOffset:null,outlineStyle:null,outlineWidth:null,whiteSpace:"mlyuxw1ft",minWidth:"mlygc0pbm",$$css:!0}};function bse(a){const u=a+"CollectionProvider",[d,f]=Md(u),[m,g]=d(u,{collectionRef:{current:null},itemMap:new Map}),x=N=>{const{scope:k,children:B}=N,P=Pe.useRef(null),$=Pe.useRef(new Map).current;return D.jsxRuntimeExports.jsx(m,{scope:k,itemMap:$,collectionRef:P,children:B})};x.displayName=u;const b=a+"CollectionSlot",v=Pe.forwardRef((N,k)=>{const{scope:B,children:P}=N,$=g(b,B),q=Cn(k,$.collectionRef);return D.jsxRuntimeExports.jsx(Tx,{ref:q,children:P})});v.displayName=b;const _=a+"CollectionItemSlot",S="data-radix-collection-item",R=Pe.forwardRef((N,k)=>{const{scope:B,children:P,...$}=N,q=Pe.useRef(null),z=Cn(k,q),W=g(_,B);return Pe.useEffect(()=>(W.itemMap.set(q,{ref:q,...$}),()=>void W.itemMap.delete(q))),D.jsxRuntimeExports.jsx(Tx,{[S]:"",ref:z,children:P})});R.displayName=_;function w(N){const k=g(a+"CollectionConsumer",N);return Pe.useCallback(()=>{const P=k.collectionRef.current;if(!P)return[];const $=Array.from(P.querySelectorAll(`[${S}]`));return Array.from(k.itemMap.values()).sort((W,X)=>$.indexOf(W.ref.current)-$.indexOf(X.ref.current))},[k.collectionRef,k.itemMap])}return[{Provider:x,Slot:v,ItemSlot:R},w,f]}var Rre=0;function i$(){Y.useEffect(()=>{const a=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",a[0]??_Le()),document.body.insertAdjacentElement("beforeend",a[1]??_Le()),Rre++,()=>{Rre===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(u=>u.remove()),Rre--}},[])}function _Le(){const a=document.createElement("span");return a.setAttribute("data-radix-focus-guard",""),a.tabIndex=0,a.style.outline="none",a.style.opacity="0",a.style.position="fixed",a.style.pointerEvents="none",a}var Tre="focusScope.autoFocusOnMount",wre="focusScope.autoFocusOnUnmount",SLe={bubbles:!1,cancelable:!0},BZt="FocusScope",pN=Y.forwardRef((a,u)=>{const{loop:d=!1,trapped:f=!1,onMountAutoFocus:m,onUnmountAutoFocus:g,...x}=a,[b,v]=Y.useState(null),_=Us(m),S=Us(g),R=Y.useRef(null),w=Cn(u,B=>v(B)),N=Y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;Y.useEffect(()=>{if(f){let B=function(z){if(N.paused||!b)return;const W=z.target;b.contains(W)?R.current=W:yx(R.current,{select:!0})},P=function(z){if(N.paused||!b)return;const W=z.relatedTarget;W!==null&&(b.contains(W)||yx(R.current,{select:!0}))},$=function(z){if(document.activeElement===document.body)for(const X of z)X.removedNodes.length>0&&yx(b)};document.addEventListener("focusin",B),document.addEventListener("focusout",P);const q=new MutationObserver($);return b&&q.observe(b,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",B),document.removeEventListener("focusout",P),q.disconnect()}}},[f,b,N.paused]),Y.useEffect(()=>{if(b){CLe.add(N);const B=document.activeElement;if(!b.contains(B)){const $=new CustomEvent(Tre,SLe);b.addEventListener(Tre,_),b.dispatchEvent($),$.defaultPrevented||(qZt(WZt(qje(b)),{select:!0}),document.activeElement===B&&yx(b))}return()=>{b.removeEventListener(Tre,_),setTimeout(()=>{const $=new CustomEvent(wre,SLe);b.addEventListener(wre,S),b.dispatchEvent($),$.defaultPrevented||yx(B??document.body,{select:!0}),b.removeEventListener(wre,S),CLe.remove(N)},0)}}},[b,_,S,N]);const k=Y.useCallback(B=>{if(!d&&!f||N.paused)return;const P=B.key==="Tab"&&!B.altKey&&!B.ctrlKey&&!B.metaKey,$=document.activeElement;if(P&&$){const q=B.currentTarget,[z,W]=UZt(q);z&&W?!B.shiftKey&&$===W?(B.preventDefault(),d&&yx(z,{select:!0})):B.shiftKey&&$===z&&(B.preventDefault(),d&&yx(W,{select:!0})):$===q&&B.preventDefault()}},[d,f,N.paused]);return D.jsxRuntimeExports.jsx(rn.div,{tabIndex:-1,...x,ref:w,onKeyDown:k})});pN.displayName=BZt;function qZt(a,{select:u=!1}={}){const d=document.activeElement;for(const f of a)if(yx(f,{select:u}),document.activeElement!==d)return}function UZt(a){const u=qje(a),d=ALe(u,a),f=ALe(u.reverse(),a);return[d,f]}function qje(a){const u=[],d=document.createTreeWalker(a,NodeFilter.SHOW_ELEMENT,{acceptNode:f=>{const m=f.tagName==="INPUT"&&f.type==="hidden";return f.disabled||f.hidden||m?NodeFilter.FILTER_SKIP:f.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;d.nextNode();)u.push(d.currentNode);return u}function ALe(a,u){for(const d of a)if(!zZt(d,{upTo:u}))return d}function zZt(a,{upTo:u}){if(getComputedStyle(a).visibility==="hidden")return!0;for(;a;){if(u!==void 0&&a===u)return!1;if(getComputedStyle(a).display==="none")return!0;a=a.parentElement}return!1}function HZt(a){return a instanceof HTMLInputElement&&"select"in a}function yx(a,{select:u=!1}={}){if(a&&a.focus){const d=document.activeElement;a.focus({preventScroll:!0}),a!==d&&HZt(a)&&u&&a.select()}}var CLe=GZt();function GZt(){let a=[];return{add(u){const d=a[0];u!==d&&d?.pause(),a=RLe(a,u),a.unshift(u)},remove(u){var d;a=RLe(a,u),(d=a[0])==null||d.resume()}}}function RLe(a,u){const d=[...a],f=d.indexOf(u);return f!==-1&&d.splice(f,1),d}function WZt(a){return a.filter(u=>u.tagName!=="A")}function VZt(a){const u=Y.useRef({value:a,previous:a});return Y.useMemo(()=>(u.current.value!==a&&(u.current.previous=u.current.value,u.current.value=a),u.current.previous),[a])}var QZt=function(a){if(typeof document>"u")return null;var u=Array.isArray(a)?a[0]:a;return u.ownerDocument.body},P_=new WeakMap,Gj=new WeakMap,Wj={},Ore=0,Uje=function(a){return a&&(a.host||Uje(a.parentNode))},YZt=function(a,u){return u.map(function(d){if(a.contains(d))return d;var f=Uje(d);return f&&a.contains(f)?f:(console.error("aria-hidden",d,"in not contained inside",a,". Doing nothing"),null)}).filter(function(d){return!!d})},KZt=function(a,u,d,f){var m=YZt(u,Array.isArray(a)?a:[a]);Wj[d]||(Wj[d]=new WeakMap);var g=Wj[d],x=[],b=new Set,v=new Set(m),_=function(R){!R||b.has(R)||(b.add(R),_(R.parentNode))};m.forEach(_);var S=function(R){!R||v.has(R)||Array.prototype.forEach.call(R.children,function(w){if(b.has(w))S(w);else try{var N=w.getAttribute(f),k=N!==null&&N!=="false",B=(P_.get(w)||0)+1,P=(g.get(w)||0)+1;P_.set(w,B),g.set(w,P),x.push(w),B===1&&k&&Gj.set(w,!0),P===1&&w.setAttribute(d,"true"),k||w.setAttribute(f,"true")}catch($){console.error("aria-hidden: cannot operate on ",w,$)}})};return S(u),b.clear(),Ore++,function(){x.forEach(function(R){var w=P_.get(R)-1,N=g.get(R)-1;P_.set(R,w),g.set(R,N),w||(Gj.has(R)||R.removeAttribute(f),Gj.delete(R)),N||R.removeAttribute(d)}),Ore--,Ore||(P_=new WeakMap,P_=new WeakMap,Gj=new WeakMap,Wj={})}},s$=function(a,u,d){d===void 0&&(d="data-aria-hidden");var f=Array.from(Array.isArray(a)?a:[a]),m=QZt(a);return m?(f.push.apply(f,Array.from(m.querySelectorAll("[aria-live]"))),KZt(f,m,d,"aria-hidden")):function(){return null}},fh=function(){return fh=Object.assign||function(u){for(var d,f=1,m=arguments.length;f<m;f++){d=arguments[f];for(var g in d)Object.prototype.hasOwnProperty.call(d,g)&&(u[g]=d[g])}return u},fh.apply(this,arguments)};function zje(a,u){var d={};for(var f in a)Object.prototype.hasOwnProperty.call(a,f)&&u.indexOf(f)<0&&(d[f]=a[f]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var m=0,f=Object.getOwnPropertySymbols(a);m<f.length;m++)u.indexOf(f[m])<0&&Object.prototype.propertyIsEnumerable.call(a,f[m])&&(d[f[m]]=a[f[m]]);return d}function XZt(a,u,d){for(var f=0,m=u.length,g;f<m;f++)(g||!(f in u))&&(g||(g=Array.prototype.slice.call(u,0,f)),g[f]=u[f]);return a.concat(g||Array.prototype.slice.call(u))}var AF="right-scroll-bar-position",CF="width-before-scroll-bar",JZt="with-scroll-bars-hidden",ZZt="--removed-body-scroll-bar-size";function Nre(a,u){return typeof a=="function"?a(u):a&&(a.current=u),a}function eer(a,u){var d=Pe.useState(function(){return{value:a,callback:u,facade:{get current(){return d.value},set current(f){var m=d.value;m!==f&&(d.value=f,d.callback(f,m))}}}})[0];return d.callback=u,d.facade}var ter=typeof window<"u"?Y.useLayoutEffect:Y.useEffect,TLe=new WeakMap;function rer(a,u){var d=eer(null,function(f){return a.forEach(function(m){return Nre(m,f)})});return ter(function(){var f=TLe.get(d);if(f){var m=new Set(f),g=new Set(a),x=d.current;m.forEach(function(b){g.has(b)||Nre(b,null)}),g.forEach(function(b){m.has(b)||Nre(b,x)})}TLe.set(d,a)},[a]),d}function ner(a){return a}function ier(a,u){u===void 0&&(u=ner);var d=[],f=!1,m={read:function(){if(f)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return d.length?d[d.length-1]:a},useMedium:function(g){var x=u(g,f);return d.push(x),function(){d=d.filter(function(b){return b!==x})}},assignSyncMedium:function(g){for(f=!0;d.length;){var x=d;d=[],x.forEach(g)}d={push:function(b){return g(b)},filter:function(){return d}}},assignMedium:function(g){f=!0;var x=[];if(d.length){var b=d;d=[],b.forEach(g),x=d}var v=function(){var S=x;x=[],S.forEach(g)},_=function(){return Promise.resolve().then(v)};_(),d={push:function(S){x.push(S),_()},filter:function(S){return x=x.filter(S),d}}}};return m}function ser(a){a===void 0&&(a={});var u=ier(null);return u.options=fh({async:!0,ssr:!1},a),u}var Hje=function(a){var u=a.sideCar,d=zje(a,["sideCar"]);if(!u)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var f=u.read();if(!f)throw new Error("Sidecar medium not found");return Y.createElement(f,fh({},d))};Hje.isSideCarExport=!0;function oer(a,u){return a.useMedium(u),Hje}var Gje=ser(),Dre=function(){},o$=Y.forwardRef(function(a,u){var d=Y.useRef(null),f=Y.useState({onScrollCapture:Dre,onWheelCapture:Dre,onTouchMoveCapture:Dre}),m=f[0],g=f[1],x=a.forwardProps,b=a.children,v=a.className,_=a.removeScrollBar,S=a.enabled,R=a.shards,w=a.sideCar,N=a.noIsolation,k=a.inert,B=a.allowPinchZoom,P=a.as,$=P===void 0?"div":P,q=a.gapMode,z=zje(a,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),W=w,X=rer([d,u]),J=fh(fh({},z),m);return Y.createElement(Y.Fragment,null,S&&Y.createElement(W,{sideCar:Gje,removeScrollBar:_,shards:R,noIsolation:N,inert:k,setCallbacks:g,allowPinchZoom:!!B,lockRef:d,gapMode:q}),x?Y.cloneElement(Y.Children.only(b),fh(fh({},J),{ref:X})):Y.createElement($,fh({},J,{className:v,ref:X}),b))});o$.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};o$.classNames={fullWidth:CF,zeroRight:AF};var aer=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ler(){if(!document)return null;var a=document.createElement("style");a.type="text/css";var u=aer();return u&&a.setAttribute("nonce",u),a}function uer(a,u){a.styleSheet?a.styleSheet.cssText=u:a.appendChild(document.createTextNode(u))}function cer(a){var u=document.head||document.getElementsByTagName("head")[0];u.appendChild(a)}var der=function(){var a=0,u=null;return{add:function(d){a==0&&(u=ler())&&(uer(u,d),cer(u)),a++},remove:function(){a--,!a&&u&&(u.parentNode&&u.parentNode.removeChild(u),u=null)}}},fer=function(){var a=der();return function(u,d){Y.useEffect(function(){return a.add(u),function(){a.remove()}},[u&&d])}},Wje=function(){var a=fer(),u=function(d){var f=d.styles,m=d.dynamic;return a(f,m),null};return u},her={left:0,top:0,right:0,gap:0},kre=function(a){return parseInt(a||"",10)||0},per=function(a){var u=window.getComputedStyle(document.body),d=u[a==="padding"?"paddingLeft":"marginLeft"],f=u[a==="padding"?"paddingTop":"marginTop"],m=u[a==="padding"?"paddingRight":"marginRight"];return[kre(d),kre(f),kre(m)]},mer=function(a){if(a===void 0&&(a="margin"),typeof window>"u")return her;var u=per(a),d=document.documentElement.clientWidth,f=window.innerWidth;return{left:u[0],top:u[1],right:u[2],gap:Math.max(0,f-d+u[2]-u[0])}},ger=Wje(),K_="data-scroll-locked",xer=function(a,u,d,f){var m=a.left,g=a.top,x=a.right,b=a.gap;return d===void 0&&(d="margin"),`
|
|
2675
2675
|
.`.concat(JZt,` {
|
|
2676
2676
|
overflow: hidden `).concat(f,`;
|
|
2677
2677
|
padding-right: `).concat(b,"px ").concat(f,`;
|
|
@@ -2711,7 +2711,7 @@ ${r.map(s=>` ${s}`).join(`,
|
|
|
2711
2711
|
`)},wLe=function(){var a=parseInt(document.body.getAttribute(K_)||"0",10);return isFinite(a)?a:0},yer=function(){Y.useEffect(function(){return document.body.setAttribute(K_,(wLe()+1).toString()),function(){var a=wLe()-1;a<=0?document.body.removeAttribute(K_):document.body.setAttribute(K_,a.toString())}},[])},ver=function(a){var u=a.noRelative,d=a.noImportant,f=a.gapMode,m=f===void 0?"margin":f;yer();var g=Y.useMemo(function(){return mer(m)},[m]);return Y.createElement(ger,{styles:xer(g,!u,m,d?"":"!important")})},Mne=!1;if(typeof window<"u")try{var Vj=Object.defineProperty({},"passive",{get:function(){return Mne=!0,!0}});window.addEventListener("test",Vj,Vj),window.removeEventListener("test",Vj,Vj)}catch{Mne=!1}var j_=Mne?{passive:!1}:!1,ber=function(a){return a.tagName==="TEXTAREA"},Vje=function(a,u){if(!(a instanceof Element))return!1;var d=window.getComputedStyle(a);return d[u]!=="hidden"&&!(d.overflowY===d.overflowX&&!ber(a)&&d[u]==="visible")},Eer=function(a){return Vje(a,"overflowY")},_er=function(a){return Vje(a,"overflowX")},OLe=function(a,u){var d=u.ownerDocument,f=u;do{typeof ShadowRoot<"u"&&f instanceof ShadowRoot&&(f=f.host);var m=Qje(a,f);if(m){var g=Yje(a,f),x=g[1],b=g[2];if(x>b)return!0}f=f.parentNode}while(f&&f!==d.body);return!1},Ser=function(a){var u=a.scrollTop,d=a.scrollHeight,f=a.clientHeight;return[u,d,f]},Aer=function(a){var u=a.scrollLeft,d=a.scrollWidth,f=a.clientWidth;return[u,d,f]},Qje=function(a,u){return a==="v"?Eer(u):_er(u)},Yje=function(a,u){return a==="v"?Ser(u):Aer(u)},Cer=function(a,u){return a==="h"&&u==="rtl"?-1:1},Rer=function(a,u,d,f,m){var g=Cer(a,window.getComputedStyle(u).direction),x=g*f,b=d.target,v=u.contains(b),_=!1,S=x>0,R=0,w=0;do{var N=Yje(a,b),k=N[0],B=N[1],P=N[2],$=B-P-g*k;(k||$)&&Qje(a,b)&&(R+=$,w+=k),b instanceof ShadowRoot?b=b.host:b=b.parentNode}while(!v&&b!==document.body||v&&(u.contains(b)||u===b));return(S&&Math.abs(R)<1||!S&&Math.abs(w)<1)&&(_=!0),_},Qj=function(a){return"changedTouches"in a?[a.changedTouches[0].clientX,a.changedTouches[0].clientY]:[0,0]},NLe=function(a){return[a.deltaX,a.deltaY]},DLe=function(a){return a&&"current"in a?a.current:a},Ter=function(a,u){return a[0]===u[0]&&a[1]===u[1]},wer=function(a){return`
|
|
2712
2712
|
.block-interactivity-`.concat(a,` {pointer-events: none;}
|
|
2713
2713
|
.allow-interactivity-`).concat(a,` {pointer-events: all;}
|
|
2714
|
-
`)},Oer=0,F_=[];function Ner(a){var u=Y.useRef([]),d=Y.useRef([0,0]),f=Y.useRef(),m=Y.useState(Oer++)[0],g=Y.useState(Wje)[0],x=Y.useRef(a);Y.useEffect(function(){x.current=a},[a]),Y.useEffect(function(){if(a.inert){document.body.classList.add("block-interactivity-".concat(m));var B=XZt([a.lockRef.current],(a.shards||[]).map(DLe)).filter(Boolean);return B.forEach(function(P){return P.classList.add("allow-interactivity-".concat(m))}),function(){document.body.classList.remove("block-interactivity-".concat(m)),B.forEach(function(P){return P.classList.remove("allow-interactivity-".concat(m))})}}},[a.inert,a.lockRef.current,a.shards]);var b=Y.useCallback(function(B,P){if("touches"in B&&B.touches.length===2||B.type==="wheel"&&B.ctrlKey)return!x.current.allowPinchZoom;var $=Qj(B),q=d.current,z="deltaX"in B?B.deltaX:q[0]-$[0],W="deltaY"in B?B.deltaY:q[1]-$[1],X,J=B.target,ee=Math.abs(z)>Math.abs(W)?"h":"v";if("touches"in B&&ee==="h"&&J.type==="range")return!1;var fe=OLe(ee,J);if(!fe)return!0;if(fe?X=ee:(X=ee==="v"?"h":"v",fe=OLe(ee,J)),!fe)return!1;if(!f.current&&"changedTouches"in B&&(z||W)&&(f.current=X),!X)return!0;var be=f.current||X;return Rer(be,P,B,be==="h"?z:W)},[]),v=Y.useCallback(function(B){var P=B;if(!(!F_.length||F_[F_.length-1]!==g)){var $="deltaY"in P?NLe(P):Qj(P),q=u.current.filter(function(X){return X.name===P.type&&(X.target===P.target||P.target===X.shadowParent)&&Ter(X.delta,$)})[0];if(q&&q.should){P.cancelable&&P.preventDefault();return}if(!q){var z=(x.current.shards||[]).map(DLe).filter(Boolean).filter(function(X){return X.contains(P.target)}),W=z.length>0?b(P,z[0]):!x.current.noIsolation;W&&P.cancelable&&P.preventDefault()}}},[]),_=Y.useCallback(function(B,P,$,q){var z={name:B,delta:P,target:$,should:q,shadowParent:Der($)};u.current.push(z),setTimeout(function(){u.current=u.current.filter(function(W){return W!==z})},1)},[]),S=Y.useCallback(function(B){d.current=Qj(B),f.current=void 0},[]),R=Y.useCallback(function(B){_(B.type,NLe(B),B.target,b(B,a.lockRef.current))},[]),w=Y.useCallback(function(B){_(B.type,Qj(B),B.target,b(B,a.lockRef.current))},[]);Y.useEffect(function(){return F_.push(g),a.setCallbacks({onScrollCapture:R,onWheelCapture:R,onTouchMoveCapture:w}),document.addEventListener("wheel",v,j_),document.addEventListener("touchmove",v,j_),document.addEventListener("touchstart",S,j_),function(){F_=F_.filter(function(B){return B!==g}),document.removeEventListener("wheel",v,j_),document.removeEventListener("touchmove",v,j_),document.removeEventListener("touchstart",S,j_)}},[]);var N=a.removeScrollBar,k=a.inert;return Y.createElement(Y.Fragment,null,k?Y.createElement(g,{styles:wer(m)}):null,N?Y.createElement(ver,{gapMode:a.gapMode}):null)}function Der(a){for(var u=null;a!==null;)a instanceof ShadowRoot&&(u=a.host,a=a.host),a=a.parentNode;return u}const ker=oer(Gje,Ner);var mN=Y.forwardRef(function(a,u){return Y.createElement(o$,fh({},a,{ref:u,sideCar:ker}))});mN.classNames=o$.classNames;var Ler=[" ","Enter","ArrowUp","ArrowDown"],Ier=[" ","Enter"],gN="Select",[a$,l$,Per]=bse(gN),[MS,Tyr]=Md(gN,[Per,Bx]),u$=Bx(),[jer,qx]=MS(gN),[Fer,Mer]=MS(gN),Kje=a=>{const{__scopeSelect:u,children:d,open:f,defaultOpen:m,onOpenChange:g,value:x,defaultValue:b,onValueChange:v,dir:_,name:S,autoComplete:R,disabled:w,required:N,form:k}=a,B=u$(u),[P,$]=Y.useState(null),[q,z]=Y.useState(null),[W,X]=Y.useState(!1),J=dN(_),[ee=!1,fe]=Dx({prop:f,defaultProp:m,onChange:g}),[be,je]=Dx({prop:x,defaultProp:b,onChange:v}),_e=Y.useRef(null),De=P?k||!!P.closest("form"):!0,[Xe,ze]=Y.useState(new Set),te=Array.from(Xe).map(Ne=>Ne.props.value).join(";");return D.jsxRuntimeExports.jsx(YM,{...B,children:D.jsxRuntimeExports.jsxs(jer,{required:N,scope:u,trigger:P,onTriggerChange:$,valueNode:q,onValueNodeChange:z,valueNodeHasChildren:W,onValueNodeHasChildrenChange:X,contentId:ic(),value:be,onValueChange:je,open:ee,onOpenChange:fe,dir:J,triggerPointerDownPosRef:_e,disabled:w,children:[D.jsxRuntimeExports.jsx(a$.Provider,{scope:u,children:D.jsxRuntimeExports.jsx(Fer,{scope:a.__scopeSelect,onNativeOptionAdd:Y.useCallback(Ne=>{ze(Ge=>new Set(Ge).add(Ne))},[]),onNativeOptionRemove:Y.useCallback(Ne=>{ze(Ge=>{const mt=new Set(Ge);return mt.delete(Ne),mt})},[]),children:d})}),De?D.jsxRuntimeExports.jsxs(gFe,{"aria-hidden":!0,required:N,tabIndex:-1,name:S,autoComplete:R,value:be,onChange:Ne=>je(Ne.target.value),disabled:w,form:k,children:[be===void 0?D.jsxRuntimeExports.jsx("option",{value:""}):null,Array.from(Xe)]},te):null]})})};Kje.displayName=gN;var Xje="SelectTrigger",Jje=Y.forwardRef((a,u)=>{const{__scopeSelect:d,disabled:f=!1,...m}=a,g=u$(d),x=qx(Xje,d),b=x.disabled||f,v=Cn(u,x.onTriggerChange),_=l$(d),S=Y.useRef("touch"),[R,w,N]=xFe(B=>{const P=_().filter(z=>!z.disabled),$=P.find(z=>z.value===x.value),q=yFe(P,B,$);q!==void 0&&x.onValueChange(q.value)}),k=B=>{b||(x.onOpenChange(!0),N()),B&&(x.triggerPointerDownPosRef.current={x:Math.round(B.pageX),y:Math.round(B.pageY)})};return D.jsxRuntimeExports.jsx(iN,{asChild:!0,...g,children:D.jsxRuntimeExports.jsx(rn.button,{type:"button",role:"combobox","aria-controls":x.contentId,"aria-expanded":x.open,"aria-required":x.required,"aria-autocomplete":"none",dir:x.dir,"data-state":x.open?"open":"closed",disabled:b,"data-disabled":b?"":void 0,"data-placeholder":mFe(x.value)?"":void 0,...m,ref:v,onClick:xr(m.onClick,B=>{B.currentTarget.focus(),S.current!=="mouse"&&k(B)}),onPointerDown:xr(m.onPointerDown,B=>{S.current=B.pointerType;const P=B.target;P.hasPointerCapture(B.pointerId)&&P.releasePointerCapture(B.pointerId),B.button===0&&B.ctrlKey===!1&&B.pointerType==="mouse"&&(k(B),B.preventDefault())}),onKeyDown:xr(m.onKeyDown,B=>{const P=R.current!=="";!(B.ctrlKey||B.altKey||B.metaKey)&&B.key.length===1&&w(B.key),!(P&&B.key===" ")&&Ler.includes(B.key)&&(k(),B.preventDefault())})})})});Jje.displayName=Xje;var Zje="SelectValue",eFe=Y.forwardRef((a,u)=>{const{__scopeSelect:d,className:f,style:m,children:g,placeholder:x="",...b}=a,v=qx(Zje,d),{onValueNodeHasChildrenChange:_}=v,S=g!==void 0,R=Cn(u,v.onValueNodeChange);return ca(()=>{_(S)},[_,S]),D.jsxRuntimeExports.jsx(rn.span,{...b,ref:R,style:{pointerEvents:"none"},children:mFe(v.value)?D.jsxRuntimeExports.jsx(D.jsxRuntimeExports.Fragment,{children:x}):g})});eFe.displayName=Zje;var $er="SelectIcon",Ber=Y.forwardRef((a,u)=>{const{__scopeSelect:d,children:f,...m}=a;return D.jsxRuntimeExports.jsx(rn.span,{"aria-hidden":!0,...m,ref:u,children:f||"▼"})});Ber.displayName=$er;var qer="SelectPortal",tFe=a=>D.jsxRuntimeExports.jsx(kS,{asChild:!0,...a});tFe.displayName=qer;var Gv="SelectContent",rFe=Y.forwardRef((a,u)=>{const d=qx(Gv,a.__scopeSelect),[f,m]=Y.useState();if(ca(()=>{m(new DocumentFragment)},[]),!d.open){const g=f;return g?RM.createPortal(D.jsxRuntimeExports.jsx(nFe,{scope:a.__scopeSelect,children:D.jsxRuntimeExports.jsx(a$.Slot,{scope:a.__scopeSelect,children:D.jsxRuntimeExports.jsx("div",{children:a.children})})}),g):null}return D.jsxRuntimeExports.jsx(iFe,{...a,ref:u})});rFe.displayName=Gv;var Td=10,[nFe,Ux]=MS(Gv),Uer="SelectContentImpl",iFe=Y.forwardRef((a,u)=>{const{__scopeSelect:d,position:f="item-aligned",onCloseAutoFocus:m,onEscapeKeyDown:g,onPointerDownOutside:x,side:b,sideOffset:v,align:_,alignOffset:S,arrowPadding:R,collisionBoundary:w,collisionPadding:N,sticky:k,hideWhenDetached:B,avoidCollisions:P,...$}=a,q=qx(Gv,d),[z,W]=Y.useState(null),[X,J]=Y.useState(null),ee=Cn(u,Ie=>W(Ie)),[fe,be]=Y.useState(null),[je,_e]=Y.useState(null),De=l$(d),[Xe,ze]=Y.useState(!1),te=Y.useRef(!1);Y.useEffect(()=>{if(z)return s$(z)},[z]),i$();const Ne=Y.useCallback(Ie=>{const[le,...Se]=De().map(ot=>ot.ref.current),[Le]=Se.slice(-1),Ye=document.activeElement;for(const ot of Ie)if(ot===Ye||(ot?.scrollIntoView({block:"nearest"}),ot===le&&X&&(X.scrollTop=0),ot===Le&&X&&(X.scrollTop=X.scrollHeight),ot?.focus(),document.activeElement!==Ye))return},[De,X]),Ge=Y.useCallback(()=>Ne([fe,z]),[Ne,fe,z]);Y.useEffect(()=>{Xe&&Ge()},[Xe,Ge]);const{onOpenChange:mt,triggerPointerDownPosRef:Je}=q;Y.useEffect(()=>{if(z){let Ie={x:0,y:0};const le=Le=>{var Ye,ot;Ie={x:Math.abs(Math.round(Le.pageX)-(((Ye=Je.current)==null?void 0:Ye.x)??0)),y:Math.abs(Math.round(Le.pageY)-(((ot=Je.current)==null?void 0:ot.y)??0))}},Se=Le=>{Ie.x<=10&&Ie.y<=10?Le.preventDefault():z.contains(Le.target)||mt(!1),document.removeEventListener("pointermove",le),Je.current=null};return Je.current!==null&&(document.addEventListener("pointermove",le),document.addEventListener("pointerup",Se,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",le),document.removeEventListener("pointerup",Se,{capture:!0})}}},[z,mt,Je]),Y.useEffect(()=>{const Ie=()=>mt(!1);return window.addEventListener("blur",Ie),window.addEventListener("resize",Ie),()=>{window.removeEventListener("blur",Ie),window.removeEventListener("resize",Ie)}},[mt]);const[rt,vt]=xFe(Ie=>{const le=De().filter(Ye=>!Ye.disabled),Se=le.find(Ye=>Ye.ref.current===document.activeElement),Le=yFe(le,Ie,Se);Le&&setTimeout(()=>Le.ref.current.focus())}),qe=Y.useCallback((Ie,le,Se)=>{const Le=!te.current&&!Se;(q.value!==void 0&&q.value===le||Le)&&(be(Ie),Le&&(te.current=!0))},[q.value]),ge=Y.useCallback(()=>z?.focus(),[z]),pe=Y.useCallback((Ie,le,Se)=>{const Le=!te.current&&!Se;(q.value!==void 0&&q.value===le||Le)&&_e(Ie)},[q.value]),ye=f==="popper"?$ne:sFe,we=ye===$ne?{side:b,sideOffset:v,align:_,alignOffset:S,arrowPadding:R,collisionBoundary:w,collisionPadding:N,sticky:k,hideWhenDetached:B,avoidCollisions:P}:{};return D.jsxRuntimeExports.jsx(nFe,{scope:d,content:z,viewport:X,onViewportChange:J,itemRefCallback:qe,selectedItem:fe,onItemLeave:ge,itemTextRefCallback:pe,focusSelectedItem:Ge,selectedItemText:je,position:f,isPositioned:Xe,searchRef:rt,children:D.jsxRuntimeExports.jsx(mN,{as:Tx,allowPinchZoom:!0,children:D.jsxRuntimeExports.jsx(pN,{asChild:!0,trapped:q.open,onMountAutoFocus:Ie=>{Ie.preventDefault()},onUnmountAutoFocus:xr(m,Ie=>{var le;(le=q.trigger)==null||le.focus({preventScroll:!0}),Ie.preventDefault()}),children:D.jsxRuntimeExports.jsx(OS,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:g,onPointerDownOutside:x,onFocusOutside:Ie=>Ie.preventDefault(),onDismiss:()=>q.onOpenChange(!1),children:D.jsxRuntimeExports.jsx(ye,{role:"listbox",id:q.contentId,"data-state":q.open?"open":"closed",dir:q.dir,onContextMenu:Ie=>Ie.preventDefault(),...$,...we,onPlaced:()=>ze(!0),ref:ee,style:{display:"flex",flexDirection:"column",outline:"none",...$.style},onKeyDown:xr($.onKeyDown,Ie=>{const le=Ie.ctrlKey||Ie.altKey||Ie.metaKey;if(Ie.key==="Tab"&&Ie.preventDefault(),!le&&Ie.key.length===1&&vt(Ie.key),["ArrowUp","ArrowDown","Home","End"].includes(Ie.key)){let Le=De().filter(Ye=>!Ye.disabled).map(Ye=>Ye.ref.current);if(["ArrowUp","End"].includes(Ie.key)&&(Le=Le.slice().reverse()),["ArrowUp","ArrowDown"].includes(Ie.key)){const Ye=Ie.target,ot=Le.indexOf(Ye);Le=Le.slice(ot+1)}setTimeout(()=>Ne(Le)),Ie.preventDefault()}})})})})})})});iFe.displayName=Uer;var zer="SelectItemAlignedPosition",sFe=Y.forwardRef((a,u)=>{const{__scopeSelect:d,onPlaced:f,...m}=a,g=qx(Gv,d),x=Ux(Gv,d),[b,v]=Y.useState(null),[_,S]=Y.useState(null),R=Cn(u,ee=>S(ee)),w=l$(d),N=Y.useRef(!1),k=Y.useRef(!0),{viewport:B,selectedItem:P,selectedItemText:$,focusSelectedItem:q}=x,z=Y.useCallback(()=>{if(g.trigger&&g.valueNode&&b&&_&&B&&P&&$){const ee=g.trigger.getBoundingClientRect(),fe=_.getBoundingClientRect(),be=g.valueNode.getBoundingClientRect(),je=$.getBoundingClientRect();if(g.dir!=="rtl"){const Ye=je.left-fe.left,ot=be.left-Ye,He=ee.left-ot,We=ee.width+He,bt=Math.max(We,fe.width),_t=window.innerWidth-Td,Ft=jne(ot,[Td,Math.max(Td,_t-bt)]);b.style.minWidth=We+"px",b.style.left=Ft+"px"}else{const Ye=fe.right-je.right,ot=window.innerWidth-be.right-Ye,He=window.innerWidth-ee.right-ot,We=ee.width+He,bt=Math.max(We,fe.width),_t=window.innerWidth-Td,Ft=jne(ot,[Td,Math.max(Td,_t-bt)]);b.style.minWidth=We+"px",b.style.right=Ft+"px"}const _e=w(),De=window.innerHeight-Td*2,Xe=B.scrollHeight,ze=window.getComputedStyle(_),te=parseInt(ze.borderTopWidth,10),Ne=parseInt(ze.paddingTop,10),Ge=parseInt(ze.borderBottomWidth,10),mt=parseInt(ze.paddingBottom,10),Je=te+Ne+Xe+mt+Ge,rt=Math.min(P.offsetHeight*5,Je),vt=window.getComputedStyle(B),qe=parseInt(vt.paddingTop,10),ge=parseInt(vt.paddingBottom,10),pe=ee.top+ee.height/2-Td,ye=De-pe,we=P.offsetHeight/2,Ie=P.offsetTop+we,le=te+Ne+Ie,Se=Je-le;if(le<=pe){const Ye=_e.length>0&&P===_e[_e.length-1].ref.current;b.style.bottom="0px";const ot=_.clientHeight-B.offsetTop-B.offsetHeight,He=Math.max(ye,we+(Ye?ge:0)+ot+Ge),We=le+He;b.style.height=We+"px"}else{const Ye=_e.length>0&&P===_e[0].ref.current;b.style.top="0px";const He=Math.max(pe,te+B.offsetTop+(Ye?qe:0)+we)+Se;b.style.height=He+"px",B.scrollTop=le-pe+B.offsetTop}b.style.margin=`${Td}px 0`,b.style.minHeight=rt+"px",b.style.maxHeight=De+"px",f?.(),requestAnimationFrame(()=>N.current=!0)}},[w,g.trigger,g.valueNode,b,_,B,P,$,g.dir,f]);ca(()=>z(),[z]);const[W,X]=Y.useState();ca(()=>{_&&X(window.getComputedStyle(_).zIndex)},[_]);const J=Y.useCallback(ee=>{ee&&k.current===!0&&(z(),q?.(),k.current=!1)},[z,q]);return D.jsxRuntimeExports.jsx(Ger,{scope:d,contentWrapper:b,shouldExpandOnScrollRef:N,onScrollButtonChange:J,children:D.jsxRuntimeExports.jsx("div",{ref:v,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:W},children:D.jsxRuntimeExports.jsx(rn.div,{...m,ref:R,style:{boxSizing:"border-box",maxHeight:"100%",...m.style}})})})});sFe.displayName=zer;var Her="SelectPopperPosition",$ne=Y.forwardRef((a,u)=>{const{__scopeSelect:d,align:f="start",collisionPadding:m=Td,...g}=a,x=u$(d);return D.jsxRuntimeExports.jsx(KM,{...x,...g,ref:u,align:f,collisionPadding:m,style:{boxSizing:"border-box",...g.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});$ne.displayName=Her;var[Ger,Ese]=MS(Gv,{}),Bne="SelectViewport",oFe=Y.forwardRef((a,u)=>{const{__scopeSelect:d,nonce:f,...m}=a,g=Ux(Bne,d),x=Ese(Bne,d),b=Cn(u,g.onViewportChange),v=Y.useRef(0);return D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:f}),D.jsxRuntimeExports.jsx(a$.Slot,{scope:d,children:D.jsxRuntimeExports.jsx(rn.div,{"data-radix-select-viewport":"",role:"presentation",...m,ref:b,style:{position:"relative",flex:1,overflow:"hidden auto",...m.style},onScroll:xr(m.onScroll,_=>{const S=_.currentTarget,{contentWrapper:R,shouldExpandOnScrollRef:w}=x;if(w?.current&&R){const N=Math.abs(v.current-S.scrollTop);if(N>0){const k=window.innerHeight-Td*2,B=parseFloat(R.style.minHeight),P=parseFloat(R.style.height),$=Math.max(B,P);if($<k){const q=$+N,z=Math.min(k,q),W=q-z;R.style.height=z+"px",R.style.bottom==="0px"&&(S.scrollTop=W>0?W:0,R.style.justifyContent="flex-end")}}}v.current=S.scrollTop})})})]})});oFe.displayName=Bne;var aFe="SelectGroup",[Wer,Ver]=MS(aFe),lFe=Y.forwardRef((a,u)=>{const{__scopeSelect:d,...f}=a,m=ic();return D.jsxRuntimeExports.jsx(Wer,{scope:d,id:m,children:D.jsxRuntimeExports.jsx(rn.div,{role:"group","aria-labelledby":m,...f,ref:u})})});lFe.displayName=aFe;var uFe="SelectLabel",Qer=Y.forwardRef((a,u)=>{const{__scopeSelect:d,...f}=a,m=Ver(uFe,d);return D.jsxRuntimeExports.jsx(rn.div,{id:m.id,...f,ref:u})});Qer.displayName=uFe;var ZF="SelectItem",[Yer,cFe]=MS(ZF),dFe=Y.forwardRef((a,u)=>{const{__scopeSelect:d,value:f,disabled:m=!1,textValue:g,...x}=a,b=qx(ZF,d),v=Ux(ZF,d),_=b.value===f,[S,R]=Y.useState(g??""),[w,N]=Y.useState(!1),k=Cn(u,q=>{var z;return(z=v.itemRefCallback)==null?void 0:z.call(v,q,f,m)}),B=ic(),P=Y.useRef("touch"),$=()=>{m||(b.onValueChange(f),b.onOpenChange(!1))};if(f==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return D.jsxRuntimeExports.jsx(Yer,{scope:d,value:f,disabled:m,textId:B,isSelected:_,onItemTextChange:Y.useCallback(q=>{R(z=>z||(q?.textContent??"").trim())},[]),children:D.jsxRuntimeExports.jsx(a$.ItemSlot,{scope:d,value:f,disabled:m,textValue:S,children:D.jsxRuntimeExports.jsx(rn.div,{role:"option","aria-labelledby":B,"data-highlighted":w?"":void 0,"aria-selected":_&&w,"data-state":_?"checked":"unchecked","aria-disabled":m||void 0,"data-disabled":m?"":void 0,tabIndex:m?void 0:-1,...x,ref:k,onFocus:xr(x.onFocus,()=>N(!0)),onBlur:xr(x.onBlur,()=>N(!1)),onClick:xr(x.onClick,()=>{P.current!=="mouse"&&$()}),onPointerUp:xr(x.onPointerUp,()=>{P.current==="mouse"&&$()}),onPointerDown:xr(x.onPointerDown,q=>{P.current=q.pointerType}),onPointerMove:xr(x.onPointerMove,q=>{var z;P.current=q.pointerType,m?(z=v.onItemLeave)==null||z.call(v):P.current==="mouse"&&q.currentTarget.focus({preventScroll:!0})}),onPointerLeave:xr(x.onPointerLeave,q=>{var z;q.currentTarget===document.activeElement&&((z=v.onItemLeave)==null||z.call(v))}),onKeyDown:xr(x.onKeyDown,q=>{var z;((z=v.searchRef)==null?void 0:z.current)!==""&&q.key===" "||(Ier.includes(q.key)&&$(),q.key===" "&&q.preventDefault())})})})})});dFe.displayName=ZF;var i5="SelectItemText",fFe=Y.forwardRef((a,u)=>{const{__scopeSelect:d,className:f,style:m,...g}=a,x=qx(i5,d),b=Ux(i5,d),v=cFe(i5,d),_=Mer(i5,d),[S,R]=Y.useState(null),w=Cn(u,$=>R($),v.onItemTextChange,$=>{var q;return(q=b.itemTextRefCallback)==null?void 0:q.call(b,$,v.value,v.disabled)}),N=S?.textContent,k=Y.useMemo(()=>D.jsxRuntimeExports.jsx("option",{value:v.value,disabled:v.disabled,children:N},v.value),[v.disabled,v.value,N]),{onNativeOptionAdd:B,onNativeOptionRemove:P}=_;return ca(()=>(B(k),()=>P(k)),[B,P,k]),D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx(rn.span,{id:v.textId,...g,ref:w}),v.isSelected&&x.valueNode&&!x.valueNodeHasChildren?RM.createPortal(g.children,x.valueNode):null]})});fFe.displayName=i5;var hFe="SelectItemIndicator",Ker=Y.forwardRef((a,u)=>{const{__scopeSelect:d,...f}=a;return cFe(hFe,d).isSelected?D.jsxRuntimeExports.jsx(rn.span,{"aria-hidden":!0,...f,ref:u}):null});Ker.displayName=hFe;var qne="SelectScrollUpButton",Xer=Y.forwardRef((a,u)=>{const d=Ux(qne,a.__scopeSelect),f=Ese(qne,a.__scopeSelect),[m,g]=Y.useState(!1),x=Cn(u,f.onScrollButtonChange);return ca(()=>{if(d.viewport&&d.isPositioned){let b=function(){const _=v.scrollTop>0;g(_)};const v=d.viewport;return b(),v.addEventListener("scroll",b),()=>v.removeEventListener("scroll",b)}},[d.viewport,d.isPositioned]),m?D.jsxRuntimeExports.jsx(pFe,{...a,ref:x,onAutoScroll:()=>{const{viewport:b,selectedItem:v}=d;b&&v&&(b.scrollTop=b.scrollTop-v.offsetHeight)}}):null});Xer.displayName=qne;var Une="SelectScrollDownButton",Jer=Y.forwardRef((a,u)=>{const d=Ux(Une,a.__scopeSelect),f=Ese(Une,a.__scopeSelect),[m,g]=Y.useState(!1),x=Cn(u,f.onScrollButtonChange);return ca(()=>{if(d.viewport&&d.isPositioned){let b=function(){const _=v.scrollHeight-v.clientHeight,S=Math.ceil(v.scrollTop)<_;g(S)};const v=d.viewport;return b(),v.addEventListener("scroll",b),()=>v.removeEventListener("scroll",b)}},[d.viewport,d.isPositioned]),m?D.jsxRuntimeExports.jsx(pFe,{...a,ref:x,onAutoScroll:()=>{const{viewport:b,selectedItem:v}=d;b&&v&&(b.scrollTop=b.scrollTop+v.offsetHeight)}}):null});Jer.displayName=Une;var pFe=Y.forwardRef((a,u)=>{const{__scopeSelect:d,onAutoScroll:f,...m}=a,g=Ux("SelectScrollButton",d),x=Y.useRef(null),b=l$(d),v=Y.useCallback(()=>{x.current!==null&&(window.clearInterval(x.current),x.current=null)},[]);return Y.useEffect(()=>()=>v(),[v]),ca(()=>{var _;const S=b().find(R=>R.ref.current===document.activeElement);(_=S?.ref.current)==null||_.scrollIntoView({block:"nearest"})},[b]),D.jsxRuntimeExports.jsx(rn.div,{"aria-hidden":!0,...m,ref:u,style:{flexShrink:0,...m.style},onPointerDown:xr(m.onPointerDown,()=>{x.current===null&&(x.current=window.setInterval(f,50))}),onPointerMove:xr(m.onPointerMove,()=>{var _;(_=g.onItemLeave)==null||_.call(g),x.current===null&&(x.current=window.setInterval(f,50))}),onPointerLeave:xr(m.onPointerLeave,()=>{v()})})}),Zer="SelectSeparator",etr=Y.forwardRef((a,u)=>{const{__scopeSelect:d,...f}=a;return D.jsxRuntimeExports.jsx(rn.div,{"aria-hidden":!0,...f,ref:u})});etr.displayName=Zer;var zne="SelectArrow",ttr=Y.forwardRef((a,u)=>{const{__scopeSelect:d,...f}=a,m=u$(d),g=qx(zne,d),x=Ux(zne,d);return g.open&&x.position==="popper"?D.jsxRuntimeExports.jsx(XM,{...m,...f,ref:u}):null});ttr.displayName=zne;function mFe(a){return a===""||a===void 0}var gFe=Y.forwardRef((a,u)=>{const{value:d,...f}=a,m=Y.useRef(null),g=Cn(u,m),x=VZt(d);return Y.useEffect(()=>{const b=m.current,v=window.HTMLSelectElement.prototype,S=Object.getOwnPropertyDescriptor(v,"value").set;if(x!==d&&S){const R=new Event("change",{bubbles:!0});S.call(b,d),b.dispatchEvent(R)}},[x,d]),D.jsxRuntimeExports.jsx(dse,{asChild:!0,children:D.jsxRuntimeExports.jsx("select",{...f,ref:g,defaultValue:d})})});gFe.displayName="BubbleSelect";function xFe(a){const u=Us(a),d=Y.useRef(""),f=Y.useRef(0),m=Y.useCallback(x=>{const b=d.current+x;u(b),function v(_){d.current=_,window.clearTimeout(f.current),_!==""&&(f.current=window.setTimeout(()=>v(""),1e3))}(b)},[u]),g=Y.useCallback(()=>{d.current="",window.clearTimeout(f.current)},[]);return Y.useEffect(()=>()=>window.clearTimeout(f.current),[]),[d,m,g]}function yFe(a,u,d){const m=u.length>1&&Array.from(u).every(_=>_===u[0])?u[0]:u,g=d?a.indexOf(d):-1;let x=rtr(a,Math.max(g,0));m.length===1&&(x=x.filter(_=>_!==d));const v=x.find(_=>_.textValue.toLowerCase().startsWith(m.toLowerCase()));return v!==d?v:void 0}function rtr(a,u){return a.map((d,f)=>a[(u+f)%a.length])}var ntr=Kje,itr=Jje,str=eFe,otr=tFe,atr=rFe,ltr=oFe,utr=lFe,ctr=dFe,dtr=fFe;const ftr="default";function c$({value:a,placeholder:u,size:d=ftr,icon:f,onChange:m,onKeyDown:g,hasClear:x=!1,customStyle:b}){const[v,_]=Y.useState(!1),S=Y.useRef(null),R=k=>{m(k.target.value)},w=()=>{_(!0)},N=k=>{S.current==null||k.relatedTarget!==S.current?_(!1):k.target.focus()};return D.jsxRuntimeExports.jsxs("div",{...Lt.props(MO.main,v&&MO.focused,htr[d],b),children:[f&&D.jsxRuntimeExports.jsx(An,{name:f,color:"secondary"}),D.jsxRuntimeExports.jsx("input",{...Lt.props(Fr.body,MO.input),value:a,placeholder:u,onChange:R,onFocus:w,onBlur:N,onKeyDown:g}),x&&D.jsxRuntimeExports.jsx("button",{...Lt.props(Fr.supporting,MO.actionButton,a===""&&MO.hidden),ref:S,onClick:()=>m(""),tabIndex:0,children:"Clear"})]})}const MO={main:{display:"mly78zum5",alignItems:"mly6s0dn4",justifyContent:"mly1nhvcw1",background:"mlyotlr4g",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,borderRadius:"mlyur7f20",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,border:"mly520xni",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,boxShadow:"mlyk1e6ed",gap:"mly167g77z",rowGap:null,columnGap:null,$$css:!0},focused:{borderColor:"mly1y5yj0f",borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,boxShadow:"mlyg48p7p",$$css:!0},input:{flexGrow:"mly1iyjqo2",height:"mly1qx5ct2",minWidth:"mlygc0pbm",padding:"mly1717udv",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,background:"mly1md70p1",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,borderStyle:"mlyng3xce",borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,outline:"mly1a2a7pz",outlineColor:null,outlineOffset:null,outlineStyle:null,outlineWidth:null,"::placeholder_color":"mly1njml60",$$css:!0},actionButton:{display:"mly3nfvp2",borderWidth:"mlyc342km",borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,background:"mly1md70p1",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,padding:"mly1717udv",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,marginLeft:"mly1iog12x",marginInlineStart:null,marginInlineEnd:null,cursor:"mly1ypdohk",color:"mlykfrnou",$$css:!0},hidden:{visibility:"mlylshs6z",$$css:!0}},htr={default:{padding:"mly153ncpu",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0},compact:{padding:"mlydqdrvq",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0}};function d$({value:a,onChange:u,icon:d,color:f=FS,size:m=vse,items:g,isSearchable:x=!1,customStyle:b}){var v;const[_,S]=Y.useState(""),R=Y.useMemo(()=>_?g.filter(k=>k.label.toLowerCase().includes(_.toLowerCase())):g,[g,_]),w=k=>{u(k)},N=(v=g.find(k=>k.value===a))==null?void 0:v.label;return D.jsxRuntimeExports.jsxs(ntr,{value:a,onValueChange:w,required:!0,children:[D.jsxRuntimeExports.jsxs(itr,{...Lt.props(Cx.main,l5.selectTrigger,xse[f],yse[m],Fr.body,Cx.label,b),children:[d&&D.jsxRuntimeExports.jsx(An,{name:d,customStyle:Cx.icon}),D.jsxRuntimeExports.jsx(str,{asChild:!0,children:D.jsxRuntimeExports.jsx("div",{className:"mlyb3r6kr mlylyipyv",children:N})})]}),D.jsxRuntimeExports.jsx(otr,{children:D.jsxRuntimeExports.jsx(atr,{side:"bottom",position:"popper",sideOffset:4,children:D.jsxRuntimeExports.jsxs(ltr,{className:"mly4pepcl mlyotlr4g mly17fq3gk",children:[x&&D.jsxRuntimeExports.jsx(c$,{value:_,onChange:k=>S(k),placeholder:"Search",size:"compact",icon:"search",hasClear:!0,customStyle:l5.searchInput,onKeyDown:k=>{["ArrowUp","ArrowDown"].includes(k.key)||setTimeout(()=>{k.target.focus()},10)}}),D.jsxRuntimeExports.jsx(fN,{children:D.jsxRuntimeExports.jsx(utr,{className:"mly78zum5 mlydt5ytf mlyuyqlj2 mlyfawy5m mly195vfkc",children:R.map(k=>D.jsxRuntimeExports.jsx(ptr,{value:k.value,selectedValue:a,children:k.label},k.value))})})]})})})]})}function ptr({children:a,value:u,selectedValue:d,...f}){return D.jsxRuntimeExports.jsxs(ctr,{...Lt.props(Fr.body,l5.selectItem),value:u,...f,children:[u===d?D.jsxRuntimeExports.jsx(An,{name:"radioChecked",customStyle:l5.radioChecked}):D.jsxRuntimeExports.jsx(An,{name:"radioUnchecked",customStyle:l5.radioUnchecked}),D.jsxRuntimeExports.jsx(dtr,{children:a})]})}const l5={selectTrigger:{whiteSpace:"mlyuxw1ft",overflow:"mlyb3r6kr",overflowX:null,overflowY:null,textOverflow:"mlylyipyv",$$css:!0},selectItem:{display:"mly78zum5",alignItems:"mly6s0dn4",padding:"mlydqdrvq",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,gap:"mly167g77z",rowGap:null,columnGap:null,borderRadius:"mlyur7f20",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,cursor:"mly1ypdohk",outline:"mly1a2a7pz",outlineColor:null,outlineOffset:null,outlineStyle:null,outlineWidth:null,":is([data-highlighted])_background":"mly1bw6wve",":is([data-highlighted])_backgroundAttachment":null,":is([data-highlighted])_backgroundClip":null,":is([data-highlighted])_backgroundColor":null,":is([data-highlighted])_backgroundImage":null,":is([data-highlighted])_backgroundOrigin":null,":is([data-highlighted])_backgroundPosition":null,":is([data-highlighted])_backgroundPositionX":null,":is([data-highlighted])_backgroundPositionY":null,":is([data-highlighted])_backgroundRepeat":null,":is([data-highlighted])_backgroundSize":null,':is([data-state="checked"])_background':"mlyamyxth mlyejs3c0",':is([data-state="checked"])_backgroundAttachment':null,':is([data-state="checked"])_backgroundClip':null,':is([data-state="checked"])_backgroundColor':null,':is([data-state="checked"])_backgroundImage':null,':is([data-state="checked"])_backgroundOrigin':null,':is([data-state="checked"])_backgroundPosition':null,':is([data-state="checked"])_backgroundPositionX':null,':is([data-state="checked"])_backgroundPositionY':null,':is([data-state="checked"])_backgroundRepeat':null,':is([data-state="checked"])_backgroundSize':null,$$css:!0},radioChecked:{color:"mlykfrnou",$$css:!0},radioUnchecked:{color:"mlyj5j7qc",$$css:!0},searchInput:{borderRadius:"mly4pepcl",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,$$css:!0}};function mtr({header:a,children:u,customStyle:d}){return D.jsxRuntimeExports.jsxs("div",{...Lt.props(gtr.container,d),children:[D.jsxRuntimeExports.jsx("div",{className:"mly1717udv",children:a}),D.jsxRuntimeExports.jsx("div",{className:"mly1y1aw1k mly1iyjqo2 mly78zum5",children:u})]})}const gtr={container:{display:"mly78zum5",flexDirection:"mlydt5ytf",background:"mly17eh757",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,borderRadius:"mly4pepcl",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,borderStyle:"mly1y0btm7",borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderWidth:"mlymkeg23",borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderColor:"mly17v018m",borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,padding:"mlyc7ga6q",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,flexShrink:"mly2lah0s",$$css:!0}};function _se({title:a,children:u,icon:d,defaultOpen:f=!0,controls:m,collapsedControls:g,isFocused:x=!1}){const[b,v]=Pe.useState(f);return D.jsxRuntimeExports.jsxs("div",{...{0:{className:"mlygbc89k mly1sxf85j mly1717udv"},1:{className:"mly1sxf85j mly1717udv mlybwr872"}}[!!x<<0],children:[D.jsxRuntimeExports.jsxs("div",{className:"mlyrvj5dj mly1mt1orb mly52fmzj mlylqzeqv mlyfawy5m mly167g77z mly6s0dn4",children:[D.jsxRuntimeExports.jsxs("div",{className:"mlyrvj5dj mly1mt1orb mlylqzeqv mly6s0dn4 mly167g77z",children:[d&&D.jsxRuntimeExports.jsx(An,{name:d,customStyle:xtr.icon}),D.jsxRuntimeExports.jsx("div",{className:"mlyuxw1ft mlyb3r6kr mlylyipyv mlyehqz9p mly1ghz6dp mly117nqv4",children:a})]}),D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5",children:[b?D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mly6s0dn4 mly1jnr06f",children:m}):D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mly6s0dn4 mly1jnr06f",children:g}),D.jsxRuntimeExports.jsx($i,{variant:"flat",size:"compact",onClick:()=>v(!b),icon:b?"chevronDown":"chevronRight",tooltip:b?"Collapse":"Expand"})]})]}),D.jsxRuntimeExports.jsx("div",{...{0:{className:"mly1l4tkcb"},1:{className:"mly1l4tkcb mly1s85apg"}}[!b<<0],children:u})]})}const xtr={icon:{$$css:!0}};function ytr({label:a,sublabel:u,children:d,isInitiallyExpanded:f=!1}){const[m,g]=Y.useState(f),x=()=>{g(b=>!b)};return D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsxs("div",{className:"mlyrvj5dj mly1mt1orb mly6s0dn4 mlylqzeqv mlye8ttls mly167g77z mlyur7f20 mly1ypdohk mly1haqvef",onClick:x,children:[m?D.jsxRuntimeExports.jsx(An,{name:"chevronDown",color:"secondary"}):D.jsxRuntimeExports.jsx(An,{name:"chevronRight",color:"secondary"}),D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mly1iyjqo2 mlyb3r6kr",children:[D.jsxRuntimeExports.jsx("span",{...Lt.props(Fr.body,kLe.label),children:a}),u&&D.jsxRuntimeExports.jsx("span",{...Lt.props(Fr.supporting,kLe.sublabel),children:u})]})]}),m&&D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mlydt5ytf mly92jh8x mly1jnr06f",children:Y.Children.map(d,b=>b)})]})}const kLe={label:{flexGrow:"mly1iyjqo2",fontWeight:"mly1xlr1w8",overflow:"mlyb3r6kr",overflowX:null,overflowY:null,textOverflow:"mlylyipyv",$$css:!0},sublabel:{flexGrow:"mly1iyjqo2",color:"mly9dwj6z",overflow:"mlyb3r6kr",overflowX:null,overflowY:null,textOverflow:"mlylyipyv",$$css:!0}},vtr={scopeName:"source.malloy",patterns:[{include:"#malloy-language"}],repository:{"malloy-language":{patterns:[{include:"#sql-string"},{include:"#comments"},{include:"#tags"},{include:"#strings"},{include:"#numbers"},{include:"#keywords"},{include:"#properties"},{include:"#functions"},{include:"#datetimes"},{include:"#identifiers-quoted"},{include:"#types"},{include:"#constants"},{include:"#timeframes"},{include:"#identifiers-unquoted"}]},"malloy-matched":{begin:"{",end:"}",patterns:[{include:"#malloy-matched"},{include:"#malloy-language"}]},"malloy-in-sql":{begin:"%{",name:"source.malloy-in-sql",end:"}%?",patterns:[{include:"#malloy-matched"},{include:"#malloy-language"}]},"sql-string":{patterns:[{begin:'(\\b[A-Za-z_][A-Za-z_0-9]*)(\\s*\\.\\s*)(sql)(\\s*\\(\\s*)(""")',end:'"""',beginCaptures:{1:{name:"variable.other"},3:{name:"keyword.control.sql"},5:{name:"punctuation.sql-block.open"}},endCaptures:{0:{name:"punctuation.sql-block.close"}},name:"source.sql",patterns:[{include:"#malloy-in-sql"},{include:"source.sql"}]}]},functions:{patterns:[{match:"(?i)\\b(count)(\\s*\\()(distinct)",captures:{1:{name:"entity.name.function"},3:{name:"entity.name.function.modifier"}}},{match:"(?i)\\b(AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE|UNGROUPED)(\\s*\\()",captures:{1:{name:"entity.name.function"}}},{match:"(?i)\\b([a-zA-Z_][a-zA-Z_0-9]*)(\\s*\\()",captures:{1:{name:"entity.name.function"}}},{match:"(?i)\\b([a-zA-Z_][a-zA-Z_0-9]*)(!)(timestamp|number|string|boolean|date)?(\\s*\\()",captures:{1:{name:"entity.name.function"},3:{name:"entity.name.type"}}}]},datetimes:{patterns:[{match:"(?i)@[0-9]{4}-[0-9]{2}-[0-9]{2}[ T][0-9]{2}:[0-9]{2}((:[0-9]{2})(([\\.,][0-9]+)(\\[[A-Za-z_/]+\\])?)?)?",name:"constant.numeric.timestamp"},{match:"(?i)@[0-9]{4}(-Q[1-4]|-[0-9]{2}(-[0-9]{2}(-WK)?)?)?",name:"constant.numeric.date"}]},"identifiers-quoted":{patterns:[{match:"`[^`]*`",name:"variable.other.quoted"}]},"identifiers-unquoted":{patterns:[{match:"(?i)\\b[A-Za-z_][A-Za-z_0-9]*\\b",name:"variable.other"}]},timeframes:{patterns:[{match:"(?i)\\b((year|quarter|month|week|day|hour|minute|second)s?)\\b",name:"keyword.other.timeframe"},{match:"(?i)\\b(day_of_year|day_of_month)\\b",name:"keyword.other.timeframe"}]},comments:{patterns:[{begin:"/\\*",end:"\\*/",beginCaptures:{0:{name:"punctuation.definition.comment.begin"}},endCaptures:{0:{name:"punctuation.definition.comment.end"}},name:"comment.block"},{begin:"//",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-slash"},{begin:"--",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-hyphen"}]},tags:{patterns:[{match:"##\\n",name:"string.quoted",captures:{0:{name:"string.quoted"}}},{begin:'#"',end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-slash"},{match:"#\\n",name:"string.quoted",captures:{0:{name:"string.quoted"}}},{begin:"#\\s",end:"\\n",beginCaptures:{0:{name:"support.type.property-name.json"}},name:"comment.line.double-slash",patterns:[{include:"#tag-values"}]},{begin:"##\\s",end:"\\n",beginCaptures:{0:{name:"support.type.property-name.json"}},name:"comment.line.double-slash",patterns:[{include:"#tag-values"}]},{begin:"#",end:"\\n",beginCaptures:{0:{name:"string.quoted"}},name:"string.quoted"}],repository:{"tag-values":{name:"support.type.property-name.json",match:'(-)?((?:[^\\s=#]+)|(?:"[^#]+"))(?:\\s*(=)\\s*((?:[^\\s=#]+)|(?:"[^#]+")))?',captures:{1:{name:"keyword.control.negate"},2:{name:"support.type.property-name.json"},3:{name:"keyword.operator.comparison.ts"},4:{name:"string.quoted"}}}}},strings:{patterns:[{begin:"'",end:"'",beginCaptures:{0:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},name:"string.quoted.single",patterns:[{include:"#escapes"}]},{begin:'"',end:'"',beginCaptures:{0:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},name:"string.quoted.double",patterns:[{include:"#escapes"}]},{begin:'"""',end:'"""',beginCaptures:{0:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},name:"string.quoted.triple"},{begin:"(?i)[r|/]'",end:"'",name:"string.regexp",patterns:[{include:"#regex-escapes"}]}],repository:{escapes:{name:"constant.character.escape",match:"\\\\(u[A-Fa-f0-9]{4}|.)",captures:{0:{name:"constant.character.escape"}}},"regex-escapes":{name:"constant.character.escape",match:"\\\\.",captures:{0:{name:"constant.character.escape"}}}}},numbers:{match:"(?i)(\\b((0|[1-9][0-9]*)(E[+-]?[0-9]+|\\.[0-9]*)?)|\\.[0-9]+)",name:"constant.numeric"},constants:{patterns:[{match:"(?i)\\bnull\\b",name:"constant.language.null"},{match:"(?i)\\btrue\\b",name:"constant.language.true"},{match:"(?i)\\bfalse\\b",name:"constant.language.false"}]},types:{patterns:[{match:"(?i)\\bstring\\b",name:"entity.name.type.string"},{match:"(?i)\\bnumber\\b",name:"entity.name.type.number"},{match:"(?i)\\bdate\\b",name:"entity.name.type.date"},{match:"(?i)\\btimestamp\\b",name:"entity.name.type.timestamp"},{match:"(?i)\\bboolean\\b",name:"entity.name.type.boolean"}]},properties:{patterns:[{match:"(?i)\\baccept\\b",name:"keyword.control.accept"},{match:"(?i)\\bselect\\b",name:"keyword.control.select"},{match:"(?i)\\bconnection\\b",name:"keyword.control.connection"},{match:"(?i)\\brun\\b",name:"keyword.control.run"},{match:"(?i)\\bextend\\b",name:"keyword.control.extend"},{match:"(?i)\\brefine\\b",name:"keyword.control.refine"},{match:"(?i)\\baggregate\\b",name:"keyword.control.aggregate"},{match:"(?i)\\bsample\\b",name:"keyword.control.sample"},{match:"(?i)\\bcalculate\\b",name:"keyword.control.calculate"},{match:"(?i)\\btimezone\\b",name:"keyword.control.timezone"},{match:"(?i)\\bdimension\\b",name:"keyword.control.dimension"},{match:"(?i)\\bexcept\\b",name:"keyword.control.except"},{match:"(?i)\\bsource\\b",name:"keyword.control.source"},{match:"(?i)\\bgroup_by\\b",name:"keyword.control.group_by"},{match:"(?i)\\bhaving\\b",name:"keyword.control.having"},{match:"(?i)\\bindex\\b",name:"keyword.control.index"},{match:"(?i)\\bjoin_one\\b",name:"keyword.control.join_one"},{match:"(?i)\\bwith\\b",name:"keyword.control.with"},{match:"(?i)\\bjoin_many\\b",name:"keyword.control.join_many"},{match:"(?i)\\bjoin_cross\\b",name:"keyword.control.join_cross"},{match:"(?i)\\blimit\\b",name:"keyword.control.limit"},{match:"(?i)\\bmeasure\\b",name:"keyword.control.measure"},{match:"(?i)\\bnest\\b",name:"keyword.control.nest"},{match:"(?i)\\border_by\\b",name:"keyword.control.order_by"},{match:"(?i)\\bpartition_by\\b",name:"keyword.control.partition_by"},{match:"(?i)\\bprimary_key\\b",name:"keyword.control.primary_key"},{match:"(?i)\\bproject\\b",name:"keyword.control.project"},{match:"(?i)\\bquery\\b",name:"keyword.control.query"},{match:"(?i)\\brename\\b",name:"keyword.control.rename"},{match:"(?i)\\btop\\b",name:"keyword.control.top"},{match:"(?i)\\bview\\b",name:"keyword.control.view"},{match:"(?i)\\bwhere\\b",name:"keyword.control.where"},{match:"(?i)\\bdeclare\\b",name:"keyword.control.declare"}]},keywords:{patterns:[{match:"(?i)\\bis\\b",name:"keyword.control.is"},{match:"(?i)\\bon\\b",name:"keyword.control.on"},{match:"(?i)\\bnot\\b",name:"keyword.other.not"},{match:"(?i)\\bor\\b",name:"keyword.other.or"},{match:"(?i)\\bdesc\\b",name:"keyword.control.desc"},{match:"(?i)\\bby\\b",name:"keyword.control.by"},{match:"(?i)\\band\\b",name:"keyword.other.and"},{match:"(?i)\\basc\\b",name:"keyword.control.asc"},{match:"(?i)\\bfor\\b",name:"keyword.other.for"},{match:"(?i)\\belse\\b",name:"keyword.other.else"},{match:"(?i)\\bto\\b",name:"keyword.other.to"},{match:"(?i)\\bwhen\\b",name:"keyword.other.when"},{match:"(?i)\\bpick\\b",name:"keyword.other.pick"},{match:"(?i)\\bimport\\b",name:"keyword.control.import"}]}}},btr={single:"1em",double:"2em"},Etr=({lineSpacing:a})=>({line(u){const d=[...Array.isArray(u.properties.style)?u.properties.style:typeof u.properties.style=="string"?[u.properties.style]:[]];d.push(`line-height: ${btr[a]};`),u.properties.style=d}}),_tr=({showLineNumbers:a})=>{if(a)return{line(u,d){const f={type:"element",tagName:"span",children:[{type:"text",value:`${d}`}],properties:{style:["color: rgba(115, 138, 148, 0.4);","margin-right: 35px;","width: 1px;","display: inline-block;","user-select: none"]}};u.children.unshift(f)}}},Str=[Etr,_tr];function Atr(a){return Str.map(u=>u(a)).filter(u=>u!==void 0)}let la=class extends Error{constructor(u){super(u),this.name="ShikiError"}};function Ctr(a){return Sse(a)}function Sse(a){return Array.isArray(a)?Rtr(a):a instanceof RegExp?a:typeof a=="object"?Ttr(a):a}function Rtr(a){let u=[];for(let d=0,f=a.length;d<f;d++)u[d]=Sse(a[d]);return u}function Ttr(a){let u={};for(let d in a)u[d]=Sse(a[d]);return u}function vFe(a,...u){return u.forEach(d=>{for(let f in d)a[f]=d[f]}),a}function bFe(a){const u=~a.lastIndexOf("/")||~a.lastIndexOf("\\");return u===0?a:~u===a.length-1?bFe(a.substring(0,a.length-1)):a.substr(~u+1)}var Lre=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Yj=class{static hasCaptures(a){return a===null?!1:(Lre.lastIndex=0,Lre.test(a))}static replaceCaptures(a,u,d){return a.replace(Lre,(f,m,g,x)=>{let b=d[parseInt(m||g,10)];if(b){let v=u.substring(b.start,b.end);for(;v[0]===".";)v=v.substring(1);switch(x){case"downcase":return v.toLowerCase();case"upcase":return v.toUpperCase();default:return v}}else return f})}};function EFe(a,u){return a<u?-1:a>u?1:0}function _Fe(a,u){if(a===null&&u===null)return 0;if(!a)return-1;if(!u)return 1;let d=a.length,f=u.length;if(d===f){for(let m=0;m<d;m++){let g=EFe(a[m],u[m]);if(g!==0)return g}return 0}return d-f}function LLe(a){return!!(/^#[0-9a-f]{6}$/i.test(a)||/^#[0-9a-f]{8}$/i.test(a)||/^#[0-9a-f]{3}$/i.test(a)||/^#[0-9a-f]{4}$/i.test(a))}function SFe(a){return a.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var AFe=class{constructor(a){Ht(this,"cache",new Map),this.fn=a}get(a){if(this.cache.has(a))return this.cache.get(a);const u=this.fn(a);return this.cache.set(a,u),u}},eM=class{constructor(a,u,d){Ht(this,"_cachedMatchRoot",new AFe(f=>this._root.match(f))),this._colorMap=a,this._defaults=u,this._root=d}static createFromRawTheme(a,u){return this.createFromParsedTheme(Ntr(a),u)}static createFromParsedTheme(a,u){return ktr(a,u)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(a){if(a===null)return this._defaults;const u=a.scopeName,f=this._cachedMatchRoot.get(u).find(m=>wtr(a.parent,m.parentScopes));return f?new CFe(f.fontStyle,f.foreground,f.background):null}},Ire=class RF{constructor(u,d){this.parent=u,this.scopeName=d}static push(u,d){for(const f of d)u=new RF(u,f);return u}static from(...u){let d=null;for(let f=0;f<u.length;f++)d=new RF(d,u[f]);return d}push(u){return new RF(this,u)}getSegments(){let u=this;const d=[];for(;u;)d.push(u.scopeName),u=u.parent;return d.reverse(),d}toString(){return this.getSegments().join(" ")}extends(u){return this===u?!0:this.parent===null?!1:this.parent.extends(u)}getExtensionIfDefined(u){const d=[];let f=this;for(;f&&f!==u;)d.push(f.scopeName),f=f.parent;return f===u?d.reverse():void 0}};function wtr(a,u){if(u.length===0)return!0;for(let d=0;d<u.length;d++){let f=u[d],m=!1;if(f===">"){if(d===u.length-1)return!1;f=u[++d],m=!0}for(;a&&!Otr(a.scopeName,f);){if(m)return!1;a=a.parent}if(!a)return!1;a=a.parent}return!0}function Otr(a,u){return u===a||a.startsWith(u)&&a[u.length]==="."}var CFe=class{constructor(a,u,d){this.fontStyle=a,this.foregroundId=u,this.backgroundId=d}};function Ntr(a){if(!a)return[];if(!a.settings||!Array.isArray(a.settings))return[];let u=a.settings,d=[],f=0;for(let m=0,g=u.length;m<g;m++){let x=u[m];if(!x.settings)continue;let b;if(typeof x.scope=="string"){let R=x.scope;R=R.replace(/^[,]+/,""),R=R.replace(/[,]+$/,""),b=R.split(",")}else Array.isArray(x.scope)?b=x.scope:b=[""];let v=-1;if(typeof x.settings.fontStyle=="string"){v=0;let R=x.settings.fontStyle.split(" ");for(let w=0,N=R.length;w<N;w++)switch(R[w]){case"italic":v=v|1;break;case"bold":v=v|2;break;case"underline":v=v|4;break;case"strikethrough":v=v|8;break}}let _=null;typeof x.settings.foreground=="string"&&LLe(x.settings.foreground)&&(_=x.settings.foreground);let S=null;typeof x.settings.background=="string"&&LLe(x.settings.background)&&(S=x.settings.background);for(let R=0,w=b.length;R<w;R++){let k=b[R].trim().split(" "),B=k[k.length-1],P=null;k.length>1&&(P=k.slice(0,k.length-1),P.reverse()),d[f++]=new Dtr(B,P,m,v,_,S)}}return d}var Dtr=class{constructor(a,u,d,f,m,g){this.scope=a,this.parentScopes=u,this.index=d,this.fontStyle=f,this.foreground=m,this.background=g}},o0=(a=>(a[a.NotSet=-1]="NotSet",a[a.None=0]="None",a[a.Italic=1]="Italic",a[a.Bold=2]="Bold",a[a.Underline=4]="Underline",a[a.Strikethrough=8]="Strikethrough",a))(o0||{});function ktr(a,u){a.sort((v,_)=>{let S=EFe(v.scope,_.scope);return S!==0||(S=_Fe(v.parentScopes,_.parentScopes),S!==0)?S:v.index-_.index});let d=0,f="#000000",m="#ffffff";for(;a.length>=1&&a[0].scope==="";){let v=a.shift();v.fontStyle!==-1&&(d=v.fontStyle),v.foreground!==null&&(f=v.foreground),v.background!==null&&(m=v.background)}let g=new Ltr(u),x=new CFe(d,g.getId(f),g.getId(m)),b=new Ptr(new Hne(0,null,-1,0,0),[]);for(let v=0,_=a.length;v<_;v++){let S=a[v];b.insert(0,S.scope,S.parentScopes,S.fontStyle,g.getId(S.foreground),g.getId(S.background))}return new eM(g,x,b)}var Ltr=class{constructor(a){if(Ht(this,"_isFrozen"),Ht(this,"_lastColorId"),Ht(this,"_id2color"),Ht(this,"_color2id"),this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(a)){this._isFrozen=!0;for(let u=0,d=a.length;u<d;u++)this._color2id[a[u]]=u,this._id2color[u]=a[u]}else this._isFrozen=!1}getId(a){if(a===null)return 0;a=a.toUpperCase();let u=this._color2id[a];if(u)return u;if(this._isFrozen)throw new Error(`Missing color in color map - ${a}`);return u=++this._lastColorId,this._color2id[a]=u,this._id2color[u]=a,u}getColorMap(){return this._id2color.slice(0)}},Itr=Object.freeze([]),Hne=class RFe{constructor(u,d,f,m,g){Ht(this,"scopeDepth"),Ht(this,"parentScopes"),Ht(this,"fontStyle"),Ht(this,"foreground"),Ht(this,"background"),this.scopeDepth=u,this.parentScopes=d||Itr,this.fontStyle=f,this.foreground=m,this.background=g}clone(){return new RFe(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(u){let d=[];for(let f=0,m=u.length;f<m;f++)d[f]=u[f].clone();return d}acceptOverwrite(u,d,f,m){this.scopeDepth>u?console.log("how did this happen?"):this.scopeDepth=u,d!==-1&&(this.fontStyle=d),f!==0&&(this.foreground=f),m!==0&&(this.background=m)}},Ptr=class Gne{constructor(u,d=[],f={}){Ht(this,"_rulesWithParentScopes"),this._mainRule=u,this._children=f,this._rulesWithParentScopes=d}static _cmpBySpecificity(u,d){if(u.scopeDepth!==d.scopeDepth)return d.scopeDepth-u.scopeDepth;let f=0,m=0;for(;u.parentScopes[f]===">"&&f++,d.parentScopes[m]===">"&&m++,!(f>=u.parentScopes.length||m>=d.parentScopes.length);){const g=d.parentScopes[m].length-u.parentScopes[f].length;if(g!==0)return g;f++,m++}return d.parentScopes.length-u.parentScopes.length}match(u){if(u!==""){let f=u.indexOf("."),m,g;if(f===-1?(m=u,g=""):(m=u.substring(0,f),g=u.substring(f+1)),this._children.hasOwnProperty(m))return this._children[m].match(g)}const d=this._rulesWithParentScopes.concat(this._mainRule);return d.sort(Gne._cmpBySpecificity),d}insert(u,d,f,m,g,x){if(d===""){this._doInsertHere(u,f,m,g,x);return}let b=d.indexOf("."),v,_;b===-1?(v=d,_=""):(v=d.substring(0,b),_=d.substring(b+1));let S;this._children.hasOwnProperty(v)?S=this._children[v]:(S=new Gne(this._mainRule.clone(),Hne.cloneArr(this._rulesWithParentScopes)),this._children[v]=S),S.insert(u+1,_,f,m,g,x)}_doInsertHere(u,d,f,m,g){if(d===null){this._mainRule.acceptOverwrite(u,f,m,g);return}for(let x=0,b=this._rulesWithParentScopes.length;x<b;x++){let v=this._rulesWithParentScopes[x];if(_Fe(v.parentScopes,d)===0){v.acceptOverwrite(u,f,m,g);return}}f===-1&&(f=this._mainRule.fontStyle),m===0&&(m=this._mainRule.foreground),g===0&&(g=this._mainRule.background),this._rulesWithParentScopes.push(new Hne(u,d,f,m,g))}},lS=class Ju{static toBinaryStr(u){return u.toString(2).padStart(32,"0")}static print(u){const d=Ju.getLanguageId(u),f=Ju.getTokenType(u),m=Ju.getFontStyle(u),g=Ju.getForeground(u),x=Ju.getBackground(u);console.log({languageId:d,tokenType:f,fontStyle:m,foreground:g,background:x})}static getLanguageId(u){return(u&255)>>>0}static getTokenType(u){return(u&768)>>>8}static containsBalancedBrackets(u){return(u&1024)!==0}static getFontStyle(u){return(u&30720)>>>11}static getForeground(u){return(u&16744448)>>>15}static getBackground(u){return(u&4278190080)>>>24}static set(u,d,f,m,g,x,b){let v=Ju.getLanguageId(u),_=Ju.getTokenType(u),S=Ju.containsBalancedBrackets(u)?1:0,R=Ju.getFontStyle(u),w=Ju.getForeground(u),N=Ju.getBackground(u);return d!==0&&(v=d),f!==8&&(_=f),m!==null&&(S=m?1:0),g!==-1&&(R=g),x!==0&&(w=x),b!==0&&(N=b),(v<<0|_<<8|S<<10|R<<11|w<<15|N<<24)>>>0}};function tM(a,u){const d=[],f=jtr(a);let m=f.next();for(;m!==null;){let v=0;if(m.length===2&&m.charAt(1)===":"){switch(m.charAt(0)){case"R":v=1;break;case"L":v=-1;break;default:console.log(`Unknown priority ${m} in scope selector`)}m=f.next()}let _=x();if(d.push({matcher:_,priority:v}),m!==",")break;m=f.next()}return d;function g(){if(m==="-"){m=f.next();const v=g();return _=>!!v&&!v(_)}if(m==="("){m=f.next();const v=b();return m===")"&&(m=f.next()),v}if(ILe(m)){const v=[];do v.push(m),m=f.next();while(ILe(m));return _=>u(v,_)}return null}function x(){const v=[];let _=g();for(;_;)v.push(_),_=g();return S=>v.every(R=>R(S))}function b(){const v=[];let _=x();for(;_&&(v.push(_),m==="|"||m===",");){do m=f.next();while(m==="|"||m===",");_=x()}return S=>v.some(R=>R(S))}}function ILe(a){return!!a&&!!a.match(/[\w\.:]+/)}function jtr(a){let u=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,d=u.exec(a);return{next:()=>{if(!d)return null;const f=d[0];return d=u.exec(a),f}}}function TFe(a){typeof a.dispose=="function"&&a.dispose()}var T5=class{constructor(a){this.scopeName=a}toKey(){return this.scopeName}},Ftr=class{constructor(a,u){this.scopeName=a,this.ruleName=u}toKey(){return`${this.scopeName}#${this.ruleName}`}},Mtr=class{constructor(){Ht(this,"_references",[]),Ht(this,"_seenReferenceKeys",new Set),Ht(this,"visitedRule",new Set)}get references(){return this._references}add(a){const u=a.toKey();this._seenReferenceKeys.has(u)||(this._seenReferenceKeys.add(u),this._references.push(a))}},$tr=class{constructor(a,u){Ht(this,"seenFullScopeRequests",new Set),Ht(this,"seenPartialScopeRequests",new Set),Ht(this,"Q"),this.repo=a,this.initialScopeName=u,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new T5(this.initialScopeName)]}processQueue(){const a=this.Q;this.Q=[];const u=new Mtr;for(const d of a)Btr(d,this.initialScopeName,this.repo,u);for(const d of u.references)if(d instanceof T5){if(this.seenFullScopeRequests.has(d.scopeName))continue;this.seenFullScopeRequests.add(d.scopeName),this.Q.push(d)}else{if(this.seenFullScopeRequests.has(d.scopeName)||this.seenPartialScopeRequests.has(d.toKey()))continue;this.seenPartialScopeRequests.add(d.toKey()),this.Q.push(d)}}};function Btr(a,u,d,f){const m=d.lookup(a.scopeName);if(!m){if(a.scopeName===u)throw new Error(`No grammar provided for <${u}>`);return}const g=d.lookup(u);a instanceof T5?TF({baseGrammar:g,selfGrammar:m},f):Wne(a.ruleName,{baseGrammar:g,selfGrammar:m,repository:m.repository},f);const x=d.injections(a.scopeName);if(x)for(const b of x)f.add(new T5(b))}function Wne(a,u,d){if(u.repository&&u.repository[a]){const f=u.repository[a];rM([f],u,d)}}function TF(a,u){a.selfGrammar.patterns&&Array.isArray(a.selfGrammar.patterns)&&rM(a.selfGrammar.patterns,{...a,repository:a.selfGrammar.repository},u),a.selfGrammar.injections&&rM(Object.values(a.selfGrammar.injections),{...a,repository:a.selfGrammar.repository},u)}function rM(a,u,d){for(const f of a){if(d.visitedRule.has(f))continue;d.visitedRule.add(f);const m=f.repository?vFe({},u.repository,f.repository):u.repository;Array.isArray(f.patterns)&&rM(f.patterns,{...u,repository:m},d);const g=f.include;if(!g)continue;const x=wFe(g);switch(x.kind){case 0:TF({...u,selfGrammar:u.baseGrammar},d);break;case 1:TF(u,d);break;case 2:Wne(x.ruleName,{...u,repository:m},d);break;case 3:case 4:const b=x.scopeName===u.selfGrammar.scopeName?u.selfGrammar:x.scopeName===u.baseGrammar.scopeName?u.baseGrammar:void 0;if(b){const v={baseGrammar:u.baseGrammar,selfGrammar:b,repository:m};x.kind===4?Wne(x.ruleName,v,d):TF(v,d)}else x.kind===4?d.add(new Ftr(x.scopeName,x.ruleName)):d.add(new T5(x.scopeName));break}}}var qtr=class{constructor(){Ht(this,"kind",0)}},Utr=class{constructor(){Ht(this,"kind",1)}},ztr=class{constructor(a){Ht(this,"kind",2),this.ruleName=a}},Htr=class{constructor(a){Ht(this,"kind",3),this.scopeName=a}},Gtr=class{constructor(a,u){Ht(this,"kind",4),this.scopeName=a,this.ruleName=u}};function wFe(a){if(a==="$base")return new qtr;if(a==="$self")return new Utr;const u=a.indexOf("#");if(u===-1)return new Htr(a);if(u===0)return new ztr(a.substring(1));{const d=a.substring(0,u),f=a.substring(u+1);return new Gtr(d,f)}}var Wtr=/\\(\d+)/,PLe=/\\(\d+)/g,Vtr=-1,OFe=-2;var xN=class{constructor(a,u,d,f){Ht(this,"$location"),Ht(this,"id"),Ht(this,"_nameIsCapturing"),Ht(this,"_name"),Ht(this,"_contentNameIsCapturing"),Ht(this,"_contentName"),this.$location=a,this.id=u,this._name=d||null,this._nameIsCapturing=Yj.hasCaptures(this._name),this._contentName=f||null,this._contentNameIsCapturing=Yj.hasCaptures(this._contentName)}get debugName(){const a=this.$location?`${bFe(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${a}`}getName(a,u){return!this._nameIsCapturing||this._name===null||a===null||u===null?this._name:Yj.replaceCaptures(this._name,a,u)}getContentName(a,u){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Yj.replaceCaptures(this._contentName,a,u)}},Qtr=class extends xN{constructor(a,u,d,f,m){super(a,u,d,f),Ht(this,"retokenizeCapturedWithRuleId"),this.retokenizeCapturedWithRuleId=m}dispose(){}collectPatterns(a,u){throw new Error("Not supported!")}compile(a,u){throw new Error("Not supported!")}compileAG(a,u,d,f){throw new Error("Not supported!")}},Ytr=class extends xN{constructor(a,u,d,f,m){super(a,u,d,null),Ht(this,"_match"),Ht(this,"captures"),Ht(this,"_cachedCompiledPatterns"),this._match=new w5(f,this.id),this.captures=m,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(a,u){u.push(this._match)}compile(a,u){return this._getCachedCompiledPatterns(a).compile(a)}compileAG(a,u,d,f){return this._getCachedCompiledPatterns(a).compileAG(a,d,f)}_getCachedCompiledPatterns(a){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new O5,this.collectPatterns(a,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},jLe=class extends xN{constructor(a,u,d,f,m){super(a,u,d,f),Ht(this,"hasMissingPatterns"),Ht(this,"patterns"),Ht(this,"_cachedCompiledPatterns"),this.patterns=m.patterns,this.hasMissingPatterns=m.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(a,u){for(const d of this.patterns)a.getRule(d).collectPatterns(a,u)}compile(a,u){return this._getCachedCompiledPatterns(a).compile(a)}compileAG(a,u,d,f){return this._getCachedCompiledPatterns(a).compileAG(a,d,f)}_getCachedCompiledPatterns(a){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new O5,this.collectPatterns(a,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Vne=class extends xN{constructor(a,u,d,f,m,g,x,b,v,_){super(a,u,d,f),Ht(this,"_begin"),Ht(this,"beginCaptures"),Ht(this,"_end"),Ht(this,"endHasBackReferences"),Ht(this,"endCaptures"),Ht(this,"applyEndPatternLast"),Ht(this,"hasMissingPatterns"),Ht(this,"patterns"),Ht(this,"_cachedCompiledPatterns"),this._begin=new w5(m,this.id),this.beginCaptures=g,this._end=new w5(x||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=b,this.applyEndPatternLast=v||!1,this.patterns=_.patterns,this.hasMissingPatterns=_.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(a,u){return this._end.resolveBackReferences(a,u)}collectPatterns(a,u){u.push(this._begin)}compile(a,u){return this._getCachedCompiledPatterns(a,u).compile(a)}compileAG(a,u,d,f){return this._getCachedCompiledPatterns(a,u).compileAG(a,d,f)}_getCachedCompiledPatterns(a,u){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new O5;for(const d of this.patterns)a.getRule(d).collectPatterns(a,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,u):this._cachedCompiledPatterns.setSource(0,u)),this._cachedCompiledPatterns}},nM=class extends xN{constructor(a,u,d,f,m,g,x,b,v){super(a,u,d,f),Ht(this,"_begin"),Ht(this,"beginCaptures"),Ht(this,"whileCaptures"),Ht(this,"_while"),Ht(this,"whileHasBackReferences"),Ht(this,"hasMissingPatterns"),Ht(this,"patterns"),Ht(this,"_cachedCompiledPatterns"),Ht(this,"_cachedCompiledWhilePatterns"),this._begin=new w5(m,this.id),this.beginCaptures=g,this.whileCaptures=b,this._while=new w5(x,OFe),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=v.patterns,this.hasMissingPatterns=v.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(a,u){return this._while.resolveBackReferences(a,u)}collectPatterns(a,u){u.push(this._begin)}compile(a,u){return this._getCachedCompiledPatterns(a).compile(a)}compileAG(a,u,d,f){return this._getCachedCompiledPatterns(a).compileAG(a,d,f)}_getCachedCompiledPatterns(a){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new O5;for(const u of this.patterns)a.getRule(u).collectPatterns(a,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(a,u){return this._getCachedCompiledWhilePatterns(a,u).compile(a)}compileWhileAG(a,u,d,f){return this._getCachedCompiledWhilePatterns(a,u).compileAG(a,d,f)}_getCachedCompiledWhilePatterns(a,u){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new O5,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,u||""),this._cachedCompiledWhilePatterns}},NFe=class oa{static createCaptureRule(u,d,f,m,g){return u.registerRule(x=>new Qtr(d,x,f,m,g))}static getCompiledRuleId(u,d,f){return u.id||d.registerRule(m=>{if(u.id=m,u.match)return new Ytr(u.$vscodeTextmateLocation,u.id,u.name,u.match,oa._compileCaptures(u.captures,d,f));if(typeof u.begin>"u"){u.repository&&(f=vFe({},f,u.repository));let g=u.patterns;return typeof g>"u"&&u.include&&(g=[{include:u.include}]),new jLe(u.$vscodeTextmateLocation,u.id,u.name,u.contentName,oa._compilePatterns(g,d,f))}return u.while?new nM(u.$vscodeTextmateLocation,u.id,u.name,u.contentName,u.begin,oa._compileCaptures(u.beginCaptures||u.captures,d,f),u.while,oa._compileCaptures(u.whileCaptures||u.captures,d,f),oa._compilePatterns(u.patterns,d,f)):new Vne(u.$vscodeTextmateLocation,u.id,u.name,u.contentName,u.begin,oa._compileCaptures(u.beginCaptures||u.captures,d,f),u.end,oa._compileCaptures(u.endCaptures||u.captures,d,f),u.applyEndPatternLast,oa._compilePatterns(u.patterns,d,f))}),u.id}static _compileCaptures(u,d,f){let m=[];if(u){let g=0;for(const x in u){if(x==="$vscodeTextmateLocation")continue;const b=parseInt(x,10);b>g&&(g=b)}for(let x=0;x<=g;x++)m[x]=null;for(const x in u){if(x==="$vscodeTextmateLocation")continue;const b=parseInt(x,10);let v=0;u[x].patterns&&(v=oa.getCompiledRuleId(u[x],d,f)),m[b]=oa.createCaptureRule(d,u[x].$vscodeTextmateLocation,u[x].name,u[x].contentName,v)}}return m}static _compilePatterns(u,d,f){let m=[];if(u)for(let g=0,x=u.length;g<x;g++){const b=u[g];let v=-1;if(b.include){const _=wFe(b.include);switch(_.kind){case 0:case 1:v=oa.getCompiledRuleId(f[b.include],d,f);break;case 2:let S=f[_.ruleName];S&&(v=oa.getCompiledRuleId(S,d,f));break;case 3:case 4:const R=_.scopeName,w=_.kind===4?_.ruleName:null,N=d.getExternalGrammar(R,f);if(N)if(w){let k=N.repository[w];k&&(v=oa.getCompiledRuleId(k,d,N.repository))}else v=oa.getCompiledRuleId(N.repository.$self,d,N.repository);break}}else v=oa.getCompiledRuleId(b,d,f);if(v!==-1){const _=d.getRule(v);let S=!1;if((_ instanceof jLe||_ instanceof Vne||_ instanceof nM)&&_.hasMissingPatterns&&_.patterns.length===0&&(S=!0),S)continue;m.push(v)}}return{patterns:m,hasMissingPatterns:(u?u.length:0)!==m.length}}},w5=class DFe{constructor(u,d){if(Ht(this,"source"),Ht(this,"ruleId"),Ht(this,"hasAnchor"),Ht(this,"hasBackReferences"),Ht(this,"_anchorCache"),u&&typeof u=="string"){const f=u.length;let m=0,g=[],x=!1;for(let b=0;b<f;b++)if(u.charAt(b)==="\\"&&b+1<f){const _=u.charAt(b+1);_==="z"?(g.push(u.substring(m,b)),g.push("$(?!\\n)(?<!\\n)"),m=b+2):(_==="A"||_==="G")&&(x=!0),b++}this.hasAnchor=x,m===0?this.source=u:(g.push(u.substring(m,f)),this.source=g.join(""))}else this.hasAnchor=!1,this.source=u;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=d,typeof this.source=="string"?this.hasBackReferences=Wtr.test(this.source):this.hasBackReferences=!1}clone(){return new DFe(this.source,this.ruleId)}setSource(u){this.source!==u&&(this.source=u,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(u,d){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let f=d.map(m=>u.substring(m.start,m.end));return PLe.lastIndex=0,this.source.replace(PLe,(m,g)=>SFe(f[parseInt(g,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let u=[],d=[],f=[],m=[],g,x,b,v;for(g=0,x=this.source.length;g<x;g++)b=this.source.charAt(g),u[g]=b,d[g]=b,f[g]=b,m[g]=b,b==="\\"&&g+1<x&&(v=this.source.charAt(g+1),v==="A"?(u[g+1]="",d[g+1]="",f[g+1]="A",m[g+1]="A"):v==="G"?(u[g+1]="",d[g+1]="G",f[g+1]="",m[g+1]="G"):(u[g+1]=v,d[g+1]=v,f[g+1]=v,m[g+1]=v),g++);return{A0_G0:u.join(""),A0_G1:d.join(""),A1_G0:f.join(""),A1_G1:m.join("")}}resolveAnchors(u,d){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:u?d?this._anchorCache.A1_G1:this._anchorCache.A1_G0:d?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},O5=class{constructor(){Ht(this,"_items"),Ht(this,"_hasAnchors"),Ht(this,"_cached"),Ht(this,"_anchorCache"),this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(a){this._items.push(a),this._hasAnchors=this._hasAnchors||a.hasAnchor}unshift(a){this._items.unshift(a),this._hasAnchors=this._hasAnchors||a.hasAnchor}length(){return this._items.length}setSource(a,u){this._items[a].source!==u&&(this._disposeCaches(),this._items[a].setSource(u))}compile(a){if(!this._cached){let u=this._items.map(d=>d.source);this._cached=new FLe(a,u,this._items.map(d=>d.ruleId))}return this._cached}compileAG(a,u,d){return this._hasAnchors?u?d?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(a,u,d)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(a,u,d)),this._anchorCache.A1_G0):d?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(a,u,d)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(a,u,d)),this._anchorCache.A0_G0):this.compile(a)}_resolveAnchors(a,u,d){let f=this._items.map(m=>m.resolveAnchors(u,d));return new FLe(a,f,this._items.map(m=>m.ruleId))}},FLe=class{constructor(a,u,d){Ht(this,"scanner"),this.regExps=u,this.rules=d,this.scanner=a.createOnigScanner(u)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const a=[];for(let u=0,d=this.rules.length;u<d;u++)a.push(" - "+this.rules[u]+": "+this.regExps[u]);return a.join(`
|
|
2714
|
+
`)},Oer=0,F_=[];function Ner(a){var u=Y.useRef([]),d=Y.useRef([0,0]),f=Y.useRef(),m=Y.useState(Oer++)[0],g=Y.useState(Wje)[0],x=Y.useRef(a);Y.useEffect(function(){x.current=a},[a]),Y.useEffect(function(){if(a.inert){document.body.classList.add("block-interactivity-".concat(m));var B=XZt([a.lockRef.current],(a.shards||[]).map(DLe)).filter(Boolean);return B.forEach(function(P){return P.classList.add("allow-interactivity-".concat(m))}),function(){document.body.classList.remove("block-interactivity-".concat(m)),B.forEach(function(P){return P.classList.remove("allow-interactivity-".concat(m))})}}},[a.inert,a.lockRef.current,a.shards]);var b=Y.useCallback(function(B,P){if("touches"in B&&B.touches.length===2||B.type==="wheel"&&B.ctrlKey)return!x.current.allowPinchZoom;var $=Qj(B),q=d.current,z="deltaX"in B?B.deltaX:q[0]-$[0],W="deltaY"in B?B.deltaY:q[1]-$[1],X,J=B.target,ee=Math.abs(z)>Math.abs(W)?"h":"v";if("touches"in B&&ee==="h"&&J.type==="range")return!1;var fe=OLe(ee,J);if(!fe)return!0;if(fe?X=ee:(X=ee==="v"?"h":"v",fe=OLe(ee,J)),!fe)return!1;if(!f.current&&"changedTouches"in B&&(z||W)&&(f.current=X),!X)return!0;var be=f.current||X;return Rer(be,P,B,be==="h"?z:W)},[]),v=Y.useCallback(function(B){var P=B;if(!(!F_.length||F_[F_.length-1]!==g)){var $="deltaY"in P?NLe(P):Qj(P),q=u.current.filter(function(X){return X.name===P.type&&(X.target===P.target||P.target===X.shadowParent)&&Ter(X.delta,$)})[0];if(q&&q.should){P.cancelable&&P.preventDefault();return}if(!q){var z=(x.current.shards||[]).map(DLe).filter(Boolean).filter(function(X){return X.contains(P.target)}),W=z.length>0?b(P,z[0]):!x.current.noIsolation;W&&P.cancelable&&P.preventDefault()}}},[]),_=Y.useCallback(function(B,P,$,q){var z={name:B,delta:P,target:$,should:q,shadowParent:Der($)};u.current.push(z),setTimeout(function(){u.current=u.current.filter(function(W){return W!==z})},1)},[]),S=Y.useCallback(function(B){d.current=Qj(B),f.current=void 0},[]),R=Y.useCallback(function(B){_(B.type,NLe(B),B.target,b(B,a.lockRef.current))},[]),w=Y.useCallback(function(B){_(B.type,Qj(B),B.target,b(B,a.lockRef.current))},[]);Y.useEffect(function(){return F_.push(g),a.setCallbacks({onScrollCapture:R,onWheelCapture:R,onTouchMoveCapture:w}),document.addEventListener("wheel",v,j_),document.addEventListener("touchmove",v,j_),document.addEventListener("touchstart",S,j_),function(){F_=F_.filter(function(B){return B!==g}),document.removeEventListener("wheel",v,j_),document.removeEventListener("touchmove",v,j_),document.removeEventListener("touchstart",S,j_)}},[]);var N=a.removeScrollBar,k=a.inert;return Y.createElement(Y.Fragment,null,k?Y.createElement(g,{styles:wer(m)}):null,N?Y.createElement(ver,{gapMode:a.gapMode}):null)}function Der(a){for(var u=null;a!==null;)a instanceof ShadowRoot&&(u=a.host,a=a.host),a=a.parentNode;return u}const ker=oer(Gje,Ner);var mN=Y.forwardRef(function(a,u){return Y.createElement(o$,fh({},a,{ref:u,sideCar:ker}))});mN.classNames=o$.classNames;var Ler=[" ","Enter","ArrowUp","ArrowDown"],Ier=[" ","Enter"],gN="Select",[a$,l$,Per]=bse(gN),[MS,wyr]=Md(gN,[Per,Bx]),u$=Bx(),[jer,qx]=MS(gN),[Fer,Mer]=MS(gN),Kje=a=>{const{__scopeSelect:u,children:d,open:f,defaultOpen:m,onOpenChange:g,value:x,defaultValue:b,onValueChange:v,dir:_,name:S,autoComplete:R,disabled:w,required:N,form:k}=a,B=u$(u),[P,$]=Y.useState(null),[q,z]=Y.useState(null),[W,X]=Y.useState(!1),J=dN(_),[ee=!1,fe]=Dx({prop:f,defaultProp:m,onChange:g}),[be,je]=Dx({prop:x,defaultProp:b,onChange:v}),_e=Y.useRef(null),De=P?k||!!P.closest("form"):!0,[Xe,ze]=Y.useState(new Set),te=Array.from(Xe).map(Ne=>Ne.props.value).join(";");return D.jsxRuntimeExports.jsx(YM,{...B,children:D.jsxRuntimeExports.jsxs(jer,{required:N,scope:u,trigger:P,onTriggerChange:$,valueNode:q,onValueNodeChange:z,valueNodeHasChildren:W,onValueNodeHasChildrenChange:X,contentId:ic(),value:be,onValueChange:je,open:ee,onOpenChange:fe,dir:J,triggerPointerDownPosRef:_e,disabled:w,children:[D.jsxRuntimeExports.jsx(a$.Provider,{scope:u,children:D.jsxRuntimeExports.jsx(Fer,{scope:a.__scopeSelect,onNativeOptionAdd:Y.useCallback(Ne=>{ze(Ge=>new Set(Ge).add(Ne))},[]),onNativeOptionRemove:Y.useCallback(Ne=>{ze(Ge=>{const mt=new Set(Ge);return mt.delete(Ne),mt})},[]),children:d})}),De?D.jsxRuntimeExports.jsxs(gFe,{"aria-hidden":!0,required:N,tabIndex:-1,name:S,autoComplete:R,value:be,onChange:Ne=>je(Ne.target.value),disabled:w,form:k,children:[be===void 0?D.jsxRuntimeExports.jsx("option",{value:""}):null,Array.from(Xe)]},te):null]})})};Kje.displayName=gN;var Xje="SelectTrigger",Jje=Y.forwardRef((a,u)=>{const{__scopeSelect:d,disabled:f=!1,...m}=a,g=u$(d),x=qx(Xje,d),b=x.disabled||f,v=Cn(u,x.onTriggerChange),_=l$(d),S=Y.useRef("touch"),[R,w,N]=xFe(B=>{const P=_().filter(z=>!z.disabled),$=P.find(z=>z.value===x.value),q=yFe(P,B,$);q!==void 0&&x.onValueChange(q.value)}),k=B=>{b||(x.onOpenChange(!0),N()),B&&(x.triggerPointerDownPosRef.current={x:Math.round(B.pageX),y:Math.round(B.pageY)})};return D.jsxRuntimeExports.jsx(iN,{asChild:!0,...g,children:D.jsxRuntimeExports.jsx(rn.button,{type:"button",role:"combobox","aria-controls":x.contentId,"aria-expanded":x.open,"aria-required":x.required,"aria-autocomplete":"none",dir:x.dir,"data-state":x.open?"open":"closed",disabled:b,"data-disabled":b?"":void 0,"data-placeholder":mFe(x.value)?"":void 0,...m,ref:v,onClick:xr(m.onClick,B=>{B.currentTarget.focus(),S.current!=="mouse"&&k(B)}),onPointerDown:xr(m.onPointerDown,B=>{S.current=B.pointerType;const P=B.target;P.hasPointerCapture(B.pointerId)&&P.releasePointerCapture(B.pointerId),B.button===0&&B.ctrlKey===!1&&B.pointerType==="mouse"&&(k(B),B.preventDefault())}),onKeyDown:xr(m.onKeyDown,B=>{const P=R.current!=="";!(B.ctrlKey||B.altKey||B.metaKey)&&B.key.length===1&&w(B.key),!(P&&B.key===" ")&&Ler.includes(B.key)&&(k(),B.preventDefault())})})})});Jje.displayName=Xje;var Zje="SelectValue",eFe=Y.forwardRef((a,u)=>{const{__scopeSelect:d,className:f,style:m,children:g,placeholder:x="",...b}=a,v=qx(Zje,d),{onValueNodeHasChildrenChange:_}=v,S=g!==void 0,R=Cn(u,v.onValueNodeChange);return ca(()=>{_(S)},[_,S]),D.jsxRuntimeExports.jsx(rn.span,{...b,ref:R,style:{pointerEvents:"none"},children:mFe(v.value)?D.jsxRuntimeExports.jsx(D.jsxRuntimeExports.Fragment,{children:x}):g})});eFe.displayName=Zje;var $er="SelectIcon",Ber=Y.forwardRef((a,u)=>{const{__scopeSelect:d,children:f,...m}=a;return D.jsxRuntimeExports.jsx(rn.span,{"aria-hidden":!0,...m,ref:u,children:f||"▼"})});Ber.displayName=$er;var qer="SelectPortal",tFe=a=>D.jsxRuntimeExports.jsx(kS,{asChild:!0,...a});tFe.displayName=qer;var Gv="SelectContent",rFe=Y.forwardRef((a,u)=>{const d=qx(Gv,a.__scopeSelect),[f,m]=Y.useState();if(ca(()=>{m(new DocumentFragment)},[]),!d.open){const g=f;return g?RM.createPortal(D.jsxRuntimeExports.jsx(nFe,{scope:a.__scopeSelect,children:D.jsxRuntimeExports.jsx(a$.Slot,{scope:a.__scopeSelect,children:D.jsxRuntimeExports.jsx("div",{children:a.children})})}),g):null}return D.jsxRuntimeExports.jsx(iFe,{...a,ref:u})});rFe.displayName=Gv;var Td=10,[nFe,Ux]=MS(Gv),Uer="SelectContentImpl",iFe=Y.forwardRef((a,u)=>{const{__scopeSelect:d,position:f="item-aligned",onCloseAutoFocus:m,onEscapeKeyDown:g,onPointerDownOutside:x,side:b,sideOffset:v,align:_,alignOffset:S,arrowPadding:R,collisionBoundary:w,collisionPadding:N,sticky:k,hideWhenDetached:B,avoidCollisions:P,...$}=a,q=qx(Gv,d),[z,W]=Y.useState(null),[X,J]=Y.useState(null),ee=Cn(u,Ie=>W(Ie)),[fe,be]=Y.useState(null),[je,_e]=Y.useState(null),De=l$(d),[Xe,ze]=Y.useState(!1),te=Y.useRef(!1);Y.useEffect(()=>{if(z)return s$(z)},[z]),i$();const Ne=Y.useCallback(Ie=>{const[le,...Se]=De().map(ot=>ot.ref.current),[Le]=Se.slice(-1),Ye=document.activeElement;for(const ot of Ie)if(ot===Ye||(ot?.scrollIntoView({block:"nearest"}),ot===le&&X&&(X.scrollTop=0),ot===Le&&X&&(X.scrollTop=X.scrollHeight),ot?.focus(),document.activeElement!==Ye))return},[De,X]),Ge=Y.useCallback(()=>Ne([fe,z]),[Ne,fe,z]);Y.useEffect(()=>{Xe&&Ge()},[Xe,Ge]);const{onOpenChange:mt,triggerPointerDownPosRef:Je}=q;Y.useEffect(()=>{if(z){let Ie={x:0,y:0};const le=Le=>{var Ye,ot;Ie={x:Math.abs(Math.round(Le.pageX)-(((Ye=Je.current)==null?void 0:Ye.x)??0)),y:Math.abs(Math.round(Le.pageY)-(((ot=Je.current)==null?void 0:ot.y)??0))}},Se=Le=>{Ie.x<=10&&Ie.y<=10?Le.preventDefault():z.contains(Le.target)||mt(!1),document.removeEventListener("pointermove",le),Je.current=null};return Je.current!==null&&(document.addEventListener("pointermove",le),document.addEventListener("pointerup",Se,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",le),document.removeEventListener("pointerup",Se,{capture:!0})}}},[z,mt,Je]),Y.useEffect(()=>{const Ie=()=>mt(!1);return window.addEventListener("blur",Ie),window.addEventListener("resize",Ie),()=>{window.removeEventListener("blur",Ie),window.removeEventListener("resize",Ie)}},[mt]);const[rt,vt]=xFe(Ie=>{const le=De().filter(Ye=>!Ye.disabled),Se=le.find(Ye=>Ye.ref.current===document.activeElement),Le=yFe(le,Ie,Se);Le&&setTimeout(()=>Le.ref.current.focus())}),qe=Y.useCallback((Ie,le,Se)=>{const Le=!te.current&&!Se;(q.value!==void 0&&q.value===le||Le)&&(be(Ie),Le&&(te.current=!0))},[q.value]),ge=Y.useCallback(()=>z?.focus(),[z]),pe=Y.useCallback((Ie,le,Se)=>{const Le=!te.current&&!Se;(q.value!==void 0&&q.value===le||Le)&&_e(Ie)},[q.value]),ye=f==="popper"?$ne:sFe,we=ye===$ne?{side:b,sideOffset:v,align:_,alignOffset:S,arrowPadding:R,collisionBoundary:w,collisionPadding:N,sticky:k,hideWhenDetached:B,avoidCollisions:P}:{};return D.jsxRuntimeExports.jsx(nFe,{scope:d,content:z,viewport:X,onViewportChange:J,itemRefCallback:qe,selectedItem:fe,onItemLeave:ge,itemTextRefCallback:pe,focusSelectedItem:Ge,selectedItemText:je,position:f,isPositioned:Xe,searchRef:rt,children:D.jsxRuntimeExports.jsx(mN,{as:Tx,allowPinchZoom:!0,children:D.jsxRuntimeExports.jsx(pN,{asChild:!0,trapped:q.open,onMountAutoFocus:Ie=>{Ie.preventDefault()},onUnmountAutoFocus:xr(m,Ie=>{var le;(le=q.trigger)==null||le.focus({preventScroll:!0}),Ie.preventDefault()}),children:D.jsxRuntimeExports.jsx(OS,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:g,onPointerDownOutside:x,onFocusOutside:Ie=>Ie.preventDefault(),onDismiss:()=>q.onOpenChange(!1),children:D.jsxRuntimeExports.jsx(ye,{role:"listbox",id:q.contentId,"data-state":q.open?"open":"closed",dir:q.dir,onContextMenu:Ie=>Ie.preventDefault(),...$,...we,onPlaced:()=>ze(!0),ref:ee,style:{display:"flex",flexDirection:"column",outline:"none",...$.style},onKeyDown:xr($.onKeyDown,Ie=>{const le=Ie.ctrlKey||Ie.altKey||Ie.metaKey;if(Ie.key==="Tab"&&Ie.preventDefault(),!le&&Ie.key.length===1&&vt(Ie.key),["ArrowUp","ArrowDown","Home","End"].includes(Ie.key)){let Le=De().filter(Ye=>!Ye.disabled).map(Ye=>Ye.ref.current);if(["ArrowUp","End"].includes(Ie.key)&&(Le=Le.slice().reverse()),["ArrowUp","ArrowDown"].includes(Ie.key)){const Ye=Ie.target,ot=Le.indexOf(Ye);Le=Le.slice(ot+1)}setTimeout(()=>Ne(Le)),Ie.preventDefault()}})})})})})})});iFe.displayName=Uer;var zer="SelectItemAlignedPosition",sFe=Y.forwardRef((a,u)=>{const{__scopeSelect:d,onPlaced:f,...m}=a,g=qx(Gv,d),x=Ux(Gv,d),[b,v]=Y.useState(null),[_,S]=Y.useState(null),R=Cn(u,ee=>S(ee)),w=l$(d),N=Y.useRef(!1),k=Y.useRef(!0),{viewport:B,selectedItem:P,selectedItemText:$,focusSelectedItem:q}=x,z=Y.useCallback(()=>{if(g.trigger&&g.valueNode&&b&&_&&B&&P&&$){const ee=g.trigger.getBoundingClientRect(),fe=_.getBoundingClientRect(),be=g.valueNode.getBoundingClientRect(),je=$.getBoundingClientRect();if(g.dir!=="rtl"){const Ye=je.left-fe.left,ot=be.left-Ye,He=ee.left-ot,We=ee.width+He,bt=Math.max(We,fe.width),_t=window.innerWidth-Td,Ft=jne(ot,[Td,Math.max(Td,_t-bt)]);b.style.minWidth=We+"px",b.style.left=Ft+"px"}else{const Ye=fe.right-je.right,ot=window.innerWidth-be.right-Ye,He=window.innerWidth-ee.right-ot,We=ee.width+He,bt=Math.max(We,fe.width),_t=window.innerWidth-Td,Ft=jne(ot,[Td,Math.max(Td,_t-bt)]);b.style.minWidth=We+"px",b.style.right=Ft+"px"}const _e=w(),De=window.innerHeight-Td*2,Xe=B.scrollHeight,ze=window.getComputedStyle(_),te=parseInt(ze.borderTopWidth,10),Ne=parseInt(ze.paddingTop,10),Ge=parseInt(ze.borderBottomWidth,10),mt=parseInt(ze.paddingBottom,10),Je=te+Ne+Xe+mt+Ge,rt=Math.min(P.offsetHeight*5,Je),vt=window.getComputedStyle(B),qe=parseInt(vt.paddingTop,10),ge=parseInt(vt.paddingBottom,10),pe=ee.top+ee.height/2-Td,ye=De-pe,we=P.offsetHeight/2,Ie=P.offsetTop+we,le=te+Ne+Ie,Se=Je-le;if(le<=pe){const Ye=_e.length>0&&P===_e[_e.length-1].ref.current;b.style.bottom="0px";const ot=_.clientHeight-B.offsetTop-B.offsetHeight,He=Math.max(ye,we+(Ye?ge:0)+ot+Ge),We=le+He;b.style.height=We+"px"}else{const Ye=_e.length>0&&P===_e[0].ref.current;b.style.top="0px";const He=Math.max(pe,te+B.offsetTop+(Ye?qe:0)+we)+Se;b.style.height=He+"px",B.scrollTop=le-pe+B.offsetTop}b.style.margin=`${Td}px 0`,b.style.minHeight=rt+"px",b.style.maxHeight=De+"px",f?.(),requestAnimationFrame(()=>N.current=!0)}},[w,g.trigger,g.valueNode,b,_,B,P,$,g.dir,f]);ca(()=>z(),[z]);const[W,X]=Y.useState();ca(()=>{_&&X(window.getComputedStyle(_).zIndex)},[_]);const J=Y.useCallback(ee=>{ee&&k.current===!0&&(z(),q?.(),k.current=!1)},[z,q]);return D.jsxRuntimeExports.jsx(Ger,{scope:d,contentWrapper:b,shouldExpandOnScrollRef:N,onScrollButtonChange:J,children:D.jsxRuntimeExports.jsx("div",{ref:v,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:W},children:D.jsxRuntimeExports.jsx(rn.div,{...m,ref:R,style:{boxSizing:"border-box",maxHeight:"100%",...m.style}})})})});sFe.displayName=zer;var Her="SelectPopperPosition",$ne=Y.forwardRef((a,u)=>{const{__scopeSelect:d,align:f="start",collisionPadding:m=Td,...g}=a,x=u$(d);return D.jsxRuntimeExports.jsx(KM,{...x,...g,ref:u,align:f,collisionPadding:m,style:{boxSizing:"border-box",...g.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});$ne.displayName=Her;var[Ger,Ese]=MS(Gv,{}),Bne="SelectViewport",oFe=Y.forwardRef((a,u)=>{const{__scopeSelect:d,nonce:f,...m}=a,g=Ux(Bne,d),x=Ese(Bne,d),b=Cn(u,g.onViewportChange),v=Y.useRef(0);return D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:f}),D.jsxRuntimeExports.jsx(a$.Slot,{scope:d,children:D.jsxRuntimeExports.jsx(rn.div,{"data-radix-select-viewport":"",role:"presentation",...m,ref:b,style:{position:"relative",flex:1,overflow:"hidden auto",...m.style},onScroll:xr(m.onScroll,_=>{const S=_.currentTarget,{contentWrapper:R,shouldExpandOnScrollRef:w}=x;if(w?.current&&R){const N=Math.abs(v.current-S.scrollTop);if(N>0){const k=window.innerHeight-Td*2,B=parseFloat(R.style.minHeight),P=parseFloat(R.style.height),$=Math.max(B,P);if($<k){const q=$+N,z=Math.min(k,q),W=q-z;R.style.height=z+"px",R.style.bottom==="0px"&&(S.scrollTop=W>0?W:0,R.style.justifyContent="flex-end")}}}v.current=S.scrollTop})})})]})});oFe.displayName=Bne;var aFe="SelectGroup",[Wer,Ver]=MS(aFe),lFe=Y.forwardRef((a,u)=>{const{__scopeSelect:d,...f}=a,m=ic();return D.jsxRuntimeExports.jsx(Wer,{scope:d,id:m,children:D.jsxRuntimeExports.jsx(rn.div,{role:"group","aria-labelledby":m,...f,ref:u})})});lFe.displayName=aFe;var uFe="SelectLabel",Qer=Y.forwardRef((a,u)=>{const{__scopeSelect:d,...f}=a,m=Ver(uFe,d);return D.jsxRuntimeExports.jsx(rn.div,{id:m.id,...f,ref:u})});Qer.displayName=uFe;var ZF="SelectItem",[Yer,cFe]=MS(ZF),dFe=Y.forwardRef((a,u)=>{const{__scopeSelect:d,value:f,disabled:m=!1,textValue:g,...x}=a,b=qx(ZF,d),v=Ux(ZF,d),_=b.value===f,[S,R]=Y.useState(g??""),[w,N]=Y.useState(!1),k=Cn(u,q=>{var z;return(z=v.itemRefCallback)==null?void 0:z.call(v,q,f,m)}),B=ic(),P=Y.useRef("touch"),$=()=>{m||(b.onValueChange(f),b.onOpenChange(!1))};if(f==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return D.jsxRuntimeExports.jsx(Yer,{scope:d,value:f,disabled:m,textId:B,isSelected:_,onItemTextChange:Y.useCallback(q=>{R(z=>z||(q?.textContent??"").trim())},[]),children:D.jsxRuntimeExports.jsx(a$.ItemSlot,{scope:d,value:f,disabled:m,textValue:S,children:D.jsxRuntimeExports.jsx(rn.div,{role:"option","aria-labelledby":B,"data-highlighted":w?"":void 0,"aria-selected":_&&w,"data-state":_?"checked":"unchecked","aria-disabled":m||void 0,"data-disabled":m?"":void 0,tabIndex:m?void 0:-1,...x,ref:k,onFocus:xr(x.onFocus,()=>N(!0)),onBlur:xr(x.onBlur,()=>N(!1)),onClick:xr(x.onClick,()=>{P.current!=="mouse"&&$()}),onPointerUp:xr(x.onPointerUp,()=>{P.current==="mouse"&&$()}),onPointerDown:xr(x.onPointerDown,q=>{P.current=q.pointerType}),onPointerMove:xr(x.onPointerMove,q=>{var z;P.current=q.pointerType,m?(z=v.onItemLeave)==null||z.call(v):P.current==="mouse"&&q.currentTarget.focus({preventScroll:!0})}),onPointerLeave:xr(x.onPointerLeave,q=>{var z;q.currentTarget===document.activeElement&&((z=v.onItemLeave)==null||z.call(v))}),onKeyDown:xr(x.onKeyDown,q=>{var z;((z=v.searchRef)==null?void 0:z.current)!==""&&q.key===" "||(Ier.includes(q.key)&&$(),q.key===" "&&q.preventDefault())})})})})});dFe.displayName=ZF;var i5="SelectItemText",fFe=Y.forwardRef((a,u)=>{const{__scopeSelect:d,className:f,style:m,...g}=a,x=qx(i5,d),b=Ux(i5,d),v=cFe(i5,d),_=Mer(i5,d),[S,R]=Y.useState(null),w=Cn(u,$=>R($),v.onItemTextChange,$=>{var q;return(q=b.itemTextRefCallback)==null?void 0:q.call(b,$,v.value,v.disabled)}),N=S?.textContent,k=Y.useMemo(()=>D.jsxRuntimeExports.jsx("option",{value:v.value,disabled:v.disabled,children:N},v.value),[v.disabled,v.value,N]),{onNativeOptionAdd:B,onNativeOptionRemove:P}=_;return ca(()=>(B(k),()=>P(k)),[B,P,k]),D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx(rn.span,{id:v.textId,...g,ref:w}),v.isSelected&&x.valueNode&&!x.valueNodeHasChildren?RM.createPortal(g.children,x.valueNode):null]})});fFe.displayName=i5;var hFe="SelectItemIndicator",Ker=Y.forwardRef((a,u)=>{const{__scopeSelect:d,...f}=a;return cFe(hFe,d).isSelected?D.jsxRuntimeExports.jsx(rn.span,{"aria-hidden":!0,...f,ref:u}):null});Ker.displayName=hFe;var qne="SelectScrollUpButton",Xer=Y.forwardRef((a,u)=>{const d=Ux(qne,a.__scopeSelect),f=Ese(qne,a.__scopeSelect),[m,g]=Y.useState(!1),x=Cn(u,f.onScrollButtonChange);return ca(()=>{if(d.viewport&&d.isPositioned){let b=function(){const _=v.scrollTop>0;g(_)};const v=d.viewport;return b(),v.addEventListener("scroll",b),()=>v.removeEventListener("scroll",b)}},[d.viewport,d.isPositioned]),m?D.jsxRuntimeExports.jsx(pFe,{...a,ref:x,onAutoScroll:()=>{const{viewport:b,selectedItem:v}=d;b&&v&&(b.scrollTop=b.scrollTop-v.offsetHeight)}}):null});Xer.displayName=qne;var Une="SelectScrollDownButton",Jer=Y.forwardRef((a,u)=>{const d=Ux(Une,a.__scopeSelect),f=Ese(Une,a.__scopeSelect),[m,g]=Y.useState(!1),x=Cn(u,f.onScrollButtonChange);return ca(()=>{if(d.viewport&&d.isPositioned){let b=function(){const _=v.scrollHeight-v.clientHeight,S=Math.ceil(v.scrollTop)<_;g(S)};const v=d.viewport;return b(),v.addEventListener("scroll",b),()=>v.removeEventListener("scroll",b)}},[d.viewport,d.isPositioned]),m?D.jsxRuntimeExports.jsx(pFe,{...a,ref:x,onAutoScroll:()=>{const{viewport:b,selectedItem:v}=d;b&&v&&(b.scrollTop=b.scrollTop+v.offsetHeight)}}):null});Jer.displayName=Une;var pFe=Y.forwardRef((a,u)=>{const{__scopeSelect:d,onAutoScroll:f,...m}=a,g=Ux("SelectScrollButton",d),x=Y.useRef(null),b=l$(d),v=Y.useCallback(()=>{x.current!==null&&(window.clearInterval(x.current),x.current=null)},[]);return Y.useEffect(()=>()=>v(),[v]),ca(()=>{var _;const S=b().find(R=>R.ref.current===document.activeElement);(_=S?.ref.current)==null||_.scrollIntoView({block:"nearest"})},[b]),D.jsxRuntimeExports.jsx(rn.div,{"aria-hidden":!0,...m,ref:u,style:{flexShrink:0,...m.style},onPointerDown:xr(m.onPointerDown,()=>{x.current===null&&(x.current=window.setInterval(f,50))}),onPointerMove:xr(m.onPointerMove,()=>{var _;(_=g.onItemLeave)==null||_.call(g),x.current===null&&(x.current=window.setInterval(f,50))}),onPointerLeave:xr(m.onPointerLeave,()=>{v()})})}),Zer="SelectSeparator",etr=Y.forwardRef((a,u)=>{const{__scopeSelect:d,...f}=a;return D.jsxRuntimeExports.jsx(rn.div,{"aria-hidden":!0,...f,ref:u})});etr.displayName=Zer;var zne="SelectArrow",ttr=Y.forwardRef((a,u)=>{const{__scopeSelect:d,...f}=a,m=u$(d),g=qx(zne,d),x=Ux(zne,d);return g.open&&x.position==="popper"?D.jsxRuntimeExports.jsx(XM,{...m,...f,ref:u}):null});ttr.displayName=zne;function mFe(a){return a===""||a===void 0}var gFe=Y.forwardRef((a,u)=>{const{value:d,...f}=a,m=Y.useRef(null),g=Cn(u,m),x=VZt(d);return Y.useEffect(()=>{const b=m.current,v=window.HTMLSelectElement.prototype,S=Object.getOwnPropertyDescriptor(v,"value").set;if(x!==d&&S){const R=new Event("change",{bubbles:!0});S.call(b,d),b.dispatchEvent(R)}},[x,d]),D.jsxRuntimeExports.jsx(dse,{asChild:!0,children:D.jsxRuntimeExports.jsx("select",{...f,ref:g,defaultValue:d})})});gFe.displayName="BubbleSelect";function xFe(a){const u=Us(a),d=Y.useRef(""),f=Y.useRef(0),m=Y.useCallback(x=>{const b=d.current+x;u(b),function v(_){d.current=_,window.clearTimeout(f.current),_!==""&&(f.current=window.setTimeout(()=>v(""),1e3))}(b)},[u]),g=Y.useCallback(()=>{d.current="",window.clearTimeout(f.current)},[]);return Y.useEffect(()=>()=>window.clearTimeout(f.current),[]),[d,m,g]}function yFe(a,u,d){const m=u.length>1&&Array.from(u).every(_=>_===u[0])?u[0]:u,g=d?a.indexOf(d):-1;let x=rtr(a,Math.max(g,0));m.length===1&&(x=x.filter(_=>_!==d));const v=x.find(_=>_.textValue.toLowerCase().startsWith(m.toLowerCase()));return v!==d?v:void 0}function rtr(a,u){return a.map((d,f)=>a[(u+f)%a.length])}var ntr=Kje,itr=Jje,str=eFe,otr=tFe,atr=rFe,ltr=oFe,utr=lFe,ctr=dFe,dtr=fFe;const ftr="default";function c$({value:a,placeholder:u,size:d=ftr,icon:f,onChange:m,onKeyDown:g,hasClear:x=!1,customStyle:b}){const[v,_]=Y.useState(!1),S=Y.useRef(null),R=k=>{m(k.target.value)},w=()=>{_(!0)},N=k=>{S.current==null||k.relatedTarget!==S.current?_(!1):k.target.focus()};return D.jsxRuntimeExports.jsxs("div",{...Lt.props(MO.main,v&&MO.focused,htr[d],b),children:[f&&D.jsxRuntimeExports.jsx(An,{name:f,color:"secondary"}),D.jsxRuntimeExports.jsx("input",{...Lt.props(Fr.body,MO.input),value:a,placeholder:u,onChange:R,onFocus:w,onBlur:N,onKeyDown:g}),x&&D.jsxRuntimeExports.jsx("button",{...Lt.props(Fr.supporting,MO.actionButton,a===""&&MO.hidden),ref:S,onClick:()=>m(""),tabIndex:0,children:"Clear"})]})}const MO={main:{display:"mly78zum5",alignItems:"mly6s0dn4",justifyContent:"mly1nhvcw1",background:"mlyotlr4g",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,borderRadius:"mlyur7f20",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,border:"mly520xni",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,boxShadow:"mlyk1e6ed",gap:"mly167g77z",rowGap:null,columnGap:null,$$css:!0},focused:{borderColor:"mly1y5yj0f",borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,boxShadow:"mlyg48p7p",$$css:!0},input:{flexGrow:"mly1iyjqo2",height:"mly1qx5ct2",minWidth:"mlygc0pbm",padding:"mly1717udv",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,background:"mly1md70p1",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,borderStyle:"mlyng3xce",borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,outline:"mly1a2a7pz",outlineColor:null,outlineOffset:null,outlineStyle:null,outlineWidth:null,"::placeholder_color":"mly1njml60",$$css:!0},actionButton:{display:"mly3nfvp2",borderWidth:"mlyc342km",borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,background:"mly1md70p1",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,padding:"mly1717udv",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,marginLeft:"mly1iog12x",marginInlineStart:null,marginInlineEnd:null,cursor:"mly1ypdohk",color:"mlykfrnou",$$css:!0},hidden:{visibility:"mlylshs6z",$$css:!0}},htr={default:{padding:"mly153ncpu",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0},compact:{padding:"mlydqdrvq",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0}};function d$({value:a,onChange:u,icon:d,color:f=FS,size:m=vse,items:g,isSearchable:x=!1,customStyle:b}){var v;const[_,S]=Y.useState(""),R=Y.useMemo(()=>_?g.filter(k=>k.label.toLowerCase().includes(_.toLowerCase())):g,[g,_]),w=k=>{u(k)},N=(v=g.find(k=>k.value===a))==null?void 0:v.label;return D.jsxRuntimeExports.jsxs(ntr,{value:a,onValueChange:w,required:!0,children:[D.jsxRuntimeExports.jsxs(itr,{...Lt.props(Cx.main,l5.selectTrigger,xse[f],yse[m],Fr.body,Cx.label,b),children:[d&&D.jsxRuntimeExports.jsx(An,{name:d,customStyle:Cx.icon}),D.jsxRuntimeExports.jsx(str,{asChild:!0,children:D.jsxRuntimeExports.jsx("div",{className:"mlyb3r6kr mlylyipyv",children:N})})]}),D.jsxRuntimeExports.jsx(otr,{children:D.jsxRuntimeExports.jsx(atr,{side:"bottom",position:"popper",sideOffset:4,children:D.jsxRuntimeExports.jsxs(ltr,{className:"mly4pepcl mlyotlr4g mly17fq3gk",children:[x&&D.jsxRuntimeExports.jsx(c$,{value:_,onChange:k=>S(k),placeholder:"Search",size:"compact",icon:"search",hasClear:!0,customStyle:l5.searchInput,onKeyDown:k=>{["ArrowUp","ArrowDown"].includes(k.key)||setTimeout(()=>{k.target.focus()},10)}}),D.jsxRuntimeExports.jsx(fN,{children:D.jsxRuntimeExports.jsx(utr,{className:"mly78zum5 mlydt5ytf mlyuyqlj2 mlyfawy5m mly195vfkc",children:R.map(k=>D.jsxRuntimeExports.jsx(ptr,{value:k.value,selectedValue:a,children:k.label},k.value))})})]})})})]})}function ptr({children:a,value:u,selectedValue:d,...f}){return D.jsxRuntimeExports.jsxs(ctr,{...Lt.props(Fr.body,l5.selectItem),value:u,...f,children:[u===d?D.jsxRuntimeExports.jsx(An,{name:"radioChecked",customStyle:l5.radioChecked}):D.jsxRuntimeExports.jsx(An,{name:"radioUnchecked",customStyle:l5.radioUnchecked}),D.jsxRuntimeExports.jsx(dtr,{children:a})]})}const l5={selectTrigger:{whiteSpace:"mlyuxw1ft",overflow:"mlyb3r6kr",overflowX:null,overflowY:null,textOverflow:"mlylyipyv",$$css:!0},selectItem:{display:"mly78zum5",alignItems:"mly6s0dn4",padding:"mlydqdrvq",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,gap:"mly167g77z",rowGap:null,columnGap:null,borderRadius:"mlyur7f20",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,cursor:"mly1ypdohk",outline:"mly1a2a7pz",outlineColor:null,outlineOffset:null,outlineStyle:null,outlineWidth:null,":is([data-highlighted])_background":"mly1bw6wve",":is([data-highlighted])_backgroundAttachment":null,":is([data-highlighted])_backgroundClip":null,":is([data-highlighted])_backgroundColor":null,":is([data-highlighted])_backgroundImage":null,":is([data-highlighted])_backgroundOrigin":null,":is([data-highlighted])_backgroundPosition":null,":is([data-highlighted])_backgroundPositionX":null,":is([data-highlighted])_backgroundPositionY":null,":is([data-highlighted])_backgroundRepeat":null,":is([data-highlighted])_backgroundSize":null,':is([data-state="checked"])_background':"mlyamyxth mlyejs3c0",':is([data-state="checked"])_backgroundAttachment':null,':is([data-state="checked"])_backgroundClip':null,':is([data-state="checked"])_backgroundColor':null,':is([data-state="checked"])_backgroundImage':null,':is([data-state="checked"])_backgroundOrigin':null,':is([data-state="checked"])_backgroundPosition':null,':is([data-state="checked"])_backgroundPositionX':null,':is([data-state="checked"])_backgroundPositionY':null,':is([data-state="checked"])_backgroundRepeat':null,':is([data-state="checked"])_backgroundSize':null,$$css:!0},radioChecked:{color:"mlykfrnou",$$css:!0},radioUnchecked:{color:"mlyj5j7qc",$$css:!0},searchInput:{borderRadius:"mly4pepcl",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,$$css:!0}};function mtr({header:a,children:u,customStyle:d}){return D.jsxRuntimeExports.jsxs("div",{...Lt.props(gtr.container,d),children:[D.jsxRuntimeExports.jsx("div",{className:"mly1717udv",children:a}),D.jsxRuntimeExports.jsx("div",{className:"mly1y1aw1k mly1iyjqo2 mly78zum5",children:u})]})}const gtr={container:{display:"mly78zum5",flexDirection:"mlydt5ytf",background:"mly17eh757",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,borderRadius:"mly4pepcl",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,borderStyle:"mly1y0btm7",borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderWidth:"mlymkeg23",borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderColor:"mly17v018m",borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,padding:"mlyc7ga6q",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,flexShrink:"mly2lah0s",$$css:!0}};function _se({title:a,children:u,icon:d,defaultOpen:f=!0,controls:m,collapsedControls:g,isFocused:x=!1}){const[b,v]=Pe.useState(f);return D.jsxRuntimeExports.jsxs("div",{...{0:{className:"mlygbc89k mly1sxf85j mly1717udv"},1:{className:"mly1sxf85j mly1717udv mlybwr872"}}[!!x<<0],children:[D.jsxRuntimeExports.jsxs("div",{className:"mlyrvj5dj mly1mt1orb mly52fmzj mlylqzeqv mlyfawy5m mly167g77z mly6s0dn4",children:[D.jsxRuntimeExports.jsxs("div",{className:"mlyrvj5dj mly1mt1orb mlylqzeqv mly6s0dn4 mly167g77z",children:[d&&D.jsxRuntimeExports.jsx(An,{name:d,customStyle:xtr.icon}),D.jsxRuntimeExports.jsx("div",{className:"mlyuxw1ft mlyb3r6kr mlylyipyv mlyehqz9p mly1ghz6dp mly117nqv4",children:a})]}),D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5",children:[b?D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mly6s0dn4 mly1jnr06f",children:m}):D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mly6s0dn4 mly1jnr06f",children:g}),D.jsxRuntimeExports.jsx($i,{variant:"flat",size:"compact",onClick:()=>v(!b),icon:b?"chevronDown":"chevronRight",tooltip:b?"Collapse":"Expand"})]})]}),D.jsxRuntimeExports.jsx("div",{...{0:{className:"mly1l4tkcb"},1:{className:"mly1l4tkcb mly1s85apg"}}[!b<<0],children:u})]})}const xtr={icon:{$$css:!0}};function ytr({label:a,sublabel:u,children:d,isInitiallyExpanded:f=!1}){const[m,g]=Y.useState(f),x=()=>{g(b=>!b)};return D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsxs("div",{className:"mlyrvj5dj mly1mt1orb mly6s0dn4 mlylqzeqv mlye8ttls mly167g77z mlyur7f20 mly1ypdohk mly1haqvef",onClick:x,children:[m?D.jsxRuntimeExports.jsx(An,{name:"chevronDown",color:"secondary"}):D.jsxRuntimeExports.jsx(An,{name:"chevronRight",color:"secondary"}),D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mly1iyjqo2 mlyb3r6kr",children:[D.jsxRuntimeExports.jsx("span",{...Lt.props(Fr.body,kLe.label),children:a}),u&&D.jsxRuntimeExports.jsx("span",{...Lt.props(Fr.supporting,kLe.sublabel),children:u})]})]}),m&&D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mlydt5ytf mly92jh8x mly1jnr06f",children:Y.Children.map(d,b=>b)})]})}const kLe={label:{flexGrow:"mly1iyjqo2",fontWeight:"mly1xlr1w8",overflow:"mlyb3r6kr",overflowX:null,overflowY:null,textOverflow:"mlylyipyv",$$css:!0},sublabel:{flexGrow:"mly1iyjqo2",color:"mly9dwj6z",overflow:"mlyb3r6kr",overflowX:null,overflowY:null,textOverflow:"mlylyipyv",$$css:!0}},vtr={scopeName:"source.malloy",patterns:[{include:"#malloy-language"}],repository:{"malloy-language":{patterns:[{include:"#sql-string"},{include:"#comments"},{include:"#tags"},{include:"#strings"},{include:"#numbers"},{include:"#keywords"},{include:"#properties"},{include:"#functions"},{include:"#datetimes"},{include:"#identifiers-quoted"},{include:"#types"},{include:"#constants"},{include:"#timeframes"},{include:"#identifiers-unquoted"}]},"malloy-matched":{begin:"{",end:"}",patterns:[{include:"#malloy-matched"},{include:"#malloy-language"}]},"malloy-in-sql":{begin:"%{",name:"source.malloy-in-sql",end:"}%?",patterns:[{include:"#malloy-matched"},{include:"#malloy-language"}]},"sql-string":{patterns:[{begin:'(\\b[A-Za-z_][A-Za-z_0-9]*)(\\s*\\.\\s*)(sql)(\\s*\\(\\s*)(""")',end:'"""',beginCaptures:{1:{name:"variable.other"},3:{name:"keyword.control.sql"},5:{name:"punctuation.sql-block.open"}},endCaptures:{0:{name:"punctuation.sql-block.close"}},name:"source.sql",patterns:[{include:"#malloy-in-sql"},{include:"source.sql"}]}]},functions:{patterns:[{match:"(?i)\\b(count)(\\s*\\()(distinct)",captures:{1:{name:"entity.name.function"},3:{name:"entity.name.function.modifier"}}},{match:"(?i)\\b(AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE|UNGROUPED)(\\s*\\()",captures:{1:{name:"entity.name.function"}}},{match:"(?i)\\b([a-zA-Z_][a-zA-Z_0-9]*)(\\s*\\()",captures:{1:{name:"entity.name.function"}}},{match:"(?i)\\b([a-zA-Z_][a-zA-Z_0-9]*)(!)(timestamp|number|string|boolean|date)?(\\s*\\()",captures:{1:{name:"entity.name.function"},3:{name:"entity.name.type"}}}]},datetimes:{patterns:[{match:"(?i)@[0-9]{4}-[0-9]{2}-[0-9]{2}[ T][0-9]{2}:[0-9]{2}((:[0-9]{2})(([\\.,][0-9]+)(\\[[A-Za-z_/]+\\])?)?)?",name:"constant.numeric.timestamp"},{match:"(?i)@[0-9]{4}(-Q[1-4]|-[0-9]{2}(-[0-9]{2}(-WK)?)?)?",name:"constant.numeric.date"}]},"identifiers-quoted":{patterns:[{match:"`[^`]*`",name:"variable.other.quoted"}]},"identifiers-unquoted":{patterns:[{match:"(?i)\\b[A-Za-z_][A-Za-z_0-9]*\\b",name:"variable.other"}]},timeframes:{patterns:[{match:"(?i)\\b((year|quarter|month|week|day|hour|minute|second)s?)\\b",name:"keyword.other.timeframe"},{match:"(?i)\\b(day_of_year|day_of_month)\\b",name:"keyword.other.timeframe"}]},comments:{patterns:[{begin:"/\\*",end:"\\*/",beginCaptures:{0:{name:"punctuation.definition.comment.begin"}},endCaptures:{0:{name:"punctuation.definition.comment.end"}},name:"comment.block"},{begin:"//",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-slash"},{begin:"--",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-hyphen"}]},tags:{patterns:[{match:"##\\n",name:"string.quoted",captures:{0:{name:"string.quoted"}}},{begin:'#"',end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-slash"},{match:"#\\n",name:"string.quoted",captures:{0:{name:"string.quoted"}}},{begin:"#\\s",end:"\\n",beginCaptures:{0:{name:"support.type.property-name.json"}},name:"comment.line.double-slash",patterns:[{include:"#tag-values"}]},{begin:"##\\s",end:"\\n",beginCaptures:{0:{name:"support.type.property-name.json"}},name:"comment.line.double-slash",patterns:[{include:"#tag-values"}]},{begin:"#",end:"\\n",beginCaptures:{0:{name:"string.quoted"}},name:"string.quoted"}],repository:{"tag-values":{name:"support.type.property-name.json",match:'(-)?((?:[^\\s=#]+)|(?:"[^#]+"))(?:\\s*(=)\\s*((?:[^\\s=#]+)|(?:"[^#]+")))?',captures:{1:{name:"keyword.control.negate"},2:{name:"support.type.property-name.json"},3:{name:"keyword.operator.comparison.ts"},4:{name:"string.quoted"}}}}},strings:{patterns:[{begin:"'",end:"'",beginCaptures:{0:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},name:"string.quoted.single",patterns:[{include:"#escapes"}]},{begin:'"',end:'"',beginCaptures:{0:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},name:"string.quoted.double",patterns:[{include:"#escapes"}]},{begin:'"""',end:'"""',beginCaptures:{0:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},name:"string.quoted.triple"},{begin:"(?i)[r|/]'",end:"'",name:"string.regexp",patterns:[{include:"#regex-escapes"}]}],repository:{escapes:{name:"constant.character.escape",match:"\\\\(u[A-Fa-f0-9]{4}|.)",captures:{0:{name:"constant.character.escape"}}},"regex-escapes":{name:"constant.character.escape",match:"\\\\.",captures:{0:{name:"constant.character.escape"}}}}},numbers:{match:"(?i)(\\b((0|[1-9][0-9]*)(E[+-]?[0-9]+|\\.[0-9]*)?)|\\.[0-9]+)",name:"constant.numeric"},constants:{patterns:[{match:"(?i)\\bnull\\b",name:"constant.language.null"},{match:"(?i)\\btrue\\b",name:"constant.language.true"},{match:"(?i)\\bfalse\\b",name:"constant.language.false"}]},types:{patterns:[{match:"(?i)\\bstring\\b",name:"entity.name.type.string"},{match:"(?i)\\bnumber\\b",name:"entity.name.type.number"},{match:"(?i)\\bdate\\b",name:"entity.name.type.date"},{match:"(?i)\\btimestamp\\b",name:"entity.name.type.timestamp"},{match:"(?i)\\bboolean\\b",name:"entity.name.type.boolean"}]},properties:{patterns:[{match:"(?i)\\baccept\\b",name:"keyword.control.accept"},{match:"(?i)\\bselect\\b",name:"keyword.control.select"},{match:"(?i)\\bconnection\\b",name:"keyword.control.connection"},{match:"(?i)\\brun\\b",name:"keyword.control.run"},{match:"(?i)\\bextend\\b",name:"keyword.control.extend"},{match:"(?i)\\brefine\\b",name:"keyword.control.refine"},{match:"(?i)\\baggregate\\b",name:"keyword.control.aggregate"},{match:"(?i)\\bsample\\b",name:"keyword.control.sample"},{match:"(?i)\\bcalculate\\b",name:"keyword.control.calculate"},{match:"(?i)\\btimezone\\b",name:"keyword.control.timezone"},{match:"(?i)\\bdimension\\b",name:"keyword.control.dimension"},{match:"(?i)\\bexcept\\b",name:"keyword.control.except"},{match:"(?i)\\bsource\\b",name:"keyword.control.source"},{match:"(?i)\\bgroup_by\\b",name:"keyword.control.group_by"},{match:"(?i)\\bhaving\\b",name:"keyword.control.having"},{match:"(?i)\\bindex\\b",name:"keyword.control.index"},{match:"(?i)\\bjoin_one\\b",name:"keyword.control.join_one"},{match:"(?i)\\bwith\\b",name:"keyword.control.with"},{match:"(?i)\\bjoin_many\\b",name:"keyword.control.join_many"},{match:"(?i)\\bjoin_cross\\b",name:"keyword.control.join_cross"},{match:"(?i)\\blimit\\b",name:"keyword.control.limit"},{match:"(?i)\\bmeasure\\b",name:"keyword.control.measure"},{match:"(?i)\\bnest\\b",name:"keyword.control.nest"},{match:"(?i)\\border_by\\b",name:"keyword.control.order_by"},{match:"(?i)\\bpartition_by\\b",name:"keyword.control.partition_by"},{match:"(?i)\\bprimary_key\\b",name:"keyword.control.primary_key"},{match:"(?i)\\bproject\\b",name:"keyword.control.project"},{match:"(?i)\\bquery\\b",name:"keyword.control.query"},{match:"(?i)\\brename\\b",name:"keyword.control.rename"},{match:"(?i)\\btop\\b",name:"keyword.control.top"},{match:"(?i)\\bview\\b",name:"keyword.control.view"},{match:"(?i)\\bwhere\\b",name:"keyword.control.where"},{match:"(?i)\\bdeclare\\b",name:"keyword.control.declare"}]},keywords:{patterns:[{match:"(?i)\\bis\\b",name:"keyword.control.is"},{match:"(?i)\\bon\\b",name:"keyword.control.on"},{match:"(?i)\\bnot\\b",name:"keyword.other.not"},{match:"(?i)\\bor\\b",name:"keyword.other.or"},{match:"(?i)\\bdesc\\b",name:"keyword.control.desc"},{match:"(?i)\\bby\\b",name:"keyword.control.by"},{match:"(?i)\\band\\b",name:"keyword.other.and"},{match:"(?i)\\basc\\b",name:"keyword.control.asc"},{match:"(?i)\\bfor\\b",name:"keyword.other.for"},{match:"(?i)\\belse\\b",name:"keyword.other.else"},{match:"(?i)\\bto\\b",name:"keyword.other.to"},{match:"(?i)\\bwhen\\b",name:"keyword.other.when"},{match:"(?i)\\bpick\\b",name:"keyword.other.pick"},{match:"(?i)\\bimport\\b",name:"keyword.control.import"}]}}},btr={single:"1em",double:"2em"},Etr=({lineSpacing:a})=>({line(u){const d=[...Array.isArray(u.properties.style)?u.properties.style:typeof u.properties.style=="string"?[u.properties.style]:[]];d.push(`line-height: ${btr[a]};`),u.properties.style=d}}),_tr=({showLineNumbers:a})=>{if(a)return{line(u,d){const f={type:"element",tagName:"span",children:[{type:"text",value:`${d}`}],properties:{style:["color: rgba(115, 138, 148, 0.4);","margin-right: 35px;","width: 1px;","display: inline-block;","user-select: none"]}};u.children.unshift(f)}}},Str=[Etr,_tr];function Atr(a){return Str.map(u=>u(a)).filter(u=>u!==void 0)}let la=class extends Error{constructor(u){super(u),this.name="ShikiError"}};function Ctr(a){return Sse(a)}function Sse(a){return Array.isArray(a)?Rtr(a):a instanceof RegExp?a:typeof a=="object"?Ttr(a):a}function Rtr(a){let u=[];for(let d=0,f=a.length;d<f;d++)u[d]=Sse(a[d]);return u}function Ttr(a){let u={};for(let d in a)u[d]=Sse(a[d]);return u}function vFe(a,...u){return u.forEach(d=>{for(let f in d)a[f]=d[f]}),a}function bFe(a){const u=~a.lastIndexOf("/")||~a.lastIndexOf("\\");return u===0?a:~u===a.length-1?bFe(a.substring(0,a.length-1)):a.substr(~u+1)}var Lre=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Yj=class{static hasCaptures(a){return a===null?!1:(Lre.lastIndex=0,Lre.test(a))}static replaceCaptures(a,u,d){return a.replace(Lre,(f,m,g,x)=>{let b=d[parseInt(m||g,10)];if(b){let v=u.substring(b.start,b.end);for(;v[0]===".";)v=v.substring(1);switch(x){case"downcase":return v.toLowerCase();case"upcase":return v.toUpperCase();default:return v}}else return f})}};function EFe(a,u){return a<u?-1:a>u?1:0}function _Fe(a,u){if(a===null&&u===null)return 0;if(!a)return-1;if(!u)return 1;let d=a.length,f=u.length;if(d===f){for(let m=0;m<d;m++){let g=EFe(a[m],u[m]);if(g!==0)return g}return 0}return d-f}function LLe(a){return!!(/^#[0-9a-f]{6}$/i.test(a)||/^#[0-9a-f]{8}$/i.test(a)||/^#[0-9a-f]{3}$/i.test(a)||/^#[0-9a-f]{4}$/i.test(a))}function SFe(a){return a.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var AFe=class{constructor(a){Ht(this,"cache",new Map),this.fn=a}get(a){if(this.cache.has(a))return this.cache.get(a);const u=this.fn(a);return this.cache.set(a,u),u}},eM=class{constructor(a,u,d){Ht(this,"_cachedMatchRoot",new AFe(f=>this._root.match(f))),this._colorMap=a,this._defaults=u,this._root=d}static createFromRawTheme(a,u){return this.createFromParsedTheme(Ntr(a),u)}static createFromParsedTheme(a,u){return ktr(a,u)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(a){if(a===null)return this._defaults;const u=a.scopeName,f=this._cachedMatchRoot.get(u).find(m=>wtr(a.parent,m.parentScopes));return f?new CFe(f.fontStyle,f.foreground,f.background):null}},Ire=class RF{constructor(u,d){this.parent=u,this.scopeName=d}static push(u,d){for(const f of d)u=new RF(u,f);return u}static from(...u){let d=null;for(let f=0;f<u.length;f++)d=new RF(d,u[f]);return d}push(u){return new RF(this,u)}getSegments(){let u=this;const d=[];for(;u;)d.push(u.scopeName),u=u.parent;return d.reverse(),d}toString(){return this.getSegments().join(" ")}extends(u){return this===u?!0:this.parent===null?!1:this.parent.extends(u)}getExtensionIfDefined(u){const d=[];let f=this;for(;f&&f!==u;)d.push(f.scopeName),f=f.parent;return f===u?d.reverse():void 0}};function wtr(a,u){if(u.length===0)return!0;for(let d=0;d<u.length;d++){let f=u[d],m=!1;if(f===">"){if(d===u.length-1)return!1;f=u[++d],m=!0}for(;a&&!Otr(a.scopeName,f);){if(m)return!1;a=a.parent}if(!a)return!1;a=a.parent}return!0}function Otr(a,u){return u===a||a.startsWith(u)&&a[u.length]==="."}var CFe=class{constructor(a,u,d){this.fontStyle=a,this.foregroundId=u,this.backgroundId=d}};function Ntr(a){if(!a)return[];if(!a.settings||!Array.isArray(a.settings))return[];let u=a.settings,d=[],f=0;for(let m=0,g=u.length;m<g;m++){let x=u[m];if(!x.settings)continue;let b;if(typeof x.scope=="string"){let R=x.scope;R=R.replace(/^[,]+/,""),R=R.replace(/[,]+$/,""),b=R.split(",")}else Array.isArray(x.scope)?b=x.scope:b=[""];let v=-1;if(typeof x.settings.fontStyle=="string"){v=0;let R=x.settings.fontStyle.split(" ");for(let w=0,N=R.length;w<N;w++)switch(R[w]){case"italic":v=v|1;break;case"bold":v=v|2;break;case"underline":v=v|4;break;case"strikethrough":v=v|8;break}}let _=null;typeof x.settings.foreground=="string"&&LLe(x.settings.foreground)&&(_=x.settings.foreground);let S=null;typeof x.settings.background=="string"&&LLe(x.settings.background)&&(S=x.settings.background);for(let R=0,w=b.length;R<w;R++){let k=b[R].trim().split(" "),B=k[k.length-1],P=null;k.length>1&&(P=k.slice(0,k.length-1),P.reverse()),d[f++]=new Dtr(B,P,m,v,_,S)}}return d}var Dtr=class{constructor(a,u,d,f,m,g){this.scope=a,this.parentScopes=u,this.index=d,this.fontStyle=f,this.foreground=m,this.background=g}},o0=(a=>(a[a.NotSet=-1]="NotSet",a[a.None=0]="None",a[a.Italic=1]="Italic",a[a.Bold=2]="Bold",a[a.Underline=4]="Underline",a[a.Strikethrough=8]="Strikethrough",a))(o0||{});function ktr(a,u){a.sort((v,_)=>{let S=EFe(v.scope,_.scope);return S!==0||(S=_Fe(v.parentScopes,_.parentScopes),S!==0)?S:v.index-_.index});let d=0,f="#000000",m="#ffffff";for(;a.length>=1&&a[0].scope==="";){let v=a.shift();v.fontStyle!==-1&&(d=v.fontStyle),v.foreground!==null&&(f=v.foreground),v.background!==null&&(m=v.background)}let g=new Ltr(u),x=new CFe(d,g.getId(f),g.getId(m)),b=new Ptr(new Hne(0,null,-1,0,0),[]);for(let v=0,_=a.length;v<_;v++){let S=a[v];b.insert(0,S.scope,S.parentScopes,S.fontStyle,g.getId(S.foreground),g.getId(S.background))}return new eM(g,x,b)}var Ltr=class{constructor(a){if(Ht(this,"_isFrozen"),Ht(this,"_lastColorId"),Ht(this,"_id2color"),Ht(this,"_color2id"),this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(a)){this._isFrozen=!0;for(let u=0,d=a.length;u<d;u++)this._color2id[a[u]]=u,this._id2color[u]=a[u]}else this._isFrozen=!1}getId(a){if(a===null)return 0;a=a.toUpperCase();let u=this._color2id[a];if(u)return u;if(this._isFrozen)throw new Error(`Missing color in color map - ${a}`);return u=++this._lastColorId,this._color2id[a]=u,this._id2color[u]=a,u}getColorMap(){return this._id2color.slice(0)}},Itr=Object.freeze([]),Hne=class RFe{constructor(u,d,f,m,g){Ht(this,"scopeDepth"),Ht(this,"parentScopes"),Ht(this,"fontStyle"),Ht(this,"foreground"),Ht(this,"background"),this.scopeDepth=u,this.parentScopes=d||Itr,this.fontStyle=f,this.foreground=m,this.background=g}clone(){return new RFe(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(u){let d=[];for(let f=0,m=u.length;f<m;f++)d[f]=u[f].clone();return d}acceptOverwrite(u,d,f,m){this.scopeDepth>u?console.log("how did this happen?"):this.scopeDepth=u,d!==-1&&(this.fontStyle=d),f!==0&&(this.foreground=f),m!==0&&(this.background=m)}},Ptr=class Gne{constructor(u,d=[],f={}){Ht(this,"_rulesWithParentScopes"),this._mainRule=u,this._children=f,this._rulesWithParentScopes=d}static _cmpBySpecificity(u,d){if(u.scopeDepth!==d.scopeDepth)return d.scopeDepth-u.scopeDepth;let f=0,m=0;for(;u.parentScopes[f]===">"&&f++,d.parentScopes[m]===">"&&m++,!(f>=u.parentScopes.length||m>=d.parentScopes.length);){const g=d.parentScopes[m].length-u.parentScopes[f].length;if(g!==0)return g;f++,m++}return d.parentScopes.length-u.parentScopes.length}match(u){if(u!==""){let f=u.indexOf("."),m,g;if(f===-1?(m=u,g=""):(m=u.substring(0,f),g=u.substring(f+1)),this._children.hasOwnProperty(m))return this._children[m].match(g)}const d=this._rulesWithParentScopes.concat(this._mainRule);return d.sort(Gne._cmpBySpecificity),d}insert(u,d,f,m,g,x){if(d===""){this._doInsertHere(u,f,m,g,x);return}let b=d.indexOf("."),v,_;b===-1?(v=d,_=""):(v=d.substring(0,b),_=d.substring(b+1));let S;this._children.hasOwnProperty(v)?S=this._children[v]:(S=new Gne(this._mainRule.clone(),Hne.cloneArr(this._rulesWithParentScopes)),this._children[v]=S),S.insert(u+1,_,f,m,g,x)}_doInsertHere(u,d,f,m,g){if(d===null){this._mainRule.acceptOverwrite(u,f,m,g);return}for(let x=0,b=this._rulesWithParentScopes.length;x<b;x++){let v=this._rulesWithParentScopes[x];if(_Fe(v.parentScopes,d)===0){v.acceptOverwrite(u,f,m,g);return}}f===-1&&(f=this._mainRule.fontStyle),m===0&&(m=this._mainRule.foreground),g===0&&(g=this._mainRule.background),this._rulesWithParentScopes.push(new Hne(u,d,f,m,g))}},lS=class Ju{static toBinaryStr(u){return u.toString(2).padStart(32,"0")}static print(u){const d=Ju.getLanguageId(u),f=Ju.getTokenType(u),m=Ju.getFontStyle(u),g=Ju.getForeground(u),x=Ju.getBackground(u);console.log({languageId:d,tokenType:f,fontStyle:m,foreground:g,background:x})}static getLanguageId(u){return(u&255)>>>0}static getTokenType(u){return(u&768)>>>8}static containsBalancedBrackets(u){return(u&1024)!==0}static getFontStyle(u){return(u&30720)>>>11}static getForeground(u){return(u&16744448)>>>15}static getBackground(u){return(u&4278190080)>>>24}static set(u,d,f,m,g,x,b){let v=Ju.getLanguageId(u),_=Ju.getTokenType(u),S=Ju.containsBalancedBrackets(u)?1:0,R=Ju.getFontStyle(u),w=Ju.getForeground(u),N=Ju.getBackground(u);return d!==0&&(v=d),f!==8&&(_=f),m!==null&&(S=m?1:0),g!==-1&&(R=g),x!==0&&(w=x),b!==0&&(N=b),(v<<0|_<<8|S<<10|R<<11|w<<15|N<<24)>>>0}};function tM(a,u){const d=[],f=jtr(a);let m=f.next();for(;m!==null;){let v=0;if(m.length===2&&m.charAt(1)===":"){switch(m.charAt(0)){case"R":v=1;break;case"L":v=-1;break;default:console.log(`Unknown priority ${m} in scope selector`)}m=f.next()}let _=x();if(d.push({matcher:_,priority:v}),m!==",")break;m=f.next()}return d;function g(){if(m==="-"){m=f.next();const v=g();return _=>!!v&&!v(_)}if(m==="("){m=f.next();const v=b();return m===")"&&(m=f.next()),v}if(ILe(m)){const v=[];do v.push(m),m=f.next();while(ILe(m));return _=>u(v,_)}return null}function x(){const v=[];let _=g();for(;_;)v.push(_),_=g();return S=>v.every(R=>R(S))}function b(){const v=[];let _=x();for(;_&&(v.push(_),m==="|"||m===",");){do m=f.next();while(m==="|"||m===",");_=x()}return S=>v.some(R=>R(S))}}function ILe(a){return!!a&&!!a.match(/[\w\.:]+/)}function jtr(a){let u=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,d=u.exec(a);return{next:()=>{if(!d)return null;const f=d[0];return d=u.exec(a),f}}}function TFe(a){typeof a.dispose=="function"&&a.dispose()}var T5=class{constructor(a){this.scopeName=a}toKey(){return this.scopeName}},Ftr=class{constructor(a,u){this.scopeName=a,this.ruleName=u}toKey(){return`${this.scopeName}#${this.ruleName}`}},Mtr=class{constructor(){Ht(this,"_references",[]),Ht(this,"_seenReferenceKeys",new Set),Ht(this,"visitedRule",new Set)}get references(){return this._references}add(a){const u=a.toKey();this._seenReferenceKeys.has(u)||(this._seenReferenceKeys.add(u),this._references.push(a))}},$tr=class{constructor(a,u){Ht(this,"seenFullScopeRequests",new Set),Ht(this,"seenPartialScopeRequests",new Set),Ht(this,"Q"),this.repo=a,this.initialScopeName=u,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new T5(this.initialScopeName)]}processQueue(){const a=this.Q;this.Q=[];const u=new Mtr;for(const d of a)Btr(d,this.initialScopeName,this.repo,u);for(const d of u.references)if(d instanceof T5){if(this.seenFullScopeRequests.has(d.scopeName))continue;this.seenFullScopeRequests.add(d.scopeName),this.Q.push(d)}else{if(this.seenFullScopeRequests.has(d.scopeName)||this.seenPartialScopeRequests.has(d.toKey()))continue;this.seenPartialScopeRequests.add(d.toKey()),this.Q.push(d)}}};function Btr(a,u,d,f){const m=d.lookup(a.scopeName);if(!m){if(a.scopeName===u)throw new Error(`No grammar provided for <${u}>`);return}const g=d.lookup(u);a instanceof T5?TF({baseGrammar:g,selfGrammar:m},f):Wne(a.ruleName,{baseGrammar:g,selfGrammar:m,repository:m.repository},f);const x=d.injections(a.scopeName);if(x)for(const b of x)f.add(new T5(b))}function Wne(a,u,d){if(u.repository&&u.repository[a]){const f=u.repository[a];rM([f],u,d)}}function TF(a,u){a.selfGrammar.patterns&&Array.isArray(a.selfGrammar.patterns)&&rM(a.selfGrammar.patterns,{...a,repository:a.selfGrammar.repository},u),a.selfGrammar.injections&&rM(Object.values(a.selfGrammar.injections),{...a,repository:a.selfGrammar.repository},u)}function rM(a,u,d){for(const f of a){if(d.visitedRule.has(f))continue;d.visitedRule.add(f);const m=f.repository?vFe({},u.repository,f.repository):u.repository;Array.isArray(f.patterns)&&rM(f.patterns,{...u,repository:m},d);const g=f.include;if(!g)continue;const x=wFe(g);switch(x.kind){case 0:TF({...u,selfGrammar:u.baseGrammar},d);break;case 1:TF(u,d);break;case 2:Wne(x.ruleName,{...u,repository:m},d);break;case 3:case 4:const b=x.scopeName===u.selfGrammar.scopeName?u.selfGrammar:x.scopeName===u.baseGrammar.scopeName?u.baseGrammar:void 0;if(b){const v={baseGrammar:u.baseGrammar,selfGrammar:b,repository:m};x.kind===4?Wne(x.ruleName,v,d):TF(v,d)}else x.kind===4?d.add(new Ftr(x.scopeName,x.ruleName)):d.add(new T5(x.scopeName));break}}}var qtr=class{constructor(){Ht(this,"kind",0)}},Utr=class{constructor(){Ht(this,"kind",1)}},ztr=class{constructor(a){Ht(this,"kind",2),this.ruleName=a}},Htr=class{constructor(a){Ht(this,"kind",3),this.scopeName=a}},Gtr=class{constructor(a,u){Ht(this,"kind",4),this.scopeName=a,this.ruleName=u}};function wFe(a){if(a==="$base")return new qtr;if(a==="$self")return new Utr;const u=a.indexOf("#");if(u===-1)return new Htr(a);if(u===0)return new ztr(a.substring(1));{const d=a.substring(0,u),f=a.substring(u+1);return new Gtr(d,f)}}var Wtr=/\\(\d+)/,PLe=/\\(\d+)/g,Vtr=-1,OFe=-2;var xN=class{constructor(a,u,d,f){Ht(this,"$location"),Ht(this,"id"),Ht(this,"_nameIsCapturing"),Ht(this,"_name"),Ht(this,"_contentNameIsCapturing"),Ht(this,"_contentName"),this.$location=a,this.id=u,this._name=d||null,this._nameIsCapturing=Yj.hasCaptures(this._name),this._contentName=f||null,this._contentNameIsCapturing=Yj.hasCaptures(this._contentName)}get debugName(){const a=this.$location?`${bFe(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${a}`}getName(a,u){return!this._nameIsCapturing||this._name===null||a===null||u===null?this._name:Yj.replaceCaptures(this._name,a,u)}getContentName(a,u){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Yj.replaceCaptures(this._contentName,a,u)}},Qtr=class extends xN{constructor(a,u,d,f,m){super(a,u,d,f),Ht(this,"retokenizeCapturedWithRuleId"),this.retokenizeCapturedWithRuleId=m}dispose(){}collectPatterns(a,u){throw new Error("Not supported!")}compile(a,u){throw new Error("Not supported!")}compileAG(a,u,d,f){throw new Error("Not supported!")}},Ytr=class extends xN{constructor(a,u,d,f,m){super(a,u,d,null),Ht(this,"_match"),Ht(this,"captures"),Ht(this,"_cachedCompiledPatterns"),this._match=new w5(f,this.id),this.captures=m,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(a,u){u.push(this._match)}compile(a,u){return this._getCachedCompiledPatterns(a).compile(a)}compileAG(a,u,d,f){return this._getCachedCompiledPatterns(a).compileAG(a,d,f)}_getCachedCompiledPatterns(a){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new O5,this.collectPatterns(a,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},jLe=class extends xN{constructor(a,u,d,f,m){super(a,u,d,f),Ht(this,"hasMissingPatterns"),Ht(this,"patterns"),Ht(this,"_cachedCompiledPatterns"),this.patterns=m.patterns,this.hasMissingPatterns=m.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(a,u){for(const d of this.patterns)a.getRule(d).collectPatterns(a,u)}compile(a,u){return this._getCachedCompiledPatterns(a).compile(a)}compileAG(a,u,d,f){return this._getCachedCompiledPatterns(a).compileAG(a,d,f)}_getCachedCompiledPatterns(a){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new O5,this.collectPatterns(a,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Vne=class extends xN{constructor(a,u,d,f,m,g,x,b,v,_){super(a,u,d,f),Ht(this,"_begin"),Ht(this,"beginCaptures"),Ht(this,"_end"),Ht(this,"endHasBackReferences"),Ht(this,"endCaptures"),Ht(this,"applyEndPatternLast"),Ht(this,"hasMissingPatterns"),Ht(this,"patterns"),Ht(this,"_cachedCompiledPatterns"),this._begin=new w5(m,this.id),this.beginCaptures=g,this._end=new w5(x||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=b,this.applyEndPatternLast=v||!1,this.patterns=_.patterns,this.hasMissingPatterns=_.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(a,u){return this._end.resolveBackReferences(a,u)}collectPatterns(a,u){u.push(this._begin)}compile(a,u){return this._getCachedCompiledPatterns(a,u).compile(a)}compileAG(a,u,d,f){return this._getCachedCompiledPatterns(a,u).compileAG(a,d,f)}_getCachedCompiledPatterns(a,u){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new O5;for(const d of this.patterns)a.getRule(d).collectPatterns(a,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,u):this._cachedCompiledPatterns.setSource(0,u)),this._cachedCompiledPatterns}},nM=class extends xN{constructor(a,u,d,f,m,g,x,b,v){super(a,u,d,f),Ht(this,"_begin"),Ht(this,"beginCaptures"),Ht(this,"whileCaptures"),Ht(this,"_while"),Ht(this,"whileHasBackReferences"),Ht(this,"hasMissingPatterns"),Ht(this,"patterns"),Ht(this,"_cachedCompiledPatterns"),Ht(this,"_cachedCompiledWhilePatterns"),this._begin=new w5(m,this.id),this.beginCaptures=g,this.whileCaptures=b,this._while=new w5(x,OFe),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=v.patterns,this.hasMissingPatterns=v.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(a,u){return this._while.resolveBackReferences(a,u)}collectPatterns(a,u){u.push(this._begin)}compile(a,u){return this._getCachedCompiledPatterns(a).compile(a)}compileAG(a,u,d,f){return this._getCachedCompiledPatterns(a).compileAG(a,d,f)}_getCachedCompiledPatterns(a){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new O5;for(const u of this.patterns)a.getRule(u).collectPatterns(a,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(a,u){return this._getCachedCompiledWhilePatterns(a,u).compile(a)}compileWhileAG(a,u,d,f){return this._getCachedCompiledWhilePatterns(a,u).compileAG(a,d,f)}_getCachedCompiledWhilePatterns(a,u){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new O5,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,u||""),this._cachedCompiledWhilePatterns}},NFe=class oa{static createCaptureRule(u,d,f,m,g){return u.registerRule(x=>new Qtr(d,x,f,m,g))}static getCompiledRuleId(u,d,f){return u.id||d.registerRule(m=>{if(u.id=m,u.match)return new Ytr(u.$vscodeTextmateLocation,u.id,u.name,u.match,oa._compileCaptures(u.captures,d,f));if(typeof u.begin>"u"){u.repository&&(f=vFe({},f,u.repository));let g=u.patterns;return typeof g>"u"&&u.include&&(g=[{include:u.include}]),new jLe(u.$vscodeTextmateLocation,u.id,u.name,u.contentName,oa._compilePatterns(g,d,f))}return u.while?new nM(u.$vscodeTextmateLocation,u.id,u.name,u.contentName,u.begin,oa._compileCaptures(u.beginCaptures||u.captures,d,f),u.while,oa._compileCaptures(u.whileCaptures||u.captures,d,f),oa._compilePatterns(u.patterns,d,f)):new Vne(u.$vscodeTextmateLocation,u.id,u.name,u.contentName,u.begin,oa._compileCaptures(u.beginCaptures||u.captures,d,f),u.end,oa._compileCaptures(u.endCaptures||u.captures,d,f),u.applyEndPatternLast,oa._compilePatterns(u.patterns,d,f))}),u.id}static _compileCaptures(u,d,f){let m=[];if(u){let g=0;for(const x in u){if(x==="$vscodeTextmateLocation")continue;const b=parseInt(x,10);b>g&&(g=b)}for(let x=0;x<=g;x++)m[x]=null;for(const x in u){if(x==="$vscodeTextmateLocation")continue;const b=parseInt(x,10);let v=0;u[x].patterns&&(v=oa.getCompiledRuleId(u[x],d,f)),m[b]=oa.createCaptureRule(d,u[x].$vscodeTextmateLocation,u[x].name,u[x].contentName,v)}}return m}static _compilePatterns(u,d,f){let m=[];if(u)for(let g=0,x=u.length;g<x;g++){const b=u[g];let v=-1;if(b.include){const _=wFe(b.include);switch(_.kind){case 0:case 1:v=oa.getCompiledRuleId(f[b.include],d,f);break;case 2:let S=f[_.ruleName];S&&(v=oa.getCompiledRuleId(S,d,f));break;case 3:case 4:const R=_.scopeName,w=_.kind===4?_.ruleName:null,N=d.getExternalGrammar(R,f);if(N)if(w){let k=N.repository[w];k&&(v=oa.getCompiledRuleId(k,d,N.repository))}else v=oa.getCompiledRuleId(N.repository.$self,d,N.repository);break}}else v=oa.getCompiledRuleId(b,d,f);if(v!==-1){const _=d.getRule(v);let S=!1;if((_ instanceof jLe||_ instanceof Vne||_ instanceof nM)&&_.hasMissingPatterns&&_.patterns.length===0&&(S=!0),S)continue;m.push(v)}}return{patterns:m,hasMissingPatterns:(u?u.length:0)!==m.length}}},w5=class DFe{constructor(u,d){if(Ht(this,"source"),Ht(this,"ruleId"),Ht(this,"hasAnchor"),Ht(this,"hasBackReferences"),Ht(this,"_anchorCache"),u&&typeof u=="string"){const f=u.length;let m=0,g=[],x=!1;for(let b=0;b<f;b++)if(u.charAt(b)==="\\"&&b+1<f){const _=u.charAt(b+1);_==="z"?(g.push(u.substring(m,b)),g.push("$(?!\\n)(?<!\\n)"),m=b+2):(_==="A"||_==="G")&&(x=!0),b++}this.hasAnchor=x,m===0?this.source=u:(g.push(u.substring(m,f)),this.source=g.join(""))}else this.hasAnchor=!1,this.source=u;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=d,typeof this.source=="string"?this.hasBackReferences=Wtr.test(this.source):this.hasBackReferences=!1}clone(){return new DFe(this.source,this.ruleId)}setSource(u){this.source!==u&&(this.source=u,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(u,d){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let f=d.map(m=>u.substring(m.start,m.end));return PLe.lastIndex=0,this.source.replace(PLe,(m,g)=>SFe(f[parseInt(g,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let u=[],d=[],f=[],m=[],g,x,b,v;for(g=0,x=this.source.length;g<x;g++)b=this.source.charAt(g),u[g]=b,d[g]=b,f[g]=b,m[g]=b,b==="\\"&&g+1<x&&(v=this.source.charAt(g+1),v==="A"?(u[g+1]="",d[g+1]="",f[g+1]="A",m[g+1]="A"):v==="G"?(u[g+1]="",d[g+1]="G",f[g+1]="",m[g+1]="G"):(u[g+1]=v,d[g+1]=v,f[g+1]=v,m[g+1]=v),g++);return{A0_G0:u.join(""),A0_G1:d.join(""),A1_G0:f.join(""),A1_G1:m.join("")}}resolveAnchors(u,d){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:u?d?this._anchorCache.A1_G1:this._anchorCache.A1_G0:d?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},O5=class{constructor(){Ht(this,"_items"),Ht(this,"_hasAnchors"),Ht(this,"_cached"),Ht(this,"_anchorCache"),this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(a){this._items.push(a),this._hasAnchors=this._hasAnchors||a.hasAnchor}unshift(a){this._items.unshift(a),this._hasAnchors=this._hasAnchors||a.hasAnchor}length(){return this._items.length}setSource(a,u){this._items[a].source!==u&&(this._disposeCaches(),this._items[a].setSource(u))}compile(a){if(!this._cached){let u=this._items.map(d=>d.source);this._cached=new FLe(a,u,this._items.map(d=>d.ruleId))}return this._cached}compileAG(a,u,d){return this._hasAnchors?u?d?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(a,u,d)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(a,u,d)),this._anchorCache.A1_G0):d?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(a,u,d)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(a,u,d)),this._anchorCache.A0_G0):this.compile(a)}_resolveAnchors(a,u,d){let f=this._items.map(m=>m.resolveAnchors(u,d));return new FLe(a,f,this._items.map(m=>m.ruleId))}},FLe=class{constructor(a,u,d){Ht(this,"scanner"),this.regExps=u,this.rules=d,this.scanner=a.createOnigScanner(u)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const a=[];for(let u=0,d=this.rules.length;u<d;u++)a.push(" - "+this.rules[u]+": "+this.regExps[u]);return a.join(`
|
|
2715
2715
|
`)}findNextMatchSync(a,u,d){const f=this.scanner.findNextMatchSync(a,u,d);return f?{ruleId:this.rules[f.index],captureIndices:f.captureIndices}:null}},Pre=class{constructor(a,u){this.languageId=a,this.tokenType=u}},Ktr=(k_=class{constructor(a,u){Ht(this,"_defaultAttributes"),Ht(this,"_embeddedLanguagesMatcher"),Ht(this,"_getBasicScopeAttributes",new AFe(d=>{const f=this._scopeToLanguage(d),m=this._toStandardTokenType(d);return new Pre(f,m)})),this._defaultAttributes=new Pre(a,8),this._embeddedLanguagesMatcher=new Xtr(Object.entries(u||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(a){return a===null?k_._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(a)}_scopeToLanguage(a){return this._embeddedLanguagesMatcher.match(a)||0}_toStandardTokenType(a){const u=a.match(k_.STANDARD_TOKEN_TYPE_REGEXP);if(!u)return 8;switch(u[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}},Ht(k_,"_NULL_SCOPE_METADATA",new Pre(0,0)),Ht(k_,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),k_),Xtr=class{constructor(a){if(Ht(this,"values"),Ht(this,"scopesRegExp"),a.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(a);const u=a.map(([d,f])=>SFe(d));u.sort(),u.reverse(),this.scopesRegExp=new RegExp(`^((${u.join(")|(")}))($|\\.)`,"")}}match(a){if(!this.scopesRegExp)return;const u=a.match(this.scopesRegExp);if(u)return this.values.get(u[1])}},MLe=class{constructor(a,u){this.stack=a,this.stoppedEarly=u}};function kFe(a,u,d,f,m,g,x,b){const v=u.content.length;let _=!1,S=-1;if(x){const N=Jtr(a,u,d,f,m,g);m=N.stack,f=N.linePos,d=N.isFirstLine,S=N.anchorPosition}const R=Date.now();for(;!_;){if(b!==0&&Date.now()-R>b)return new MLe(m,!0);w()}return new MLe(m,!1);function w(){const N=Ztr(a,u,d,f,m,S);if(!N){g.produce(m,v),_=!0;return}const k=N.captureIndices,B=N.matchedRuleId,P=k&&k.length>0?k[0].end>f:!1;if(B===Vtr){const $=m.getRule(a);g.produce(m,k[0].start),m=m.withContentNameScopesList(m.nameScopesList),s5(a,u,d,m,g,$.endCaptures,k),g.produce(m,k[0].end);const q=m;if(m=m.parent,S=q.getAnchorPos(),!P&&q.getEnterPos()===f){m=q,g.produce(m,v),_=!0;return}}else{const $=a.getRule(B);g.produce(m,k[0].start);const q=m,z=$.getName(u.content,k),W=m.contentNameScopesList.pushAttributed(z,a);if(m=m.push(B,f,S,k[0].end===v,null,W,W),$ instanceof Vne){const X=$;s5(a,u,d,m,g,X.beginCaptures,k),g.produce(m,k[0].end),S=k[0].end;const J=X.getContentName(u.content,k),ee=W.pushAttributed(J,a);if(m=m.withContentNameScopesList(ee),X.endHasBackReferences&&(m=m.withEndRule(X.getEndWithResolvedBackReferences(u.content,k))),!P&&q.hasSameRuleAs(m)){m=m.pop(),g.produce(m,v),_=!0;return}}else if($ instanceof nM){const X=$;s5(a,u,d,m,g,X.beginCaptures,k),g.produce(m,k[0].end),S=k[0].end;const J=X.getContentName(u.content,k),ee=W.pushAttributed(J,a);if(m=m.withContentNameScopesList(ee),X.whileHasBackReferences&&(m=m.withEndRule(X.getWhileWithResolvedBackReferences(u.content,k))),!P&&q.hasSameRuleAs(m)){m=m.pop(),g.produce(m,v),_=!0;return}}else if(s5(a,u,d,m,g,$.captures,k),g.produce(m,k[0].end),m=m.pop(),!P){m=m.safePop(),g.produce(m,v),_=!0;return}}k[0].end>f&&(f=k[0].end,d=!1)}}function Jtr(a,u,d,f,m,g){let x=m.beginRuleCapturedEOL?0:-1;const b=[];for(let v=m;v;v=v.pop()){const _=v.getRule(a);_ instanceof nM&&b.push({rule:_,stack:v})}for(let v=b.pop();v;v=b.pop()){const{ruleScanner:_,findOptions:S}=rrr(v.rule,a,v.stack.endRule,d,f===x),R=_.findNextMatchSync(u,f,S);if(R){if(R.ruleId!==OFe){m=v.stack.pop();break}R.captureIndices&&R.captureIndices.length&&(g.produce(v.stack,R.captureIndices[0].start),s5(a,u,d,v.stack,g,v.rule.whileCaptures,R.captureIndices),g.produce(v.stack,R.captureIndices[0].end),x=R.captureIndices[0].end,R.captureIndices[0].end>f&&(f=R.captureIndices[0].end,d=!1))}else{m=v.stack.pop();break}}return{stack:m,linePos:f,anchorPosition:x,isFirstLine:d}}function Ztr(a,u,d,f,m,g){const x=err(a,u,d,f,m,g),b=a.getInjections();if(b.length===0)return x;const v=trr(b,a,u,d,f,m,g);if(!v)return x;if(!x)return v;const _=x.captureIndices[0].start,S=v.captureIndices[0].start;return S<_||v.priorityMatch&&S===_?v:x}function err(a,u,d,f,m,g){const x=m.getRule(a),{ruleScanner:b,findOptions:v}=LFe(x,a,m.endRule,d,f===g),_=b.findNextMatchSync(u,f,v);return _?{captureIndices:_.captureIndices,matchedRuleId:_.ruleId}:null}function trr(a,u,d,f,m,g,x){let b=Number.MAX_VALUE,v=null,_,S=0;const R=g.contentNameScopesList.getScopeNames();for(let w=0,N=a.length;w<N;w++){const k=a[w];if(!k.matcher(R))continue;const B=u.getRule(k.ruleId),{ruleScanner:P,findOptions:$}=LFe(B,u,null,f,m===x),q=P.findNextMatchSync(d,m,$);if(!q)continue;const z=q.captureIndices[0].start;if(!(z>=b)&&(b=z,v=q.captureIndices,_=q.ruleId,S=k.priority,b===m))break}return v?{priorityMatch:S===-1,captureIndices:v,matchedRuleId:_}:null}function LFe(a,u,d,f,m){return{ruleScanner:a.compileAG(u,d,f,m),findOptions:0}}function rrr(a,u,d,f,m){return{ruleScanner:a.compileWhileAG(u,d,f,m),findOptions:0}}function s5(a,u,d,f,m,g,x){if(g.length===0)return;const b=u.content,v=Math.min(g.length,x.length),_=[],S=x[0].end;for(let R=0;R<v;R++){const w=g[R];if(w===null)continue;const N=x[R];if(N.length===0)continue;if(N.start>S)break;for(;_.length>0&&_[_.length-1].endPos<=N.start;)m.produceFromScopes(_[_.length-1].scopes,_[_.length-1].endPos),_.pop();if(_.length>0?m.produceFromScopes(_[_.length-1].scopes,N.start):m.produce(f,N.start),w.retokenizeCapturedWithRuleId){const B=w.getName(b,x),P=f.contentNameScopesList.pushAttributed(B,a),$=w.getContentName(b,x),q=P.pushAttributed($,a),z=f.push(w.retokenizeCapturedWithRuleId,N.start,-1,!1,null,P,q),W=a.createOnigString(b.substring(0,N.end));kFe(a,W,d&&N.start===0,N.start,z,m,!1,0),TFe(W);continue}const k=w.getName(b,x);if(k!==null){const P=(_.length>0?_[_.length-1].scopes:f.contentNameScopesList).pushAttributed(k,a);_.push(new nrr(P,N.end))}}for(;_.length>0;)m.produceFromScopes(_[_.length-1].scopes,_[_.length-1].endPos),_.pop()}var nrr=class{constructor(a,u){Ht(this,"scopes"),Ht(this,"endPos"),this.scopes=a,this.endPos=u}};function irr(a,u,d,f,m,g,x,b){return new orr(a,u,d,f,m,g,x,b)}function $Le(a,u,d,f,m){const g=tM(u,iM),x=NFe.getCompiledRuleId(d,f,m.repository);for(const b of g)a.push({debugSelector:u,matcher:b.matcher,ruleId:x,grammar:m,priority:b.priority})}function iM(a,u){if(u.length<a.length)return!1;let d=0;return a.every(f=>{for(let m=d;m<u.length;m++)if(srr(u[m],f))return d=m+1,!0;return!1})}function srr(a,u){if(!a)return!1;if(a===u)return!0;const d=u.length;return a.length>d&&a.substr(0,d)===u&&a[d]==="."}var orr=class{constructor(a,u,d,f,m,g,x,b){if(Ht(this,"_rootId"),Ht(this,"_lastRuleId"),Ht(this,"_ruleId2desc"),Ht(this,"_includedGrammars"),Ht(this,"_grammarRepository"),Ht(this,"_grammar"),Ht(this,"_injections"),Ht(this,"_basicScopeAttributesProvider"),Ht(this,"_tokenTypeMatchers"),this._rootScopeName=a,this.balancedBracketSelectors=g,this._onigLib=b,this._basicScopeAttributesProvider=new Ktr(d,f),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=x,this._grammar=BLe(u,null),this._injections=null,this._tokenTypeMatchers=[],m)for(const v of Object.keys(m)){const _=tM(v,iM);for(const S of _)this._tokenTypeMatchers.push({matcher:S.matcher,type:m[v]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const a of this._ruleId2desc)a&&a.dispose()}createOnigScanner(a){return this._onigLib.createOnigScanner(a)}createOnigString(a){return this._onigLib.createOnigString(a)}getMetadataForScope(a){return this._basicScopeAttributesProvider.getBasicScopeAttributes(a)}_collectInjections(){const a={lookup:m=>m===this._rootScopeName?this._grammar:this.getExternalGrammar(m),injections:m=>this._grammarRepository.injections(m)},u=[],d=this._rootScopeName,f=a.lookup(d);if(f){const m=f.injections;if(m)for(let x in m)$Le(u,x,m[x],this,f);const g=this._grammarRepository.injections(d);g&&g.forEach(x=>{const b=this.getExternalGrammar(x);if(b){const v=b.injectionSelector;v&&$Le(u,v,b,this,b)}})}return u.sort((m,g)=>m.priority-g.priority),u}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(a){const u=++this._lastRuleId,d=a(u);return this._ruleId2desc[u]=d,d}getRule(a){return this._ruleId2desc[a]}getExternalGrammar(a,u){if(this._includedGrammars[a])return this._includedGrammars[a];if(this._grammarRepository){const d=this._grammarRepository.lookup(a);if(d)return this._includedGrammars[a]=BLe(d,u&&u.$base),this._includedGrammars[a]}}tokenizeLine(a,u,d=0){const f=this._tokenize(a,u,!1,d);return{tokens:f.lineTokens.getResult(f.ruleStack,f.lineLength),ruleStack:f.ruleStack,stoppedEarly:f.stoppedEarly}}tokenizeLine2(a,u,d=0){const f=this._tokenize(a,u,!0,d);return{tokens:f.lineTokens.getBinaryResult(f.ruleStack,f.lineLength),ruleStack:f.ruleStack,stoppedEarly:f.stoppedEarly}}_tokenize(a,u,d,f){this._rootId===-1&&(this._rootId=NFe.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let m;if(!u||u===Qne.NULL){m=!0;const _=this._basicScopeAttributesProvider.getDefaultAttributes(),S=this.themeProvider.getDefaults(),R=lS.set(0,_.languageId,_.tokenType,null,S.fontStyle,S.foregroundId,S.backgroundId),w=this.getRule(this._rootId).getName(null,null);let N;w?N=u5.createRootAndLookUpScopeName(w,R,this):N=u5.createRoot("unknown",R),u=new Qne(null,this._rootId,-1,-1,!1,null,N,N)}else m=!1,u.reset();a=a+`
|
|
2716
2716
|
`;const g=this.createOnigString(a),x=g.content.length,b=new lrr(d,a,this._tokenTypeMatchers,this.balancedBracketSelectors),v=kFe(this,g,m,0,u,b,!0,f);return TFe(g),{lineLength:x,lineTokens:b,ruleStack:v.stack,stoppedEarly:v.stoppedEarly}}};function BLe(a,u){return a=Ctr(a),a.repository=a.repository||{},a.repository.$self={$vscodeTextmateLocation:a.$vscodeTextmateLocation,patterns:a.patterns,name:a.scopeName},a.repository.$base=u||a.repository.$self,a}var u5=class dh{constructor(u,d,f){this.parent=u,this.scopePath=d,this.tokenAttributes=f}static fromExtension(u,d){let f=u,m=u?.scopePath??null;for(const g of d)m=Ire.push(m,g.scopeNames),f=new dh(f,m,g.encodedTokenAttributes);return f}static createRoot(u,d){return new dh(null,new Ire(null,u),d)}static createRootAndLookUpScopeName(u,d,f){const m=f.getMetadataForScope(u),g=new Ire(null,u),x=f.themeProvider.themeMatch(g),b=dh.mergeAttributes(d,m,x);return new dh(null,g,b)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(u){return dh.equals(this,u)}static equals(u,d){do{if(u===d||!u&&!d)return!0;if(!u||!d||u.scopeName!==d.scopeName||u.tokenAttributes!==d.tokenAttributes)return!1;u=u.parent,d=d.parent}while(!0)}static mergeAttributes(u,d,f){let m=-1,g=0,x=0;return f!==null&&(m=f.fontStyle,g=f.foregroundId,x=f.backgroundId),lS.set(u,d.languageId,d.tokenType,null,m,g,x)}pushAttributed(u,d){if(u===null)return this;if(u.indexOf(" ")===-1)return dh._pushAttributed(this,u,d);const f=u.split(/ /g);let m=this;for(const g of f)m=dh._pushAttributed(m,g,d);return m}static _pushAttributed(u,d,f){const m=f.getMetadataForScope(d),g=u.scopePath.push(d),x=f.themeProvider.themeMatch(g),b=dh.mergeAttributes(u.tokenAttributes,m,x);return new dh(u,g,b)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(u){var d;const f=[];let m=this;for(;m&&m!==u;)f.push({encodedTokenAttributes:m.tokenAttributes,scopeNames:m.scopePath.getExtensionIfDefined(((d=m.parent)==null?void 0:d.scopePath)??null)}),m=m.parent;return m===u?f.reverse():void 0}},Qne=(Jm=class{constructor(a,u,d,f,m,g,x,b){Ht(this,"_stackElementBrand"),Ht(this,"_enterPos"),Ht(this,"_anchorPos"),Ht(this,"depth"),this.parent=a,this.ruleId=u,this.beginRuleCapturedEOL=m,this.endRule=g,this.nameScopesList=x,this.contentNameScopesList=b,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=d,this._anchorPos=f}equals(a){return a===null?!1:Jm._equals(this,a)}static _equals(a,u){return a===u?!0:this._structuralEquals(a,u)?u5.equals(a.contentNameScopesList,u.contentNameScopesList):!1}static _structuralEquals(a,u){do{if(a===u||!a&&!u)return!0;if(!a||!u||a.depth!==u.depth||a.ruleId!==u.ruleId||a.endRule!==u.endRule)return!1;a=a.parent,u=u.parent}while(!0)}clone(){return this}static _reset(a){for(;a;)a._enterPos=-1,a._anchorPos=-1,a=a.parent}reset(){Jm._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(a,u,d,f,m,g,x){return new Jm(this,a,u,d,f,m,g,x)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(a){return a.getRule(this.ruleId)}toString(){const a=[];return this._writeString(a,0),"["+a.join(",")+"]"}_writeString(a,u){var d,f;return this.parent&&(u=this.parent._writeString(a,u)),a[u++]=`(${this.ruleId}, ${(d=this.nameScopesList)==null?void 0:d.toString()}, ${(f=this.contentNameScopesList)==null?void 0:f.toString()})`,u}withContentNameScopesList(a){return this.contentNameScopesList===a?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,a)}withEndRule(a){return this.endRule===a?this:new Jm(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,a,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(a){let u=this;for(;u&&u._enterPos===a._enterPos;){if(u.ruleId===a.ruleId)return!0;u=u.parent}return!1}toStateStackFrame(){var a,u,d;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((u=this.nameScopesList)==null?void 0:u.getExtensionIfDefined(((a=this.parent)==null?void 0:a.nameScopesList)??null))??[],contentNameScopesList:((d=this.contentNameScopesList)==null?void 0:d.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(a,u){const d=u5.fromExtension(a?.nameScopesList??null,u.nameScopesList);return new Jm(a,u.ruleId,u.enterPos??-1,u.anchorPos??-1,u.beginRuleCapturedEOL,u.endRule,d,u5.fromExtension(d,u.contentNameScopesList))}},Ht(Jm,"NULL",new Jm(null,0,0,0,!1,null,null,null)),Jm),arr=class{constructor(a,u){Ht(this,"balancedBracketScopes"),Ht(this,"unbalancedBracketScopes"),Ht(this,"allowAny",!1),this.balancedBracketScopes=a.flatMap(d=>d==="*"?(this.allowAny=!0,[]):tM(d,iM).map(f=>f.matcher)),this.unbalancedBracketScopes=u.flatMap(d=>tM(d,iM).map(f=>f.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(a){for(const u of this.unbalancedBracketScopes)if(u(a))return!1;for(const u of this.balancedBracketScopes)if(u(a))return!0;return this.allowAny}},lrr=class{constructor(a,u,d,f){Ht(this,"_emitBinaryTokens"),Ht(this,"_lineText"),Ht(this,"_tokens"),Ht(this,"_binaryTokens"),Ht(this,"_lastTokenEndIndex"),Ht(this,"_tokenTypeOverrides"),this.balancedBracketSelectors=f,this._emitBinaryTokens=a,this._tokenTypeOverrides=d,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(a,u){this.produceFromScopes(a.contentNameScopesList,u)}produceFromScopes(a,u){var d;if(this._lastTokenEndIndex>=u)return;if(this._emitBinaryTokens){let m=a?.tokenAttributes??0,g=!1;if((d=this.balancedBracketSelectors)!=null&&d.matchesAlways&&(g=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const x=a?.getScopeNames()??[];for(const b of this._tokenTypeOverrides)b.matcher(x)&&(m=lS.set(m,0,b.type,null,-1,0,0));this.balancedBracketSelectors&&(g=this.balancedBracketSelectors.match(x))}if(g&&(m=lS.set(m,0,8,g,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===m){this._lastTokenEndIndex=u;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(m),this._lastTokenEndIndex=u;return}const f=a?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:u,scopes:f}),this._lastTokenEndIndex=u}getResult(a,u){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===u-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(a,u),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(a,u){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===u-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(a,u),this._binaryTokens[this._binaryTokens.length-2]=0);const d=new Uint32Array(this._binaryTokens.length);for(let f=0,m=this._binaryTokens.length;f<m;f++)d[f]=this._binaryTokens[f];return d}},urr=class{constructor(a,u){Ht(this,"_grammars",new Map),Ht(this,"_rawGrammars",new Map),Ht(this,"_injectionGrammars",new Map),Ht(this,"_theme"),this._onigLib=u,this._theme=a}dispose(){for(const a of this._grammars.values())a.dispose()}setTheme(a){this._theme=a}getColorMap(){return this._theme.getColorMap()}addGrammar(a,u){this._rawGrammars.set(a.scopeName,a),u&&this._injectionGrammars.set(a.scopeName,u)}lookup(a){return this._rawGrammars.get(a)}injections(a){return this._injectionGrammars.get(a)}getDefaults(){return this._theme.getDefaults()}themeMatch(a){return this._theme.match(a)}grammarForScopeName(a,u,d,f,m){if(!this._grammars.has(a)){let g=this._rawGrammars.get(a);if(!g)return null;this._grammars.set(a,irr(a,g,u,d,f,m,this,this._onigLib))}return this._grammars.get(a)}},crr=class{constructor(u){Ht(this,"_options"),Ht(this,"_syncRegistry"),Ht(this,"_ensureGrammarCache"),this._options=u,this._syncRegistry=new urr(eM.createFromRawTheme(u.theme,u.colorMap),u.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(u,d){this._syncRegistry.setTheme(eM.createFromRawTheme(u,d))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(u,d,f){return this.loadGrammarWithConfiguration(u,d,{embeddedLanguages:f})}loadGrammarWithConfiguration(u,d,f){return this._loadGrammar(u,d,f.embeddedLanguages,f.tokenTypes,new arr(f.balancedBracketSelectors||[],f.unbalancedBracketSelectors||[]))}loadGrammar(u){return this._loadGrammar(u,0,null,null,null)}_loadGrammar(u,d,f,m,g){const x=new $tr(this._syncRegistry,u);for(;x.Q.length>0;)x.Q.map(b=>this._loadSingleGrammar(b.scopeName)),x.processQueue();return this._grammarForScopeName(u,d,f,m,g)}_loadSingleGrammar(u){this._ensureGrammarCache.has(u)||(this._doLoadSingleGrammar(u),this._ensureGrammarCache.set(u,!0))}_doLoadSingleGrammar(u){const d=this._options.loadGrammar(u);if(d){const f=typeof this._options.getInjections=="function"?this._options.getInjections(u):void 0;this._syncRegistry.addGrammar(d,f)}}addGrammar(u,d=[],f=0,m=null){return this._syncRegistry.addGrammar(u,d),this._grammarForScopeName(u.scopeName,f,m)}_grammarForScopeName(u,d=0,f=null,m=null,g=null){return this._syncRegistry.grammarForScopeName(u,d,f,m,g)}},Yne=Qne.NULL;const drr=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class yN{constructor(u,d,f){this.normal=d,this.property=u,f&&(this.space=f)}}yN.prototype.normal={};yN.prototype.property={};yN.prototype.space=void 0;function IFe(a,u){const d={},f={};for(const m of a)Object.assign(d,m.property),Object.assign(f,m.normal);return new yN(d,f,u)}function Kne(a){return a.toLowerCase()}class Rl{constructor(u,d){this.attribute=d,this.property=u}}Rl.prototype.attribute="";Rl.prototype.booleanish=!1;Rl.prototype.boolean=!1;Rl.prototype.commaOrSpaceSeparated=!1;Rl.prototype.commaSeparated=!1;Rl.prototype.defined=!1;Rl.prototype.mustUseProperty=!1;Rl.prototype.number=!1;Rl.prototype.overloadedBoolean=!1;Rl.prototype.property="";Rl.prototype.spaceSeparated=!1;Rl.prototype.space=void 0;let frr=0;const cn=Kv(),Es=Kv(),PFe=Kv(),sr=Kv(),Ci=Kv(),X_=Kv(),su=Kv();function Kv(){return 2**++frr}const Xne=Object.freeze(Object.defineProperty({__proto__:null,boolean:cn,booleanish:Es,commaOrSpaceSeparated:su,commaSeparated:X_,number:sr,overloadedBoolean:PFe,spaceSeparated:Ci},Symbol.toStringTag,{value:"Module"})),jre=Object.keys(Xne);class Ase extends Rl{constructor(u,d,f,m){let g=-1;if(super(u,d),qLe(this,"space",m),typeof f=="number")for(;++g<jre.length;){const x=jre[g];qLe(this,jre[g],(f&Xne[x])===Xne[x])}}}Ase.prototype.defined=!0;function qLe(a,u,d){d&&(a[u]=d)}function $S(a){const u={},d={};for(const[f,m]of Object.entries(a.properties)){const g=new Ase(f,a.transform(a.attributes||{},f),m,a.space);a.mustUseProperty&&a.mustUseProperty.includes(f)&&(g.mustUseProperty=!0),u[f]=g,d[Kne(f)]=f,d[Kne(g.attribute)]=f}return new yN(u,d,a.space)}const jFe=$S({properties:{ariaActiveDescendant:null,ariaAtomic:Es,ariaAutoComplete:null,ariaBusy:Es,ariaChecked:Es,ariaColCount:sr,ariaColIndex:sr,ariaColSpan:sr,ariaControls:Ci,ariaCurrent:null,ariaDescribedBy:Ci,ariaDetails:null,ariaDisabled:Es,ariaDropEffect:Ci,ariaErrorMessage:null,ariaExpanded:Es,ariaFlowTo:Ci,ariaGrabbed:Es,ariaHasPopup:null,ariaHidden:Es,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ci,ariaLevel:sr,ariaLive:null,ariaModal:Es,ariaMultiLine:Es,ariaMultiSelectable:Es,ariaOrientation:null,ariaOwns:Ci,ariaPlaceholder:null,ariaPosInSet:sr,ariaPressed:Es,ariaReadOnly:Es,ariaRelevant:null,ariaRequired:Es,ariaRoleDescription:Ci,ariaRowCount:sr,ariaRowIndex:sr,ariaRowSpan:sr,ariaSelected:Es,ariaSetSize:sr,ariaSort:null,ariaValueMax:sr,ariaValueMin:sr,ariaValueNow:sr,ariaValueText:null,role:null},transform(a,u){return u==="role"?u:"aria-"+u.slice(4).toLowerCase()}});function FFe(a,u){return u in a?a[u]:u}function MFe(a,u){return FFe(a,u.toLowerCase())}const hrr=$S({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:X_,acceptCharset:Ci,accessKey:Ci,action:null,allow:null,allowFullScreen:cn,allowPaymentRequest:cn,allowUserMedia:cn,alt:null,as:null,async:cn,autoCapitalize:null,autoComplete:Ci,autoFocus:cn,autoPlay:cn,blocking:Ci,capture:null,charSet:null,checked:cn,cite:null,className:Ci,cols:sr,colSpan:null,content:null,contentEditable:Es,controls:cn,controlsList:Ci,coords:sr|X_,crossOrigin:null,data:null,dateTime:null,decoding:null,default:cn,defer:cn,dir:null,dirName:null,disabled:cn,download:PFe,draggable:Es,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:cn,formTarget:null,headers:Ci,height:sr,hidden:cn,high:sr,href:null,hrefLang:null,htmlFor:Ci,httpEquiv:Ci,id:null,imageSizes:null,imageSrcSet:null,inert:cn,inputMode:null,integrity:null,is:null,isMap:cn,itemId:null,itemProp:Ci,itemRef:Ci,itemScope:cn,itemType:Ci,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:cn,low:sr,manifest:null,max:null,maxLength:sr,media:null,method:null,min:null,minLength:sr,multiple:cn,muted:cn,name:null,nonce:null,noModule:cn,noValidate:cn,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:cn,optimum:sr,pattern:null,ping:Ci,placeholder:null,playsInline:cn,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:cn,referrerPolicy:null,rel:Ci,required:cn,reversed:cn,rows:sr,rowSpan:sr,sandbox:Ci,scope:null,scoped:cn,seamless:cn,selected:cn,shadowRootClonable:cn,shadowRootDelegatesFocus:cn,shadowRootMode:null,shape:null,size:sr,sizes:null,slot:null,span:sr,spellCheck:Es,src:null,srcDoc:null,srcLang:null,srcSet:null,start:sr,step:null,style:null,tabIndex:sr,target:null,title:null,translate:null,type:null,typeMustMatch:cn,useMap:null,value:Es,width:sr,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ci,axis:null,background:null,bgColor:null,border:sr,borderColor:null,bottomMargin:sr,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:cn,declare:cn,event:null,face:null,frame:null,frameBorder:null,hSpace:sr,leftMargin:sr,link:null,longDesc:null,lowSrc:null,marginHeight:sr,marginWidth:sr,noResize:cn,noHref:cn,noShade:cn,noWrap:cn,object:null,profile:null,prompt:null,rev:null,rightMargin:sr,rules:null,scheme:null,scrolling:Es,standby:null,summary:null,text:null,topMargin:sr,valueType:null,version:null,vAlign:null,vLink:null,vSpace:sr,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:cn,disableRemotePlayback:cn,prefix:null,property:null,results:sr,security:null,unselectable:null},space:"html",transform:MFe}),prr=$S({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:su,accentHeight:sr,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:sr,amplitude:sr,arabicForm:null,ascent:sr,attributeName:null,attributeType:null,azimuth:sr,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:sr,by:null,calcMode:null,capHeight:sr,className:Ci,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:sr,diffuseConstant:sr,direction:null,display:null,dur:null,divisor:sr,dominantBaseline:null,download:cn,dx:null,dy:null,edgeMode:null,editable:null,elevation:sr,enableBackground:null,end:null,event:null,exponent:sr,externalResourcesRequired:null,fill:null,fillOpacity:sr,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:X_,g2:X_,glyphName:X_,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:sr,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:sr,horizOriginX:sr,horizOriginY:sr,id:null,ideographic:sr,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:sr,k:sr,k1:sr,k2:sr,k3:sr,k4:sr,kernelMatrix:su,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:sr,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:sr,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:sr,overlineThickness:sr,paintOrder:null,panose1:null,path:null,pathLength:sr,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ci,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:sr,pointsAtY:sr,pointsAtZ:sr,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:su,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:su,rev:su,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:su,requiredFeatures:su,requiredFonts:su,requiredFormats:su,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:sr,specularExponent:sr,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:sr,strikethroughThickness:sr,string:null,stroke:null,strokeDashArray:su,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:sr,strokeOpacity:sr,strokeWidth:null,style:null,surfaceScale:sr,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:su,tabIndex:sr,tableValues:null,target:null,targetX:sr,targetY:sr,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:su,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:sr,underlineThickness:sr,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:sr,values:null,vAlphabetic:sr,vMathematical:sr,vectorEffect:null,vHanging:sr,vIdeographic:sr,version:null,vertAdvY:sr,vertOriginX:sr,vertOriginY:sr,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:sr,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:FFe}),$Fe=$S({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(a,u){return"xlink:"+u.slice(5).toLowerCase()}}),BFe=$S({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:MFe}),qFe=$S({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(a,u){return"xml:"+u.slice(3).toLowerCase()}}),mrr=/[A-Z]/g,ULe=/-[a-z]/g,grr=/^data[-\w.:]+$/i;function xrr(a,u){const d=Kne(u);let f=u,m=Rl;if(d in a.normal)return a.property[a.normal[d]];if(d.length>4&&d.slice(0,4)==="data"&&grr.test(u)){if(u.charAt(4)==="-"){const g=u.slice(5).replace(ULe,vrr);f="data"+g.charAt(0).toUpperCase()+g.slice(1)}else{const g=u.slice(4);if(!ULe.test(g)){let x=g.replace(mrr,yrr);x.charAt(0)!=="-"&&(x="-"+x),u="data"+x}}m=Ase}return new m(f,u)}function yrr(a){return"-"+a.toLowerCase()}function vrr(a){return a.charAt(1).toUpperCase()}const brr=IFe([jFe,hrr,$Fe,BFe,qFe],"html"),UFe=IFe([jFe,prr,$Fe,BFe,qFe],"svg"),zLe={}.hasOwnProperty;function Err(a,u){const d=u||{};function f(m,...g){let x=f.invalid;const b=f.handlers;if(m&&zLe.call(m,a)){const v=String(m[a]);x=zLe.call(b,v)?b[v]:f.unknown}if(x)return x.call(this,m,...g)}return f.handlers=d.handlers||{},f.invalid=d.invalid,f.unknown=d.unknown,f}const _rr=/["&'<>`]/g,Srr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Arr=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Crr=/[|\\{}()[\]^$+*?.]/g,HLe=new WeakMap;function Rrr(a,u){if(a=a.replace(u.subset?Trr(u.subset):_rr,f),u.subset||u.escapeOnly)return a;return a.replace(Srr,d).replace(Arr,f);function d(m,g,x){return u.format((m.charCodeAt(0)-55296)*1024+m.charCodeAt(1)-56320+65536,x.charCodeAt(g+2),u)}function f(m,g,x){return u.format(m.charCodeAt(0),x.charCodeAt(g+1),u)}}function Trr(a){let u=HLe.get(a);return u||(u=wrr(a),HLe.set(a,u)),u}function wrr(a){const u=[];let d=-1;for(;++d<a.length;)u.push(a[d].replace(Crr,"\\$&"));return new RegExp("(?:"+u.join("|")+")","g")}const Orr=/[\dA-Fa-f]/;function Nrr(a,u,d){const f="&#x"+a.toString(16).toUpperCase();return d&&u&&!Orr.test(String.fromCharCode(u))?f:f+";"}const Drr=/\d/;function krr(a,u,d){const f="&#"+String(a);return d&&u&&!Drr.test(String.fromCharCode(u))?f:f+";"}const Lrr=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Fre={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},Irr=["cent","copy","divide","gt","lt","not","para","times"],zFe={}.hasOwnProperty,Jne={};let Kj;for(Kj in Fre)zFe.call(Fre,Kj)&&(Jne[Fre[Kj]]=Kj);const Prr=/[^\dA-Za-z]/;function jrr(a,u,d,f){const m=String.fromCharCode(a);if(zFe.call(Jne,m)){const g=Jne[m],x="&"+g;return d&&Lrr.includes(g)&&!Irr.includes(g)&&(!f||u&&u!==61&&Prr.test(String.fromCharCode(u)))?x:x+";"}return""}function Frr(a,u,d){let f=Nrr(a,u,d.omitOptionalSemicolons),m;if((d.useNamedReferences||d.useShortestReferences)&&(m=jrr(a,u,d.omitOptionalSemicolons,d.attribute)),(d.useShortestReferences||!m)&&d.useShortestReferences){const g=krr(a,u,d.omitOptionalSemicolons);g.length<f.length&&(f=g)}return m&&(!d.useShortestReferences||m.length<f.length)?m:f}function J_(a,u){return Rrr(a,Object.assign({format:Frr},u))}const Mrr=/^>|^->|<!--|-->|--!>|<!-$/g,$rr=[">"],Brr=["<",">"];function qrr(a,u,d,f){return f.settings.bogusComments?"<?"+J_(a.value,Object.assign({},f.settings.characterReferences,{subset:$rr}))+">":"<!--"+a.value.replace(Mrr,m)+"-->";function m(g){return J_(g,Object.assign({},f.settings.characterReferences,{subset:Brr}))}}function Urr(a,u,d,f){return"<!"+(f.settings.upperDoctype?"DOCTYPE":"doctype")+(f.settings.tightDoctype?"":" ")+"html>"}function GLe(a,u){const d=String(a);if(typeof u!="string")throw new TypeError("Expected character");let f=0,m=d.indexOf(u);for(;m!==-1;)f++,m=d.indexOf(u,m+u.length);return f}function zrr(a,u){const d=u||{};return(a[a.length-1]===""?[...a,""]:a).join((d.padRight?" ":"")+","+(d.padLeft===!1?"":" ")).trim()}function Hrr(a){return a.join(" ").trim()}const Grr=/[ \t\n\f\r]/g;function Cse(a){return typeof a=="object"?a.type==="text"?WLe(a.value):!1:WLe(a)}function WLe(a){return a.replace(Grr,"")===""}const Hs=GFe(1),HFe=GFe(-1),Wrr=[];function GFe(a){return u;function u(d,f,m){const g=d?d.children:Wrr;let x=(f||0)+a,b=g[x];if(!m)for(;b&&Cse(b);)x+=a,b=g[x];return b}}const Vrr={}.hasOwnProperty;function WFe(a){return u;function u(d,f,m){return Vrr.call(a,d.tagName)&&a[d.tagName](d,f,m)}}const Rse=WFe({body:Yrr,caption:Mre,colgroup:Mre,dd:Zrr,dt:Jrr,head:Mre,html:Qrr,li:Xrr,optgroup:enr,option:tnr,p:Krr,rp:VLe,rt:VLe,tbody:nnr,td:QLe,tfoot:inr,th:QLe,thead:rnr,tr:snr});function Mre(a,u,d){const f=Hs(d,u,!0);return!f||f.type!=="comment"&&!(f.type==="text"&&Cse(f.value.charAt(0)))}function Qrr(a,u,d){const f=Hs(d,u);return!f||f.type!=="comment"}function Yrr(a,u,d){const f=Hs(d,u);return!f||f.type!=="comment"}function Krr(a,u,d){const f=Hs(d,u);return f?f.type==="element"&&(f.tagName==="address"||f.tagName==="article"||f.tagName==="aside"||f.tagName==="blockquote"||f.tagName==="details"||f.tagName==="div"||f.tagName==="dl"||f.tagName==="fieldset"||f.tagName==="figcaption"||f.tagName==="figure"||f.tagName==="footer"||f.tagName==="form"||f.tagName==="h1"||f.tagName==="h2"||f.tagName==="h3"||f.tagName==="h4"||f.tagName==="h5"||f.tagName==="h6"||f.tagName==="header"||f.tagName==="hgroup"||f.tagName==="hr"||f.tagName==="main"||f.tagName==="menu"||f.tagName==="nav"||f.tagName==="ol"||f.tagName==="p"||f.tagName==="pre"||f.tagName==="section"||f.tagName==="table"||f.tagName==="ul"):!d||!(d.type==="element"&&(d.tagName==="a"||d.tagName==="audio"||d.tagName==="del"||d.tagName==="ins"||d.tagName==="map"||d.tagName==="noscript"||d.tagName==="video"))}function Xrr(a,u,d){const f=Hs(d,u);return!f||f.type==="element"&&f.tagName==="li"}function Jrr(a,u,d){const f=Hs(d,u);return!!(f&&f.type==="element"&&(f.tagName==="dt"||f.tagName==="dd"))}function Zrr(a,u,d){const f=Hs(d,u);return!f||f.type==="element"&&(f.tagName==="dt"||f.tagName==="dd")}function VLe(a,u,d){const f=Hs(d,u);return!f||f.type==="element"&&(f.tagName==="rp"||f.tagName==="rt")}function enr(a,u,d){const f=Hs(d,u);return!f||f.type==="element"&&f.tagName==="optgroup"}function tnr(a,u,d){const f=Hs(d,u);return!f||f.type==="element"&&(f.tagName==="option"||f.tagName==="optgroup")}function rnr(a,u,d){const f=Hs(d,u);return!!(f&&f.type==="element"&&(f.tagName==="tbody"||f.tagName==="tfoot"))}function nnr(a,u,d){const f=Hs(d,u);return!f||f.type==="element"&&(f.tagName==="tbody"||f.tagName==="tfoot")}function inr(a,u,d){return!Hs(d,u)}function snr(a,u,d){const f=Hs(d,u);return!f||f.type==="element"&&f.tagName==="tr"}function QLe(a,u,d){const f=Hs(d,u);return!f||f.type==="element"&&(f.tagName==="td"||f.tagName==="th")}const onr=WFe({body:unr,colgroup:cnr,head:lnr,html:anr,tbody:dnr});function anr(a){const u=Hs(a,-1);return!u||u.type!=="comment"}function lnr(a){const u=new Set;for(const f of a.children)if(f.type==="element"&&(f.tagName==="base"||f.tagName==="title")){if(u.has(f.tagName))return!1;u.add(f.tagName)}const d=a.children[0];return!d||d.type==="element"}function unr(a){const u=Hs(a,-1,!0);return!u||u.type!=="comment"&&!(u.type==="text"&&Cse(u.value.charAt(0)))&&!(u.type==="element"&&(u.tagName==="meta"||u.tagName==="link"||u.tagName==="script"||u.tagName==="style"||u.tagName==="template"))}function cnr(a,u,d){const f=HFe(d,u),m=Hs(a,-1,!0);return d&&f&&f.type==="element"&&f.tagName==="colgroup"&&Rse(f,d.children.indexOf(f),d)?!1:!!(m&&m.type==="element"&&m.tagName==="col")}function dnr(a,u,d){const f=HFe(d,u),m=Hs(a,-1);return d&&f&&f.type==="element"&&(f.tagName==="thead"||f.tagName==="tbody")&&Rse(f,d.children.indexOf(f),d)?!1:!!(m&&m.type==="element"&&m.tagName==="tr")}const Xj={name:[[`
|
|
2717
2717
|
\f\r &/=>`.split(""),`
|
|
@@ -2871,21 +2871,26 @@ var OMe;function Vt(){return OMe.apply(null,arguments)}function lor(a){OMe=a}fun
|
|
|
2871
2871
|
[`+g+"] ";for(x in arguments[0])Vn(arguments[0],x)&&(m+=x+": "+arguments[0][x]+", ");m=m.slice(0,-2)}else m=arguments[g];f.push(m)}DMe(a+`
|
|
2872
2872
|
Arguments: `+Array.prototype.slice.call(f).join("")+`
|
|
2873
2873
|
`+new Error().stack),d=!1}return u.apply(this,arguments)},u)}var b9e={};function kMe(a,u){Vt.deprecationHandler!=null&&Vt.deprecationHandler(a,u),b9e[a]||(DMe(u),b9e[a]=!0)}Vt.suppressDeprecationWarnings=!1;Vt.deprecationHandler=null;function Ah(a){return typeof Function<"u"&&a instanceof Function||Object.prototype.toString.call(a)==="[object Function]"}function cor(a){var u,d;for(d in a)Vn(a,d)&&(u=a[d],Ah(u)?this[d]=u:this["_"+d]=u);this._config=a,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function oie(a,u){var d=Sx({},a),f;for(f in u)Vn(u,f)&&(Uv(a[f])&&Uv(u[f])?(d[f]={},Sx(d[f],a[f]),Sx(d[f],u[f])):u[f]!=null?d[f]=u[f]:delete d[f]);for(f in a)Vn(a,f)&&!Vn(u,f)&&Uv(a[f])&&(d[f]=Sx({},d[f]));return d}function Use(a){a!=null&&this.set(a)}var aie;Object.keys?aie=Object.keys:aie=function(a){var u,d=[];for(u in a)Vn(a,u)&&d.push(u);return d};var dor={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function hor(a,u,d){var f=this._calendar[a]||this._calendar.sameElse;return Ah(f)?f.call(u,d):f}function xh(a,u,d){var f=""+Math.abs(a),m=u-f.length,g=a>=0;return(g?d?"+":"":"-")+Math.pow(10,Math.max(0,m)).toString().substr(1)+f}var zse=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,tF=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Yre={},Z_={};function Wr(a,u,d,f){var m=f;typeof f=="string"&&(m=function(){return this[f]()}),a&&(Z_[a]=m),u&&(Z_[u[0]]=function(){return xh(m.apply(this,arguments),u[1],u[2])}),d&&(Z_[d]=function(){return this.localeData().ordinal(m.apply(this,arguments),a)})}function por(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function mor(a){var u=a.match(zse),d,f;for(d=0,f=u.length;d<f;d++)Z_[u[d]]?u[d]=Z_[u[d]]:u[d]=por(u[d]);return function(m){var g="",x;for(x=0;x<f;x++)g+=Ah(u[x])?u[x].call(m,a):u[x];return g}}function OF(a,u){return a.isValid()?(u=LMe(u,a.localeData()),Yre[u]=Yre[u]||mor(u),Yre[u](a)):a.localeData().invalidDate()}function LMe(a,u){var d=5;function f(m){return u.longDateFormat(m)||m}for(tF.lastIndex=0;d>=0&&tF.test(a);)a=a.replace(tF,f),tF.lastIndex=0,d-=1;return a}var gor={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function xor(a){var u=this._longDateFormat[a],d=this._longDateFormat[a.toUpperCase()];return u||!d?u:(this._longDateFormat[a]=d.match(zse).map(function(f){return f==="MMMM"||f==="MM"||f==="DD"||f==="dddd"?f.slice(1):f}).join(""),this._longDateFormat[a])}var yor="Invalid date";function vor(){return this._invalidDate}var bor="%d",Eor=/\d{1,2}/;function _or(a){return this._ordinal.replace("%d",a)}var Sor={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Aor(a,u,d,f){var m=this._relativeTime[d];return Ah(m)?m(a,u,d,f):m.replace(/%d/i,a)}function Cor(a,u){var d=this._relativeTime[a>0?"future":"past"];return Ah(d)?d(u):d.replace(/%s/i,u)}var E9e={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function cc(a){return typeof a=="string"?E9e[a]||E9e[a.toLowerCase()]:void 0}function Hse(a){var u={},d,f;for(f in a)Vn(a,f)&&(d=cc(f),d&&(u[d]=a[f]));return u}var Ror={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Tor(a){var u=[],d;for(d in a)Vn(a,d)&&u.push({unit:d,priority:Ror[d]});return u.sort(function(f,m){return f.priority-m.priority}),u}var IMe=/\d/,lu=/\d\d/,PMe=/\d{3}/,Gse=/\d{4}/,x$=/[+-]?\d{6}/,ji=/\d\d?/,jMe=/\d\d\d\d?/,FMe=/\d\d\d\d\d\d?/,y$=/\d{1,3}/,Wse=/\d{1,4}/,v$=/[+-]?\d{1,6}/,qS=/\d+/,b$=/[+-]?\d+/,wor=/Z|[+-]\d\d:?\d\d/gi,E$=/Z|[+-]\d\d(?::?\d\d)?/gi,Oor=/[+-]?\d+(\.\d{1,3})?/,EN=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,US=/^[1-9]\d?/,Vse=/^([1-9]\d|\d)/,dM;dM={};function wr(a,u,d){dM[a]=Ah(u)?u:function(f,m){return f&&d?d:u}}function Nor(a,u){return Vn(dM,a)?dM[a](u._strict,u._locale):new RegExp(Dor(a))}function Dor(a){return c0(a.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(u,d,f,m,g){return d||f||m||g}))}function c0(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ec(a){return a<0?Math.ceil(a)||0:Math.floor(a)}function Rn(a){var u=+a,d=0;return u!==0&&isFinite(u)&&(d=ec(u)),d}var lie={};function mi(a,u){var d,f=u,m;for(typeof a=="string"&&(a=[a]),x0(u)&&(f=function(g,x){x[u]=Rn(g)}),m=a.length,d=0;d<m;d++)lie[a[d]]=f}function _N(a,u){mi(a,function(d,f,m,g){m._w=m._w||{},u(d,m._w,m,g)})}function kor(a,u,d){u!=null&&Vn(lie,a)&&lie[a](u,d._a,d,a)}function _$(a){return a%4===0&&a%100!==0||a%400===0}var ua=0,a0=1,hh=2,zs=3,Od=4,l0=5,qv=6,Lor=7,Ior=8;Wr("Y",0,0,function(){var a=this.year();return a<=9999?xh(a,4):"+"+a});Wr(0,["YY",2],0,function(){return this.year()%100});Wr(0,["YYYY",4],0,"year");Wr(0,["YYYYY",5],0,"year");Wr(0,["YYYYYY",6,!0],0,"year");wr("Y",b$);wr("YY",ji,lu);wr("YYYY",Wse,Gse);wr("YYYYY",v$,x$);wr("YYYYYY",v$,x$);mi(["YYYYY","YYYYYY"],ua);mi("YYYY",function(a,u){u[ua]=a.length===2?Vt.parseTwoDigitYear(a):Rn(a)});mi("YY",function(a,u){u[ua]=Vt.parseTwoDigitYear(a)});mi("Y",function(a,u){u[ua]=parseInt(a,10)});function h5(a){return _$(a)?366:365}Vt.parseTwoDigitYear=function(a){return Rn(a)+(Rn(a)>68?1900:2e3)};var MMe=zS("FullYear",!0);function Por(){return _$(this.year())}function zS(a,u){return function(d){return d!=null?($Me(this,a,d),Vt.updateOffset(this,u),this):k5(this,a)}}function k5(a,u){if(!a.isValid())return NaN;var d=a._d,f=a._isUTC;switch(u){case"Milliseconds":return f?d.getUTCMilliseconds():d.getMilliseconds();case"Seconds":return f?d.getUTCSeconds():d.getSeconds();case"Minutes":return f?d.getUTCMinutes():d.getMinutes();case"Hours":return f?d.getUTCHours():d.getHours();case"Date":return f?d.getUTCDate():d.getDate();case"Day":return f?d.getUTCDay():d.getDay();case"Month":return f?d.getUTCMonth():d.getMonth();case"FullYear":return f?d.getUTCFullYear():d.getFullYear();default:return NaN}}function $Me(a,u,d){var f,m,g,x,b;if(!(!a.isValid()||isNaN(d))){switch(f=a._d,m=a._isUTC,u){case"Milliseconds":return void(m?f.setUTCMilliseconds(d):f.setMilliseconds(d));case"Seconds":return void(m?f.setUTCSeconds(d):f.setSeconds(d));case"Minutes":return void(m?f.setUTCMinutes(d):f.setMinutes(d));case"Hours":return void(m?f.setUTCHours(d):f.setHours(d));case"Date":return void(m?f.setUTCDate(d):f.setDate(d));case"FullYear":break;default:return}g=d,x=a.month(),b=a.date(),b=b===29&&x===1&&!_$(g)?28:b,m?f.setUTCFullYear(g,x,b):f.setFullYear(g,x,b)}}function jor(a){return a=cc(a),Ah(this[a])?this[a]():this}function For(a,u){if(typeof a=="object"){a=Hse(a);var d=Tor(a),f,m=d.length;for(f=0;f<m;f++)this[d[f].unit](a[d[f].unit])}else if(a=cc(a),Ah(this[a]))return this[a](u);return this}function Mor(a,u){return(a%u+u)%u}var hs;Array.prototype.indexOf?hs=Array.prototype.indexOf:hs=function(a){var u;for(u=0;u<this.length;++u)if(this[u]===a)return u;return-1};function Qse(a,u){if(isNaN(a)||isNaN(u))return NaN;var d=Mor(u,12);return a+=(u-d)/12,d===1?_$(a)?29:28:31-d%7%2}Wr("M",["MM",2],"Mo",function(){return this.month()+1});Wr("MMM",0,0,function(a){return this.localeData().monthsShort(this,a)});Wr("MMMM",0,0,function(a){return this.localeData().months(this,a)});wr("M",ji,US);wr("MM",ji,lu);wr("MMM",function(a,u){return u.monthsShortRegex(a)});wr("MMMM",function(a,u){return u.monthsRegex(a)});mi(["M","MM"],function(a,u){u[a0]=Rn(a)-1});mi(["MMM","MMMM"],function(a,u,d,f){var m=d._locale.monthsParse(a,f,d._strict);m!=null?u[a0]=m:xn(d).invalidMonth=a});var $or="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),BMe="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),qMe=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Bor=EN,qor=EN;function Uor(a,u){return a?kd(this._months)?this._months[a.month()]:this._months[(this._months.isFormat||qMe).test(u)?"format":"standalone"][a.month()]:kd(this._months)?this._months:this._months.standalone}function zor(a,u){return a?kd(this._monthsShort)?this._monthsShort[a.month()]:this._monthsShort[qMe.test(u)?"format":"standalone"][a.month()]:kd(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Hor(a,u,d){var f,m,g,x=a.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],f=0;f<12;++f)g=Sh([2e3,f]),this._shortMonthsParse[f]=this.monthsShort(g,"").toLocaleLowerCase(),this._longMonthsParse[f]=this.months(g,"").toLocaleLowerCase();return d?u==="MMM"?(m=hs.call(this._shortMonthsParse,x),m!==-1?m:null):(m=hs.call(this._longMonthsParse,x),m!==-1?m:null):u==="MMM"?(m=hs.call(this._shortMonthsParse,x),m!==-1?m:(m=hs.call(this._longMonthsParse,x),m!==-1?m:null)):(m=hs.call(this._longMonthsParse,x),m!==-1?m:(m=hs.call(this._shortMonthsParse,x),m!==-1?m:null))}function Gor(a,u,d){var f,m,g;if(this._monthsParseExact)return Hor.call(this,a,u,d);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),f=0;f<12;f++){if(m=Sh([2e3,f]),d&&!this._longMonthsParse[f]&&(this._longMonthsParse[f]=new RegExp("^"+this.months(m,"").replace(".","")+"$","i"),this._shortMonthsParse[f]=new RegExp("^"+this.monthsShort(m,"").replace(".","")+"$","i")),!d&&!this._monthsParse[f]&&(g="^"+this.months(m,"")+"|^"+this.monthsShort(m,""),this._monthsParse[f]=new RegExp(g.replace(".",""),"i")),d&&u==="MMMM"&&this._longMonthsParse[f].test(a))return f;if(d&&u==="MMM"&&this._shortMonthsParse[f].test(a))return f;if(!d&&this._monthsParse[f].test(a))return f}}function UMe(a,u){if(!a.isValid())return a;if(typeof u=="string"){if(/^\d+$/.test(u))u=Rn(u);else if(u=a.localeData().monthsParse(u),!x0(u))return a}var d=u,f=a.date();return f=f<29?f:Math.min(f,Qse(a.year(),d)),a._isUTC?a._d.setUTCMonth(d,f):a._d.setMonth(d,f),a}function zMe(a){return a!=null?(UMe(this,a),Vt.updateOffset(this,!0),this):k5(this,"Month")}function Wor(){return Qse(this.year(),this.month())}function Vor(a){return this._monthsParseExact?(Vn(this,"_monthsRegex")||HMe.call(this),a?this._monthsShortStrictRegex:this._monthsShortRegex):(Vn(this,"_monthsShortRegex")||(this._monthsShortRegex=Bor),this._monthsShortStrictRegex&&a?this._monthsShortStrictRegex:this._monthsShortRegex)}function Qor(a){return this._monthsParseExact?(Vn(this,"_monthsRegex")||HMe.call(this),a?this._monthsStrictRegex:this._monthsRegex):(Vn(this,"_monthsRegex")||(this._monthsRegex=qor),this._monthsStrictRegex&&a?this._monthsStrictRegex:this._monthsRegex)}function HMe(){function a(v,_){return _.length-v.length}var u=[],d=[],f=[],m,g,x,b;for(m=0;m<12;m++)g=Sh([2e3,m]),x=c0(this.monthsShort(g,"")),b=c0(this.months(g,"")),u.push(x),d.push(b),f.push(b),f.push(x);u.sort(a),d.sort(a),f.sort(a),this._monthsRegex=new RegExp("^("+f.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+d.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+u.join("|")+")","i")}function Yor(a,u,d,f,m,g,x){var b;return a<100&&a>=0?(b=new Date(a+400,u,d,f,m,g,x),isFinite(b.getFullYear())&&b.setFullYear(a)):b=new Date(a,u,d,f,m,g,x),b}function L5(a){var u,d;return a<100&&a>=0?(d=Array.prototype.slice.call(arguments),d[0]=a+400,u=new Date(Date.UTC.apply(null,d)),isFinite(u.getUTCFullYear())&&u.setUTCFullYear(a)):u=new Date(Date.UTC.apply(null,arguments)),u}function fM(a,u,d){var f=7+u-d,m=(7+L5(a,0,f).getUTCDay()-u)%7;return-m+f-1}function GMe(a,u,d,f,m){var g=(7+d-f)%7,x=fM(a,f,m),b=1+7*(u-1)+g+x,v,_;return b<=0?(v=a-1,_=h5(v)+b):b>h5(a)?(v=a+1,_=b-h5(a)):(v=a,_=b),{year:v,dayOfYear:_}}function I5(a,u,d){var f=fM(a.year(),u,d),m=Math.floor((a.dayOfYear()-f-1)/7)+1,g,x;return m<1?(x=a.year()-1,g=m+d0(x,u,d)):m>d0(a.year(),u,d)?(g=m-d0(a.year(),u,d),x=a.year()+1):(x=a.year(),g=m),{week:g,year:x}}function d0(a,u,d){var f=fM(a,u,d),m=fM(a+1,u,d);return(h5(a)-f+m)/7}Wr("w",["ww",2],"wo","week");Wr("W",["WW",2],"Wo","isoWeek");wr("w",ji,US);wr("ww",ji,lu);wr("W",ji,US);wr("WW",ji,lu);_N(["w","ww","W","WW"],function(a,u,d,f){u[f.substr(0,1)]=Rn(a)});function Kor(a){return I5(a,this._week.dow,this._week.doy).week}var Xor={dow:0,doy:6};function Jor(){return this._week.dow}function Zor(){return this._week.doy}function ear(a){var u=this.localeData().week(this);return a==null?u:this.add((a-u)*7,"d")}function tar(a){var u=I5(this,1,4).week;return a==null?u:this.add((a-u)*7,"d")}Wr("d",0,"do","day");Wr("dd",0,0,function(a){return this.localeData().weekdaysMin(this,a)});Wr("ddd",0,0,function(a){return this.localeData().weekdaysShort(this,a)});Wr("dddd",0,0,function(a){return this.localeData().weekdays(this,a)});Wr("e",0,0,"weekday");Wr("E",0,0,"isoWeekday");wr("d",ji);wr("e",ji);wr("E",ji);wr("dd",function(a,u){return u.weekdaysMinRegex(a)});wr("ddd",function(a,u){return u.weekdaysShortRegex(a)});wr("dddd",function(a,u){return u.weekdaysRegex(a)});_N(["dd","ddd","dddd"],function(a,u,d,f){var m=d._locale.weekdaysParse(a,f,d._strict);m!=null?u.d=m:xn(d).invalidWeekday=a});_N(["d","e","E"],function(a,u,d,f){u[f]=Rn(a)});function rar(a,u){return typeof a!="string"?a:isNaN(a)?(a=u.weekdaysParse(a),typeof a=="number"?a:null):parseInt(a,10)}function nar(a,u){return typeof a=="string"?u.weekdaysParse(a)%7||7:isNaN(a)?null:a}function Yse(a,u){return a.slice(u,7).concat(a.slice(0,u))}var iar="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),WMe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),sar="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),oar=EN,aar=EN,lar=EN;function uar(a,u){var d=kd(this._weekdays)?this._weekdays:this._weekdays[a&&a!==!0&&this._weekdays.isFormat.test(u)?"format":"standalone"];return a===!0?Yse(d,this._week.dow):a?d[a.day()]:d}function car(a){return a===!0?Yse(this._weekdaysShort,this._week.dow):a?this._weekdaysShort[a.day()]:this._weekdaysShort}function dar(a){return a===!0?Yse(this._weekdaysMin,this._week.dow):a?this._weekdaysMin[a.day()]:this._weekdaysMin}function far(a,u,d){var f,m,g,x=a.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],f=0;f<7;++f)g=Sh([2e3,1]).day(f),this._minWeekdaysParse[f]=this.weekdaysMin(g,"").toLocaleLowerCase(),this._shortWeekdaysParse[f]=this.weekdaysShort(g,"").toLocaleLowerCase(),this._weekdaysParse[f]=this.weekdays(g,"").toLocaleLowerCase();return d?u==="dddd"?(m=hs.call(this._weekdaysParse,x),m!==-1?m:null):u==="ddd"?(m=hs.call(this._shortWeekdaysParse,x),m!==-1?m:null):(m=hs.call(this._minWeekdaysParse,x),m!==-1?m:null):u==="dddd"?(m=hs.call(this._weekdaysParse,x),m!==-1||(m=hs.call(this._shortWeekdaysParse,x),m!==-1)?m:(m=hs.call(this._minWeekdaysParse,x),m!==-1?m:null)):u==="ddd"?(m=hs.call(this._shortWeekdaysParse,x),m!==-1||(m=hs.call(this._weekdaysParse,x),m!==-1)?m:(m=hs.call(this._minWeekdaysParse,x),m!==-1?m:null)):(m=hs.call(this._minWeekdaysParse,x),m!==-1||(m=hs.call(this._weekdaysParse,x),m!==-1)?m:(m=hs.call(this._shortWeekdaysParse,x),m!==-1?m:null))}function har(a,u,d){var f,m,g;if(this._weekdaysParseExact)return far.call(this,a,u,d);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),f=0;f<7;f++){if(m=Sh([2e3,1]).day(f),d&&!this._fullWeekdaysParse[f]&&(this._fullWeekdaysParse[f]=new RegExp("^"+this.weekdays(m,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[f]=new RegExp("^"+this.weekdaysShort(m,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[f]=new RegExp("^"+this.weekdaysMin(m,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[f]||(g="^"+this.weekdays(m,"")+"|^"+this.weekdaysShort(m,"")+"|^"+this.weekdaysMin(m,""),this._weekdaysParse[f]=new RegExp(g.replace(".",""),"i")),d&&u==="dddd"&&this._fullWeekdaysParse[f].test(a))return f;if(d&&u==="ddd"&&this._shortWeekdaysParse[f].test(a))return f;if(d&&u==="dd"&&this._minWeekdaysParse[f].test(a))return f;if(!d&&this._weekdaysParse[f].test(a))return f}}function par(a){if(!this.isValid())return a!=null?this:NaN;var u=k5(this,"Day");return a!=null?(a=rar(a,this.localeData()),this.add(a-u,"d")):u}function mar(a){if(!this.isValid())return a!=null?this:NaN;var u=(this.day()+7-this.localeData()._week.dow)%7;return a==null?u:this.add(a-u,"d")}function gar(a){if(!this.isValid())return a!=null?this:NaN;if(a!=null){var u=nar(a,this.localeData());return this.day(this.day()%7?u:u-7)}else return this.day()||7}function xar(a){return this._weekdaysParseExact?(Vn(this,"_weekdaysRegex")||Kse.call(this),a?this._weekdaysStrictRegex:this._weekdaysRegex):(Vn(this,"_weekdaysRegex")||(this._weekdaysRegex=oar),this._weekdaysStrictRegex&&a?this._weekdaysStrictRegex:this._weekdaysRegex)}function yar(a){return this._weekdaysParseExact?(Vn(this,"_weekdaysRegex")||Kse.call(this),a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Vn(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=aar),this._weekdaysShortStrictRegex&&a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function bar(a){return this._weekdaysParseExact?(Vn(this,"_weekdaysRegex")||Kse.call(this),a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Vn(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=lar),this._weekdaysMinStrictRegex&&a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Kse(){function a(S,R){return R.length-S.length}var u=[],d=[],f=[],m=[],g,x,b,v,_;for(g=0;g<7;g++)x=Sh([2e3,1]).day(g),b=c0(this.weekdaysMin(x,"")),v=c0(this.weekdaysShort(x,"")),_=c0(this.weekdays(x,"")),u.push(b),d.push(v),f.push(_),m.push(b),m.push(v),m.push(_);u.sort(a),d.sort(a),f.sort(a),m.sort(a),this._weekdaysRegex=new RegExp("^("+m.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+f.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+u.join("|")+")","i")}function Xse(){return this.hours()%12||12}function Ear(){return this.hours()||24}Wr("H",["HH",2],0,"hour");Wr("h",["hh",2],0,Xse);Wr("k",["kk",2],0,Ear);Wr("hmm",0,0,function(){return""+Xse.apply(this)+xh(this.minutes(),2)});Wr("hmmss",0,0,function(){return""+Xse.apply(this)+xh(this.minutes(),2)+xh(this.seconds(),2)});Wr("Hmm",0,0,function(){return""+this.hours()+xh(this.minutes(),2)});Wr("Hmmss",0,0,function(){return""+this.hours()+xh(this.minutes(),2)+xh(this.seconds(),2)});function VMe(a,u){Wr(a,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),u)})}VMe("a",!0);VMe("A",!1);function QMe(a,u){return u._meridiemParse}wr("a",QMe);wr("A",QMe);wr("H",ji,Vse);wr("h",ji,US);wr("k",ji,US);wr("HH",ji,lu);wr("hh",ji,lu);wr("kk",ji,lu);wr("hmm",jMe);wr("hmmss",FMe);wr("Hmm",jMe);wr("Hmmss",FMe);mi(["H","HH"],zs);mi(["k","kk"],function(a,u,d){var f=Rn(a);u[zs]=f===24?0:f});mi(["a","A"],function(a,u,d){d._isPm=d._locale.isPM(a),d._meridiem=a});mi(["h","hh"],function(a,u,d){u[zs]=Rn(a),xn(d).bigHour=!0});mi("hmm",function(a,u,d){var f=a.length-2;u[zs]=Rn(a.substr(0,f)),u[Od]=Rn(a.substr(f)),xn(d).bigHour=!0});mi("hmmss",function(a,u,d){var f=a.length-4,m=a.length-2;u[zs]=Rn(a.substr(0,f)),u[Od]=Rn(a.substr(f,2)),u[l0]=Rn(a.substr(m)),xn(d).bigHour=!0});mi("Hmm",function(a,u,d){var f=a.length-2;u[zs]=Rn(a.substr(0,f)),u[Od]=Rn(a.substr(f))});mi("Hmmss",function(a,u,d){var f=a.length-4,m=a.length-2;u[zs]=Rn(a.substr(0,f)),u[Od]=Rn(a.substr(f,2)),u[l0]=Rn(a.substr(m))});function _ar(a){return(a+"").toLowerCase().charAt(0)==="p"}var Sar=/[ap]\.?m?\.?/i,Aar=zS("Hours",!0);function Car(a,u,d){return a>11?d?"pm":"PM":d?"am":"AM"}var YMe={calendar:dor,longDateFormat:gor,invalidDate:yor,ordinal:bor,dayOfMonthOrdinalParse:Eor,relativeTime:Sor,months:$or,monthsShort:BMe,week:Xor,weekdays:iar,weekdaysMin:sar,weekdaysShort:WMe,meridiemParse:Sar},Mi={},BO={},P5;function Rar(a,u){var d,f=Math.min(a.length,u.length);for(d=0;d<f;d+=1)if(a[d]!==u[d])return d;return f}function _9e(a){return a&&a.toLowerCase().replace("_","-")}function Tar(a){for(var u=0,d,f,m,g;u<a.length;){for(g=_9e(a[u]).split("-"),d=g.length,f=_9e(a[u+1]),f=f?f.split("-"):null;d>0;){if(m=S$(g.slice(0,d).join("-")),m)return m;if(f&&f.length>=d&&Rar(g,f)>=d-1)break;d--}u++}return P5}function war(a){return!!(a&&a.match("^[^/\\\\]*$"))}function S$(a){var u=null,d;if(Mi[a]===void 0&&typeof module<"u"&&module&&module.exports&&war(a))try{u=P5._abbr,d=require,d("./locale/"+a),Rx(u)}catch{Mi[a]=null}return Mi[a]}function Rx(a,u){var d;return a&&(Sl(u)?d=_0(a):d=Jse(a,u),d?P5=d:typeof console<"u"&&console.warn&&console.warn("Locale "+a+" not found. Did you forget to load it?")),P5._abbr}function Jse(a,u){if(u!==null){var d,f=YMe;if(u.abbr=a,Mi[a]!=null)kMe("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),f=Mi[a]._config;else if(u.parentLocale!=null)if(Mi[u.parentLocale]!=null)f=Mi[u.parentLocale]._config;else if(d=S$(u.parentLocale),d!=null)f=d._config;else return BO[u.parentLocale]||(BO[u.parentLocale]=[]),BO[u.parentLocale].push({name:a,config:u}),null;return Mi[a]=new Use(oie(f,u)),BO[a]&&BO[a].forEach(function(m){Jse(m.name,m.config)}),Rx(a),Mi[a]}else return delete Mi[a],null}function Oar(a,u){if(u!=null){var d,f,m=YMe;Mi[a]!=null&&Mi[a].parentLocale!=null?Mi[a].set(oie(Mi[a]._config,u)):(f=S$(a),f!=null&&(m=f._config),u=oie(m,u),f==null&&(u.abbr=a),d=new Use(u),d.parentLocale=Mi[a],Mi[a]=d),Rx(a)}else Mi[a]!=null&&(Mi[a].parentLocale!=null?(Mi[a]=Mi[a].parentLocale,a===Rx()&&Rx(a)):Mi[a]!=null&&delete Mi[a]);return Mi[a]}function _0(a){var u;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return P5;if(!kd(a)){if(u=S$(a),u)return u;a=[a]}return Tar(a)}function Nar(){return aie(Mi)}function Zse(a){var u,d=a._a;return d&&xn(a).overflow===-2&&(u=d[a0]<0||d[a0]>11?a0:d[hh]<1||d[hh]>Qse(d[ua],d[a0])?hh:d[zs]<0||d[zs]>24||d[zs]===24&&(d[Od]!==0||d[l0]!==0||d[qv]!==0)?zs:d[Od]<0||d[Od]>59?Od:d[l0]<0||d[l0]>59?l0:d[qv]<0||d[qv]>999?qv:-1,xn(a)._overflowDayOfYear&&(u<ua||u>hh)&&(u=hh),xn(a)._overflowWeeks&&u===-1&&(u=Lor),xn(a)._overflowWeekday&&u===-1&&(u=Ior),xn(a).overflow=u),a}var Dar=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,kar=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Lar=/Z|[+-]\d\d(?::?\d\d)?/,rF=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Kre=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Iar=/^\/?Date\((-?\d+)/i,Par=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,jar={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function KMe(a){var u,d,f=a._i,m=Dar.exec(f)||kar.exec(f),g,x,b,v,_=rF.length,S=Kre.length;if(m){for(xn(a).iso=!0,u=0,d=_;u<d;u++)if(rF[u][1].exec(m[1])){x=rF[u][0],g=rF[u][2]!==!1;break}if(x==null){a._isValid=!1;return}if(m[3]){for(u=0,d=S;u<d;u++)if(Kre[u][1].exec(m[3])){b=(m[2]||" ")+Kre[u][0];break}if(b==null){a._isValid=!1;return}}if(!g&&b!=null){a._isValid=!1;return}if(m[4])if(Lar.exec(m[4]))v="Z";else{a._isValid=!1;return}a._f=x+(b||"")+(v||""),toe(a)}else a._isValid=!1}function Far(a,u,d,f,m,g){var x=[Mar(a),BMe.indexOf(u),parseInt(d,10),parseInt(f,10),parseInt(m,10)];return g&&x.push(parseInt(g,10)),x}function Mar(a){var u=parseInt(a,10);return u<=49?2e3+u:u<=999?1900+u:u}function $ar(a){return a.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Bar(a,u,d){if(a){var f=WMe.indexOf(a),m=new Date(u[0],u[1],u[2]).getDay();if(f!==m)return xn(d).weekdayMismatch=!0,d._isValid=!1,!1}return!0}function qar(a,u,d){if(a)return jar[a];if(u)return 0;var f=parseInt(d,10),m=f%100,g=(f-m)/100;return g*60+m}function XMe(a){var u=Par.exec($ar(a._i)),d;if(u){if(d=Far(u[4],u[3],u[2],u[5],u[6],u[7]),!Bar(u[1],d,a))return;a._a=d,a._tzm=qar(u[8],u[9],u[10]),a._d=L5.apply(null,a._a),a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),xn(a).rfc2822=!0}else a._isValid=!1}function Uar(a){var u=Iar.exec(a._i);if(u!==null){a._d=new Date(+u[1]);return}if(KMe(a),a._isValid===!1)delete a._isValid;else return;if(XMe(a),a._isValid===!1)delete a._isValid;else return;a._strict?a._isValid=!1:Vt.createFromInputFallback(a)}Vt.createFromInputFallback=uc("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))});function z_(a,u,d){return a??u??d}function zar(a){var u=new Date(Vt.now());return a._useUTC?[u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()]:[u.getFullYear(),u.getMonth(),u.getDate()]}function eoe(a){var u,d,f=[],m,g,x;if(!a._d){for(m=zar(a),a._w&&a._a[hh]==null&&a._a[a0]==null&&Har(a),a._dayOfYear!=null&&(x=z_(a._a[ua],m[ua]),(a._dayOfYear>h5(x)||a._dayOfYear===0)&&(xn(a)._overflowDayOfYear=!0),d=L5(x,0,a._dayOfYear),a._a[a0]=d.getUTCMonth(),a._a[hh]=d.getUTCDate()),u=0;u<3&&a._a[u]==null;++u)a._a[u]=f[u]=m[u];for(;u<7;u++)a._a[u]=f[u]=a._a[u]==null?u===2?1:0:a._a[u];a._a[zs]===24&&a._a[Od]===0&&a._a[l0]===0&&a._a[qv]===0&&(a._nextDay=!0,a._a[zs]=0),a._d=(a._useUTC?L5:Yor).apply(null,f),g=a._useUTC?a._d.getUTCDay():a._d.getDay(),a._tzm!=null&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),a._nextDay&&(a._a[zs]=24),a._w&&typeof a._w.d<"u"&&a._w.d!==g&&(xn(a).weekdayMismatch=!0)}}function Har(a){var u,d,f,m,g,x,b,v,_;u=a._w,u.GG!=null||u.W!=null||u.E!=null?(g=1,x=4,d=z_(u.GG,a._a[ua],I5(Pi(),1,4).year),f=z_(u.W,1),m=z_(u.E,1),(m<1||m>7)&&(v=!0)):(g=a._locale._week.dow,x=a._locale._week.doy,_=I5(Pi(),g,x),d=z_(u.gg,a._a[ua],_.year),f=z_(u.w,_.week),u.d!=null?(m=u.d,(m<0||m>6)&&(v=!0)):u.e!=null?(m=u.e+g,(u.e<0||u.e>6)&&(v=!0)):m=g),f<1||f>d0(d,g,x)?xn(a)._overflowWeeks=!0:v!=null?xn(a)._overflowWeekday=!0:(b=GMe(d,f,m,g,x),a._a[ua]=b.year,a._dayOfYear=b.dayOfYear)}Vt.ISO_8601=function(){};Vt.RFC_2822=function(){};function toe(a){if(a._f===Vt.ISO_8601){KMe(a);return}if(a._f===Vt.RFC_2822){XMe(a);return}a._a=[],xn(a).empty=!0;var u=""+a._i,d,f,m,g,x,b=u.length,v=0,_,S;for(m=LMe(a._f,a._locale).match(zse)||[],S=m.length,d=0;d<S;d++)g=m[d],f=(u.match(Nor(g,a))||[])[0],f&&(x=u.substr(0,u.indexOf(f)),x.length>0&&xn(a).unusedInput.push(x),u=u.slice(u.indexOf(f)+f.length),v+=f.length),Z_[g]?(f?xn(a).empty=!1:xn(a).unusedTokens.push(g),kor(g,f,a)):a._strict&&!f&&xn(a).unusedTokens.push(g);xn(a).charsLeftOver=b-v,u.length>0&&xn(a).unusedInput.push(u),a._a[zs]<=12&&xn(a).bigHour===!0&&a._a[zs]>0&&(xn(a).bigHour=void 0),xn(a).parsedDateParts=a._a.slice(0),xn(a).meridiem=a._meridiem,a._a[zs]=Gar(a._locale,a._a[zs],a._meridiem),_=xn(a).era,_!==null&&(a._a[ua]=a._locale.erasConvertYear(_,a._a[ua])),eoe(a),Zse(a)}function Gar(a,u,d){var f;return d==null?u:a.meridiemHour!=null?a.meridiemHour(u,d):(a.isPM!=null&&(f=a.isPM(d),f&&u<12&&(u+=12),!f&&u===12&&(u=0)),u)}function War(a){var u,d,f,m,g,x,b=!1,v=a._f.length;if(v===0){xn(a).invalidFormat=!0,a._d=new Date(NaN);return}for(m=0;m<v;m++)g=0,x=!1,u=qse({},a),a._useUTC!=null&&(u._useUTC=a._useUTC),u._f=a._f[m],toe(u),Bse(u)&&(x=!0),g+=xn(u).charsLeftOver,g+=xn(u).unusedTokens.length*10,xn(u).score=g,b?g<f&&(f=g,d=u):(f==null||g<f||x)&&(f=g,d=u,x&&(b=!0));Sx(a,d||u)}function Var(a){if(!a._d){var u=Hse(a._i),d=u.day===void 0?u.date:u.day;a._a=NMe([u.year,u.month,d,u.hour,u.minute,u.second,u.millisecond],function(f){return f&&parseInt(f,10)}),eoe(a)}}function Qar(a){var u=new bN(Zse(JMe(a)));return u._nextDay&&(u.add(1,"d"),u._nextDay=void 0),u}function JMe(a){var u=a._i,d=a._f;return a._locale=a._locale||_0(a._l),u===null||d===void 0&&u===""?g$({nullInput:!0}):(typeof u=="string"&&(a._i=u=a._locale.preparse(u)),Ld(u)?new bN(Zse(u)):(vN(u)?a._d=u:kd(d)?War(a):d?toe(a):Yar(a),Bse(a)||(a._d=null),a))}function Yar(a){var u=a._i;Sl(u)?a._d=new Date(Vt.now()):vN(u)?a._d=new Date(u.valueOf()):typeof u=="string"?Uar(a):kd(u)?(a._a=NMe(u.slice(0),function(d){return parseInt(d,10)}),eoe(a)):Uv(u)?Var(a):x0(u)?a._d=new Date(u):Vt.createFromInputFallback(a)}function ZMe(a,u,d,f,m){var g={};return(u===!0||u===!1)&&(f=u,u=void 0),(d===!0||d===!1)&&(f=d,d=void 0),(Uv(a)&&$se(a)||kd(a)&&a.length===0)&&(a=void 0),g._isAMomentObject=!0,g._useUTC=g._isUTC=m,g._l=d,g._i=a,g._f=u,g._strict=f,Qar(g)}function Pi(a,u,d,f){return ZMe(a,u,d,f,!1)}var Kar=uc("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var a=Pi.apply(null,arguments);return this.isValid()&&a.isValid()?a<this?this:a:g$()}),Xar=uc("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var a=Pi.apply(null,arguments);return this.isValid()&&a.isValid()?a>this?this:a:g$()});function e$e(a,u){var d,f;if(u.length===1&&kd(u[0])&&(u=u[0]),!u.length)return Pi();for(d=u[0],f=1;f<u.length;++f)(!u[f].isValid()||u[f][a](d))&&(d=u[f]);return d}function Jar(){var a=[].slice.call(arguments,0);return e$e("isBefore",a)}function Zar(){var a=[].slice.call(arguments,0);return e$e("isAfter",a)}var elr=function(){return Date.now?Date.now():+new Date},qO=["year","quarter","month","week","day","hour","minute","second","millisecond"];function tlr(a){var u,d=!1,f,m=qO.length;for(u in a)if(Vn(a,u)&&!(hs.call(qO,u)!==-1&&(a[u]==null||!isNaN(a[u]))))return!1;for(f=0;f<m;++f)if(a[qO[f]]){if(d)return!1;parseFloat(a[qO[f]])!==Rn(a[qO[f]])&&(d=!0)}return!0}function rlr(){return this._isValid}function nlr(){return $d(NaN)}function A$(a){var u=Hse(a),d=u.year||0,f=u.quarter||0,m=u.month||0,g=u.week||u.isoWeek||0,x=u.day||0,b=u.hour||0,v=u.minute||0,_=u.second||0,S=u.millisecond||0;this._isValid=tlr(u),this._milliseconds=+S+_*1e3+v*6e4+b*1e3*60*60,this._days=+x+g*7,this._months=+m+f*3+d*12,this._data={},this._locale=_0(),this._bubble()}function NF(a){return a instanceof A$}function uie(a){return a<0?Math.round(-1*a)*-1:Math.round(a)}function ilr(a,u,d){var f=Math.min(a.length,u.length),m=Math.abs(a.length-u.length),g=0,x;for(x=0;x<f;x++)Rn(a[x])!==Rn(u[x])&&g++;return g+m}function t$e(a,u){Wr(a,0,0,function(){var d=this.utcOffset(),f="+";return d<0&&(d=-d,f="-"),f+xh(~~(d/60),2)+u+xh(~~d%60,2)})}t$e("Z",":");t$e("ZZ","");wr("Z",E$);wr("ZZ",E$);mi(["Z","ZZ"],function(a,u,d){d._useUTC=!0,d._tzm=roe(E$,a)});var slr=/([\+\-]|\d\d)/gi;function roe(a,u){var d=(u||"").match(a),f,m,g;return d===null?null:(f=d[d.length-1]||[],m=(f+"").match(slr)||["-",0,0],g=+(m[1]*60)+Rn(m[2]),g===0?0:m[0]==="+"?g:-g)}function noe(a,u){var d,f;return u._isUTC?(d=u.clone(),f=(Ld(a)||vN(a)?a.valueOf():Pi(a).valueOf())-d.valueOf(),d._d.setTime(d._d.valueOf()+f),Vt.updateOffset(d,!1),d):Pi(a).local()}function cie(a){return-Math.round(a._d.getTimezoneOffset())}Vt.updateOffset=function(){};function olr(a,u,d){var f=this._offset||0,m;if(!this.isValid())return a!=null?this:NaN;if(a!=null){if(typeof a=="string"){if(a=roe(E$,a),a===null)return this}else Math.abs(a)<16&&!d&&(a=a*60);return!this._isUTC&&u&&(m=cie(this)),this._offset=a,this._isUTC=!0,m!=null&&this.add(m,"m"),f!==a&&(!u||this._changeInProgress?i$e(this,$d(a-f,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,Vt.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?f:cie(this)}function alr(a,u){return a!=null?(typeof a!="string"&&(a=-a),this.utcOffset(a,u),this):-this.utcOffset()}function llr(a){return this.utcOffset(0,a)}function ulr(a){return this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(cie(this),"m")),this}function clr(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var a=roe(wor,this._i);a!=null?this.utcOffset(a):this.utcOffset(0,!0)}return this}function dlr(a){return this.isValid()?(a=a?Pi(a).utcOffset():0,(this.utcOffset()-a)%60===0):!1}function flr(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function hlr(){if(!Sl(this._isDSTShifted))return this._isDSTShifted;var a={},u;return qse(a,this),a=JMe(a),a._a?(u=a._isUTC?Sh(a._a):Pi(a._a),this._isDSTShifted=this.isValid()&&ilr(a._a,u.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function plr(){return this.isValid()?!this._isUTC:!1}function mlr(){return this.isValid()?this._isUTC:!1}function r$e(){return this.isValid()?this._isUTC&&this._offset===0:!1}var glr=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,xlr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function $d(a,u){var d=a,f=null,m,g,x;return NF(a)?d={ms:a._milliseconds,d:a._days,M:a._months}:x0(a)||!isNaN(+a)?(d={},u?d[u]=+a:d.milliseconds=+a):(f=glr.exec(a))?(m=f[1]==="-"?-1:1,d={y:0,d:Rn(f[hh])*m,h:Rn(f[zs])*m,m:Rn(f[Od])*m,s:Rn(f[l0])*m,ms:Rn(uie(f[qv]*1e3))*m}):(f=xlr.exec(a))?(m=f[1]==="-"?-1:1,d={y:kv(f[2],m),M:kv(f[3],m),w:kv(f[4],m),d:kv(f[5],m),h:kv(f[6],m),m:kv(f[7],m),s:kv(f[8],m)}):d==null?d={}:typeof d=="object"&&("from"in d||"to"in d)&&(x=ylr(Pi(d.from),Pi(d.to)),d={},d.ms=x.milliseconds,d.M=x.months),g=new A$(d),NF(a)&&Vn(a,"_locale")&&(g._locale=a._locale),NF(a)&&Vn(a,"_isValid")&&(g._isValid=a._isValid),g}$d.fn=A$.prototype;$d.invalid=nlr;function kv(a,u){var d=a&&parseFloat(a.replace(",","."));return(isNaN(d)?0:d)*u}function S9e(a,u){var d={};return d.months=u.month()-a.month()+(u.year()-a.year())*12,a.clone().add(d.months,"M").isAfter(u)&&--d.months,d.milliseconds=+u-+a.clone().add(d.months,"M"),d}function ylr(a,u){var d;return a.isValid()&&u.isValid()?(u=noe(u,a),a.isBefore(u)?d=S9e(a,u):(d=S9e(u,a),d.milliseconds=-d.milliseconds,d.months=-d.months),d):{milliseconds:0,months:0}}function n$e(a,u){return function(d,f){var m,g;return f!==null&&!isNaN(+f)&&(kMe(u,"moment()."+u+"(period, number) is deprecated. Please use moment()."+u+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),g=d,d=f,f=g),m=$d(d,f),i$e(this,m,a),this}}function i$e(a,u,d,f){var m=u._milliseconds,g=uie(u._days),x=uie(u._months);a.isValid()&&(f=f??!0,x&&UMe(a,k5(a,"Month")+x*d),g&&$Me(a,"Date",k5(a,"Date")+g*d),m&&a._d.setTime(a._d.valueOf()+m*d),f&&Vt.updateOffset(a,g||x))}var vlr=n$e(1,"add"),blr=n$e(-1,"subtract");function s$e(a){return typeof a=="string"||a instanceof String}function Elr(a){return Ld(a)||vN(a)||s$e(a)||x0(a)||Slr(a)||_lr(a)||a===null||a===void 0}function _lr(a){var u=Uv(a)&&!$se(a),d=!1,f=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],m,g,x=f.length;for(m=0;m<x;m+=1)g=f[m],d=d||Vn(a,g);return u&&d}function Slr(a){var u=kd(a),d=!1;return u&&(d=a.filter(function(f){return!x0(f)&&s$e(a)}).length===0),u&&d}function Alr(a){var u=Uv(a)&&!$se(a),d=!1,f=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],m,g;for(m=0;m<f.length;m+=1)g=f[m],d=d||Vn(a,g);return u&&d}function Clr(a,u){var d=a.diff(u,"days",!0);return d<-6?"sameElse":d<-1?"lastWeek":d<0?"lastDay":d<1?"sameDay":d<2?"nextDay":d<7?"nextWeek":"sameElse"}function Rlr(a,u){arguments.length===1&&(arguments[0]?Elr(arguments[0])?(a=arguments[0],u=void 0):Alr(arguments[0])&&(u=arguments[0],a=void 0):(a=void 0,u=void 0));var d=a||Pi(),f=noe(d,this).startOf("day"),m=Vt.calendarFormat(this,f)||"sameElse",g=u&&(Ah(u[m])?u[m].call(this,d):u[m]);return this.format(g||this.localeData().calendar(m,this,Pi(d)))}function Tlr(){return new bN(this)}function wlr(a,u){var d=Ld(a)?a:Pi(a);return this.isValid()&&d.isValid()?(u=cc(u)||"millisecond",u==="millisecond"?this.valueOf()>d.valueOf():d.valueOf()<this.clone().startOf(u).valueOf()):!1}function Olr(a,u){var d=Ld(a)?a:Pi(a);return this.isValid()&&d.isValid()?(u=cc(u)||"millisecond",u==="millisecond"?this.valueOf()<d.valueOf():this.clone().endOf(u).valueOf()<d.valueOf()):!1}function Nlr(a,u,d,f){var m=Ld(a)?a:Pi(a),g=Ld(u)?u:Pi(u);return this.isValid()&&m.isValid()&&g.isValid()?(f=f||"()",(f[0]==="("?this.isAfter(m,d):!this.isBefore(m,d))&&(f[1]===")"?this.isBefore(g,d):!this.isAfter(g,d))):!1}function Dlr(a,u){var d=Ld(a)?a:Pi(a),f;return this.isValid()&&d.isValid()?(u=cc(u)||"millisecond",u==="millisecond"?this.valueOf()===d.valueOf():(f=d.valueOf(),this.clone().startOf(u).valueOf()<=f&&f<=this.clone().endOf(u).valueOf())):!1}function klr(a,u){return this.isSame(a,u)||this.isAfter(a,u)}function Llr(a,u){return this.isSame(a,u)||this.isBefore(a,u)}function Ilr(a,u,d){var f,m,g;if(!this.isValid())return NaN;if(f=noe(a,this),!f.isValid())return NaN;switch(m=(f.utcOffset()-this.utcOffset())*6e4,u=cc(u),u){case"year":g=DF(this,f)/12;break;case"month":g=DF(this,f);break;case"quarter":g=DF(this,f)/3;break;case"second":g=(this-f)/1e3;break;case"minute":g=(this-f)/6e4;break;case"hour":g=(this-f)/36e5;break;case"day":g=(this-f-m)/864e5;break;case"week":g=(this-f-m)/6048e5;break;default:g=this-f}return d?g:ec(g)}function DF(a,u){if(a.date()<u.date())return-DF(u,a);var d=(u.year()-a.year())*12+(u.month()-a.month()),f=a.clone().add(d,"months"),m,g;return u-f<0?(m=a.clone().add(d-1,"months"),g=(u-f)/(f-m)):(m=a.clone().add(d+1,"months"),g=(u-f)/(m-f)),-(d+g)||0}Vt.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";Vt.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Plr(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function jlr(a){if(!this.isValid())return null;var u=a!==!0,d=u?this.clone().utc():this;return d.year()<0||d.year()>9999?OF(d,u?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Ah(Date.prototype.toISOString)?u?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",OF(d,"Z")):OF(d,u?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Flr(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var a="moment",u="",d,f,m,g;return this.isLocal()||(a=this.utcOffset()===0?"moment.utc":"moment.parseZone",u="Z"),d="["+a+'("]',f=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",m="-MM-DD[T]HH:mm:ss.SSS",g=u+'[")]',this.format(d+f+m+g)}function Mlr(a){a||(a=this.isUtc()?Vt.defaultFormatUtc:Vt.defaultFormat);var u=OF(this,a);return this.localeData().postformat(u)}function $lr(a,u){return this.isValid()&&(Ld(a)&&a.isValid()||Pi(a).isValid())?$d({to:this,from:a}).locale(this.locale()).humanize(!u):this.localeData().invalidDate()}function Blr(a){return this.from(Pi(),a)}function qlr(a,u){return this.isValid()&&(Ld(a)&&a.isValid()||Pi(a).isValid())?$d({from:this,to:a}).locale(this.locale()).humanize(!u):this.localeData().invalidDate()}function Ulr(a){return this.to(Pi(),a)}function o$e(a){var u;return a===void 0?this._locale._abbr:(u=_0(a),u!=null&&(this._locale=u),this)}var a$e=uc("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(a){return a===void 0?this.localeData():this.locale(a)});function l$e(){return this._locale}var hM=1e3,eS=60*hM,pM=60*eS,u$e=(365*400+97)*24*pM;function tS(a,u){return(a%u+u)%u}function c$e(a,u,d){return a<100&&a>=0?new Date(a+400,u,d)-u$e:new Date(a,u,d).valueOf()}function d$e(a,u,d){return a<100&&a>=0?Date.UTC(a+400,u,d)-u$e:Date.UTC(a,u,d)}function zlr(a){var u,d;if(a=cc(a),a===void 0||a==="millisecond"||!this.isValid())return this;switch(d=this._isUTC?d$e:c$e,a){case"year":u=d(this.year(),0,1);break;case"quarter":u=d(this.year(),this.month()-this.month()%3,1);break;case"month":u=d(this.year(),this.month(),1);break;case"week":u=d(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":u=d(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":u=d(this.year(),this.month(),this.date());break;case"hour":u=this._d.valueOf(),u-=tS(u+(this._isUTC?0:this.utcOffset()*eS),pM);break;case"minute":u=this._d.valueOf(),u-=tS(u,eS);break;case"second":u=this._d.valueOf(),u-=tS(u,hM);break}return this._d.setTime(u),Vt.updateOffset(this,!0),this}function Hlr(a){var u,d;if(a=cc(a),a===void 0||a==="millisecond"||!this.isValid())return this;switch(d=this._isUTC?d$e:c$e,a){case"year":u=d(this.year()+1,0,1)-1;break;case"quarter":u=d(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":u=d(this.year(),this.month()+1,1)-1;break;case"week":u=d(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":u=d(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":u=d(this.year(),this.month(),this.date()+1)-1;break;case"hour":u=this._d.valueOf(),u+=pM-tS(u+(this._isUTC?0:this.utcOffset()*eS),pM)-1;break;case"minute":u=this._d.valueOf(),u+=eS-tS(u,eS)-1;break;case"second":u=this._d.valueOf(),u+=hM-tS(u,hM)-1;break}return this._d.setTime(u),Vt.updateOffset(this,!0),this}function Glr(){return this._d.valueOf()-(this._offset||0)*6e4}function Wlr(){return Math.floor(this.valueOf()/1e3)}function Vlr(){return new Date(this.valueOf())}function Qlr(){var a=this;return[a.year(),a.month(),a.date(),a.hour(),a.minute(),a.second(),a.millisecond()]}function Ylr(){var a=this;return{years:a.year(),months:a.month(),date:a.date(),hours:a.hours(),minutes:a.minutes(),seconds:a.seconds(),milliseconds:a.milliseconds()}}function Klr(){return this.isValid()?this.toISOString():null}function Xlr(){return Bse(this)}function Jlr(){return Sx({},xn(this))}function Zlr(){return xn(this).overflow}function eur(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Wr("N",0,0,"eraAbbr");Wr("NN",0,0,"eraAbbr");Wr("NNN",0,0,"eraAbbr");Wr("NNNN",0,0,"eraName");Wr("NNNNN",0,0,"eraNarrow");Wr("y",["y",1],"yo","eraYear");Wr("y",["yy",2],0,"eraYear");Wr("y",["yyy",3],0,"eraYear");Wr("y",["yyyy",4],0,"eraYear");wr("N",ioe);wr("NN",ioe);wr("NNN",ioe);wr("NNNN",dur);wr("NNNNN",fur);mi(["N","NN","NNN","NNNN","NNNNN"],function(a,u,d,f){var m=d._locale.erasParse(a,f,d._strict);m?xn(d).era=m:xn(d).invalidEra=a});wr("y",qS);wr("yy",qS);wr("yyy",qS);wr("yyyy",qS);wr("yo",hur);mi(["y","yy","yyy","yyyy"],ua);mi(["yo"],function(a,u,d,f){var m;d._locale._eraYearOrdinalRegex&&(m=a.match(d._locale._eraYearOrdinalRegex)),d._locale.eraYearOrdinalParse?u[ua]=d._locale.eraYearOrdinalParse(a,m):u[ua]=parseInt(a,10)});function tur(a,u){var d,f,m,g=this._eras||_0("en")._eras;for(d=0,f=g.length;d<f;++d){switch(typeof g[d].since){case"string":m=Vt(g[d].since).startOf("day"),g[d].since=m.valueOf();break}switch(typeof g[d].until){case"undefined":g[d].until=1/0;break;case"string":m=Vt(g[d].until).startOf("day").valueOf(),g[d].until=m.valueOf();break}}return g}function rur(a,u,d){var f,m,g=this.eras(),x,b,v;for(a=a.toUpperCase(),f=0,m=g.length;f<m;++f)if(x=g[f].name.toUpperCase(),b=g[f].abbr.toUpperCase(),v=g[f].narrow.toUpperCase(),d)switch(u){case"N":case"NN":case"NNN":if(b===a)return g[f];break;case"NNNN":if(x===a)return g[f];break;case"NNNNN":if(v===a)return g[f];break}else if([x,b,v].indexOf(a)>=0)return g[f]}function nur(a,u){var d=a.since<=a.until?1:-1;return u===void 0?Vt(a.since).year():Vt(a.since).year()+(u-a.offset)*d}function iur(){var a,u,d,f=this.localeData().eras();for(a=0,u=f.length;a<u;++a)if(d=this.clone().startOf("day").valueOf(),f[a].since<=d&&d<=f[a].until||f[a].until<=d&&d<=f[a].since)return f[a].name;return""}function sur(){var a,u,d,f=this.localeData().eras();for(a=0,u=f.length;a<u;++a)if(d=this.clone().startOf("day").valueOf(),f[a].since<=d&&d<=f[a].until||f[a].until<=d&&d<=f[a].since)return f[a].narrow;return""}function our(){var a,u,d,f=this.localeData().eras();for(a=0,u=f.length;a<u;++a)if(d=this.clone().startOf("day").valueOf(),f[a].since<=d&&d<=f[a].until||f[a].until<=d&&d<=f[a].since)return f[a].abbr;return""}function aur(){var a,u,d,f,m=this.localeData().eras();for(a=0,u=m.length;a<u;++a)if(d=m[a].since<=m[a].until?1:-1,f=this.clone().startOf("day").valueOf(),m[a].since<=f&&f<=m[a].until||m[a].until<=f&&f<=m[a].since)return(this.year()-Vt(m[a].since).year())*d+m[a].offset;return this.year()}function lur(a){return Vn(this,"_erasNameRegex")||soe.call(this),a?this._erasNameRegex:this._erasRegex}function uur(a){return Vn(this,"_erasAbbrRegex")||soe.call(this),a?this._erasAbbrRegex:this._erasRegex}function cur(a){return Vn(this,"_erasNarrowRegex")||soe.call(this),a?this._erasNarrowRegex:this._erasRegex}function ioe(a,u){return u.erasAbbrRegex(a)}function dur(a,u){return u.erasNameRegex(a)}function fur(a,u){return u.erasNarrowRegex(a)}function hur(a,u){return u._eraYearOrdinalRegex||qS}function soe(){var a=[],u=[],d=[],f=[],m,g,x,b,v,_=this.eras();for(m=0,g=_.length;m<g;++m)x=c0(_[m].name),b=c0(_[m].abbr),v=c0(_[m].narrow),u.push(x),a.push(b),d.push(v),f.push(x),f.push(b),f.push(v);this._erasRegex=new RegExp("^("+f.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+u.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+a.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+d.join("|")+")","i")}Wr(0,["gg",2],0,function(){return this.weekYear()%100});Wr(0,["GG",2],0,function(){return this.isoWeekYear()%100});function C$(a,u){Wr(0,[a,a.length],0,u)}C$("gggg","weekYear");C$("ggggg","weekYear");C$("GGGG","isoWeekYear");C$("GGGGG","isoWeekYear");wr("G",b$);wr("g",b$);wr("GG",ji,lu);wr("gg",ji,lu);wr("GGGG",Wse,Gse);wr("gggg",Wse,Gse);wr("GGGGG",v$,x$);wr("ggggg",v$,x$);_N(["gggg","ggggg","GGGG","GGGGG"],function(a,u,d,f){u[f.substr(0,2)]=Rn(a)});_N(["gg","GG"],function(a,u,d,f){u[f]=Vt.parseTwoDigitYear(a)});function pur(a){return f$e.call(this,a,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function mur(a){return f$e.call(this,a,this.isoWeek(),this.isoWeekday(),1,4)}function gur(){return d0(this.year(),1,4)}function xur(){return d0(this.isoWeekYear(),1,4)}function yur(){var a=this.localeData()._week;return d0(this.year(),a.dow,a.doy)}function vur(){var a=this.localeData()._week;return d0(this.weekYear(),a.dow,a.doy)}function f$e(a,u,d,f,m){var g;return a==null?I5(this,f,m).year:(g=d0(a,f,m),u>g&&(u=g),bur.call(this,a,u,d,f,m))}function bur(a,u,d,f,m){var g=GMe(a,u,d,f,m),x=L5(g.year,0,g.dayOfYear);return this.year(x.getUTCFullYear()),this.month(x.getUTCMonth()),this.date(x.getUTCDate()),this}Wr("Q",0,"Qo","quarter");wr("Q",IMe);mi("Q",function(a,u){u[a0]=(Rn(a)-1)*3});function Eur(a){return a==null?Math.ceil((this.month()+1)/3):this.month((a-1)*3+this.month()%3)}Wr("D",["DD",2],"Do","date");wr("D",ji,US);wr("DD",ji,lu);wr("Do",function(a,u){return a?u._dayOfMonthOrdinalParse||u._ordinalParse:u._dayOfMonthOrdinalParseLenient});mi(["D","DD"],hh);mi("Do",function(a,u){u[hh]=Rn(a.match(ji)[0])});var h$e=zS("Date",!0);Wr("DDD",["DDDD",3],"DDDo","dayOfYear");wr("DDD",y$);wr("DDDD",PMe);mi(["DDD","DDDD"],function(a,u,d){d._dayOfYear=Rn(a)});function _ur(a){var u=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return a==null?u:this.add(a-u,"d")}Wr("m",["mm",2],0,"minute");wr("m",ji,Vse);wr("mm",ji,lu);mi(["m","mm"],Od);var Sur=zS("Minutes",!1);Wr("s",["ss",2],0,"second");wr("s",ji,Vse);wr("ss",ji,lu);mi(["s","ss"],l0);var Aur=zS("Seconds",!1);Wr("S",0,0,function(){return~~(this.millisecond()/100)});Wr(0,["SS",2],0,function(){return~~(this.millisecond()/10)});Wr(0,["SSS",3],0,"millisecond");Wr(0,["SSSS",4],0,function(){return this.millisecond()*10});Wr(0,["SSSSS",5],0,function(){return this.millisecond()*100});Wr(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});Wr(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});Wr(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});Wr(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});wr("S",y$,IMe);wr("SS",y$,lu);wr("SSS",y$,PMe);var Ax,p$e;for(Ax="SSSS";Ax.length<=9;Ax+="S")wr(Ax,qS);function Cur(a,u){u[qv]=Rn(("0."+a)*1e3)}for(Ax="S";Ax.length<=9;Ax+="S")mi(Ax,Cur);p$e=zS("Milliseconds",!1);Wr("z",0,0,"zoneAbbr");Wr("zz",0,0,"zoneName");function Rur(){return this._isUTC?"UTC":""}function Tur(){return this._isUTC?"Coordinated Universal Time":""}var nr=bN.prototype;nr.add=vlr;nr.calendar=Rlr;nr.clone=Tlr;nr.diff=Ilr;nr.endOf=Hlr;nr.format=Mlr;nr.from=$lr;nr.fromNow=Blr;nr.to=qlr;nr.toNow=Ulr;nr.get=jor;nr.invalidAt=Zlr;nr.isAfter=wlr;nr.isBefore=Olr;nr.isBetween=Nlr;nr.isSame=Dlr;nr.isSameOrAfter=klr;nr.isSameOrBefore=Llr;nr.isValid=Xlr;nr.lang=a$e;nr.locale=o$e;nr.localeData=l$e;nr.max=Xar;nr.min=Kar;nr.parsingFlags=Jlr;nr.set=For;nr.startOf=zlr;nr.subtract=blr;nr.toArray=Qlr;nr.toObject=Ylr;nr.toDate=Vlr;nr.toISOString=jlr;nr.inspect=Flr;typeof Symbol<"u"&&Symbol.for!=null&&(nr[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});nr.toJSON=Klr;nr.toString=Plr;nr.unix=Wlr;nr.valueOf=Glr;nr.creationData=eur;nr.eraName=iur;nr.eraNarrow=sur;nr.eraAbbr=our;nr.eraYear=aur;nr.year=MMe;nr.isLeapYear=Por;nr.weekYear=pur;nr.isoWeekYear=mur;nr.quarter=nr.quarters=Eur;nr.month=zMe;nr.daysInMonth=Wor;nr.week=nr.weeks=ear;nr.isoWeek=nr.isoWeeks=tar;nr.weeksInYear=yur;nr.weeksInWeekYear=vur;nr.isoWeeksInYear=gur;nr.isoWeeksInISOWeekYear=xur;nr.date=h$e;nr.day=nr.days=par;nr.weekday=mar;nr.isoWeekday=gar;nr.dayOfYear=_ur;nr.hour=nr.hours=Aar;nr.minute=nr.minutes=Sur;nr.second=nr.seconds=Aur;nr.millisecond=nr.milliseconds=p$e;nr.utcOffset=olr;nr.utc=llr;nr.local=ulr;nr.parseZone=clr;nr.hasAlignedHourOffset=dlr;nr.isDST=flr;nr.isLocal=plr;nr.isUtcOffset=mlr;nr.isUtc=r$e;nr.isUTC=r$e;nr.zoneAbbr=Rur;nr.zoneName=Tur;nr.dates=uc("dates accessor is deprecated. Use date instead.",h$e);nr.months=uc("months accessor is deprecated. Use month instead",zMe);nr.years=uc("years accessor is deprecated. Use year instead",MMe);nr.zone=uc("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",alr);nr.isDSTShifted=uc("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",hlr);function wur(a){return Pi(a*1e3)}function Our(){return Pi.apply(null,arguments).parseZone()}function m$e(a){return a}var Qn=Use.prototype;Qn.calendar=hor;Qn.longDateFormat=xor;Qn.invalidDate=vor;Qn.ordinal=_or;Qn.preparse=m$e;Qn.postformat=m$e;Qn.relativeTime=Aor;Qn.pastFuture=Cor;Qn.set=cor;Qn.eras=tur;Qn.erasParse=rur;Qn.erasConvertYear=nur;Qn.erasAbbrRegex=uur;Qn.erasNameRegex=lur;Qn.erasNarrowRegex=cur;Qn.months=Uor;Qn.monthsShort=zor;Qn.monthsParse=Gor;Qn.monthsRegex=Qor;Qn.monthsShortRegex=Vor;Qn.week=Kor;Qn.firstDayOfYear=Zor;Qn.firstDayOfWeek=Jor;Qn.weekdays=uar;Qn.weekdaysMin=dar;Qn.weekdaysShort=car;Qn.weekdaysParse=har;Qn.weekdaysRegex=xar;Qn.weekdaysShortRegex=yar;Qn.weekdaysMinRegex=bar;Qn.isPM=_ar;Qn.meridiem=Car;function mM(a,u,d,f){var m=_0(),g=Sh().set(f,u);return m[d](g,a)}function g$e(a,u,d){if(x0(a)&&(u=a,a=void 0),a=a||"",u!=null)return mM(a,u,d,"month");var f,m=[];for(f=0;f<12;f++)m[f]=mM(a,f,d,"month");return m}function ooe(a,u,d,f){typeof a=="boolean"?(x0(u)&&(d=u,u=void 0),u=u||""):(u=a,d=u,a=!1,x0(u)&&(d=u,u=void 0),u=u||"");var m=_0(),g=a?m._week.dow:0,x,b=[];if(d!=null)return mM(u,(d+g)%7,f,"day");for(x=0;x<7;x++)b[x]=mM(u,(x+g)%7,f,"day");return b}function Nur(a,u){return g$e(a,u,"months")}function Dur(a,u){return g$e(a,u,"monthsShort")}function kur(a,u,d){return ooe(a,u,d,"weekdays")}function Lur(a,u,d){return ooe(a,u,d,"weekdaysShort")}function Iur(a,u,d){return ooe(a,u,d,"weekdaysMin")}Rx("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var u=a%10,d=Rn(a%100/10)===1?"th":u===1?"st":u===2?"nd":u===3?"rd":"th";return a+d}});Vt.lang=uc("moment.lang is deprecated. Use moment.locale instead.",Rx);Vt.langData=uc("moment.langData is deprecated. Use moment.localeData instead.",_0);var e0=Math.abs;function Pur(){var a=this._data;return this._milliseconds=e0(this._milliseconds),this._days=e0(this._days),this._months=e0(this._months),a.milliseconds=e0(a.milliseconds),a.seconds=e0(a.seconds),a.minutes=e0(a.minutes),a.hours=e0(a.hours),a.months=e0(a.months),a.years=e0(a.years),this}function x$e(a,u,d,f){var m=$d(u,d);return a._milliseconds+=f*m._milliseconds,a._days+=f*m._days,a._months+=f*m._months,a._bubble()}function jur(a,u){return x$e(this,a,u,1)}function Fur(a,u){return x$e(this,a,u,-1)}function A9e(a){return a<0?Math.floor(a):Math.ceil(a)}function Mur(){var a=this._milliseconds,u=this._days,d=this._months,f=this._data,m,g,x,b,v;return a>=0&&u>=0&&d>=0||a<=0&&u<=0&&d<=0||(a+=A9e(die(d)+u)*864e5,u=0,d=0),f.milliseconds=a%1e3,m=ec(a/1e3),f.seconds=m%60,g=ec(m/60),f.minutes=g%60,x=ec(g/60),f.hours=x%24,u+=ec(x/24),v=ec(y$e(u)),d+=v,u-=A9e(die(v)),b=ec(d/12),d%=12,f.days=u,f.months=d,f.years=b,this}function y$e(a){return a*4800/146097}function die(a){return a*146097/4800}function $ur(a){if(!this.isValid())return NaN;var u,d,f=this._milliseconds;if(a=cc(a),a==="month"||a==="quarter"||a==="year")switch(u=this._days+f/864e5,d=this._months+y$e(u),a){case"month":return d;case"quarter":return d/3;case"year":return d/12}else switch(u=this._days+Math.round(die(this._months)),a){case"week":return u/7+f/6048e5;case"day":return u+f/864e5;case"hour":return u*24+f/36e5;case"minute":return u*1440+f/6e4;case"second":return u*86400+f/1e3;case"millisecond":return Math.floor(u*864e5)+f;default:throw new Error("Unknown unit "+a)}}function S0(a){return function(){return this.as(a)}}var v$e=S0("ms"),Bur=S0("s"),qur=S0("m"),Uur=S0("h"),zur=S0("d"),Hur=S0("w"),Gur=S0("M"),Wur=S0("Q"),Vur=S0("y"),Qur=v$e;function Yur(){return $d(this)}function Kur(a){return a=cc(a),this.isValid()?this[a+"s"]():NaN}function Xv(a){return function(){return this.isValid()?this._data[a]:NaN}}var Xur=Xv("milliseconds"),Jur=Xv("seconds"),Zur=Xv("minutes"),ecr=Xv("hours"),tcr=Xv("days"),rcr=Xv("months"),ncr=Xv("years");function icr(){return ec(this.days()/7)}var r0=Math.round,G_={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function scr(a,u,d,f,m){return m.relativeTime(u||1,!!d,a,f)}function ocr(a,u,d,f){var m=$d(a).abs(),g=r0(m.as("s")),x=r0(m.as("m")),b=r0(m.as("h")),v=r0(m.as("d")),_=r0(m.as("M")),S=r0(m.as("w")),R=r0(m.as("y")),w=g<=d.ss&&["s",g]||g<d.s&&["ss",g]||x<=1&&["m"]||x<d.m&&["mm",x]||b<=1&&["h"]||b<d.h&&["hh",b]||v<=1&&["d"]||v<d.d&&["dd",v];return d.w!=null&&(w=w||S<=1&&["w"]||S<d.w&&["ww",S]),w=w||_<=1&&["M"]||_<d.M&&["MM",_]||R<=1&&["y"]||["yy",R],w[2]=u,w[3]=+a>0,w[4]=f,scr.apply(null,w)}function acr(a){return a===void 0?r0:typeof a=="function"?(r0=a,!0):!1}function lcr(a,u){return G_[a]===void 0?!1:u===void 0?G_[a]:(G_[a]=u,a==="s"&&(G_.ss=u-1),!0)}function ucr(a,u){if(!this.isValid())return this.localeData().invalidDate();var d=!1,f=G_,m,g;return typeof a=="object"&&(u=a,a=!1),typeof a=="boolean"&&(d=a),typeof u=="object"&&(f=Object.assign({},G_,u),u.s!=null&&u.ss==null&&(f.ss=u.s-1)),m=this.localeData(),g=ocr(this,!d,f,m),d&&(g=m.pastFuture(+this,g)),m.postformat(g)}var Xre=Math.abs;function M_(a){return(a>0)-(a<0)||+a}function R$(){if(!this.isValid())return this.localeData().invalidDate();var a=Xre(this._milliseconds)/1e3,u=Xre(this._days),d=Xre(this._months),f,m,g,x,b=this.asSeconds(),v,_,S,R;return b?(f=ec(a/60),m=ec(f/60),a%=60,f%=60,g=ec(d/12),d%=12,x=a?a.toFixed(3).replace(/\.?0+$/,""):"",v=b<0?"-":"",_=M_(this._months)!==M_(b)?"-":"",S=M_(this._days)!==M_(b)?"-":"",R=M_(this._milliseconds)!==M_(b)?"-":"",v+"P"+(g?_+g+"Y":"")+(d?_+d+"M":"")+(u?S+u+"D":"")+(m||f||a?"T":"")+(m?R+m+"H":"")+(f?R+f+"M":"")+(a?R+x+"S":"")):"P0D"}var jn=A$.prototype;jn.isValid=rlr;jn.abs=Pur;jn.add=jur;jn.subtract=Fur;jn.as=$ur;jn.asMilliseconds=v$e;jn.asSeconds=Bur;jn.asMinutes=qur;jn.asHours=Uur;jn.asDays=zur;jn.asWeeks=Hur;jn.asMonths=Gur;jn.asQuarters=Wur;jn.asYears=Vur;jn.valueOf=Qur;jn._bubble=Mur;jn.clone=Yur;jn.get=Kur;jn.milliseconds=Xur;jn.seconds=Jur;jn.minutes=Zur;jn.hours=ecr;jn.days=tcr;jn.weeks=icr;jn.months=rcr;jn.years=ncr;jn.humanize=ucr;jn.toISOString=R$;jn.toString=R$;jn.toJSON=R$;jn.locale=o$e;jn.localeData=l$e;jn.toIsoString=uc("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",R$);jn.lang=a$e;Wr("X",0,0,"unix");Wr("x",0,0,"valueOf");wr("x",b$);wr("X",Oor);mi("X",function(a,u,d){d._d=new Date(parseFloat(a)*1e3)});mi("x",function(a,u,d){d._d=new Date(Rn(a))});//! moment.js
|
|
2874
|
-
Vt.version="2.30.1";lor(Pi);Vt.fn=nr;Vt.min=Jar;Vt.max=Zar;Vt.now=elr;Vt.utc=Sh;Vt.unix=wur;Vt.months=Nur;Vt.isDate=vN;Vt.locale=Rx;Vt.invalid=g$;Vt.duration=$d;Vt.isMoment=Ld;Vt.weekdays=kur;Vt.parseZone=Our;Vt.localeData=_0;Vt.isDuration=NF;Vt.monthsShort=Dur;Vt.weekdaysMin=Iur;Vt.defineLocale=Jse;Vt.updateLocale=Oar;Vt.locales=Nar;Vt.weekdaysShort=Lur;Vt.normalizeUnits=cc;Vt.relativeTimeRounding=acr;Vt.relativeTimeThreshold=lcr;Vt.calendarFormat=Clr;Vt.prototype=nr;Vt.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};var aoe="Popover",[b$e,Nyr]=Md(aoe,[Bx]),SN=Bx(),[ccr,zx]=b$e(aoe),E$e=a=>{const{__scopePopover:u,children:d,open:f,defaultOpen:m,onOpenChange:g,modal:x=!1}=a,b=SN(u),v=Y.useRef(null),[_,S]=Y.useState(!1),[R=!1,w]=Dx({prop:f,defaultProp:m,onChange:g});return D.jsxRuntimeExports.jsx(YM,{...b,children:D.jsxRuntimeExports.jsx(ccr,{scope:u,contentId:ic(),triggerRef:v,open:R,onOpenChange:w,onOpenToggle:Y.useCallback(()=>w(N=>!N),[w]),hasCustomAnchor:_,onCustomAnchorAdd:Y.useCallback(()=>S(!0),[]),onCustomAnchorRemove:Y.useCallback(()=>S(!1),[]),modal:x,children:d})})};E$e.displayName=aoe;var _$e="PopoverAnchor",S$e=Y.forwardRef((a,u)=>{const{__scopePopover:d,...f}=a,m=zx(_$e,d),g=SN(d),{onCustomAnchorAdd:x,onCustomAnchorRemove:b}=m;return Y.useEffect(()=>(x(),()=>b()),[x,b]),D.jsxRuntimeExports.jsx(iN,{...g,...f,ref:u})});S$e.displayName=_$e;var A$e="PopoverTrigger",loe=Y.forwardRef((a,u)=>{const{__scopePopover:d,...f}=a,m=zx(A$e,d),g=SN(d),x=Cn(u,m.triggerRef),b=D.jsxRuntimeExports.jsx(rn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":m.open,"aria-controls":m.contentId,"data-state":w$e(m.open),...f,ref:x,onClick:xr(a.onClick,m.onOpenToggle)});return m.hasCustomAnchor?b:D.jsxRuntimeExports.jsx(iN,{asChild:!0,...g,children:b})});loe.displayName=A$e;var uoe="PopoverPortal",[dcr,fcr]=b$e(uoe,{forceMount:void 0}),C$e=a=>{const{__scopePopover:u,forceMount:d,children:f,container:m}=a,g=zx(uoe,u);return D.jsxRuntimeExports.jsx(dcr,{scope:u,forceMount:d,children:D.jsxRuntimeExports.jsx(Do,{present:d||g.open,children:D.jsxRuntimeExports.jsx(kS,{asChild:!0,container:m,children:f})})})};C$e.displayName=uoe;var dS="PopoverContent",coe=Y.forwardRef((a,u)=>{const d=fcr(dS,a.__scopePopover),{forceMount:f=d.forceMount,...m}=a,g=zx(dS,a.__scopePopover);return D.jsxRuntimeExports.jsx(Do,{present:f||g.open,children:g.modal?D.jsxRuntimeExports.jsx(hcr,{...m,ref:u}):D.jsxRuntimeExports.jsx(pcr,{...m,ref:u})})});coe.displayName=dS;var hcr=Y.forwardRef((a,u)=>{const d=zx(dS,a.__scopePopover),f=Y.useRef(null),m=Cn(u,f),g=Y.useRef(!1);return Y.useEffect(()=>{const x=f.current;if(x)return s$(x)},[]),D.jsxRuntimeExports.jsx(mN,{as:Tx,allowPinchZoom:!0,children:D.jsxRuntimeExports.jsx(R$e,{...a,ref:m,trapFocus:d.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:xr(a.onCloseAutoFocus,x=>{var b;x.preventDefault(),g.current||(b=d.triggerRef.current)==null||b.focus()}),onPointerDownOutside:xr(a.onPointerDownOutside,x=>{const b=x.detail.originalEvent,v=b.button===0&&b.ctrlKey===!0,_=b.button===2||v;g.current=_},{checkForDefaultPrevented:!1}),onFocusOutside:xr(a.onFocusOutside,x=>x.preventDefault(),{checkForDefaultPrevented:!1})})})}),pcr=Y.forwardRef((a,u)=>{const d=zx(dS,a.__scopePopover),f=Y.useRef(!1),m=Y.useRef(!1);return D.jsxRuntimeExports.jsx(R$e,{...a,ref:u,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:g=>{var x,b;(x=a.onCloseAutoFocus)==null||x.call(a,g),g.defaultPrevented||(f.current||(b=d.triggerRef.current)==null||b.focus(),g.preventDefault()),f.current=!1,m.current=!1},onInteractOutside:g=>{var x,b;(x=a.onInteractOutside)==null||x.call(a,g),g.defaultPrevented||(f.current=!0,g.detail.originalEvent.type==="pointerdown"&&(m.current=!0));const v=g.target;((b=d.triggerRef.current)==null?void 0:b.contains(v))&&g.preventDefault(),g.detail.originalEvent.type==="focusin"&&m.current&&g.preventDefault()}})}),R$e=Y.forwardRef((a,u)=>{const{__scopePopover:d,trapFocus:f,onOpenAutoFocus:m,onCloseAutoFocus:g,disableOutsidePointerEvents:x,onEscapeKeyDown:b,onPointerDownOutside:v,onFocusOutside:_,onInteractOutside:S,...R}=a,w=zx(dS,d),N=SN(d);return i$(),D.jsxRuntimeExports.jsx(pN,{asChild:!0,loop:!0,trapped:f,onMountAutoFocus:m,onUnmountAutoFocus:g,children:D.jsxRuntimeExports.jsx(OS,{asChild:!0,disableOutsidePointerEvents:x,onInteractOutside:S,onEscapeKeyDown:b,onPointerDownOutside:v,onFocusOutside:_,onDismiss:()=>w.onOpenChange(!1),children:D.jsxRuntimeExports.jsx(KM,{"data-state":w$e(w.open),role:"dialog",id:w.contentId,...N,...R,ref:u,style:{...R.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),T$e="PopoverClose",mcr=Y.forwardRef((a,u)=>{const{__scopePopover:d,...f}=a,m=zx(T$e,d);return D.jsxRuntimeExports.jsx(rn.button,{type:"button",...f,ref:u,onClick:xr(a.onClick,()=>m.onOpenChange(!1))})});mcr.displayName=T$e;var gcr="PopoverArrow",xcr=Y.forwardRef((a,u)=>{const{__scopePopover:d,...f}=a,m=SN(d);return D.jsxRuntimeExports.jsx(XM,{...m,...f,ref:u})});xcr.displayName=gcr;function w$e(a){return a?"open":"closed"}var AN=E$e,O$e=S$e,T$=loe,CN=C$e,w$=coe;const ycr={wrapper:{position:"mly1n2onr6",$$css:!0}},vcr=a=>{const[u,d]=a.split("-");return{side:u,align:d||"center"}},bcr=({open:a,setOpen:u,children:d,width:f=350,maxHeight:m,placement:g="right-start",referenceDiv:x,zIndex:b=10,xOffset:v=0,yOffset:_=10,disabled:S=!1,customStyle:R})=>{const w=Pe.useRef(null),{side:N,align:k}=vcr(g),B=()=>N==="top"||N==="bottom"?_:v,P=()=>N==="top"||N==="bottom"?v:_;return D.jsxRuntimeExports.jsx("div",{...Lt.props(ycr.wrapper,R),ref:w,children:D.jsxRuntimeExports.jsxs(AN,{open:a&&!S,onOpenChange:u,children:[D.jsxRuntimeExports.jsx(O$e,{asChild:!0,children:D.jsxRuntimeExports.jsx("div",{ref:x||w})}),a&&!S&&D.jsxRuntimeExports.jsx(CN,{children:D.jsxRuntimeExports.jsx(w$,{className:"mly15q0wj1 mly12oqio5 mly1a3rnpv mly12azwz9 mly64z8l9",side:N,align:k,sideOffset:B(),alignOffset:P(),style:{width:typeof f=="string"?f:`${f}px`,zIndex:b,...m?{maxHeight:`${m}px`}:{}},avoidCollisions:!0,children:d})})]})})},kF={wrapper:{position:"mly1n2onr6",$$css:!0},checkIcon:{verticalAlign:"mly1n8ftqi",width:"mlyw4jnvo",minWidth:"mlyt4ypqs",opacity:"mly1vqud6w",visibility:"mlylshs6z",color:"mly1pc1dlx",$$css:!0},checkIconSelected:{visibility:"mlynpuxes",$$css:!0},selectListDiv:{fontSize:"mlymhiqyu",fontFamily:"mly12xrqmb",textTransform:"mly6mezaz",fontWeight:"mly1fcty0u",width:"mlyh8yej3",padding:"mly1b4vry6",maxHeight:"mly1phlbz0",display:"mly78zum5",flexDirection:"mlydt5ytf",$$css:!0}},Hx=({autoFocus:a,value:u,onChange:d,options:f,placeholder:m="Select",disabled:g=!1,valueEqual:x=(_,S)=>_===S,width:b=200,customStyle:v})=>{var _;const[S,R]=Pe.useState(!1),[w,N]=Pe.useState(!1),[k,B]=Pe.useState(!1),P=u!==void 0&&((_=f.find(q=>x(q.value,u)))==null?void 0:_.label)||m,$=q=>{d?.(q),R(!1)};return D.jsxRuntimeExports.jsxs("div",{...Lt.props(kF.wrapper,v),children:[D.jsxRuntimeExports.jsxs("button",{type:"button",autoFocus:a,...{0:{className:"mlyjbqb8w mlymhiqyu mly1vspu6z mly12oqio5 mly1gqu590 mly1ypdohk mly1pc1dlx mly78zum5 mly1qughib mly6mezaz mly6s0dn4 mly12xrqmb mlyh8yej3"},4:{className:"mlyjbqb8w mlymhiqyu mly12oqio5 mly1gqu590 mly1ypdohk mly1pc1dlx mly78zum5 mly1qughib mly6mezaz mly6s0dn4 mly12xrqmb mlyh8yej3 mlyss3vti"},2:{className:"mlyjbqb8w mlymhiqyu mly12oqio5 mly1gqu590 mly1ypdohk mly1pc1dlx mly78zum5 mly1qughib mly6mezaz mly6s0dn4 mly12xrqmb mlyh8yej3 mly1gnnqk1 mlyv3vvaf mly1a2a7pz"},6:{className:"mlyjbqb8w mlymhiqyu mly12oqio5 mly1gqu590 mly1ypdohk mly1pc1dlx mly78zum5 mly1qughib mly6mezaz mly6s0dn4 mly12xrqmb mlyh8yej3 mly1gnnqk1 mlyv3vvaf mly1a2a7pz"},1:{className:"mlymhiqyu mly1vspu6z mly12oqio5 mly1gqu590 mly1pc1dlx mly78zum5 mly1qughib mly6mezaz mly6s0dn4 mly12xrqmb mlyh8yej3 mlyt0e3qv mly1jjku57"},5:{className:"mlymhiqyu mly12oqio5 mly1gqu590 mly1pc1dlx mly78zum5 mly1qughib mly6mezaz mly6s0dn4 mly12xrqmb mlyh8yej3 mlyss3vti mlyt0e3qv mly1jjku57"},3:{className:"mlymhiqyu mly12oqio5 mly1gqu590 mly1pc1dlx mly78zum5 mly1qughib mly6mezaz mly6s0dn4 mly12xrqmb mlyh8yej3 mly1gnnqk1 mlyv3vvaf mly1a2a7pz mlyt0e3qv mly1jjku57"},7:{className:"mlymhiqyu mly12oqio5 mly1gqu590 mly1pc1dlx mly78zum5 mly1qughib mly6mezaz mly6s0dn4 mly12xrqmb mlyh8yej3 mly1gnnqk1 mlyv3vvaf mly1a2a7pz mlyt0e3qv mly1jjku57"}}[!!w<<2|!!k<<1|!!g<<0],onMouseEnter:()=>N(!0),onMouseLeave:()=>N(!1),onFocus:()=>B(!0),onBlur:()=>B(!1),onClick:q=>{q.preventDefault(),q.stopPropagation(),g||R(!0)},disabled:g,children:[P,D.jsxRuntimeExports.jsx(An,{name:"chevronDown"})]}),D.jsxRuntimeExports.jsx(bcr,{open:S,setOpen:R,placement:"bottom-start",width:b,maxHeight:500,children:D.jsxRuntimeExports.jsx(Ecr,{options:f,value:u,valueEqual:x,onChange:$})})]})};function Ecr({options:a,value:u,onChange:d,valueEqual:f=(g,x)=>g===x,customStyle:m}){const[g,x]=Pe.useState(null);return D.jsxRuntimeExports.jsx(fN,{children:D.jsxRuntimeExports.jsx("div",{...Lt.props(kF.selectListDiv,m),children:a.reduce((b,v,_)=>{const S=u!==void 0&&f(u,v.value);return v.divider&&b.push(Pe.createElement("div",{className:"mly77krkw mlyh8yej3 mlynfbntj",key:"divider"+_})),b.push(D.jsxRuntimeExports.jsxs("label",{...{0:{className:"mlydqdrvq mly1ypdohk mlyuxw1ft mlylyipyv mly1pc1dlx mlyrvj5dj mly1mt1orb mlylqzeqv mly6s0dn4"},1:{className:"mlydqdrvq mly1ypdohk mlyuxw1ft mlylyipyv mly1pc1dlx mlyrvj5dj mly1mt1orb mlylqzeqv mly6s0dn4 mly6wxqrg"}}[(g===_)<<0],onMouseEnter:()=>x(_),onMouseLeave:()=>x(null),onClick:()=>d(v.value),children:[D.jsxRuntimeExports.jsx("input",{className:"mlynalus7 mlyqtp20y",type:"radio",defaultChecked:S}),D.jsxRuntimeExports.jsx(An,{name:"checkmark",customStyle:{...kF.checkIcon,...S?kF.checkIconSelected:void 0}}),D.jsxRuntimeExports.jsx("span",{className:"mlyet2fuk mlyb3r6kr mlylyipyv mly1fc57z9",children:v.label})]},_)),b},[])})})}const fS={second:"YYYY-MM-DD HH:mm:ss",minute:"YYYY-MM-DD HH:mm",hour:"YYYY-MM-DD HH:00",day:"YYYY-MM-DD",week:"YYYY-MM-DD-[WK]",month:"YYYY-MM",quarter:"YYYY-[Q]Q",year:"YYYY"},fie={second:/\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d/,minute:/\d\d\d\d-\d\d-\d\d \d\d:\d\d/,hour:/\d\d\d\d-\d\d-\d\d \d\d:00/,day:/\d\d\d\d-\d\d-\d\d/,week:/\d\d\d\d-\d\d-\d\d-WK/,month:/\d\d\d\d-\d\d/,quarter:/\d\d\d\d-Q\d/,year:/\d\d\d\d/},gM=({value:a,setValue:u,placeholder:d,autoFocus:f,units:m,onFocus:g,onBlur:x,isActive:b,customStyle:v,forwardRef:_})=>{const S=fS[m],[R,w]=Pe.useState(Vt.utc(a).format(S));return Pe.useEffect(()=>{w(Vt.utc(a).format(S))},[a,S]),D.jsxRuntimeExports.jsx("input",{...Lt.props(v,b?_cr.active:null),type:"text",placeholder:d||S,value:R,onFocus:g,onBlur:x,onChange:N=>{const k=N.target.value;w(k);const B=fie[m];if(k.match(B)){const P=Vt.utc(k,S);P.isValid()&&u(P.toDate())}},autoFocus:f,ref:_})};function nF(a,u){if(a.moment==="literal"){const{literal:d}=a;for(const f in fie){const m=f;if(d.match(fie[m]))return m}}return u?"second":"day"}const _cr={active:{backgroundColor:"mly1vzefiq",$$css:!0}};function Scr(a){return["January","February","March","April","May","June","July","August","September","October","November","December"][a]}const C9e=Object.keys(fS);function doe({value:a,setValue:u,units:d,maxLevel:f,customStyle:m,forwardRef:g}){const[x,b]=Pe.useState(a),v=Ccr(x),[_,S]=Pe.useState(d),R=Math.floor(Vt.utc(x).year()/10)*10;Pe.useEffect(()=>{const W=C9e.findIndex(J=>J===d);C9e.findIndex(J=>J===_)<W&&S(d)},[d,_]),Pe.useEffect(()=>{b(a)},[a]);const w=W=>{const X=Vt.utc(x).year(W).toDate();b(X),u(X)},N=W=>{const X=()=>w(R+W);return W===-1||W===10?D.jsxRuntimeExports.jsx("div",{onClick:X,className:"mly1247r65 mlyfvyar9 mlymcgfsh mly36usyh mly78zum5 mly6s0dn4 mlyl56j7k mly8fuzfi mly1fcty0u mly1ypdohk mly6mezaz mly1sxf85j mlyt89l8w mly1fxp9ov mly358b0h",children:R+W}):D.jsxRuntimeExports.jsx("div",{onClick:X,...{0:{className:"mly1247r65 mlyfvyar9 mlymcgfsh mly36usyh mly78zum5 mly6s0dn4 mlyl56j7k mly8fuzfi mly1v5ugh9 mly1fcty0u mly1ypdohk mly6mezaz mly1sxf85j mlyt89l8w mly1fxp9ov"},1:{className:"mly1247r65 mlyfvyar9 mlymcgfsh mly36usyh mly78zum5 mly6s0dn4 mlyl56j7k mly8fuzfi mly1v5ugh9 mly1fcty0u mly1ypdohk mly6mezaz mly1sxf85j mlyt89l8w mly1fxp9ov mly6wxqrg mly10bk7bj"}}[(Vt.utc(x).year()===R+W)<<0],children:R+W})},k=W=>{const X=Vt.utc(x).month(W).toDate();b(X),u(X)},B=W=>{b(W),u(W)},P=W=>{b(W),u(W)},$=W=>{const X=Vt.utc(x).quarter(W+1).toDate();b(X),u(X)},q=W=>{const X=()=>k(W),J=Vt.utc(x).month()===W&&Vt.utc(x).year()===Vt.utc(a).year();return D.jsxRuntimeExports.jsx("div",{onClick:X,...{0:{className:"mly1247r65 mlyfvyar9 mlymcgfsh mly36usyh mly78zum5 mly6s0dn4 mlyl56j7k mly8fuzfi mly1v5ugh9 mly1ypdohk mly6mezaz mly1sxf85j mly1fcty0u mlyt89l8w mly1fxp9ov"},1:{className:"mly1247r65 mlyfvyar9 mlymcgfsh mly36usyh mly78zum5 mly6s0dn4 mlyl56j7k mly8fuzfi mly1v5ugh9 mly1ypdohk mly6mezaz mly1sxf85j mly1fcty0u mlyt89l8w mly1fxp9ov mly6wxqrg mly10bk7bj"}}[!!J<<0],children:Scr(W)})},z=W=>{const X=()=>$(W),J=Vt.utc(x).quarter()-1===W&&Vt.utc(x).year()===Vt.utc(a).year();return D.jsxRuntimeExports.jsxs("div",{onClick:X,...{0:{className:"mly1rxuhir mly36usyh mly78zum5 mly6s0dn4 mlyl56j7k mly8fuzfi mly1v5ugh9 mly1ypdohk mly6mezaz mly1sxf85j mly1fcty0u mlyt89l8w mly1fxp9ov"},1:{className:"mly1rxuhir mly36usyh mly78zum5 mly6s0dn4 mlyl56j7k mly8fuzfi mly1v5ugh9 mly1ypdohk mly6mezaz mly1sxf85j mly1fcty0u mlyt89l8w mly1fxp9ov mly6wxqrg mly10bk7bj"}}[!!J<<0],children:["Q",W+1]})};return D.jsxRuntimeExports.jsxs("div",{...Lt.props(Acr.outer,m),ref:g,children:[D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1q0g3np mly1qughib mly1nejdyq mlyu06os2",children:[D.jsxRuntimeExports.jsx("div",{className:"mly1sxf85j mly1nn3v0j mly6wrskw mlymzs88n mly1ypdohk mlyjg9ulk",children:D.jsxRuntimeExports.jsx($i,{variant:"default",size:"compact",icon:"chevronLeft",onClick:()=>{_==="day"||_==="week"?b(Vt.utc(x).subtract(1,"month").toDate()):_==="month"||_==="quarter"?b(Vt.utc(x).subtract(1,"year").toDate()):_==="year"?b(Vt.utc(x).subtract(10,"years").toDate()):B(Vt.utc(x).subtract(1,"days").toDate())}})}),D.jsxRuntimeExports.jsxs("div",{className:"mly1sxf85j mlyfawy5m mly123j3cw mly1iyjqo2 mly2b8uid mly1ypdohk mly6mezaz mly1fcty0u mlyjg9ulk",onClick:()=>{S(_==="day"||_==="week"?"month":_==="month"||_==="quarter"?"year":_==="hour"||_==="minute"||_==="second"?"day":f)},children:[(_==="day"||_==="week")&&Vt.utc(x).format("MMMM YYYY"),(_==="month"||_==="quarter")&&Vt.utc(x).format("YYYY"),_==="year"&&D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[R,"-",R+9]}),(_==="hour"||_==="minute"||_==="second")&&D.jsxRuntimeExports.jsx(D.jsxRuntimeExports.Fragment,{children:Vt.utc(x).format("MMMM D, YYYY")})]}),D.jsxRuntimeExports.jsx("div",{className:"mly1sxf85j mly1nn3v0j mly6wrskw mlymzs88n mly1ypdohk mlyjg9ulk",children:D.jsxRuntimeExports.jsx($i,{variant:"default",size:"compact",icon:"chevronRight",onClick:()=>{_==="day"||_==="week"?b(Vt.utc(x).add(1,"month").toDate()):_==="month"||_==="quarter"?b(Vt.utc(x).add(1,"year").toDate()):_==="year"?b(Vt.utc(x).add(10,"years").toDate()):B(Vt.utc(x).add(1,"days").toDate())}})})]}),_==="day"&&D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mly195vfkc mly87ps6o",children:[D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1q0g3np mly195vfkc mly1qughib",children:[D.jsxRuntimeExports.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"S"}),D.jsxRuntimeExports.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"M"}),D.jsxRuntimeExports.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"T"}),D.jsxRuntimeExports.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"W"}),D.jsxRuntimeExports.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"T"}),D.jsxRuntimeExports.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"F"}),D.jsxRuntimeExports.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"S"})]}),v.map((W,X)=>D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mly1q0g3np mly195vfkc mly1qughib",children:W.map(J=>D.jsxRuntimeExports.jsx("div",{onClick:()=>{B(J.date)},...{0:{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly1ypdohk mly1f96onm mlyfifm61 mlyfj9a5l mlyt89l8w mly358b0h"},2:{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly1ypdohk mly1f96onm mlyfifm61 mlyfj9a5l mlyt89l8w mly1v5ugh9"},1:{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly1ypdohk mly1f96onm mlyfifm61 mlyfj9a5l mlyt89l8w mly6wxqrg mly1nwq7qm mly10bk7bj"},3:{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly1ypdohk mly1f96onm mlyfifm61 mlyfj9a5l mlyt89l8w mly6wxqrg mly1nwq7qm mly10bk7bj"}}[!!J.isCurrentMonth<<1|(a.getTime()===J.date.valueOf())<<0],children:J.number},J.number))},X))]}),_==="month"&&D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mly87ps6o mly1l1ennw mlyk2yuxw",children:[D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1q0g3np mly195vfkc mly1qughib",children:[q(0),q(1),q(2)]}),D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1q0g3np mly195vfkc mly1qughib",children:[q(3),q(4),q(5)]}),D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1q0g3np mly195vfkc mly1qughib",children:[q(6),q(7),q(8)]}),D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1q0g3np mly195vfkc mly1qughib",children:[q(9),q(10),q(11)]})]}),_==="year"&&D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mly87ps6o mly1l1ennw mlyk2yuxw",children:[D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1q0g3np mly1qughib mly195vfkc",children:[N(-1),N(0),N(1)]}),D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1q0g3np mly1qughib mly195vfkc",children:[N(2),N(3),N(4)]}),D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1q0g3np mly1qughib mly195vfkc",children:[N(5),N(6),N(7)]}),D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1q0g3np mly1qughib mly195vfkc",children:[N(8),N(9),N(10)]})]}),_==="quarter"&&D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mly87ps6o mly1l1ennw mlyk2yuxw",children:[z(0),z(1),z(2),z(3)]}),_==="week"&&D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mly195vfkc mly87ps6o",children:[D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1q0g3np mly195vfkc mly1qughib",children:[D.jsxRuntimeExports.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"S"}),D.jsxRuntimeExports.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"M"}),D.jsxRuntimeExports.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"T"}),D.jsxRuntimeExports.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"W"}),D.jsxRuntimeExports.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"T"}),D.jsxRuntimeExports.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"F"}),D.jsxRuntimeExports.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"S"})]}),v.map((W,X)=>D.jsxRuntimeExports.jsx("div",{onClick:()=>{P(W[0].date)},...{0:{className:"mly78zum5 mly1ypdohk mly1q0g3np mly195vfkc mly1f96onm mly1qughib mlyfj9a5l mlyt89l8w"},1:{className:"mly78zum5 mly1ypdohk mly1q0g3np mly195vfkc mly1f96onm mly1qughib mlyfj9a5l mlyt89l8w mly6wxqrg mly1nwq7qm mly10bk7bj"}}[(a.getTime()===W[0].date.valueOf())<<0],children:W.map(J=>D.jsxRuntimeExports.jsx("div",{...{0:{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly1ypdohk mly1f96onm mlyfifm61 mly358b0h"},1:{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly1ypdohk mly1f96onm mlyfifm61 mly1v5ugh9"}}[!!J.isCurrentMonth<<0],children:J.number},J.number))},X))]}),(_==="hour"||_==="minute"||_==="second")&&D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mlydt5ytf mly87ps6o mly1l1ennw mlylo07zb",children:D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1q0g3np mly87ps6o mly1l1ennw mly883omv",children:[D.jsxRuntimeExports.jsx(Vre,{label:"Hours",value:parseInt(Vt.utc(x).format("hh")),setValue:W=>{const X=Vt.utc(x).hour()>=12?"PM":"AM",J=parseInt(Vt.utc(`${W} ${X}`,["hh A"]).format("H"));u(Vt.utc(x).hour(J).toDate())},width:"40px"}),(d==="minute"||d==="second")&&D.jsxRuntimeExports.jsx(Vre,{label:"Minutes",value:Vt.utc(x).minutes(),setValue:W=>{u(Vt.utc(x).minute(W).toDate())},width:"40px"}),d==="second"&&D.jsxRuntimeExports.jsx(Vre,{label:"Seconds",value:Vt.utc(x).seconds(),setValue:W=>{u(Vt.utc(x).second(W).toDate())},width:"40px"}),D.jsxRuntimeExports.jsx("div",{style:{display:"flex",justifyContent:"flex-end",flexDirection:"column"},children:D.jsxRuntimeExports.jsx(Hx,{value:Vt.utc(x).hour()>=12?"PM":"AM",onChange:W=>{const X=parseInt(Vt.utc(x).format("h")),J=parseInt(Vt.utc(`${X} ${W}`,["hh A"]).format("H"));u(Vt.utc(x).hour(J).toDate())},options:[{value:"AM",label:"AM"},{value:"PM",label:"PM"}]})})]})})]})}const Acr={outer:{userSelect:"mly87ps6o",fontSize:"mlymhiqyu",fontFamily:"mly12xrqmb",$$css:!0}};function Ccr(a){const u=Vt.utc(a).date(1),d=u.day(),f=u.daysInMonth(),m=u.clone().subtract(1,"day").daysInMonth(),g=[];for(let x=0;x<6;x++){const b=[];for(let v=0;v<7;v++)if(x===0&&v<d){const _=d-v;b.push({number:m-_+1,date:u.clone().subtract(_,"days").toDate(),isCurrentMonth:!1})}else{const _=x*7+v-d;_<f?b.push({number:_+1,date:u.clone().add(_,"days").toDate(),isCurrentMonth:!0}):b.push({number:_-f+1,date:u.clone().add(_,"days").toDate(),isCurrentMonth:!1})}g.push(b)}return g}function Rcr({width:a,minWidth:u,onWidthChange:d}){const f=m=>{const g=a,x=m.clientX,b=()=>{document.body.removeEventListener("mousemove",v),document.body.removeEventListener("mouseup",b),document.body.style.cursor="initial",document.body.style.userSelect="initial"},v=_=>{const S=g+(_.clientX-x);d(Math.max(S,u))};document.body.addEventListener("mousemove",v),document.body.addEventListener("mouseup",b),document.body.style.cursor="ew-resize",document.body.style.userSelect="none"};return D.jsxRuntimeExports.jsx("div",{className:"mly7eptgl mly1ftt334 mly5yr21d mly1vjfegm mly10l6tqk mly13vifvy mly1bkpikb",onMouseDown:m=>f(m)})}function hie({title:a,description:u,variant:d="info",children:f}){return D.jsxRuntimeExports.jsxs("div",{className:"mly1q4ynmn mlyh8yej3 mly5yr21d mly78zum5 mlydt5ytf mly1kmqopl mly16zck5j",children:[D.jsxRuntimeExports.jsxs("div",{...Lt.props(UO.header,wcr[d],f?UO.headerWithContent:null),children:[D.jsxRuntimeExports.jsx("div",{className:"mly1qx5ct2 mly78zum5 mlyl56j7k mly6s0dn4",children:D.jsxRuntimeExports.jsx(An,{...Tcr[d]})}),D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mlyb3r6kr",children:[D.jsxRuntimeExports.jsx("div",{...Lt.props(UO.title,Fr.emphasized),children:a}),D.jsxRuntimeExports.jsx("div",{...Lt.props(UO.description,Fr.supporting),children:u})]})]}),f&&D.jsxRuntimeExports.jsx("div",{...Lt.props(UO.content,Fr.body),children:D.jsxRuntimeExports.jsx(fN,{children:f})})]})}const UO={header:{borderRadius:"mly1q4ynmn",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,width:"mlyh8yej3",padding:"mlyc7ga6q",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,boxSizing:"mly9f619",display:"mly78zum5",flexDirection:"mly1q0g3np",alignItems:"mly7a106z",justifyContent:"mlylqzeqv",gap:"mly167g77z",rowGap:null,columnGap:null,$$css:!0},headerWithContent:{borderRadius:"mlyq516e8",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,$$css:!0},title:{textOverflow:"mlylyipyv",whiteSpace:"mlyuxw1ft",overflow:"mlyb3r6kr",overflowX:null,overflowY:null,$$css:!0},description:{textOverflow:"mlylyipyv",whiteSpace:"mlyuxw1ft",overflow:"mlyb3r6kr",overflowX:null,overflowY:null,$$css:!0},content:{padding:"mly1tamke2",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,backgroundColor:"mly12peec7",borderRadius:"mly11zuszs",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,overflow:"mlyb3r6kr",overflowX:null,overflowY:null,$$css:!0}},Tcr={info:{name:"info",color:"info"},success:{name:"check_circle",color:"positive"},warn:{name:"warning",color:"warning"},critical:{name:"error",color:"negative"}},wcr={info:{backgroundColor:"mly1pnbjq1",$$css:!0},success:{backgroundColor:"mly1x3oq6j",$$css:!0},warn:{backgroundColor:"mly1x7w6om",$$css:!0},critical:{backgroundColor:"mlyrkwa2d",$$css:!0}},N$e=Y.createContext({});function Ocr({defaultExpandedItemId:a,children:u,customStyle:d}){const[f,m]=Y.useState(a),g=x=>{m(b=>{if(b!==x)return x})};return D.jsxRuntimeExports.jsx(N$e.Provider,{value:{expandedItemId:f,onExpandedItemChange:g},children:D.jsxRuntimeExports.jsx("div",{...Lt.props(Ncr.main,d),children:Y.Children.map(u,x=>D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[x,D.jsxRuntimeExports.jsx(Y_,{})]}))})})}const Ncr={main:{display:"mly78zum5",flexDirection:"mlydt5ytf",overflow:"mlyb3r6kr",overflowX:null,overflowY:null,flexGrow:"mly1iyjqo2",$$css:!0}};function Jre({id:a,label:u,sublabel:d,startIcon:f,badge:m,endIcon:g,children:x}){const{expandedItemId:b,onExpandedItemChange:v}=Y.useContext(N$e);return D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly6s0dn4 mlylqzeqv mlye8ttls mly167g77z mly1ypdohk",onClick:()=>v?.(a),children:[f&&D.jsxRuntimeExports.jsx(D.jsxRuntimeExports.Fragment,{children:f}),D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mlyb3r6kr mly1iyjqo2",children:[D.jsxRuntimeExports.jsx("span",{...Lt.props(Fr.body,R9e.label),children:u}),d&&D.jsxRuntimeExports.jsx("span",{...Lt.props(Fr.supporting,R9e.sublabel),children:d})]}),m&&m,g&&g]}),a===b&&D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mlydt5ytf mly1iyjqo2 mlytdwleo mly1jnr06f mly10cdfl8 mlyysyzu8",children:Y.Children.map(x,_=>_)})]})}const R9e={label:{flexGrow:"mly1iyjqo2",fontWeight:"mly1xlr1w8",overflow:"mlyb3r6kr",overflowX:null,overflowY:null,textOverflow:"mlylyipyv",$$css:!0},sublabel:{flexGrow:"mly1iyjqo2",color:"mly9dwj6z",overflow:"mlyb3r6kr",overflowX:null,overflowY:null,textOverflow:"mlylyipyv",$$css:!0}};var Zre="rovingFocusGroup.onEntryFocus",Dcr={bubbles:!1,cancelable:!0},O$="RovingFocusGroup",[pie,D$e,kcr]=bse(O$),[Lcr,N$]=Md(O$,[kcr]),[Icr,Pcr]=Lcr(O$),k$e=Y.forwardRef((a,u)=>D.jsxRuntimeExports.jsx(pie.Provider,{scope:a.__scopeRovingFocusGroup,children:D.jsxRuntimeExports.jsx(pie.Slot,{scope:a.__scopeRovingFocusGroup,children:D.jsxRuntimeExports.jsx(jcr,{...a,ref:u})})}));k$e.displayName=O$;var jcr=Y.forwardRef((a,u)=>{const{__scopeRovingFocusGroup:d,orientation:f,loop:m=!1,dir:g,currentTabStopId:x,defaultCurrentTabStopId:b,onCurrentTabStopIdChange:v,onEntryFocus:_,preventScrollOnEntryFocus:S=!1,...R}=a,w=Y.useRef(null),N=Cn(u,w),k=dN(g),[B=null,P]=Dx({prop:x,defaultProp:b,onChange:v}),[$,q]=Y.useState(!1),z=Us(_),W=D$e(d),X=Y.useRef(!1),[J,ee]=Y.useState(0);return Y.useEffect(()=>{const fe=w.current;if(fe)return fe.addEventListener(Zre,z),()=>fe.removeEventListener(Zre,z)},[z]),D.jsxRuntimeExports.jsx(Icr,{scope:d,orientation:f,dir:k,loop:m,currentTabStopId:B,onItemFocus:Y.useCallback(fe=>P(fe),[P]),onItemShiftTab:Y.useCallback(()=>q(!0),[]),onFocusableItemAdd:Y.useCallback(()=>ee(fe=>fe+1),[]),onFocusableItemRemove:Y.useCallback(()=>ee(fe=>fe-1),[]),children:D.jsxRuntimeExports.jsx(rn.div,{tabIndex:$||J===0?-1:0,"data-orientation":f,...R,ref:N,style:{outline:"none",...a.style},onMouseDown:xr(a.onMouseDown,()=>{X.current=!0}),onFocus:xr(a.onFocus,fe=>{const be=!X.current;if(fe.target===fe.currentTarget&&be&&!$){const je=new CustomEvent(Zre,Dcr);if(fe.currentTarget.dispatchEvent(je),!je.defaultPrevented){const _e=W().filter(Ne=>Ne.focusable),De=_e.find(Ne=>Ne.active),Xe=_e.find(Ne=>Ne.id===B),te=[De,Xe,..._e].filter(Boolean).map(Ne=>Ne.ref.current);P$e(te,S)}}X.current=!1}),onBlur:xr(a.onBlur,()=>q(!1))})})}),L$e="RovingFocusGroupItem",I$e=Y.forwardRef((a,u)=>{const{__scopeRovingFocusGroup:d,focusable:f=!0,active:m=!1,tabStopId:g,...x}=a,b=ic(),v=g||b,_=Pcr(L$e,d),S=_.currentTabStopId===v,R=D$e(d),{onFocusableItemAdd:w,onFocusableItemRemove:N}=_;return Y.useEffect(()=>{if(f)return w(),()=>N()},[f,w,N]),D.jsxRuntimeExports.jsx(pie.ItemSlot,{scope:d,id:v,focusable:f,active:m,children:D.jsxRuntimeExports.jsx(rn.span,{tabIndex:S?0:-1,"data-orientation":_.orientation,...x,ref:u,onMouseDown:xr(a.onMouseDown,k=>{f?_.onItemFocus(v):k.preventDefault()}),onFocus:xr(a.onFocus,()=>_.onItemFocus(v)),onKeyDown:xr(a.onKeyDown,k=>{if(k.key==="Tab"&&k.shiftKey){_.onItemShiftTab();return}if(k.target!==k.currentTarget)return;const B=$cr(k,_.orientation,_.dir);if(B!==void 0){if(k.metaKey||k.ctrlKey||k.altKey||k.shiftKey)return;k.preventDefault();let $=R().filter(q=>q.focusable).map(q=>q.ref.current);if(B==="last")$.reverse();else if(B==="prev"||B==="next"){B==="prev"&&$.reverse();const q=$.indexOf(k.currentTarget);$=_.loop?Bcr($,q+1):$.slice(q+1)}setTimeout(()=>P$e($))}})})})});I$e.displayName=L$e;var Fcr={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Mcr(a,u){return u!=="rtl"?a:a==="ArrowLeft"?"ArrowRight":a==="ArrowRight"?"ArrowLeft":a}function $cr(a,u,d){const f=Mcr(a.key,d);if(!(u==="vertical"&&["ArrowLeft","ArrowRight"].includes(f))&&!(u==="horizontal"&&["ArrowUp","ArrowDown"].includes(f)))return Fcr[f]}function P$e(a,u=!1){const d=document.activeElement;for(const f of a)if(f===d||(f.focus({preventScroll:u}),document.activeElement!==d))return}function Bcr(a,u){return a.map((d,f)=>a[(u+f)%a.length])}var j$e=k$e,F$e=I$e,mie=["Enter"," "],qcr=["ArrowDown","PageUp","Home"],M$e=["ArrowUp","PageDown","End"],Ucr=[...qcr,...M$e],zcr={ltr:[...mie,"ArrowRight"],rtl:[...mie,"ArrowLeft"]},Hcr={ltr:["ArrowLeft"],rtl:["ArrowRight"]},RN="Menu",[j5,Gcr,Wcr]=bse(RN),[Jv,$$e]=Md(RN,[Wcr,Bx,N$]),D$=Bx(),B$e=N$(),[Vcr,Zv]=Jv(RN),[Qcr,TN]=Jv(RN),q$e=a=>{const{__scopeMenu:u,open:d=!1,children:f,dir:m,onOpenChange:g,modal:x=!0}=a,b=D$(u),[v,_]=Y.useState(null),S=Y.useRef(!1),R=Us(g),w=dN(m);return Y.useEffect(()=>{const N=()=>{S.current=!0,document.addEventListener("pointerdown",k,{capture:!0,once:!0}),document.addEventListener("pointermove",k,{capture:!0,once:!0})},k=()=>S.current=!1;return document.addEventListener("keydown",N,{capture:!0}),()=>{document.removeEventListener("keydown",N,{capture:!0}),document.removeEventListener("pointerdown",k,{capture:!0}),document.removeEventListener("pointermove",k,{capture:!0})}},[]),D.jsxRuntimeExports.jsx(YM,{...b,children:D.jsxRuntimeExports.jsx(Vcr,{scope:u,open:d,onOpenChange:R,content:v,onContentChange:_,children:D.jsxRuntimeExports.jsx(Qcr,{scope:u,onClose:Y.useCallback(()=>R(!1),[R]),isUsingKeyboardRef:S,dir:w,modal:x,children:f})})})};q$e.displayName=RN;var Ycr="MenuAnchor",foe=Y.forwardRef((a,u)=>{const{__scopeMenu:d,...f}=a,m=D$(d);return D.jsxRuntimeExports.jsx(iN,{...m,...f,ref:u})});foe.displayName=Ycr;var hoe="MenuPortal",[Kcr,U$e]=Jv(hoe,{forceMount:void 0}),z$e=a=>{const{__scopeMenu:u,forceMount:d,children:f,container:m}=a,g=Zv(hoe,u);return D.jsxRuntimeExports.jsx(Kcr,{scope:u,forceMount:d,children:D.jsxRuntimeExports.jsx(Do,{present:d||g.open,children:D.jsxRuntimeExports.jsx(kS,{asChild:!0,container:m,children:f})})})};z$e.displayName=hoe;var sc="MenuContent",[Xcr,poe]=Jv(sc),H$e=Y.forwardRef((a,u)=>{const d=U$e(sc,a.__scopeMenu),{forceMount:f=d.forceMount,...m}=a,g=Zv(sc,a.__scopeMenu),x=TN(sc,a.__scopeMenu);return D.jsxRuntimeExports.jsx(j5.Provider,{scope:a.__scopeMenu,children:D.jsxRuntimeExports.jsx(Do,{present:f||g.open,children:D.jsxRuntimeExports.jsx(j5.Slot,{scope:a.__scopeMenu,children:x.modal?D.jsxRuntimeExports.jsx(Jcr,{...m,ref:u}):D.jsxRuntimeExports.jsx(Zcr,{...m,ref:u})})})})}),Jcr=Y.forwardRef((a,u)=>{const d=Zv(sc,a.__scopeMenu),f=Y.useRef(null),m=Cn(u,f);return Y.useEffect(()=>{const g=f.current;if(g)return s$(g)},[]),D.jsxRuntimeExports.jsx(moe,{...a,ref:m,trapFocus:d.open,disableOutsidePointerEvents:d.open,disableOutsideScroll:!0,onFocusOutside:xr(a.onFocusOutside,g=>g.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>d.onOpenChange(!1)})}),Zcr=Y.forwardRef((a,u)=>{const d=Zv(sc,a.__scopeMenu);return D.jsxRuntimeExports.jsx(moe,{...a,ref:u,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>d.onOpenChange(!1)})}),moe=Y.forwardRef((a,u)=>{const{__scopeMenu:d,loop:f=!1,trapFocus:m,onOpenAutoFocus:g,onCloseAutoFocus:x,disableOutsidePointerEvents:b,onEntryFocus:v,onEscapeKeyDown:_,onPointerDownOutside:S,onFocusOutside:R,onInteractOutside:w,onDismiss:N,disableOutsideScroll:k,...B}=a,P=Zv(sc,d),$=TN(sc,d),q=D$(d),z=B$e(d),W=Gcr(d),[X,J]=Y.useState(null),ee=Y.useRef(null),fe=Cn(u,ee,P.onContentChange),be=Y.useRef(0),je=Y.useRef(""),_e=Y.useRef(0),De=Y.useRef(null),Xe=Y.useRef("right"),ze=Y.useRef(0),te=k?mN:Y.Fragment,Ne=k?{as:Tx,allowPinchZoom:!0}:void 0,Ge=Je=>{var rt,vt;const qe=je.current+Je,ge=W().filter(Se=>!Se.disabled),pe=document.activeElement,ye=(rt=ge.find(Se=>Se.ref.current===pe))==null?void 0:rt.textValue,we=ge.map(Se=>Se.textValue),Ie=ddr(we,qe,ye),le=(vt=ge.find(Se=>Se.textValue===Ie))==null?void 0:vt.ref.current;(function Se(Le){je.current=Le,window.clearTimeout(be.current),Le!==""&&(be.current=window.setTimeout(()=>Se(""),1e3))})(qe),le&&setTimeout(()=>le.focus())};Y.useEffect(()=>()=>window.clearTimeout(be.current),[]),i$();const mt=Y.useCallback(Je=>{var rt,vt;return Xe.current===((rt=De.current)==null?void 0:rt.side)&&hdr(Je,(vt=De.current)==null?void 0:vt.area)},[]);return D.jsxRuntimeExports.jsx(Xcr,{scope:d,searchRef:je,onItemEnter:Y.useCallback(Je=>{mt(Je)&&Je.preventDefault()},[mt]),onItemLeave:Y.useCallback(Je=>{var rt;mt(Je)||((rt=ee.current)==null||rt.focus(),J(null))},[mt]),onTriggerLeave:Y.useCallback(Je=>{mt(Je)&&Je.preventDefault()},[mt]),pointerGraceTimerRef:_e,onPointerGraceIntentChange:Y.useCallback(Je=>{De.current=Je},[]),children:D.jsxRuntimeExports.jsx(te,{...Ne,children:D.jsxRuntimeExports.jsx(pN,{asChild:!0,trapped:m,onMountAutoFocus:xr(g,Je=>{var rt;Je.preventDefault(),(rt=ee.current)==null||rt.focus({preventScroll:!0})}),onUnmountAutoFocus:x,children:D.jsxRuntimeExports.jsx(OS,{asChild:!0,disableOutsidePointerEvents:b,onEscapeKeyDown:_,onPointerDownOutside:S,onFocusOutside:R,onInteractOutside:w,onDismiss:N,children:D.jsxRuntimeExports.jsx(j$e,{asChild:!0,...z,dir:$.dir,orientation:"vertical",loop:f,currentTabStopId:X,onCurrentTabStopIdChange:J,onEntryFocus:xr(v,Je=>{$.isUsingKeyboardRef.current||Je.preventDefault()}),preventScrollOnEntryFocus:!0,children:D.jsxRuntimeExports.jsx(KM,{role:"menu","aria-orientation":"vertical","data-state":oBe(P.open),"data-radix-menu-content":"",dir:$.dir,...q,...B,ref:fe,style:{outline:"none",...B.style},onKeyDown:xr(B.onKeyDown,Je=>{const vt=Je.target.closest("[data-radix-menu-content]")===Je.currentTarget,qe=Je.ctrlKey||Je.altKey||Je.metaKey,ge=Je.key.length===1;vt&&(Je.key==="Tab"&&Je.preventDefault(),!qe&&ge&&Ge(Je.key));const pe=ee.current;if(Je.target!==pe||!Ucr.includes(Je.key))return;Je.preventDefault();const we=W().filter(Ie=>!Ie.disabled).map(Ie=>Ie.ref.current);M$e.includes(Je.key)&&we.reverse(),udr(we)}),onBlur:xr(a.onBlur,Je=>{Je.currentTarget.contains(Je.target)||(window.clearTimeout(be.current),je.current="")}),onPointerMove:xr(a.onPointerMove,F5(Je=>{const rt=Je.target,vt=ze.current!==Je.clientX;if(Je.currentTarget.contains(rt)&&vt){const qe=Je.clientX>ze.current?"right":"left";Xe.current=qe,ze.current=Je.clientX}}))})})})})})})});H$e.displayName=sc;var edr="MenuGroup",goe=Y.forwardRef((a,u)=>{const{__scopeMenu:d,...f}=a;return D.jsxRuntimeExports.jsx(rn.div,{role:"group",...f,ref:u})});goe.displayName=edr;var tdr="MenuLabel",G$e=Y.forwardRef((a,u)=>{const{__scopeMenu:d,...f}=a;return D.jsxRuntimeExports.jsx(rn.div,{...f,ref:u})});G$e.displayName=tdr;var xM="MenuItem",T9e="menu.itemSelect",k$=Y.forwardRef((a,u)=>{const{disabled:d=!1,onSelect:f,...m}=a,g=Y.useRef(null),x=TN(xM,a.__scopeMenu),b=poe(xM,a.__scopeMenu),v=Cn(u,g),_=Y.useRef(!1),S=()=>{const R=g.current;if(!d&&R){const w=new CustomEvent(T9e,{bubbles:!0,cancelable:!0});R.addEventListener(T9e,N=>f?.(N),{once:!0}),KPe(R,w),w.defaultPrevented?_.current=!1:x.onClose()}};return D.jsxRuntimeExports.jsx(W$e,{...m,ref:v,disabled:d,onClick:xr(a.onClick,S),onPointerDown:R=>{var w;(w=a.onPointerDown)==null||w.call(a,R),_.current=!0},onPointerUp:xr(a.onPointerUp,R=>{var w;_.current||(w=R.currentTarget)==null||w.click()}),onKeyDown:xr(a.onKeyDown,R=>{const w=b.searchRef.current!=="";d||w&&R.key===" "||mie.includes(R.key)&&(R.currentTarget.click(),R.preventDefault())})})});k$.displayName=xM;var W$e=Y.forwardRef((a,u)=>{const{__scopeMenu:d,disabled:f=!1,textValue:m,...g}=a,x=poe(xM,d),b=B$e(d),v=Y.useRef(null),_=Cn(u,v),[S,R]=Y.useState(!1),[w,N]=Y.useState("");return Y.useEffect(()=>{const k=v.current;k&&N((k.textContent??"").trim())},[g.children]),D.jsxRuntimeExports.jsx(j5.ItemSlot,{scope:d,disabled:f,textValue:m??w,children:D.jsxRuntimeExports.jsx(F$e,{asChild:!0,...b,focusable:!f,children:D.jsxRuntimeExports.jsx(rn.div,{role:"menuitem","data-highlighted":S?"":void 0,"aria-disabled":f||void 0,"data-disabled":f?"":void 0,...g,ref:_,onPointerMove:xr(a.onPointerMove,F5(k=>{f?x.onItemLeave(k):(x.onItemEnter(k),k.defaultPrevented||k.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:xr(a.onPointerLeave,F5(k=>x.onItemLeave(k))),onFocus:xr(a.onFocus,()=>R(!0)),onBlur:xr(a.onBlur,()=>R(!1))})})})}),rdr="MenuCheckboxItem",V$e=Y.forwardRef((a,u)=>{const{checked:d=!1,onCheckedChange:f,...m}=a;return D.jsxRuntimeExports.jsx(J$e,{scope:a.__scopeMenu,checked:d,children:D.jsxRuntimeExports.jsx(k$,{role:"menuitemcheckbox","aria-checked":yM(d)?"mixed":d,...m,ref:u,"data-state":yoe(d),onSelect:xr(m.onSelect,()=>f?.(yM(d)?!0:!d),{checkForDefaultPrevented:!1})})})});V$e.displayName=rdr;var Q$e="MenuRadioGroup",[ndr,idr]=Jv(Q$e,{value:void 0,onValueChange:()=>{}}),Y$e=Y.forwardRef((a,u)=>{const{value:d,onValueChange:f,...m}=a,g=Us(f);return D.jsxRuntimeExports.jsx(ndr,{scope:a.__scopeMenu,value:d,onValueChange:g,children:D.jsxRuntimeExports.jsx(goe,{...m,ref:u})})});Y$e.displayName=Q$e;var K$e="MenuRadioItem",X$e=Y.forwardRef((a,u)=>{const{value:d,...f}=a,m=idr(K$e,a.__scopeMenu),g=d===m.value;return D.jsxRuntimeExports.jsx(J$e,{scope:a.__scopeMenu,checked:g,children:D.jsxRuntimeExports.jsx(k$,{role:"menuitemradio","aria-checked":g,...f,ref:u,"data-state":yoe(g),onSelect:xr(f.onSelect,()=>{var x;return(x=m.onValueChange)==null?void 0:x.call(m,d)},{checkForDefaultPrevented:!1})})})});X$e.displayName=K$e;var xoe="MenuItemIndicator",[J$e,sdr]=Jv(xoe,{checked:!1}),Z$e=Y.forwardRef((a,u)=>{const{__scopeMenu:d,forceMount:f,...m}=a,g=sdr(xoe,d);return D.jsxRuntimeExports.jsx(Do,{present:f||yM(g.checked)||g.checked===!0,children:D.jsxRuntimeExports.jsx(rn.span,{...m,ref:u,"data-state":yoe(g.checked)})})});Z$e.displayName=xoe;var odr="MenuSeparator",eBe=Y.forwardRef((a,u)=>{const{__scopeMenu:d,...f}=a;return D.jsxRuntimeExports.jsx(rn.div,{role:"separator","aria-orientation":"horizontal",...f,ref:u})});eBe.displayName=odr;var adr="MenuArrow",tBe=Y.forwardRef((a,u)=>{const{__scopeMenu:d,...f}=a,m=D$(d);return D.jsxRuntimeExports.jsx(XM,{...m,...f,ref:u})});tBe.displayName=adr;var ldr="MenuSub",[Dyr,rBe]=Jv(ldr),o5="MenuSubTrigger",nBe=Y.forwardRef((a,u)=>{const d=Zv(o5,a.__scopeMenu),f=TN(o5,a.__scopeMenu),m=rBe(o5,a.__scopeMenu),g=poe(o5,a.__scopeMenu),x=Y.useRef(null),{pointerGraceTimerRef:b,onPointerGraceIntentChange:v}=g,_={__scopeMenu:a.__scopeMenu},S=Y.useCallback(()=>{x.current&&window.clearTimeout(x.current),x.current=null},[]);return Y.useEffect(()=>S,[S]),Y.useEffect(()=>{const R=b.current;return()=>{window.clearTimeout(R),v(null)}},[b,v]),D.jsxRuntimeExports.jsx(foe,{asChild:!0,..._,children:D.jsxRuntimeExports.jsx(W$e,{id:m.triggerId,"aria-haspopup":"menu","aria-expanded":d.open,"aria-controls":m.contentId,"data-state":oBe(d.open),...a,ref:GM(u,m.onTriggerChange),onClick:R=>{var w;(w=a.onClick)==null||w.call(a,R),!(a.disabled||R.defaultPrevented)&&(R.currentTarget.focus(),d.open||d.onOpenChange(!0))},onPointerMove:xr(a.onPointerMove,F5(R=>{g.onItemEnter(R),!R.defaultPrevented&&!a.disabled&&!d.open&&!x.current&&(g.onPointerGraceIntentChange(null),x.current=window.setTimeout(()=>{d.onOpenChange(!0),S()},100))})),onPointerLeave:xr(a.onPointerLeave,F5(R=>{var w,N;S();const k=(w=d.content)==null?void 0:w.getBoundingClientRect();if(k){const B=(N=d.content)==null?void 0:N.dataset.side,P=B==="right",$=P?-5:5,q=k[P?"left":"right"],z=k[P?"right":"left"];g.onPointerGraceIntentChange({area:[{x:R.clientX+$,y:R.clientY},{x:q,y:k.top},{x:z,y:k.top},{x:z,y:k.bottom},{x:q,y:k.bottom}],side:B}),window.clearTimeout(b.current),b.current=window.setTimeout(()=>g.onPointerGraceIntentChange(null),300)}else{if(g.onTriggerLeave(R),R.defaultPrevented)return;g.onPointerGraceIntentChange(null)}})),onKeyDown:xr(a.onKeyDown,R=>{var w;const N=g.searchRef.current!=="";a.disabled||N&&R.key===" "||zcr[f.dir].includes(R.key)&&(d.onOpenChange(!0),(w=d.content)==null||w.focus(),R.preventDefault())})})})});nBe.displayName=o5;var iBe="MenuSubContent",sBe=Y.forwardRef((a,u)=>{const d=U$e(sc,a.__scopeMenu),{forceMount:f=d.forceMount,...m}=a,g=Zv(sc,a.__scopeMenu),x=TN(sc,a.__scopeMenu),b=rBe(iBe,a.__scopeMenu),v=Y.useRef(null),_=Cn(u,v);return D.jsxRuntimeExports.jsx(j5.Provider,{scope:a.__scopeMenu,children:D.jsxRuntimeExports.jsx(Do,{present:f||g.open,children:D.jsxRuntimeExports.jsx(j5.Slot,{scope:a.__scopeMenu,children:D.jsxRuntimeExports.jsx(moe,{id:b.contentId,"aria-labelledby":b.triggerId,...m,ref:_,align:"start",side:x.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:S=>{var R;x.isUsingKeyboardRef.current&&((R=v.current)==null||R.focus()),S.preventDefault()},onCloseAutoFocus:S=>S.preventDefault(),onFocusOutside:xr(a.onFocusOutside,S=>{S.target!==b.trigger&&g.onOpenChange(!1)}),onEscapeKeyDown:xr(a.onEscapeKeyDown,S=>{x.onClose(),S.preventDefault()}),onKeyDown:xr(a.onKeyDown,S=>{var R;const w=S.currentTarget.contains(S.target),N=Hcr[x.dir].includes(S.key);w&&N&&(g.onOpenChange(!1),(R=b.trigger)==null||R.focus(),S.preventDefault())})})})})})});sBe.displayName=iBe;function oBe(a){return a?"open":"closed"}function yM(a){return a==="indeterminate"}function yoe(a){return yM(a)?"indeterminate":a?"checked":"unchecked"}function udr(a){const u=document.activeElement;for(const d of a)if(d===u||(d.focus(),document.activeElement!==u))return}function cdr(a,u){return a.map((d,f)=>a[(u+f)%a.length])}function ddr(a,u,d){const m=u.length>1&&Array.from(u).every(_=>_===u[0])?u[0]:u,g=d?a.indexOf(d):-1;let x=cdr(a,Math.max(g,0));m.length===1&&(x=x.filter(_=>_!==d));const v=x.find(_=>_.toLowerCase().startsWith(m.toLowerCase()));return v!==d?v:void 0}function fdr(a,u){const{x:d,y:f}=a;let m=!1;for(let g=0,x=u.length-1;g<u.length;x=g++){const b=u[g].x,v=u[g].y,_=u[x].x,S=u[x].y;v>f!=S>f&&d<(_-b)*(f-v)/(S-v)+b&&(m=!m)}return m}function hdr(a,u){if(!u)return!1;const d={x:a.clientX,y:a.clientY};return fdr(d,u)}function F5(a){return u=>u.pointerType==="mouse"?a(u):void 0}var pdr=q$e,mdr=foe,gdr=z$e,xdr=H$e,ydr=goe,vdr=G$e,bdr=k$,Edr=V$e,_dr=Y$e,Sdr=X$e,Adr=Z$e,Cdr=eBe,Rdr=tBe,Tdr=nBe,wdr=sBe,voe="DropdownMenu",[Odr,kyr]=Md(voe,[$$e]),Ya=$$e(),[Ndr,aBe]=Odr(voe),lBe=a=>{const{__scopeDropdownMenu:u,children:d,dir:f,open:m,defaultOpen:g,onOpenChange:x,modal:b=!0}=a,v=Ya(u),_=Y.useRef(null),[S=!1,R]=Dx({prop:m,defaultProp:g,onChange:x});return D.jsxRuntimeExports.jsx(Ndr,{scope:u,triggerId:ic(),triggerRef:_,contentId:ic(),open:S,onOpenChange:R,onOpenToggle:Y.useCallback(()=>R(w=>!w),[R]),modal:b,children:D.jsxRuntimeExports.jsx(pdr,{...v,open:S,onOpenChange:R,dir:f,modal:b,children:d})})};lBe.displayName=voe;var uBe="DropdownMenuTrigger",cBe=Y.forwardRef((a,u)=>{const{__scopeDropdownMenu:d,disabled:f=!1,...m}=a,g=aBe(uBe,d),x=Ya(d);return D.jsxRuntimeExports.jsx(mdr,{asChild:!0,...x,children:D.jsxRuntimeExports.jsx(rn.button,{type:"button",id:g.triggerId,"aria-haspopup":"menu","aria-expanded":g.open,"aria-controls":g.open?g.contentId:void 0,"data-state":g.open?"open":"closed","data-disabled":f?"":void 0,disabled:f,...m,ref:GM(u,g.triggerRef),onPointerDown:xr(a.onPointerDown,b=>{!f&&b.button===0&&b.ctrlKey===!1&&(g.onOpenToggle(),g.open||b.preventDefault())}),onKeyDown:xr(a.onKeyDown,b=>{f||(["Enter"," "].includes(b.key)&&g.onOpenToggle(),b.key==="ArrowDown"&&g.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(b.key)&&b.preventDefault())})})})});cBe.displayName=uBe;var Ddr="DropdownMenuPortal",dBe=a=>{const{__scopeDropdownMenu:u,...d}=a,f=Ya(u);return D.jsxRuntimeExports.jsx(gdr,{...f,...d})};dBe.displayName=Ddr;var fBe="DropdownMenuContent",hBe=Y.forwardRef((a,u)=>{const{__scopeDropdownMenu:d,...f}=a,m=aBe(fBe,d),g=Ya(d),x=Y.useRef(!1);return D.jsxRuntimeExports.jsx(xdr,{id:m.contentId,"aria-labelledby":m.triggerId,...g,...f,ref:u,onCloseAutoFocus:xr(a.onCloseAutoFocus,b=>{var v;x.current||(v=m.triggerRef.current)==null||v.focus(),x.current=!1,b.preventDefault()}),onInteractOutside:xr(a.onInteractOutside,b=>{const v=b.detail.originalEvent,_=v.button===0&&v.ctrlKey===!0,S=v.button===2||_;(!m.modal||S)&&(x.current=!0)}),style:{...a.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});hBe.displayName=fBe;var kdr="DropdownMenuGroup",Ldr=Y.forwardRef((a,u)=>{const{__scopeDropdownMenu:d,...f}=a,m=Ya(d);return D.jsxRuntimeExports.jsx(ydr,{...m,...f,ref:u})});Ldr.displayName=kdr;var Idr="DropdownMenuLabel",Pdr=Y.forwardRef((a,u)=>{const{__scopeDropdownMenu:d,...f}=a,m=Ya(d);return D.jsxRuntimeExports.jsx(vdr,{...m,...f,ref:u})});Pdr.displayName=Idr;var jdr="DropdownMenuItem",pBe=Y.forwardRef((a,u)=>{const{__scopeDropdownMenu:d,...f}=a,m=Ya(d);return D.jsxRuntimeExports.jsx(bdr,{...m,...f,ref:u})});pBe.displayName=jdr;var Fdr="DropdownMenuCheckboxItem",Mdr=Y.forwardRef((a,u)=>{const{__scopeDropdownMenu:d,...f}=a,m=Ya(d);return D.jsxRuntimeExports.jsx(Edr,{...m,...f,ref:u})});Mdr.displayName=Fdr;var $dr="DropdownMenuRadioGroup",Bdr=Y.forwardRef((a,u)=>{const{__scopeDropdownMenu:d,...f}=a,m=Ya(d);return D.jsxRuntimeExports.jsx(_dr,{...m,...f,ref:u})});Bdr.displayName=$dr;var qdr="DropdownMenuRadioItem",Udr=Y.forwardRef((a,u)=>{const{__scopeDropdownMenu:d,...f}=a,m=Ya(d);return D.jsxRuntimeExports.jsx(Sdr,{...m,...f,ref:u})});Udr.displayName=qdr;var zdr="DropdownMenuItemIndicator",Hdr=Y.forwardRef((a,u)=>{const{__scopeDropdownMenu:d,...f}=a,m=Ya(d);return D.jsxRuntimeExports.jsx(Adr,{...m,...f,ref:u})});Hdr.displayName=zdr;var Gdr="DropdownMenuSeparator",Wdr=Y.forwardRef((a,u)=>{const{__scopeDropdownMenu:d,...f}=a,m=Ya(d);return D.jsxRuntimeExports.jsx(Cdr,{...m,...f,ref:u})});Wdr.displayName=Gdr;var Vdr="DropdownMenuArrow",Qdr=Y.forwardRef((a,u)=>{const{__scopeDropdownMenu:d,...f}=a,m=Ya(d);return D.jsxRuntimeExports.jsx(Rdr,{...m,...f,ref:u})});Qdr.displayName=Vdr;var Ydr="DropdownMenuSubTrigger",Kdr=Y.forwardRef((a,u)=>{const{__scopeDropdownMenu:d,...f}=a,m=Ya(d);return D.jsxRuntimeExports.jsx(Tdr,{...m,...f,ref:u})});Kdr.displayName=Ydr;var Xdr="DropdownMenuSubContent",Jdr=Y.forwardRef((a,u)=>{const{__scopeDropdownMenu:d,...f}=a,m=Ya(d);return D.jsxRuntimeExports.jsx(wdr,{...m,...f,ref:u,style:{...a.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Jdr.displayName=Xdr;var Zdr=lBe,w9e=cBe,efr=dBe,tfr=hBe,rfr=pBe;function boe({trigger:a,tooltip:u,onOpenChange:d,children:f,tooltipProps:m}){const[g,x]=Y.useState(),b=v=>{v&&x(!1),d?.(v)};return D.jsxRuntimeExports.jsxs(Zdr,{onOpenChange:b,children:[u?D.jsxRuntimeExports.jsxs(oN,{open:g,onOpenChange:x,delayDuration:300,children:[D.jsxRuntimeExports.jsx(aN,{asChild:!0,children:D.jsxRuntimeExports.jsx(w9e,{asChild:!0,children:a})}),D.jsxRuntimeExports.jsx(lN,{children:D.jsxRuntimeExports.jsx(uN,{...m,...Lt.props(typeof u=="string"?g0.default:g0.card),children:u})})]}):D.jsxRuntimeExports.jsx(w9e,{asChild:!0,children:a}),D.jsxRuntimeExports.jsx(efr,{children:D.jsxRuntimeExports.jsx(tfr,{...Lt.props(Fr.body,LF.content),side:"bottom",align:"start",sideOffset:4,onCloseAutoFocus:v=>v.preventDefault(),children:Y.Children.map(f,v=>v)})})]})}function M5({icon:a,label:u,sublabel:d,onClick:f,disabled:m}){return D.jsxRuntimeExports.jsxs(rfr,{className:"mly78zum5 mly6s0dn4 mlye8ttls mly167g77z mly1kogg8i mly1ypdohk mly1a2a7pz mly1bw6wve mly5ezrf1 mly15rdse5 mly1z060rf mly5deeek mly1jacekv mly7ouyw2 mly7h4d18",onClick:g=>{f?.(g)},disabled:m,children:[a&&D.jsxRuntimeExports.jsx(An,{name:a,customStyle:LF.icon}),D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mly1iyjqo2",children:[D.jsxRuntimeExports.jsx("span",{...Lt.props(Fr.body,LF.label),children:u}),d&&D.jsxRuntimeExports.jsx("span",{...Lt.props(Fr.supporting,LF.sublabel),children:d})]})]})}const LF={content:{display:"mly78zum5",flexDirection:"mlydt5ytf",borderRadius:"mly1q4ynmn",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,background:"mlyotlr4g",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,boxShadow:"mly17fq3gk",padding:"mlyfawy5m",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0},icon:{color:"mly1mguc6l",$$css:!0},label:{flexGrow:"mly1iyjqo2",color:"mly12lmysb",$$css:!0},sublabel:{flexGrow:"mly1iyjqo2",color:"mly15jt5ur",$$css:!0}},L$=Y.createContext({});function nfr({runQuery:a}){const{rootQuery:u,setQuery:d,source:f}=Pe.useContext(ai),{onCollapse:m}=Pe.useContext(L$),{focusMainView:g}=cN(),x=!u||u.isEmpty(),b=u?.isRunnable(),v=()=>{f&&u&&a(f,u.build())};return D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1qughib mly6s0dn4 mlye8ttls",children:[D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly167g77z mly6s0dn4 mlydqdrvq",children:[D.jsxRuntimeExports.jsx(An,{name:"filterSliders"}),D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.largeBody,ifr.title),children:"Query"})]}),D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly167g77z",children:[D.jsxRuntimeExports.jsx($i,{onClick:()=>{g(),d?.(void 0)},isDisabled:!u||u?.isEmpty(),label:"Clear",variant:"flat",size:"compact"}),D.jsxRuntimeExports.jsxs(LS,{children:[D.jsxRuntimeExports.jsx(IS,{asChild:!0,children:D.jsxRuntimeExports.jsx($i,{icon:"play",onClick:v,isDisabled:!b,label:"Run",variant:"primary",size:"compact"})}),D.jsxRuntimeExports.jsx(PS,{children:D.jsxRuntimeExports.jsx(jS,{children:D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.body,g0.default),children:b?"Execute the query.":x?"The current query is empty.":"The current query cannot be executed."})})})]}),m&&D.jsxRuntimeExports.jsx($i,{icon:"sidebarCollapse",tooltip:"Close the source panel",onClick:m,size:"compact",variant:"flat"})]})]})}const ifr={title:{fontWeight:"mly1xlr1w8",$$css:!0}},Id={labelWithIcon:{display:"mly78zum5",alignItems:"mly6s0dn4",whiteSpace:"mlyuxw1ft",gap:"mly167g77z",rowGap:null,columnGap:null,overflow:"mlyb3r6kr",overflowX:null,overflowY:null,$$css:!0},queryCard:{border:"mlyzkdzjc",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,borderRadius:"mly1sxf85j",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,padding:"mlye8ttls",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0},title:{whiteSpace:"mlyuxw1ft",padding:"mly17qkr04",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0},tokenContainer:{display:"mly78zum5",flexDirection:"mlydt5ytf",gap:"mly167g77z",rowGap:null,columnGap:null,$$css:!0}};function sfr({value:a,customStyle:u}){if(!a)return D.jsxRuntimeExports.jsx($s,{label:"∅"});switch(a.kind){case"boolean_literal":return D.jsxRuntimeExports.jsx($s,{label:a.boolean_value?"true":"false",customStyle:u});case"date_literal":return D.jsxRuntimeExports.jsx($s,{label:a.date_value,customStyle:u});case"timestamp_literal":return D.jsxRuntimeExports.jsx($s,{label:a.timestamp_value,customStyle:u});case"null_literal":return D.jsxRuntimeExports.jsx($s,{label:"∅"});case"number_literal":return D.jsxRuntimeExports.jsx($s,{label:a.number_value.toLocaleString(),customStyle:u});case"string_literal":return D.jsxRuntimeExports.jsx($s,{label:a.string_value,customStyle:u});case"filter_expression_literal":return D.jsxRuntimeExports.jsx($s,{label:a.filter_expression_value,customStyle:u})}}const mBe=["table","bar_chart","dashboard","json","line_chart","list","list_detail","point_map","scatter_chart","segment_map","shape_map","sparkline"],ofr=["number","boolean","currency","image","url","percent","text","time"],afr=[...mBe,...ofr];function Eoe(a){if(a){const u=a.getProperties(),d=Object.keys(u);for(const f of d)if(afr.includes(f)&&!u[f].deleted)return f}return null}function I$(a){return ufr[a]}function gBe(a){return cfr[a]}function IF(a){let u;switch(a.kind){case"view":u="query";break;case"dimension":case"measure":u=I$(a.type.kind);break;case"join":u=lfr(a.relationship);break}return u}function lfr(a){return dfr[a]}function xBe(a){const u=a.getTag();return`viz_${Eoe(u)??"table"}`}const ufr={array_type:"array",string_type:"string",date_type:"date",boolean_type:"boolean",number_type:"number",json_type:"json",record_type:"json",sql_native_type:"sql_native",timestamp_type:"date",filter_expression_type:"filter"},cfr={view:"purple",dimension:"cyan",measure:"green",join:void 0},dfr={many:"many_to_one",cross:"one_to_many",one:"one_to_one"};function hS({field:a,hoverActions:u,hoverActionsVisible:d,...f}){let m=a.name;return a.kind==="dimension"&&(a.type.kind==="timestamp_type"||a.type.kind==="date_type")&&a.type.timeframe&&(m+=`.${a.type.timeframe}`),D.jsxRuntimeExports.jsxs("div",{...{0:{className:"mly78zum5 mly6s0dn4 mly1nhvcw1 mly1jnr06f mly28fmrt mly1x0xcia"},1:{className:"mly78zum5 mly6s0dn4 mly1nhvcw1 mly1jnr06f mlym9y5t7"}}[!!d<<0],children:[D.jsxRuntimeExports.jsx($s,{label:m,color:gBe(a.kind),icon:IF(a),...f}),u&&D.jsxRuntimeExports.jsx("div",{className:"mly1vsucm1 mly2lah0s",children:u})]})}function ffr({drills:a}){return a.length?D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsx("div",{...Lt.props(Id.title),children:"drills"}),D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mlydt5ytf mly1jnr06f",children:a.map((u,d)=>D.jsxRuntimeExports.jsxs(hN,{color:"cyan",customStyle:hfr.tokenGroup,children:[D.jsxRuntimeExports.jsx(hS,{field:u.filter.fieldReference.getFieldInfo()}),D.jsxRuntimeExports.jsx($s,{label:"="}),u.filter instanceof Zr.ASTFilterWithLiteralEquality?D.jsxRuntimeExports.jsx(sfr,{value:u.filter.value.node}):D.jsxRuntimeExports.jsx($s,{label:u.filter.filterString})]},d))})]}):null}const hfr={tokenGroup:{display:"mly78zum5",$$css:!0}};function pfr(){for(var a=arguments.length,u=new Array(a),d=0;d<a;d++)u[d]=arguments[d];return Pe.useMemo(()=>f=>{u.forEach(m=>m(f))},u)}const P$=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function HS(a){const u=Object.prototype.toString.call(a);return u==="[object Window]"||u==="[object global]"}function _oe(a){return"nodeType"in a}function Tl(a){var u,d;return a?HS(a)?a:_oe(a)&&(u=(d=a.ownerDocument)==null?void 0:d.defaultView)!=null?u:window:window}function Soe(a){const{Document:u}=Tl(a);return a instanceof u}function wN(a){return HS(a)?!1:a instanceof Tl(a).HTMLElement}function yBe(a){return a instanceof Tl(a).SVGElement}function GS(a){return a?HS(a)?a.document:_oe(a)?Soe(a)?a:wN(a)||yBe(a)?a.ownerDocument:document:document:document}const yh=P$?Pe.useLayoutEffect:Pe.useEffect;function Aoe(a){const u=Pe.useRef(a);return yh(()=>{u.current=a}),Pe.useCallback(function(){for(var d=arguments.length,f=new Array(d),m=0;m<d;m++)f[m]=arguments[m];return u.current==null?void 0:u.current(...f)},[])}function mfr(){const a=Pe.useRef(null),u=Pe.useCallback((f,m)=>{a.current=setInterval(f,m)},[]),d=Pe.useCallback(()=>{a.current!==null&&(clearInterval(a.current),a.current=null)},[]);return[u,d]}function $5(a,u){u===void 0&&(u=[a]);const d=Pe.useRef(a);return yh(()=>{d.current!==a&&(d.current=a)},u),d}function ON(a,u){const d=Pe.useRef();return Pe.useMemo(()=>{const f=a(d.current);return d.current=f,f},[...u])}function vM(a){const u=Aoe(a),d=Pe.useRef(null),f=Pe.useCallback(m=>{m!==d.current&&u?.(m,d.current),d.current=m},[]);return[d,f]}function gie(a){const u=Pe.useRef();return Pe.useEffect(()=>{u.current=a},[a]),u.current}let ene={};function NN(a,u){return Pe.useMemo(()=>{if(u)return u;const d=ene[a]==null?0:ene[a]+1;return ene[a]=d,a+"-"+d},[a,u])}function vBe(a){return function(u){for(var d=arguments.length,f=new Array(d>1?d-1:0),m=1;m<d;m++)f[m-1]=arguments[m];return f.reduce((g,x)=>{const b=Object.entries(x);for(const[v,_]of b){const S=g[v];S!=null&&(g[v]=S+a*_)}return g},{...u})}}const rS=vBe(1),bM=vBe(-1);function gfr(a){return"clientX"in a&&"clientY"in a}function Coe(a){if(!a)return!1;const{KeyboardEvent:u}=Tl(a.target);return u&&a instanceof u}function xfr(a){if(!a)return!1;const{TouchEvent:u}=Tl(a.target);return u&&a instanceof u}function xie(a){if(xfr(a)){if(a.touches&&a.touches.length){const{clientX:u,clientY:d}=a.touches[0];return{x:u,y:d}}else if(a.changedTouches&&a.changedTouches.length){const{clientX:u,clientY:d}=a.changedTouches[0];return{x:u,y:d}}}return gfr(a)?{x:a.clientX,y:a.clientY}:null}const B5=Object.freeze({Translate:{toString(a){if(!a)return;const{x:u,y:d}=a;return"translate3d("+(u?Math.round(u):0)+"px, "+(d?Math.round(d):0)+"px, 0)"}},Scale:{toString(a){if(!a)return;const{scaleX:u,scaleY:d}=a;return"scaleX("+u+") scaleY("+d+")"}},Transform:{toString(a){if(a)return[B5.Translate.toString(a),B5.Scale.toString(a)].join(" ")}},Transition:{toString(a){let{property:u,duration:d,easing:f}=a;return u+" "+d+"ms "+f}}}),O9e="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function yfr(a){return a.matches(O9e)?a:a.querySelector(O9e)}const vfr={display:"none"};function bfr(a){let{id:u,value:d}=a;return Pe.createElement("div",{id:u,style:vfr},d)}function Efr(a){let{id:u,announcement:d,ariaLiveType:f="assertive"}=a;const m={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return Pe.createElement("div",{id:u,style:m,role:"status","aria-live":f,"aria-atomic":!0},d)}function _fr(){const[a,u]=Pe.useState("");return{announce:Pe.useCallback(f=>{f!=null&&u(f)},[]),announcement:a}}const bBe=Pe.createContext(null);function Sfr(a){const u=Pe.useContext(bBe);Pe.useEffect(()=>{if(!u)throw new Error("useDndMonitor must be used within a children of <DndContext>");return u(a)},[a,u])}function Afr(){const[a]=Pe.useState(()=>new Set),u=Pe.useCallback(f=>(a.add(f),()=>a.delete(f)),[a]);return[Pe.useCallback(f=>{let{type:m,event:g}=f;a.forEach(x=>{var b;return(b=x[m])==null?void 0:b.call(x,g)})},[a]),u]}const Cfr={draggable:`
|
|
2874
|
+
Vt.version="2.30.1";lor(Pi);Vt.fn=nr;Vt.min=Jar;Vt.max=Zar;Vt.now=elr;Vt.utc=Sh;Vt.unix=wur;Vt.months=Nur;Vt.isDate=vN;Vt.locale=Rx;Vt.invalid=g$;Vt.duration=$d;Vt.isMoment=Ld;Vt.weekdays=kur;Vt.parseZone=Our;Vt.localeData=_0;Vt.isDuration=NF;Vt.monthsShort=Dur;Vt.weekdaysMin=Iur;Vt.defineLocale=Jse;Vt.updateLocale=Oar;Vt.locales=Nar;Vt.weekdaysShort=Lur;Vt.normalizeUnits=cc;Vt.relativeTimeRounding=acr;Vt.relativeTimeThreshold=lcr;Vt.calendarFormat=Clr;Vt.prototype=nr;Vt.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};var aoe="Popover",[b$e,Dyr]=Md(aoe,[Bx]),SN=Bx(),[ccr,zx]=b$e(aoe),E$e=a=>{const{__scopePopover:u,children:d,open:f,defaultOpen:m,onOpenChange:g,modal:x=!1}=a,b=SN(u),v=Y.useRef(null),[_,S]=Y.useState(!1),[R=!1,w]=Dx({prop:f,defaultProp:m,onChange:g});return D.jsxRuntimeExports.jsx(YM,{...b,children:D.jsxRuntimeExports.jsx(ccr,{scope:u,contentId:ic(),triggerRef:v,open:R,onOpenChange:w,onOpenToggle:Y.useCallback(()=>w(N=>!N),[w]),hasCustomAnchor:_,onCustomAnchorAdd:Y.useCallback(()=>S(!0),[]),onCustomAnchorRemove:Y.useCallback(()=>S(!1),[]),modal:x,children:d})})};E$e.displayName=aoe;var _$e="PopoverAnchor",S$e=Y.forwardRef((a,u)=>{const{__scopePopover:d,...f}=a,m=zx(_$e,d),g=SN(d),{onCustomAnchorAdd:x,onCustomAnchorRemove:b}=m;return Y.useEffect(()=>(x(),()=>b()),[x,b]),D.jsxRuntimeExports.jsx(iN,{...g,...f,ref:u})});S$e.displayName=_$e;var A$e="PopoverTrigger",loe=Y.forwardRef((a,u)=>{const{__scopePopover:d,...f}=a,m=zx(A$e,d),g=SN(d),x=Cn(u,m.triggerRef),b=D.jsxRuntimeExports.jsx(rn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":m.open,"aria-controls":m.contentId,"data-state":w$e(m.open),...f,ref:x,onClick:xr(a.onClick,m.onOpenToggle)});return m.hasCustomAnchor?b:D.jsxRuntimeExports.jsx(iN,{asChild:!0,...g,children:b})});loe.displayName=A$e;var uoe="PopoverPortal",[dcr,fcr]=b$e(uoe,{forceMount:void 0}),C$e=a=>{const{__scopePopover:u,forceMount:d,children:f,container:m}=a,g=zx(uoe,u);return D.jsxRuntimeExports.jsx(dcr,{scope:u,forceMount:d,children:D.jsxRuntimeExports.jsx(Do,{present:d||g.open,children:D.jsxRuntimeExports.jsx(kS,{asChild:!0,container:m,children:f})})})};C$e.displayName=uoe;var dS="PopoverContent",coe=Y.forwardRef((a,u)=>{const d=fcr(dS,a.__scopePopover),{forceMount:f=d.forceMount,...m}=a,g=zx(dS,a.__scopePopover);return D.jsxRuntimeExports.jsx(Do,{present:f||g.open,children:g.modal?D.jsxRuntimeExports.jsx(hcr,{...m,ref:u}):D.jsxRuntimeExports.jsx(pcr,{...m,ref:u})})});coe.displayName=dS;var hcr=Y.forwardRef((a,u)=>{const d=zx(dS,a.__scopePopover),f=Y.useRef(null),m=Cn(u,f),g=Y.useRef(!1);return Y.useEffect(()=>{const x=f.current;if(x)return s$(x)},[]),D.jsxRuntimeExports.jsx(mN,{as:Tx,allowPinchZoom:!0,children:D.jsxRuntimeExports.jsx(R$e,{...a,ref:m,trapFocus:d.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:xr(a.onCloseAutoFocus,x=>{var b;x.preventDefault(),g.current||(b=d.triggerRef.current)==null||b.focus()}),onPointerDownOutside:xr(a.onPointerDownOutside,x=>{const b=x.detail.originalEvent,v=b.button===0&&b.ctrlKey===!0,_=b.button===2||v;g.current=_},{checkForDefaultPrevented:!1}),onFocusOutside:xr(a.onFocusOutside,x=>x.preventDefault(),{checkForDefaultPrevented:!1})})})}),pcr=Y.forwardRef((a,u)=>{const d=zx(dS,a.__scopePopover),f=Y.useRef(!1),m=Y.useRef(!1);return D.jsxRuntimeExports.jsx(R$e,{...a,ref:u,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:g=>{var x,b;(x=a.onCloseAutoFocus)==null||x.call(a,g),g.defaultPrevented||(f.current||(b=d.triggerRef.current)==null||b.focus(),g.preventDefault()),f.current=!1,m.current=!1},onInteractOutside:g=>{var x,b;(x=a.onInteractOutside)==null||x.call(a,g),g.defaultPrevented||(f.current=!0,g.detail.originalEvent.type==="pointerdown"&&(m.current=!0));const v=g.target;((b=d.triggerRef.current)==null?void 0:b.contains(v))&&g.preventDefault(),g.detail.originalEvent.type==="focusin"&&m.current&&g.preventDefault()}})}),R$e=Y.forwardRef((a,u)=>{const{__scopePopover:d,trapFocus:f,onOpenAutoFocus:m,onCloseAutoFocus:g,disableOutsidePointerEvents:x,onEscapeKeyDown:b,onPointerDownOutside:v,onFocusOutside:_,onInteractOutside:S,...R}=a,w=zx(dS,d),N=SN(d);return i$(),D.jsxRuntimeExports.jsx(pN,{asChild:!0,loop:!0,trapped:f,onMountAutoFocus:m,onUnmountAutoFocus:g,children:D.jsxRuntimeExports.jsx(OS,{asChild:!0,disableOutsidePointerEvents:x,onInteractOutside:S,onEscapeKeyDown:b,onPointerDownOutside:v,onFocusOutside:_,onDismiss:()=>w.onOpenChange(!1),children:D.jsxRuntimeExports.jsx(KM,{"data-state":w$e(w.open),role:"dialog",id:w.contentId,...N,...R,ref:u,style:{...R.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),T$e="PopoverClose",mcr=Y.forwardRef((a,u)=>{const{__scopePopover:d,...f}=a,m=zx(T$e,d);return D.jsxRuntimeExports.jsx(rn.button,{type:"button",...f,ref:u,onClick:xr(a.onClick,()=>m.onOpenChange(!1))})});mcr.displayName=T$e;var gcr="PopoverArrow",xcr=Y.forwardRef((a,u)=>{const{__scopePopover:d,...f}=a,m=SN(d);return D.jsxRuntimeExports.jsx(XM,{...m,...f,ref:u})});xcr.displayName=gcr;function w$e(a){return a?"open":"closed"}var AN=E$e,O$e=S$e,T$=loe,CN=C$e,w$=coe;const ycr={wrapper:{position:"mly1n2onr6",$$css:!0}},vcr=a=>{const[u,d]=a.split("-");return{side:u,align:d||"center"}},bcr=({open:a,setOpen:u,children:d,width:f=350,maxHeight:m,placement:g="right-start",referenceDiv:x,zIndex:b=10,xOffset:v=0,yOffset:_=10,disabled:S=!1,customStyle:R})=>{const w=Pe.useRef(null),{side:N,align:k}=vcr(g),B=()=>N==="top"||N==="bottom"?_:v,P=()=>N==="top"||N==="bottom"?v:_;return D.jsxRuntimeExports.jsx("div",{...Lt.props(ycr.wrapper,R),ref:w,children:D.jsxRuntimeExports.jsxs(AN,{open:a&&!S,onOpenChange:u,children:[D.jsxRuntimeExports.jsx(O$e,{asChild:!0,children:D.jsxRuntimeExports.jsx("div",{ref:x||w})}),a&&!S&&D.jsxRuntimeExports.jsx(CN,{children:D.jsxRuntimeExports.jsx(w$,{className:"mly15q0wj1 mly12oqio5 mly1a3rnpv mly12azwz9 mly64z8l9",side:N,align:k,sideOffset:B(),alignOffset:P(),style:{width:typeof f=="string"?f:`${f}px`,zIndex:b,...m?{maxHeight:`${m}px`}:{}},avoidCollisions:!0,children:d})})]})})},kF={wrapper:{position:"mly1n2onr6",$$css:!0},checkIcon:{verticalAlign:"mly1n8ftqi",width:"mlyw4jnvo",minWidth:"mlyt4ypqs",opacity:"mly1vqud6w",visibility:"mlylshs6z",color:"mly1pc1dlx",$$css:!0},checkIconSelected:{visibility:"mlynpuxes",$$css:!0},selectListDiv:{fontSize:"mlymhiqyu",fontFamily:"mly12xrqmb",textTransform:"mly6mezaz",fontWeight:"mly1fcty0u",width:"mlyh8yej3",padding:"mly1b4vry6",maxHeight:"mly1phlbz0",display:"mly78zum5",flexDirection:"mlydt5ytf",$$css:!0}},Hx=({autoFocus:a,value:u,onChange:d,options:f,placeholder:m="Select",disabled:g=!1,valueEqual:x=(_,S)=>_===S,width:b=200,customStyle:v})=>{var _;const[S,R]=Pe.useState(!1),[w,N]=Pe.useState(!1),[k,B]=Pe.useState(!1),P=u!==void 0&&((_=f.find(q=>x(q.value,u)))==null?void 0:_.label)||m,$=q=>{d?.(q),R(!1)};return D.jsxRuntimeExports.jsxs("div",{...Lt.props(kF.wrapper,v),children:[D.jsxRuntimeExports.jsxs("button",{type:"button",autoFocus:a,...{0:{className:"mlyjbqb8w mlymhiqyu mly1vspu6z mly12oqio5 mly1gqu590 mly1ypdohk mly1pc1dlx mly78zum5 mly1qughib mly6mezaz mly6s0dn4 mly12xrqmb mlyh8yej3"},4:{className:"mlyjbqb8w mlymhiqyu mly12oqio5 mly1gqu590 mly1ypdohk mly1pc1dlx mly78zum5 mly1qughib mly6mezaz mly6s0dn4 mly12xrqmb mlyh8yej3 mlyss3vti"},2:{className:"mlyjbqb8w mlymhiqyu mly12oqio5 mly1gqu590 mly1ypdohk mly1pc1dlx mly78zum5 mly1qughib mly6mezaz mly6s0dn4 mly12xrqmb mlyh8yej3 mly1gnnqk1 mlyv3vvaf mly1a2a7pz"},6:{className:"mlyjbqb8w mlymhiqyu mly12oqio5 mly1gqu590 mly1ypdohk mly1pc1dlx mly78zum5 mly1qughib mly6mezaz mly6s0dn4 mly12xrqmb mlyh8yej3 mly1gnnqk1 mlyv3vvaf mly1a2a7pz"},1:{className:"mlymhiqyu mly1vspu6z mly12oqio5 mly1gqu590 mly1pc1dlx mly78zum5 mly1qughib mly6mezaz mly6s0dn4 mly12xrqmb mlyh8yej3 mlyt0e3qv mly1jjku57"},5:{className:"mlymhiqyu mly12oqio5 mly1gqu590 mly1pc1dlx mly78zum5 mly1qughib mly6mezaz mly6s0dn4 mly12xrqmb mlyh8yej3 mlyss3vti mlyt0e3qv mly1jjku57"},3:{className:"mlymhiqyu mly12oqio5 mly1gqu590 mly1pc1dlx mly78zum5 mly1qughib mly6mezaz mly6s0dn4 mly12xrqmb mlyh8yej3 mly1gnnqk1 mlyv3vvaf mly1a2a7pz mlyt0e3qv mly1jjku57"},7:{className:"mlymhiqyu mly12oqio5 mly1gqu590 mly1pc1dlx mly78zum5 mly1qughib mly6mezaz mly6s0dn4 mly12xrqmb mlyh8yej3 mly1gnnqk1 mlyv3vvaf mly1a2a7pz mlyt0e3qv mly1jjku57"}}[!!w<<2|!!k<<1|!!g<<0],onMouseEnter:()=>N(!0),onMouseLeave:()=>N(!1),onFocus:()=>B(!0),onBlur:()=>B(!1),onClick:q=>{q.preventDefault(),q.stopPropagation(),g||R(!0)},disabled:g,children:[P,D.jsxRuntimeExports.jsx(An,{name:"chevronDown"})]}),D.jsxRuntimeExports.jsx(bcr,{open:S,setOpen:R,placement:"bottom-start",width:b,maxHeight:500,children:D.jsxRuntimeExports.jsx(Ecr,{options:f,value:u,valueEqual:x,onChange:$})})]})};function Ecr({options:a,value:u,onChange:d,valueEqual:f=(g,x)=>g===x,customStyle:m}){const[g,x]=Pe.useState(null);return D.jsxRuntimeExports.jsx(fN,{children:D.jsxRuntimeExports.jsx("div",{...Lt.props(kF.selectListDiv,m),children:a.reduce((b,v,_)=>{const S=u!==void 0&&f(u,v.value);return v.divider&&b.push(Pe.createElement("div",{className:"mly77krkw mlyh8yej3 mlynfbntj",key:"divider"+_})),b.push(D.jsxRuntimeExports.jsxs("label",{...{0:{className:"mlydqdrvq mly1ypdohk mlyuxw1ft mlylyipyv mly1pc1dlx mlyrvj5dj mly1mt1orb mlylqzeqv mly6s0dn4"},1:{className:"mlydqdrvq mly1ypdohk mlyuxw1ft mlylyipyv mly1pc1dlx mlyrvj5dj mly1mt1orb mlylqzeqv mly6s0dn4 mly6wxqrg"}}[(g===_)<<0],onMouseEnter:()=>x(_),onMouseLeave:()=>x(null),onClick:()=>d(v.value),children:[D.jsxRuntimeExports.jsx("input",{className:"mlynalus7 mlyqtp20y",type:"radio",defaultChecked:S}),D.jsxRuntimeExports.jsx(An,{name:"checkmark",customStyle:{...kF.checkIcon,...S?kF.checkIconSelected:void 0}}),D.jsxRuntimeExports.jsx("span",{className:"mlyet2fuk mlyb3r6kr mlylyipyv mly1fc57z9",children:v.label})]},_)),b},[])})})}const fS={second:"YYYY-MM-DD HH:mm:ss",minute:"YYYY-MM-DD HH:mm",hour:"YYYY-MM-DD HH:00",day:"YYYY-MM-DD",week:"YYYY-MM-DD-[WK]",month:"YYYY-MM",quarter:"YYYY-[Q]Q",year:"YYYY"},fie={second:/\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d/,minute:/\d\d\d\d-\d\d-\d\d \d\d:\d\d/,hour:/\d\d\d\d-\d\d-\d\d \d\d:00/,day:/\d\d\d\d-\d\d-\d\d/,week:/\d\d\d\d-\d\d-\d\d-WK/,month:/\d\d\d\d-\d\d/,quarter:/\d\d\d\d-Q\d/,year:/\d\d\d\d/},gM=({value:a,setValue:u,placeholder:d,autoFocus:f,units:m,onFocus:g,onBlur:x,isActive:b,customStyle:v,forwardRef:_})=>{const S=fS[m],[R,w]=Pe.useState(Vt.utc(a).format(S));return Pe.useEffect(()=>{w(Vt.utc(a).format(S))},[a,S]),D.jsxRuntimeExports.jsx("input",{...Lt.props(v,b?_cr.active:null),type:"text",placeholder:d||S,value:R,onFocus:g,onBlur:x,onChange:N=>{const k=N.target.value;w(k);const B=fie[m];if(k.match(B)){const P=Vt.utc(k,S);P.isValid()&&u(P.toDate())}},autoFocus:f,ref:_})};function nF(a,u){if(a.moment==="literal"){const{literal:d}=a;for(const f in fie){const m=f;if(d.match(fie[m]))return m}}return u?"second":"day"}const _cr={active:{backgroundColor:"mly1vzefiq",$$css:!0}};function Scr(a){return["January","February","March","April","May","June","July","August","September","October","November","December"][a]}const C9e=Object.keys(fS);function doe({value:a,setValue:u,units:d,maxLevel:f,customStyle:m,forwardRef:g}){const[x,b]=Pe.useState(a),v=Ccr(x),[_,S]=Pe.useState(d),R=Math.floor(Vt.utc(x).year()/10)*10;Pe.useEffect(()=>{const W=C9e.findIndex(J=>J===d);C9e.findIndex(J=>J===_)<W&&S(d)},[d,_]),Pe.useEffect(()=>{b(a)},[a]);const w=W=>{const X=Vt.utc(x).year(W).toDate();b(X),u(X)},N=W=>{const X=()=>w(R+W);return W===-1||W===10?D.jsxRuntimeExports.jsx("div",{onClick:X,className:"mly1247r65 mlyfvyar9 mlymcgfsh mly36usyh mly78zum5 mly6s0dn4 mlyl56j7k mly8fuzfi mly1fcty0u mly1ypdohk mly6mezaz mly1sxf85j mlyt89l8w mly1fxp9ov mly358b0h",children:R+W}):D.jsxRuntimeExports.jsx("div",{onClick:X,...{0:{className:"mly1247r65 mlyfvyar9 mlymcgfsh mly36usyh mly78zum5 mly6s0dn4 mlyl56j7k mly8fuzfi mly1v5ugh9 mly1fcty0u mly1ypdohk mly6mezaz mly1sxf85j mlyt89l8w mly1fxp9ov"},1:{className:"mly1247r65 mlyfvyar9 mlymcgfsh mly36usyh mly78zum5 mly6s0dn4 mlyl56j7k mly8fuzfi mly1v5ugh9 mly1fcty0u mly1ypdohk mly6mezaz mly1sxf85j mlyt89l8w mly1fxp9ov mly6wxqrg mly10bk7bj"}}[(Vt.utc(x).year()===R+W)<<0],children:R+W})},k=W=>{const X=Vt.utc(x).month(W).toDate();b(X),u(X)},B=W=>{b(W),u(W)},P=W=>{b(W),u(W)},$=W=>{const X=Vt.utc(x).quarter(W+1).toDate();b(X),u(X)},q=W=>{const X=()=>k(W),J=Vt.utc(x).month()===W&&Vt.utc(x).year()===Vt.utc(a).year();return D.jsxRuntimeExports.jsx("div",{onClick:X,...{0:{className:"mly1247r65 mlyfvyar9 mlymcgfsh mly36usyh mly78zum5 mly6s0dn4 mlyl56j7k mly8fuzfi mly1v5ugh9 mly1ypdohk mly6mezaz mly1sxf85j mly1fcty0u mlyt89l8w mly1fxp9ov"},1:{className:"mly1247r65 mlyfvyar9 mlymcgfsh mly36usyh mly78zum5 mly6s0dn4 mlyl56j7k mly8fuzfi mly1v5ugh9 mly1ypdohk mly6mezaz mly1sxf85j mly1fcty0u mlyt89l8w mly1fxp9ov mly6wxqrg mly10bk7bj"}}[!!J<<0],children:Scr(W)})},z=W=>{const X=()=>$(W),J=Vt.utc(x).quarter()-1===W&&Vt.utc(x).year()===Vt.utc(a).year();return D.jsxRuntimeExports.jsxs("div",{onClick:X,...{0:{className:"mly1rxuhir mly36usyh mly78zum5 mly6s0dn4 mlyl56j7k mly8fuzfi mly1v5ugh9 mly1ypdohk mly6mezaz mly1sxf85j mly1fcty0u mlyt89l8w mly1fxp9ov"},1:{className:"mly1rxuhir mly36usyh mly78zum5 mly6s0dn4 mlyl56j7k mly8fuzfi mly1v5ugh9 mly1ypdohk mly6mezaz mly1sxf85j mly1fcty0u mlyt89l8w mly1fxp9ov mly6wxqrg mly10bk7bj"}}[!!J<<0],children:["Q",W+1]})};return D.jsxRuntimeExports.jsxs("div",{...Lt.props(Acr.outer,m),ref:g,children:[D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1q0g3np mly1qughib mly1nejdyq mlyu06os2",children:[D.jsxRuntimeExports.jsx("div",{className:"mly1sxf85j mly1nn3v0j mly6wrskw mlymzs88n mly1ypdohk mlyjg9ulk",children:D.jsxRuntimeExports.jsx($i,{variant:"default",size:"compact",icon:"chevronLeft",onClick:()=>{_==="day"||_==="week"?b(Vt.utc(x).subtract(1,"month").toDate()):_==="month"||_==="quarter"?b(Vt.utc(x).subtract(1,"year").toDate()):_==="year"?b(Vt.utc(x).subtract(10,"years").toDate()):B(Vt.utc(x).subtract(1,"days").toDate())}})}),D.jsxRuntimeExports.jsxs("div",{className:"mly1sxf85j mlyfawy5m mly123j3cw mly1iyjqo2 mly2b8uid mly1ypdohk mly6mezaz mly1fcty0u mlyjg9ulk",onClick:()=>{S(_==="day"||_==="week"?"month":_==="month"||_==="quarter"?"year":_==="hour"||_==="minute"||_==="second"?"day":f)},children:[(_==="day"||_==="week")&&Vt.utc(x).format("MMMM YYYY"),(_==="month"||_==="quarter")&&Vt.utc(x).format("YYYY"),_==="year"&&D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[R,"-",R+9]}),(_==="hour"||_==="minute"||_==="second")&&D.jsxRuntimeExports.jsx(D.jsxRuntimeExports.Fragment,{children:Vt.utc(x).format("MMMM D, YYYY")})]}),D.jsxRuntimeExports.jsx("div",{className:"mly1sxf85j mly1nn3v0j mly6wrskw mlymzs88n mly1ypdohk mlyjg9ulk",children:D.jsxRuntimeExports.jsx($i,{variant:"default",size:"compact",icon:"chevronRight",onClick:()=>{_==="day"||_==="week"?b(Vt.utc(x).add(1,"month").toDate()):_==="month"||_==="quarter"?b(Vt.utc(x).add(1,"year").toDate()):_==="year"?b(Vt.utc(x).add(10,"years").toDate()):B(Vt.utc(x).add(1,"days").toDate())}})})]}),_==="day"&&D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mly195vfkc mly87ps6o",children:[D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1q0g3np mly195vfkc mly1qughib",children:[D.jsxRuntimeExports.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"S"}),D.jsxRuntimeExports.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"M"}),D.jsxRuntimeExports.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"T"}),D.jsxRuntimeExports.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"W"}),D.jsxRuntimeExports.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"T"}),D.jsxRuntimeExports.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"F"}),D.jsxRuntimeExports.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"S"})]}),v.map((W,X)=>D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mly1q0g3np mly195vfkc mly1qughib",children:W.map(J=>D.jsxRuntimeExports.jsx("div",{onClick:()=>{B(J.date)},...{0:{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly1ypdohk mly1f96onm mlyfifm61 mlyfj9a5l mlyt89l8w mly358b0h"},2:{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly1ypdohk mly1f96onm mlyfifm61 mlyfj9a5l mlyt89l8w mly1v5ugh9"},1:{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly1ypdohk mly1f96onm mlyfifm61 mlyfj9a5l mlyt89l8w mly6wxqrg mly1nwq7qm mly10bk7bj"},3:{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly1ypdohk mly1f96onm mlyfifm61 mlyfj9a5l mlyt89l8w mly6wxqrg mly1nwq7qm mly10bk7bj"}}[!!J.isCurrentMonth<<1|(a.getTime()===J.date.valueOf())<<0],children:J.number},J.number))},X))]}),_==="month"&&D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mly87ps6o mly1l1ennw mlyk2yuxw",children:[D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1q0g3np mly195vfkc mly1qughib",children:[q(0),q(1),q(2)]}),D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1q0g3np mly195vfkc mly1qughib",children:[q(3),q(4),q(5)]}),D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1q0g3np mly195vfkc mly1qughib",children:[q(6),q(7),q(8)]}),D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1q0g3np mly195vfkc mly1qughib",children:[q(9),q(10),q(11)]})]}),_==="year"&&D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mly87ps6o mly1l1ennw mlyk2yuxw",children:[D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1q0g3np mly1qughib mly195vfkc",children:[N(-1),N(0),N(1)]}),D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1q0g3np mly1qughib mly195vfkc",children:[N(2),N(3),N(4)]}),D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1q0g3np mly1qughib mly195vfkc",children:[N(5),N(6),N(7)]}),D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1q0g3np mly1qughib mly195vfkc",children:[N(8),N(9),N(10)]})]}),_==="quarter"&&D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mly87ps6o mly1l1ennw mlyk2yuxw",children:[z(0),z(1),z(2),z(3)]}),_==="week"&&D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mly195vfkc mly87ps6o",children:[D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1q0g3np mly195vfkc mly1qughib",children:[D.jsxRuntimeExports.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"S"}),D.jsxRuntimeExports.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"M"}),D.jsxRuntimeExports.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"T"}),D.jsxRuntimeExports.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"W"}),D.jsxRuntimeExports.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"T"}),D.jsxRuntimeExports.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"F"}),D.jsxRuntimeExports.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"S"})]}),v.map((W,X)=>D.jsxRuntimeExports.jsx("div",{onClick:()=>{P(W[0].date)},...{0:{className:"mly78zum5 mly1ypdohk mly1q0g3np mly195vfkc mly1f96onm mly1qughib mlyfj9a5l mlyt89l8w"},1:{className:"mly78zum5 mly1ypdohk mly1q0g3np mly195vfkc mly1f96onm mly1qughib mlyfj9a5l mlyt89l8w mly6wxqrg mly1nwq7qm mly10bk7bj"}}[(a.getTime()===W[0].date.valueOf())<<0],children:W.map(J=>D.jsxRuntimeExports.jsx("div",{...{0:{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly1ypdohk mly1f96onm mlyfifm61 mly358b0h"},1:{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly1ypdohk mly1f96onm mlyfifm61 mly1v5ugh9"}}[!!J.isCurrentMonth<<0],children:J.number},J.number))},X))]}),(_==="hour"||_==="minute"||_==="second")&&D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mlydt5ytf mly87ps6o mly1l1ennw mlylo07zb",children:D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1q0g3np mly87ps6o mly1l1ennw mly883omv",children:[D.jsxRuntimeExports.jsx(Vre,{label:"Hours",value:parseInt(Vt.utc(x).format("hh")),setValue:W=>{const X=Vt.utc(x).hour()>=12?"PM":"AM",J=parseInt(Vt.utc(`${W} ${X}`,["hh A"]).format("H"));u(Vt.utc(x).hour(J).toDate())},width:"40px"}),(d==="minute"||d==="second")&&D.jsxRuntimeExports.jsx(Vre,{label:"Minutes",value:Vt.utc(x).minutes(),setValue:W=>{u(Vt.utc(x).minute(W).toDate())},width:"40px"}),d==="second"&&D.jsxRuntimeExports.jsx(Vre,{label:"Seconds",value:Vt.utc(x).seconds(),setValue:W=>{u(Vt.utc(x).second(W).toDate())},width:"40px"}),D.jsxRuntimeExports.jsx("div",{style:{display:"flex",justifyContent:"flex-end",flexDirection:"column"},children:D.jsxRuntimeExports.jsx(Hx,{value:Vt.utc(x).hour()>=12?"PM":"AM",onChange:W=>{const X=parseInt(Vt.utc(x).format("h")),J=parseInt(Vt.utc(`${X} ${W}`,["hh A"]).format("H"));u(Vt.utc(x).hour(J).toDate())},options:[{value:"AM",label:"AM"},{value:"PM",label:"PM"}]})})]})})]})}const Acr={outer:{userSelect:"mly87ps6o",fontSize:"mlymhiqyu",fontFamily:"mly12xrqmb",$$css:!0}};function Ccr(a){const u=Vt.utc(a).date(1),d=u.day(),f=u.daysInMonth(),m=u.clone().subtract(1,"day").daysInMonth(),g=[];for(let x=0;x<6;x++){const b=[];for(let v=0;v<7;v++)if(x===0&&v<d){const _=d-v;b.push({number:m-_+1,date:u.clone().subtract(_,"days").toDate(),isCurrentMonth:!1})}else{const _=x*7+v-d;_<f?b.push({number:_+1,date:u.clone().add(_,"days").toDate(),isCurrentMonth:!0}):b.push({number:_-f+1,date:u.clone().add(_,"days").toDate(),isCurrentMonth:!1})}g.push(b)}return g}function Rcr({width:a,minWidth:u,onWidthChange:d}){const f=m=>{const g=a,x=m.clientX,b=()=>{document.body.removeEventListener("mousemove",v),document.body.removeEventListener("mouseup",b),document.body.style.cursor="initial",document.body.style.userSelect="initial"},v=_=>{const S=g+(_.clientX-x);d(Math.max(S,u))};document.body.addEventListener("mousemove",v),document.body.addEventListener("mouseup",b),document.body.style.cursor="ew-resize",document.body.style.userSelect="none"};return D.jsxRuntimeExports.jsx("div",{className:"mly7eptgl mly1ftt334 mly5yr21d mly1vjfegm mly10l6tqk mly13vifvy mly1bkpikb",onMouseDown:m=>f(m)})}function hie({title:a,description:u,variant:d="info",children:f}){return D.jsxRuntimeExports.jsxs("div",{className:"mly1q4ynmn mlyh8yej3 mly5yr21d mly78zum5 mlydt5ytf mly1kmqopl mly16zck5j",children:[D.jsxRuntimeExports.jsxs("div",{...Lt.props(UO.header,wcr[d],f?UO.headerWithContent:null),children:[D.jsxRuntimeExports.jsx("div",{className:"mly1qx5ct2 mly78zum5 mlyl56j7k mly6s0dn4",children:D.jsxRuntimeExports.jsx(An,{...Tcr[d]})}),D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mlyb3r6kr",children:[D.jsxRuntimeExports.jsx("div",{...Lt.props(UO.title,Fr.emphasized),children:a}),D.jsxRuntimeExports.jsx("div",{...Lt.props(UO.description,Fr.supporting),children:u})]})]}),f&&D.jsxRuntimeExports.jsx("div",{...Lt.props(UO.content,Fr.body),children:D.jsxRuntimeExports.jsx(fN,{children:f})})]})}const UO={header:{borderRadius:"mly1q4ynmn",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,width:"mlyh8yej3",padding:"mlyc7ga6q",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,boxSizing:"mly9f619",display:"mly78zum5",flexDirection:"mly1q0g3np",alignItems:"mly7a106z",justifyContent:"mlylqzeqv",gap:"mly167g77z",rowGap:null,columnGap:null,$$css:!0},headerWithContent:{borderRadius:"mlyq516e8",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,$$css:!0},title:{textOverflow:"mlylyipyv",whiteSpace:"mlyuxw1ft",overflow:"mlyb3r6kr",overflowX:null,overflowY:null,$$css:!0},description:{textOverflow:"mlylyipyv",whiteSpace:"mlyuxw1ft",overflow:"mlyb3r6kr",overflowX:null,overflowY:null,$$css:!0},content:{padding:"mly1tamke2",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,backgroundColor:"mly12peec7",borderRadius:"mly11zuszs",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,overflow:"mlyb3r6kr",overflowX:null,overflowY:null,$$css:!0}},Tcr={info:{name:"info",color:"info"},success:{name:"check_circle",color:"positive"},warn:{name:"warning",color:"warning"},critical:{name:"error",color:"negative"}},wcr={info:{backgroundColor:"mly1pnbjq1",$$css:!0},success:{backgroundColor:"mly1x3oq6j",$$css:!0},warn:{backgroundColor:"mly1x7w6om",$$css:!0},critical:{backgroundColor:"mlyrkwa2d",$$css:!0}},N$e=Y.createContext({});function Ocr({defaultExpandedItemId:a,children:u,customStyle:d}){const[f,m]=Y.useState(a),g=x=>{m(b=>{if(b!==x)return x})};return D.jsxRuntimeExports.jsx(N$e.Provider,{value:{expandedItemId:f,onExpandedItemChange:g},children:D.jsxRuntimeExports.jsx("div",{...Lt.props(Ncr.main,d),children:Y.Children.map(u,x=>D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[x,D.jsxRuntimeExports.jsx(Y_,{})]}))})})}const Ncr={main:{display:"mly78zum5",flexDirection:"mlydt5ytf",overflow:"mlyb3r6kr",overflowX:null,overflowY:null,flexGrow:"mly1iyjqo2",$$css:!0}};function Jre({id:a,label:u,sublabel:d,startIcon:f,badge:m,endIcon:g,children:x}){const{expandedItemId:b,onExpandedItemChange:v}=Y.useContext(N$e);return D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly6s0dn4 mlylqzeqv mlye8ttls mly167g77z mly1ypdohk",onClick:()=>v?.(a),children:[f&&D.jsxRuntimeExports.jsx(D.jsxRuntimeExports.Fragment,{children:f}),D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mlyb3r6kr mly1iyjqo2",children:[D.jsxRuntimeExports.jsx("span",{...Lt.props(Fr.body,R9e.label),children:u}),d&&D.jsxRuntimeExports.jsx("span",{...Lt.props(Fr.supporting,R9e.sublabel),children:d})]}),m&&m,g&&g]}),a===b&&D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mlydt5ytf mly1iyjqo2 mlytdwleo mly1jnr06f mly10cdfl8 mlyysyzu8",children:Y.Children.map(x,_=>_)})]})}const R9e={label:{flexGrow:"mly1iyjqo2",fontWeight:"mly1xlr1w8",overflow:"mlyb3r6kr",overflowX:null,overflowY:null,textOverflow:"mlylyipyv",$$css:!0},sublabel:{flexGrow:"mly1iyjqo2",color:"mly9dwj6z",overflow:"mlyb3r6kr",overflowX:null,overflowY:null,textOverflow:"mlylyipyv",$$css:!0}};var Zre="rovingFocusGroup.onEntryFocus",Dcr={bubbles:!1,cancelable:!0},O$="RovingFocusGroup",[pie,D$e,kcr]=bse(O$),[Lcr,N$]=Md(O$,[kcr]),[Icr,Pcr]=Lcr(O$),k$e=Y.forwardRef((a,u)=>D.jsxRuntimeExports.jsx(pie.Provider,{scope:a.__scopeRovingFocusGroup,children:D.jsxRuntimeExports.jsx(pie.Slot,{scope:a.__scopeRovingFocusGroup,children:D.jsxRuntimeExports.jsx(jcr,{...a,ref:u})})}));k$e.displayName=O$;var jcr=Y.forwardRef((a,u)=>{const{__scopeRovingFocusGroup:d,orientation:f,loop:m=!1,dir:g,currentTabStopId:x,defaultCurrentTabStopId:b,onCurrentTabStopIdChange:v,onEntryFocus:_,preventScrollOnEntryFocus:S=!1,...R}=a,w=Y.useRef(null),N=Cn(u,w),k=dN(g),[B=null,P]=Dx({prop:x,defaultProp:b,onChange:v}),[$,q]=Y.useState(!1),z=Us(_),W=D$e(d),X=Y.useRef(!1),[J,ee]=Y.useState(0);return Y.useEffect(()=>{const fe=w.current;if(fe)return fe.addEventListener(Zre,z),()=>fe.removeEventListener(Zre,z)},[z]),D.jsxRuntimeExports.jsx(Icr,{scope:d,orientation:f,dir:k,loop:m,currentTabStopId:B,onItemFocus:Y.useCallback(fe=>P(fe),[P]),onItemShiftTab:Y.useCallback(()=>q(!0),[]),onFocusableItemAdd:Y.useCallback(()=>ee(fe=>fe+1),[]),onFocusableItemRemove:Y.useCallback(()=>ee(fe=>fe-1),[]),children:D.jsxRuntimeExports.jsx(rn.div,{tabIndex:$||J===0?-1:0,"data-orientation":f,...R,ref:N,style:{outline:"none",...a.style},onMouseDown:xr(a.onMouseDown,()=>{X.current=!0}),onFocus:xr(a.onFocus,fe=>{const be=!X.current;if(fe.target===fe.currentTarget&&be&&!$){const je=new CustomEvent(Zre,Dcr);if(fe.currentTarget.dispatchEvent(je),!je.defaultPrevented){const _e=W().filter(Ne=>Ne.focusable),De=_e.find(Ne=>Ne.active),Xe=_e.find(Ne=>Ne.id===B),te=[De,Xe,..._e].filter(Boolean).map(Ne=>Ne.ref.current);P$e(te,S)}}X.current=!1}),onBlur:xr(a.onBlur,()=>q(!1))})})}),L$e="RovingFocusGroupItem",I$e=Y.forwardRef((a,u)=>{const{__scopeRovingFocusGroup:d,focusable:f=!0,active:m=!1,tabStopId:g,...x}=a,b=ic(),v=g||b,_=Pcr(L$e,d),S=_.currentTabStopId===v,R=D$e(d),{onFocusableItemAdd:w,onFocusableItemRemove:N}=_;return Y.useEffect(()=>{if(f)return w(),()=>N()},[f,w,N]),D.jsxRuntimeExports.jsx(pie.ItemSlot,{scope:d,id:v,focusable:f,active:m,children:D.jsxRuntimeExports.jsx(rn.span,{tabIndex:S?0:-1,"data-orientation":_.orientation,...x,ref:u,onMouseDown:xr(a.onMouseDown,k=>{f?_.onItemFocus(v):k.preventDefault()}),onFocus:xr(a.onFocus,()=>_.onItemFocus(v)),onKeyDown:xr(a.onKeyDown,k=>{if(k.key==="Tab"&&k.shiftKey){_.onItemShiftTab();return}if(k.target!==k.currentTarget)return;const B=$cr(k,_.orientation,_.dir);if(B!==void 0){if(k.metaKey||k.ctrlKey||k.altKey||k.shiftKey)return;k.preventDefault();let $=R().filter(q=>q.focusable).map(q=>q.ref.current);if(B==="last")$.reverse();else if(B==="prev"||B==="next"){B==="prev"&&$.reverse();const q=$.indexOf(k.currentTarget);$=_.loop?Bcr($,q+1):$.slice(q+1)}setTimeout(()=>P$e($))}})})})});I$e.displayName=L$e;var Fcr={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Mcr(a,u){return u!=="rtl"?a:a==="ArrowLeft"?"ArrowRight":a==="ArrowRight"?"ArrowLeft":a}function $cr(a,u,d){const f=Mcr(a.key,d);if(!(u==="vertical"&&["ArrowLeft","ArrowRight"].includes(f))&&!(u==="horizontal"&&["ArrowUp","ArrowDown"].includes(f)))return Fcr[f]}function P$e(a,u=!1){const d=document.activeElement;for(const f of a)if(f===d||(f.focus({preventScroll:u}),document.activeElement!==d))return}function Bcr(a,u){return a.map((d,f)=>a[(u+f)%a.length])}var j$e=k$e,F$e=I$e,mie=["Enter"," "],qcr=["ArrowDown","PageUp","Home"],M$e=["ArrowUp","PageDown","End"],Ucr=[...qcr,...M$e],zcr={ltr:[...mie,"ArrowRight"],rtl:[...mie,"ArrowLeft"]},Hcr={ltr:["ArrowLeft"],rtl:["ArrowRight"]},RN="Menu",[j5,Gcr,Wcr]=bse(RN),[Jv,$$e]=Md(RN,[Wcr,Bx,N$]),D$=Bx(),B$e=N$(),[Vcr,Zv]=Jv(RN),[Qcr,TN]=Jv(RN),q$e=a=>{const{__scopeMenu:u,open:d=!1,children:f,dir:m,onOpenChange:g,modal:x=!0}=a,b=D$(u),[v,_]=Y.useState(null),S=Y.useRef(!1),R=Us(g),w=dN(m);return Y.useEffect(()=>{const N=()=>{S.current=!0,document.addEventListener("pointerdown",k,{capture:!0,once:!0}),document.addEventListener("pointermove",k,{capture:!0,once:!0})},k=()=>S.current=!1;return document.addEventListener("keydown",N,{capture:!0}),()=>{document.removeEventListener("keydown",N,{capture:!0}),document.removeEventListener("pointerdown",k,{capture:!0}),document.removeEventListener("pointermove",k,{capture:!0})}},[]),D.jsxRuntimeExports.jsx(YM,{...b,children:D.jsxRuntimeExports.jsx(Vcr,{scope:u,open:d,onOpenChange:R,content:v,onContentChange:_,children:D.jsxRuntimeExports.jsx(Qcr,{scope:u,onClose:Y.useCallback(()=>R(!1),[R]),isUsingKeyboardRef:S,dir:w,modal:x,children:f})})})};q$e.displayName=RN;var Ycr="MenuAnchor",foe=Y.forwardRef((a,u)=>{const{__scopeMenu:d,...f}=a,m=D$(d);return D.jsxRuntimeExports.jsx(iN,{...m,...f,ref:u})});foe.displayName=Ycr;var hoe="MenuPortal",[Kcr,U$e]=Jv(hoe,{forceMount:void 0}),z$e=a=>{const{__scopeMenu:u,forceMount:d,children:f,container:m}=a,g=Zv(hoe,u);return D.jsxRuntimeExports.jsx(Kcr,{scope:u,forceMount:d,children:D.jsxRuntimeExports.jsx(Do,{present:d||g.open,children:D.jsxRuntimeExports.jsx(kS,{asChild:!0,container:m,children:f})})})};z$e.displayName=hoe;var sc="MenuContent",[Xcr,poe]=Jv(sc),H$e=Y.forwardRef((a,u)=>{const d=U$e(sc,a.__scopeMenu),{forceMount:f=d.forceMount,...m}=a,g=Zv(sc,a.__scopeMenu),x=TN(sc,a.__scopeMenu);return D.jsxRuntimeExports.jsx(j5.Provider,{scope:a.__scopeMenu,children:D.jsxRuntimeExports.jsx(Do,{present:f||g.open,children:D.jsxRuntimeExports.jsx(j5.Slot,{scope:a.__scopeMenu,children:x.modal?D.jsxRuntimeExports.jsx(Jcr,{...m,ref:u}):D.jsxRuntimeExports.jsx(Zcr,{...m,ref:u})})})})}),Jcr=Y.forwardRef((a,u)=>{const d=Zv(sc,a.__scopeMenu),f=Y.useRef(null),m=Cn(u,f);return Y.useEffect(()=>{const g=f.current;if(g)return s$(g)},[]),D.jsxRuntimeExports.jsx(moe,{...a,ref:m,trapFocus:d.open,disableOutsidePointerEvents:d.open,disableOutsideScroll:!0,onFocusOutside:xr(a.onFocusOutside,g=>g.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>d.onOpenChange(!1)})}),Zcr=Y.forwardRef((a,u)=>{const d=Zv(sc,a.__scopeMenu);return D.jsxRuntimeExports.jsx(moe,{...a,ref:u,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>d.onOpenChange(!1)})}),moe=Y.forwardRef((a,u)=>{const{__scopeMenu:d,loop:f=!1,trapFocus:m,onOpenAutoFocus:g,onCloseAutoFocus:x,disableOutsidePointerEvents:b,onEntryFocus:v,onEscapeKeyDown:_,onPointerDownOutside:S,onFocusOutside:R,onInteractOutside:w,onDismiss:N,disableOutsideScroll:k,...B}=a,P=Zv(sc,d),$=TN(sc,d),q=D$(d),z=B$e(d),W=Gcr(d),[X,J]=Y.useState(null),ee=Y.useRef(null),fe=Cn(u,ee,P.onContentChange),be=Y.useRef(0),je=Y.useRef(""),_e=Y.useRef(0),De=Y.useRef(null),Xe=Y.useRef("right"),ze=Y.useRef(0),te=k?mN:Y.Fragment,Ne=k?{as:Tx,allowPinchZoom:!0}:void 0,Ge=Je=>{var rt,vt;const qe=je.current+Je,ge=W().filter(Se=>!Se.disabled),pe=document.activeElement,ye=(rt=ge.find(Se=>Se.ref.current===pe))==null?void 0:rt.textValue,we=ge.map(Se=>Se.textValue),Ie=ddr(we,qe,ye),le=(vt=ge.find(Se=>Se.textValue===Ie))==null?void 0:vt.ref.current;(function Se(Le){je.current=Le,window.clearTimeout(be.current),Le!==""&&(be.current=window.setTimeout(()=>Se(""),1e3))})(qe),le&&setTimeout(()=>le.focus())};Y.useEffect(()=>()=>window.clearTimeout(be.current),[]),i$();const mt=Y.useCallback(Je=>{var rt,vt;return Xe.current===((rt=De.current)==null?void 0:rt.side)&&hdr(Je,(vt=De.current)==null?void 0:vt.area)},[]);return D.jsxRuntimeExports.jsx(Xcr,{scope:d,searchRef:je,onItemEnter:Y.useCallback(Je=>{mt(Je)&&Je.preventDefault()},[mt]),onItemLeave:Y.useCallback(Je=>{var rt;mt(Je)||((rt=ee.current)==null||rt.focus(),J(null))},[mt]),onTriggerLeave:Y.useCallback(Je=>{mt(Je)&&Je.preventDefault()},[mt]),pointerGraceTimerRef:_e,onPointerGraceIntentChange:Y.useCallback(Je=>{De.current=Je},[]),children:D.jsxRuntimeExports.jsx(te,{...Ne,children:D.jsxRuntimeExports.jsx(pN,{asChild:!0,trapped:m,onMountAutoFocus:xr(g,Je=>{var rt;Je.preventDefault(),(rt=ee.current)==null||rt.focus({preventScroll:!0})}),onUnmountAutoFocus:x,children:D.jsxRuntimeExports.jsx(OS,{asChild:!0,disableOutsidePointerEvents:b,onEscapeKeyDown:_,onPointerDownOutside:S,onFocusOutside:R,onInteractOutside:w,onDismiss:N,children:D.jsxRuntimeExports.jsx(j$e,{asChild:!0,...z,dir:$.dir,orientation:"vertical",loop:f,currentTabStopId:X,onCurrentTabStopIdChange:J,onEntryFocus:xr(v,Je=>{$.isUsingKeyboardRef.current||Je.preventDefault()}),preventScrollOnEntryFocus:!0,children:D.jsxRuntimeExports.jsx(KM,{role:"menu","aria-orientation":"vertical","data-state":oBe(P.open),"data-radix-menu-content":"",dir:$.dir,...q,...B,ref:fe,style:{outline:"none",...B.style},onKeyDown:xr(B.onKeyDown,Je=>{const vt=Je.target.closest("[data-radix-menu-content]")===Je.currentTarget,qe=Je.ctrlKey||Je.altKey||Je.metaKey,ge=Je.key.length===1;vt&&(Je.key==="Tab"&&Je.preventDefault(),!qe&&ge&&Ge(Je.key));const pe=ee.current;if(Je.target!==pe||!Ucr.includes(Je.key))return;Je.preventDefault();const we=W().filter(Ie=>!Ie.disabled).map(Ie=>Ie.ref.current);M$e.includes(Je.key)&&we.reverse(),udr(we)}),onBlur:xr(a.onBlur,Je=>{Je.currentTarget.contains(Je.target)||(window.clearTimeout(be.current),je.current="")}),onPointerMove:xr(a.onPointerMove,F5(Je=>{const rt=Je.target,vt=ze.current!==Je.clientX;if(Je.currentTarget.contains(rt)&&vt){const qe=Je.clientX>ze.current?"right":"left";Xe.current=qe,ze.current=Je.clientX}}))})})})})})})});H$e.displayName=sc;var edr="MenuGroup",goe=Y.forwardRef((a,u)=>{const{__scopeMenu:d,...f}=a;return D.jsxRuntimeExports.jsx(rn.div,{role:"group",...f,ref:u})});goe.displayName=edr;var tdr="MenuLabel",G$e=Y.forwardRef((a,u)=>{const{__scopeMenu:d,...f}=a;return D.jsxRuntimeExports.jsx(rn.div,{...f,ref:u})});G$e.displayName=tdr;var xM="MenuItem",T9e="menu.itemSelect",k$=Y.forwardRef((a,u)=>{const{disabled:d=!1,onSelect:f,...m}=a,g=Y.useRef(null),x=TN(xM,a.__scopeMenu),b=poe(xM,a.__scopeMenu),v=Cn(u,g),_=Y.useRef(!1),S=()=>{const R=g.current;if(!d&&R){const w=new CustomEvent(T9e,{bubbles:!0,cancelable:!0});R.addEventListener(T9e,N=>f?.(N),{once:!0}),KPe(R,w),w.defaultPrevented?_.current=!1:x.onClose()}};return D.jsxRuntimeExports.jsx(W$e,{...m,ref:v,disabled:d,onClick:xr(a.onClick,S),onPointerDown:R=>{var w;(w=a.onPointerDown)==null||w.call(a,R),_.current=!0},onPointerUp:xr(a.onPointerUp,R=>{var w;_.current||(w=R.currentTarget)==null||w.click()}),onKeyDown:xr(a.onKeyDown,R=>{const w=b.searchRef.current!=="";d||w&&R.key===" "||mie.includes(R.key)&&(R.currentTarget.click(),R.preventDefault())})})});k$.displayName=xM;var W$e=Y.forwardRef((a,u)=>{const{__scopeMenu:d,disabled:f=!1,textValue:m,...g}=a,x=poe(xM,d),b=B$e(d),v=Y.useRef(null),_=Cn(u,v),[S,R]=Y.useState(!1),[w,N]=Y.useState("");return Y.useEffect(()=>{const k=v.current;k&&N((k.textContent??"").trim())},[g.children]),D.jsxRuntimeExports.jsx(j5.ItemSlot,{scope:d,disabled:f,textValue:m??w,children:D.jsxRuntimeExports.jsx(F$e,{asChild:!0,...b,focusable:!f,children:D.jsxRuntimeExports.jsx(rn.div,{role:"menuitem","data-highlighted":S?"":void 0,"aria-disabled":f||void 0,"data-disabled":f?"":void 0,...g,ref:_,onPointerMove:xr(a.onPointerMove,F5(k=>{f?x.onItemLeave(k):(x.onItemEnter(k),k.defaultPrevented||k.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:xr(a.onPointerLeave,F5(k=>x.onItemLeave(k))),onFocus:xr(a.onFocus,()=>R(!0)),onBlur:xr(a.onBlur,()=>R(!1))})})})}),rdr="MenuCheckboxItem",V$e=Y.forwardRef((a,u)=>{const{checked:d=!1,onCheckedChange:f,...m}=a;return D.jsxRuntimeExports.jsx(J$e,{scope:a.__scopeMenu,checked:d,children:D.jsxRuntimeExports.jsx(k$,{role:"menuitemcheckbox","aria-checked":yM(d)?"mixed":d,...m,ref:u,"data-state":yoe(d),onSelect:xr(m.onSelect,()=>f?.(yM(d)?!0:!d),{checkForDefaultPrevented:!1})})})});V$e.displayName=rdr;var Q$e="MenuRadioGroup",[ndr,idr]=Jv(Q$e,{value:void 0,onValueChange:()=>{}}),Y$e=Y.forwardRef((a,u)=>{const{value:d,onValueChange:f,...m}=a,g=Us(f);return D.jsxRuntimeExports.jsx(ndr,{scope:a.__scopeMenu,value:d,onValueChange:g,children:D.jsxRuntimeExports.jsx(goe,{...m,ref:u})})});Y$e.displayName=Q$e;var K$e="MenuRadioItem",X$e=Y.forwardRef((a,u)=>{const{value:d,...f}=a,m=idr(K$e,a.__scopeMenu),g=d===m.value;return D.jsxRuntimeExports.jsx(J$e,{scope:a.__scopeMenu,checked:g,children:D.jsxRuntimeExports.jsx(k$,{role:"menuitemradio","aria-checked":g,...f,ref:u,"data-state":yoe(g),onSelect:xr(f.onSelect,()=>{var x;return(x=m.onValueChange)==null?void 0:x.call(m,d)},{checkForDefaultPrevented:!1})})})});X$e.displayName=K$e;var xoe="MenuItemIndicator",[J$e,sdr]=Jv(xoe,{checked:!1}),Z$e=Y.forwardRef((a,u)=>{const{__scopeMenu:d,forceMount:f,...m}=a,g=sdr(xoe,d);return D.jsxRuntimeExports.jsx(Do,{present:f||yM(g.checked)||g.checked===!0,children:D.jsxRuntimeExports.jsx(rn.span,{...m,ref:u,"data-state":yoe(g.checked)})})});Z$e.displayName=xoe;var odr="MenuSeparator",eBe=Y.forwardRef((a,u)=>{const{__scopeMenu:d,...f}=a;return D.jsxRuntimeExports.jsx(rn.div,{role:"separator","aria-orientation":"horizontal",...f,ref:u})});eBe.displayName=odr;var adr="MenuArrow",tBe=Y.forwardRef((a,u)=>{const{__scopeMenu:d,...f}=a,m=D$(d);return D.jsxRuntimeExports.jsx(XM,{...m,...f,ref:u})});tBe.displayName=adr;var ldr="MenuSub",[kyr,rBe]=Jv(ldr),o5="MenuSubTrigger",nBe=Y.forwardRef((a,u)=>{const d=Zv(o5,a.__scopeMenu),f=TN(o5,a.__scopeMenu),m=rBe(o5,a.__scopeMenu),g=poe(o5,a.__scopeMenu),x=Y.useRef(null),{pointerGraceTimerRef:b,onPointerGraceIntentChange:v}=g,_={__scopeMenu:a.__scopeMenu},S=Y.useCallback(()=>{x.current&&window.clearTimeout(x.current),x.current=null},[]);return Y.useEffect(()=>S,[S]),Y.useEffect(()=>{const R=b.current;return()=>{window.clearTimeout(R),v(null)}},[b,v]),D.jsxRuntimeExports.jsx(foe,{asChild:!0,..._,children:D.jsxRuntimeExports.jsx(W$e,{id:m.triggerId,"aria-haspopup":"menu","aria-expanded":d.open,"aria-controls":m.contentId,"data-state":oBe(d.open),...a,ref:GM(u,m.onTriggerChange),onClick:R=>{var w;(w=a.onClick)==null||w.call(a,R),!(a.disabled||R.defaultPrevented)&&(R.currentTarget.focus(),d.open||d.onOpenChange(!0))},onPointerMove:xr(a.onPointerMove,F5(R=>{g.onItemEnter(R),!R.defaultPrevented&&!a.disabled&&!d.open&&!x.current&&(g.onPointerGraceIntentChange(null),x.current=window.setTimeout(()=>{d.onOpenChange(!0),S()},100))})),onPointerLeave:xr(a.onPointerLeave,F5(R=>{var w,N;S();const k=(w=d.content)==null?void 0:w.getBoundingClientRect();if(k){const B=(N=d.content)==null?void 0:N.dataset.side,P=B==="right",$=P?-5:5,q=k[P?"left":"right"],z=k[P?"right":"left"];g.onPointerGraceIntentChange({area:[{x:R.clientX+$,y:R.clientY},{x:q,y:k.top},{x:z,y:k.top},{x:z,y:k.bottom},{x:q,y:k.bottom}],side:B}),window.clearTimeout(b.current),b.current=window.setTimeout(()=>g.onPointerGraceIntentChange(null),300)}else{if(g.onTriggerLeave(R),R.defaultPrevented)return;g.onPointerGraceIntentChange(null)}})),onKeyDown:xr(a.onKeyDown,R=>{var w;const N=g.searchRef.current!=="";a.disabled||N&&R.key===" "||zcr[f.dir].includes(R.key)&&(d.onOpenChange(!0),(w=d.content)==null||w.focus(),R.preventDefault())})})})});nBe.displayName=o5;var iBe="MenuSubContent",sBe=Y.forwardRef((a,u)=>{const d=U$e(sc,a.__scopeMenu),{forceMount:f=d.forceMount,...m}=a,g=Zv(sc,a.__scopeMenu),x=TN(sc,a.__scopeMenu),b=rBe(iBe,a.__scopeMenu),v=Y.useRef(null),_=Cn(u,v);return D.jsxRuntimeExports.jsx(j5.Provider,{scope:a.__scopeMenu,children:D.jsxRuntimeExports.jsx(Do,{present:f||g.open,children:D.jsxRuntimeExports.jsx(j5.Slot,{scope:a.__scopeMenu,children:D.jsxRuntimeExports.jsx(moe,{id:b.contentId,"aria-labelledby":b.triggerId,...m,ref:_,align:"start",side:x.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:S=>{var R;x.isUsingKeyboardRef.current&&((R=v.current)==null||R.focus()),S.preventDefault()},onCloseAutoFocus:S=>S.preventDefault(),onFocusOutside:xr(a.onFocusOutside,S=>{S.target!==b.trigger&&g.onOpenChange(!1)}),onEscapeKeyDown:xr(a.onEscapeKeyDown,S=>{x.onClose(),S.preventDefault()}),onKeyDown:xr(a.onKeyDown,S=>{var R;const w=S.currentTarget.contains(S.target),N=Hcr[x.dir].includes(S.key);w&&N&&(g.onOpenChange(!1),(R=b.trigger)==null||R.focus(),S.preventDefault())})})})})})});sBe.displayName=iBe;function oBe(a){return a?"open":"closed"}function yM(a){return a==="indeterminate"}function yoe(a){return yM(a)?"indeterminate":a?"checked":"unchecked"}function udr(a){const u=document.activeElement;for(const d of a)if(d===u||(d.focus(),document.activeElement!==u))return}function cdr(a,u){return a.map((d,f)=>a[(u+f)%a.length])}function ddr(a,u,d){const m=u.length>1&&Array.from(u).every(_=>_===u[0])?u[0]:u,g=d?a.indexOf(d):-1;let x=cdr(a,Math.max(g,0));m.length===1&&(x=x.filter(_=>_!==d));const v=x.find(_=>_.toLowerCase().startsWith(m.toLowerCase()));return v!==d?v:void 0}function fdr(a,u){const{x:d,y:f}=a;let m=!1;for(let g=0,x=u.length-1;g<u.length;x=g++){const b=u[g].x,v=u[g].y,_=u[x].x,S=u[x].y;v>f!=S>f&&d<(_-b)*(f-v)/(S-v)+b&&(m=!m)}return m}function hdr(a,u){if(!u)return!1;const d={x:a.clientX,y:a.clientY};return fdr(d,u)}function F5(a){return u=>u.pointerType==="mouse"?a(u):void 0}var pdr=q$e,mdr=foe,gdr=z$e,xdr=H$e,ydr=goe,vdr=G$e,bdr=k$,Edr=V$e,_dr=Y$e,Sdr=X$e,Adr=Z$e,Cdr=eBe,Rdr=tBe,Tdr=nBe,wdr=sBe,voe="DropdownMenu",[Odr,Lyr]=Md(voe,[$$e]),Ya=$$e(),[Ndr,aBe]=Odr(voe),lBe=a=>{const{__scopeDropdownMenu:u,children:d,dir:f,open:m,defaultOpen:g,onOpenChange:x,modal:b=!0}=a,v=Ya(u),_=Y.useRef(null),[S=!1,R]=Dx({prop:m,defaultProp:g,onChange:x});return D.jsxRuntimeExports.jsx(Ndr,{scope:u,triggerId:ic(),triggerRef:_,contentId:ic(),open:S,onOpenChange:R,onOpenToggle:Y.useCallback(()=>R(w=>!w),[R]),modal:b,children:D.jsxRuntimeExports.jsx(pdr,{...v,open:S,onOpenChange:R,dir:f,modal:b,children:d})})};lBe.displayName=voe;var uBe="DropdownMenuTrigger",cBe=Y.forwardRef((a,u)=>{const{__scopeDropdownMenu:d,disabled:f=!1,...m}=a,g=aBe(uBe,d),x=Ya(d);return D.jsxRuntimeExports.jsx(mdr,{asChild:!0,...x,children:D.jsxRuntimeExports.jsx(rn.button,{type:"button",id:g.triggerId,"aria-haspopup":"menu","aria-expanded":g.open,"aria-controls":g.open?g.contentId:void 0,"data-state":g.open?"open":"closed","data-disabled":f?"":void 0,disabled:f,...m,ref:GM(u,g.triggerRef),onPointerDown:xr(a.onPointerDown,b=>{!f&&b.button===0&&b.ctrlKey===!1&&(g.onOpenToggle(),g.open||b.preventDefault())}),onKeyDown:xr(a.onKeyDown,b=>{f||(["Enter"," "].includes(b.key)&&g.onOpenToggle(),b.key==="ArrowDown"&&g.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(b.key)&&b.preventDefault())})})})});cBe.displayName=uBe;var Ddr="DropdownMenuPortal",dBe=a=>{const{__scopeDropdownMenu:u,...d}=a,f=Ya(u);return D.jsxRuntimeExports.jsx(gdr,{...f,...d})};dBe.displayName=Ddr;var fBe="DropdownMenuContent",hBe=Y.forwardRef((a,u)=>{const{__scopeDropdownMenu:d,...f}=a,m=aBe(fBe,d),g=Ya(d),x=Y.useRef(!1);return D.jsxRuntimeExports.jsx(xdr,{id:m.contentId,"aria-labelledby":m.triggerId,...g,...f,ref:u,onCloseAutoFocus:xr(a.onCloseAutoFocus,b=>{var v;x.current||(v=m.triggerRef.current)==null||v.focus(),x.current=!1,b.preventDefault()}),onInteractOutside:xr(a.onInteractOutside,b=>{const v=b.detail.originalEvent,_=v.button===0&&v.ctrlKey===!0,S=v.button===2||_;(!m.modal||S)&&(x.current=!0)}),style:{...a.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});hBe.displayName=fBe;var kdr="DropdownMenuGroup",Ldr=Y.forwardRef((a,u)=>{const{__scopeDropdownMenu:d,...f}=a,m=Ya(d);return D.jsxRuntimeExports.jsx(ydr,{...m,...f,ref:u})});Ldr.displayName=kdr;var Idr="DropdownMenuLabel",Pdr=Y.forwardRef((a,u)=>{const{__scopeDropdownMenu:d,...f}=a,m=Ya(d);return D.jsxRuntimeExports.jsx(vdr,{...m,...f,ref:u})});Pdr.displayName=Idr;var jdr="DropdownMenuItem",pBe=Y.forwardRef((a,u)=>{const{__scopeDropdownMenu:d,...f}=a,m=Ya(d);return D.jsxRuntimeExports.jsx(bdr,{...m,...f,ref:u})});pBe.displayName=jdr;var Fdr="DropdownMenuCheckboxItem",Mdr=Y.forwardRef((a,u)=>{const{__scopeDropdownMenu:d,...f}=a,m=Ya(d);return D.jsxRuntimeExports.jsx(Edr,{...m,...f,ref:u})});Mdr.displayName=Fdr;var $dr="DropdownMenuRadioGroup",Bdr=Y.forwardRef((a,u)=>{const{__scopeDropdownMenu:d,...f}=a,m=Ya(d);return D.jsxRuntimeExports.jsx(_dr,{...m,...f,ref:u})});Bdr.displayName=$dr;var qdr="DropdownMenuRadioItem",Udr=Y.forwardRef((a,u)=>{const{__scopeDropdownMenu:d,...f}=a,m=Ya(d);return D.jsxRuntimeExports.jsx(Sdr,{...m,...f,ref:u})});Udr.displayName=qdr;var zdr="DropdownMenuItemIndicator",Hdr=Y.forwardRef((a,u)=>{const{__scopeDropdownMenu:d,...f}=a,m=Ya(d);return D.jsxRuntimeExports.jsx(Adr,{...m,...f,ref:u})});Hdr.displayName=zdr;var Gdr="DropdownMenuSeparator",Wdr=Y.forwardRef((a,u)=>{const{__scopeDropdownMenu:d,...f}=a,m=Ya(d);return D.jsxRuntimeExports.jsx(Cdr,{...m,...f,ref:u})});Wdr.displayName=Gdr;var Vdr="DropdownMenuArrow",Qdr=Y.forwardRef((a,u)=>{const{__scopeDropdownMenu:d,...f}=a,m=Ya(d);return D.jsxRuntimeExports.jsx(Rdr,{...m,...f,ref:u})});Qdr.displayName=Vdr;var Ydr="DropdownMenuSubTrigger",Kdr=Y.forwardRef((a,u)=>{const{__scopeDropdownMenu:d,...f}=a,m=Ya(d);return D.jsxRuntimeExports.jsx(Tdr,{...m,...f,ref:u})});Kdr.displayName=Ydr;var Xdr="DropdownMenuSubContent",Jdr=Y.forwardRef((a,u)=>{const{__scopeDropdownMenu:d,...f}=a,m=Ya(d);return D.jsxRuntimeExports.jsx(wdr,{...m,...f,ref:u,style:{...a.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Jdr.displayName=Xdr;var Zdr=lBe,w9e=cBe,efr=dBe,tfr=hBe,rfr=pBe;function boe({trigger:a,tooltip:u,onOpenChange:d,children:f,tooltipProps:m}){const[g,x]=Y.useState(),b=v=>{v&&x(!1),d?.(v)};return D.jsxRuntimeExports.jsxs(Zdr,{onOpenChange:b,children:[u?D.jsxRuntimeExports.jsxs(oN,{open:g,onOpenChange:x,delayDuration:300,children:[D.jsxRuntimeExports.jsx(aN,{asChild:!0,children:D.jsxRuntimeExports.jsx(w9e,{asChild:!0,children:a})}),D.jsxRuntimeExports.jsx(lN,{children:D.jsxRuntimeExports.jsx(uN,{...m,...Lt.props(typeof u=="string"?g0.default:g0.card),children:u})})]}):D.jsxRuntimeExports.jsx(w9e,{asChild:!0,children:a}),D.jsxRuntimeExports.jsx(efr,{children:D.jsxRuntimeExports.jsx(tfr,{...Lt.props(Fr.body,LF.content),side:"bottom",align:"start",sideOffset:4,onCloseAutoFocus:v=>v.preventDefault(),children:Y.Children.map(f,v=>v)})})]})}function M5({icon:a,label:u,sublabel:d,onClick:f,disabled:m}){return D.jsxRuntimeExports.jsxs(rfr,{className:"mly78zum5 mly6s0dn4 mlye8ttls mly167g77z mly1kogg8i mly1ypdohk mly1a2a7pz mly1bw6wve mly5ezrf1 mly15rdse5 mly1z060rf mly5deeek mly1jacekv mly7ouyw2 mly7h4d18",onClick:g=>{f?.(g)},disabled:m,children:[a&&D.jsxRuntimeExports.jsx(An,{name:a,customStyle:LF.icon}),D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mly1iyjqo2",children:[D.jsxRuntimeExports.jsx("span",{...Lt.props(Fr.body,LF.label),children:u}),d&&D.jsxRuntimeExports.jsx("span",{...Lt.props(Fr.supporting,LF.sublabel),children:d})]})]})}const LF={content:{display:"mly78zum5",flexDirection:"mlydt5ytf",borderRadius:"mly1q4ynmn",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,background:"mlyotlr4g",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,boxShadow:"mly17fq3gk",padding:"mlyfawy5m",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0},icon:{color:"mly1mguc6l",$$css:!0},label:{flexGrow:"mly1iyjqo2",color:"mly12lmysb",$$css:!0},sublabel:{flexGrow:"mly1iyjqo2",color:"mly15jt5ur",$$css:!0}},L$=Y.createContext({});function nfr({runQuery:a}){const{rootQuery:u,setQuery:d,source:f}=Pe.useContext(ai),{onCollapse:m}=Pe.useContext(L$),{focusMainView:g}=cN(),x=!u||u.isEmpty(),b=u?.isRunnable(),v=()=>{f&&u&&a(f,u.build())};return D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1qughib mly6s0dn4 mlye8ttls",children:[D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly167g77z mly6s0dn4 mlydqdrvq",children:[D.jsxRuntimeExports.jsx(An,{name:"filterSliders"}),D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.largeBody,ifr.title),children:"Query"})]}),D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly167g77z",children:[D.jsxRuntimeExports.jsx($i,{onClick:()=>{g(),d?.(void 0)},isDisabled:!u||u?.isEmpty(),label:"Clear",variant:"flat",size:"compact"}),D.jsxRuntimeExports.jsxs(LS,{children:[D.jsxRuntimeExports.jsx(IS,{asChild:!0,children:D.jsxRuntimeExports.jsx($i,{icon:"play",onClick:v,isDisabled:!b,label:"Run",variant:"primary",size:"compact"})}),D.jsxRuntimeExports.jsx(PS,{children:D.jsxRuntimeExports.jsx(jS,{children:D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.body,g0.default),children:b?"Execute the query.":x?"The current query is empty.":"The current query cannot be executed."})})})]}),m&&D.jsxRuntimeExports.jsx($i,{icon:"sidebarCollapse",tooltip:"Close the source panel",onClick:m,size:"compact",variant:"flat"})]})]})}const ifr={title:{fontWeight:"mly1xlr1w8",$$css:!0}},Id={labelWithIcon:{display:"mly78zum5",alignItems:"mly6s0dn4",whiteSpace:"mlyuxw1ft",gap:"mly167g77z",rowGap:null,columnGap:null,overflow:"mlyb3r6kr",overflowX:null,overflowY:null,$$css:!0},queryCard:{border:"mlyzkdzjc",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,borderRadius:"mly1sxf85j",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,padding:"mlye8ttls",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0},title:{whiteSpace:"mlyuxw1ft",padding:"mly17qkr04",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0},tokenContainer:{display:"mly78zum5",flexDirection:"mlydt5ytf",gap:"mly167g77z",rowGap:null,columnGap:null,$$css:!0}};function sfr({value:a,customStyle:u}){if(!a)return D.jsxRuntimeExports.jsx($s,{label:"∅"});switch(a.kind){case"boolean_literal":return D.jsxRuntimeExports.jsx($s,{label:a.boolean_value?"true":"false",customStyle:u});case"date_literal":return D.jsxRuntimeExports.jsx($s,{label:a.date_value,customStyle:u});case"timestamp_literal":return D.jsxRuntimeExports.jsx($s,{label:a.timestamp_value,customStyle:u});case"null_literal":return D.jsxRuntimeExports.jsx($s,{label:"∅"});case"number_literal":return D.jsxRuntimeExports.jsx($s,{label:a.number_value.toLocaleString(),customStyle:u});case"string_literal":return D.jsxRuntimeExports.jsx($s,{label:a.string_value,customStyle:u});case"filter_expression_literal":return D.jsxRuntimeExports.jsx($s,{label:a.filter_expression_value,customStyle:u})}}const mBe=["table","bar_chart","dashboard","json","line_chart","list","list_detail","point_map","scatter_chart","segment_map","shape_map","sparkline"],ofr=["number","boolean","currency","image","url","percent","text","time"],afr=[...mBe,...ofr];function Eoe(a){if(a){const u=a.getProperties(),d=Object.keys(u);for(const f of d)if(afr.includes(f)&&!u[f].deleted)return f}return null}function I$(a){return ufr[a]}function gBe(a){return cfr[a]}function IF(a){let u;switch(a.kind){case"view":u="query";break;case"dimension":case"measure":u=I$(a.type.kind);break;case"join":u=lfr(a.relationship);break}return u}function lfr(a){return dfr[a]}function xBe(a){const u=a.getTag();return`viz_${Eoe(u)??"table"}`}const ufr={array_type:"array",string_type:"string",date_type:"date",boolean_type:"boolean",number_type:"number",json_type:"json",record_type:"json",sql_native_type:"sql_native",timestamp_type:"date",filter_expression_type:"filter"},cfr={view:"purple",dimension:"cyan",measure:"green",join:void 0},dfr={many:"many_to_one",cross:"one_to_many",one:"one_to_one"};function hS({field:a,hoverActions:u,hoverActionsVisible:d,...f}){let m=a.name;return a.kind==="dimension"&&(a.type.kind==="timestamp_type"||a.type.kind==="date_type")&&a.type.timeframe&&(m+=`.${a.type.timeframe}`),D.jsxRuntimeExports.jsxs("div",{...{0:{className:"mly78zum5 mly6s0dn4 mly1nhvcw1 mly1jnr06f mly28fmrt mly1x0xcia"},1:{className:"mly78zum5 mly6s0dn4 mly1nhvcw1 mly1jnr06f mlym9y5t7"}}[!!d<<0],children:[D.jsxRuntimeExports.jsx($s,{label:m,color:gBe(a.kind),icon:IF(a),...f}),u&&D.jsxRuntimeExports.jsx("div",{className:"mly1vsucm1 mly2lah0s",children:u})]})}function ffr({drills:a}){return a.length?D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsx("div",{...Lt.props(Id.title),children:"drills"}),D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mlydt5ytf mly1jnr06f",children:a.map((u,d)=>D.jsxRuntimeExports.jsxs(hN,{color:"cyan",customStyle:hfr.tokenGroup,children:[D.jsxRuntimeExports.jsx(hS,{field:u.filter.fieldReference.getFieldInfo()}),D.jsxRuntimeExports.jsx($s,{label:"="}),u.filter instanceof Zr.ASTFilterWithLiteralEquality?D.jsxRuntimeExports.jsx(sfr,{value:u.filter.value.node}):D.jsxRuntimeExports.jsx($s,{label:u.filter.filterString})]},d))})]}):null}const hfr={tokenGroup:{display:"mly78zum5",$$css:!0}};function pfr(){for(var a=arguments.length,u=new Array(a),d=0;d<a;d++)u[d]=arguments[d];return Pe.useMemo(()=>f=>{u.forEach(m=>m(f))},u)}const P$=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function HS(a){const u=Object.prototype.toString.call(a);return u==="[object Window]"||u==="[object global]"}function _oe(a){return"nodeType"in a}function Tl(a){var u,d;return a?HS(a)?a:_oe(a)&&(u=(d=a.ownerDocument)==null?void 0:d.defaultView)!=null?u:window:window}function Soe(a){const{Document:u}=Tl(a);return a instanceof u}function wN(a){return HS(a)?!1:a instanceof Tl(a).HTMLElement}function yBe(a){return a instanceof Tl(a).SVGElement}function GS(a){return a?HS(a)?a.document:_oe(a)?Soe(a)?a:wN(a)||yBe(a)?a.ownerDocument:document:document:document}const yh=P$?Pe.useLayoutEffect:Pe.useEffect;function Aoe(a){const u=Pe.useRef(a);return yh(()=>{u.current=a}),Pe.useCallback(function(){for(var d=arguments.length,f=new Array(d),m=0;m<d;m++)f[m]=arguments[m];return u.current==null?void 0:u.current(...f)},[])}function mfr(){const a=Pe.useRef(null),u=Pe.useCallback((f,m)=>{a.current=setInterval(f,m)},[]),d=Pe.useCallback(()=>{a.current!==null&&(clearInterval(a.current),a.current=null)},[]);return[u,d]}function $5(a,u){u===void 0&&(u=[a]);const d=Pe.useRef(a);return yh(()=>{d.current!==a&&(d.current=a)},u),d}function ON(a,u){const d=Pe.useRef();return Pe.useMemo(()=>{const f=a(d.current);return d.current=f,f},[...u])}function vM(a){const u=Aoe(a),d=Pe.useRef(null),f=Pe.useCallback(m=>{m!==d.current&&u?.(m,d.current),d.current=m},[]);return[d,f]}function gie(a){const u=Pe.useRef();return Pe.useEffect(()=>{u.current=a},[a]),u.current}let ene={};function NN(a,u){return Pe.useMemo(()=>{if(u)return u;const d=ene[a]==null?0:ene[a]+1;return ene[a]=d,a+"-"+d},[a,u])}function vBe(a){return function(u){for(var d=arguments.length,f=new Array(d>1?d-1:0),m=1;m<d;m++)f[m-1]=arguments[m];return f.reduce((g,x)=>{const b=Object.entries(x);for(const[v,_]of b){const S=g[v];S!=null&&(g[v]=S+a*_)}return g},{...u})}}const rS=vBe(1),bM=vBe(-1);function gfr(a){return"clientX"in a&&"clientY"in a}function Coe(a){if(!a)return!1;const{KeyboardEvent:u}=Tl(a.target);return u&&a instanceof u}function xfr(a){if(!a)return!1;const{TouchEvent:u}=Tl(a.target);return u&&a instanceof u}function xie(a){if(xfr(a)){if(a.touches&&a.touches.length){const{clientX:u,clientY:d}=a.touches[0];return{x:u,y:d}}else if(a.changedTouches&&a.changedTouches.length){const{clientX:u,clientY:d}=a.changedTouches[0];return{x:u,y:d}}}return gfr(a)?{x:a.clientX,y:a.clientY}:null}const B5=Object.freeze({Translate:{toString(a){if(!a)return;const{x:u,y:d}=a;return"translate3d("+(u?Math.round(u):0)+"px, "+(d?Math.round(d):0)+"px, 0)"}},Scale:{toString(a){if(!a)return;const{scaleX:u,scaleY:d}=a;return"scaleX("+u+") scaleY("+d+")"}},Transform:{toString(a){if(a)return[B5.Translate.toString(a),B5.Scale.toString(a)].join(" ")}},Transition:{toString(a){let{property:u,duration:d,easing:f}=a;return u+" "+d+"ms "+f}}}),O9e="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function yfr(a){return a.matches(O9e)?a:a.querySelector(O9e)}const vfr={display:"none"};function bfr(a){let{id:u,value:d}=a;return Pe.createElement("div",{id:u,style:vfr},d)}function Efr(a){let{id:u,announcement:d,ariaLiveType:f="assertive"}=a;const m={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return Pe.createElement("div",{id:u,style:m,role:"status","aria-live":f,"aria-atomic":!0},d)}function _fr(){const[a,u]=Pe.useState("");return{announce:Pe.useCallback(f=>{f!=null&&u(f)},[]),announcement:a}}const bBe=Pe.createContext(null);function Sfr(a){const u=Pe.useContext(bBe);Pe.useEffect(()=>{if(!u)throw new Error("useDndMonitor must be used within a children of <DndContext>");return u(a)},[a,u])}function Afr(){const[a]=Pe.useState(()=>new Set),u=Pe.useCallback(f=>(a.add(f),()=>a.delete(f)),[a]);return[Pe.useCallback(f=>{let{type:m,event:g}=f;a.forEach(x=>{var b;return(b=x[m])==null?void 0:b.call(x,g)})},[a]),u]}const Cfr={draggable:`
|
|
2875
2875
|
To pick up a draggable item, press the space bar.
|
|
2876
2876
|
While dragging, use the arrow keys to move the item.
|
|
2877
2877
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
2878
2878
|
`},Rfr={onDragStart(a){let{active:u}=a;return"Picked up draggable item "+u.id+"."},onDragOver(a){let{active:u,over:d}=a;return d?"Draggable item "+u.id+" was moved over droppable area "+d.id+".":"Draggable item "+u.id+" is no longer over a droppable area."},onDragEnd(a){let{active:u,over:d}=a;return d?"Draggable item "+u.id+" was dropped over droppable area "+d.id:"Draggable item "+u.id+" was dropped."},onDragCancel(a){let{active:u}=a;return"Dragging was cancelled. Draggable item "+u.id+" was dropped."}};function Tfr(a){let{announcements:u=Rfr,container:d,hiddenTextDescribedById:f,screenReaderInstructions:m=Cfr}=a;const{announce:g,announcement:x}=_fr(),b=NN("DndLiveRegion"),[v,_]=Pe.useState(!1);if(Pe.useEffect(()=>{_(!0)},[]),Sfr(Pe.useMemo(()=>({onDragStart(R){let{active:w}=R;g(u.onDragStart({active:w}))},onDragMove(R){let{active:w,over:N}=R;u.onDragMove&&g(u.onDragMove({active:w,over:N}))},onDragOver(R){let{active:w,over:N}=R;g(u.onDragOver({active:w,over:N}))},onDragEnd(R){let{active:w,over:N}=R;g(u.onDragEnd({active:w,over:N}))},onDragCancel(R){let{active:w,over:N}=R;g(u.onDragCancel({active:w,over:N}))}}),[g,u])),!v)return null;const S=Pe.createElement(Pe.Fragment,null,Pe.createElement(bfr,{id:f,value:m.draggable}),Pe.createElement(Efr,{id:b,announcement:x}));return d?jv.createPortal(S,d):S}var qs;(function(a){a.DragStart="dragStart",a.DragMove="dragMove",a.DragEnd="dragEnd",a.DragCancel="dragCancel",a.DragOver="dragOver",a.RegisterDroppable="registerDroppable",a.SetDroppableDisabled="setDroppableDisabled",a.UnregisterDroppable="unregisterDroppable"})(qs||(qs={}));function EM(){}function wfr(a,u){return Pe.useMemo(()=>({sensor:a,options:{}}),[a,u])}function Ofr(){for(var a=arguments.length,u=new Array(a),d=0;d<a;d++)u[d]=arguments[d];return Pe.useMemo(()=>[...u].filter(f=>f!=null),[...u])}const Pd=Object.freeze({x:0,y:0});function Nfr(a,u){return Math.sqrt(Math.pow(a.x-u.x,2)+Math.pow(a.y-u.y,2))}function Dfr(a,u){let{data:{value:d}}=a,{data:{value:f}}=u;return d-f}function kfr(a,u){let{data:{value:d}}=a,{data:{value:f}}=u;return f-d}function Lfr(a,u){if(!a||a.length===0)return null;const[d]=a;return d[u]}function N9e(a,u,d){return u===void 0&&(u=a.left),d===void 0&&(d=a.top),{x:u+a.width*.5,y:d+a.height*.5}}const Ifr=a=>{let{collisionRect:u,droppableRects:d,droppableContainers:f}=a;const m=N9e(u,u.left,u.top),g=[];for(const x of f){const{id:b}=x,v=d.get(b);if(v){const _=Nfr(N9e(v),m);g.push({id:b,data:{droppableContainer:x,value:_}})}}return g.sort(Dfr)};function Pfr(a,u){const d=Math.max(u.top,a.top),f=Math.max(u.left,a.left),m=Math.min(u.left+u.width,a.left+a.width),g=Math.min(u.top+u.height,a.top+a.height),x=m-f,b=g-d;if(f<m&&d<g){const v=u.width*u.height,_=a.width*a.height,S=x*b,R=S/(v+_-S);return Number(R.toFixed(4))}return 0}const jfr=a=>{let{collisionRect:u,droppableRects:d,droppableContainers:f}=a;const m=[];for(const g of f){const{id:x}=g,b=d.get(x);if(b){const v=Pfr(b,u);v>0&&m.push({id:x,data:{droppableContainer:g,value:v}})}}return m.sort(kfr)};function Ffr(a,u,d){return{...a,scaleX:u&&d?u.width/d.width:1,scaleY:u&&d?u.height/d.height:1}}function EBe(a,u){return a&&u?{x:a.left-u.left,y:a.top-u.top}:Pd}function Mfr(a){return function(d){for(var f=arguments.length,m=new Array(f>1?f-1:0),g=1;g<f;g++)m[g-1]=arguments[g];return m.reduce((x,b)=>({...x,top:x.top+a*b.y,bottom:x.bottom+a*b.y,left:x.left+a*b.x,right:x.right+a*b.x}),{...d})}}const $fr=Mfr(1);function Bfr(a){if(a.startsWith("matrix3d(")){const u=a.slice(9,-1).split(/, /);return{x:+u[12],y:+u[13],scaleX:+u[0],scaleY:+u[5]}}else if(a.startsWith("matrix(")){const u=a.slice(7,-1).split(/, /);return{x:+u[4],y:+u[5],scaleX:+u[0],scaleY:+u[3]}}return null}function qfr(a,u,d){const f=Bfr(u);if(!f)return a;const{scaleX:m,scaleY:g,x,y:b}=f,v=a.left-x-(1-m)*parseFloat(d),_=a.top-b-(1-g)*parseFloat(d.slice(d.indexOf(" ")+1)),S=m?a.width/m:a.width,R=g?a.height/g:a.height;return{width:S,height:R,top:_,right:v+S,bottom:_+R,left:v}}const Ufr={ignoreTransform:!1};function WS(a,u){u===void 0&&(u=Ufr);let d=a.getBoundingClientRect();if(u.ignoreTransform){const{transform:_,transformOrigin:S}=Tl(a).getComputedStyle(a);_&&(d=qfr(d,_,S))}const{top:f,left:m,width:g,height:x,bottom:b,right:v}=d;return{top:f,left:m,width:g,height:x,bottom:b,right:v}}function D9e(a){return WS(a,{ignoreTransform:!0})}function zfr(a){const u=a.innerWidth,d=a.innerHeight;return{top:0,left:0,right:u,bottom:d,width:u,height:d}}function Hfr(a,u){return u===void 0&&(u=Tl(a).getComputedStyle(a)),u.position==="fixed"}function Gfr(a,u){u===void 0&&(u=Tl(a).getComputedStyle(a));const d=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(m=>{const g=u[m];return typeof g=="string"?d.test(g):!1})}function Roe(a,u){const d=[];function f(m){if(u!=null&&d.length>=u||!m)return d;if(Soe(m)&&m.scrollingElement!=null&&!d.includes(m.scrollingElement))return d.push(m.scrollingElement),d;if(!wN(m)||yBe(m)||d.includes(m))return d;const g=Tl(a).getComputedStyle(m);return m!==a&&Gfr(m,g)&&d.push(m),Hfr(m,g)?d:f(m.parentNode)}return a?f(a):d}function _Be(a){const[u]=Roe(a,1);return u??null}function tne(a){return!P$||!a?null:HS(a)?a:_oe(a)?Soe(a)||a===GS(a).scrollingElement?window:wN(a)?a:null:null}function SBe(a){return HS(a)?a.scrollX:a.scrollLeft}function ABe(a){return HS(a)?a.scrollY:a.scrollTop}function yie(a){return{x:SBe(a),y:ABe(a)}}var ho;(function(a){a[a.Forward=1]="Forward",a[a.Backward=-1]="Backward"})(ho||(ho={}));function CBe(a){return!P$||!a?!1:a===document.scrollingElement}function RBe(a){const u={x:0,y:0},d=CBe(a)?{height:window.innerHeight,width:window.innerWidth}:{height:a.clientHeight,width:a.clientWidth},f={x:a.scrollWidth-d.width,y:a.scrollHeight-d.height},m=a.scrollTop<=u.y,g=a.scrollLeft<=u.x,x=a.scrollTop>=f.y,b=a.scrollLeft>=f.x;return{isTop:m,isLeft:g,isBottom:x,isRight:b,maxScroll:f,minScroll:u}}const Wfr={x:.2,y:.2};function Vfr(a,u,d,f,m){let{top:g,left:x,right:b,bottom:v}=d;f===void 0&&(f=10),m===void 0&&(m=Wfr);const{isTop:_,isBottom:S,isLeft:R,isRight:w}=RBe(a),N={x:0,y:0},k={x:0,y:0},B={height:u.height*m.y,width:u.width*m.x};return!_&&g<=u.top+B.height?(N.y=ho.Backward,k.y=f*Math.abs((u.top+B.height-g)/B.height)):!S&&v>=u.bottom-B.height&&(N.y=ho.Forward,k.y=f*Math.abs((u.bottom-B.height-v)/B.height)),!w&&b>=u.right-B.width?(N.x=ho.Forward,k.x=f*Math.abs((u.right-B.width-b)/B.width)):!R&&x<=u.left+B.width&&(N.x=ho.Backward,k.x=f*Math.abs((u.left+B.width-x)/B.width)),{direction:N,speed:k}}function Qfr(a){if(a===document.scrollingElement){const{innerWidth:g,innerHeight:x}=window;return{top:0,left:0,right:g,bottom:x,width:g,height:x}}const{top:u,left:d,right:f,bottom:m}=a.getBoundingClientRect();return{top:u,left:d,right:f,bottom:m,width:a.clientWidth,height:a.clientHeight}}function TBe(a){return a.reduce((u,d)=>rS(u,yie(d)),Pd)}function Yfr(a){return a.reduce((u,d)=>u+SBe(d),0)}function Kfr(a){return a.reduce((u,d)=>u+ABe(d),0)}function Xfr(a,u){if(u===void 0&&(u=WS),!a)return;const{top:d,left:f,bottom:m,right:g}=u(a);_Be(a)&&(m<=0||g<=0||d>=window.innerHeight||f>=window.innerWidth)&&a.scrollIntoView({block:"center",inline:"center"})}const Jfr=[["x",["left","right"],Yfr],["y",["top","bottom"],Kfr]];class Toe{constructor(u,d){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const f=Roe(d),m=TBe(f);this.rect={...u},this.width=u.width,this.height=u.height;for(const[g,x,b]of Jfr)for(const v of x)Object.defineProperty(this,v,{get:()=>{const _=b(f),S=m[g]-_;return this.rect[v]+S},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class p5{constructor(u){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(d=>{var f;return(f=this.target)==null?void 0:f.removeEventListener(...d)})},this.target=u}add(u,d,f){var m;(m=this.target)==null||m.addEventListener(u,d,f),this.listeners.push([u,d,f])}}function Zfr(a){const{EventTarget:u}=Tl(a);return a instanceof u?a:GS(a)}function rne(a,u){const d=Math.abs(a.x),f=Math.abs(a.y);return typeof u=="number"?Math.sqrt(d**2+f**2)>u:"x"in u&&"y"in u?d>u.x&&f>u.y:"x"in u?d>u.x:"y"in u?f>u.y:!1}var Zu;(function(a){a.Click="click",a.DragStart="dragstart",a.Keydown="keydown",a.ContextMenu="contextmenu",a.Resize="resize",a.SelectionChange="selectionchange",a.VisibilityChange="visibilitychange"})(Zu||(Zu={}));function k9e(a){a.preventDefault()}function ehr(a){a.stopPropagation()}var Xn;(function(a){a.Space="Space",a.Down="ArrowDown",a.Right="ArrowRight",a.Left="ArrowLeft",a.Up="ArrowUp",a.Esc="Escape",a.Enter="Enter",a.Tab="Tab"})(Xn||(Xn={}));const wBe={start:[Xn.Space,Xn.Enter],cancel:[Xn.Esc],end:[Xn.Space,Xn.Enter,Xn.Tab]},thr=(a,u)=>{let{currentCoordinates:d}=u;switch(a.code){case Xn.Right:return{...d,x:d.x+25};case Xn.Left:return{...d,x:d.x-25};case Xn.Down:return{...d,y:d.y+25};case Xn.Up:return{...d,y:d.y-25}}};class OBe{constructor(u){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=u;const{event:{target:d}}=u;this.props=u,this.listeners=new p5(GS(d)),this.windowListeners=new p5(Tl(d)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Zu.Resize,this.handleCancel),this.windowListeners.add(Zu.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Zu.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:u,onStart:d}=this.props,f=u.node.current;f&&Xfr(f),d(Pd)}handleKeyDown(u){if(Coe(u)){const{active:d,context:f,options:m}=this.props,{keyboardCodes:g=wBe,coordinateGetter:x=thr,scrollBehavior:b="smooth"}=m,{code:v}=u;if(g.end.includes(v)){this.handleEnd(u);return}if(g.cancel.includes(v)){this.handleCancel(u);return}const{collisionRect:_}=f.current,S=_?{x:_.left,y:_.top}:Pd;this.referenceCoordinates||(this.referenceCoordinates=S);const R=x(u,{active:d,context:f.current,currentCoordinates:S});if(R){const w=bM(R,S),N={x:0,y:0},{scrollableAncestors:k}=f.current;for(const B of k){const P=u.code,{isTop:$,isRight:q,isLeft:z,isBottom:W,maxScroll:X,minScroll:J}=RBe(B),ee=Qfr(B),fe={x:Math.min(P===Xn.Right?ee.right-ee.width/2:ee.right,Math.max(P===Xn.Right?ee.left:ee.left+ee.width/2,R.x)),y:Math.min(P===Xn.Down?ee.bottom-ee.height/2:ee.bottom,Math.max(P===Xn.Down?ee.top:ee.top+ee.height/2,R.y))},be=P===Xn.Right&&!q||P===Xn.Left&&!z,je=P===Xn.Down&&!W||P===Xn.Up&&!$;if(be&&fe.x!==R.x){const _e=B.scrollLeft+w.x,De=P===Xn.Right&&_e<=X.x||P===Xn.Left&&_e>=J.x;if(De&&!w.y){B.scrollTo({left:_e,behavior:b});return}De?N.x=B.scrollLeft-_e:N.x=P===Xn.Right?B.scrollLeft-X.x:B.scrollLeft-J.x,N.x&&B.scrollBy({left:-N.x,behavior:b});break}else if(je&&fe.y!==R.y){const _e=B.scrollTop+w.y,De=P===Xn.Down&&_e<=X.y||P===Xn.Up&&_e>=J.y;if(De&&!w.x){B.scrollTo({top:_e,behavior:b});return}De?N.y=B.scrollTop-_e:N.y=P===Xn.Down?B.scrollTop-X.y:B.scrollTop-J.y,N.y&&B.scrollBy({top:-N.y,behavior:b});break}}this.handleMove(u,rS(bM(R,this.referenceCoordinates),N))}}}handleMove(u,d){const{onMove:f}=this.props;u.preventDefault(),f(d)}handleEnd(u){const{onEnd:d}=this.props;u.preventDefault(),this.detach(),d()}handleCancel(u){const{onCancel:d}=this.props;u.preventDefault(),this.detach(),d()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}OBe.activators=[{eventName:"onKeyDown",handler:(a,u,d)=>{let{keyboardCodes:f=wBe,onActivation:m}=u,{active:g}=d;const{code:x}=a.nativeEvent;if(f.start.includes(x)){const b=g.activatorNode.current;return b&&a.target!==b?!1:(a.preventDefault(),m?.({event:a.nativeEvent}),!0)}return!1}}];function L9e(a){return!!(a&&"distance"in a)}function I9e(a){return!!(a&&"delay"in a)}class woe{constructor(u,d,f){var m;f===void 0&&(f=Zfr(u.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=u,this.events=d;const{event:g}=u,{target:x}=g;this.props=u,this.events=d,this.document=GS(x),this.documentListeners=new p5(this.document),this.listeners=new p5(f),this.windowListeners=new p5(Tl(x)),this.initialCoordinates=(m=xie(g))!=null?m:Pd,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:u,props:{options:{activationConstraint:d,bypassActivationConstraint:f}}}=this;if(this.listeners.add(u.move.name,this.handleMove,{passive:!1}),this.listeners.add(u.end.name,this.handleEnd),u.cancel&&this.listeners.add(u.cancel.name,this.handleCancel),this.windowListeners.add(Zu.Resize,this.handleCancel),this.windowListeners.add(Zu.DragStart,k9e),this.windowListeners.add(Zu.VisibilityChange,this.handleCancel),this.windowListeners.add(Zu.ContextMenu,k9e),this.documentListeners.add(Zu.Keydown,this.handleKeydown),d){if(f!=null&&f({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(I9e(d)){this.timeoutId=setTimeout(this.handleStart,d.delay),this.handlePending(d);return}if(L9e(d)){this.handlePending(d);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(u,d){const{active:f,onPending:m}=this.props;m(f,u,this.initialCoordinates,d)}handleStart(){const{initialCoordinates:u}=this,{onStart:d}=this.props;u&&(this.activated=!0,this.documentListeners.add(Zu.Click,ehr,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Zu.SelectionChange,this.removeTextSelection),d(u))}handleMove(u){var d;const{activated:f,initialCoordinates:m,props:g}=this,{onMove:x,options:{activationConstraint:b}}=g;if(!m)return;const v=(d=xie(u))!=null?d:Pd,_=bM(m,v);if(!f&&b){if(L9e(b)){if(b.tolerance!=null&&rne(_,b.tolerance))return this.handleCancel();if(rne(_,b.distance))return this.handleStart()}if(I9e(b)&&rne(_,b.tolerance))return this.handleCancel();this.handlePending(b,_);return}u.cancelable&&u.preventDefault(),x(v)}handleEnd(){const{onAbort:u,onEnd:d}=this.props;this.detach(),this.activated||u(this.props.active),d()}handleCancel(){const{onAbort:u,onCancel:d}=this.props;this.detach(),this.activated||u(this.props.active),d()}handleKeydown(u){u.code===Xn.Esc&&this.handleCancel()}removeTextSelection(){var u;(u=this.document.getSelection())==null||u.removeAllRanges()}}const rhr={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Ooe extends woe{constructor(u){const{event:d}=u,f=GS(d.target);super(u,rhr,f)}}Ooe.activators=[{eventName:"onPointerDown",handler:(a,u)=>{let{nativeEvent:d}=a,{onActivation:f}=u;return!d.isPrimary||d.button!==0?!1:(f?.({event:d}),!0)}}];const nhr={move:{name:"mousemove"},end:{name:"mouseup"}};var vie;(function(a){a[a.RightClick=2]="RightClick"})(vie||(vie={}));class ihr extends woe{constructor(u){super(u,nhr,GS(u.event.target))}}ihr.activators=[{eventName:"onMouseDown",handler:(a,u)=>{let{nativeEvent:d}=a,{onActivation:f}=u;return d.button===vie.RightClick?!1:(f?.({event:d}),!0)}}];const nne={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class shr extends woe{constructor(u){super(u,nne)}static setup(){return window.addEventListener(nne.move.name,u,{capture:!1,passive:!1}),function(){window.removeEventListener(nne.move.name,u)};function u(){}}}shr.activators=[{eventName:"onTouchStart",handler:(a,u)=>{let{nativeEvent:d}=a,{onActivation:f}=u;const{touches:m}=d;return m.length>1?!1:(f?.({event:d}),!0)}}];var m5;(function(a){a[a.Pointer=0]="Pointer",a[a.DraggableRect=1]="DraggableRect"})(m5||(m5={}));var _M;(function(a){a[a.TreeOrder=0]="TreeOrder",a[a.ReversedTreeOrder=1]="ReversedTreeOrder"})(_M||(_M={}));function ohr(a){let{acceleration:u,activator:d=m5.Pointer,canScroll:f,draggingRect:m,enabled:g,interval:x=5,order:b=_M.TreeOrder,pointerCoordinates:v,scrollableAncestors:_,scrollableAncestorRects:S,delta:R,threshold:w}=a;const N=lhr({delta:R,disabled:!g}),[k,B]=mfr(),P=Pe.useRef({x:0,y:0}),$=Pe.useRef({x:0,y:0}),q=Pe.useMemo(()=>{switch(d){case m5.Pointer:return v?{top:v.y,bottom:v.y,left:v.x,right:v.x}:null;case m5.DraggableRect:return m}},[d,m,v]),z=Pe.useRef(null),W=Pe.useCallback(()=>{const J=z.current;if(!J)return;const ee=P.current.x*$.current.x,fe=P.current.y*$.current.y;J.scrollBy(ee,fe)},[]),X=Pe.useMemo(()=>b===_M.TreeOrder?[..._].reverse():_,[b,_]);Pe.useEffect(()=>{if(!g||!_.length||!q){B();return}for(const J of X){if(f?.(J)===!1)continue;const ee=_.indexOf(J),fe=S[ee];if(!fe)continue;const{direction:be,speed:je}=Vfr(J,fe,q,u,w);for(const _e of["x","y"])N[_e][be[_e]]||(je[_e]=0,be[_e]=0);if(je.x>0||je.y>0){B(),z.current=J,k(W,x),P.current=je,$.current=be;return}}P.current={x:0,y:0},$.current={x:0,y:0},B()},[u,W,f,B,g,x,JSON.stringify(q),JSON.stringify(N),k,_,X,S,JSON.stringify(w)])}const ahr={x:{[ho.Backward]:!1,[ho.Forward]:!1},y:{[ho.Backward]:!1,[ho.Forward]:!1}};function lhr(a){let{delta:u,disabled:d}=a;const f=gie(u);return ON(m=>{if(d||!f||!m)return ahr;const g={x:Math.sign(u.x-f.x),y:Math.sign(u.y-f.y)};return{x:{[ho.Backward]:m.x[ho.Backward]||g.x===-1,[ho.Forward]:m.x[ho.Forward]||g.x===1},y:{[ho.Backward]:m.y[ho.Backward]||g.y===-1,[ho.Forward]:m.y[ho.Forward]||g.y===1}}},[d,u,f])}function uhr(a,u){const d=u!=null?a.get(u):void 0,f=d?d.node.current:null;return ON(m=>{var g;return u==null?null:(g=f??m)!=null?g:null},[f,u])}function chr(a,u){return Pe.useMemo(()=>a.reduce((d,f)=>{const{sensor:m}=f,g=m.activators.map(x=>({eventName:x.eventName,handler:u(x.handler,f)}));return[...d,...g]},[]),[a,u])}var q5;(function(a){a[a.Always=0]="Always",a[a.BeforeDragging=1]="BeforeDragging",a[a.WhileDragging=2]="WhileDragging"})(q5||(q5={}));var bie;(function(a){a.Optimized="optimized"})(bie||(bie={}));const P9e=new Map;function dhr(a,u){let{dragging:d,dependencies:f,config:m}=u;const[g,x]=Pe.useState(null),{frequency:b,measure:v,strategy:_}=m,S=Pe.useRef(a),R=P(),w=$5(R),N=Pe.useCallback(function($){$===void 0&&($=[]),!w.current&&x(q=>q===null?$:q.concat($.filter(z=>!q.includes(z))))},[w]),k=Pe.useRef(null),B=ON($=>{if(R&&!d)return P9e;if(!$||$===P9e||S.current!==a||g!=null){const q=new Map;for(let z of a){if(!z)continue;if(g&&g.length>0&&!g.includes(z.id)&&z.rect.current){q.set(z.id,z.rect.current);continue}const W=z.node.current,X=W?new Toe(v(W),W):null;z.rect.current=X,X&&q.set(z.id,X)}return q}return $},[a,g,d,R,v]);return Pe.useEffect(()=>{S.current=a},[a]),Pe.useEffect(()=>{R||N()},[d,R]),Pe.useEffect(()=>{g&&g.length>0&&x(null)},[JSON.stringify(g)]),Pe.useEffect(()=>{R||typeof b!="number"||k.current!==null||(k.current=setTimeout(()=>{N(),k.current=null},b))},[b,R,N,...f]),{droppableRects:B,measureDroppableContainers:N,measuringScheduled:g!=null};function P(){switch(_){case q5.Always:return!1;case q5.BeforeDragging:return d;default:return!d}}}function NBe(a,u){return ON(d=>a?d||(typeof u=="function"?u(a):a):null,[u,a])}function fhr(a,u){return NBe(a,u)}function hhr(a){let{callback:u,disabled:d}=a;const f=Aoe(u),m=Pe.useMemo(()=>{if(d||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:g}=window;return new g(f)},[f,d]);return Pe.useEffect(()=>()=>m?.disconnect(),[m]),m}function j$(a){let{callback:u,disabled:d}=a;const f=Aoe(u),m=Pe.useMemo(()=>{if(d||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:g}=window;return new g(f)},[d]);return Pe.useEffect(()=>()=>m?.disconnect(),[m]),m}function phr(a){return new Toe(WS(a),a)}function j9e(a,u,d){u===void 0&&(u=phr);const[f,m]=Pe.useState(null);function g(){m(v=>{if(!a)return null;if(a.isConnected===!1){var _;return(_=v??d)!=null?_:null}const S=u(a);return JSON.stringify(v)===JSON.stringify(S)?v:S})}const x=hhr({callback(v){if(a)for(const _ of v){const{type:S,target:R}=_;if(S==="childList"&&R instanceof HTMLElement&&R.contains(a)){g();break}}}}),b=j$({callback:g});return yh(()=>{g(),a?(b?.observe(a),x?.observe(document.body,{childList:!0,subtree:!0})):(b?.disconnect(),x?.disconnect())},[a]),f}function mhr(a){const u=NBe(a);return EBe(a,u)}const F9e=[];function ghr(a){const u=Pe.useRef(a),d=ON(f=>a?f&&f!==F9e&&a&&u.current&&a.parentNode===u.current.parentNode?f:Roe(a):F9e,[a]);return Pe.useEffect(()=>{u.current=a},[a]),d}function xhr(a){const[u,d]=Pe.useState(null),f=Pe.useRef(a),m=Pe.useCallback(g=>{const x=tne(g.target);x&&d(b=>b?(b.set(x,yie(x)),new Map(b)):null)},[]);return Pe.useEffect(()=>{const g=f.current;if(a!==g){x(g);const b=a.map(v=>{const _=tne(v);return _?(_.addEventListener("scroll",m,{passive:!0}),[_,yie(_)]):null}).filter(v=>v!=null);d(b.length?new Map(b):null),f.current=a}return()=>{x(a),x(g)};function x(b){b.forEach(v=>{const _=tne(v);_?.removeEventListener("scroll",m)})}},[m,a]),Pe.useMemo(()=>a.length?u?Array.from(u.values()).reduce((g,x)=>rS(g,x),Pd):TBe(a):Pd,[a,u])}function M9e(a,u){u===void 0&&(u=[]);const d=Pe.useRef(null);return Pe.useEffect(()=>{d.current=null},u),Pe.useEffect(()=>{const f=a!==Pd;f&&!d.current&&(d.current=a),!f&&d.current&&(d.current=null)},[a]),d.current?bM(a,d.current):Pd}function yhr(a){Pe.useEffect(()=>{if(!P$)return;const u=a.map(d=>{let{sensor:f}=d;return f.setup==null?void 0:f.setup()});return()=>{for(const d of u)d?.()}},a.map(u=>{let{sensor:d}=u;return d}))}function vhr(a,u){return Pe.useMemo(()=>a.reduce((d,f)=>{let{eventName:m,handler:g}=f;return d[m]=x=>{g(x,u)},d},{}),[a,u])}function DBe(a){return Pe.useMemo(()=>a?zfr(a):null,[a])}const $9e=[];function bhr(a,u){u===void 0&&(u=WS);const[d]=a,f=DBe(d?Tl(d):null),[m,g]=Pe.useState($9e);function x(){g(()=>a.length?a.map(v=>CBe(v)?f:new Toe(u(v),v)):$9e)}const b=j$({callback:x});return yh(()=>{b?.disconnect(),x(),a.forEach(v=>b?.observe(v))},[a]),m}function Ehr(a){if(!a)return null;if(a.children.length>1)return a;const u=a.children[0];return wN(u)?u:a}function _hr(a){let{measure:u}=a;const[d,f]=Pe.useState(null),m=Pe.useCallback(_=>{for(const{target:S}of _)if(wN(S)){f(R=>{const w=u(S);return R?{...R,width:w.width,height:w.height}:w});break}},[u]),g=j$({callback:m}),x=Pe.useCallback(_=>{const S=Ehr(_);g?.disconnect(),S&&g?.observe(S),f(S?u(S):null)},[u,g]),[b,v]=vM(x);return Pe.useMemo(()=>({nodeRef:b,rect:d,setRef:v}),[d,b,v])}const Shr=[{sensor:Ooe,options:{}},{sensor:OBe,options:{}}],Ahr={current:{}},PF={draggable:{measure:D9e},droppable:{measure:D9e,strategy:q5.WhileDragging,frequency:bie.Optimized},dragOverlay:{measure:WS}};class g5 extends Map{get(u){var d;return u!=null&&(d=super.get(u))!=null?d:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(u=>{let{disabled:d}=u;return!d})}getNodeFor(u){var d,f;return(d=(f=this.get(u))==null?void 0:f.node.current)!=null?d:void 0}}const Chr={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new g5,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:EM},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:PF,measureDroppableContainers:EM,windowRect:null,measuringScheduled:!1},Rhr={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:EM,draggableNodes:new Map,over:null,measureDroppableContainers:EM},F$=Pe.createContext(Rhr),kBe=Pe.createContext(Chr);function Thr(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new g5}}}function whr(a,u){switch(u.type){case qs.DragStart:return{...a,draggable:{...a.draggable,initialCoordinates:u.initialCoordinates,active:u.active}};case qs.DragMove:return a.draggable.active==null?a:{...a,draggable:{...a.draggable,translate:{x:u.coordinates.x-a.draggable.initialCoordinates.x,y:u.coordinates.y-a.draggable.initialCoordinates.y}}};case qs.DragEnd:case qs.DragCancel:return{...a,draggable:{...a.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case qs.RegisterDroppable:{const{element:d}=u,{id:f}=d,m=new g5(a.droppable.containers);return m.set(f,d),{...a,droppable:{...a.droppable,containers:m}}}case qs.SetDroppableDisabled:{const{id:d,key:f,disabled:m}=u,g=a.droppable.containers.get(d);if(!g||f!==g.key)return a;const x=new g5(a.droppable.containers);return x.set(d,{...g,disabled:m}),{...a,droppable:{...a.droppable,containers:x}}}case qs.UnregisterDroppable:{const{id:d,key:f}=u,m=a.droppable.containers.get(d);if(!m||f!==m.key)return a;const g=new g5(a.droppable.containers);return g.delete(d),{...a,droppable:{...a.droppable,containers:g}}}default:return a}}function Ohr(a){let{disabled:u}=a;const{active:d,activatorEvent:f,draggableNodes:m}=Pe.useContext(F$),g=gie(f),x=gie(d?.id);return Pe.useEffect(()=>{if(!u&&!f&&g&&x!=null){if(!Coe(g)||document.activeElement===g.target)return;const b=m.get(x);if(!b)return;const{activatorNode:v,node:_}=b;if(!v.current&&!_.current)return;requestAnimationFrame(()=>{for(const S of[v.current,_.current]){if(!S)continue;const R=yfr(S);if(R){R.focus();break}}})}},[f,u,m,x,g]),null}function Nhr(a,u){let{transform:d,...f}=u;return a!=null&&a.length?a.reduce((m,g)=>g({transform:m,...f}),d):d}function Dhr(a){return Pe.useMemo(()=>({draggable:{...PF.draggable,...a?.draggable},droppable:{...PF.droppable,...a?.droppable},dragOverlay:{...PF.dragOverlay,...a?.dragOverlay}}),[a?.draggable,a?.droppable,a?.dragOverlay])}function khr(a){let{activeNode:u,measure:d,initialRect:f,config:m=!0}=a;const g=Pe.useRef(!1),{x,y:b}=typeof m=="boolean"?{x:m,y:m}:m;yh(()=>{if(!x&&!b||!u){g.current=!1;return}if(g.current||!f)return;const _=u?.node.current;if(!_||_.isConnected===!1)return;const S=d(_),R=EBe(S,f);if(x||(R.x=0),b||(R.y=0),g.current=!0,Math.abs(R.x)>0||Math.abs(R.y)>0){const w=_Be(_);w&&w.scrollBy({top:R.y,left:R.x})}},[u,x,b,f,d])}const LBe=Pe.createContext({...Pd,scaleX:1,scaleY:1});var bx;(function(a){a[a.Uninitialized=0]="Uninitialized",a[a.Initializing=1]="Initializing",a[a.Initialized=2]="Initialized"})(bx||(bx={}));const Lhr=Pe.memo(function(u){var d,f,m,g;let{id:x,accessibility:b,autoScroll:v=!0,children:_,sensors:S=Shr,collisionDetection:R=jfr,measuring:w,modifiers:N,...k}=u;const B=Pe.useReducer(whr,void 0,Thr),[P,$]=B,[q,z]=Afr(),[W,X]=Pe.useState(bx.Uninitialized),J=W===bx.Initialized,{draggable:{active:ee,nodes:fe,translate:be},droppable:{containers:je}}=P,_e=ee!=null?fe.get(ee):null,De=Pe.useRef({initial:null,translated:null}),Xe=Pe.useMemo(()=>{var Lr;return ee!=null?{id:ee,data:(Lr=_e?.data)!=null?Lr:Ahr,rect:De}:null},[ee,_e]),ze=Pe.useRef(null),[te,Ne]=Pe.useState(null),[Ge,mt]=Pe.useState(null),Je=$5(k,Object.values(k)),rt=NN("DndDescribedBy",x),vt=Pe.useMemo(()=>je.getEnabled(),[je]),qe=Dhr(w),{droppableRects:ge,measureDroppableContainers:pe,measuringScheduled:ye}=dhr(vt,{dragging:J,dependencies:[be.x,be.y],config:qe.droppable}),we=uhr(fe,ee),Ie=Pe.useMemo(()=>Ge?xie(Ge):null,[Ge]),le=dn(),Se=fhr(we,qe.draggable.measure);khr({activeNode:ee!=null?fe.get(ee):null,config:le.layoutShiftCompensation,initialRect:Se,measure:qe.draggable.measure});const Le=j9e(we,qe.draggable.measure,Se),Ye=j9e(we?we.parentElement:null),ot=Pe.useRef({activatorEvent:null,active:null,activeNode:we,collisionRect:null,collisions:null,droppableRects:ge,draggableNodes:fe,draggingNode:null,draggingNodeRect:null,droppableContainers:je,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),He=je.getNodeFor((d=ot.current.over)==null?void 0:d.id),We=_hr({measure:qe.dragOverlay.measure}),bt=(f=We.nodeRef.current)!=null?f:we,_t=J?(m=We.rect)!=null?m:Le:null,Ft=!!(We.nodeRef.current&&We.rect),qt=mhr(Ft?null:Le),xt=DBe(bt?Tl(bt):null),Nt=ghr(J?He??we:null),Zt=bhr(Nt),qr=Nhr(N,{transform:{x:be.x-qt.x,y:be.y-qt.y,scaleX:1,scaleY:1},activatorEvent:Ge,active:Xe,activeNodeRect:Le,containerNodeRect:Ye,draggingNodeRect:_t,over:ot.current.over,overlayNodeRect:We.rect,scrollableAncestors:Nt,scrollableAncestorRects:Zt,windowRect:xt}),Xr=Ie?rS(Ie,be):null,ut=xhr(Nt),Ct=M9e(ut),er=M9e(ut,[Le]),Ar=rS(qr,Ct),yr=_t?$fr(_t,qr):null,Yr=Xe&&yr?R({active:Xe,collisionRect:yr,droppableRects:ge,droppableContainers:vt,pointerCoordinates:Xr}):null,Gt=Lfr(Yr,"id"),[Kr,sn]=Pe.useState(null),Yn=Ft?qr:rS(qr,er),Fe=Ffr(Yn,(g=Kr?.rect)!=null?g:null,Le),H=Pe.useRef(null),oe=Pe.useCallback((Lr,br)=>{let{sensor:Bi,options:Ki}=br;if(ze.current==null)return;const da=fe.get(ze.current);if(!da)return;const ss=Lr.nativeEvent,qi=new Bi({active:ze.current,activeNode:da,event:ss,options:Ki,context:ot,onAbort(Ts){if(!fe.get(Ts))return;const{onDragAbort:Ka}=Je.current,uu={id:Ts};Ka?.(uu),q({type:"onDragAbort",event:uu})},onPending(Ts,wl,Ka,uu){if(!fe.get(Ts))return;const{onDragPending:Gx}=Je.current,qd={id:Ts,constraint:wl,initialCoordinates:Ka,offset:uu};Gx?.(qd),q({type:"onDragPending",event:qd})},onStart(Ts){const wl=ze.current;if(wl==null)return;const Ka=fe.get(wl);if(!Ka)return;const{onDragStart:uu}=Je.current,cu={activatorEvent:ss,active:{id:wl,data:Ka.data,rect:De}};jv.unstable_batchedUpdates(()=>{uu?.(cu),X(bx.Initializing),$({type:qs.DragStart,initialCoordinates:Ts,active:wl}),q({type:"onDragStart",event:cu}),Ne(H.current),mt(ss)})},onMove(Ts){$({type:qs.DragMove,coordinates:Ts})},onEnd:Tr(qs.DragEnd),onCancel:Tr(qs.DragCancel)});H.current=qi;function Tr(Ts){return async function(){const{active:Ka,collisions:uu,over:cu,scrollAdjustedTranslate:Gx}=ot.current;let qd=null;if(Ka&&Gx){const{cancelDrop:Wx}=Je.current;qd={activatorEvent:ss,active:Ka,collisions:uu,delta:Gx,over:cu},Ts===qs.DragEnd&&typeof Wx=="function"&&await Promise.resolve(Wx(qd))&&(Ts=qs.DragCancel)}ze.current=null,jv.unstable_batchedUpdates(()=>{$({type:Ts}),X(bx.Uninitialized),sn(null),Ne(null),mt(null),H.current=null;const Wx=Ts===qs.DragEnd?"onDragEnd":"onDragCancel";if(qd){const VS=Je.current[Wx];VS?.(qd),q({type:Wx,event:qd})}})}}},[fe]),$e=Pe.useCallback((Lr,br)=>(Bi,Ki)=>{const da=Bi.nativeEvent,ss=fe.get(Ki);if(ze.current!==null||!ss||da.dndKit||da.defaultPrevented)return;const qi={active:ss};Lr(Bi,br.options,qi)===!0&&(da.dndKit={capturedBy:br.sensor},ze.current=Ki,oe(Bi,br))},[fe,oe]),At=chr(S,$e);yhr(S),yh(()=>{Le&&W===bx.Initializing&&X(bx.Initialized)},[Le,W]),Pe.useEffect(()=>{const{onDragMove:Lr}=Je.current,{active:br,activatorEvent:Bi,collisions:Ki,over:da}=ot.current;if(!br||!Bi)return;const ss={active:br,activatorEvent:Bi,collisions:Ki,delta:{x:Ar.x,y:Ar.y},over:da};jv.unstable_batchedUpdates(()=>{Lr?.(ss),q({type:"onDragMove",event:ss})})},[Ar.x,Ar.y]),Pe.useEffect(()=>{const{active:Lr,activatorEvent:br,collisions:Bi,droppableContainers:Ki,scrollAdjustedTranslate:da}=ot.current;if(!Lr||ze.current==null||!br||!da)return;const{onDragOver:ss}=Je.current,qi=Ki.get(Gt),Tr=qi&&qi.rect.current?{id:qi.id,rect:qi.rect.current,data:qi.data,disabled:qi.disabled}:null,Ts={active:Lr,activatorEvent:br,collisions:Bi,delta:{x:da.x,y:da.y},over:Tr};jv.unstable_batchedUpdates(()=>{sn(Tr),ss?.(Ts),q({type:"onDragOver",event:Ts})})},[Gt]),yh(()=>{ot.current={activatorEvent:Ge,active:Xe,activeNode:we,collisionRect:yr,collisions:Yr,droppableRects:ge,draggableNodes:fe,draggingNode:bt,draggingNodeRect:_t,droppableContainers:je,over:Kr,scrollableAncestors:Nt,scrollAdjustedTranslate:Ar},De.current={initial:_t,translated:yr}},[Xe,we,Yr,yr,fe,bt,_t,ge,je,Kr,Nt,Ar]),ohr({...le,delta:be,draggingRect:yr,pointerCoordinates:Xr,scrollableAncestors:Nt,scrollableAncestorRects:Zt});const tr=Pe.useMemo(()=>({active:Xe,activeNode:we,activeNodeRect:Le,activatorEvent:Ge,collisions:Yr,containerNodeRect:Ye,dragOverlay:We,draggableNodes:fe,droppableContainers:je,droppableRects:ge,over:Kr,measureDroppableContainers:pe,scrollableAncestors:Nt,scrollableAncestorRects:Zt,measuringConfiguration:qe,measuringScheduled:ye,windowRect:xt}),[Xe,we,Le,Ge,Yr,Ye,We,fe,je,ge,Kr,pe,Nt,Zt,qe,ye,xt]),Rr=Pe.useMemo(()=>({activatorEvent:Ge,activators:At,active:Xe,activeNodeRect:Le,ariaDescribedById:{draggable:rt},dispatch:$,draggableNodes:fe,over:Kr,measureDroppableContainers:pe}),[Ge,At,Xe,Le,$,rt,fe,Kr,pe]);return Pe.createElement(bBe.Provider,{value:z},Pe.createElement(F$.Provider,{value:Rr},Pe.createElement(kBe.Provider,{value:tr},Pe.createElement(LBe.Provider,{value:Fe},_)),Pe.createElement(Ohr,{disabled:b?.restoreFocus===!1})),Pe.createElement(Tfr,{...b,hiddenTextDescribedById:rt}));function dn(){const Lr=te?.autoScrollEnabled===!1,br=typeof v=="object"?v.enabled===!1:v===!1,Bi=J&&!Lr&&!br;return typeof v=="object"?{...v,enabled:Bi}:{enabled:Bi}}}),Ihr=Pe.createContext(null),B9e="button",Phr="Draggable";function jhr(a){let{id:u,data:d,disabled:f=!1,attributes:m}=a;const g=NN(Phr),{activators:x,activatorEvent:b,active:v,activeNodeRect:_,ariaDescribedById:S,draggableNodes:R,over:w}=Pe.useContext(F$),{role:N=B9e,roleDescription:k="draggable",tabIndex:B=0}=m??{},P=v?.id===u,$=Pe.useContext(P?LBe:Ihr),[q,z]=vM(),[W,X]=vM(),J=vhr(x,u),ee=$5(d);yh(()=>(R.set(u,{id:u,key:g,node:q,activatorNode:W,data:ee}),()=>{const be=R.get(u);be&&be.key===g&&R.delete(u)}),[R,u]);const fe=Pe.useMemo(()=>({role:N,tabIndex:B,"aria-disabled":f,"aria-pressed":P&&N===B9e?!0:void 0,"aria-roledescription":k,"aria-describedby":S.draggable}),[f,N,B,P,k,S.draggable]);return{active:v,activatorEvent:b,activeNodeRect:_,attributes:fe,isDragging:P,listeners:f?void 0:J,node:q,over:w,setNodeRef:z,setActivatorNodeRef:X,transform:$}}function Fhr(){return Pe.useContext(kBe)}const Mhr="Droppable",$hr={timeout:25};function Bhr(a){let{data:u,disabled:d=!1,id:f,resizeObserverConfig:m}=a;const g=NN(Mhr),{active:x,dispatch:b,over:v,measureDroppableContainers:_}=Pe.useContext(F$),S=Pe.useRef({disabled:d}),R=Pe.useRef(!1),w=Pe.useRef(null),N=Pe.useRef(null),{disabled:k,updateMeasurementsFor:B,timeout:P}={...$hr,...m},$=$5(B??f),q=Pe.useCallback(()=>{if(!R.current){R.current=!0;return}N.current!=null&&clearTimeout(N.current),N.current=setTimeout(()=>{_(Array.isArray($.current)?$.current:[$.current]),N.current=null},P)},[P]),z=j$({callback:q,disabled:k||!x}),W=Pe.useCallback((fe,be)=>{z&&(be&&(z.unobserve(be),R.current=!1),fe&&z.observe(fe))},[z]),[X,J]=vM(W),ee=$5(u);return Pe.useEffect(()=>{!z||!X.current||(z.disconnect(),R.current=!1,z.observe(X.current))},[X,z]),Pe.useEffect(()=>(b({type:qs.RegisterDroppable,element:{id:f,key:g,disabled:d,node:X,rect:w,data:ee}}),()=>b({type:qs.UnregisterDroppable,key:g,id:f})),[f]),Pe.useEffect(()=>{d!==S.current.disabled&&(b({type:qs.SetDroppableDisabled,id:f,key:g,disabled:d}),S.current.disabled=d)},[f,g,d,b]),{active:x,rect:w,isOver:v?.id===f,node:X,over:v,setNodeRef:J}}function Noe(a,u,d){const f=a.slice();return f.splice(d<0?f.length+d:d,0,f.splice(u,1)[0]),f}function qhr(a,u){return a.reduce((d,f,m)=>{const g=u.get(f);return g&&(d[m]=g),d},Array(a.length))}function iF(a){return a!==null&&a>=0}function Uhr(a,u){if(a===u)return!0;if(a.length!==u.length)return!1;for(let d=0;d<a.length;d++)if(a[d]!==u[d])return!1;return!0}function zhr(a){return typeof a=="boolean"?{draggable:a,droppable:a}:a}const IBe=a=>{let{rects:u,activeIndex:d,overIndex:f,index:m}=a;const g=Noe(u,f,d),x=u[m],b=g[m];return!b||!x?null:{x:b.left-x.left,y:b.top-x.top,scaleX:b.width/x.width,scaleY:b.height/x.height}},PBe="Sortable",jBe=Pe.createContext({activeIndex:-1,containerId:PBe,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:IBe,disabled:{draggable:!1,droppable:!1}});function Hhr(a){let{children:u,id:d,items:f,strategy:m=IBe,disabled:g=!1}=a;const{active:x,dragOverlay:b,droppableRects:v,over:_,measureDroppableContainers:S}=Fhr(),R=NN(PBe,d),w=b.rect!==null,N=Pe.useMemo(()=>f.map(J=>typeof J=="object"&&"id"in J?J.id:J),[f]),k=x!=null,B=x?N.indexOf(x.id):-1,P=_?N.indexOf(_.id):-1,$=Pe.useRef(N),q=!Uhr(N,$.current),z=P!==-1&&B===-1||q,W=zhr(g);yh(()=>{q&&k&&S(N)},[q,N,k,S]),Pe.useEffect(()=>{$.current=N},[N]);const X=Pe.useMemo(()=>({activeIndex:B,containerId:R,disabled:W,disableTransforms:z,items:N,overIndex:P,useDragOverlay:w,sortedRects:qhr(N,v),strategy:m}),[B,R,W.draggable,W.droppable,z,N,P,v,w,m]);return Pe.createElement(jBe.Provider,{value:X},u)}const Ghr=a=>{let{id:u,items:d,activeIndex:f,overIndex:m}=a;return Noe(d,f,m).indexOf(u)},Whr=a=>{let{containerId:u,isSorting:d,wasDragging:f,index:m,items:g,newIndex:x,previousItems:b,previousContainerId:v,transition:_}=a;return!_||!f||b!==g&&m===x?!1:d?!0:x!==m&&u===v},Vhr={duration:200,easing:"ease"},FBe="transform",Qhr=B5.Transition.toString({property:FBe,duration:0,easing:"linear"}),Yhr={roleDescription:"sortable"};function Khr(a){let{disabled:u,index:d,node:f,rect:m}=a;const[g,x]=Pe.useState(null),b=Pe.useRef(d);return yh(()=>{if(!u&&d!==b.current&&f.current){const v=m.current;if(v){const _=WS(f.current,{ignoreTransform:!0}),S={x:v.left-_.left,y:v.top-_.top,scaleX:v.width/_.width,scaleY:v.height/_.height};(S.x||S.y)&&x(S)}}d!==b.current&&(b.current=d)},[u,d,f,m]),Pe.useEffect(()=>{g&&x(null)},[g]),g}function Xhr(a){let{animateLayoutChanges:u=Whr,attributes:d,disabled:f,data:m,getNewIndex:g=Ghr,id:x,strategy:b,resizeObserverConfig:v,transition:_=Vhr}=a;const{items:S,containerId:R,activeIndex:w,disabled:N,disableTransforms:k,sortedRects:B,overIndex:P,useDragOverlay:$,strategy:q}=Pe.useContext(jBe),z=Jhr(f,N),W=S.indexOf(x),X=Pe.useMemo(()=>({sortable:{containerId:R,index:W,items:S},...m}),[R,m,W,S]),J=Pe.useMemo(()=>S.slice(S.indexOf(x)),[S,x]),{rect:ee,node:fe,isOver:be,setNodeRef:je}=Bhr({id:x,data:X,disabled:z.droppable,resizeObserverConfig:{updateMeasurementsFor:J,...v}}),{active:_e,activatorEvent:De,activeNodeRect:Xe,attributes:ze,setNodeRef:te,listeners:Ne,isDragging:Ge,over:mt,setActivatorNodeRef:Je,transform:rt}=jhr({id:x,data:X,attributes:{...Yhr,...d},disabled:z.draggable}),vt=pfr(je,te),qe=!!_e,ge=qe&&!k&&iF(w)&&iF(P),pe=!$&&Ge,ye=pe&&ge?rt:null,Ie=ge?ye??(b??q)({rects:B,activeNodeRect:Xe,activeIndex:w,overIndex:P,index:W}):null,le=iF(w)&&iF(P)?g({id:x,items:S,activeIndex:w,overIndex:P}):W,Se=_e?.id,Le=Pe.useRef({activeId:Se,items:S,newIndex:le,containerId:R}),Ye=S!==Le.current.items,ot=u({active:_e,containerId:R,isDragging:Ge,isSorting:qe,id:x,index:W,items:S,newIndex:Le.current.newIndex,previousItems:Le.current.items,previousContainerId:Le.current.containerId,transition:_,wasDragging:Le.current.activeId!=null}),He=Khr({disabled:!ot,index:W,node:fe,rect:ee});return Pe.useEffect(()=>{qe&&Le.current.newIndex!==le&&(Le.current.newIndex=le),R!==Le.current.containerId&&(Le.current.containerId=R),S!==Le.current.items&&(Le.current.items=S)},[qe,le,R,S]),Pe.useEffect(()=>{if(Se===Le.current.activeId)return;if(Se!=null&&Le.current.activeId==null){Le.current.activeId=Se;return}const bt=setTimeout(()=>{Le.current.activeId=Se},50);return()=>clearTimeout(bt)},[Se]),{active:_e,activeIndex:w,attributes:ze,data:X,rect:ee,index:W,newIndex:le,items:S,isOver:be,isSorting:qe,isDragging:Ge,listeners:Ne,node:fe,overIndex:P,over:mt,setNodeRef:vt,setActivatorNodeRef:Je,setDroppableNodeRef:je,setDraggableNodeRef:te,transform:He??Ie,transition:We()};function We(){if(He||Ye&&Le.current.newIndex===W)return Qhr;if(!(pe&&!Coe(De)||!_)&&(qe||ot))return B5.Transition.toString({..._,property:FBe})}}function Jhr(a,u){var d,f;return typeof a=="boolean"?{draggable:a,droppable:!1}:{draggable:(d=a?.draggable)!=null?d:u.draggable,droppable:(f=a?.droppable)!=null?f:u.droppable}}Xn.Down,Xn.Right,Xn.Up,Xn.Left;function DN({onClick:a}){return D.jsxRuntimeExports.jsx($i,{icon:"clear",variant:"flat",size:"compact",tooltip:"Remove",onClick:a})}const f0={main:{display:"mly78zum5",alignItems:"mly6s0dn4",justifyContent:"mly1nhvcw1",gap:"mly1jnr06f",rowGap:null,columnGap:null,cursor:"mly1ypdohk","--mlyvpnzvp":"mly11ogjb6 mly157rht3",$$css:!0},hoverActions:{display:"mly2b4tyj",flexShrink:"mly2lah0s",$$css:!0},hoverOpen:{display:"mly3nfvp2",$$css:!0}},Al={content:{background:"mly1b4wx6v",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,borderRadius:"mly12oqio5",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,borderWidth:"mlymkeg23",borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,boxShadow:"mlyx2l43u",fontFamily:"mly6icuqf",margin:"mlykib98w",marginInline:null,marginInlineStart:null,marginLeft:null,marginInlineEnd:null,marginRight:null,marginBlock:null,marginTop:null,marginBottom:null,maxHeight:"mly3d5gib",display:"mly78zum5",flexDirection:"mlydt5ytf",$$css:!0},item:{alignItems:"mly6s0dn4",color:"mly1q8pm5h mlyqweix6",padding:"mlye8ttls",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,cursor:"mlyt0e3qv",userSelect:"mly87ps6o",display:"mly78zum5",justifyContent:"mly1qughib",borderRadius:"mly18zih8k",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,$$css:!0},clickable:{backgroundColor:"mlyk1j4u7",$$css:!0},label:{display:"mly78zum5",alignItems:"mly6s0dn4",gap:"mly167g77z",rowGap:null,columnGap:null,$$css:!0},tooltip:{$$css:!0}},q9e='#" ',MBe=a=>{const u=a.filter(d=>d.value.startsWith(q9e)).map(d=>d.value.slice(q9e.length).trim());if(u.length)return u.join(`
|
|
2879
|
-
`)},Zhr="#NO_UI",Doe=a=>!!a.find(d=>d.value.startsWith(Zhr));function U9e(a){return a.kind==="join"?3:a.kind==="view"?2:a.kind==="dimension"?1:0}function epr(a){return a.sort((u,d)=>{const f=U9e(u),m=U9e(d);return f===m?u.name.localeCompare(d.name):m-f})}const z9e=["fieldName","fieldPath","fieldValue","fieldType","fieldRange","weight"];function $Be(a){return new Set([...z9e,...a.schema.fields.map(d=>d.name)]).size===z9e.length}function BBe(a){return a instanceof Zr.ASTArrowQueryDefinition?a.view:a.definition}function eb(a){return a?BBe(a).getInputSchema():{fields:[]}}function kx(a){return!Doe(a.annotations??[])}function koe(a,u,d=[]){if(!a.find(m=>m.name===u))return u;if(d.length){const m=[...d];for(;m.length;)if(u=`${m.pop()} ${u}`,!a.find(x=>x.name===u))return u}let f=2;for(;a.find(m=>m.name===`${u} ${f}`);)f++;return`${u} ${f}`}function tpr({field:a}){if(a.kind==="view")return D.jsxRuntimeExports.jsx(Ex,{label:"view",icon:"view_filled",color:"purple",customStyle:sF.noBackground});if(a.kind==="dimension")return D.jsxRuntimeExports.jsx(Ex,{label:"dimension",icon:IF(a),color:"cyan",customStyle:sF.noBackground});if(a.kind==="measure")return D.jsxRuntimeExports.jsx(Ex,{label:"measure",icon:IF(a),color:"green",customStyle:sF.noBackground});if(a.kind==="join")return D.jsxRuntimeExports.jsx(Ex,{label:"join",icon:IF(a),color:"gray",customStyle:sF.noBackground})}const sF={noBackground:{backgroundColor:"mlyjbqb8w",$$css:!0}};function qBe({rootQuery:a,view:u}){const{setQuery:d}=Pe.useContext(ai),f=u.getTag(),m=Eoe(f)??"table",g=v=>{u.removeTagProperty([m]),u.setTagProperty([v]),d?.(a.build())},x=mBe.map(v=>({icon:D.jsxRuntimeExports.jsx(An,{name:`viz_${v}`}),label:UBe(v),value:v,onClick:()=>g(v)})),b=[D.jsxRuntimeExports.jsx(d$,{customStyle:rpr.first,icon:`viz_${m}`,value:m,items:x,onChange:v=>g(v)},"first")];return D.jsxRuntimeExports.jsx(hN,{children:b})}const rpr={first:{flexGrow:"mly1iyjqo2",justifyContent:"mlylqzeqv",$$css:!0}};function UBe(a){return a.split("_").map(u=>u.charAt(0).toUpperCase()+u.slice(1)).join(" ")}function npr({annotations:a}){const{tag:u}=qYt.Tag.fromTagLines(a.map(f=>f.value)),d=Eoe(u)??"table";return D.jsxRuntimeExports.jsx($s,{label:UBe(d),icon:`viz_${d}`})}function Loe({viewInfo:a,isCompact:u,style:d}){const f=a.schema.fields.filter(m=>m.kind==="dimension");return D.jsxRuntimeExports.jsx("div",{...Lt.props(Eie.attributeTableContainer,d),children:D.jsxRuntimeExports.jsx("table",{className:"mly1mwwwfo mly9f619 mlyh8yej3 mly5yr21d",children:D.jsxRuntimeExports.jsxs("tbody",{children:[D.jsxRuntimeExports.jsx(H9e,{attribute:"chart type",children:D.jsxRuntimeExports.jsx("div",{className:"mly1rg5ohu",children:D.jsxRuntimeExports.jsx(npr,{annotations:a.annotations||[]})})}),D.jsxRuntimeExports.jsx(H9e,{attribute:"output",children:f.map(m=>D.jsxRuntimeExports.jsx("span",{children:D.jsxRuntimeExports.jsx(hS,{field:m,size:u?"compact":"default"})},`${m.kind}::${m.name}`))})]})})})}function H9e({attribute:a,children:u}){return D.jsxRuntimeExports.jsxs("tr",{className:"mlydpxx8g",children:[D.jsxRuntimeExports.jsx("td",{...Lt.props(Eie.attributeTableKeyCell,Fr.supporting),children:D.jsxRuntimeExports.jsx("div",{...Lt.props(Eie.attributeTableKeyCellContent,Fr.supporting),children:a})}),D.jsxRuntimeExports.jsx("td",{className:"mly78zum5 mly1a02dak mly195vfkc",children:u})]})}const Eie={attributeTableContainer:{padding:"mlye8ttls",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,gap:"mly167g77z",rowGap:null,columnGap:null,borderRadius:"mly1q4ynmn",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,backgroundColor:"mly12nb83b",boxSizing:"mly9f619",width:"mlyh8yej3",height:"mly1m3v4wt",overflow:"mlyysyzu8",overflowX:null,overflowY:null,$$css:!0},attributeTableKeyCell:{whiteSpace:"mlyuxw1ft",width:"mly1f1nlb9",verticalAlign:"mly16dsc37",$$css:!0},attributeTableKeyCellContent:{height:"mly1fgtraw",display:"mly78zum5",alignItems:"mly6s0dn4",$$css:!0}};function ipr({field:a,path:u}){const{topValues:d}=Pe.useContext(ai),f=[...u,a.name].join("."),m=d?.find(g=>g.fieldName===f);return m?D.jsxRuntimeExports.jsxs("div",{className:"mly12nb83b mly1iorvi4 mlyjkvuk6 mly163pfp mlyy13l1i mly12oqio5",children:[D.jsxRuntimeExports.jsx("div",{className:"mly117nqv4",children:"Top Values"}),m.values.slice(0,6).map(g=>D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1qughib mly883omv mly6s0dn4",children:[D.jsxRuntimeExports.jsx("div",{children:D.jsxRuntimeExports.jsx("div",{className:"mlylyipyv mly6mezaz mlyb3r6kr mlyuxw1ft",children:g.fieldValue===null?D.jsxRuntimeExports.jsx("span",{children:"∅"}):g.fieldValue})}),D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mly883omv mly13a6bvl mly6s0dn4 mlyb3r6kr mly2lah0s mly9dwj6z",children:spr(g.weight)})]},g.fieldValue))]}):null}function spr(a){return a===null?"∅":a<1e3?a.toLocaleString():a<1e4?(a/1e3).toFixed(1)+"K":a<1e6?Math.floor(a/1e3).toLocaleString()+"K":a<1e7?(a/1e6).toFixed(1)+"M":Math.floor(a/1e3).toLocaleString()+"M"}function G9e({children:a,ref:u,customStyle:d,isTooltipContent:f=!1,...m}){const g=a.split(/((?:http|https):\/\/\S*)\b/),x=g.length>1,b=g.map((v,_)=>v.match(/^(http|https):/)?D.jsxRuntimeExports.jsx("a",{href:v,...{0:{},1:{className:"mly198oq2i"}}[!!f<<0],children:v},_):v);return D.jsxRuntimeExports.jsx("div",{ref:u,...Lt.props(x&&W9e.preWrap,x&&W9e.breakWord,d),...m,children:b})}const W9e={preWrap:{whiteSpace:"mly126k92a",$$css:!0},breakWord:{wordWrap:"mly1vvkbs",$$css:!0}};function zBe({text:a,containerRef:u,align:d="center",side:f="top"}){const m=Pe.useRef(null),[g,x]=Y.useState(!1),[b,v]=Y.useState(!1),_=()=>(m.current&&m.current.scrollHeight>m.current.clientHeight)??!1;return D.jsxRuntimeExports.jsxs(oN,{open:(g||b)&&_(),children:[D.jsxRuntimeExports.jsx(aN,{asChild:!0,children:D.jsxRuntimeExports.jsx(G9e,{ref:m,onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),onPointerMove:S=>S.preventDefault(),customStyle:[Fr.supporting,opr.text],children:a})}),D.jsxRuntimeExports.jsx(lN,{container:u?.current,children:D.jsxRuntimeExports.jsx(uN,{side:f,align:d,children:D.jsxRuntimeExports.jsx(G9e,{onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),isTooltipContent:!0,customStyle:[Fr.body,g0.default],children:a})})})]})}const opr={text:{overflow:"mlyb3r6kr",overflowX:null,overflowY:null,display:"mly104kibb","-webkit-line-clamp":"mly1gzmk7r","-webkit-box-orient":"mly1ua5tub",$$css:!0}};function HBe({children:a,customStyle:u}){return D.jsxRuntimeExports.jsx("div",{...Lt.props(apr.container,Fr.body,u),children:a})}const apr={container:{boxShadow:"mly5n1uv4",backgroundColor:"mly12peec7",borderRadius:"mly4pepcl",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,padding:"mlyc7ga6q",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,display:"mly78zum5",flexDirection:"mlydt5ytf",gap:"mly167g77z",rowGap:null,columnGap:null,$$css:!0}};function SM({field:a,path:u}){const{source:d}=Y.useContext(ai),f=Y.useRef(null),m=[d?.name??"",...u].join(" > "),x=MBe(a.annotations??[])??"";let b=null;return a.kind==="view"?b=D.jsxRuntimeExports.jsx(Loe,{viewInfo:a,isCompact:!0,style:oF.viewAttributeTable}):a.kind==="dimension"&&(b=D.jsxRuntimeExports.jsx(ipr,{field:a,path:u})),D.jsxRuntimeExports.jsxs(HBe,{customStyle:oF.container,children:[D.jsxRuntimeExports.jsxs("div",{ref:f,children:[D.jsxRuntimeExports.jsx("div",{className:"mly12nagc",children:D.jsxRuntimeExports.jsx(tpr,{field:a})}),D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.supporting,oF.path),children:m}),D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.emphasized,oF.title),children:a.name}),x&&D.jsxRuntimeExports.jsx(zBe,{text:x,containerRef:f})]}),b&&D.jsxRuntimeExports.jsx("div",{children:b})]})}const oF={container:{width:"mlybl57os",maxHeight:"mlyq3t0pi",$$css:!0},path:{color:"mly9dwj6z",$$css:!0},viewAttributeTable:{height:"mlyn866dk",$$css:!0},title:{overflow:"mlyb3r6kr",overflowX:null,overflowY:null,textOverflow:"mlylyipyv",$$css:!0}},Ri={filterDialog:{display:"mly78zum5",flexDirection:"mlydt5ytf",padding:"mlye8ttls",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,minWidth:"mlyytlacd",maxWidth:"mly1pdpmub",gap:"mly167g77z",rowGap:null,columnGap:null,minHeight:"mly2lwn1j",maxHeight:"mly3d5gib",$$css:!0},filterDialogHeader:{fontWeight:"mly117nqv4",$$css:!0},filterTypeDropdown:{width:"mlyh8yej3",$$css:!0},buttonGroup:{display:"mly78zum5",gap:"mly167g77z",rowGap:null,columnGap:null,$$css:!0},editor:{display:"mly78zum5",flexDirection:"mlydt5ytf",gap:"mly167g77z",rowGap:null,columnGap:null,minHeight:"mly2lwn1j",$$css:!0},editorRow:{display:"mlyrvj5dj",gridAutoFlow:"mly1mt1orb",gap:"mly167g77z",rowGap:null,columnGap:null,$$css:!0},editorCell:{flexGrow:"mly1iyjqo2",$$css:!0},input:{border:"mly2yh2zd",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,color:"mlyizdh9v",padding:"mly9cpjcd",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,borderRadius:"mly1sxf85j",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,minWidth:"mlygc0pbm",$$css:!0}};function lpr(a){return a.operator==="null"&&a.not?"-null":a.operator}function upr({filter:a,setFilter:u}){const d=lpr(a),f=m=>{u(m==="-null"?{operator:"null",not:!0}:{operator:m})};return D.jsxRuntimeExports.jsx("div",{...Lt.props(Ri.editor),children:D.jsxRuntimeExports.jsx(Hx,{value:d,onChange:f,options:[{value:"true",label:"is true"},{value:"false",label:"is false"},{value:"null",label:"is null"},{value:"-null",label:"is not null"},{value:"false_or_null",label:"is false or null"}],customStyle:Ri.filterTypeDropdown})})}function GBe(a,u){Pe.useEffect(()=>{const d=Array.isArray(a)?a:[a];let f=!1;const m=(v,_)=>!v.current||_.target instanceof Element&&v.current.contains(_.target),g=v=>d.some(_=>m(_,v)),x=v=>{!f||g(v)||(u(v),f=!1)},b=v=>{g(v)||(f=!0)};return document.addEventListener("mouseup",x),document.addEventListener("mousedown",b),()=>{document.removeEventListener("mouseup",x),document.removeEventListener("mousedown",b)}},[a,u])}const WBe=({values:a,setValues:u,autoFocus:d,placeholder:f,type:m="text",value:g,setValue:x,focusElement:b,color:v=FS,customStyle:_})=>{const[S,R]=Pe.useState(""),[w,N]=Pe.useState(!1),k=Pe.useRef(null),B=Pe.useRef(null),[P,$]=Pe.useState(void 0),q=Pe.useRef([]),z=g||S,W=x||R,X=Pe.useCallback(be=>{var je;const _e=[...a];_e.splice(be,1),u(_e),P===0?a.length===1?($(void 0),(je=k.current)==null||je.focus()):$(0):$(be-1)},[P,u,a]),J=Pe.useMemo(()=>(q.current=new Array(a.length),a.map((be,je)=>D.jsxRuntimeExports.jsx(cpr,{color:v,onClick:()=>{$(je)},onDelete:()=>X(je),forwardRef:_e=>{q.current[je]=_e},children:be},be))),[v,X,a]);Pe.useEffect(()=>{var be;P!==void 0&&((be=q.current[P])==null||be.focus())},[J,P]);const ee=be=>{var je,_e;be.key==="Backspace"?P!==void 0&&X(P):be.key==="ArrowRight"?P===a.length-1?($(void 0),(je=k.current)==null||je.focus()):P!==void 0&&$(P+1):be.key==="ArrowLeft"?P!==void 0&&P>0&&$(P-1):(_e=k.current)==null||_e.focus()},fe=()=>{z.length>0&&!a.includes(z)&&(u([...a,z]),W(""))};return GBe(b?[B,b]:B,()=>{N(!1),fe()}),D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.body,_ie.main),children:D.jsxRuntimeExports.jsx(fN,{children:D.jsxRuntimeExports.jsxs("div",{...Lt.props(_ie.content,_),onKeyUp:ee,onClick:()=>{var be;return(be=k.current)==null?void 0:be.focus()},ref:B,children:[J,D.jsxRuntimeExports.jsx("input",{className:"mly1gs6z28 mly1a2a7pz mly6icuqf mlyif65rj mlyayvuls mly83z2og mly1onzeue mly195ery5 mly1iyjqo2",ref:k,type:m,placeholder:a.length===0?f:"",value:z,size:1,onChange:be=>{W(be.target.value)},onKeyDown:be=>{be.key==="Enter"&&z!==""&&(fe(),be.stopPropagation(),be.preventDefault())},onKeyUp:be=>{var je,_e,De,Xe;be.key==="Backspace"?z===""&&a.length>0&&(fe(),(je=k.current)==null||je.blur(),$(a.length-1)):be.key==="ArrowLeft"&&(((_e=k.current)==null?void 0:_e.selectionStart)===0||((De=k.current)==null?void 0:De.selectionStart)===null)&&(fe(),(Xe=k.current)==null||Xe.blur(),$(a.length-1),be.preventDefault(),be.stopPropagation())},onFocus:()=>{N(!0),$(void 0)},autoFocus:d})]})})})},cpr=({children:a,color:u=FS,forwardRef:d,onClick:f,onDelete:m})=>D.jsxRuntimeExports.jsxs("div",{onClick:f,tabIndex:0,ref:d,...Lt.props(_ie.pill,dpr[u]),children:[a,D.jsxRuntimeExports.jsx("div",{title:"Remove",className:"mly3nfvp2",children:D.jsxRuntimeExports.jsx(Tje,{onClick:()=>m(),className:"mly6jxa94 mly1v9usgg"})})]}),_ie={main:{borderRadius:"mly12oqio5",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,border:"mlyvckdp7",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,padding:"mlybsehbd",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,display:"mlyrvj5dj",minHeight:"mly2lwn1j",$$css:!0},content:{outline:"mly1a2a7pz",outlineColor:null,outlineOffset:null,outlineStyle:null,outlineWidth:null,display:"mly78zum5",flexWrap:"mly1a02dak",gap:"mly1ed6fcf",rowGap:null,columnGap:null,borderColor:"mly1akygb0 mlyetl2wx",borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,$$css:!0},pill:{backgroundColor:"mlyy9rfsq",borderRadius:"mly1sxf85j",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,color:"mly1xre2ib",display:"mly78zum5",alignItems:"mly6s0dn4",gap:"mly1nejdyq",rowGap:null,columnGap:null,padding:"mly1e41zw8",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,textTransform:"mly6mezaz",cursor:"mly1ypdohk",height:"mly1qx5ct2",whiteSpace:"mlyuxw1ft",$$css:!0}},dpr={default:{"--mlyvygx4q":"mly1izbou4","--mly13n7235":"mly8bgh0r",$$css:!0},purple:{"--mlyvygx4q":"mly1f8soc4","--mly13n7235":"mly1r5zvhd",$$css:!0},green:{"--mlyvygx4q":"mlyf8wvcd","--mly13n7235":"mly1u6t2w6",$$css:!0},cyan:{"--mlyvygx4q":"mlyrtwgpv","--mly13n7235":"mlys5r2en",$$css:!0}};function fpr(a,u){const{topValues:d}=Pe.useContext(ai);if(d&&a){let f=d;if(u){const m=d.find(g=>g.fieldName===u);m?f=[m]:f=[]}return a=a.toLowerCase(),{searchResults:f.reduce((m,g)=>(g.values.filter(x=>{var b;return((b=x.fieldValue)==null?void 0:b.toLowerCase().includes(a))??!1}).forEach(x=>{m.push({fieldValue:x.fieldValue,fieldName:g.fieldName,fieldType:"string",weight:x.weight})}),m),[]),isLoading:!1}}return{searchResults:void 0,isLoading:!1}}function VBe({onClick:a,search:u,fieldPath:d,ref:f,customStyle:m,showPath:g=!0}){const{searchResults:x}=fpr(u,d),b=Pe.useMemo(()=>x&&x.filter(v=>v.fieldType==="string"&&v.fieldValue!==null).sort((v,_)=>_.weight-v.weight).slice(0,100),[x]);return D.jsxRuntimeExports.jsx("div",{ref:f,...Lt.props(m),children:b?.length?b.map(v=>D.jsxRuntimeExports.jsxs("div",{role:"menuitem",tabIndex:-1,...Lt.props(Al.item,QBe.valueItem),onClick:()=>a(v),children:[D.jsxRuntimeExports.jsx(hpr,{value:v}),g?D.jsxRuntimeExports.jsx("div",{className:"mly1jwwhvr",children:v.fieldName}):null]},v.fieldName+":"+v.fieldValue)):u?D.jsxRuntimeExports.jsx("div",{...Lt.props(Al.item),"data-disabled":"true",children:"No matching values"}):null})}function hpr({value:a}){return D.jsxRuntimeExports.jsx($s,{label:a.fieldValue??"∅",icon:"filter",color:"purple",customStyle:QBe.token})}const QBe={valueItem:{height:"mly1qx5ct2",paddingTop:"mly1y1aw1k",paddingBottom:"mlywib8y2",display:"mly78zum5",justifyContent:"mly1qughib",cursor:"mly1ypdohk",$$css:!0},token:{cursor:"mly1ypdohk",$$css:!0}},x5={is_equal_to:{operator:"="},starts_with:{operator:"starts"},ends_with:{operator:"ends"},contains:{operator:"contains"},matches:{operator:"~"},is_blank:{operator:"empty"},is_null:{operator:"null"},is_not_equal_to:{operator:"=",not:!0},does_not_start_with:{operator:"starts",not:!0},does_not_end_with:{operator:"ends",not:!0},does_not_contain:{operator:"contains",not:!0},does_not_match:{operator:"~",not:!0},is_not_blank:{operator:"empty",not:!0},is_not_null:{operator:"null",not:!0}};function ppr(a){for(const u in x5){const d=u,f=x5[d],m="not"in a?a.not:!1,g="not"in f?f.not:!1;if(f.operator===a.operator&&g===m)return d}throw new Error(`Unhandled string filter type ${a.operator}`)}const mpr=({filter:a,setFilter:u,field:d,path:f})=>{a??(a={operator:"=",values:[]});const[m,g]=Pe.useState(""),x=Pe.useRef(null),b=ppr(a),[v,_]=Pe.useState(a),S=w=>{R(ypr(v,w))},R=w=>{_(w),u(w)};return D.jsxRuntimeExports.jsxs("div",{...Lt.props(Ri.editor),children:[D.jsxRuntimeExports.jsx(Hx,{value:b,onChange:S,options:[{value:"is_equal_to",label:"is"},{value:"starts_with",label:"starts with"},{value:"ends_with",label:"ends with"},{value:"contains",label:"contains"},{value:"is_blank",label:"is blank"},{value:"is_null",label:"is null"},{value:"matches",label:"matches"},{value:"is_not_equal_to",label:"is not"},{value:"does_not_start_with",label:"does not start with"},{value:"does_not_end_with",label:"does not end with"},{value:"does_not_contain",label:"does not contain"},{value:"is_not_blank",label:"is not blank"},{value:"is_not_null",label:"is not null"},{value:"does_not_match",label:"does not match"}],customStyle:Ri.filterTypeDropdown},"type"),v.operator==="="||v.operator==="starts"||v.operator==="ends"||v.operator==="contains"?D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx(V9e,{values:v.values,setValues:w=>R({...v,values:w}),searchValue:m,setSearchValue:g,focusElement:x},"editor"),D.jsxRuntimeExports.jsx("div",{style:{minHeight:0,display:"grid"},children:D.jsxRuntimeExports.jsx(VBe,{ref:x,search:m,fieldPath:[...f,d.name].join("."),onClick:w=>{w.fieldValue&&(R({...v,values:[...v.values,w.fieldValue]}),g(""))},customStyle:vpr.valueList,showPath:!1})})]}):v.operator==="~"?D.jsxRuntimeExports.jsx(V9e,{values:v.escaped_values,setValues:w=>R({...v,escaped_values:w}),escape:!0,searchValue:m,setSearchValue:g},"editor"):null]})};function V9e({color:a,values:u,setValues:d,searchValue:f,setSearchValue:m,focusElement:g}){return D.jsxRuntimeExports.jsx(WBe,{color:a,values:u,setValues:d,value:f,setValue:m,focusElement:g})}function gpr(a){return a.replace(/(["%_^])/g,"^$1")}function xpr(a){return a.replace(/\^(["%_^])/g,"$1")}function ypr(a,u){const d="values"in a?a.values:"escaped_values"in a?a.escaped_values.map(xpr):[];switch(u){case"is_equal_to":case"is_not_equal_to":case"starts_with":case"does_not_start_with":case"contains":case"does_not_contain":case"ends_with":case"does_not_end_with":return{...x5[u],values:d};case"is_blank":case"is_not_blank":case"is_null":case"is_not_null":return{...x5[u]};case"matches":case"does_not_match":return{...x5[u],escaped_values:d.map(gpr)}}}const vpr={valueList:{maxHeight:"mly3d5gib",width:"mly1hfn5x7",overflow:"mlyysyzu8",overflowX:null,overflowY:null,$$css:!0}},Q9e=a=>a==="range",W_={is_equal_to:{operator:"="},is_not_equal_to:{operator:"=",not:!0},is_greater_than:{operator:">"},is_less_than:{operator:"<"},is_greater_than_or_equal_to:{operator:">="},is_less_than_or_equal_to:{operator:"<="},is_between:{operator:"range",startOperator:">=",endOperator:"<="},is_null:{operator:"null"},is_not_null:{operator:"null",not:!0}};function bpr(a){for(const u in W_){const d=u,f=W_[d],m="not"in a?a.not:!1,g="not"in f?f.not:!1;if(f.operator===a.operator&&g===m)return d}throw new Error(`Unhandled number filter type ${a.operator}`)}const Epr=({filter:a,setFilter:u})=>{a??(a={operator:"=",values:[]});const[d,f]=Pe.useState(Q9e(a.operator)?["0","0"]:["0"]),[m,g]=Pe.useState(""),x=_=>{const S=a,R=Apr(a,_);R.operator!=="null"&&(!S.values||S.values.length===0)&&(R.values=["0"]),u(R)},b=bpr(a);Pe.useEffect(()=>{if(g(""),Q9e(a.operator)){const _=a;f([_.startValue,_.endValue])}else{const _=a;if(_.values){let S=_.values;(!S||S.length===0)&&(S=["0"]),f(S)}else f(["0"])}},[a]);const v=_=>{f(_),_.some(R=>isNaN(parseFloat(R)))?g("Every value must be numeric."):_.length===0?g("Requires at least one numeric value."):(g(""),a.operator==="range"?u({...a,startOperator:">=",startValue:_[0],endOperator:"<=",endValue:_[1]}):u({...a,values:_}))};return D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx(Hx,{value:b,onChange:x,options:[{value:"is_equal_to",label:"is"},{value:"is_not_equal_to",label:"is not"},{value:"is_greater_than",label:"is greater than"},{value:"is_less_than",label:"is less than"},{value:"is_greater_than_or_equal_to",label:"is greater than or equal to"},{value:"is_less_than_or_equal_to",label:"is less than or equal to"},{value:"is_between",label:"between"},{value:"is_null",label:"is null"},{value:"is_not_null",label:"is not null"}]}),m?D.jsxRuntimeExports.jsx(n$,{errorMessage:m}):null,_pr(a,d,v)]})};function _pr(a,u,d){switch(a.operator){case"!=":case"=":return D.jsxRuntimeExports.jsx(Spr,{values:u.map(String),setValues:f=>d(f),type:"number"});case">":case"<":case">=":case"<=":return D.jsxRuntimeExports.jsx(ine,{value:u[0],setValue:f=>d([f]),type:"number"});case"range":return D.jsxRuntimeExports.jsxs("div",{className:"mlyrvj5dj mly15396mt mly167g77z mlypqajaz",children:[D.jsxRuntimeExports.jsx(ine,{value:u[0],setValue:f=>d([f,u[1]]),type:"number"}),D.jsxRuntimeExports.jsx("span",{children:"to"}),D.jsxRuntimeExports.jsx(ine,{value:u[1],setValue:f=>d([u[0],f]),type:"number"})]})}return null}function ine({value:a,setValue:u}){return D.jsxRuntimeExports.jsx("input",{type:"number",value:a,onChange:d=>{u(d.target.value)},className:"mly27xtdb mly12oqio5 mlyizdh9v mly34lxi1"})}function Spr({values:a,setValues:u}){return D.jsxRuntimeExports.jsx(WBe,{values:a,setValues:u,type:"number"})}function Apr(a,u){const d="values"in a?a.values:[];switch(u){case"is_equal_to":case"is_not_equal_to":return{...W_[u],values:d};case"is_greater_than":case"is_less_than":case"is_greater_than_or_equal_to":case"is_less_than_or_equal_to":return{...W_[u],values:d.length>0?[d[0]]:d};case"is_null":case"is_not_null":return{...W_[u]};case"is_between":return{...W_[u],startValue:d.length>0?d[0]:"0",endValue:d.length>1?d[1]:"0"}}}function Cpr(a){return a.operator==="null"&&a.not?"-null":a.operator}function Rpr(a,u){return a.operator==="last"||a.operator==="next"||a.operator==="in_last"?a.units:a.operator==="to"?nF(a.fromMoment,u):a.operator==="before"&&a.before.moment==="literal"?nF(a.before,u):a.operator==="after"?nF(a.after,u):a.operator==="in"?nF(a.in,u):u?"second":"day"}const Y9e=({filter:a,setFilter:u,isDateTime:d})=>{a??(a={operator:"last",n:"7",units:"day"});const[f,m]=Pe.useState(Rpr(a,d)),[g,x]=Pe.useState(a),b=R=>{v(Lpr(g,R,f))},v=R=>{x(R),u(R)},_=d?"second":"day",S=Cpr(g);return D.jsxRuntimeExports.jsxs("div",{...Lt.props(Ri.editor),children:[D.jsxRuntimeExports.jsxs("div",{...Lt.props(Ri.editorRow),children:[D.jsxRuntimeExports.jsx(Hx,{value:S,onChange:b,options:[{value:"in_last",label:"last"},{value:"last",label:"last complete"},{value:"next",label:"next complete"},{value:"after",label:"after"},{value:"before",label:"before"},{value:"in",label:"is"},{value:"to",label:"between"},{value:"null",label:"null"},{value:"-null",label:"not null"}],customStyle:Ri.editorCell}),Tpr(g,v,f,m,_)]}),wpr(g,v,f,m,_)]})};function Tpr(a,u,d,f,m){switch(a.operator){case"in_last":case"last":case"next":return D.jsxRuntimeExports.jsx(Opr,{currentFilter:a,maxLevel:m,updateFilter:u,units:d,setUnits:f});case"after":case"before":case"to":case"in":return D.jsxRuntimeExports.jsx(Npr,{currentFilter:a,maxLevel:m,updateFilter:u,units:d,setUnits:f})}return null}function wpr(a,u,d,f,m){switch(a.operator){case"after":case"before":case"in":return D.jsxRuntimeExports.jsx(Dpr,{currentFilter:a,maxLevel:m,updateFilter:u,units:d,setUnits:f});case"to":return D.jsxRuntimeExports.jsx(kpr,{currentFilter:a,maxLevel:m,updateFilter:u,units:d,setUnits:f})}return null}const AM=[{value:"year",label:"years"},{value:"quarter",label:"quarters"},{value:"month",label:"months"},{value:"week",label:"weeks"},{value:"day",label:"days"}],YBe=[{value:"hour",label:"hours"},{value:"minute",label:"minutes"},{value:"second",label:"seconds"}];function Opr({currentFilter:a,updateFilter:u,setUnits:d,maxLevel:f}){const{n:m,units:g}=a,x=f==="day"?AM:[...AM,...YBe],b=_=>{const S=_.target.value;u({...a,n:S})},v=_=>{d(_),u({...a,units:_})};return D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx("input",{type:"number",value:m,...Lt.props(Ri.input,Ri.editorCell),onChange:b}),D.jsxRuntimeExports.jsx(Hx,{options:x,value:g,onChange:v,customStyle:Ri.editorCell})]})}function Npr({currentFilter:a,updateFilter:u,units:d,setUnits:f,maxLevel:m}){const g=m==="day"?AM:[...AM,...YBe],x=b=>{switch(f(b),a.operator){case"after":u({...a,after:zO(a.after,b)});return;case"before":u({...a,before:zO(a.before,b)});return;case"to":u({...a,fromMoment:zO(a.fromMoment,b),toMoment:zO(a.toMoment,b)});return;case"in":{u({...a,in:zO(a.in,b)});return}}};return D.jsxRuntimeExports.jsx(Hx,{options:g,value:d,onChange:x,customStyle:Ri.editorCell})}function Dpr({currentFilter:a,updateFilter:u,units:d,maxLevel:f}){const m=a.operator==="after"?a.after:a.operator==="before"?a.before:a.in,g=V_(m),x=b=>{u({...a,[a.operator]:pS(b,d)})};return D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx("div",{...Lt.props(Ri.editorRow),children:D.jsxRuntimeExports.jsx(gM,{value:g,setValue:x,units:d,customStyle:{...Ri.input,...Ri.editorCell}})}),D.jsxRuntimeExports.jsx("div",{...Lt.props(Ri.editorRow),children:D.jsxRuntimeExports.jsx(doe,{value:g,setValue:x,units:d,maxLevel:f,customStyle:Ri.editorCell})})]})}function kpr({currentFilter:a,updateFilter:u,units:d,maxLevel:f}){const{fromMoment:m,toMoment:g}=a,x=V_(m),b=V_(g),[v,_]=Pe.useState(x),[S,R]=Pe.useState("from"),w=P=>{u({...a,fromMoment:pS(P,d)})},N=P=>{u({...a,toMoment:pS(P,d)})},k=P=>{S==="from"?w(P):N(P),_(P)},B=P=>{if(R(P),P==="from"){const $=V_(m);_($)}else{const $=V_(g);_($)}};return D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsxs("div",{...Lt.props(Ri.editorRow),children:[D.jsxRuntimeExports.jsx(gM,{value:x,setValue:w,units:d,customStyle:{...Ri.input,...Ri.editorCell},onFocus:()=>B("from"),isActive:S==="from"}),D.jsxRuntimeExports.jsx(gM,{value:b,setValue:N,units:d,customStyle:{...Ri.input,...Ri.editorCell},onFocus:()=>B("to"),isActive:S==="to"})]}),D.jsxRuntimeExports.jsx("div",{...Lt.props(Ri.editorRow),children:D.jsxRuntimeExports.jsx(doe,{value:v,setValue:k,units:d,maxLevel:f,customStyle:Ri.editorCell})})]})}function pS(a,u){return{moment:"literal",literal:Vt.utc(a).format(fS[u]),units:u}}function V_(a){return a&&a.moment==="literal"?Vt.utc(a.literal,fS[a.units??"second"]).toDate():new Date}function zO(a,u){return pS(V_(a),u)}function Lpr(a,u,d){let f="7",m=pS(new Date,d),g=pS(new Date,d);switch(a.operator){case"in_last":case"last":case"next":f=a.n,d=a.units;break;case"after":m=a.after,g=a.after;break;case"before":m=a.before,g=a.before;break;case"to":m=a.fromMoment,g=a.toMoment;break}switch(u){case"in_last":case"last":case"next":return{operator:u,n:f,units:d};case"after":return{operator:u,after:m};case"before":return{operator:u,before:m};case"in":return{operator:u,in:m};case"to":return{operator:u,fromMoment:m,toMoment:g};case"null":return{operator:"null"};case"-null":return{operator:"null",not:!0}}return a}function Ipr({fieldInfo:a,path:u,filter:d,onFilterApply:f,onOpenChange:m}){const[g,x]=Pe.useState(d??Ppr(a)),b=()=>{m(!1)},v=()=>{f(g),m(!1)},_=k=>{x({kind:"boolean",parsed:k})},S=k=>{x({kind:"string",parsed:k})},R=k=>{x({kind:"number",parsed:k})},w=k=>{x({kind:"timestamp",parsed:k})},N=k=>{x({kind:"date",parsed:k})};return D.jsxRuntimeExports.jsxs("div",{...Lt.props(Fr.body,Ri.filterDialog),onKeyDown:k=>{k.key==="Enter"?v():k.key==="Esc"&&b()},children:[D.jsxRuntimeExports.jsx("div",{...Lt.props(Ri.filterDialogHeader),children:a.name}),g.kind==="boolean"&&D.jsxRuntimeExports.jsx(upr,{setFilter:_,filter:g.parsed??{operator:"null"}}),g.kind==="string"&&D.jsxRuntimeExports.jsx(mpr,{setFilter:S,filter:g.parsed??{operator:"null"},field:a,path:u}),g.kind==="number"&&D.jsxRuntimeExports.jsx(Epr,{setFilter:R,filter:g.parsed??{operator:"null"}}),g.kind==="date"&&D.jsxRuntimeExports.jsx(Y9e,{setFilter:N,filter:g.parsed??{operator:"null"},isDateTime:!1}),g.kind==="timestamp"&&D.jsxRuntimeExports.jsx(Y9e,{setFilter:w,filter:g.parsed??{operator:"null"},isDateTime:!0}),D.jsxRuntimeExports.jsxs("div",{...Lt.props(Ri.buttonGroup),children:[D.jsxRuntimeExports.jsx($i,{variant:"default",label:"Cancel",onClick:b,style:{flexGrow:1}}),D.jsxRuntimeExports.jsx($i,{variant:"primary",label:"Apply",onClick:v,style:{flexGrow:1}})]})]})}function Ppr(a){return a.type.kind==="string_type"?{kind:"string",parsed:{operator:"=",values:[]}}:a.type.kind==="boolean_type"?{kind:"boolean",parsed:{operator:"true"}}:a.type.kind==="number_type"?{kind:"number",parsed:{operator:">",values:["0"]}}:a.type.kind==="date_type"?{kind:"date",parsed:{operator:"last",n:"7",units:"day"}}:{kind:"timestamp",parsed:{operator:"last",n:"7",units:"day"}}}function U5({fieldInfo:a,path:u,filter:d,setFilter:f,trigger:m,anchor:g,layoutProps:x,onOpenChange:b}){const[v,_]=Pe.useState(!1),S=R=>{_(R),b?.(R)};return D.jsxRuntimeExports.jsxs(AN,{open:v,onOpenChange:S,modal:!0,children:[g?D.jsxRuntimeExports.jsx(O$e,{asChild:!0,children:g}):D.jsxRuntimeExports.jsx(T$,{asChild:!0,children:m}),D.jsxRuntimeExports.jsx(CN,{children:D.jsxRuntimeExports.jsx(w$,{...x,className:"mly78zum5 mlydt5ytf mly5n1uv4 mly12peec7 mlyur7f20",children:D.jsxRuntimeExports.jsx(Ipr,{fieldInfo:a,filter:d,path:u,onFilterApply:f,onOpenChange:S})})})]})}const jpr=a=>(a.kind==="dimension"||a.kind==="measure")&&(a.type.kind==="array_type"&&a.type.element_type.kind==="record_type"||a.type.kind==="record_type");function Ioe({view:a,fields:u,onAddOperation:d,search:f="",types:m,filter:g,isFilterOperation:x,customStyle:b}){const v=Pe.useMemo(()=>{const _=[],S=f.toLocaleLowerCase(),R=(w,N,k,B)=>{const P=epr(B).filter(z=>z.kind!=="join").filter(z=>z.name.toLocaleLowerCase().includes(S)&&w.includes(z.kind)).filter(z=>g?g(a,z,N):!0),$=B.filter(z=>z.kind==="join"),q=B.filter(jpr);P.length&&_.push({path:N,name:N.length?N.join(" > "):k,fields:P});for(const z of q)z.type.kind==="array_type"&&z.type.element_type.kind==="record_type"?R(w,[...N,z.name],z.name,z.type.element_type.fields.map(W=>({kind:z.kind,...W}))):z.type.kind==="record_type"&&R(w,[...N,z.name],z.name,z.type.fields.map(W=>({kind:z.kind,...W})));for(const z of $)R(w.filter(W=>W!=="view"),[...N,z.name],z.name,z.schema.fields)};return R(m,[],"Source",u),_},[u,g,f,a,m]);return D.jsxRuntimeExports.jsx("div",{...Lt.props(b),children:v.length?v.map(_=>D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsx("div",{...Lt.props(Al.item,sne.fieldItem),"data-disabled":"true",children:_.name}),_.fields.map(S=>x&&(S.kind==="dimension"||S.kind==="measure")?D.jsxRuntimeExports.jsx(U5,{fieldInfo:S,path:_.path,setFilter:R=>d(S,_.path,R),anchor:D.jsxRuntimeExports.jsx("div",{role:"menuitem",tabIndex:-1,...Lt.props(Al.item,sne.fieldItem),children:D.jsxRuntimeExports.jsx(loe,{asChild:!0,children:D.jsxRuntimeExports.jsx(hS,{field:S,tooltip:D.jsxRuntimeExports.jsx(SM,{field:S,path:_.path}),tooltipProps:{side:"right",align:"start",sideOffset:4,alignOffset:24}})})}),layoutProps:{align:"start",side:"right",sideOffset:2,alignOffset:4}},_.name+":"+S.name):D.jsxRuntimeExports.jsx("div",{role:"menuitem",tabIndex:-1,...Lt.props(Al.item,sne.fieldItem),children:D.jsxRuntimeExports.jsx(hS,{field:S,onClick:()=>d(S,_.path),tooltip:D.jsxRuntimeExports.jsx(SM,{field:S,path:_.path}),tooltipProps:{side:"right",align:"start",sideOffset:4,alignOffset:24}})},_.name+":"+S.name))]},_.name)):D.jsxRuntimeExports.jsx("div",{...Lt.props(Al.item),"data-disabled":"true",children:"No matching fields"})})}const sne={fieldItem:{height:"mly1qx5ct2",paddingTop:"mly1y1aw1k",paddingBottom:"mlywib8y2",$$css:!0}};function Fpr({view:a,fields:u,types:d,filter:f,onAddOperation:m,isFilterOperation:g}){const[x,b]=Pe.useState("");return D.jsxRuntimeExports.jsxs("div",{...Lt.props(Al.content,Mpr.content),role:"menu",children:[D.jsxRuntimeExports.jsx("div",{...Lt.props(Al.item),children:D.jsxRuntimeExports.jsx(c$,{icon:"search",value:x,onChange:b,placeholder:"Search..."})}),D.jsxRuntimeExports.jsx(Y_,{}),D.jsxRuntimeExports.jsx("div",{className:"mly1odjw0f",children:D.jsxRuntimeExports.jsx(Ioe,{view:a,fields:u,search:x,types:d,filter:f,onAddOperation:m,isFilterOperation:g})})]})}const Mpr={content:{maxHeight:"mly3d5gib",$$css:!0}};function M$(a,u){return[...a||[],u].join(".")}function $pr(a){return a.operations.items.find(u=>u instanceof Zr.ASTLimitViewOperation)!==void 0}function Bpr(a,u){return a.operations.items.find(d=>d instanceof Zr.ASTOrderByViewOperation&&d.name===u)!==void 0}function KBe(a){const u=new Map;for(const d of a.operations.items)if(d instanceof Zr.ASTGroupByViewOperation||d instanceof Zr.ASTAggregateViewOperation){const f=d.field.getReference();f&&u.set(d.name,M$(f.path,f.name))}return u}function qpr(a,u,d){const f=KBe(a),m=M$(u,d);return!!a.operations.items.find(g=>g instanceof Zr.ASTOrderByViewOperation&&f.has(g.name)?m===f.get(g.name):!1)}function Upr(a,u,d,f){return u===f&&(a||[]).join(".")===(d||[]).join(".")}function zpr(a,u,d){return!!a.operations.items.find(m=>{if(m instanceof Zr.ASTGroupByViewOperation||m instanceof Zr.ASTAggregateViewOperation){const g=m.field.getReference();return g?Upr(u,d,g.path,g.name):!1}return!1})}function Hpr(a,u){return a.operations.items.reduce((d,f)=>{if(f instanceof Zr.ASTNestViewOperation&&f.name===u)do d+=1;while(a.hasFieldNamed(`${u} ${d}`));return d},1)}function $$(a,u,d){const f=u.kind==="dimension"?u.type.kind:"string",m=a.getOrAddDefaultSegment(),{fields:g}=a.getOutputSchema();let x;g.find(b=>b.name===u.name)&&(x=koe(g,u.name,d)),f==="date_type"?m.addDateGroupBy(u.name,d,"day"):f==="timestamp_type"?m.addTimestampGroupBy(u.name,d,"second"):m.addGroupBy(u.name,d,x)}function B$(a,u,d){const f=a.getOrAddDefaultSegment(),{fields:m}=a.getOutputSchema();let g;m.find(x=>x.name===u.name)&&(g=koe(m,u.name,d)),f.addAggregate(u.name,d,g)}function Poe(a,u){const d=a.getOrAddDefaultSegment(),{fields:f}=a.getOutputSchema();let m;f.find(g=>g.name===u.name)&&(m=koe(f,u.name)),d.addNest(u.name,m)}function Gpr(a,u,d,f="desc"){const m=M$(u,d);let g=d;const x=a.getOrAddDefaultSegment(),b=KBe(x);for(const v of b.entries())if(v[1]===m){g=v[0];break}x.addOrderBy(g,f)}function Wpr(a,u,d="desc"){a.getOrAddDefaultSegment().addOrderBy(u.name,d)}function XBe(a,u,d,f){const m=a.getOrAddDefaultSegment();u.kind==="dimension"?m.addWhere(u.name,d,f):m.addHaving(u.name,d,f)}function h0(a){if(!a)return;const u=BBe(a);if(u instanceof Zr.ASTSegmentViewDefinition)return u;if(u instanceof Zr.ASTRefinementViewDefinition&&u.refinement instanceof Zr.ASTSegmentViewDefinition)return u.refinement}function Vpr({actionTitle:a,view:u,fields:d,title:f,types:m,onClick:g}){const[x,b]=Y.useState(!1),v=h0(u),_=(S,R,w)=>!v?.hasField(R.name,w)&&kx(R);return D.jsxRuntimeExports.jsxs("div",{...Lt.props(Id.title,f0.main),children:[D.jsxRuntimeExports.jsx("div",{children:f}),D.jsxRuntimeExports.jsx("div",{...Lt.props(f0.hoverActions,x?f0.hoverOpen:void 0),children:D.jsxRuntimeExports.jsxs(AN,{onOpenChange:b,children:[D.jsxRuntimeExports.jsx(T$,{asChild:!0,children:D.jsxRuntimeExports.jsx("div",{className:"mly1md70p1 mly1aejobo mlyq1n1xh mly1ypdohk",children:a})}),D.jsxRuntimeExports.jsx(CN,{children:D.jsxRuntimeExports.jsx(coe,{side:"right",align:"start",alignOffset:-16,children:D.jsxRuntimeExports.jsx(Fpr,{view:u,fields:d,types:m,filter:_,onAddOperation:g})})})]})})]})}var joe="Dialog",[JBe,Lyr]=Md(joe),[Qpr,Bd]=JBe(joe),ZBe=a=>{const{__scopeDialog:u,children:d,open:f,defaultOpen:m,onOpenChange:g,modal:x=!0}=a,b=Y.useRef(null),v=Y.useRef(null),[_=!1,S]=Dx({prop:f,defaultProp:m,onChange:g});return D.jsxRuntimeExports.jsx(Qpr,{scope:u,triggerRef:b,contentRef:v,contentId:ic(),titleId:ic(),descriptionId:ic(),open:_,onOpenChange:S,onOpenToggle:Y.useCallback(()=>S(R=>!R),[S]),modal:x,children:d})};ZBe.displayName=joe;var eqe="DialogTrigger",Ypr=Y.forwardRef((a,u)=>{const{__scopeDialog:d,...f}=a,m=Bd(eqe,d),g=Cn(u,m.triggerRef);return D.jsxRuntimeExports.jsx(rn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":m.open,"aria-controls":m.contentId,"data-state":$oe(m.open),...f,ref:g,onClick:xr(a.onClick,m.onOpenToggle)})});Ypr.displayName=eqe;var Foe="DialogPortal",[Kpr,tqe]=JBe(Foe,{forceMount:void 0}),rqe=a=>{const{__scopeDialog:u,forceMount:d,children:f,container:m}=a,g=Bd(Foe,u);return D.jsxRuntimeExports.jsx(Kpr,{scope:u,forceMount:d,children:Y.Children.map(f,x=>D.jsxRuntimeExports.jsx(Do,{present:d||g.open,children:D.jsxRuntimeExports.jsx(kS,{asChild:!0,container:m,children:x})}))})};rqe.displayName=Foe;var CM="DialogOverlay",nqe=Y.forwardRef((a,u)=>{const d=tqe(CM,a.__scopeDialog),{forceMount:f=d.forceMount,...m}=a,g=Bd(CM,a.__scopeDialog);return g.modal?D.jsxRuntimeExports.jsx(Do,{present:f||g.open,children:D.jsxRuntimeExports.jsx(Xpr,{...m,ref:u})}):null});nqe.displayName=CM;var Xpr=Y.forwardRef((a,u)=>{const{__scopeDialog:d,...f}=a,m=Bd(CM,d);return D.jsxRuntimeExports.jsx(mN,{as:Tx,allowPinchZoom:!0,shards:[m.contentRef],children:D.jsxRuntimeExports.jsx(rn.div,{"data-state":$oe(m.open),...f,ref:u,style:{pointerEvents:"auto",...f.style}})})}),Wv="DialogContent",iqe=Y.forwardRef((a,u)=>{const d=tqe(Wv,a.__scopeDialog),{forceMount:f=d.forceMount,...m}=a,g=Bd(Wv,a.__scopeDialog);return D.jsxRuntimeExports.jsx(Do,{present:f||g.open,children:g.modal?D.jsxRuntimeExports.jsx(Jpr,{...m,ref:u}):D.jsxRuntimeExports.jsx(Zpr,{...m,ref:u})})});iqe.displayName=Wv;var Jpr=Y.forwardRef((a,u)=>{const d=Bd(Wv,a.__scopeDialog),f=Y.useRef(null),m=Cn(u,d.contentRef,f);return Y.useEffect(()=>{const g=f.current;if(g)return s$(g)},[]),D.jsxRuntimeExports.jsx(sqe,{...a,ref:m,trapFocus:d.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:xr(a.onCloseAutoFocus,g=>{var x;g.preventDefault(),(x=d.triggerRef.current)==null||x.focus()}),onPointerDownOutside:xr(a.onPointerDownOutside,g=>{const x=g.detail.originalEvent,b=x.button===0&&x.ctrlKey===!0;(x.button===2||b)&&g.preventDefault()}),onFocusOutside:xr(a.onFocusOutside,g=>g.preventDefault())})}),Zpr=Y.forwardRef((a,u)=>{const d=Bd(Wv,a.__scopeDialog),f=Y.useRef(!1),m=Y.useRef(!1);return D.jsxRuntimeExports.jsx(sqe,{...a,ref:u,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:g=>{var x,b;(x=a.onCloseAutoFocus)==null||x.call(a,g),g.defaultPrevented||(f.current||(b=d.triggerRef.current)==null||b.focus(),g.preventDefault()),f.current=!1,m.current=!1},onInteractOutside:g=>{var x,b;(x=a.onInteractOutside)==null||x.call(a,g),g.defaultPrevented||(f.current=!0,g.detail.originalEvent.type==="pointerdown"&&(m.current=!0));const v=g.target;((b=d.triggerRef.current)==null?void 0:b.contains(v))&&g.preventDefault(),g.detail.originalEvent.type==="focusin"&&m.current&&g.preventDefault()}})}),sqe=Y.forwardRef((a,u)=>{const{__scopeDialog:d,trapFocus:f,onOpenAutoFocus:m,onCloseAutoFocus:g,...x}=a,b=Bd(Wv,d),v=Y.useRef(null),_=Cn(u,v);return i$(),D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx(pN,{asChild:!0,loop:!0,trapped:f,onMountAutoFocus:m,onUnmountAutoFocus:g,children:D.jsxRuntimeExports.jsx(OS,{role:"dialog",id:b.contentId,"aria-describedby":b.descriptionId,"aria-labelledby":b.titleId,"data-state":$oe(b.open),...x,ref:_,onDismiss:()=>b.onOpenChange(!1)})}),D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx(tmr,{titleId:b.titleId}),D.jsxRuntimeExports.jsx(nmr,{contentRef:v,descriptionId:b.descriptionId})]})]})}),Moe="DialogTitle",oqe=Y.forwardRef((a,u)=>{const{__scopeDialog:d,...f}=a,m=Bd(Moe,d);return D.jsxRuntimeExports.jsx(rn.h2,{id:m.titleId,...f,ref:u})});oqe.displayName=Moe;var aqe="DialogDescription",lqe=Y.forwardRef((a,u)=>{const{__scopeDialog:d,...f}=a,m=Bd(aqe,d);return D.jsxRuntimeExports.jsx(rn.p,{id:m.descriptionId,...f,ref:u})});lqe.displayName=aqe;var uqe="DialogClose",emr=Y.forwardRef((a,u)=>{const{__scopeDialog:d,...f}=a,m=Bd(uqe,d);return D.jsxRuntimeExports.jsx(rn.button,{type:"button",...f,ref:u,onClick:xr(a.onClick,()=>m.onOpenChange(!1))})});emr.displayName=uqe;function $oe(a){return a?"open":"closed"}var cqe="DialogTitleWarning",[Iyr,dqe]=rKt(cqe,{contentName:Wv,titleName:Moe,docsSlug:"dialog"}),tmr=({titleId:a})=>{const u=dqe(cqe),d=`\`${u.contentName}\` requires a \`${u.titleName}\` for the component to be accessible for screen reader users.
|
|
2879
|
+
`)},Zhr="#NO_UI",Doe=a=>!!a.find(d=>d.value.startsWith(Zhr));function U9e(a){return a.kind==="join"?3:a.kind==="view"?2:a.kind==="dimension"?1:0}function epr(a){return a.sort((u,d)=>{const f=U9e(u),m=U9e(d);return f===m?u.name.localeCompare(d.name):m-f})}const z9e=["fieldName","fieldPath","fieldValue","fieldType","fieldRange","weight"];function $Be(a){return new Set([...z9e,...a.schema.fields.map(d=>d.name)]).size===z9e.length}function BBe(a){return a instanceof Zr.ASTArrowQueryDefinition?a.view:a.definition}function eb(a){return a?BBe(a).getInputSchema():{fields:[]}}function kx(a){return!Doe(a.annotations??[])}function koe(a,u,d=[]){if(!a.find(m=>m.name===u))return u;if(d.length){const m=[...d];for(;m.length;)if(u=`${m.pop()} ${u}`,!a.find(x=>x.name===u))return u}let f=2;for(;a.find(m=>m.name===`${u} ${f}`);)f++;return`${u} ${f}`}function tpr({field:a}){if(a.kind==="view")return D.jsxRuntimeExports.jsx(Ex,{label:"view",icon:"view_filled",color:"purple",customStyle:sF.noBackground});if(a.kind==="dimension")return D.jsxRuntimeExports.jsx(Ex,{label:"dimension",icon:IF(a),color:"cyan",customStyle:sF.noBackground});if(a.kind==="measure")return D.jsxRuntimeExports.jsx(Ex,{label:"measure",icon:IF(a),color:"green",customStyle:sF.noBackground});if(a.kind==="join")return D.jsxRuntimeExports.jsx(Ex,{label:"join",icon:IF(a),color:"gray",customStyle:sF.noBackground})}const sF={noBackground:{backgroundColor:"mlyjbqb8w",$$css:!0}};function qBe({rootQuery:a,view:u}){const{setQuery:d}=Pe.useContext(ai),f=u.getTag(),m=Eoe(f)??"table",g=v=>{u.removeTagProperty([m]),u.setTagProperty([v]),d?.(a.build())},x=mBe.map(v=>({icon:D.jsxRuntimeExports.jsx(An,{name:`viz_${v}`}),label:UBe(v),value:v,onClick:()=>g(v)})),b=[D.jsxRuntimeExports.jsx(d$,{customStyle:rpr.first,icon:`viz_${m}`,value:m,items:x,onChange:v=>g(v)},"first")];return D.jsxRuntimeExports.jsx(hN,{children:b})}const rpr={first:{flexGrow:"mly1iyjqo2",justifyContent:"mlylqzeqv",$$css:!0}};function UBe(a){return a.split("_").map(u=>u.charAt(0).toUpperCase()+u.slice(1)).join(" ")}function npr({annotations:a}){const{tag:u}=qYt.Tag.fromTagLines(a.map(f=>f.value)),d=Eoe(u)??"table";return D.jsxRuntimeExports.jsx($s,{label:UBe(d),icon:`viz_${d}`})}function Loe({viewInfo:a,isCompact:u,style:d}){const f=a.schema.fields.filter(m=>m.kind==="dimension");return D.jsxRuntimeExports.jsx("div",{...Lt.props(Eie.attributeTableContainer,d),children:D.jsxRuntimeExports.jsx("table",{className:"mly1mwwwfo mly9f619 mlyh8yej3 mly5yr21d",children:D.jsxRuntimeExports.jsxs("tbody",{children:[D.jsxRuntimeExports.jsx(H9e,{attribute:"chart type",children:D.jsxRuntimeExports.jsx("div",{className:"mly1rg5ohu",children:D.jsxRuntimeExports.jsx(npr,{annotations:a.annotations||[]})})}),D.jsxRuntimeExports.jsx(H9e,{attribute:"output",children:f.map(m=>D.jsxRuntimeExports.jsx("span",{children:D.jsxRuntimeExports.jsx(hS,{field:m,size:u?"compact":"default"})},`${m.kind}::${m.name}`))})]})})})}function H9e({attribute:a,children:u}){return D.jsxRuntimeExports.jsxs("tr",{className:"mlydpxx8g",children:[D.jsxRuntimeExports.jsx("td",{...Lt.props(Eie.attributeTableKeyCell,Fr.supporting),children:D.jsxRuntimeExports.jsx("div",{...Lt.props(Eie.attributeTableKeyCellContent,Fr.supporting),children:a})}),D.jsxRuntimeExports.jsx("td",{className:"mly78zum5 mly1a02dak mly195vfkc",children:u})]})}const Eie={attributeTableContainer:{padding:"mlye8ttls",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,gap:"mly167g77z",rowGap:null,columnGap:null,borderRadius:"mly1q4ynmn",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,backgroundColor:"mly12nb83b",boxSizing:"mly9f619",width:"mlyh8yej3",height:"mly1m3v4wt",overflow:"mlyysyzu8",overflowX:null,overflowY:null,$$css:!0},attributeTableKeyCell:{whiteSpace:"mlyuxw1ft",width:"mly1f1nlb9",verticalAlign:"mly16dsc37",$$css:!0},attributeTableKeyCellContent:{height:"mly1fgtraw",display:"mly78zum5",alignItems:"mly6s0dn4",$$css:!0}};function ipr({field:a,path:u}){const{topValues:d}=Pe.useContext(ai),f=[...u,a.name].join("."),m=d?.find(g=>g.fieldName===f);return m?D.jsxRuntimeExports.jsxs("div",{className:"mly12nb83b mly1iorvi4 mlyjkvuk6 mly163pfp mlyy13l1i mly12oqio5",children:[D.jsxRuntimeExports.jsx("div",{className:"mly117nqv4",children:"Top Values"}),m.values.slice(0,6).map(g=>D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1qughib mly883omv mly6s0dn4",children:[D.jsxRuntimeExports.jsx("div",{children:D.jsxRuntimeExports.jsx("div",{className:"mlylyipyv mly6mezaz mlyb3r6kr mlyuxw1ft",children:g.fieldValue===null?D.jsxRuntimeExports.jsx("span",{children:"∅"}):g.fieldValue})}),D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mly883omv mly13a6bvl mly6s0dn4 mlyb3r6kr mly2lah0s mly9dwj6z",children:spr(g.weight)})]},g.fieldValue))]}):null}function spr(a){return a===null?"∅":a<1e3?a.toLocaleString():a<1e4?(a/1e3).toFixed(1)+"K":a<1e6?Math.floor(a/1e3).toLocaleString()+"K":a<1e7?(a/1e6).toFixed(1)+"M":Math.floor(a/1e3).toLocaleString()+"M"}function G9e({children:a,ref:u,customStyle:d,isTooltipContent:f=!1,...m}){const g=a.split(/((?:http|https):\/\/\S*)\b/),x=g.length>1,b=g.map((v,_)=>v.match(/^(http|https):/)?D.jsxRuntimeExports.jsx("a",{href:v,...{0:{},1:{className:"mly198oq2i"}}[!!f<<0],children:v},_):v);return D.jsxRuntimeExports.jsx("div",{ref:u,...Lt.props(x&&W9e.preWrap,x&&W9e.breakWord,d),...m,children:b})}const W9e={preWrap:{whiteSpace:"mly126k92a",$$css:!0},breakWord:{wordWrap:"mly1vvkbs",$$css:!0}};function zBe({text:a,containerRef:u,align:d="center",side:f="top"}){const m=Pe.useRef(null),[g,x]=Y.useState(!1),[b,v]=Y.useState(!1),_=()=>(m.current&&m.current.scrollHeight>m.current.clientHeight)??!1;return D.jsxRuntimeExports.jsxs(oN,{open:(g||b)&&_(),children:[D.jsxRuntimeExports.jsx(aN,{asChild:!0,children:D.jsxRuntimeExports.jsx(G9e,{ref:m,onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),onPointerMove:S=>S.preventDefault(),customStyle:[Fr.supporting,opr.text],children:a})}),D.jsxRuntimeExports.jsx(lN,{container:u?.current,children:D.jsxRuntimeExports.jsx(uN,{side:f,align:d,children:D.jsxRuntimeExports.jsx(G9e,{onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),isTooltipContent:!0,customStyle:[Fr.body,g0.default],children:a})})})]})}const opr={text:{overflow:"mlyb3r6kr",overflowX:null,overflowY:null,display:"mly104kibb","-webkit-line-clamp":"mly1gzmk7r","-webkit-box-orient":"mly1ua5tub",$$css:!0}};function HBe({children:a,customStyle:u}){return D.jsxRuntimeExports.jsx("div",{...Lt.props(apr.container,Fr.body,u),children:a})}const apr={container:{boxShadow:"mly5n1uv4",backgroundColor:"mly12peec7",borderRadius:"mly4pepcl",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,padding:"mlyc7ga6q",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,display:"mly78zum5",flexDirection:"mlydt5ytf",gap:"mly167g77z",rowGap:null,columnGap:null,$$css:!0}};function SM({field:a,path:u}){const{source:d}=Y.useContext(ai),f=Y.useRef(null),m=[d?.name??"",...u].join(" > "),x=MBe(a.annotations??[])??"";let b=null;return a.kind==="view"?b=D.jsxRuntimeExports.jsx(Loe,{viewInfo:a,isCompact:!0,style:oF.viewAttributeTable}):a.kind==="dimension"&&(b=D.jsxRuntimeExports.jsx(ipr,{field:a,path:u})),D.jsxRuntimeExports.jsxs(HBe,{customStyle:oF.container,children:[D.jsxRuntimeExports.jsxs("div",{ref:f,children:[D.jsxRuntimeExports.jsx("div",{className:"mly12nagc",children:D.jsxRuntimeExports.jsx(tpr,{field:a})}),D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.supporting,oF.path),children:m}),D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.emphasized,oF.title),children:a.name}),x&&D.jsxRuntimeExports.jsx(zBe,{text:x,containerRef:f})]}),b&&D.jsxRuntimeExports.jsx("div",{children:b})]})}const oF={container:{width:"mlybl57os",maxHeight:"mlyq3t0pi",$$css:!0},path:{color:"mly9dwj6z",$$css:!0},viewAttributeTable:{height:"mlyn866dk",$$css:!0},title:{overflow:"mlyb3r6kr",overflowX:null,overflowY:null,textOverflow:"mlylyipyv",$$css:!0}},Ri={filterDialog:{display:"mly78zum5",flexDirection:"mlydt5ytf",padding:"mlye8ttls",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,minWidth:"mlyytlacd",maxWidth:"mly1pdpmub",gap:"mly167g77z",rowGap:null,columnGap:null,minHeight:"mly2lwn1j",maxHeight:"mly3d5gib",$$css:!0},filterDialogHeader:{fontWeight:"mly117nqv4",$$css:!0},filterTypeDropdown:{width:"mlyh8yej3",$$css:!0},buttonGroup:{display:"mly78zum5",gap:"mly167g77z",rowGap:null,columnGap:null,$$css:!0},editor:{display:"mly78zum5",flexDirection:"mlydt5ytf",gap:"mly167g77z",rowGap:null,columnGap:null,minHeight:"mly2lwn1j",$$css:!0},editorRow:{display:"mlyrvj5dj",gridAutoFlow:"mly1mt1orb",gap:"mly167g77z",rowGap:null,columnGap:null,$$css:!0},editorCell:{flexGrow:"mly1iyjqo2",$$css:!0},input:{border:"mly2yh2zd",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,color:"mlyizdh9v",padding:"mly9cpjcd",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,borderRadius:"mly1sxf85j",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,minWidth:"mlygc0pbm",$$css:!0}};function lpr(a){return a.operator==="null"&&a.not?"-null":a.operator}function upr({filter:a,setFilter:u}){const d=lpr(a),f=m=>{u(m==="-null"?{operator:"null",not:!0}:{operator:m})};return D.jsxRuntimeExports.jsx("div",{...Lt.props(Ri.editor),children:D.jsxRuntimeExports.jsx(Hx,{value:d,onChange:f,options:[{value:"true",label:"is true"},{value:"false",label:"is false"},{value:"null",label:"is null"},{value:"-null",label:"is not null"},{value:"false_or_null",label:"is false or null"}],customStyle:Ri.filterTypeDropdown})})}function GBe(a,u){Pe.useEffect(()=>{const d=Array.isArray(a)?a:[a];let f=!1;const m=(v,_)=>!v.current||_.target instanceof Element&&v.current.contains(_.target),g=v=>d.some(_=>m(_,v)),x=v=>{!f||g(v)||(u(v),f=!1)},b=v=>{g(v)||(f=!0)};return document.addEventListener("mouseup",x),document.addEventListener("mousedown",b),()=>{document.removeEventListener("mouseup",x),document.removeEventListener("mousedown",b)}},[a,u])}const WBe=({values:a,setValues:u,autoFocus:d,placeholder:f,type:m="text",value:g,setValue:x,focusElement:b,color:v=FS,customStyle:_})=>{const[S,R]=Pe.useState(""),[w,N]=Pe.useState(!1),k=Pe.useRef(null),B=Pe.useRef(null),[P,$]=Pe.useState(void 0),q=Pe.useRef([]),z=g||S,W=x||R,X=Pe.useCallback(be=>{var je;const _e=[...a];_e.splice(be,1),u(_e),P===0?a.length===1?($(void 0),(je=k.current)==null||je.focus()):$(0):$(be-1)},[P,u,a]),J=Pe.useMemo(()=>(q.current=new Array(a.length),a.map((be,je)=>D.jsxRuntimeExports.jsx(cpr,{color:v,onClick:()=>{$(je)},onDelete:()=>X(je),forwardRef:_e=>{q.current[je]=_e},children:be},be))),[v,X,a]);Pe.useEffect(()=>{var be;P!==void 0&&((be=q.current[P])==null||be.focus())},[J,P]);const ee=be=>{var je,_e;be.key==="Backspace"?P!==void 0&&X(P):be.key==="ArrowRight"?P===a.length-1?($(void 0),(je=k.current)==null||je.focus()):P!==void 0&&$(P+1):be.key==="ArrowLeft"?P!==void 0&&P>0&&$(P-1):(_e=k.current)==null||_e.focus()},fe=()=>{z.length>0&&!a.includes(z)&&(u([...a,z]),W(""))};return GBe(b?[B,b]:B,()=>{N(!1),fe()}),D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.body,_ie.main),children:D.jsxRuntimeExports.jsx(fN,{children:D.jsxRuntimeExports.jsxs("div",{...Lt.props(_ie.content,_),onKeyUp:ee,onClick:()=>{var be;return(be=k.current)==null?void 0:be.focus()},ref:B,children:[J,D.jsxRuntimeExports.jsx("input",{className:"mly1gs6z28 mly1a2a7pz mly6icuqf mlyif65rj mlyayvuls mly83z2og mly1onzeue mly195ery5 mly1iyjqo2",ref:k,type:m,placeholder:a.length===0?f:"",value:z,size:1,onChange:be=>{W(be.target.value)},onKeyDown:be=>{be.key==="Enter"&&z!==""&&(fe(),be.stopPropagation(),be.preventDefault())},onKeyUp:be=>{var je,_e,De,Xe;be.key==="Backspace"?z===""&&a.length>0&&(fe(),(je=k.current)==null||je.blur(),$(a.length-1)):be.key==="ArrowLeft"&&(((_e=k.current)==null?void 0:_e.selectionStart)===0||((De=k.current)==null?void 0:De.selectionStart)===null)&&(fe(),(Xe=k.current)==null||Xe.blur(),$(a.length-1),be.preventDefault(),be.stopPropagation())},onFocus:()=>{N(!0),$(void 0)},autoFocus:d})]})})})},cpr=({children:a,color:u=FS,forwardRef:d,onClick:f,onDelete:m})=>D.jsxRuntimeExports.jsxs("div",{onClick:f,tabIndex:0,ref:d,...Lt.props(_ie.pill,dpr[u]),children:[a,D.jsxRuntimeExports.jsx("div",{title:"Remove",className:"mly3nfvp2",children:D.jsxRuntimeExports.jsx(Tje,{onClick:()=>m(),className:"mly6jxa94 mly1v9usgg"})})]}),_ie={main:{borderRadius:"mly12oqio5",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,border:"mlyvckdp7",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,padding:"mlybsehbd",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,display:"mlyrvj5dj",minHeight:"mly2lwn1j",$$css:!0},content:{outline:"mly1a2a7pz",outlineColor:null,outlineOffset:null,outlineStyle:null,outlineWidth:null,display:"mly78zum5",flexWrap:"mly1a02dak",gap:"mly1ed6fcf",rowGap:null,columnGap:null,borderColor:"mly1akygb0 mlyetl2wx",borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,$$css:!0},pill:{backgroundColor:"mlyy9rfsq",borderRadius:"mly1sxf85j",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,color:"mly1xre2ib",display:"mly78zum5",alignItems:"mly6s0dn4",gap:"mly1nejdyq",rowGap:null,columnGap:null,padding:"mly1e41zw8",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,textTransform:"mly6mezaz",cursor:"mly1ypdohk",height:"mly1qx5ct2",whiteSpace:"mlyuxw1ft",$$css:!0}},dpr={default:{"--mlyvygx4q":"mly1izbou4","--mly13n7235":"mly8bgh0r",$$css:!0},purple:{"--mlyvygx4q":"mly1f8soc4","--mly13n7235":"mly1r5zvhd",$$css:!0},green:{"--mlyvygx4q":"mlyf8wvcd","--mly13n7235":"mly1u6t2w6",$$css:!0},cyan:{"--mlyvygx4q":"mlyrtwgpv","--mly13n7235":"mlys5r2en",$$css:!0}};function fpr(a,u){const{topValues:d}=Pe.useContext(ai);if(d&&a){let f=d;if(u){const m=d.find(g=>g.fieldName===u);m?f=[m]:f=[]}return a=a.toLowerCase(),{searchResults:f.reduce((m,g)=>(g.values.filter(x=>{var b;return((b=x.fieldValue)==null?void 0:b.toLowerCase().includes(a))??!1}).forEach(x=>{m.push({fieldValue:x.fieldValue,fieldName:g.fieldName,fieldType:"string",weight:x.weight})}),m),[]),isLoading:!1}}return{searchResults:void 0,isLoading:!1}}function VBe({onClick:a,search:u,fieldPath:d,ref:f,customStyle:m,showPath:g=!0}){const{searchResults:x}=fpr(u,d),b=Pe.useMemo(()=>x&&x.filter(v=>v.fieldType==="string"&&v.fieldValue!==null).sort((v,_)=>_.weight-v.weight).slice(0,100),[x]);return D.jsxRuntimeExports.jsx("div",{ref:f,...Lt.props(m),children:b?.length?b.map(v=>D.jsxRuntimeExports.jsxs("div",{role:"menuitem",tabIndex:-1,...Lt.props(Al.item,QBe.valueItem),onClick:()=>a(v),children:[D.jsxRuntimeExports.jsx(hpr,{value:v}),g?D.jsxRuntimeExports.jsx("div",{className:"mly1jwwhvr",children:v.fieldName}):null]},v.fieldName+":"+v.fieldValue)):u?D.jsxRuntimeExports.jsx("div",{...Lt.props(Al.item),"data-disabled":"true",children:"No matching values"}):null})}function hpr({value:a}){return D.jsxRuntimeExports.jsx($s,{label:a.fieldValue??"∅",icon:"filter",color:"purple",customStyle:QBe.token})}const QBe={valueItem:{height:"mly1qx5ct2",paddingTop:"mly1y1aw1k",paddingBottom:"mlywib8y2",display:"mly78zum5",justifyContent:"mly1qughib",cursor:"mly1ypdohk",$$css:!0},token:{cursor:"mly1ypdohk",$$css:!0}},x5={is_equal_to:{operator:"="},starts_with:{operator:"starts"},ends_with:{operator:"ends"},contains:{operator:"contains"},matches:{operator:"~"},is_blank:{operator:"empty"},is_null:{operator:"null"},is_not_equal_to:{operator:"=",not:!0},does_not_start_with:{operator:"starts",not:!0},does_not_end_with:{operator:"ends",not:!0},does_not_contain:{operator:"contains",not:!0},does_not_match:{operator:"~",not:!0},is_not_blank:{operator:"empty",not:!0},is_not_null:{operator:"null",not:!0}};function ppr(a){for(const u in x5){const d=u,f=x5[d],m="not"in a?a.not:!1,g="not"in f?f.not:!1;if(f.operator===a.operator&&g===m)return d}throw new Error(`Unhandled string filter type ${a.operator}`)}const mpr=({filter:a,setFilter:u,field:d,path:f})=>{a??(a={operator:"=",values:[]});const[m,g]=Pe.useState(""),x=Pe.useRef(null),b=ppr(a),[v,_]=Pe.useState(a),S=w=>{R(ypr(v,w))},R=w=>{_(w),u(w)};return D.jsxRuntimeExports.jsxs("div",{...Lt.props(Ri.editor),children:[D.jsxRuntimeExports.jsx(Hx,{value:b,onChange:S,options:[{value:"is_equal_to",label:"is"},{value:"starts_with",label:"starts with"},{value:"ends_with",label:"ends with"},{value:"contains",label:"contains"},{value:"is_blank",label:"is blank"},{value:"is_null",label:"is null"},{value:"matches",label:"matches"},{value:"is_not_equal_to",label:"is not"},{value:"does_not_start_with",label:"does not start with"},{value:"does_not_end_with",label:"does not end with"},{value:"does_not_contain",label:"does not contain"},{value:"is_not_blank",label:"is not blank"},{value:"is_not_null",label:"is not null"},{value:"does_not_match",label:"does not match"}],customStyle:Ri.filterTypeDropdown},"type"),v.operator==="="||v.operator==="starts"||v.operator==="ends"||v.operator==="contains"?D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx(V9e,{values:v.values,setValues:w=>R({...v,values:w}),searchValue:m,setSearchValue:g,focusElement:x},"editor"),D.jsxRuntimeExports.jsx("div",{style:{minHeight:0,display:"grid"},children:D.jsxRuntimeExports.jsx(VBe,{ref:x,search:m,fieldPath:[...f,d.name].join("."),onClick:w=>{w.fieldValue&&(R({...v,values:[...v.values,w.fieldValue]}),g(""))},customStyle:vpr.valueList,showPath:!1})})]}):v.operator==="~"?D.jsxRuntimeExports.jsx(V9e,{values:v.escaped_values,setValues:w=>R({...v,escaped_values:w}),escape:!0,searchValue:m,setSearchValue:g},"editor"):null]})};function V9e({color:a,values:u,setValues:d,searchValue:f,setSearchValue:m,focusElement:g}){return D.jsxRuntimeExports.jsx(WBe,{color:a,values:u,setValues:d,value:f,setValue:m,focusElement:g})}function gpr(a){return a.replace(/(["%_^])/g,"^$1")}function xpr(a){return a.replace(/\^(["%_^])/g,"$1")}function ypr(a,u){const d="values"in a?a.values:"escaped_values"in a?a.escaped_values.map(xpr):[];switch(u){case"is_equal_to":case"is_not_equal_to":case"starts_with":case"does_not_start_with":case"contains":case"does_not_contain":case"ends_with":case"does_not_end_with":return{...x5[u],values:d};case"is_blank":case"is_not_blank":case"is_null":case"is_not_null":return{...x5[u]};case"matches":case"does_not_match":return{...x5[u],escaped_values:d.map(gpr)}}}const vpr={valueList:{maxHeight:"mly3d5gib",width:"mly1hfn5x7",overflow:"mlyysyzu8",overflowX:null,overflowY:null,$$css:!0}},Q9e=a=>a==="range",W_={is_equal_to:{operator:"="},is_not_equal_to:{operator:"=",not:!0},is_greater_than:{operator:">"},is_less_than:{operator:"<"},is_greater_than_or_equal_to:{operator:">="},is_less_than_or_equal_to:{operator:"<="},is_between:{operator:"range",startOperator:">=",endOperator:"<="},is_null:{operator:"null"},is_not_null:{operator:"null",not:!0}};function bpr(a){for(const u in W_){const d=u,f=W_[d],m="not"in a?a.not:!1,g="not"in f?f.not:!1;if(f.operator===a.operator&&g===m)return d}throw new Error(`Unhandled number filter type ${a.operator}`)}const Epr=({filter:a,setFilter:u})=>{a??(a={operator:"=",values:[]});const[d,f]=Pe.useState(Q9e(a.operator)?["0","0"]:["0"]),[m,g]=Pe.useState(""),x=_=>{const S=a,R=Apr(a,_);R.operator!=="null"&&(!S.values||S.values.length===0)&&(R.values=["0"]),u(R)},b=bpr(a);Pe.useEffect(()=>{if(g(""),Q9e(a.operator)){const _=a;f([_.startValue,_.endValue])}else{const _=a;if(_.values){let S=_.values;(!S||S.length===0)&&(S=["0"]),f(S)}else f(["0"])}},[a]);const v=_=>{f(_),_.some(R=>isNaN(parseFloat(R)))?g("Every value must be numeric."):_.length===0?g("Requires at least one numeric value."):(g(""),a.operator==="range"?u({...a,startOperator:">=",startValue:_[0],endOperator:"<=",endValue:_[1]}):u({...a,values:_}))};return D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx(Hx,{value:b,onChange:x,options:[{value:"is_equal_to",label:"is"},{value:"is_not_equal_to",label:"is not"},{value:"is_greater_than",label:"is greater than"},{value:"is_less_than",label:"is less than"},{value:"is_greater_than_or_equal_to",label:"is greater than or equal to"},{value:"is_less_than_or_equal_to",label:"is less than or equal to"},{value:"is_between",label:"between"},{value:"is_null",label:"is null"},{value:"is_not_null",label:"is not null"}]}),m?D.jsxRuntimeExports.jsx(n$,{errorMessage:m}):null,_pr(a,d,v)]})};function _pr(a,u,d){switch(a.operator){case"!=":case"=":return D.jsxRuntimeExports.jsx(Spr,{values:u.map(String),setValues:f=>d(f),type:"number"});case">":case"<":case">=":case"<=":return D.jsxRuntimeExports.jsx(ine,{value:u[0],setValue:f=>d([f]),type:"number"});case"range":return D.jsxRuntimeExports.jsxs("div",{className:"mlyrvj5dj mly15396mt mly167g77z mlypqajaz",children:[D.jsxRuntimeExports.jsx(ine,{value:u[0],setValue:f=>d([f,u[1]]),type:"number"}),D.jsxRuntimeExports.jsx("span",{children:"to"}),D.jsxRuntimeExports.jsx(ine,{value:u[1],setValue:f=>d([u[0],f]),type:"number"})]})}return null}function ine({value:a,setValue:u}){return D.jsxRuntimeExports.jsx("input",{type:"number",value:a,onChange:d=>{u(d.target.value)},className:"mly27xtdb mly12oqio5 mlyizdh9v mly34lxi1"})}function Spr({values:a,setValues:u}){return D.jsxRuntimeExports.jsx(WBe,{values:a,setValues:u,type:"number"})}function Apr(a,u){const d="values"in a?a.values:[];switch(u){case"is_equal_to":case"is_not_equal_to":return{...W_[u],values:d};case"is_greater_than":case"is_less_than":case"is_greater_than_or_equal_to":case"is_less_than_or_equal_to":return{...W_[u],values:d.length>0?[d[0]]:d};case"is_null":case"is_not_null":return{...W_[u]};case"is_between":return{...W_[u],startValue:d.length>0?d[0]:"0",endValue:d.length>1?d[1]:"0"}}}function Cpr(a){return a.operator==="null"&&a.not?"-null":a.operator}function Rpr(a,u){return a.operator==="last"||a.operator==="next"||a.operator==="in_last"?a.units:a.operator==="to"?nF(a.fromMoment,u):a.operator==="before"&&a.before.moment==="literal"?nF(a.before,u):a.operator==="after"?nF(a.after,u):a.operator==="in"?nF(a.in,u):u?"second":"day"}const Y9e=({filter:a,setFilter:u,isDateTime:d})=>{a??(a={operator:"last",n:"7",units:"day"});const[f,m]=Pe.useState(Rpr(a,d)),[g,x]=Pe.useState(a),b=R=>{v(Lpr(g,R,f))},v=R=>{x(R),u(R)},_=d?"second":"day",S=Cpr(g);return D.jsxRuntimeExports.jsxs("div",{...Lt.props(Ri.editor),children:[D.jsxRuntimeExports.jsxs("div",{...Lt.props(Ri.editorRow),children:[D.jsxRuntimeExports.jsx(Hx,{value:S,onChange:b,options:[{value:"in_last",label:"last"},{value:"last",label:"last complete"},{value:"next",label:"next complete"},{value:"after",label:"after"},{value:"before",label:"before"},{value:"in",label:"is"},{value:"to",label:"between"},{value:"null",label:"null"},{value:"-null",label:"not null"}],customStyle:Ri.editorCell}),Tpr(g,v,f,m,_)]}),wpr(g,v,f,m,_)]})};function Tpr(a,u,d,f,m){switch(a.operator){case"in_last":case"last":case"next":return D.jsxRuntimeExports.jsx(Opr,{currentFilter:a,maxLevel:m,updateFilter:u,units:d,setUnits:f});case"after":case"before":case"to":case"in":return D.jsxRuntimeExports.jsx(Npr,{currentFilter:a,maxLevel:m,updateFilter:u,units:d,setUnits:f})}return null}function wpr(a,u,d,f,m){switch(a.operator){case"after":case"before":case"in":return D.jsxRuntimeExports.jsx(Dpr,{currentFilter:a,maxLevel:m,updateFilter:u,units:d,setUnits:f});case"to":return D.jsxRuntimeExports.jsx(kpr,{currentFilter:a,maxLevel:m,updateFilter:u,units:d,setUnits:f})}return null}const AM=[{value:"year",label:"years"},{value:"quarter",label:"quarters"},{value:"month",label:"months"},{value:"week",label:"weeks"},{value:"day",label:"days"}],YBe=[{value:"hour",label:"hours"},{value:"minute",label:"minutes"},{value:"second",label:"seconds"}];function Opr({currentFilter:a,updateFilter:u,setUnits:d,maxLevel:f}){const{n:m,units:g}=a,x=f==="day"?AM:[...AM,...YBe],b=_=>{const S=_.target.value;u({...a,n:S})},v=_=>{d(_),u({...a,units:_})};return D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx("input",{type:"number",value:m,...Lt.props(Ri.input,Ri.editorCell),onChange:b}),D.jsxRuntimeExports.jsx(Hx,{options:x,value:g,onChange:v,customStyle:Ri.editorCell})]})}function Npr({currentFilter:a,updateFilter:u,units:d,setUnits:f,maxLevel:m}){const g=m==="day"?AM:[...AM,...YBe],x=b=>{switch(f(b),a.operator){case"after":u({...a,after:zO(a.after,b)});return;case"before":u({...a,before:zO(a.before,b)});return;case"to":u({...a,fromMoment:zO(a.fromMoment,b),toMoment:zO(a.toMoment,b)});return;case"in":{u({...a,in:zO(a.in,b)});return}}};return D.jsxRuntimeExports.jsx(Hx,{options:g,value:d,onChange:x,customStyle:Ri.editorCell})}function Dpr({currentFilter:a,updateFilter:u,units:d,maxLevel:f}){const m=a.operator==="after"?a.after:a.operator==="before"?a.before:a.in,g=V_(m),x=b=>{u({...a,[a.operator]:pS(b,d)})};return D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx("div",{...Lt.props(Ri.editorRow),children:D.jsxRuntimeExports.jsx(gM,{value:g,setValue:x,units:d,customStyle:{...Ri.input,...Ri.editorCell}})}),D.jsxRuntimeExports.jsx("div",{...Lt.props(Ri.editorRow),children:D.jsxRuntimeExports.jsx(doe,{value:g,setValue:x,units:d,maxLevel:f,customStyle:Ri.editorCell})})]})}function kpr({currentFilter:a,updateFilter:u,units:d,maxLevel:f}){const{fromMoment:m,toMoment:g}=a,x=V_(m),b=V_(g),[v,_]=Pe.useState(x),[S,R]=Pe.useState("from"),w=P=>{u({...a,fromMoment:pS(P,d)})},N=P=>{u({...a,toMoment:pS(P,d)})},k=P=>{S==="from"?w(P):N(P),_(P)},B=P=>{if(R(P),P==="from"){const $=V_(m);_($)}else{const $=V_(g);_($)}};return D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsxs("div",{...Lt.props(Ri.editorRow),children:[D.jsxRuntimeExports.jsx(gM,{value:x,setValue:w,units:d,customStyle:{...Ri.input,...Ri.editorCell},onFocus:()=>B("from"),isActive:S==="from"}),D.jsxRuntimeExports.jsx(gM,{value:b,setValue:N,units:d,customStyle:{...Ri.input,...Ri.editorCell},onFocus:()=>B("to"),isActive:S==="to"})]}),D.jsxRuntimeExports.jsx("div",{...Lt.props(Ri.editorRow),children:D.jsxRuntimeExports.jsx(doe,{value:v,setValue:k,units:d,maxLevel:f,customStyle:Ri.editorCell})})]})}function pS(a,u){return{moment:"literal",literal:Vt.utc(a).format(fS[u]),units:u}}function V_(a){return a&&a.moment==="literal"?Vt.utc(a.literal,fS[a.units??"second"]).toDate():new Date}function zO(a,u){return pS(V_(a),u)}function Lpr(a,u,d){let f="7",m=pS(new Date,d),g=pS(new Date,d);switch(a.operator){case"in_last":case"last":case"next":f=a.n,d=a.units;break;case"after":m=a.after,g=a.after;break;case"before":m=a.before,g=a.before;break;case"to":m=a.fromMoment,g=a.toMoment;break}switch(u){case"in_last":case"last":case"next":return{operator:u,n:f,units:d};case"after":return{operator:u,after:m};case"before":return{operator:u,before:m};case"in":return{operator:u,in:m};case"to":return{operator:u,fromMoment:m,toMoment:g};case"null":return{operator:"null"};case"-null":return{operator:"null",not:!0}}return a}function Ipr({fieldInfo:a,path:u,filter:d,onFilterApply:f,onOpenChange:m}){const[g,x]=Pe.useState(d??Ppr(a)),b=()=>{m(!1)},v=()=>{f(g),m(!1)},_=k=>{x({kind:"boolean",parsed:k})},S=k=>{x({kind:"string",parsed:k})},R=k=>{x({kind:"number",parsed:k})},w=k=>{x({kind:"timestamp",parsed:k})},N=k=>{x({kind:"date",parsed:k})};return D.jsxRuntimeExports.jsxs("div",{...Lt.props(Fr.body,Ri.filterDialog),onKeyDown:k=>{k.key==="Enter"?v():k.key==="Esc"&&b()},children:[D.jsxRuntimeExports.jsx("div",{...Lt.props(Ri.filterDialogHeader),children:a.name}),g.kind==="boolean"&&D.jsxRuntimeExports.jsx(upr,{setFilter:_,filter:g.parsed??{operator:"null"}}),g.kind==="string"&&D.jsxRuntimeExports.jsx(mpr,{setFilter:S,filter:g.parsed??{operator:"null"},field:a,path:u}),g.kind==="number"&&D.jsxRuntimeExports.jsx(Epr,{setFilter:R,filter:g.parsed??{operator:"null"}}),g.kind==="date"&&D.jsxRuntimeExports.jsx(Y9e,{setFilter:N,filter:g.parsed??{operator:"null"},isDateTime:!1}),g.kind==="timestamp"&&D.jsxRuntimeExports.jsx(Y9e,{setFilter:w,filter:g.parsed??{operator:"null"},isDateTime:!0}),D.jsxRuntimeExports.jsxs("div",{...Lt.props(Ri.buttonGroup),children:[D.jsxRuntimeExports.jsx($i,{variant:"default",label:"Cancel",onClick:b,style:{flexGrow:1}}),D.jsxRuntimeExports.jsx($i,{variant:"primary",label:"Apply",onClick:v,style:{flexGrow:1}})]})]})}function Ppr(a){return a.type.kind==="string_type"?{kind:"string",parsed:{operator:"=",values:[]}}:a.type.kind==="boolean_type"?{kind:"boolean",parsed:{operator:"true"}}:a.type.kind==="number_type"?{kind:"number",parsed:{operator:">",values:["0"]}}:a.type.kind==="date_type"?{kind:"date",parsed:{operator:"last",n:"7",units:"day"}}:{kind:"timestamp",parsed:{operator:"last",n:"7",units:"day"}}}function U5({fieldInfo:a,path:u,filter:d,setFilter:f,trigger:m,anchor:g,layoutProps:x,onOpenChange:b}){const[v,_]=Pe.useState(!1),S=R=>{_(R),b?.(R)};return D.jsxRuntimeExports.jsxs(AN,{open:v,onOpenChange:S,modal:!0,children:[g?D.jsxRuntimeExports.jsx(O$e,{asChild:!0,children:g}):D.jsxRuntimeExports.jsx(T$,{asChild:!0,children:m}),D.jsxRuntimeExports.jsx(CN,{children:D.jsxRuntimeExports.jsx(w$,{...x,className:"mly78zum5 mlydt5ytf mly5n1uv4 mly12peec7 mlyur7f20",children:D.jsxRuntimeExports.jsx(Ipr,{fieldInfo:a,filter:d,path:u,onFilterApply:f,onOpenChange:S})})})]})}const jpr=a=>(a.kind==="dimension"||a.kind==="measure")&&(a.type.kind==="array_type"&&a.type.element_type.kind==="record_type"||a.type.kind==="record_type");function Ioe({view:a,fields:u,onAddOperation:d,search:f="",types:m,filter:g,isFilterOperation:x,customStyle:b}){const v=Pe.useMemo(()=>{const _=[],S=f.toLocaleLowerCase(),R=(w,N,k,B)=>{const P=epr(B).filter(z=>z.kind!=="join").filter(z=>z.name.toLocaleLowerCase().includes(S)&&w.includes(z.kind)).filter(z=>g?g(a,z,N):!0),$=B.filter(z=>z.kind==="join"),q=B.filter(jpr);P.length&&_.push({path:N,name:N.length?N.join(" > "):k,fields:P});for(const z of q)z.type.kind==="array_type"&&z.type.element_type.kind==="record_type"?R(w,[...N,z.name],z.name,z.type.element_type.fields.map(W=>({kind:z.kind,...W}))):z.type.kind==="record_type"&&R(w,[...N,z.name],z.name,z.type.fields.map(W=>({kind:z.kind,...W})));for(const z of $)R(w.filter(W=>W!=="view"),[...N,z.name],z.name,z.schema.fields)};return R(m,[],"Source",u),_},[u,g,f,a,m]);return D.jsxRuntimeExports.jsx("div",{...Lt.props(b),children:v.length?v.map(_=>D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsx("div",{...Lt.props(Al.item,sne.fieldItem),"data-disabled":"true",children:_.name}),_.fields.map(S=>x&&(S.kind==="dimension"||S.kind==="measure")?D.jsxRuntimeExports.jsx(U5,{fieldInfo:S,path:_.path,setFilter:R=>d(S,_.path,R),anchor:D.jsxRuntimeExports.jsx("div",{role:"menuitem",tabIndex:-1,...Lt.props(Al.item,sne.fieldItem),children:D.jsxRuntimeExports.jsx(loe,{asChild:!0,children:D.jsxRuntimeExports.jsx(hS,{field:S,tooltip:D.jsxRuntimeExports.jsx(SM,{field:S,path:_.path}),tooltipProps:{side:"right",align:"start",sideOffset:4,alignOffset:24}})})}),layoutProps:{align:"start",side:"right",sideOffset:2,alignOffset:4}},_.name+":"+S.name):D.jsxRuntimeExports.jsx("div",{role:"menuitem",tabIndex:-1,...Lt.props(Al.item,sne.fieldItem),children:D.jsxRuntimeExports.jsx(hS,{field:S,onClick:()=>d(S,_.path),tooltip:D.jsxRuntimeExports.jsx(SM,{field:S,path:_.path}),tooltipProps:{side:"right",align:"start",sideOffset:4,alignOffset:24}})},_.name+":"+S.name))]},_.name)):D.jsxRuntimeExports.jsx("div",{...Lt.props(Al.item),"data-disabled":"true",children:"No matching fields"})})}const sne={fieldItem:{height:"mly1qx5ct2",paddingTop:"mly1y1aw1k",paddingBottom:"mlywib8y2",$$css:!0}};function Fpr({view:a,fields:u,types:d,filter:f,onAddOperation:m,isFilterOperation:g}){const[x,b]=Pe.useState("");return D.jsxRuntimeExports.jsxs("div",{...Lt.props(Al.content,Mpr.content),role:"menu",children:[D.jsxRuntimeExports.jsx("div",{...Lt.props(Al.item),children:D.jsxRuntimeExports.jsx(c$,{icon:"search",value:x,onChange:b,placeholder:"Search..."})}),D.jsxRuntimeExports.jsx(Y_,{}),D.jsxRuntimeExports.jsx("div",{className:"mly1odjw0f",children:D.jsxRuntimeExports.jsx(Ioe,{view:a,fields:u,search:x,types:d,filter:f,onAddOperation:m,isFilterOperation:g})})]})}const Mpr={content:{maxHeight:"mly3d5gib",$$css:!0}};function M$(a,u){return[...a||[],u].join(".")}function $pr(a){return a.operations.items.find(u=>u instanceof Zr.ASTLimitViewOperation)!==void 0}function Bpr(a,u){return a.operations.items.find(d=>d instanceof Zr.ASTOrderByViewOperation&&d.name===u)!==void 0}function KBe(a){const u=new Map;for(const d of a.operations.items)if(d instanceof Zr.ASTGroupByViewOperation||d instanceof Zr.ASTAggregateViewOperation){const f=d.field.getReference();f&&u.set(d.name,M$(f.path,f.name))}return u}function qpr(a,u,d){const f=KBe(a),m=M$(u,d);return!!a.operations.items.find(g=>g instanceof Zr.ASTOrderByViewOperation&&f.has(g.name)?m===f.get(g.name):!1)}function Upr(a,u,d,f){return u===f&&(a||[]).join(".")===(d||[]).join(".")}function zpr(a,u,d){return!!a.operations.items.find(m=>{if(m instanceof Zr.ASTGroupByViewOperation||m instanceof Zr.ASTAggregateViewOperation){const g=m.field.getReference();return g?Upr(u,d,g.path,g.name):!1}return!1})}function Hpr(a,u){return a.operations.items.reduce((d,f)=>{if(f instanceof Zr.ASTNestViewOperation&&f.name===u)do d+=1;while(a.hasFieldNamed(`${u} ${d}`));return d},1)}function $$(a,u,d){const f=u.kind==="dimension"?u.type.kind:"string",m=a.getOrAddDefaultSegment(),{fields:g}=a.getOutputSchema();let x;g.find(b=>b.name===u.name)&&(x=koe(g,u.name,d)),f==="date_type"?m.addDateGroupBy(u.name,d,"day"):f==="timestamp_type"?m.addTimestampGroupBy(u.name,d,"second"):m.addGroupBy(u.name,d,x)}function B$(a,u,d){const f=a.getOrAddDefaultSegment(),{fields:m}=a.getOutputSchema();let g;m.find(x=>x.name===u.name)&&(g=koe(m,u.name,d)),f.addAggregate(u.name,d,g)}function Poe(a,u){const d=a.getOrAddDefaultSegment(),{fields:f}=a.getOutputSchema();let m;f.find(g=>g.name===u.name)&&(m=koe(f,u.name)),d.addNest(u.name,m)}function Gpr(a,u,d,f="desc"){const m=M$(u,d);let g=d;const x=a.getOrAddDefaultSegment(),b=KBe(x);for(const v of b.entries())if(v[1]===m){g=v[0];break}x.addOrderBy(g,f)}function Wpr(a,u,d="desc"){a.getOrAddDefaultSegment().addOrderBy(u.name,d)}function XBe(a,u,d,f){const m=a.getOrAddDefaultSegment();u.kind==="dimension"?m.addWhere(u.name,d,f):m.addHaving(u.name,d,f)}function h0(a){if(!a)return;const u=BBe(a);if(u instanceof Zr.ASTSegmentViewDefinition)return u;if(u instanceof Zr.ASTRefinementViewDefinition&&u.refinement instanceof Zr.ASTSegmentViewDefinition)return u.refinement}function Vpr({actionTitle:a,view:u,fields:d,title:f,types:m,onClick:g}){const[x,b]=Y.useState(!1),v=h0(u),_=(S,R,w)=>!v?.hasField(R.name,w)&&kx(R);return D.jsxRuntimeExports.jsxs("div",{...Lt.props(Id.title,f0.main),children:[D.jsxRuntimeExports.jsx("div",{children:f}),D.jsxRuntimeExports.jsx("div",{...Lt.props(f0.hoverActions,x?f0.hoverOpen:void 0),children:D.jsxRuntimeExports.jsxs(AN,{onOpenChange:b,children:[D.jsxRuntimeExports.jsx(T$,{asChild:!0,children:D.jsxRuntimeExports.jsx("div",{className:"mly1md70p1 mly1aejobo mlyq1n1xh mly1ypdohk",children:a})}),D.jsxRuntimeExports.jsx(CN,{children:D.jsxRuntimeExports.jsx(coe,{side:"right",align:"start",alignOffset:-16,children:D.jsxRuntimeExports.jsx(Fpr,{view:u,fields:d,types:m,filter:_,onAddOperation:g})})})]})})]})}var joe="Dialog",[JBe,Iyr]=Md(joe),[Qpr,Bd]=JBe(joe),ZBe=a=>{const{__scopeDialog:u,children:d,open:f,defaultOpen:m,onOpenChange:g,modal:x=!0}=a,b=Y.useRef(null),v=Y.useRef(null),[_=!1,S]=Dx({prop:f,defaultProp:m,onChange:g});return D.jsxRuntimeExports.jsx(Qpr,{scope:u,triggerRef:b,contentRef:v,contentId:ic(),titleId:ic(),descriptionId:ic(),open:_,onOpenChange:S,onOpenToggle:Y.useCallback(()=>S(R=>!R),[S]),modal:x,children:d})};ZBe.displayName=joe;var eqe="DialogTrigger",Ypr=Y.forwardRef((a,u)=>{const{__scopeDialog:d,...f}=a,m=Bd(eqe,d),g=Cn(u,m.triggerRef);return D.jsxRuntimeExports.jsx(rn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":m.open,"aria-controls":m.contentId,"data-state":$oe(m.open),...f,ref:g,onClick:xr(a.onClick,m.onOpenToggle)})});Ypr.displayName=eqe;var Foe="DialogPortal",[Kpr,tqe]=JBe(Foe,{forceMount:void 0}),rqe=a=>{const{__scopeDialog:u,forceMount:d,children:f,container:m}=a,g=Bd(Foe,u);return D.jsxRuntimeExports.jsx(Kpr,{scope:u,forceMount:d,children:Y.Children.map(f,x=>D.jsxRuntimeExports.jsx(Do,{present:d||g.open,children:D.jsxRuntimeExports.jsx(kS,{asChild:!0,container:m,children:x})}))})};rqe.displayName=Foe;var CM="DialogOverlay",nqe=Y.forwardRef((a,u)=>{const d=tqe(CM,a.__scopeDialog),{forceMount:f=d.forceMount,...m}=a,g=Bd(CM,a.__scopeDialog);return g.modal?D.jsxRuntimeExports.jsx(Do,{present:f||g.open,children:D.jsxRuntimeExports.jsx(Xpr,{...m,ref:u})}):null});nqe.displayName=CM;var Xpr=Y.forwardRef((a,u)=>{const{__scopeDialog:d,...f}=a,m=Bd(CM,d);return D.jsxRuntimeExports.jsx(mN,{as:Tx,allowPinchZoom:!0,shards:[m.contentRef],children:D.jsxRuntimeExports.jsx(rn.div,{"data-state":$oe(m.open),...f,ref:u,style:{pointerEvents:"auto",...f.style}})})}),Wv="DialogContent",iqe=Y.forwardRef((a,u)=>{const d=tqe(Wv,a.__scopeDialog),{forceMount:f=d.forceMount,...m}=a,g=Bd(Wv,a.__scopeDialog);return D.jsxRuntimeExports.jsx(Do,{present:f||g.open,children:g.modal?D.jsxRuntimeExports.jsx(Jpr,{...m,ref:u}):D.jsxRuntimeExports.jsx(Zpr,{...m,ref:u})})});iqe.displayName=Wv;var Jpr=Y.forwardRef((a,u)=>{const d=Bd(Wv,a.__scopeDialog),f=Y.useRef(null),m=Cn(u,d.contentRef,f);return Y.useEffect(()=>{const g=f.current;if(g)return s$(g)},[]),D.jsxRuntimeExports.jsx(sqe,{...a,ref:m,trapFocus:d.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:xr(a.onCloseAutoFocus,g=>{var x;g.preventDefault(),(x=d.triggerRef.current)==null||x.focus()}),onPointerDownOutside:xr(a.onPointerDownOutside,g=>{const x=g.detail.originalEvent,b=x.button===0&&x.ctrlKey===!0;(x.button===2||b)&&g.preventDefault()}),onFocusOutside:xr(a.onFocusOutside,g=>g.preventDefault())})}),Zpr=Y.forwardRef((a,u)=>{const d=Bd(Wv,a.__scopeDialog),f=Y.useRef(!1),m=Y.useRef(!1);return D.jsxRuntimeExports.jsx(sqe,{...a,ref:u,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:g=>{var x,b;(x=a.onCloseAutoFocus)==null||x.call(a,g),g.defaultPrevented||(f.current||(b=d.triggerRef.current)==null||b.focus(),g.preventDefault()),f.current=!1,m.current=!1},onInteractOutside:g=>{var x,b;(x=a.onInteractOutside)==null||x.call(a,g),g.defaultPrevented||(f.current=!0,g.detail.originalEvent.type==="pointerdown"&&(m.current=!0));const v=g.target;((b=d.triggerRef.current)==null?void 0:b.contains(v))&&g.preventDefault(),g.detail.originalEvent.type==="focusin"&&m.current&&g.preventDefault()}})}),sqe=Y.forwardRef((a,u)=>{const{__scopeDialog:d,trapFocus:f,onOpenAutoFocus:m,onCloseAutoFocus:g,...x}=a,b=Bd(Wv,d),v=Y.useRef(null),_=Cn(u,v);return i$(),D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx(pN,{asChild:!0,loop:!0,trapped:f,onMountAutoFocus:m,onUnmountAutoFocus:g,children:D.jsxRuntimeExports.jsx(OS,{role:"dialog",id:b.contentId,"aria-describedby":b.descriptionId,"aria-labelledby":b.titleId,"data-state":$oe(b.open),...x,ref:_,onDismiss:()=>b.onOpenChange(!1)})}),D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx(tmr,{titleId:b.titleId}),D.jsxRuntimeExports.jsx(nmr,{contentRef:v,descriptionId:b.descriptionId})]})]})}),Moe="DialogTitle",oqe=Y.forwardRef((a,u)=>{const{__scopeDialog:d,...f}=a,m=Bd(Moe,d);return D.jsxRuntimeExports.jsx(rn.h2,{id:m.titleId,...f,ref:u})});oqe.displayName=Moe;var aqe="DialogDescription",lqe=Y.forwardRef((a,u)=>{const{__scopeDialog:d,...f}=a,m=Bd(aqe,d);return D.jsxRuntimeExports.jsx(rn.p,{id:m.descriptionId,...f,ref:u})});lqe.displayName=aqe;var uqe="DialogClose",emr=Y.forwardRef((a,u)=>{const{__scopeDialog:d,...f}=a,m=Bd(uqe,d);return D.jsxRuntimeExports.jsx(rn.button,{type:"button",...f,ref:u,onClick:xr(a.onClick,()=>m.onOpenChange(!1))})});emr.displayName=uqe;function $oe(a){return a?"open":"closed"}var cqe="DialogTitleWarning",[Pyr,dqe]=rKt(cqe,{contentName:Wv,titleName:Moe,docsSlug:"dialog"}),tmr=({titleId:a})=>{const u=dqe(cqe),d=`\`${u.contentName}\` requires a \`${u.titleName}\` for the component to be accessible for screen reader users.
|
|
2880
2880
|
|
|
2881
2881
|
If you want to hide the \`${u.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
2882
2882
|
|
|
2883
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${u.docsSlug}`;return Y.useEffect(()=>{a&&(document.getElementById(a)||console.error(d))},[d,a]),null},rmr="DialogDescriptionWarning",nmr=({contentRef:a,descriptionId:u})=>{const f=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${dqe(rmr).contentName}}.`;return Y.useEffect(()=>{var m;const g=(m=a.current)==null?void 0:m.getAttribute("aria-describedby");u&&g&&(document.getElementById(u)||console.warn(f))},[f,a,u]),null},imr=ZBe,smr=rqe,omr=nqe,amr=iqe,lmr=oqe,umr=lqe;function fqe({rootQuery:a,view:u,target:d,open:f,setOpen:m}){const[g,x]=Pe.useState(""),{setQuery:b}=Pe.useContext(ai);if(Pe.useEffect(()=>{d&&x(d.name)},[d,f]),!d)return null;const v=()=>{d.name=g,b?.(a?.build()),m(!1)},{fields:_}=u.getOutputSchema(),S=g!==d.name&&_.some(R=>R.name===g);return D.jsxRuntimeExports.jsx(imr,{open:f,onOpenChange:m,children:D.jsxRuntimeExports.jsx(smr,{children:D.jsxRuntimeExports.jsx(omr,{className:"mly5uxqc1 mlyixxii4 mly13vifvy mlyu96u03 mly3m8u43 mly1ey2m1c mlyrvj5dj mly1ku5rj1 mly11uqc5h",children:D.jsxRuntimeExports.jsxs(amr,{...Lt.props(HO.content,Fr.body),children:[D.jsxRuntimeExports.jsxs(umr,{className:"mly1s85apg",children:["Rename ",d.name]}),D.jsxRuntimeExports.jsxs(lmr,{className:"mly1j61zf2 mly1ghz6dp",children:["Rename ",d.name]}),D.jsxRuntimeExports.jsxs("div",{className:"mlyqyf9gi mly78zum5 mlydt5ytf mly167g77z",children:[D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly167g77z",children:[D.jsxRuntimeExports.jsx("input",{value:g,onChange:R=>x(R.target.value),...Lt.props({...HO.editorCell,...HO.input}),onKeyDown:R=>{R.key==="Enter"?v():R.key==="Esc"&&m(!1)}}),S&&D.jsxRuntimeExports.jsx(n$,{errorMessage:"Name already in use"})]}),D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly167g77z",children:[D.jsxRuntimeExports.jsx($i,{label:"Cancel",onClick:()=>m(!1),customStyle:HO.editorCell}),D.jsxRuntimeExports.jsx($i,{variant:"primary",label:"Rename",onClick:v,customStyle:HO.editorCell,disabled:S})]})]})]})})})})}const HO={content:{display:"mly78zum5",flexDirection:"mlydt5ytf",boxShadow:"mly5n1uv4",backgroundColor:"mly12peec7",borderRadius:"mlyur7f20",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,padding:"mlye8ttls",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,minWidth:"mlylm99nl",maxWidth:"mly1jkqq1h",gap:"mly167g77z",rowGap:null,columnGap:null,$$css:!0},editorCell:{flexGrow:"mly1iyjqo2",$$css:!0},input:{border:"mly2yh2zd",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,color:"mlyizdh9v",padding:"mly9cpjcd",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,borderRadius:"mly1sxf85j",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,$$css:!0}};function hqe({rootQuery:a,segment:u,view:d,operations:f,kind:m}){const{setQuery:g}=Pe.useContext(ai),x=Ofr(wfr(Ooe)),b=Pe.useMemo(()=>f.map(R=>({id:R.name,operation:R})),[f]);if(f.length===0)return null;function v(R){const N=u.operations.items.filter(P=>P instanceof Zr.ASTAggregateViewOperation||P instanceof Zr.ASTGroupByViewOperation||P instanceof Zr.ASTNestViewOperation).map(P=>P.name),{active:k,over:B}=R;if(B&&k.id!==B.id){const P=N.indexOf(k.id),$=N.indexOf(B.id);u.reorderFields(Noe(N,P,$)),g?.(a.build())}}const{fields:_}=eb(d),S=m==="group_by"?{title:"group by",actionTitle:"Add group by",types:["dimension"],onClick:(R,w)=>{$$(d,R,w),g?.(a.build())}}:{title:"aggregate",actionTitle:"Add aggregate",types:["measure"],onClick:(R,w)=>{B$(d,R,w),g?.(a.build())}};return D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsx(Vpr,{rootQuery:a,view:d,fields:_,...S}),D.jsxRuntimeExports.jsx("div",{...Lt.props(Id.tokenContainer),children:D.jsxRuntimeExports.jsx(Lhr,{sensors:x,collisionDetection:Ifr,onDragEnd:v,children:D.jsxRuntimeExports.jsx(Hhr,{items:b,children:b.map(R=>D.jsxRuntimeExports.jsx(dmr,{rootQuery:a,id:R.id,color:m==="group_by"?"cyan":"green",view:d,operation:R.operation},R.id))})})})]})}const cmr=[];function dmr({rootQuery:a,id:u,view:d,operation:f,color:m}){var g;const{setQuery:x}=Pe.useContext(ai),b=f.getFieldInfo(),v=((g=f.field.getReference())==null?void 0:g.path)??cmr,{attributes:_,listeners:S,setNodeRef:R,transform:w,transition:N}=Xhr({id:u,data:{name:b.name}}),[k,B]=Pe.useState(!1),[P,$]=Pe.useState(),[q,z]=Pe.useState(!1),W={transform:B5.Transform.toString(w),transition:N},X=Pe.useMemo(()=>D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx(boe,{trigger:D.jsxRuntimeExports.jsx($i,{variant:"flat",icon:"meatballs",size:"compact",tooltip:"More Actions"}),onOpenChange:z,children:[D.jsxRuntimeExports.jsx(M5,{label:"Rename",onClick:()=>{$(f),B(!0)}},"rename")]},[...v,b.name].join(".")),D.jsxRuntimeExports.jsx(DN,{onClick:()=>{f.delete(),x?.(a?.build())}})]}),[b,f,v,a,x]),J=pmr(b,f.field);let ee="orderBy";return(b.kind==="dimension"||b.kind==="measure")&&(ee=I$(b.type.kind)),D.jsxRuntimeExports.jsxs("div",{id:u,ref:R,style:W,children:[J?D.jsxRuntimeExports.jsxs(hN,{customStyle:mmr.tokenGroup,children:[D.jsxRuntimeExports.jsx($s,{color:m,icon:ee,label:b.name,dragProps:{attributes:_,listeners:S}}),D.jsxRuntimeExports.jsx(d$,{color:m,value:J.value,onChange:fe=>{f.field.expression instanceof Zr.ASTTimeTruncationExpression&&(f.field.expression.truncation=fe),x?.(a.build())},items:J.options})]}):D.jsxRuntimeExports.jsx(hS,{field:b,color:m,hoverActionsVisible:q,hoverActions:X,tooltip:D.jsxRuntimeExports.jsx(SM,{field:b,path:v}),tooltipProps:{side:"right",align:"start",alignOffset:28},dragProps:{attributes:_,listeners:S}}),D.jsxRuntimeExports.jsx(fqe,{rootQuery:a,view:d,target:P,open:k,setOpen:B})]})}const fmr=["day","week","month","quarter","year"],hmr=["second","minute","hour","day","week","month","quarter","year"];function pmr(a,u){return a.kind!=="dimension"||!(u.expression instanceof Zr.ASTTimeTruncationExpression)?null:a.type.kind==="timestamp_type"?{value:a.type.timeframe??"second",options:hmr.map(d=>({label:d,value:d}))}:a.type.kind==="date_type"?{value:a.type.timeframe??"day",options:fmr.map(d=>({label:d,value:d}))}:null}const mmr={tokenGroup:{display:"mly78zum5",$$css:!0}};function gmr({rootQuery:a,segment:u,view:d,groupBys:f}){return D.jsxRuntimeExports.jsx(hqe,{rootQuery:a,segment:u,view:d,operations:f,kind:"group_by"})}class xmr extends Y.Component{constructor(u){super(u),this.state={hasError:!1}}static getDerivedStateFromError(u){return{hasError:!0}}componentDidCatch(u,d){console.error(u,d)}render(){return this.state.hasError?this.props.fallback:this.props.children}}const pqe=(a,u)=>{if(a.parsed===null)return{op:"",value:u};let d="",f=u;switch(a.kind){case"boolean":{const m=a.parsed,{operator:g,not:x}=m;d=x?"is not":"is",f=g}break;case"string":{const m=a.parsed,{operator:g}=m;switch(g){case"~":d="is like",f=m.escaped_values.join(", ");break;case"=":{const{not:x,values:b}=m;d=x?"is not":"is",f=b.join(", ")}break;case"contains":{const{not:x,values:b}=m;d=x?"does not contain":"contains",f=b.join(", ")}break;case"starts":{const{not:x,values:b}=m;d=x?"does not start with":"starts with",f=b.join(", ")}break;case"ends":{const{not:x,values:b}=m;d=x?"does not end with":"ends with",f=b.join(", ")}break;case"empty":{const{not:x}=m;d=x?"is not empty":"is empty",f=""}break;case"null":{const{not:x}=m;d=x?"is not":"is",f="null"}break}}break;case"number":{const m=a.parsed,{operator:g}=m;switch(g){case"=":case"!=":case"<=":case">=":case"<":case">":d=g,f=m.values.join(", ");break;case"range":d="in between",f=m.startValue+" and "+m.endValue;break;case"null":d=m.not?"is not":"is",f="null";break}}break;case"date":case"timestamp":{const m=a.parsed,{operator:g}=m;switch(g){case"after":{const{not:x}=m;d=`is${x?" not":""} after`,f=one(m.after)}break;case"before":{const{not:x}=m;d=`is${x?" not":""} before`,f=one(m.before)}break;case"in":{const{not:x}=m;d=`is${x?" not":""} in`,f=one(m.in)}break;case"in_last":{const{not:x}=m;d=`is${x?" not":""} in last`,f=m.n+" "+m.units}break;case"last":{const{not:x}=m;d=`is${x?" not":""} last complete`,f=m.n+" "+m.units}break;case"next":{const{not:x}=m;d=`is${x?" not":""} next complete`,f=m.n+" "+m.units}break;case"for":{const{not:x}=m;d=`is${x?" not":""} for`,f=m.n+" "+m.units}break;case"null":d=m.not?"is not":"is",f="null";break}}}return{op:d,value:f}};function one(a){return a?a.moment==="literal"?a.literal:a.moment==="now"?"now":a.moment:""}function ymr({rootQuery:a,filters:u}){const{setQuery:d}=Pe.useContext(ai);return u.length===0?null:D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsx("div",{...Lt.props(Id.title),children:"filter by"}),D.jsxRuntimeExports.jsx("div",{...Lt.props(Id.tokenContainer),children:u.map((f,m)=>D.jsxRuntimeExports.jsx(xmr,{fallback:D.jsxRuntimeExports.jsxs("div",{children:["Invalid filter",D.jsxRuntimeExports.jsx(DN,{onClick:()=>{f.delete(),d?.(a.build())}})]}),children:D.jsxRuntimeExports.jsx(vmr,{filterOperation:f,rootQuery:a})},m))})]})}function vmr({rootQuery:a,filterOperation:u}){const{setQuery:d}=Pe.useContext(ai),f=Pe.useCallback(R=>{u.filter instanceof Zr.ASTFilterWithFilterString&&u.filter.setFilter(R),d?.(a.build())},[u.filter,a,d]);if(!(u.filter instanceof Zr.ASTFilterWithFilterString))return null;const{fieldReference:m,filterString:g}=u.filter,x=u.filter.getFilter(),b=m.getFieldInfo();if(b.kind!=="dimension"&&b.kind!=="measure")throw new Error(`Invalid filter field kind: ${b.kind}`);const{op:v,value:_}=pqe(x,g),S=`${b.name} ${v} ${_}`;return D.jsxRuntimeExports.jsxs("div",{...Lt.props(f0.main),children:[D.jsxRuntimeExports.jsx(U5,{fieldInfo:b,path:m.path??[],filter:x,setFilter:f,trigger:D.jsxRuntimeExports.jsx($s,{icon:"filter",color:"cyan",label:S}),layoutProps:{align:"start",side:"bottom",sideOffset:1}}),D.jsxRuntimeExports.jsx("div",{...Lt.props(f0.hoverActions),children:D.jsxRuntimeExports.jsx(DN,{onClick:()=>{u.delete(),d?.(a.build())}})})]})}function bmr({rootQuery:a,limit:u}){const{setQuery:d}=Pe.useContext(ai);return u?D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsx("div",{...Lt.props(Id.title),children:"limit"}),D.jsxRuntimeExports.jsxs("div",{...Lt.props(f0.main),children:[D.jsxRuntimeExports.jsx(Fne,{type:"number",value:u.limit,onChange:f=>{u.limit=f,d?.(a.build())},errorMessage:u.limit<0?"Limit must be positive":void 0}),D.jsxRuntimeExports.jsx("div",{...Lt.props(f0.hoverActions),children:D.jsxRuntimeExports.jsx(DN,{onClick:()=>{u.delete(),d?.(a.build())}})})]})]}):null}function Emr({rootQuery:a,segment:u,view:d,aggregates:f}){return D.jsxRuntimeExports.jsx(hqe,{rootQuery:a,segment:u,view:d,operations:f,kind:"aggregate"})}function _mr({rootQuery:a,orderBys:u}){const{setQuery:d}=Pe.useContext(ai);return u.length===0?null:D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsx("div",{...Lt.props(Id.title),children:"order by"}),D.jsxRuntimeExports.jsx("div",{...Lt.props(Id.tokenContainer),children:u.map(f=>{const{fieldReference:m}=f,g=m.getFieldInfo(),x=m.path??[];let b="orderBy";(g.kind==="dimension"||g.kind==="measure")&&(b=I$(g.type.kind));const v=gBe(g.kind);return D.jsxRuntimeExports.jsxs("div",{...Lt.props(f0.main),children:[D.jsxRuntimeExports.jsxs(hN,{children:[D.jsxRuntimeExports.jsx($s,{color:v,icon:b,label:g.name}),D.jsxRuntimeExports.jsx(d$,{color:v,items:[{label:"ascending",value:"asc"},{label:"descending",value:"desc"}],value:f.direction??"asc",onChange:_=>{f.direction=_,d?.(a.build())}})]}),D.jsxRuntimeExports.jsx("div",{...Lt.props(f0.hoverActions),children:D.jsxRuntimeExports.jsx(DN,{onClick:()=>{f.delete(),d?.(a.build())}})})]},[...x,g.name].join("."))})})]})}function Smr({rootQuery:a,view:u}){return D.jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[D.jsxRuntimeExports.jsx(qBe,{rootQuery:a,view:u}),D.jsxRuntimeExports.jsx(y5,{rootQuery:a,view:u,viewDef:u.definition})]})}function Pv({icon:a,label:u,detail:d,disable:f,onClick:m,open:g}){const x=f?.(),b=()=>{f?.()||m?.()};return D.jsxRuntimeExports.jsxs(oN,{children:[D.jsxRuntimeExports.jsx(aN,{asChild:!0,children:D.jsxRuntimeExports.jsxs("div",{role:"menuitem",tabIndex:-1,...Lt.props(Al.item,Al.clickable,g?Amr.open:null),onClick:b,"data-disabled":x?"true":void 0,children:[D.jsxRuntimeExports.jsxs("div",{...Lt.props(Al.label),children:[a,D.jsxRuntimeExports.jsx("div",{children:u})]}),g!==void 0&&D.jsxRuntimeExports.jsx(An,{name:"chevronRight",color:"gray"})]})}),d?D.jsxRuntimeExports.jsx(lN,{children:D.jsxRuntimeExports.jsx(uN,{...Lt.props(Al.tooltip),side:"right",align:"start",alignOffset:-16,children:d})}):null]})}const Amr={open:{background:"mly16o7sp0",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,$$css:!0}};function Cmr({rootQuery:a,view:u}){const{setQuery:d}=Pe.useContext(ai),f=h0(u),m=f?$pr(f):!1;return D.jsxRuntimeExports.jsx(Pv,{icon:D.jsxRuntimeExports.jsx(An,{name:"limit"}),label:"Limit",disable:()=>m,onClick:()=>{u.getOrAddDefaultSegment().setLimit(10),d?.(a.build())}})}function Rmr({rootQuery:a,view:u}){const{setQuery:d}=Pe.useContext(ai);return D.jsxRuntimeExports.jsx(Pv,{icon:D.jsxRuntimeExports.jsx(An,{name:"nest"}),label:"Add blank nested query",onClick:()=>{const f=u.getOrAddDefaultSegment(),m=Hpr(f,"Nest");f.addEmptyNest(m>1?`Nest ${m}`:"Nest"),d?.(a.build())}})}function kN({view:a,fields:u,onAddOperation:d,types:f,filter:m,isFilterOperation:g,search:x}){return D.jsxRuntimeExports.jsx(Ioe,{types:f,filter:m,view:a,fields:u,onAddOperation:d,isFilterOperation:g,search:x,customStyle:Tmr.list})}const Tmr={list:{minWidth:"mly2ixbly",maxWidth:"mly1j9u4d2",$$css:!0}};function wmr({rootQuery:a,view:u,search:d}){const{setQuery:f}=Pe.useContext(ai),m=u.getOutputSchema().fields,g=h0(u),x=Pe.useMemo(()=>m.filter(b=>b.kind==="dimension").filter(b=>Omr.includes(b.type.kind)).filter(b=>g?!Bpr(g,b.name):!0),[m,g]);return D.jsxRuntimeExports.jsx(kN,{label:"Add order by",icon:"orderBy",view:u,fields:x,types:["dimension"],onAddOperation:b=>{Wpr(u,b),f?.(a.build())},disabledMessage:"There must be at least one field in the output to order by.",search:d})}const Omr=["string_type","number_type","boolean_type","date_type","timestamp_type"];function Nmr({rootQuery:a,view:u,search:d}){const{setQuery:f}=Pe.useContext(ai),{fields:m}=eb(u),g=h0(u),x=(b,v,_)=>!g?.hasField(v.name,_)&&kx(v);return D.jsxRuntimeExports.jsx(kN,{label:"Add group by",icon:"groupBy",view:u,fields:m,types:["dimension"],filter:x,onAddOperation:(b,v)=>{$$(u,b,v),f?.(a.build())},search:d})}function Dmr({rootQuery:a,view:u,search:d}){const{setQuery:f}=Pe.useContext(ai),{fields:m}=eb(u),g=h0(u),x=(b,v,_)=>!g?.hasField(v.name,_)&&kx(v);return D.jsxRuntimeExports.jsx(kN,{label:"Add aggregate",icon:"aggregate",view:u,fields:m,types:["measure"],filter:x,onAddOperation:(b,v)=>{B$(u,b,v),f?.(a.build())},search:d})}function kmr({view:a,search:u}){const{rootQuery:d,setQuery:f}=Y.useContext(ai),{fields:m}=eb(a);return D.jsxRuntimeExports.jsx(kN,{label:"Add filter",icon:"filter",view:a,fields:m,types:["measure","dimension"],filter:(g,x)=>(x.kind==="dimension"||x.kind==="measure")&&Lmr.has(x.type.kind)&&kx(x),onAddOperation:(g,x,b)=>{b&&(g.kind==="dimension"||g.kind==="measure")&&(XBe(a,g,x,b),f?.(d?.build()))},isFilterOperation:!0,search:u})}const Lmr=new Set(["string_type","boolean_type","number_type","date_type","timestamp_type"]);function Imr({rootQuery:a,view:u,search:d}){const{setQuery:f}=Pe.useContext(ai),m=eb(u).fields,g=Pe.useMemo(()=>m.filter(x=>x.kind==="view"&&!$Be(x)),[m]);return D.jsxRuntimeExports.jsx(kN,{label:"Add view",icon:"view",view:u,fields:g,types:["view"],filter:(x,b)=>kx(b),onAddOperation:x=>{a.isEmpty()?a.setView(x.name):Poe(u,x),f?.(a.build())},search:d})}function mqe({rootQuery:a,view:u}){const[d,f]=Pe.useState(!1),[m,g]=Pe.useState(""),{setQuery:x}=Pe.useContext(ai),[b,v]=Pe.useState(""),_=h0(u),S=R=>{g(R===m?"":R)};return D.jsxRuntimeExports.jsxs(AN,{open:d,onOpenChange:R=>{f(R),R||v("")},children:[D.jsxRuntimeExports.jsx(T$,{asChild:!0,children:D.jsxRuntimeExports.jsx($i,{icon:"insert",variant:"flat",size:"compact",onClick:()=>f(!d),tooltip:"Add query elements"})}),D.jsxRuntimeExports.jsx(CN,{children:D.jsxRuntimeExports.jsxs(w$,{onPointerDownOutside:()=>f(!1),...Lt.props(Al.content),side:"bottom",align:"start",role:"menu",children:[D.jsxRuntimeExports.jsx("div",{...Lt.props(Al.item),children:D.jsxRuntimeExports.jsx(c$,{icon:"search",value:b,onChange:v,placeholder:"Search...",customStyle:Pmr.search})}),D.jsxRuntimeExports.jsx(Y_,{}),D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1odjw0f mlywib8y2 mly1xyq3li",children:[b&&!m?D.jsxRuntimeExports.jsxs("div",{className:"mly1odjw0f",children:[D.jsxRuntimeExports.jsx(Ioe,{view:u,fields:eb(u).fields,filter:(R,w,N)=>!_?.hasField(w.name,N)&&kx(w),types:["dimension","measure","view"],onAddOperation:function(R,w){R.kind==="dimension"?$$(u,R,w):R.kind==="measure"?B$(u,R,w):Poe(u,R),x?.(a.build())},search:b}),D.jsxRuntimeExports.jsx(Y_,{}),D.jsxRuntimeExports.jsx(VBe,{search:b,onClick:R=>{const w=R.fieldName.split("."),N=w.pop();u.getOrAddDefaultSegment().addWhere(N,w,{kind:"string",parsed:{operator:"=",values:[R.fieldValue??"∅"]}}),x?.(a.build())}})]}):D.jsxRuntimeExports.jsxs("div",{"data-testid":"add-menu-operations",className:"mly18kybhu",children:[D.jsxRuntimeExports.jsx(Pv,{icon:D.jsxRuntimeExports.jsx(An,{name:"groupBy"}),label:"Add group by",onClick:()=>S("group_by"),open:m==="group_by"}),D.jsxRuntimeExports.jsx(Pv,{icon:D.jsxRuntimeExports.jsx(An,{name:"aggregate"}),label:"Add aggregate",onClick:()=>S("aggregate"),open:m==="aggregate"}),D.jsxRuntimeExports.jsx(Pv,{icon:D.jsxRuntimeExports.jsx(An,{name:"filter"}),label:"Add filter",onClick:()=>S("where"),open:m==="where"}),D.jsxRuntimeExports.jsx(Pv,{icon:D.jsxRuntimeExports.jsx(An,{name:"view"}),label:"Add view",onClick:()=>S("view"),open:m==="view"}),D.jsxRuntimeExports.jsx(Y_,{}),D.jsxRuntimeExports.jsx(Cmr,{rootQuery:a,view:u}),D.jsxRuntimeExports.jsx(Pv,{icon:D.jsxRuntimeExports.jsx(An,{name:"orderBy"}),label:"Order by",onClick:()=>S("order_by"),open:m==="order_by"}),D.jsxRuntimeExports.jsx(Rmr,{rootQuery:a,view:u})]}),D.jsxRuntimeExports.jsxs("div",{"data-testid":"add-menu-right-column",style:{overflowY:"auto"},children:[m==="group_by"&&D.jsxRuntimeExports.jsx(Nmr,{rootQuery:a,view:u,search:b}),m==="aggregate"&&D.jsxRuntimeExports.jsx(Dmr,{rootQuery:a,view:u,search:b}),m==="where"&&D.jsxRuntimeExports.jsx(kmr,{rootQuery:a,view:u,search:b}),m==="view"&&D.jsxRuntimeExports.jsx(Imr,{rootQuery:a,view:u,search:b}),m==="order_by"&&D.jsxRuntimeExports.jsx(wmr,{rootQuery:a,view:u,search:b})]})]})]})})]})}const Pmr={search:{width:"mlyh8yej3",$$css:!0}},Sie=Pe.createContext([]);function gqe({children:a,nest:u}){const{focusNestView:d,focusMainView:f}=cN(),m=Pe.useContext(Sie);return D.jsxRuntimeExports.jsx("div",{onPointerDown:g=>{g.stopPropagation(),u?d([...m,u.name]):f()},children:u?D.jsxRuntimeExports.jsx(Sie.Provider,{value:[...m,u.name],children:D.jsxRuntimeExports.jsx("div",{children:a})}):D.jsxRuntimeExports.jsx("div",{children:a})})}function jmr({rootQuery:a,view:u,nests:d}){return d.length===0?null:D.jsxRuntimeExports.jsx("div",{...Lt.props(Id.tokenContainer),children:d.map(f=>D.jsxRuntimeExports.jsx(Fmr,{rootQuery:a,view:u,nest:f},f.name))})}function Fmr({rootQuery:a,view:u,nest:d}){const{setQuery:f}=Pe.useContext(ai),[m,g]=Pe.useState(!1),x=Pe.useContext(Sie),{focusNestView:b,isNestViewFocused:v}=cN(),_=S=>D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsxs(boe,{trigger:D.jsxRuntimeExports.jsx($i,{variant:"flat",icon:"meatballs",size:"compact",tooltip:"More Actions"}),children:[D.jsxRuntimeExports.jsx(M5,{icon:"clear",label:"Delete Query",onClick:()=>{b([...x]),S.delete(),f?.(a.build())}}),D.jsxRuntimeExports.jsx(M5,{label:"Rename",onClick:()=>{g(!0)}})]}),D.jsxRuntimeExports.jsx(mqe,{rootQuery:a,view:S.view})]});return D.jsxRuntimeExports.jsx(gqe,{nest:d,children:D.jsxRuntimeExports.jsxs("div",{className:"mlyj3b58b mly1yf7rl7 mly1xmf6yo mlyh8yej3",children:[D.jsxRuntimeExports.jsx(_se,{title:d.name,icon:xBe(d.view),defaultOpen:!0,controls:_(d),collapsedControls:_(d),isFocused:v([...x,d.name]),children:D.jsxRuntimeExports.jsx(Smr,{rootQuery:a,view:d.view})}),D.jsxRuntimeExports.jsx(fqe,{rootQuery:a,view:u,target:d,open:m,setOpen:g})]},d.name)})}function Mmr({rootQuery:a,view:u,viewDef:d}){const f=[],m=[],g=[],x=[],b=[],v=[];let _;if(!(d instanceof Zr.ASTSegmentViewDefinition))return null;const S=d;return S.operations.items.forEach(R=>{R instanceof Zr.ASTGroupByViewOperation?f.push(R):R instanceof Zr.ASTAggregateViewOperation?m.push(R):R instanceof Zr.ASTWhereViewOperation||R instanceof Zr.ASTHavingViewOperation?x.push(R):R instanceof Zr.ASTOrderByViewOperation?b.push(R):R instanceof Zr.ASTNestViewOperation?v.push(R):R instanceof Zr.ASTDrillViewOperation?g.push(R):_=R}),D.jsxRuntimeExports.jsxs("div",{className:"mly1tpqehw mly10lvyaf",children:[D.jsxRuntimeExports.jsx(gmr,{rootQuery:a,segment:S,view:u,groupBys:f}),D.jsxRuntimeExports.jsx(Emr,{rootQuery:a,segment:S,view:u,aggregates:m}),D.jsxRuntimeExports.jsx(ffr,{rootQuery:a,drills:g}),D.jsxRuntimeExports.jsx(ymr,{rootQuery:a,filters:x}),D.jsxRuntimeExports.jsx(_mr,{rootQuery:a,orderBys:b}),D.jsxRuntimeExports.jsx(jmr,{rootQuery:a,view:u,nests:v}),D.jsxRuntimeExports.jsx(bmr,{rootQuery:a,limit:_})]})}function y5({rootQuery:a,view:u,viewDef:d}){return d instanceof Zr.ASTArrowViewDefinition?D.jsxRuntimeExports.jsx(y5,{rootQuery:a,view:u,viewDef:d.view}):d instanceof Zr.ASTRefinementViewDefinition?D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsx(y5,{rootQuery:a,view:u,viewDef:d.base}),D.jsxRuntimeExports.jsx(y5,{rootQuery:a,view:u,viewDef:d.refinement})]}):d instanceof Zr.ASTSegmentViewDefinition?D.jsxRuntimeExports.jsx(Mmr,{rootQuery:a,view:u,viewDef:d}):D.jsxRuntimeExports.jsx($mr,{rootQuery:a,viewDef:d})}function $mr({viewDef:a}){const[u,d]=Pe.useState(!1);return D.jsxRuntimeExports.jsxs("div",{...{0:{className:"mly78zum5 mlydt5ytf mly1cy8zhl mly1nhvcw1 mly12oqio5 mlygqa5hp mlyt7dq6l mlywib8y2 mly163pfp mlyy13l1i"},1:{className:"mly78zum5 mlydt5ytf mly1cy8zhl mly1nhvcw1 mly12oqio5 mlygqa5hp mlyt7dq6l mly163pfp mlyy13l1i mly18d9i69"}}[!!u<<0],children:[D.jsxRuntimeExports.jsxs("div",{className:"mlyrvj5dj mly1mt1orb mly1g3yg12 mlyydnxy5 mly6s0dn4 mlylqzeqv mly167g77z mly12oqio5 mlyc342km mly1n2onr6 mlyb3r6kr mlygqa5hp mlyh8yej3",children:[D.jsxRuntimeExports.jsx(An,{name:"query",color:"purple"}),D.jsxRuntimeExports.jsx("div",{className:"mlyuxw1ft mlyb3r6kr mlylyipyv",children:a.name}),D.jsxRuntimeExports.jsx($i,{icon:u?"chevronRight":"chevronDown",onClick:()=>d(!u),size:"compact"})]}),!u&&D.jsxRuntimeExports.jsx(Loe,{viewInfo:a.getViewInfo(),style:Bmr.preview})]})}const Bmr={preview:{height:"mlyt7dq6l",maxHeight:"mly1hkcv85",background:"mlyo6guvx",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,borderRadius:"mly12oqio5",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,$$css:!0}};function qmr({rootQuery:a,query:u,setQuery:d}){const{focusMainView:f,isMainViewFocused:m}=cN();return D.jsxRuntimeExports.jsx(gqe,{children:D.jsxRuntimeExports.jsxs(_se,{title:"Main query",isFocused:m,controls:D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx(boe,{trigger:D.jsxRuntimeExports.jsx($i,{variant:"flat",icon:"meatballs",size:"compact",tooltip:"More Actions"}),children:d?D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx(M5,{icon:"clear",label:"Clear query",onClick:()=>{f(),d?.(void 0)},disabled:a.isEmpty()}),D.jsxRuntimeExports.jsx(M5,{icon:"nest",label:"Nest query",onClick:()=>{a.definition instanceof Zr.ASTArrowQueryDefinition&&a.definition.view.convertToNest("Nest"),d?.(a.build())},disabled:a.isEmpty()||!(a.definition instanceof Zr.ASTArrowQueryDefinition)})]}):D.jsxRuntimeExports.jsx(D.jsxRuntimeExports.Fragment,{})}),u.definition instanceof Zr.ASTArrowQueryDefinition?D.jsxRuntimeExports.jsx(mqe,{rootQuery:a,view:u.definition}):null]}),collapsedControls:D.jsxRuntimeExports.jsx(An,{name:xBe(u)}),children:[u.definition instanceof Zr.ASTArrowQueryDefinition?D.jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[!u.isEmpty()&&D.jsxRuntimeExports.jsx(qBe,{rootQuery:a,view:u}),D.jsxRuntimeExports.jsx(y5,{rootQuery:a,view:u.definition,viewDef:u.definition.view})]}):null,u.isEmpty()?D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mlyl56j7k mly6s0dn4 mlyng8ra",children:D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly6s0dn4 mlywzxoxx",children:[D.jsxRuntimeExports.jsx("div",{children:"Click"}),D.jsxRuntimeExports.jsx(An,{name:"insert",color:"disabled"}),D.jsxRuntimeExports.jsx("div",{children:"to get started"})]})}):null]})})}function Umr({rootQuery:a}){return a.definition instanceof Zr.ASTArrowQueryDefinition?D.jsxRuntimeExports.jsx("div",{...Lt.props(Id.queryCard,zmr.content),children:D.jsxRuntimeExports.jsxs("div",{...Lt.props(Id.labelWithIcon),children:[D.jsxRuntimeExports.jsx(An,{name:"database"}),D.jsxRuntimeExports.jsx("div",{className:"mlyb3r6kr mlylyipyv mly117nqv4",children:a.definition.as.ArrowQueryDefinition().source.as.ReferenceQueryArrowSource().name})]})}):null}const zmr={content:{display:"mlyrvj5dj",gridAutoFlow:"mly1mt1orb",gridTemplateColumns:"mlybyjr8",gap:"mly1jnr06f",rowGap:null,columnGap:null,$$css:!0}};function Hmr({value:a,setValue:u,customStyle:d}){const[f,m]=Pe.useState(""),[g,x]=Pe.useState(!1),b=Pe.useRef(null),v=Pe.useRef(null),_=a.kind==="date_literal",S=_?a.date_value:a.timestamp_value,R=_?"day":"second",w=N=>{N?(m(""),u(_?{kind:"date_literal",date_value:Vt.utc(N).format(fS.day)}:{kind:"timestamp_literal",timestamp_value:Vt.utc(N).format(fS.second)})):m("Invalid date")};return GBe([b,v],()=>{x(!1)}),D.jsxRuntimeExports.jsxs(AN,{open:g,onOpenChange:()=>{},children:[D.jsxRuntimeExports.jsx(T$,{asChild:!0,children:D.jsxRuntimeExports.jsx("div",{...Lt.props(Cx.main,GO.wrapper,d),children:D.jsxRuntimeExports.jsx(gM,{value:Vt.utc(S).toDate(),setValue:w,units:R,onFocus:()=>x(!0),customStyle:{...GO.input,..._?GO.dateInput:GO.timestampInput},forwardRef:b})})}),f&&D.jsxRuntimeExports.jsx(n$,{errorMessage:f}),D.jsxRuntimeExports.jsx(CN,{children:D.jsxRuntimeExports.jsx(w$,{align:"center",asChild:!0,children:D.jsxRuntimeExports.jsx(doe,{value:Vt.utc(S).toDate(),setValue:w,units:R,maxLevel:R,customStyle:GO.datePicker,forwardRef:v})})})]})}const GO={input:{border:"mly1gs6z28",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,height:"mlyd7y6wv",backgroundColor:"mlyjbqb8w mlytw1abo",$$css:!0},dateInput:{width:"mly869kya",$$css:!0},timestampInput:{width:"mlynrytzq",$$css:!0},wrapper:{$$css:!0},datePicker:{display:"mly78zum5",flexDirection:"mlydt5ytf",boxShadow:"mly5n1uv4",backgroundColor:"mly12peec7",borderRadius:"mlyur7f20",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,width:"mly1hfn5x7",$$css:!0}};function Gmr({filterType:a,value:u,setValue:d}){let f=null;switch(a){case"string_type":{const{parsed:_}=Xm.StringFilterExpression.parse(u.filter_expression_value);f={kind:"string",parsed:_}}break;case"number_type":{const{parsed:_}=Xm.NumberFilterExpression.parse(u.filter_expression_value);f={kind:"number",parsed:_}}break;case"boolean_type":{const{parsed:_}=Xm.BooleanFilterExpression.parse(u.filter_expression_value);f={kind:"boolean",parsed:_}}break;case"date_type":{const{parsed:_}=Xm.TemporalFilterExpression.parse(u.filter_expression_value);f={kind:"date",parsed:_}}break;case"timestamp_type":{const{parsed:_}=Xm.TemporalFilterExpression.parse(u.filter_expression_value);f={kind:"timestamp",parsed:_}}break}const{op:m,value:g}=pqe(f,u.filter_expression_value),x=`${m} ${g}`,b={kind:"dimension",name:"parameter",type:{kind:a}},v=_=>{switch(_.kind){case"string":d({kind:"filter_expression_literal",filter_expression_value:Xm.StringFilterExpression.unparse(_.parsed)});break;case"boolean":d({kind:"filter_expression_literal",filter_expression_value:Xm.BooleanFilterExpression.unparse(_.parsed)});break;case"number":d({kind:"filter_expression_literal",filter_expression_value:Xm.NumberFilterExpression.unparse(_.parsed)});break;case"date":case"timestamp":d({kind:"filter_expression_literal",filter_expression_value:Xm.TemporalFilterExpression.unparse(_.parsed)});break}};return D.jsxRuntimeExports.jsx(U5,{fieldInfo:b,path:[],filter:f,setFilter:v,trigger:D.jsxRuntimeExports.jsx($s,{label:x}),layoutProps:{align:"start",side:"bottom",sideOffset:1}})}function Wmr({value:a,filterType:u,setValue:d,customStyle:f}){if(!a)return null;switch(a.kind){case"boolean_literal":return D.jsxRuntimeExports.jsx(d$,{value:a.boolean_value?"true":"false",items:[{label:"true",value:"true"},{label:"false",value:"false"}],onChange:m=>d({kind:"boolean_literal",boolean_value:m==="true"}),customStyle:f});case"date_literal":case"timestamp_literal":return D.jsxRuntimeExports.jsx(Hmr,{value:a,setValue:d,customStyle:f});case"null_literal":return D.jsxRuntimeExports.jsx($s,{label:"∅"});case"number_literal":return D.jsxRuntimeExports.jsx(Fne,{value:a.number_value,type:"number",onChange:m=>d({kind:"number_literal",number_value:m}),customStyle:f});case"string_literal":return D.jsxRuntimeExports.jsx(Fne,{value:a.string_value,onChange:m=>d({kind:"string_literal",string_value:m}),customStyle:f});case"filter_expression_literal":return D.jsxRuntimeExports.jsx(Gmr,{value:a,filterType:u,setValue:d,customStyle:f})}}function Vmr({rootQuery:a}){const{setQuery:u}=Pe.useContext(ai);if(a.definition instanceof Zr.ASTArrowQueryDefinition){const d=a.definition.as.ArrowQueryDefinition().source.as.ReferenceQueryArrowSource(),f=d.getSourceParameters();return!f||f.length===0?null:D.jsxRuntimeExports.jsx(_se,{title:"Source parameters",children:D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mlydt5ytf mly1jnr06f mlynm25rq",children:f.map(m=>{var g;return D.jsxRuntimeExports.jsxs(hN,{customStyle:Qmr.tokenGroup,children:[D.jsxRuntimeExports.jsx($s,{icon:I$(m.type.kind),label:m.name}),D.jsxRuntimeExports.jsx(Wmr,{filterType:m.type.kind==="filter_expression_type"?m.type.filter_type.kind:"string_type",value:((g=d.tryGetParameter(m.name))==null?void 0:g.parameter.value)??m.default_value,setValue:x=>{d.setParameter(m.name,x),u?.(a.build())}})]},m.name)})})})}return null}const Qmr={tokenGroup:{display:"mly78zum5",$$css:!0}};function Ymr(){const{rootQuery:a,setQuery:u}=Pe.useContext(ai);return a?D.jsxRuntimeExports.jsxs("div",{...Lt.props(Fr.body,Kmr.main),children:[D.jsxRuntimeExports.jsx(Umr,{rootQuery:a}),D.jsxRuntimeExports.jsx(Vmr,{rootQuery:a}),D.jsxRuntimeExports.jsx(qmr,{rootQuery:a,query:a,setQuery:u})]}):(console.error("Missing <MalloyExplorerProvider>"),null)}const Kmr={main:{display:"mly78zum5",flexDirection:"mlydt5ytf",overflow:"mlyysyzu8",overflowX:null,overflowY:null,gap:"mly167g77z",rowGap:null,columnGap:null,padding:"mly1fut7tt",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0}};function Xmr({runQuery:a}){return D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mly5yr21d mlyotlr4g mly1roky18",children:[D.jsxRuntimeExports.jsx(nfr,{runQuery:a}),D.jsxRuntimeExports.jsx(Ymr,{})]})}function Jmr({viewInfo:a,onClick:u}){const d=MBe(a.annotations??[]);return D.jsxRuntimeExports.jsx("div",{children:D.jsxRuntimeExports.jsx(mtr,{header:D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1q0g3np mly1qughib",children:[D.jsxRuntimeExports.jsx(Ex,{label:"view",icon:"view_filled",color:"purple",customStyle:K9e.viewBadge}),D.jsxRuntimeExports.jsx($i,{variant:"default",size:"compact",label:"Add",onClick:u})]}),D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.emphasized),children:a.name}),d&&D.jsxRuntimeExports.jsx(zBe,{text:d})]})]}),customStyle:K9e.card,children:D.jsxRuntimeExports.jsx(Loe,{viewInfo:a})})})}const K9e={viewBadge:{backgroundColor:"mlyjbqb8w",$$css:!0},card:{width:"mlyxsgkw5",$$css:!0}};function Zmr({views:a,onSelectView:u}){return D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mlydt5ytf mlyh8yej3 mly5yr21d mlyysyzu8",children:D.jsxRuntimeExports.jsxs("div",{className:"mly1bpp3o7 mly78zum5 mlydt5ytf mlyl56j7k mly6s0dn4",children:[D.jsxRuntimeExports.jsx("div",{...Lt.props(e0r.header,Fr.emphasized),children:"Start with a Bookmarked View"}),D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mlyl56j7k mly6s0dn4 mly1a02dak mly883omv mlym6i5cn",children:a.filter(d=>!Doe(d.annotations??[])).slice(0,3).map(d=>D.jsxRuntimeExports.jsx(Jmr,{viewInfo:d,onClick:()=>{u(d)}},d.name))})]})})}const e0r={header:{paddingBottom:"mly1l90r2v",$$css:!0}};var Boe="Tabs",[t0r,Pyr]=Md(Boe,[N$]),xqe=N$(),[r0r,qoe]=t0r(Boe),yqe=Y.forwardRef((a,u)=>{const{__scopeTabs:d,value:f,onValueChange:m,defaultValue:g,orientation:x="horizontal",dir:b,activationMode:v="automatic",..._}=a,S=dN(b),[R,w]=Dx({prop:f,onChange:m,defaultProp:g});return D.jsxRuntimeExports.jsx(r0r,{scope:d,baseId:ic(),value:R,onValueChange:w,orientation:x,dir:S,activationMode:v,children:D.jsxRuntimeExports.jsx(rn.div,{dir:S,"data-orientation":x,..._,ref:u})})});yqe.displayName=Boe;var vqe="TabsList",bqe=Y.forwardRef((a,u)=>{const{__scopeTabs:d,loop:f=!0,...m}=a,g=qoe(vqe,d),x=xqe(d);return D.jsxRuntimeExports.jsx(j$e,{asChild:!0,...x,orientation:g.orientation,dir:g.dir,loop:f,children:D.jsxRuntimeExports.jsx(rn.div,{role:"tablist","aria-orientation":g.orientation,...m,ref:u})})});bqe.displayName=vqe;var Eqe="TabsTrigger",_qe=Y.forwardRef((a,u)=>{const{__scopeTabs:d,value:f,disabled:m=!1,...g}=a,x=qoe(Eqe,d),b=xqe(d),v=Cqe(x.baseId,f),_=Rqe(x.baseId,f),S=f===x.value;return D.jsxRuntimeExports.jsx(F$e,{asChild:!0,...b,focusable:!m,active:S,children:D.jsxRuntimeExports.jsx(rn.button,{type:"button",role:"tab","aria-selected":S,"aria-controls":_,"data-state":S?"active":"inactive","data-disabled":m?"":void 0,disabled:m,id:v,...g,ref:u,onMouseDown:xr(a.onMouseDown,R=>{!m&&R.button===0&&R.ctrlKey===!1?x.onValueChange(f):R.preventDefault()}),onKeyDown:xr(a.onKeyDown,R=>{[" ","Enter"].includes(R.key)&&x.onValueChange(f)}),onFocus:xr(a.onFocus,()=>{const R=x.activationMode!=="manual";!S&&!m&&R&&x.onValueChange(f)})})})});_qe.displayName=Eqe;var Sqe="TabsContent",Aqe=Y.forwardRef((a,u)=>{const{__scopeTabs:d,value:f,forceMount:m,children:g,...x}=a,b=qoe(Sqe,d),v=Cqe(b.baseId,f),_=Rqe(b.baseId,f),S=f===b.value,R=Y.useRef(S);return Y.useEffect(()=>{const w=requestAnimationFrame(()=>R.current=!1);return()=>cancelAnimationFrame(w)},[]),D.jsxRuntimeExports.jsx(Do,{present:m||S,children:({present:w})=>D.jsxRuntimeExports.jsx(rn.div,{"data-state":S?"active":"inactive","data-orientation":b.orientation,role:"tabpanel","aria-labelledby":v,hidden:!w,id:_,tabIndex:0,...x,ref:u,style:{...a.style,animationDuration:R.current?"0s":void 0},children:w&&g})})});Aqe.displayName=Sqe;function Cqe(a,u){return`${a}-trigger-${u}`}function Rqe(a,u){return`${a}-content-${u}`}var n0r=yqe,i0r=bqe,aF=_qe,lF=Aqe;const s0r={compiling:"Compiling",running:"Running",finished:"Finished",canceled:"Canceled"},o0r="start",a0r="bottom";function l0r({runInfo:a}){return D.jsxRuntimeExports.jsxs(oN,{children:[D.jsxRuntimeExports.jsx(aN,{asChild:!0,children:D.jsxRuntimeExports.jsxs("div",{...Lt.props(ane.triggerContentContainer,Fr.body),children:[D.jsxRuntimeExports.jsx(An,{name:"info",color:"disabled"})," Query run details"]})}),D.jsxRuntimeExports.jsx(lN,{children:D.jsxRuntimeExports.jsx(uN,{side:a0r,align:o0r,children:D.jsxRuntimeExports.jsx(HBe,{customStyle:ane.card,children:D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[a.customContent,a?.performanceAspects&&Object.entries(a.performanceAspects).map(([u,d])=>D.jsxRuntimeExports.jsx("div",{children:Object.entries(d).map(([f,m])=>D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsxs("span",{...Lt.props(Fr.emphasized),children:[f,":"]})," ",D.jsxRuntimeExports.jsx("span",{...Lt.props(Fr.body),children:m})]},f))},u)),a.queryLink&&D.jsxRuntimeExports.jsx("a",{href:a.queryLink.href,target:"_blank",rel:"noreferrer",...Lt.props(ane.link,Fr.link),children:a.queryLink.linkText})]})})})})]})}const ane={card:{maxWidth:"mly1dc814f",$$css:!0},triggerContentContainer:{display:"mly3nfvp2",alignItems:"mly6s0dn4",justifyContent:"mlylqzeqv",$$css:!0},link:{backgroundColor:"mlyjbqb8w",border:"mly1gs6z28",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,padding:"mly1717udv",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,cursor:"mly1ypdohk",textDecoration:"mly1hl2dhg",textDecorationColor:null,textDecorationLine:null,textDecorationStyle:null,textDecorationThickness:null,$$css:!0}};function u0r({source:a,query:u}){let d;switch(u.executionState){case"compiling":case"running":d=D.jsxRuntimeExports.jsx(h0r,{onCancel:u.onCancel,executionState:u.executionState,queryResolutionStartMillis:u.queryResolutionStartMillis});break;case"canceled":d=D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mlydt5ytf mlyh8yej3 mly5yr21d mlyl56j7k mly6s0dn4 mly1665zp3",children:D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mly6s0dn4 mlyl56j7k mly167g77z",children:[D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.emphasized),children:"Query Canceled"}),D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.body),children:"Your query was canceled; nothing to display."})]})});break;case"finished":d=D.jsxRuntimeExports.jsx(c0r,{source:a,response:u.response});break}return d}function c0r({source:a,response:u}){let d=null;return u?u.error||u.messages?d=D.jsxRuntimeExports.jsx(d0r,{messages:[...u.error?[u.error]:[],...u.messages?u.messages:[]]}):u.result||(d=D.jsxRuntimeExports.jsx(hie,{title:"Empty Result",variant:"critical"})):d=D.jsxRuntimeExports.jsx(hie,{title:"Empty Response",variant:"critical"}),D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mly167g77z mly5yr21d",children:[u?.runInfo&&D.jsxRuntimeExports.jsx(l0r,{runInfo:u.runInfo}),d,u?.result&&D.jsxRuntimeExports.jsx(f0r,{result:u.result,source:a})]})}function d0r({messages:a}){return D.jsxRuntimeExports.jsx("div",{children:a.map(u=>{let d=null;if(u.customRenderer)d=u.customRenderer;else{let f;switch(u.severity){case"DEBUG":case"INFO":f="info";break;case"WARN":f="warn";break;case"ERROR":case"FATAL":f="critical";break;default:f="critical"}d=D.jsxRuntimeExports.jsx(hie,{title:u.title,description:u.description,variant:f,children:u.content})}return D.jsxRuntimeExports.jsx("div",{children:d},u.title)})})}function f0r({result:a,source:u}){const[d,f]=Pe.useState(),{onDrill:m,setQuery:g}=Pe.useContext(ai);return Pe.useEffect(()=>{const x=document.createElement("malloy-render");x.malloyResult=a,x.onDrill=({stableQuery:b,stableDrillClauses:v})=>{if(m){m({stableQuery:b,stableDrillClauses:v});return}const _=new Zr.ASTQuery({query:b,source:u});g?.(_.build())},x.tableConfig={enableDrill:!0},f(x)},[m,a,u,g]),d?D.jsxRuntimeExports.jsx(TMe,{element:d,style:{overflow:"hidden",height:"100%"}}):D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mlyl56j7k mly6s0dn4",children:D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mlyl56j7k mly6s0dn4 mly167g77z",children:[D.jsxRuntimeExports.jsx(wMe,{size:"large"}),D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.emphasized),children:"Rendering..."})]})})}function h0r({onCancel:a,executionState:u,queryResolutionStartMillis:d}){const f=p0r(d);return D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mlyh8yej3 mly5yr21d mlyl56j7k mly6s0dn4 mly1665zp3",children:[D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mly6s0dn4 mlyl56j7k mly167g77z",children:[D.jsxRuntimeExports.jsx(wMe,{size:"large",customStyle:m0r.spinner}),D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.emphasized),children:`${s0r[u]} query...`}),D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.body),children:`Total time elapsed: ${(f/1e3).toFixed(0)}s`})]}),D.jsxRuntimeExports.jsx($i,{onClick:a,label:"Cancel Query"})]})}function p0r(a){const[u,d]=Y.useState(Date.now()-a);return Y.useEffect(()=>{const f=setInterval(()=>{d(Date.now()-a)},1e3);return()=>clearInterval(f)},[a]),u}const m0r={spinner:{marginBottom:"mly1e56ztr",$$css:!0}};function g0r({query:a,debug:u}){var d;const[f,m]=Pe.useState((d=u?.debuggers)==null?void 0:d.at(0));return D.jsxRuntimeExports.jsxs("div",{children:[!!u?.debuggers.length&&D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly167g77z mly6s0dn4",children:[D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.largeBody),children:"Debug with:"}),D.jsxRuntimeExports.jsx(Hx,{options:u.debuggers.map(g=>({label:g,value:g})),value:f,onChange:g=>m(g)}),D.jsxRuntimeExports.jsx($i,{variant:"default",label:"Run",isDisabled:!f,onClick:()=>f&&u.onDebugQuery(a,f)})]}),D.jsxRuntimeExports.jsx(iie,{code:JSON.stringify(a,null,2),language:"json"})]})}const x0r=800;function y0r({text:a,label:u}){const[d,f]=Pe.useState(!1);return Pe.useEffect(()=>{if(!d)return()=>{};const m=setTimeout(()=>{f(!1)},x0r);return()=>{clearTimeout(m),f(!1)}},[d]),D.jsxRuntimeExports.jsx($i,{variant:"flat",size:"compact",label:d?"Copied!":u,icon:"copy",isDisabled:d,onClick:()=>{navigator.clipboard.writeText(a).then(()=>f(!0))}})}var is=function(a){return a.RESULTS="Results",a.MALLOY="Malloy",a.SQL="SQL",a.RAW_QUERY="Raw Query",a}(is||{});function v0r({source:a,draftQuery:u,setDraftQuery:d,submittedQuery:f,options:m}){var g,x,b;const[v,_]=Pe.useState(is.MALLOY),S=(g=Sje(a,u))==null?void 0:g.toMalloy(),R=a.schema.fields.filter(k=>k.kind==="view"),w=f!==void 0;!w&&(v===is.RESULTS||v===is.SQL)&&_(is.MALLOY),Pe.useEffect(()=>{_(is.RESULTS)},[f]);const N=(()=>{var k,B;return v===is.MALLOY&&S?S:v===is.SQL&&((B=(k=f?.response)==null?void 0:k.result)!=null&&B.sql)?f.response.result.sql:v===is.RAW_QUERY?JSON.stringify(u):null})();return u||f?D.jsxRuntimeExports.jsxs(n0r,{...Lt.props(lh.tabRoot,Fr.body),value:v,onValueChange:k=>_(k),children:[D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1q0g3np mly1qughib mly6s0dn4 mly153ncpu",children:[D.jsxRuntimeExports.jsxs(i0r,{className:"mly78zum5 mly6s0dn4 mly167g77z",children:[D.jsxRuntimeExports.jsx(aF,{value:is.RESULTS,disabled:!w,...Lt.props(Fr.body,lh.tab,!w&&lh.disabledTab),title:w?void 0:"Run a query to see the results.",children:is.RESULTS}),D.jsxRuntimeExports.jsx(aF,{value:is.MALLOY,...Lt.props(Fr.body,lh.tab),children:is.MALLOY}),D.jsxRuntimeExports.jsx(aF,{value:is.SQL,disabled:!w,...Lt.props(Fr.body,lh.tab,!w&&lh.disabledTab),title:w?void 0:"Run a query to see generated SQL.",children:is.SQL}),m?.showRawQuery&&D.jsxRuntimeExports.jsx(aF,{value:is.RAW_QUERY,...Lt.props(Fr.body,lh.tab),children:is.RAW_QUERY})]}),v!==is.RESULTS&&N&&D.jsxRuntimeExports.jsx(y0r,{text:N,label:"Copy Code"})]}),D.jsxRuntimeExports.jsxs("div",{className:"mly1iyjqo2 mlyb3r6kr",children:[D.jsxRuntimeExports.jsx(lF,{value:is.RESULTS,className:"mlyc7ga6q mlyh8yej3 mly5yr21d mly9f619",children:f&&D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[u&&f&&!b0r(u,f.query)&&D.jsxRuntimeExports.jsxs("div",{...Lt.props(lh.warning,Fr.body),children:[D.jsxRuntimeExports.jsx(An,{name:"warning",color:"warning",customStyle:lh.warningIcon}),D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsx("span",{children:"Query was updated. Run query to see new result or"}),D.jsxRuntimeExports.jsx("button",{...Lt.props(lh.warningAction,Fr.link),onClick:()=>{d(f.query)},children:" revert "}),D.jsxRuntimeExports.jsx("span",{children:"to the last run query."})]})]}),D.jsxRuntimeExports.jsx(u0r,{source:a,query:f})]})}),D.jsxRuntimeExports.jsx(lF,{value:is.MALLOY,className:"mlywp4ipm mlyh8yej3 mly5yr21d mly9f619",children:D.jsxRuntimeExports.jsx(iie,{code:S??"",language:"malloy"})}),D.jsxRuntimeExports.jsx(lF,{value:is.SQL,className:"mlywp4ipm mlyh8yej3 mly5yr21d mly9f619",children:((b=(x=f?.response)==null?void 0:x.result)==null?void 0:b.sql)&&D.jsxRuntimeExports.jsx(iie,{code:f.response.result.sql,language:"sql"})}),m?.showRawQuery&&D.jsxRuntimeExports.jsx(lF,{value:is.RAW_QUERY,className:"mlywp4ipm mlyh8yej3 mly5yr21d mly9f619",children:D.jsxRuntimeExports.jsx(g0r,{query:u,debug:m.debugOptions?{debuggers:m.debugOptions.debuggers,onDebugQuery:m.debugOptions.onDebugQuery}:void 0})})]})]}):D.jsxRuntimeExports.jsx(Zmr,{views:R,onSelectView:k=>d(E0r(k.name,a.name))})}function b0r(a,u){return JSON.stringify(a)===JSON.stringify(u)}function E0r(a,u){return{definition:{kind:"arrow",source:{kind:"source_reference",name:u},view:{kind:"view_reference",name:a}}}}const lh={tabRoot:{height:"mly5yr21d",width:"mlyh8yej3",display:"mly78zum5",flexDirection:"mlydt5ytf",$$css:!0},tab:{border:"mly1gs6z28",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,padding:"mlydqdrvq",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,borderRadius:"mlyur7f20",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,backgroundColor:"mlyjbqb8w",cursor:"mly1ypdohk",":is([data-state='active'])_color":"mlyb0tsu4",":is([data-state='active'])_fontWeight":"mly1uifvsu",":is([data-state='active'])_backgroundColor":"mly14vaotu",$$css:!0},disabledTab:{color:"mly1jwwhvr",cursor:"mly1ipiool",$$css:!0},warning:{display:"mly78zum5",alignItems:"mly6s0dn4",marginBottom:"mly1e56ztr",$$css:!0},warningAction:{backgroundColor:"mlyjbqb8w",border:"mly1gs6z28",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,padding:"mly1717udv",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,cursor:"mly1ypdohk",$$css:!0},warningIcon:{paddingRight:"mlyy13l1i",paddingInlineStart:null,paddingInlineEnd:null,$$css:!0}};function v5(a,u=[]){return a.flatMap(d=>{switch(d.kind){case"view":return $Be(d)?[]:u.length>0?[]:[{path:u,field:d}];case"measure":case"dimension":return d.type.kind==="array_type"&&d.type.element_type.kind==="record_type"?[{path:u,field:d},...v5(d.type.element_type.fields.map(f=>({kind:d.kind,...f})),[...u,d.name])]:d.type.kind==="record_type"?[{path:u,field:d},...v5(d.type.fields.map(f=>({kind:d.kind,...f})),[...u,d.name])]:[{path:u,field:d}];case"join":return v5(d.schema.fields,[...u,d.name]);default:return[]}})}function _0r(a){return v5(a.schema.fields)}function Tqe(a,u){return Object.values(u.reduce((d,f)=>{const m=[a.name,...f.path].join(".");return d[m]||(d[m]={groupPath:f.path,items:[]}),d[m].items.push(f),d},{}))}function wqe(a){return Object.values(a.reduce((u,d)=>{const f=d.field.kind;return u[f]||(u[f]={group:f,items:[]}),u[f].items.push(d),u},{}))}const S0r={view:"Views",measure:"Measures",dimension:"Dimensions"};function A0r(a,u,d){const f=M$(d,u.name),g=Pe.useMemo(()=>{const{fields:S}=eb(a),R=d.join(".");return v5(S).filter(w=>w.path.join(".")===R)},[d,a]).find(S=>u.name===S.field.name),x=Pe.useMemo(()=>{const S=h0(a);return g?.field.kind!=="dimension"?"Grouping is only available on a dimenion.":S?.hasField(u.name,d)?"Cannot group by a field already in the view.":kx(u)?"":"This field is annotated with #NO_UI."},[a,g?.field.kind,u,d]),b=Pe.useMemo(()=>{if(g?.field.kind!=="measure")return"Aggregation only supports measure fields.";const S=h0(a);return S?.hasField(u.name,d)?"This field is already used in the query.":kx(u)?"":"This field is annotated with #NO_UI."},[g?.field.kind,a,u,d]),v=Pe.useMemo(()=>g?["dimension","measure"].includes(g.field.kind)?C0r.includes(g.field.type.kind)?"":"Filtering only supports string, boolean, number, date and time fields.":"Filtering is only available for a dimension or measure.":`Unexpected Error: Could not find a field ${f}.`,[f,g]),_=Pe.useMemo(()=>{if(!g)return`Unexpected Error: Could not find a field ${f}.`;const S=h0(a);return S&&qpr(S,d,u.name)?"Query is already ordered by this field.":!S||!zpr(S,d,u.name)?"Order by is only available for fields in the output.":["dimension","measure"].includes(g.field.kind)?R0r.includes(g.field.type.kind)?"":"Order By only supports string, boolean, number, date and time fields.":"Order By is only available for dimension or measure fields."},[g,a,d,u.name,f]);return{isGroupByAllowed:!x,groupByDisabledReason:x,isAggregateAllowed:!b,aggregateDisabledReason:b,isFilterAllowed:!v,filterDisabledReason:v,isOrderByAllowed:!_,orderByDisabledReason:_}}const C0r=["string_type","boolean_type","number_type","date_type","timestamp_type"],R0r=["string_type","number_type","boolean_type","date_type","timestamp_type"];function Oqe({field:a,path:u,viewDef:d}){const{rootQuery:f,setQuery:m}=Pe.useContext(ai),{focusedNestView:g}=cN(),x=g??d,{groupByDisabledReason:b,aggregateDisabledReason:v,filterDisabledReason:_,orderByDisabledReason:S}=A0r(x,a,u),[R,w]=Pe.useState(),[N,k]=Pe.useState(!1),B=(q,z)=>{(a.kind==="dimension"||a.kind==="measure")&&(q==="groupBy"&&!b?$$(x,a,u):q==="aggregate"&&!v?B$(x,a,u):q==="orderBy"&&!S?Gpr(x,u,a.name):q==="filter"&&!_&&z&&XBe(x,a,u,z),m?.(f?.build()))},P=()=>{a.kind==="view"&&f?.isEmpty()&&(f?.setView(a.name),m?.(f?.build()))},$=()=>{a.kind==="view"&&(Poe(x,a),m?.(f?.build()))};return D.jsxRuntimeExports.jsx(hS,{field:a,hoverActions:a.kind==="view"?D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx(hx,{icon:"insert",disabled:!f?.isEmpty(),onClick:P,tooltip:f?.isEmpty()?"Add view":"Can only add a view to an empty query.",onTooltipOpenChange:k}),D.jsxRuntimeExports.jsx(hx,{icon:"nest",onClick:$,tooltip:"Add as new nested query",onTooltipOpenChange:k})]}):a.kind==="measure"?D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx(hx,{icon:"aggregate",tooltip:v||"Add as aggregate",disabled:!!v,onClick:()=>B("aggregate"),onTooltipOpenChange:k}),D.jsxRuntimeExports.jsx(U5,{fieldInfo:a,path:u,setFilter:q=>B("filter",q),trigger:D.jsxRuntimeExports.jsx(hx,{icon:"filter",tooltip:_||"Add as filter",disabled:!!_,onTooltipOpenChange:k}),onOpenChange:w}),D.jsxRuntimeExports.jsx(hx,{icon:"orderBy",tooltip:S||"Add as order by",disabled:!!S,onClick:()=>B("orderBy"),onTooltipOpenChange:k})]}):a.kind==="dimension"?D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx(hx,{icon:"groupBy",tooltip:b||"Add as group by",disabled:!!b,onClick:()=>B("groupBy"),onTooltipOpenChange:k}),D.jsxRuntimeExports.jsx(U5,{fieldInfo:a,path:u,setFilter:q=>B("filter",q),trigger:D.jsxRuntimeExports.jsx(hx,{icon:"filter",tooltip:_||"Add as filter",disabled:!!_,onTooltipOpenChange:k}),onOpenChange:w}),D.jsxRuntimeExports.jsx(hx,{icon:"orderBy",tooltip:S||"Add as order by",disabled:!!S,onClick:()=>B("orderBy"),onTooltipOpenChange:k})]}):null,onClick:a.kind==="dimension"&&!b?()=>B("groupBy"):a.kind==="measure"&&!v?()=>B("aggregate"):a.kind==="view"?()=>{f?.isEmpty()?P():$()}:void 0,hoverActionsVisible:R||N,tooltip:D.jsxRuntimeExports.jsx(SM,{field:a,path:u}),tooltipProps:{side:"right",align:"start",alignOffset:28}})}function hx({tooltip:a,onTooltipOpenChange:u,...d}){return D.jsxRuntimeExports.jsxs(LS,{delayDuration:300,onOpenChange:u,children:[D.jsxRuntimeExports.jsx(IS,{asChild:!0,children:D.jsxRuntimeExports.jsx($i,{variant:"flat",size:"compact",...d})}),D.jsxRuntimeExports.jsx(PS,{children:D.jsxRuntimeExports.jsx(jS,{sideOffset:8,...Lt.props(Fr.body,g0.default),children:a})})]})}const X9e=["dimension","measure","view"];function T0r({source:a,items:u}){const d=Y.useMemo(()=>wqe(u).sort((g,x)=>X9e.indexOf(g.group)-X9e.indexOf(x.group)).map(g=>({...g,items:Tqe(a,g.items)})),[a,u]),{rootQuery:f}=Y.useContext(ai),m=f?.definition;return m instanceof Zr.ASTArrowQueryDefinition?D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mly1cy8zhl mlyou54vl mlye8ttls mly10cdfl8",children:[D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.body,J9e.heading),children:`${u.length} result${u.length>1?"s":""}`}),d.map(({group:g,items:x})=>D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.body,J9e.groupTitle),children:S0r[g]}),D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mlydt5ytf mlyou54vl",children:x.map(({groupPath:b,items:v})=>Pe.createElement("div",{className:"mly78zum5 mlydt5ytf mly1jnr06f",key:b.join(".")},D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.supporting),children:b.join(" > ")}),v.map(({field:_,path:S})=>D.jsxRuntimeExports.jsx(Oqe,{field:_,path:S,viewDef:m},[...S,_.name].join(".")))))})]},g))]}):null}const J9e={heading:{fontWeight:"mly1xlr1w8",$$css:!0},groupTitle:{fontWeight:"mly1xlr1w8",fontSize:"mlyfifm61",$$css:!0}},w0r=(a,u)=>u.at(-1)??a.name,O0r=(a,u)=>u.length>0?`joined to ${[...u.slice(0,-1),a.name].join(" > ")}`:void 0;function lne({source:a,fieldItems:u,fieldGroupType:d}){const f=Y.useMemo(()=>a?wqe(u).map(b=>({...b,items:Tqe(a,b.items)})):[],[a,u]),m=Y.useMemo(()=>{var b;return((b=f.find(({group:v})=>v===d))==null?void 0:b.items)??[]},[f,d]),{rootQuery:g}=Y.useContext(ai),x=g?.definition;return x instanceof Zr.ASTArrowQueryDefinition?D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mlydt5ytf mly167g77z",children:D.jsxRuntimeExports.jsx(gZt,{children:m.map((b,v)=>D.jsxRuntimeExports.jsx(ytr,{label:w0r(a,b.groupPath),sublabel:O0r(a,b.groupPath),isInitiallyExpanded:v===0,children:b.items.map(({field:_,path:S})=>D.jsxRuntimeExports.jsx(Oqe,{field:_,path:S,viewDef:x},[...S,_.name].join(".")))},b.groupPath.join(".")))})}):null}function N0r({onRefresh:a}){const{source:u}=Y.useContext(ai),[d,f]=Y.useState(""),{onCollapse:m}=Pe.useContext(L$),g=Y.useMemo(()=>u?_0r(u).filter(R=>!Doe(R.field.annotations??[])):[],[u]),x=g.filter(R=>R.field.kind==="view"),b=g.filter(R=>R.field.kind==="measure"),v=g.filter(R=>R.field.kind==="dimension"),_=Y.useMemo(()=>{if(d){const R=d.toLocaleLowerCase();return g.filter(w=>w.field.name.toLocaleLowerCase().includes(R))}return[]},[g,d]),S=!!d;return u?D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mly5yr21d mly1gzqxud mlyfuqftd",children:[D.jsxRuntimeExports.jsxs("div",{...Lt.props(Fr.body,Z9e.header),children:[D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1qughib",children:[D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly6s0dn4 mly167g77z mlydqdrvq mlyb3r6kr",children:[D.jsxRuntimeExports.jsx(An,{name:"database",color:"gray"}),D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.largeBody,Z9e.title),children:u.name})]}),D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5",children:[D.jsxRuntimeExports.jsx($i,{icon:"refresh",tooltip:"Refresh the source",onClick:a,size:"compact",variant:"flat"}),m&&D.jsxRuntimeExports.jsx($i,{icon:"sidebarCollapse",tooltip:"Close the source panel",onClick:m,size:"compact",variant:"flat"})]})]}),D.jsxRuntimeExports.jsx(c$,{value:d,onChange:R=>f(R),placeholder:"Search",size:"compact",icon:"search",hasClear:!0})]}),D.jsxRuntimeExports.jsx(Y_,{}),D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mlydt5ytf mlyysyzu8 mly1iyjqo2",children:S?D.jsxRuntimeExports.jsx(T0r,{source:u,items:_}):D.jsxRuntimeExports.jsxs(Ocr,{defaultExpandedItemId:"views",children:[D.jsxRuntimeExports.jsx(Jre,{id:"dimensions",label:"Dimensions",startIcon:D.jsxRuntimeExports.jsx(An,{name:"dimension",color:"cyan"}),badge:D.jsxRuntimeExports.jsx(Ex,{label:v.length.toString(),color:"cyan"}),children:D.jsxRuntimeExports.jsx(lne,{source:u,fieldItems:g,fieldGroupType:"dimension"})},"dimensions"),D.jsxRuntimeExports.jsx(Jre,{id:"measures",label:"Measures",startIcon:D.jsxRuntimeExports.jsx(An,{name:"measure",color:"green"}),badge:D.jsxRuntimeExports.jsx(Ex,{label:b.length.toString(),color:"green"}),children:D.jsxRuntimeExports.jsx(lne,{source:u,fieldItems:g,fieldGroupType:"measure"})},"measures"),D.jsxRuntimeExports.jsx(Jre,{id:"views",label:"Views",startIcon:D.jsxRuntimeExports.jsx(An,{name:"view",color:"purple"}),badge:D.jsxRuntimeExports.jsx(Ex,{label:x.length.toString(),color:"purple"}),children:D.jsxRuntimeExports.jsx(lne,{source:u,fieldItems:g,fieldGroupType:"view"})},"views")]})})]}):null}const Z9e={header:{display:"mly78zum5",flexDirection:"mlydt5ytf",padding:"mlye8ttls",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,gap:"mly167g77z",rowGap:null,columnGap:null,$$css:!0},title:{overflow:"mlyb3r6kr",overflowX:null,overflowY:null,textOverflow:"mlylyipyv",fontWeight:"mly1xlr1w8",color:"mly1ue28sr",$$css:!0}};function D0r({icon:a,title:u,tooltip:d}){const{onExpand:f}=Y.useContext(L$);return D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mlydt5ytf mly7a106z mlylqzeqv mly5yr21d mly1gzqxud mlyfuqftd",children:D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mly6s0dn4 mlyl56j7k mly167g77z mlye8ttls",children:[D.jsxRuntimeExports.jsx($i,{icon:a,variant:"flat",size:"compact",tooltip:d,onClick:f}),u&&D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.body,k0r.title),children:u})]})})}const k0r={title:{fontWeight:"mly1xlr1w8",cursor:"mlyt0e3qv","writing-mode":"mly35i7",$$css:!0}};function eIe({isInitiallyExpanded:a=!0,initialWidth:u,minWidth:d,icon:f,title:m,children:g}){const[x,b]=Y.useState(a),[v,_]=Y.useState(u),S=!x;return D.jsxRuntimeExports.jsxs(L$.Provider,{value:{onExpand:()=>b(!0),onCollapse:()=>b(!1)},children:[D.jsxRuntimeExports.jsxs("div",{...{0:{className:"mly1n2onr6 mly5yr21d mly3psx0u"},1:{className:"mly1n2onr6 mly5yr21d mly3psx0u mly1s85apg"}}[!!S<<0],style:{width:`${v}px`},children:[g,D.jsxRuntimeExports.jsx(Rcr,{width:v,minWidth:d,onWidthChange:_})]}),S&&D.jsxRuntimeExports.jsx(D0r,{icon:f,title:m})]})}const L0r=new sIe(new Oo),I0r=new D.QueryClient,P0r=D.styled(D.Box)(({theme:a})=>({display:"flex",flexWrap:"wrap",gap:a.spacing(.5),borderBottom:`1px solid ${a.palette.divider}`,minHeight:36})),j0r=D.styled(D.Button)(({theme:a,selected:u})=>({minHeight:36,padding:a.spacing(.5,2),borderRadius:a.shape.borderRadius,background:u?a.palette.action.selected:"none",color:u?a.palette.primary.main:a.palette.text.primary,fontWeight:u?600:400,border:u?`1px solid ${a.palette.primary.main}`:"1px solid transparent",boxShadow:u?a.shadows[1]:"none",textTransform:"uppercase","&:hover":{background:a.palette.action.hover,border:`1px solid ${a.palette.primary.light}`}}));function Uoe({sourceAndPaths:a,saveResult:u,existingQuery:d,existingSourceName:f}){const[m,g]=Pe.useState(f?a.findIndex(v=>v.sourceInfo.name===f):0),[x,b]=Pe.useState(d||jF());return D.jsxRuntimeExports.jsxs(mo,{variant:"outlined",children:[D.jsxRuntimeExports.jsx(Va,{children:D.jsxRuntimeExports.jsxs(D.Stack$1,{sx:{flexDirection:"row",justifyContent:"space-between"},children:[a.length>0&&D.jsxRuntimeExports.jsx(P0r,{children:a.map((v,_)=>D.jsxRuntimeExports.jsx(j0r,{selected:m===_,onClick:()=>g(_),children:v.sourceInfo.name||`Source ${_+1}`},v.sourceInfo.name||_))}),u&&D.jsxRuntimeExports.jsx(D.CardActions,{sx:{padding:"0px 10px 0px 10px",mb:"auto",mt:"auto"},children:D.jsxRuntimeExports.jsx(D.Button,{onClick:()=>u(a[m].modelPath,a[m].sourceInfo.name,x),children:"Save"})})]})}),D.jsxRuntimeExports.jsx(mS,{children:D.jsxRuntimeExports.jsxs(D.Stack$1,{spacing:2,component:"section",children:[D.jsxRuntimeExports.jsx(zoe,{sourceAndPath:a[m],existingQuery:x,onChange:b}),D.jsxRuntimeExports.jsx(D.Box,{height:"5px"})]})})]})}function jF(){return{query:void 0,malloyQuery:void 0,malloyResult:void 0}}function zoe({sourceAndPath:a,onChange:u,existingQuery:d}){const[f,m]=Pe.useState(d||jF()),[g,x]=Pe.useState([]);Pe.useEffect(()=>{u&&u(f)},[u,f]);const{server:b,projectName:v,packageName:_,versionId:S,accessToken:R}=gS(),w=D.useMutation({mutationFn:()=>{const P=new Zr.ASTQuery({source:a.sourceInfo,query:f?.malloyQuery}).toMalloy();return m({...f,query:P}),L0r.executeQuery(v,_,a.modelPath,P,void 0,void 0,S,{baseURL:b,withCredentials:!R,headers:{Authorization:R&&`Bearer ${R}`}})},onSuccess:P=>{if(P){const $=JSON.parse(P.data.result);m({...f,malloyResult:$})}}},I0r),[N,k]=Pe.useState(a.sourceInfo.name);Pe.useEffect(()=>{N!==a.sourceInfo.name&&(k(a.sourceInfo.name),m(jF()))},[a,N]);const B=Pe.useCallback(P=>{m({...f,malloyQuery:P})},[f]);return N!==a.sourceInfo.name?D.jsxRuntimeExports.jsx("div",{children:"Loading..."}):D.jsxRuntimeExports.jsx(XWt,{children:D.jsxRuntimeExports.jsx(JWt,{children:D.jsxRuntimeExports.jsx(VXt,{source:a.sourceInfo,query:f?.malloyQuery,onQueryChange:B,focusedNestViewPath:g,onFocusedNestViewPathChange:x,onDrill:P=>{console.info(P),window.alert("Drill!")},children:D.jsxRuntimeExports.jsx("div",{style:{display:"flex",flexDirection:"column",height:"100%"},children:D.jsxRuntimeExports.jsxs("div",{style:{display:"flex",height:"100%",overflowY:"auto"},children:[D.jsxRuntimeExports.jsx(eIe,{isInitiallyExpanded:!0,initialWidth:180,minWidth:180,icon:"database",title:a.sourceInfo.name,children:D.jsxRuntimeExports.jsx(N0r,{onRefresh:()=>m(jF())})}),D.jsxRuntimeExports.jsx(eIe,{isInitiallyExpanded:!0,initialWidth:280,minWidth:280,icon:"filterSliders",title:"Query",children:D.jsxRuntimeExports.jsx(Xmr,{runQuery:()=>{w.mutate()}})}),D.jsxRuntimeExports.jsx(v0r,{source:a.sourceInfo,draftQuery:f?.malloyQuery,setDraftQuery:P=>m({...f,malloyQuery:P}),submittedQuery:f?.malloyQuery?{executionState:w.isPending?"running":"finished",response:{result:f.malloyResult},query:f.malloyQuery,queryResolutionStartMillis:Date.now(),onCancel:w.reset}:void 0,options:{showRawQuery:!0}})]})})})})},a.sourceInfo.name)}const F0r=new TM(new Oo),M0r=new D.QueryClient;function $0r({modelPath:a,expandResults:u,hideResultIcons:d,expandEmbeddings:f,hideEmbeddingIcons:m}){const[g,x]=Pe.useState(!1),[b,v]=Pe.useState(),[_,S]=Pe.useState(0),{server:R,projectName:w,packageName:N,versionId:k,accessToken:B}=gS(),P=B0r(R,N,a);Pe.useEffect(()=>{zv(P,"typescript").then(X=>{v(X)})},[g,P]);const{data:$,isError:q,isLoading:z,error:W}=D.useQuery({queryKey:["package",R,w,N,a,k],queryFn:()=>F0r.getModel(w,N,a,k,{baseURL:R,withCredentials:!B,headers:{Authorization:B&&`Bearer ${B}`}})},M0r);return z?D.jsxRuntimeExports.jsx(D.Typography,{sx:{p:"20px",m:"auto"},children:"Fetching Model..."}):q?D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:`${N} > ${a} > ${k} - ${W.message}`}):D.jsxRuntimeExports.jsxs(mo,{variant:"outlined",children:[D.jsxRuntimeExports.jsxs(Va,{children:[D.jsxRuntimeExports.jsxs(D.Stack,{sx:{flexDirection:"row",justifyContent:"space-between"},children:[Array.isArray($.data.sourceInfos)&&$.data.sourceInfos.length>0&&D.jsxRuntimeExports.jsx(D.Tabs,{value:_,onChange:(X,J)=>S(J),variant:"scrollable",scrollButtons:"auto",sx:{borderBottom:1,borderColor:"divider",minHeight:36},children:$.data.sourceInfos.map((X,J)=>{let ee;try{ee=JSON.parse(X)}catch{ee={name:String(J)}}return D.jsxRuntimeExports.jsx(D.Tab,{label:ee.name||`Source ${J+1}`,sx:{minHeight:36}},ee.name||J)})}),!m&&D.jsxRuntimeExports.jsx(D.CardActions,{sx:{padding:"0px 10px 0px 10px",mb:"auto",mt:"auto"},children:D.jsxRuntimeExports.jsx(D.Tooltip,{title:g?"Hide Embedding":"View Embedding",children:D.jsxRuntimeExports.jsx(D.IconButton,{size:"small",onClick:()=>{x(!g)},children:D.jsxRuntimeExports.jsx(D.LinkOutlinedIcon,{})})})})]}),D.jsxRuntimeExports.jsxs(D.Collapse,{in:g,timeout:"auto",unmountOnExit:!0,children:[D.jsxRuntimeExports.jsx(D.Divider,{}),D.jsxRuntimeExports.jsxs(D.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:[D.jsxRuntimeExports.jsx(D.Typography,{sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:D.jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:b}})}),D.jsxRuntimeExports.jsx(D.Tooltip,{title:"Copy Embeddable Code",children:D.jsxRuntimeExports.jsx(D.IconButton,{sx:{width:"24px",height:"24px"},onClick:()=>{navigator.clipboard.writeText(P)},children:D.jsxRuntimeExports.jsx(D.ContentCopyIcon,{})})})]})]}),D.jsxRuntimeExports.jsx(D.Divider,{})]}),D.jsxRuntimeExports.jsx(mS,{children:D.jsxRuntimeExports.jsxs(D.Stack,{spacing:2,component:"section",children:[Array.isArray($.data.sourceInfos)&&$.data.sourceInfos.length>0&&D.jsxRuntimeExports.jsx(zoe,{sourceAndPath:{modelPath:a,sourceInfo:JSON.parse($.data.sourceInfos[_])}}),$.data.queries?.length>0&&D.jsxRuntimeExports.jsxs(mo,{variant:"outlined",sx:{padding:"0px 10px 0px 10px"},children:[D.jsxRuntimeExports.jsx(Va,{sx:{p:"10px"},children:D.jsxRuntimeExports.jsx(D.Typography,{variant:"subtitle1",children:"Named Queries"})}),D.jsxRuntimeExports.jsx(D.Stack,{spacing:1,component:"section",children:$.data.queries.map(X=>D.jsxRuntimeExports.jsx(nVt,{server:R,projectName:w,packageName:N,modelPath:a,versionId:k,queryName:X.name,expandResult:u,hideResultIcon:d,expandEmbedding:f,hideEmbeddingIcon:m,accessToken:B,noView:!0,annotations:X.annotations},X.name))}),D.jsxRuntimeExports.jsx(D.Box$1,{height:"10px"})]}),D.jsxRuntimeExports.jsx(D.Box$1,{height:"5px"})]})})]})}function B0r(a,u,d){return`<Model
|
|
2883
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${u.docsSlug}`;return Y.useEffect(()=>{a&&(document.getElementById(a)||console.error(d))},[d,a]),null},rmr="DialogDescriptionWarning",nmr=({contentRef:a,descriptionId:u})=>{const f=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${dqe(rmr).contentName}}.`;return Y.useEffect(()=>{var m;const g=(m=a.current)==null?void 0:m.getAttribute("aria-describedby");u&&g&&(document.getElementById(u)||console.warn(f))},[f,a,u]),null},imr=ZBe,smr=rqe,omr=nqe,amr=iqe,lmr=oqe,umr=lqe;function fqe({rootQuery:a,view:u,target:d,open:f,setOpen:m}){const[g,x]=Pe.useState(""),{setQuery:b}=Pe.useContext(ai);if(Pe.useEffect(()=>{d&&x(d.name)},[d,f]),!d)return null;const v=()=>{d.name=g,b?.(a?.build()),m(!1)},{fields:_}=u.getOutputSchema(),S=g!==d.name&&_.some(R=>R.name===g);return D.jsxRuntimeExports.jsx(imr,{open:f,onOpenChange:m,children:D.jsxRuntimeExports.jsx(smr,{children:D.jsxRuntimeExports.jsx(omr,{className:"mly5uxqc1 mlyixxii4 mly13vifvy mlyu96u03 mly3m8u43 mly1ey2m1c mlyrvj5dj mly1ku5rj1 mly11uqc5h",children:D.jsxRuntimeExports.jsxs(amr,{...Lt.props(HO.content,Fr.body),children:[D.jsxRuntimeExports.jsxs(umr,{className:"mly1s85apg",children:["Rename ",d.name]}),D.jsxRuntimeExports.jsxs(lmr,{className:"mly1j61zf2 mly1ghz6dp",children:["Rename ",d.name]}),D.jsxRuntimeExports.jsxs("div",{className:"mlyqyf9gi mly78zum5 mlydt5ytf mly167g77z",children:[D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly167g77z",children:[D.jsxRuntimeExports.jsx("input",{value:g,onChange:R=>x(R.target.value),...Lt.props({...HO.editorCell,...HO.input}),onKeyDown:R=>{R.key==="Enter"?v():R.key==="Esc"&&m(!1)}}),S&&D.jsxRuntimeExports.jsx(n$,{errorMessage:"Name already in use"})]}),D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly167g77z",children:[D.jsxRuntimeExports.jsx($i,{label:"Cancel",onClick:()=>m(!1),customStyle:HO.editorCell}),D.jsxRuntimeExports.jsx($i,{variant:"primary",label:"Rename",onClick:v,customStyle:HO.editorCell,disabled:S})]})]})]})})})})}const HO={content:{display:"mly78zum5",flexDirection:"mlydt5ytf",boxShadow:"mly5n1uv4",backgroundColor:"mly12peec7",borderRadius:"mlyur7f20",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,padding:"mlye8ttls",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,minWidth:"mlylm99nl",maxWidth:"mly1jkqq1h",gap:"mly167g77z",rowGap:null,columnGap:null,$$css:!0},editorCell:{flexGrow:"mly1iyjqo2",$$css:!0},input:{border:"mly2yh2zd",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,color:"mlyizdh9v",padding:"mly9cpjcd",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,borderRadius:"mly1sxf85j",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,$$css:!0}};function hqe({rootQuery:a,segment:u,view:d,operations:f,kind:m}){const{setQuery:g}=Pe.useContext(ai),x=Ofr(wfr(Ooe)),b=Pe.useMemo(()=>f.map(R=>({id:R.name,operation:R})),[f]);if(f.length===0)return null;function v(R){const N=u.operations.items.filter(P=>P instanceof Zr.ASTAggregateViewOperation||P instanceof Zr.ASTGroupByViewOperation||P instanceof Zr.ASTNestViewOperation).map(P=>P.name),{active:k,over:B}=R;if(B&&k.id!==B.id){const P=N.indexOf(k.id),$=N.indexOf(B.id);u.reorderFields(Noe(N,P,$)),g?.(a.build())}}const{fields:_}=eb(d),S=m==="group_by"?{title:"group by",actionTitle:"Add group by",types:["dimension"],onClick:(R,w)=>{$$(d,R,w),g?.(a.build())}}:{title:"aggregate",actionTitle:"Add aggregate",types:["measure"],onClick:(R,w)=>{B$(d,R,w),g?.(a.build())}};return D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsx(Vpr,{rootQuery:a,view:d,fields:_,...S}),D.jsxRuntimeExports.jsx("div",{...Lt.props(Id.tokenContainer),children:D.jsxRuntimeExports.jsx(Lhr,{sensors:x,collisionDetection:Ifr,onDragEnd:v,children:D.jsxRuntimeExports.jsx(Hhr,{items:b,children:b.map(R=>D.jsxRuntimeExports.jsx(dmr,{rootQuery:a,id:R.id,color:m==="group_by"?"cyan":"green",view:d,operation:R.operation},R.id))})})})]})}const cmr=[];function dmr({rootQuery:a,id:u,view:d,operation:f,color:m}){var g;const{setQuery:x}=Pe.useContext(ai),b=f.getFieldInfo(),v=((g=f.field.getReference())==null?void 0:g.path)??cmr,{attributes:_,listeners:S,setNodeRef:R,transform:w,transition:N}=Xhr({id:u,data:{name:b.name}}),[k,B]=Pe.useState(!1),[P,$]=Pe.useState(),[q,z]=Pe.useState(!1),W={transform:B5.Transform.toString(w),transition:N},X=Pe.useMemo(()=>D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx(boe,{trigger:D.jsxRuntimeExports.jsx($i,{variant:"flat",icon:"meatballs",size:"compact",tooltip:"More Actions"}),onOpenChange:z,children:[D.jsxRuntimeExports.jsx(M5,{label:"Rename",onClick:()=>{$(f),B(!0)}},"rename")]},[...v,b.name].join(".")),D.jsxRuntimeExports.jsx(DN,{onClick:()=>{f.delete(),x?.(a?.build())}})]}),[b,f,v,a,x]),J=pmr(b,f.field);let ee="orderBy";return(b.kind==="dimension"||b.kind==="measure")&&(ee=I$(b.type.kind)),D.jsxRuntimeExports.jsxs("div",{id:u,ref:R,style:W,children:[J?D.jsxRuntimeExports.jsxs(hN,{customStyle:mmr.tokenGroup,children:[D.jsxRuntimeExports.jsx($s,{color:m,icon:ee,label:b.name,dragProps:{attributes:_,listeners:S}}),D.jsxRuntimeExports.jsx(d$,{color:m,value:J.value,onChange:fe=>{f.field.expression instanceof Zr.ASTTimeTruncationExpression&&(f.field.expression.truncation=fe),x?.(a.build())},items:J.options})]}):D.jsxRuntimeExports.jsx(hS,{field:b,color:m,hoverActionsVisible:q,hoverActions:X,tooltip:D.jsxRuntimeExports.jsx(SM,{field:b,path:v}),tooltipProps:{side:"right",align:"start",alignOffset:28},dragProps:{attributes:_,listeners:S}}),D.jsxRuntimeExports.jsx(fqe,{rootQuery:a,view:d,target:P,open:k,setOpen:B})]})}const fmr=["day","week","month","quarter","year"],hmr=["second","minute","hour","day","week","month","quarter","year"];function pmr(a,u){return a.kind!=="dimension"||!(u.expression instanceof Zr.ASTTimeTruncationExpression)?null:a.type.kind==="timestamp_type"?{value:a.type.timeframe??"second",options:hmr.map(d=>({label:d,value:d}))}:a.type.kind==="date_type"?{value:a.type.timeframe??"day",options:fmr.map(d=>({label:d,value:d}))}:null}const mmr={tokenGroup:{display:"mly78zum5",$$css:!0}};function gmr({rootQuery:a,segment:u,view:d,groupBys:f}){return D.jsxRuntimeExports.jsx(hqe,{rootQuery:a,segment:u,view:d,operations:f,kind:"group_by"})}class xmr extends Y.Component{constructor(u){super(u),this.state={hasError:!1}}static getDerivedStateFromError(u){return{hasError:!0}}componentDidCatch(u,d){console.error(u,d)}render(){return this.state.hasError?this.props.fallback:this.props.children}}const pqe=(a,u)=>{if(a.parsed===null)return{op:"",value:u};let d="",f=u;switch(a.kind){case"boolean":{const m=a.parsed,{operator:g,not:x}=m;d=x?"is not":"is",f=g}break;case"string":{const m=a.parsed,{operator:g}=m;switch(g){case"~":d="is like",f=m.escaped_values.join(", ");break;case"=":{const{not:x,values:b}=m;d=x?"is not":"is",f=b.join(", ")}break;case"contains":{const{not:x,values:b}=m;d=x?"does not contain":"contains",f=b.join(", ")}break;case"starts":{const{not:x,values:b}=m;d=x?"does not start with":"starts with",f=b.join(", ")}break;case"ends":{const{not:x,values:b}=m;d=x?"does not end with":"ends with",f=b.join(", ")}break;case"empty":{const{not:x}=m;d=x?"is not empty":"is empty",f=""}break;case"null":{const{not:x}=m;d=x?"is not":"is",f="null"}break}}break;case"number":{const m=a.parsed,{operator:g}=m;switch(g){case"=":case"!=":case"<=":case">=":case"<":case">":d=g,f=m.values.join(", ");break;case"range":d="in between",f=m.startValue+" and "+m.endValue;break;case"null":d=m.not?"is not":"is",f="null";break}}break;case"date":case"timestamp":{const m=a.parsed,{operator:g}=m;switch(g){case"after":{const{not:x}=m;d=`is${x?" not":""} after`,f=one(m.after)}break;case"before":{const{not:x}=m;d=`is${x?" not":""} before`,f=one(m.before)}break;case"in":{const{not:x}=m;d=`is${x?" not":""} in`,f=one(m.in)}break;case"in_last":{const{not:x}=m;d=`is${x?" not":""} in last`,f=m.n+" "+m.units}break;case"last":{const{not:x}=m;d=`is${x?" not":""} last complete`,f=m.n+" "+m.units}break;case"next":{const{not:x}=m;d=`is${x?" not":""} next complete`,f=m.n+" "+m.units}break;case"for":{const{not:x}=m;d=`is${x?" not":""} for`,f=m.n+" "+m.units}break;case"null":d=m.not?"is not":"is",f="null";break}}}return{op:d,value:f}};function one(a){return a?a.moment==="literal"?a.literal:a.moment==="now"?"now":a.moment:""}function ymr({rootQuery:a,filters:u}){const{setQuery:d}=Pe.useContext(ai);return u.length===0?null:D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsx("div",{...Lt.props(Id.title),children:"filter by"}),D.jsxRuntimeExports.jsx("div",{...Lt.props(Id.tokenContainer),children:u.map((f,m)=>D.jsxRuntimeExports.jsx(xmr,{fallback:D.jsxRuntimeExports.jsxs("div",{children:["Invalid filter",D.jsxRuntimeExports.jsx(DN,{onClick:()=>{f.delete(),d?.(a.build())}})]}),children:D.jsxRuntimeExports.jsx(vmr,{filterOperation:f,rootQuery:a})},m))})]})}function vmr({rootQuery:a,filterOperation:u}){const{setQuery:d}=Pe.useContext(ai),f=Pe.useCallback(R=>{u.filter instanceof Zr.ASTFilterWithFilterString&&u.filter.setFilter(R),d?.(a.build())},[u.filter,a,d]);if(!(u.filter instanceof Zr.ASTFilterWithFilterString))return null;const{fieldReference:m,filterString:g}=u.filter,x=u.filter.getFilter(),b=m.getFieldInfo();if(b.kind!=="dimension"&&b.kind!=="measure")throw new Error(`Invalid filter field kind: ${b.kind}`);const{op:v,value:_}=pqe(x,g),S=`${b.name} ${v} ${_}`;return D.jsxRuntimeExports.jsxs("div",{...Lt.props(f0.main),children:[D.jsxRuntimeExports.jsx(U5,{fieldInfo:b,path:m.path??[],filter:x,setFilter:f,trigger:D.jsxRuntimeExports.jsx($s,{icon:"filter",color:"cyan",label:S}),layoutProps:{align:"start",side:"bottom",sideOffset:1}}),D.jsxRuntimeExports.jsx("div",{...Lt.props(f0.hoverActions),children:D.jsxRuntimeExports.jsx(DN,{onClick:()=>{u.delete(),d?.(a.build())}})})]})}function bmr({rootQuery:a,limit:u}){const{setQuery:d}=Pe.useContext(ai);return u?D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsx("div",{...Lt.props(Id.title),children:"limit"}),D.jsxRuntimeExports.jsxs("div",{...Lt.props(f0.main),children:[D.jsxRuntimeExports.jsx(Fne,{type:"number",value:u.limit,onChange:f=>{u.limit=f,d?.(a.build())},errorMessage:u.limit<0?"Limit must be positive":void 0}),D.jsxRuntimeExports.jsx("div",{...Lt.props(f0.hoverActions),children:D.jsxRuntimeExports.jsx(DN,{onClick:()=>{u.delete(),d?.(a.build())}})})]})]}):null}function Emr({rootQuery:a,segment:u,view:d,aggregates:f}){return D.jsxRuntimeExports.jsx(hqe,{rootQuery:a,segment:u,view:d,operations:f,kind:"aggregate"})}function _mr({rootQuery:a,orderBys:u}){const{setQuery:d}=Pe.useContext(ai);return u.length===0?null:D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsx("div",{...Lt.props(Id.title),children:"order by"}),D.jsxRuntimeExports.jsx("div",{...Lt.props(Id.tokenContainer),children:u.map(f=>{const{fieldReference:m}=f,g=m.getFieldInfo(),x=m.path??[];let b="orderBy";(g.kind==="dimension"||g.kind==="measure")&&(b=I$(g.type.kind));const v=gBe(g.kind);return D.jsxRuntimeExports.jsxs("div",{...Lt.props(f0.main),children:[D.jsxRuntimeExports.jsxs(hN,{children:[D.jsxRuntimeExports.jsx($s,{color:v,icon:b,label:g.name}),D.jsxRuntimeExports.jsx(d$,{color:v,items:[{label:"ascending",value:"asc"},{label:"descending",value:"desc"}],value:f.direction??"asc",onChange:_=>{f.direction=_,d?.(a.build())}})]}),D.jsxRuntimeExports.jsx("div",{...Lt.props(f0.hoverActions),children:D.jsxRuntimeExports.jsx(DN,{onClick:()=>{f.delete(),d?.(a.build())}})})]},[...x,g.name].join("."))})})]})}function Smr({rootQuery:a,view:u}){return D.jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[D.jsxRuntimeExports.jsx(qBe,{rootQuery:a,view:u}),D.jsxRuntimeExports.jsx(y5,{rootQuery:a,view:u,viewDef:u.definition})]})}function Pv({icon:a,label:u,detail:d,disable:f,onClick:m,open:g}){const x=f?.(),b=()=>{f?.()||m?.()};return D.jsxRuntimeExports.jsxs(oN,{children:[D.jsxRuntimeExports.jsx(aN,{asChild:!0,children:D.jsxRuntimeExports.jsxs("div",{role:"menuitem",tabIndex:-1,...Lt.props(Al.item,Al.clickable,g?Amr.open:null),onClick:b,"data-disabled":x?"true":void 0,children:[D.jsxRuntimeExports.jsxs("div",{...Lt.props(Al.label),children:[a,D.jsxRuntimeExports.jsx("div",{children:u})]}),g!==void 0&&D.jsxRuntimeExports.jsx(An,{name:"chevronRight",color:"gray"})]})}),d?D.jsxRuntimeExports.jsx(lN,{children:D.jsxRuntimeExports.jsx(uN,{...Lt.props(Al.tooltip),side:"right",align:"start",alignOffset:-16,children:d})}):null]})}const Amr={open:{background:"mly16o7sp0",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,$$css:!0}};function Cmr({rootQuery:a,view:u}){const{setQuery:d}=Pe.useContext(ai),f=h0(u),m=f?$pr(f):!1;return D.jsxRuntimeExports.jsx(Pv,{icon:D.jsxRuntimeExports.jsx(An,{name:"limit"}),label:"Limit",disable:()=>m,onClick:()=>{u.getOrAddDefaultSegment().setLimit(10),d?.(a.build())}})}function Rmr({rootQuery:a,view:u}){const{setQuery:d}=Pe.useContext(ai);return D.jsxRuntimeExports.jsx(Pv,{icon:D.jsxRuntimeExports.jsx(An,{name:"nest"}),label:"Add blank nested query",onClick:()=>{const f=u.getOrAddDefaultSegment(),m=Hpr(f,"Nest");f.addEmptyNest(m>1?`Nest ${m}`:"Nest"),d?.(a.build())}})}function kN({view:a,fields:u,onAddOperation:d,types:f,filter:m,isFilterOperation:g,search:x}){return D.jsxRuntimeExports.jsx(Ioe,{types:f,filter:m,view:a,fields:u,onAddOperation:d,isFilterOperation:g,search:x,customStyle:Tmr.list})}const Tmr={list:{minWidth:"mly2ixbly",maxWidth:"mly1j9u4d2",$$css:!0}};function wmr({rootQuery:a,view:u,search:d}){const{setQuery:f}=Pe.useContext(ai),m=u.getOutputSchema().fields,g=h0(u),x=Pe.useMemo(()=>m.filter(b=>b.kind==="dimension").filter(b=>Omr.includes(b.type.kind)).filter(b=>g?!Bpr(g,b.name):!0),[m,g]);return D.jsxRuntimeExports.jsx(kN,{label:"Add order by",icon:"orderBy",view:u,fields:x,types:["dimension"],onAddOperation:b=>{Wpr(u,b),f?.(a.build())},disabledMessage:"There must be at least one field in the output to order by.",search:d})}const Omr=["string_type","number_type","boolean_type","date_type","timestamp_type"];function Nmr({rootQuery:a,view:u,search:d}){const{setQuery:f}=Pe.useContext(ai),{fields:m}=eb(u),g=h0(u),x=(b,v,_)=>!g?.hasField(v.name,_)&&kx(v);return D.jsxRuntimeExports.jsx(kN,{label:"Add group by",icon:"groupBy",view:u,fields:m,types:["dimension"],filter:x,onAddOperation:(b,v)=>{$$(u,b,v),f?.(a.build())},search:d})}function Dmr({rootQuery:a,view:u,search:d}){const{setQuery:f}=Pe.useContext(ai),{fields:m}=eb(u),g=h0(u),x=(b,v,_)=>!g?.hasField(v.name,_)&&kx(v);return D.jsxRuntimeExports.jsx(kN,{label:"Add aggregate",icon:"aggregate",view:u,fields:m,types:["measure"],filter:x,onAddOperation:(b,v)=>{B$(u,b,v),f?.(a.build())},search:d})}function kmr({view:a,search:u}){const{rootQuery:d,setQuery:f}=Y.useContext(ai),{fields:m}=eb(a);return D.jsxRuntimeExports.jsx(kN,{label:"Add filter",icon:"filter",view:a,fields:m,types:["measure","dimension"],filter:(g,x)=>(x.kind==="dimension"||x.kind==="measure")&&Lmr.has(x.type.kind)&&kx(x),onAddOperation:(g,x,b)=>{b&&(g.kind==="dimension"||g.kind==="measure")&&(XBe(a,g,x,b),f?.(d?.build()))},isFilterOperation:!0,search:u})}const Lmr=new Set(["string_type","boolean_type","number_type","date_type","timestamp_type"]);function Imr({rootQuery:a,view:u,search:d}){const{setQuery:f}=Pe.useContext(ai),m=eb(u).fields,g=Pe.useMemo(()=>m.filter(x=>x.kind==="view"&&!$Be(x)),[m]);return D.jsxRuntimeExports.jsx(kN,{label:"Add view",icon:"view",view:u,fields:g,types:["view"],filter:(x,b)=>kx(b),onAddOperation:x=>{a.isEmpty()?a.setView(x.name):Poe(u,x),f?.(a.build())},search:d})}function mqe({rootQuery:a,view:u}){const[d,f]=Pe.useState(!1),[m,g]=Pe.useState(""),{setQuery:x}=Pe.useContext(ai),[b,v]=Pe.useState(""),_=h0(u),S=R=>{g(R===m?"":R)};return D.jsxRuntimeExports.jsxs(AN,{open:d,onOpenChange:R=>{f(R),R||v("")},children:[D.jsxRuntimeExports.jsx(T$,{asChild:!0,children:D.jsxRuntimeExports.jsx($i,{icon:"insert",variant:"flat",size:"compact",onClick:()=>f(!d),tooltip:"Add query elements"})}),D.jsxRuntimeExports.jsx(CN,{children:D.jsxRuntimeExports.jsxs(w$,{onPointerDownOutside:()=>f(!1),...Lt.props(Al.content),side:"bottom",align:"start",role:"menu",children:[D.jsxRuntimeExports.jsx("div",{...Lt.props(Al.item),children:D.jsxRuntimeExports.jsx(c$,{icon:"search",value:b,onChange:v,placeholder:"Search...",customStyle:Pmr.search})}),D.jsxRuntimeExports.jsx(Y_,{}),D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1odjw0f mlywib8y2 mly1xyq3li",children:[b&&!m?D.jsxRuntimeExports.jsxs("div",{className:"mly1odjw0f",children:[D.jsxRuntimeExports.jsx(Ioe,{view:u,fields:eb(u).fields,filter:(R,w,N)=>!_?.hasField(w.name,N)&&kx(w),types:["dimension","measure","view"],onAddOperation:function(R,w){R.kind==="dimension"?$$(u,R,w):R.kind==="measure"?B$(u,R,w):Poe(u,R),x?.(a.build())},search:b}),D.jsxRuntimeExports.jsx(Y_,{}),D.jsxRuntimeExports.jsx(VBe,{search:b,onClick:R=>{const w=R.fieldName.split("."),N=w.pop();u.getOrAddDefaultSegment().addWhere(N,w,{kind:"string",parsed:{operator:"=",values:[R.fieldValue??"∅"]}}),x?.(a.build())}})]}):D.jsxRuntimeExports.jsxs("div",{"data-testid":"add-menu-operations",className:"mly18kybhu",children:[D.jsxRuntimeExports.jsx(Pv,{icon:D.jsxRuntimeExports.jsx(An,{name:"groupBy"}),label:"Add group by",onClick:()=>S("group_by"),open:m==="group_by"}),D.jsxRuntimeExports.jsx(Pv,{icon:D.jsxRuntimeExports.jsx(An,{name:"aggregate"}),label:"Add aggregate",onClick:()=>S("aggregate"),open:m==="aggregate"}),D.jsxRuntimeExports.jsx(Pv,{icon:D.jsxRuntimeExports.jsx(An,{name:"filter"}),label:"Add filter",onClick:()=>S("where"),open:m==="where"}),D.jsxRuntimeExports.jsx(Pv,{icon:D.jsxRuntimeExports.jsx(An,{name:"view"}),label:"Add view",onClick:()=>S("view"),open:m==="view"}),D.jsxRuntimeExports.jsx(Y_,{}),D.jsxRuntimeExports.jsx(Cmr,{rootQuery:a,view:u}),D.jsxRuntimeExports.jsx(Pv,{icon:D.jsxRuntimeExports.jsx(An,{name:"orderBy"}),label:"Order by",onClick:()=>S("order_by"),open:m==="order_by"}),D.jsxRuntimeExports.jsx(Rmr,{rootQuery:a,view:u})]}),D.jsxRuntimeExports.jsxs("div",{"data-testid":"add-menu-right-column",style:{overflowY:"auto"},children:[m==="group_by"&&D.jsxRuntimeExports.jsx(Nmr,{rootQuery:a,view:u,search:b}),m==="aggregate"&&D.jsxRuntimeExports.jsx(Dmr,{rootQuery:a,view:u,search:b}),m==="where"&&D.jsxRuntimeExports.jsx(kmr,{rootQuery:a,view:u,search:b}),m==="view"&&D.jsxRuntimeExports.jsx(Imr,{rootQuery:a,view:u,search:b}),m==="order_by"&&D.jsxRuntimeExports.jsx(wmr,{rootQuery:a,view:u,search:b})]})]})]})})]})}const Pmr={search:{width:"mlyh8yej3",$$css:!0}},Sie=Pe.createContext([]);function gqe({children:a,nest:u}){const{focusNestView:d,focusMainView:f}=cN(),m=Pe.useContext(Sie);return D.jsxRuntimeExports.jsx("div",{onPointerDown:g=>{g.stopPropagation(),u?d([...m,u.name]):f()},children:u?D.jsxRuntimeExports.jsx(Sie.Provider,{value:[...m,u.name],children:D.jsxRuntimeExports.jsx("div",{children:a})}):D.jsxRuntimeExports.jsx("div",{children:a})})}function jmr({rootQuery:a,view:u,nests:d}){return d.length===0?null:D.jsxRuntimeExports.jsx("div",{...Lt.props(Id.tokenContainer),children:d.map(f=>D.jsxRuntimeExports.jsx(Fmr,{rootQuery:a,view:u,nest:f},f.name))})}function Fmr({rootQuery:a,view:u,nest:d}){const{setQuery:f}=Pe.useContext(ai),[m,g]=Pe.useState(!1),x=Pe.useContext(Sie),{focusNestView:b,isNestViewFocused:v}=cN(),_=S=>D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsxs(boe,{trigger:D.jsxRuntimeExports.jsx($i,{variant:"flat",icon:"meatballs",size:"compact",tooltip:"More Actions"}),children:[D.jsxRuntimeExports.jsx(M5,{icon:"clear",label:"Delete Query",onClick:()=>{b([...x]),S.delete(),f?.(a.build())}}),D.jsxRuntimeExports.jsx(M5,{label:"Rename",onClick:()=>{g(!0)}})]}),D.jsxRuntimeExports.jsx(mqe,{rootQuery:a,view:S.view})]});return D.jsxRuntimeExports.jsx(gqe,{nest:d,children:D.jsxRuntimeExports.jsxs("div",{className:"mlyj3b58b mly1yf7rl7 mly1xmf6yo mlyh8yej3",children:[D.jsxRuntimeExports.jsx(_se,{title:d.name,icon:xBe(d.view),defaultOpen:!0,controls:_(d),collapsedControls:_(d),isFocused:v([...x,d.name]),children:D.jsxRuntimeExports.jsx(Smr,{rootQuery:a,view:d.view})}),D.jsxRuntimeExports.jsx(fqe,{rootQuery:a,view:u,target:d,open:m,setOpen:g})]},d.name)})}function Mmr({rootQuery:a,view:u,viewDef:d}){const f=[],m=[],g=[],x=[],b=[],v=[];let _;if(!(d instanceof Zr.ASTSegmentViewDefinition))return null;const S=d;return S.operations.items.forEach(R=>{R instanceof Zr.ASTGroupByViewOperation?f.push(R):R instanceof Zr.ASTAggregateViewOperation?m.push(R):R instanceof Zr.ASTWhereViewOperation||R instanceof Zr.ASTHavingViewOperation?x.push(R):R instanceof Zr.ASTOrderByViewOperation?b.push(R):R instanceof Zr.ASTNestViewOperation?v.push(R):R instanceof Zr.ASTDrillViewOperation?g.push(R):_=R}),D.jsxRuntimeExports.jsxs("div",{className:"mly1tpqehw mly10lvyaf",children:[D.jsxRuntimeExports.jsx(gmr,{rootQuery:a,segment:S,view:u,groupBys:f}),D.jsxRuntimeExports.jsx(Emr,{rootQuery:a,segment:S,view:u,aggregates:m}),D.jsxRuntimeExports.jsx(ffr,{rootQuery:a,drills:g}),D.jsxRuntimeExports.jsx(ymr,{rootQuery:a,filters:x}),D.jsxRuntimeExports.jsx(_mr,{rootQuery:a,orderBys:b}),D.jsxRuntimeExports.jsx(jmr,{rootQuery:a,view:u,nests:v}),D.jsxRuntimeExports.jsx(bmr,{rootQuery:a,limit:_})]})}function y5({rootQuery:a,view:u,viewDef:d}){return d instanceof Zr.ASTArrowViewDefinition?D.jsxRuntimeExports.jsx(y5,{rootQuery:a,view:u,viewDef:d.view}):d instanceof Zr.ASTRefinementViewDefinition?D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsx(y5,{rootQuery:a,view:u,viewDef:d.base}),D.jsxRuntimeExports.jsx(y5,{rootQuery:a,view:u,viewDef:d.refinement})]}):d instanceof Zr.ASTSegmentViewDefinition?D.jsxRuntimeExports.jsx(Mmr,{rootQuery:a,view:u,viewDef:d}):D.jsxRuntimeExports.jsx($mr,{rootQuery:a,viewDef:d})}function $mr({viewDef:a}){const[u,d]=Pe.useState(!1);return D.jsxRuntimeExports.jsxs("div",{...{0:{className:"mly78zum5 mlydt5ytf mly1cy8zhl mly1nhvcw1 mly12oqio5 mlygqa5hp mlyt7dq6l mlywib8y2 mly163pfp mlyy13l1i"},1:{className:"mly78zum5 mlydt5ytf mly1cy8zhl mly1nhvcw1 mly12oqio5 mlygqa5hp mlyt7dq6l mly163pfp mlyy13l1i mly18d9i69"}}[!!u<<0],children:[D.jsxRuntimeExports.jsxs("div",{className:"mlyrvj5dj mly1mt1orb mly1g3yg12 mlyydnxy5 mly6s0dn4 mlylqzeqv mly167g77z mly12oqio5 mlyc342km mly1n2onr6 mlyb3r6kr mlygqa5hp mlyh8yej3",children:[D.jsxRuntimeExports.jsx(An,{name:"query",color:"purple"}),D.jsxRuntimeExports.jsx("div",{className:"mlyuxw1ft mlyb3r6kr mlylyipyv",children:a.name}),D.jsxRuntimeExports.jsx($i,{icon:u?"chevronRight":"chevronDown",onClick:()=>d(!u),size:"compact"})]}),!u&&D.jsxRuntimeExports.jsx(Loe,{viewInfo:a.getViewInfo(),style:Bmr.preview})]})}const Bmr={preview:{height:"mlyt7dq6l",maxHeight:"mly1hkcv85",background:"mlyo6guvx",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,borderRadius:"mly12oqio5",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,$$css:!0}};function qmr({rootQuery:a,query:u,setQuery:d}){const{focusMainView:f,isMainViewFocused:m}=cN();return D.jsxRuntimeExports.jsx(gqe,{children:D.jsxRuntimeExports.jsxs(_se,{title:"Main query",isFocused:m,controls:D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx(boe,{trigger:D.jsxRuntimeExports.jsx($i,{variant:"flat",icon:"meatballs",size:"compact",tooltip:"More Actions"}),children:d?D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx(M5,{icon:"clear",label:"Clear query",onClick:()=>{f(),d?.(void 0)},disabled:a.isEmpty()}),D.jsxRuntimeExports.jsx(M5,{icon:"nest",label:"Nest query",onClick:()=>{a.definition instanceof Zr.ASTArrowQueryDefinition&&a.definition.view.convertToNest("Nest"),d?.(a.build())},disabled:a.isEmpty()||!(a.definition instanceof Zr.ASTArrowQueryDefinition)})]}):D.jsxRuntimeExports.jsx(D.jsxRuntimeExports.Fragment,{})}),u.definition instanceof Zr.ASTArrowQueryDefinition?D.jsxRuntimeExports.jsx(mqe,{rootQuery:a,view:u.definition}):null]}),collapsedControls:D.jsxRuntimeExports.jsx(An,{name:xBe(u)}),children:[u.definition instanceof Zr.ASTArrowQueryDefinition?D.jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[!u.isEmpty()&&D.jsxRuntimeExports.jsx(qBe,{rootQuery:a,view:u}),D.jsxRuntimeExports.jsx(y5,{rootQuery:a,view:u.definition,viewDef:u.definition.view})]}):null,u.isEmpty()?D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mlyl56j7k mly6s0dn4 mlyng8ra",children:D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly6s0dn4 mlywzxoxx",children:[D.jsxRuntimeExports.jsx("div",{children:"Click"}),D.jsxRuntimeExports.jsx(An,{name:"insert",color:"disabled"}),D.jsxRuntimeExports.jsx("div",{children:"to get started"})]})}):null]})})}function Umr({rootQuery:a}){return a.definition instanceof Zr.ASTArrowQueryDefinition?D.jsxRuntimeExports.jsx("div",{...Lt.props(Id.queryCard,zmr.content),children:D.jsxRuntimeExports.jsxs("div",{...Lt.props(Id.labelWithIcon),children:[D.jsxRuntimeExports.jsx(An,{name:"database"}),D.jsxRuntimeExports.jsx("div",{className:"mlyb3r6kr mlylyipyv mly117nqv4",children:a.definition.as.ArrowQueryDefinition().source.as.ReferenceQueryArrowSource().name})]})}):null}const zmr={content:{display:"mlyrvj5dj",gridAutoFlow:"mly1mt1orb",gridTemplateColumns:"mlybyjr8",gap:"mly1jnr06f",rowGap:null,columnGap:null,$$css:!0}};function Hmr({value:a,setValue:u,customStyle:d}){const[f,m]=Pe.useState(""),[g,x]=Pe.useState(!1),b=Pe.useRef(null),v=Pe.useRef(null),_=a.kind==="date_literal",S=_?a.date_value:a.timestamp_value,R=_?"day":"second",w=N=>{N?(m(""),u(_?{kind:"date_literal",date_value:Vt.utc(N).format(fS.day)}:{kind:"timestamp_literal",timestamp_value:Vt.utc(N).format(fS.second)})):m("Invalid date")};return GBe([b,v],()=>{x(!1)}),D.jsxRuntimeExports.jsxs(AN,{open:g,onOpenChange:()=>{},children:[D.jsxRuntimeExports.jsx(T$,{asChild:!0,children:D.jsxRuntimeExports.jsx("div",{...Lt.props(Cx.main,GO.wrapper,d),children:D.jsxRuntimeExports.jsx(gM,{value:Vt.utc(S).toDate(),setValue:w,units:R,onFocus:()=>x(!0),customStyle:{...GO.input,..._?GO.dateInput:GO.timestampInput},forwardRef:b})})}),f&&D.jsxRuntimeExports.jsx(n$,{errorMessage:f}),D.jsxRuntimeExports.jsx(CN,{children:D.jsxRuntimeExports.jsx(w$,{align:"center",asChild:!0,children:D.jsxRuntimeExports.jsx(doe,{value:Vt.utc(S).toDate(),setValue:w,units:R,maxLevel:R,customStyle:GO.datePicker,forwardRef:v})})})]})}const GO={input:{border:"mly1gs6z28",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,height:"mlyd7y6wv",backgroundColor:"mlyjbqb8w mlytw1abo",$$css:!0},dateInput:{width:"mly869kya",$$css:!0},timestampInput:{width:"mlynrytzq",$$css:!0},wrapper:{$$css:!0},datePicker:{display:"mly78zum5",flexDirection:"mlydt5ytf",boxShadow:"mly5n1uv4",backgroundColor:"mly12peec7",borderRadius:"mlyur7f20",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,width:"mly1hfn5x7",$$css:!0}};function Gmr({filterType:a,value:u,setValue:d}){let f=null;switch(a){case"string_type":{const{parsed:_}=Xm.StringFilterExpression.parse(u.filter_expression_value);f={kind:"string",parsed:_}}break;case"number_type":{const{parsed:_}=Xm.NumberFilterExpression.parse(u.filter_expression_value);f={kind:"number",parsed:_}}break;case"boolean_type":{const{parsed:_}=Xm.BooleanFilterExpression.parse(u.filter_expression_value);f={kind:"boolean",parsed:_}}break;case"date_type":{const{parsed:_}=Xm.TemporalFilterExpression.parse(u.filter_expression_value);f={kind:"date",parsed:_}}break;case"timestamp_type":{const{parsed:_}=Xm.TemporalFilterExpression.parse(u.filter_expression_value);f={kind:"timestamp",parsed:_}}break}const{op:m,value:g}=pqe(f,u.filter_expression_value),x=`${m} ${g}`,b={kind:"dimension",name:"parameter",type:{kind:a}},v=_=>{switch(_.kind){case"string":d({kind:"filter_expression_literal",filter_expression_value:Xm.StringFilterExpression.unparse(_.parsed)});break;case"boolean":d({kind:"filter_expression_literal",filter_expression_value:Xm.BooleanFilterExpression.unparse(_.parsed)});break;case"number":d({kind:"filter_expression_literal",filter_expression_value:Xm.NumberFilterExpression.unparse(_.parsed)});break;case"date":case"timestamp":d({kind:"filter_expression_literal",filter_expression_value:Xm.TemporalFilterExpression.unparse(_.parsed)});break}};return D.jsxRuntimeExports.jsx(U5,{fieldInfo:b,path:[],filter:f,setFilter:v,trigger:D.jsxRuntimeExports.jsx($s,{label:x}),layoutProps:{align:"start",side:"bottom",sideOffset:1}})}function Wmr({value:a,filterType:u,setValue:d,customStyle:f}){if(!a)return null;switch(a.kind){case"boolean_literal":return D.jsxRuntimeExports.jsx(d$,{value:a.boolean_value?"true":"false",items:[{label:"true",value:"true"},{label:"false",value:"false"}],onChange:m=>d({kind:"boolean_literal",boolean_value:m==="true"}),customStyle:f});case"date_literal":case"timestamp_literal":return D.jsxRuntimeExports.jsx(Hmr,{value:a,setValue:d,customStyle:f});case"null_literal":return D.jsxRuntimeExports.jsx($s,{label:"∅"});case"number_literal":return D.jsxRuntimeExports.jsx(Fne,{value:a.number_value,type:"number",onChange:m=>d({kind:"number_literal",number_value:m}),customStyle:f});case"string_literal":return D.jsxRuntimeExports.jsx(Fne,{value:a.string_value,onChange:m=>d({kind:"string_literal",string_value:m}),customStyle:f});case"filter_expression_literal":return D.jsxRuntimeExports.jsx(Gmr,{value:a,filterType:u,setValue:d,customStyle:f})}}function Vmr({rootQuery:a}){const{setQuery:u}=Pe.useContext(ai);if(a.definition instanceof Zr.ASTArrowQueryDefinition){const d=a.definition.as.ArrowQueryDefinition().source.as.ReferenceQueryArrowSource(),f=d.getSourceParameters();return!f||f.length===0?null:D.jsxRuntimeExports.jsx(_se,{title:"Source parameters",children:D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mlydt5ytf mly1jnr06f mlynm25rq",children:f.map(m=>{var g;return D.jsxRuntimeExports.jsxs(hN,{customStyle:Qmr.tokenGroup,children:[D.jsxRuntimeExports.jsx($s,{icon:I$(m.type.kind),label:m.name}),D.jsxRuntimeExports.jsx(Wmr,{filterType:m.type.kind==="filter_expression_type"?m.type.filter_type.kind:"string_type",value:((g=d.tryGetParameter(m.name))==null?void 0:g.parameter.value)??m.default_value,setValue:x=>{d.setParameter(m.name,x),u?.(a.build())}})]},m.name)})})})}return null}const Qmr={tokenGroup:{display:"mly78zum5",$$css:!0}};function Ymr(){const{rootQuery:a,setQuery:u}=Pe.useContext(ai);return a?D.jsxRuntimeExports.jsxs("div",{...Lt.props(Fr.body,Kmr.main),children:[D.jsxRuntimeExports.jsx(Umr,{rootQuery:a}),D.jsxRuntimeExports.jsx(Vmr,{rootQuery:a}),D.jsxRuntimeExports.jsx(qmr,{rootQuery:a,query:a,setQuery:u})]}):(console.error("Missing <MalloyExplorerProvider>"),null)}const Kmr={main:{display:"mly78zum5",flexDirection:"mlydt5ytf",overflow:"mlyysyzu8",overflowX:null,overflowY:null,gap:"mly167g77z",rowGap:null,columnGap:null,padding:"mly1fut7tt",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0}};function Xmr({runQuery:a}){return D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mly5yr21d mlyotlr4g mly1roky18",children:[D.jsxRuntimeExports.jsx(nfr,{runQuery:a}),D.jsxRuntimeExports.jsx(Ymr,{})]})}function Jmr({viewInfo:a,onClick:u}){const d=MBe(a.annotations??[]);return D.jsxRuntimeExports.jsx("div",{children:D.jsxRuntimeExports.jsx(mtr,{header:D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1q0g3np mly1qughib",children:[D.jsxRuntimeExports.jsx(Ex,{label:"view",icon:"view_filled",color:"purple",customStyle:K9e.viewBadge}),D.jsxRuntimeExports.jsx($i,{variant:"default",size:"compact",label:"Add",onClick:u})]}),D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.emphasized),children:a.name}),d&&D.jsxRuntimeExports.jsx(zBe,{text:d})]})]}),customStyle:K9e.card,children:D.jsxRuntimeExports.jsx(Loe,{viewInfo:a})})})}const K9e={viewBadge:{backgroundColor:"mlyjbqb8w",$$css:!0},card:{width:"mlyxsgkw5",$$css:!0}};function Zmr({views:a,onSelectView:u}){return D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mlydt5ytf mlyh8yej3 mly5yr21d mlyysyzu8",children:D.jsxRuntimeExports.jsxs("div",{className:"mly1bpp3o7 mly78zum5 mlydt5ytf mlyl56j7k mly6s0dn4",children:[D.jsxRuntimeExports.jsx("div",{...Lt.props(e0r.header,Fr.emphasized),children:"Start with a Bookmarked View"}),D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mlyl56j7k mly6s0dn4 mly1a02dak mly883omv mlym6i5cn",children:a.filter(d=>!Doe(d.annotations??[])).slice(0,3).map(d=>D.jsxRuntimeExports.jsx(Jmr,{viewInfo:d,onClick:()=>{u(d)}},d.name))})]})})}const e0r={header:{paddingBottom:"mly1l90r2v",$$css:!0}};var Boe="Tabs",[t0r,jyr]=Md(Boe,[N$]),xqe=N$(),[r0r,qoe]=t0r(Boe),yqe=Y.forwardRef((a,u)=>{const{__scopeTabs:d,value:f,onValueChange:m,defaultValue:g,orientation:x="horizontal",dir:b,activationMode:v="automatic",..._}=a,S=dN(b),[R,w]=Dx({prop:f,onChange:m,defaultProp:g});return D.jsxRuntimeExports.jsx(r0r,{scope:d,baseId:ic(),value:R,onValueChange:w,orientation:x,dir:S,activationMode:v,children:D.jsxRuntimeExports.jsx(rn.div,{dir:S,"data-orientation":x,..._,ref:u})})});yqe.displayName=Boe;var vqe="TabsList",bqe=Y.forwardRef((a,u)=>{const{__scopeTabs:d,loop:f=!0,...m}=a,g=qoe(vqe,d),x=xqe(d);return D.jsxRuntimeExports.jsx(j$e,{asChild:!0,...x,orientation:g.orientation,dir:g.dir,loop:f,children:D.jsxRuntimeExports.jsx(rn.div,{role:"tablist","aria-orientation":g.orientation,...m,ref:u})})});bqe.displayName=vqe;var Eqe="TabsTrigger",_qe=Y.forwardRef((a,u)=>{const{__scopeTabs:d,value:f,disabled:m=!1,...g}=a,x=qoe(Eqe,d),b=xqe(d),v=Cqe(x.baseId,f),_=Rqe(x.baseId,f),S=f===x.value;return D.jsxRuntimeExports.jsx(F$e,{asChild:!0,...b,focusable:!m,active:S,children:D.jsxRuntimeExports.jsx(rn.button,{type:"button",role:"tab","aria-selected":S,"aria-controls":_,"data-state":S?"active":"inactive","data-disabled":m?"":void 0,disabled:m,id:v,...g,ref:u,onMouseDown:xr(a.onMouseDown,R=>{!m&&R.button===0&&R.ctrlKey===!1?x.onValueChange(f):R.preventDefault()}),onKeyDown:xr(a.onKeyDown,R=>{[" ","Enter"].includes(R.key)&&x.onValueChange(f)}),onFocus:xr(a.onFocus,()=>{const R=x.activationMode!=="manual";!S&&!m&&R&&x.onValueChange(f)})})})});_qe.displayName=Eqe;var Sqe="TabsContent",Aqe=Y.forwardRef((a,u)=>{const{__scopeTabs:d,value:f,forceMount:m,children:g,...x}=a,b=qoe(Sqe,d),v=Cqe(b.baseId,f),_=Rqe(b.baseId,f),S=f===b.value,R=Y.useRef(S);return Y.useEffect(()=>{const w=requestAnimationFrame(()=>R.current=!1);return()=>cancelAnimationFrame(w)},[]),D.jsxRuntimeExports.jsx(Do,{present:m||S,children:({present:w})=>D.jsxRuntimeExports.jsx(rn.div,{"data-state":S?"active":"inactive","data-orientation":b.orientation,role:"tabpanel","aria-labelledby":v,hidden:!w,id:_,tabIndex:0,...x,ref:u,style:{...a.style,animationDuration:R.current?"0s":void 0},children:w&&g})})});Aqe.displayName=Sqe;function Cqe(a,u){return`${a}-trigger-${u}`}function Rqe(a,u){return`${a}-content-${u}`}var n0r=yqe,i0r=bqe,aF=_qe,lF=Aqe;const s0r={compiling:"Compiling",running:"Running",finished:"Finished",canceled:"Canceled"},o0r="start",a0r="bottom";function l0r({runInfo:a}){return D.jsxRuntimeExports.jsxs(oN,{children:[D.jsxRuntimeExports.jsx(aN,{asChild:!0,children:D.jsxRuntimeExports.jsxs("div",{...Lt.props(ane.triggerContentContainer,Fr.body),children:[D.jsxRuntimeExports.jsx(An,{name:"info",color:"disabled"})," Query run details"]})}),D.jsxRuntimeExports.jsx(lN,{children:D.jsxRuntimeExports.jsx(uN,{side:a0r,align:o0r,children:D.jsxRuntimeExports.jsx(HBe,{customStyle:ane.card,children:D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[a.customContent,a?.performanceAspects&&Object.entries(a.performanceAspects).map(([u,d])=>D.jsxRuntimeExports.jsx("div",{children:Object.entries(d).map(([f,m])=>D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsxs("span",{...Lt.props(Fr.emphasized),children:[f,":"]})," ",D.jsxRuntimeExports.jsx("span",{...Lt.props(Fr.body),children:m})]},f))},u)),a.queryLink&&D.jsxRuntimeExports.jsx("a",{href:a.queryLink.href,target:"_blank",rel:"noreferrer",...Lt.props(ane.link,Fr.link),children:a.queryLink.linkText})]})})})})]})}const ane={card:{maxWidth:"mly1dc814f",$$css:!0},triggerContentContainer:{display:"mly3nfvp2",alignItems:"mly6s0dn4",justifyContent:"mlylqzeqv",$$css:!0},link:{backgroundColor:"mlyjbqb8w",border:"mly1gs6z28",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,padding:"mly1717udv",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,cursor:"mly1ypdohk",textDecoration:"mly1hl2dhg",textDecorationColor:null,textDecorationLine:null,textDecorationStyle:null,textDecorationThickness:null,$$css:!0}};function u0r({source:a,query:u}){let d;switch(u.executionState){case"compiling":case"running":d=D.jsxRuntimeExports.jsx(h0r,{onCancel:u.onCancel,executionState:u.executionState,queryResolutionStartMillis:u.queryResolutionStartMillis});break;case"canceled":d=D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mlydt5ytf mlyh8yej3 mly5yr21d mlyl56j7k mly6s0dn4 mly1665zp3",children:D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mly6s0dn4 mlyl56j7k mly167g77z",children:[D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.emphasized),children:"Query Canceled"}),D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.body),children:"Your query was canceled; nothing to display."})]})});break;case"finished":d=D.jsxRuntimeExports.jsx(c0r,{source:a,response:u.response});break}return d}function c0r({source:a,response:u}){let d=null;return u?u.error||u.messages?d=D.jsxRuntimeExports.jsx(d0r,{messages:[...u.error?[u.error]:[],...u.messages?u.messages:[]]}):u.result||(d=D.jsxRuntimeExports.jsx(hie,{title:"Empty Result",variant:"critical"})):d=D.jsxRuntimeExports.jsx(hie,{title:"Empty Response",variant:"critical"}),D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mly167g77z mly5yr21d",children:[u?.runInfo&&D.jsxRuntimeExports.jsx(l0r,{runInfo:u.runInfo}),d,u?.result&&D.jsxRuntimeExports.jsx(f0r,{result:u.result,source:a})]})}function d0r({messages:a}){return D.jsxRuntimeExports.jsx("div",{children:a.map(u=>{let d=null;if(u.customRenderer)d=u.customRenderer;else{let f;switch(u.severity){case"DEBUG":case"INFO":f="info";break;case"WARN":f="warn";break;case"ERROR":case"FATAL":f="critical";break;default:f="critical"}d=D.jsxRuntimeExports.jsx(hie,{title:u.title,description:u.description,variant:f,children:u.content})}return D.jsxRuntimeExports.jsx("div",{children:d},u.title)})})}function f0r({result:a,source:u}){const[d,f]=Pe.useState(),{onDrill:m,setQuery:g}=Pe.useContext(ai);return Pe.useEffect(()=>{const x=document.createElement("malloy-render");x.malloyResult=a,x.onDrill=({stableQuery:b,stableDrillClauses:v})=>{if(m){m({stableQuery:b,stableDrillClauses:v});return}const _=new Zr.ASTQuery({query:b,source:u});g?.(_.build())},x.tableConfig={enableDrill:!0},f(x)},[m,a,u,g]),d?D.jsxRuntimeExports.jsx(TMe,{element:d,style:{overflow:"hidden",height:"100%"}}):D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mlyl56j7k mly6s0dn4",children:D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mlyl56j7k mly6s0dn4 mly167g77z",children:[D.jsxRuntimeExports.jsx(wMe,{size:"large"}),D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.emphasized),children:"Rendering..."})]})})}function h0r({onCancel:a,executionState:u,queryResolutionStartMillis:d}){const f=p0r(d);return D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mlyh8yej3 mly5yr21d mlyl56j7k mly6s0dn4 mly1665zp3",children:[D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mly6s0dn4 mlyl56j7k mly167g77z",children:[D.jsxRuntimeExports.jsx(wMe,{size:"large",customStyle:m0r.spinner}),D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.emphasized),children:`${s0r[u]} query...`}),D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.body),children:`Total time elapsed: ${(f/1e3).toFixed(0)}s`})]}),D.jsxRuntimeExports.jsx($i,{onClick:a,label:"Cancel Query"})]})}function p0r(a){const[u,d]=Y.useState(Date.now()-a);return Y.useEffect(()=>{const f=setInterval(()=>{d(Date.now()-a)},1e3);return()=>clearInterval(f)},[a]),u}const m0r={spinner:{marginBottom:"mly1e56ztr",$$css:!0}};function g0r({query:a,debug:u}){var d;const[f,m]=Pe.useState((d=u?.debuggers)==null?void 0:d.at(0));return D.jsxRuntimeExports.jsxs("div",{children:[!!u?.debuggers.length&&D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly167g77z mly6s0dn4",children:[D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.largeBody),children:"Debug with:"}),D.jsxRuntimeExports.jsx(Hx,{options:u.debuggers.map(g=>({label:g,value:g})),value:f,onChange:g=>m(g)}),D.jsxRuntimeExports.jsx($i,{variant:"default",label:"Run",isDisabled:!f,onClick:()=>f&&u.onDebugQuery(a,f)})]}),D.jsxRuntimeExports.jsx(iie,{code:JSON.stringify(a,null,2),language:"json"})]})}const x0r=800;function y0r({text:a,label:u}){const[d,f]=Pe.useState(!1);return Pe.useEffect(()=>{if(!d)return()=>{};const m=setTimeout(()=>{f(!1)},x0r);return()=>{clearTimeout(m),f(!1)}},[d]),D.jsxRuntimeExports.jsx($i,{variant:"flat",size:"compact",label:d?"Copied!":u,icon:"copy",isDisabled:d,onClick:()=>{navigator.clipboard.writeText(a).then(()=>f(!0))}})}var is=function(a){return a.RESULTS="Results",a.MALLOY="Malloy",a.SQL="SQL",a.RAW_QUERY="Raw Query",a}(is||{});function v0r({source:a,draftQuery:u,setDraftQuery:d,submittedQuery:f,options:m}){var g,x,b;const[v,_]=Pe.useState(is.MALLOY),S=(g=Sje(a,u))==null?void 0:g.toMalloy(),R=a.schema.fields.filter(k=>k.kind==="view"),w=f!==void 0;!w&&(v===is.RESULTS||v===is.SQL)&&_(is.MALLOY),Pe.useEffect(()=>{_(is.RESULTS)},[f]);const N=(()=>{var k,B;return v===is.MALLOY&&S?S:v===is.SQL&&((B=(k=f?.response)==null?void 0:k.result)!=null&&B.sql)?f.response.result.sql:v===is.RAW_QUERY?JSON.stringify(u):null})();return u||f?D.jsxRuntimeExports.jsxs(n0r,{...Lt.props(lh.tabRoot,Fr.body),value:v,onValueChange:k=>_(k),children:[D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1q0g3np mly1qughib mly6s0dn4 mly153ncpu",children:[D.jsxRuntimeExports.jsxs(i0r,{className:"mly78zum5 mly6s0dn4 mly167g77z",children:[D.jsxRuntimeExports.jsx(aF,{value:is.RESULTS,disabled:!w,...Lt.props(Fr.body,lh.tab,!w&&lh.disabledTab),title:w?void 0:"Run a query to see the results.",children:is.RESULTS}),D.jsxRuntimeExports.jsx(aF,{value:is.MALLOY,...Lt.props(Fr.body,lh.tab),children:is.MALLOY}),D.jsxRuntimeExports.jsx(aF,{value:is.SQL,disabled:!w,...Lt.props(Fr.body,lh.tab,!w&&lh.disabledTab),title:w?void 0:"Run a query to see generated SQL.",children:is.SQL}),m?.showRawQuery&&D.jsxRuntimeExports.jsx(aF,{value:is.RAW_QUERY,...Lt.props(Fr.body,lh.tab),children:is.RAW_QUERY})]}),v!==is.RESULTS&&N&&D.jsxRuntimeExports.jsx(y0r,{text:N,label:"Copy Code"})]}),D.jsxRuntimeExports.jsxs("div",{className:"mly1iyjqo2 mlyb3r6kr",children:[D.jsxRuntimeExports.jsx(lF,{value:is.RESULTS,className:"mlyc7ga6q mlyh8yej3 mly5yr21d mly9f619",children:f&&D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[u&&f&&!b0r(u,f.query)&&D.jsxRuntimeExports.jsxs("div",{...Lt.props(lh.warning,Fr.body),children:[D.jsxRuntimeExports.jsx(An,{name:"warning",color:"warning",customStyle:lh.warningIcon}),D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsx("span",{children:"Query was updated. Run query to see new result or"}),D.jsxRuntimeExports.jsx("button",{...Lt.props(lh.warningAction,Fr.link),onClick:()=>{d(f.query)},children:" revert "}),D.jsxRuntimeExports.jsx("span",{children:"to the last run query."})]})]}),D.jsxRuntimeExports.jsx(u0r,{source:a,query:f})]})}),D.jsxRuntimeExports.jsx(lF,{value:is.MALLOY,className:"mlywp4ipm mlyh8yej3 mly5yr21d mly9f619",children:D.jsxRuntimeExports.jsx(iie,{code:S??"",language:"malloy"})}),D.jsxRuntimeExports.jsx(lF,{value:is.SQL,className:"mlywp4ipm mlyh8yej3 mly5yr21d mly9f619",children:((b=(x=f?.response)==null?void 0:x.result)==null?void 0:b.sql)&&D.jsxRuntimeExports.jsx(iie,{code:f.response.result.sql,language:"sql"})}),m?.showRawQuery&&D.jsxRuntimeExports.jsx(lF,{value:is.RAW_QUERY,className:"mlywp4ipm mlyh8yej3 mly5yr21d mly9f619",children:D.jsxRuntimeExports.jsx(g0r,{query:u,debug:m.debugOptions?{debuggers:m.debugOptions.debuggers,onDebugQuery:m.debugOptions.onDebugQuery}:void 0})})]})]}):D.jsxRuntimeExports.jsx(Zmr,{views:R,onSelectView:k=>d(E0r(k.name,a.name))})}function b0r(a,u){return JSON.stringify(a)===JSON.stringify(u)}function E0r(a,u){return{definition:{kind:"arrow",source:{kind:"source_reference",name:u},view:{kind:"view_reference",name:a}}}}const lh={tabRoot:{height:"mly5yr21d",width:"mlyh8yej3",display:"mly78zum5",flexDirection:"mlydt5ytf",$$css:!0},tab:{border:"mly1gs6z28",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,padding:"mlydqdrvq",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,borderRadius:"mlyur7f20",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,backgroundColor:"mlyjbqb8w",cursor:"mly1ypdohk",":is([data-state='active'])_color":"mlyb0tsu4",":is([data-state='active'])_fontWeight":"mly1uifvsu",":is([data-state='active'])_backgroundColor":"mly14vaotu",$$css:!0},disabledTab:{color:"mly1jwwhvr",cursor:"mly1ipiool",$$css:!0},warning:{display:"mly78zum5",alignItems:"mly6s0dn4",marginBottom:"mly1e56ztr",$$css:!0},warningAction:{backgroundColor:"mlyjbqb8w",border:"mly1gs6z28",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,padding:"mly1717udv",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,cursor:"mly1ypdohk",$$css:!0},warningIcon:{paddingRight:"mlyy13l1i",paddingInlineStart:null,paddingInlineEnd:null,$$css:!0}};function v5(a,u=[]){return a.flatMap(d=>{switch(d.kind){case"view":return $Be(d)?[]:u.length>0?[]:[{path:u,field:d}];case"measure":case"dimension":return d.type.kind==="array_type"&&d.type.element_type.kind==="record_type"?[{path:u,field:d},...v5(d.type.element_type.fields.map(f=>({kind:d.kind,...f})),[...u,d.name])]:d.type.kind==="record_type"?[{path:u,field:d},...v5(d.type.fields.map(f=>({kind:d.kind,...f})),[...u,d.name])]:[{path:u,field:d}];case"join":return v5(d.schema.fields,[...u,d.name]);default:return[]}})}function _0r(a){return v5(a.schema.fields)}function Tqe(a,u){return Object.values(u.reduce((d,f)=>{const m=[a.name,...f.path].join(".");return d[m]||(d[m]={groupPath:f.path,items:[]}),d[m].items.push(f),d},{}))}function wqe(a){return Object.values(a.reduce((u,d)=>{const f=d.field.kind;return u[f]||(u[f]={group:f,items:[]}),u[f].items.push(d),u},{}))}const S0r={view:"Views",measure:"Measures",dimension:"Dimensions"};function A0r(a,u,d){const f=M$(d,u.name),g=Pe.useMemo(()=>{const{fields:S}=eb(a),R=d.join(".");return v5(S).filter(w=>w.path.join(".")===R)},[d,a]).find(S=>u.name===S.field.name),x=Pe.useMemo(()=>{const S=h0(a);return g?.field.kind!=="dimension"?"Grouping is only available on a dimenion.":S?.hasField(u.name,d)?"Cannot group by a field already in the view.":kx(u)?"":"This field is annotated with #NO_UI."},[a,g?.field.kind,u,d]),b=Pe.useMemo(()=>{if(g?.field.kind!=="measure")return"Aggregation only supports measure fields.";const S=h0(a);return S?.hasField(u.name,d)?"This field is already used in the query.":kx(u)?"":"This field is annotated with #NO_UI."},[g?.field.kind,a,u,d]),v=Pe.useMemo(()=>g?["dimension","measure"].includes(g.field.kind)?C0r.includes(g.field.type.kind)?"":"Filtering only supports string, boolean, number, date and time fields.":"Filtering is only available for a dimension or measure.":`Unexpected Error: Could not find a field ${f}.`,[f,g]),_=Pe.useMemo(()=>{if(!g)return`Unexpected Error: Could not find a field ${f}.`;const S=h0(a);return S&&qpr(S,d,u.name)?"Query is already ordered by this field.":!S||!zpr(S,d,u.name)?"Order by is only available for fields in the output.":["dimension","measure"].includes(g.field.kind)?R0r.includes(g.field.type.kind)?"":"Order By only supports string, boolean, number, date and time fields.":"Order By is only available for dimension or measure fields."},[g,a,d,u.name,f]);return{isGroupByAllowed:!x,groupByDisabledReason:x,isAggregateAllowed:!b,aggregateDisabledReason:b,isFilterAllowed:!v,filterDisabledReason:v,isOrderByAllowed:!_,orderByDisabledReason:_}}const C0r=["string_type","boolean_type","number_type","date_type","timestamp_type"],R0r=["string_type","number_type","boolean_type","date_type","timestamp_type"];function Oqe({field:a,path:u,viewDef:d}){const{rootQuery:f,setQuery:m}=Pe.useContext(ai),{focusedNestView:g}=cN(),x=g??d,{groupByDisabledReason:b,aggregateDisabledReason:v,filterDisabledReason:_,orderByDisabledReason:S}=A0r(x,a,u),[R,w]=Pe.useState(),[N,k]=Pe.useState(!1),B=(q,z)=>{(a.kind==="dimension"||a.kind==="measure")&&(q==="groupBy"&&!b?$$(x,a,u):q==="aggregate"&&!v?B$(x,a,u):q==="orderBy"&&!S?Gpr(x,u,a.name):q==="filter"&&!_&&z&&XBe(x,a,u,z),m?.(f?.build()))},P=()=>{a.kind==="view"&&f?.isEmpty()&&(f?.setView(a.name),m?.(f?.build()))},$=()=>{a.kind==="view"&&(Poe(x,a),m?.(f?.build()))};return D.jsxRuntimeExports.jsx(hS,{field:a,hoverActions:a.kind==="view"?D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx(hx,{icon:"insert",disabled:!f?.isEmpty(),onClick:P,tooltip:f?.isEmpty()?"Add view":"Can only add a view to an empty query.",onTooltipOpenChange:k}),D.jsxRuntimeExports.jsx(hx,{icon:"nest",onClick:$,tooltip:"Add as new nested query",onTooltipOpenChange:k})]}):a.kind==="measure"?D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx(hx,{icon:"aggregate",tooltip:v||"Add as aggregate",disabled:!!v,onClick:()=>B("aggregate"),onTooltipOpenChange:k}),D.jsxRuntimeExports.jsx(U5,{fieldInfo:a,path:u,setFilter:q=>B("filter",q),trigger:D.jsxRuntimeExports.jsx(hx,{icon:"filter",tooltip:_||"Add as filter",disabled:!!_,onTooltipOpenChange:k}),onOpenChange:w}),D.jsxRuntimeExports.jsx(hx,{icon:"orderBy",tooltip:S||"Add as order by",disabled:!!S,onClick:()=>B("orderBy"),onTooltipOpenChange:k})]}):a.kind==="dimension"?D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx(hx,{icon:"groupBy",tooltip:b||"Add as group by",disabled:!!b,onClick:()=>B("groupBy"),onTooltipOpenChange:k}),D.jsxRuntimeExports.jsx(U5,{fieldInfo:a,path:u,setFilter:q=>B("filter",q),trigger:D.jsxRuntimeExports.jsx(hx,{icon:"filter",tooltip:_||"Add as filter",disabled:!!_,onTooltipOpenChange:k}),onOpenChange:w}),D.jsxRuntimeExports.jsx(hx,{icon:"orderBy",tooltip:S||"Add as order by",disabled:!!S,onClick:()=>B("orderBy"),onTooltipOpenChange:k})]}):null,onClick:a.kind==="dimension"&&!b?()=>B("groupBy"):a.kind==="measure"&&!v?()=>B("aggregate"):a.kind==="view"?()=>{f?.isEmpty()?P():$()}:void 0,hoverActionsVisible:R||N,tooltip:D.jsxRuntimeExports.jsx(SM,{field:a,path:u}),tooltipProps:{side:"right",align:"start",alignOffset:28}})}function hx({tooltip:a,onTooltipOpenChange:u,...d}){return D.jsxRuntimeExports.jsxs(LS,{delayDuration:300,onOpenChange:u,children:[D.jsxRuntimeExports.jsx(IS,{asChild:!0,children:D.jsxRuntimeExports.jsx($i,{variant:"flat",size:"compact",...d})}),D.jsxRuntimeExports.jsx(PS,{children:D.jsxRuntimeExports.jsx(jS,{sideOffset:8,...Lt.props(Fr.body,g0.default),children:a})})]})}const X9e=["dimension","measure","view"];function T0r({source:a,items:u}){const d=Y.useMemo(()=>wqe(u).sort((g,x)=>X9e.indexOf(g.group)-X9e.indexOf(x.group)).map(g=>({...g,items:Tqe(a,g.items)})),[a,u]),{rootQuery:f}=Y.useContext(ai),m=f?.definition;return m instanceof Zr.ASTArrowQueryDefinition?D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mly1cy8zhl mlyou54vl mlye8ttls mly10cdfl8",children:[D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.body,J9e.heading),children:`${u.length} result${u.length>1?"s":""}`}),d.map(({group:g,items:x})=>D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.body,J9e.groupTitle),children:S0r[g]}),D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mlydt5ytf mlyou54vl",children:x.map(({groupPath:b,items:v})=>Pe.createElement("div",{className:"mly78zum5 mlydt5ytf mly1jnr06f",key:b.join(".")},D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.supporting),children:b.join(" > ")}),v.map(({field:_,path:S})=>D.jsxRuntimeExports.jsx(Oqe,{field:_,path:S,viewDef:m},[...S,_.name].join(".")))))})]},g))]}):null}const J9e={heading:{fontWeight:"mly1xlr1w8",$$css:!0},groupTitle:{fontWeight:"mly1xlr1w8",fontSize:"mlyfifm61",$$css:!0}},w0r=(a,u)=>u.at(-1)??a.name,O0r=(a,u)=>u.length>0?`joined to ${[...u.slice(0,-1),a.name].join(" > ")}`:void 0;function lne({source:a,fieldItems:u,fieldGroupType:d}){const f=Y.useMemo(()=>a?wqe(u).map(b=>({...b,items:Tqe(a,b.items)})):[],[a,u]),m=Y.useMemo(()=>{var b;return((b=f.find(({group:v})=>v===d))==null?void 0:b.items)??[]},[f,d]),{rootQuery:g}=Y.useContext(ai),x=g?.definition;return x instanceof Zr.ASTArrowQueryDefinition?D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mlydt5ytf mly167g77z",children:D.jsxRuntimeExports.jsx(gZt,{children:m.map((b,v)=>D.jsxRuntimeExports.jsx(ytr,{label:w0r(a,b.groupPath),sublabel:O0r(a,b.groupPath),isInitiallyExpanded:v===0,children:b.items.map(({field:_,path:S})=>D.jsxRuntimeExports.jsx(Oqe,{field:_,path:S,viewDef:x},[...S,_.name].join(".")))},b.groupPath.join(".")))})}):null}function N0r({onRefresh:a}){const{source:u}=Y.useContext(ai),[d,f]=Y.useState(""),{onCollapse:m}=Pe.useContext(L$),g=Y.useMemo(()=>u?_0r(u).filter(R=>!Doe(R.field.annotations??[])):[],[u]),x=g.filter(R=>R.field.kind==="view"),b=g.filter(R=>R.field.kind==="measure"),v=g.filter(R=>R.field.kind==="dimension"),_=Y.useMemo(()=>{if(d){const R=d.toLocaleLowerCase();return g.filter(w=>w.field.name.toLocaleLowerCase().includes(R))}return[]},[g,d]),S=!!d;return u?D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mly5yr21d mly1gzqxud mlyfuqftd",children:[D.jsxRuntimeExports.jsxs("div",{...Lt.props(Fr.body,Z9e.header),children:[D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly1qughib",children:[D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mly6s0dn4 mly167g77z mlydqdrvq mlyb3r6kr",children:[D.jsxRuntimeExports.jsx(An,{name:"database",color:"gray"}),D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.largeBody,Z9e.title),children:u.name})]}),D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5",children:[D.jsxRuntimeExports.jsx($i,{icon:"refresh",tooltip:"Refresh the source",onClick:a,size:"compact",variant:"flat"}),m&&D.jsxRuntimeExports.jsx($i,{icon:"sidebarCollapse",tooltip:"Close the source panel",onClick:m,size:"compact",variant:"flat"})]})]}),D.jsxRuntimeExports.jsx(c$,{value:d,onChange:R=>f(R),placeholder:"Search",size:"compact",icon:"search",hasClear:!0})]}),D.jsxRuntimeExports.jsx(Y_,{}),D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mlydt5ytf mlyysyzu8 mly1iyjqo2",children:S?D.jsxRuntimeExports.jsx(T0r,{source:u,items:_}):D.jsxRuntimeExports.jsxs(Ocr,{defaultExpandedItemId:"views",children:[D.jsxRuntimeExports.jsx(Jre,{id:"dimensions",label:"Dimensions",startIcon:D.jsxRuntimeExports.jsx(An,{name:"dimension",color:"cyan"}),badge:D.jsxRuntimeExports.jsx(Ex,{label:v.length.toString(),color:"cyan"}),children:D.jsxRuntimeExports.jsx(lne,{source:u,fieldItems:g,fieldGroupType:"dimension"})},"dimensions"),D.jsxRuntimeExports.jsx(Jre,{id:"measures",label:"Measures",startIcon:D.jsxRuntimeExports.jsx(An,{name:"measure",color:"green"}),badge:D.jsxRuntimeExports.jsx(Ex,{label:b.length.toString(),color:"green"}),children:D.jsxRuntimeExports.jsx(lne,{source:u,fieldItems:g,fieldGroupType:"measure"})},"measures"),D.jsxRuntimeExports.jsx(Jre,{id:"views",label:"Views",startIcon:D.jsxRuntimeExports.jsx(An,{name:"view",color:"purple"}),badge:D.jsxRuntimeExports.jsx(Ex,{label:x.length.toString(),color:"purple"}),children:D.jsxRuntimeExports.jsx(lne,{source:u,fieldItems:g,fieldGroupType:"view"})},"views")]})})]}):null}const Z9e={header:{display:"mly78zum5",flexDirection:"mlydt5ytf",padding:"mlye8ttls",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,gap:"mly167g77z",rowGap:null,columnGap:null,$$css:!0},title:{overflow:"mlyb3r6kr",overflowX:null,overflowY:null,textOverflow:"mlylyipyv",fontWeight:"mly1xlr1w8",color:"mly1ue28sr",$$css:!0}};function D0r({icon:a,title:u,tooltip:d}){const{onExpand:f}=Y.useContext(L$);return D.jsxRuntimeExports.jsx("div",{className:"mly78zum5 mlydt5ytf mly7a106z mlylqzeqv mly5yr21d mly1gzqxud mlyfuqftd",children:D.jsxRuntimeExports.jsxs("div",{className:"mly78zum5 mlydt5ytf mly6s0dn4 mlyl56j7k mly167g77z mlye8ttls",children:[D.jsxRuntimeExports.jsx($i,{icon:a,variant:"flat",size:"compact",tooltip:d,onClick:f}),u&&D.jsxRuntimeExports.jsx("div",{...Lt.props(Fr.body,k0r.title),children:u})]})})}const k0r={title:{fontWeight:"mly1xlr1w8",cursor:"mlyt0e3qv","writing-mode":"mly35i7",$$css:!0}};function eIe({isInitiallyExpanded:a=!0,initialWidth:u,minWidth:d,icon:f,title:m,children:g}){const[x,b]=Y.useState(a),[v,_]=Y.useState(u),S=!x;return D.jsxRuntimeExports.jsxs(L$.Provider,{value:{onExpand:()=>b(!0),onCollapse:()=>b(!1)},children:[D.jsxRuntimeExports.jsxs("div",{...{0:{className:"mly1n2onr6 mly5yr21d mly3psx0u"},1:{className:"mly1n2onr6 mly5yr21d mly3psx0u mly1s85apg"}}[!!S<<0],style:{width:`${v}px`},children:[g,D.jsxRuntimeExports.jsx(Rcr,{width:v,minWidth:d,onWidthChange:_})]}),S&&D.jsxRuntimeExports.jsx(D0r,{icon:f,title:m})]})}const L0r=new sIe(new Oo),I0r=new D.QueryClient,P0r=D.styled(D.Box)(({theme:a})=>({display:"flex",flexWrap:"wrap",gap:a.spacing(.5),borderBottom:`1px solid ${a.palette.divider}`,minHeight:36})),j0r=D.styled(D.Button)(({theme:a,selected:u})=>({minHeight:36,padding:a.spacing(.5,2),borderRadius:a.shape.borderRadius,background:u?a.palette.action.selected:"none",color:u?a.palette.primary.main:a.palette.text.primary,fontWeight:u?600:400,border:u?`1px solid ${a.palette.primary.main}`:"1px solid transparent",boxShadow:u?a.shadows[1]:"none",textTransform:"uppercase","&:hover":{background:a.palette.action.hover,border:`1px solid ${a.palette.primary.light}`}}));function Uoe({sourceAndPaths:a,saveResult:u,existingQuery:d,existingSourceName:f}){const[m,g]=Pe.useState(f?a.findIndex(v=>v.sourceInfo.name===f):0),[x,b]=Pe.useState(d||jF());return D.jsxRuntimeExports.jsxs(mo,{variant:"outlined",children:[D.jsxRuntimeExports.jsx(Va,{children:D.jsxRuntimeExports.jsxs(D.Stack$1,{sx:{flexDirection:"row",justifyContent:"space-between"},children:[a.length>0&&D.jsxRuntimeExports.jsx(P0r,{children:a.map((v,_)=>D.jsxRuntimeExports.jsx(j0r,{selected:m===_,onClick:()=>g(_),children:v.sourceInfo.name||`Source ${_+1}`},v.sourceInfo.name||_))}),u&&D.jsxRuntimeExports.jsx(D.CardActions,{sx:{padding:"0px 10px 0px 10px",mb:"auto",mt:"auto"},children:D.jsxRuntimeExports.jsx(D.Button,{onClick:()=>u(a[m].modelPath,a[m].sourceInfo.name,x),children:"Save"})})]})}),D.jsxRuntimeExports.jsx(mS,{children:D.jsxRuntimeExports.jsxs(D.Stack$1,{spacing:2,component:"section",children:[D.jsxRuntimeExports.jsx(zoe,{sourceAndPath:a[m],existingQuery:x,onChange:b}),D.jsxRuntimeExports.jsx(D.Box,{height:"5px"})]})})]})}function jF(){return{query:void 0,malloyQuery:void 0,malloyResult:void 0}}function zoe({sourceAndPath:a,onChange:u,existingQuery:d}){const[f,m]=Pe.useState(d||jF()),[g,x]=Pe.useState([]);Pe.useEffect(()=>{u&&u(f)},[u,f]);const{server:b,projectName:v,packageName:_,versionId:S,accessToken:R}=gS(),w=D.useMutation({mutationFn:()=>{const P=new Zr.ASTQuery({source:a.sourceInfo,query:f?.malloyQuery}).toMalloy();return m({...f,query:P}),L0r.executeQuery(v,_,a.modelPath,P,void 0,void 0,S,{baseURL:b,withCredentials:!R,headers:{Authorization:R&&`Bearer ${R}`}})},onSuccess:P=>{if(P){const $=JSON.parse(P.data.result);m({...f,malloyResult:$})}}},I0r),[N,k]=Pe.useState(a.sourceInfo.name);Pe.useEffect(()=>{N!==a.sourceInfo.name&&(k(a.sourceInfo.name),m(jF()))},[a,N]);const B=Pe.useCallback(P=>{m({...f,malloyQuery:P})},[f]);return N!==a.sourceInfo.name?D.jsxRuntimeExports.jsx("div",{children:"Loading..."}):D.jsxRuntimeExports.jsx(XWt,{children:D.jsxRuntimeExports.jsx(JWt,{children:D.jsxRuntimeExports.jsx(VXt,{source:a.sourceInfo,query:f?.malloyQuery,onQueryChange:B,focusedNestViewPath:g,onFocusedNestViewPathChange:x,onDrill:P=>{console.info(P),window.alert("Drill!")},children:D.jsxRuntimeExports.jsx("div",{style:{display:"flex",flexDirection:"column",height:"100%"},children:D.jsxRuntimeExports.jsxs("div",{style:{display:"flex",height:"100%",overflowY:"auto"},children:[D.jsxRuntimeExports.jsx(eIe,{isInitiallyExpanded:!0,initialWidth:180,minWidth:180,icon:"database",title:a.sourceInfo.name,children:D.jsxRuntimeExports.jsx(N0r,{onRefresh:()=>m(jF())})}),D.jsxRuntimeExports.jsx(eIe,{isInitiallyExpanded:!0,initialWidth:280,minWidth:280,icon:"filterSliders",title:"Query",children:D.jsxRuntimeExports.jsx(Xmr,{runQuery:()=>{w.mutate()}})}),D.jsxRuntimeExports.jsx(v0r,{source:a.sourceInfo,draftQuery:f?.malloyQuery,setDraftQuery:P=>m({...f,malloyQuery:P}),submittedQuery:f?.malloyQuery?{executionState:w.isPending?"running":"finished",response:{result:f.malloyResult},query:f.malloyQuery,queryResolutionStartMillis:Date.now(),onCancel:w.reset}:void 0,options:{showRawQuery:!0}})]})})})})},a.sourceInfo.name)}const F0r=new TM(new Oo),M0r=new D.QueryClient;function $0r({modelPath:a,expandResults:u,hideResultIcons:d,expandEmbeddings:f,hideEmbeddingIcons:m}){const[g,x]=Pe.useState(!1),[b,v]=Pe.useState(),[_,S]=Pe.useState(0),{server:R,projectName:w,packageName:N,versionId:k,accessToken:B}=gS(),P=B0r(R,N,a);Pe.useEffect(()=>{zv(P,"typescript").then(X=>{v(X)})},[g,P]);const{data:$,isError:q,isLoading:z,error:W}=D.useQuery({queryKey:["package",R,w,N,a,k],queryFn:()=>F0r.getModel(w,N,a,k,{baseURL:R,withCredentials:!B,headers:{Authorization:B&&`Bearer ${B}`}})},M0r);return z?D.jsxRuntimeExports.jsx(D.Typography,{sx:{p:"20px",m:"auto"},children:"Fetching Model..."}):q?D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:`${N} > ${a} > ${k} - ${W.message}`}):D.jsxRuntimeExports.jsxs(mo,{variant:"outlined",children:[D.jsxRuntimeExports.jsxs(Va,{children:[D.jsxRuntimeExports.jsxs(D.Stack,{sx:{flexDirection:"row",justifyContent:"space-between"},children:[Array.isArray($.data.sourceInfos)&&$.data.sourceInfos.length>0&&D.jsxRuntimeExports.jsx(D.Tabs,{value:_,onChange:(X,J)=>S(J),variant:"scrollable",scrollButtons:"auto",sx:{borderBottom:1,borderColor:"divider",minHeight:36},children:$.data.sourceInfos.map((X,J)=>{let ee;try{ee=JSON.parse(X)}catch{ee={name:String(J)}}return D.jsxRuntimeExports.jsx(D.Tab,{label:ee.name||`Source ${J+1}`,sx:{minHeight:36}},ee.name||J)})}),!m&&D.jsxRuntimeExports.jsx(D.CardActions,{sx:{padding:"0px 10px 0px 10px",mb:"auto",mt:"auto"},children:D.jsxRuntimeExports.jsx(D.Tooltip,{title:g?"Hide Embedding":"View Embedding",children:D.jsxRuntimeExports.jsx(D.IconButton,{size:"small",onClick:()=>{x(!g)},children:D.jsxRuntimeExports.jsx(D.LinkOutlinedIcon,{})})})})]}),D.jsxRuntimeExports.jsxs(D.Collapse,{in:g,timeout:"auto",unmountOnExit:!0,children:[D.jsxRuntimeExports.jsx(D.Divider,{}),D.jsxRuntimeExports.jsxs(D.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:[D.jsxRuntimeExports.jsx(D.Typography,{sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:D.jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:b}})}),D.jsxRuntimeExports.jsx(D.Tooltip,{title:"Copy Embeddable Code",children:D.jsxRuntimeExports.jsx(D.IconButton,{sx:{width:"24px",height:"24px"},onClick:()=>{navigator.clipboard.writeText(P)},children:D.jsxRuntimeExports.jsx(D.ContentCopyIcon,{})})})]})]}),D.jsxRuntimeExports.jsx(D.Divider,{})]}),D.jsxRuntimeExports.jsx(mS,{children:D.jsxRuntimeExports.jsxs(D.Stack,{spacing:2,component:"section",children:[Array.isArray($.data.sourceInfos)&&$.data.sourceInfos.length>0&&D.jsxRuntimeExports.jsx(zoe,{sourceAndPath:{modelPath:a,sourceInfo:JSON.parse($.data.sourceInfos[_])}}),$.data.queries?.length>0&&D.jsxRuntimeExports.jsxs(mo,{variant:"outlined",sx:{padding:"0px 10px 0px 10px"},children:[D.jsxRuntimeExports.jsx(Va,{sx:{p:"10px"},children:D.jsxRuntimeExports.jsx(D.Typography,{variant:"subtitle1",children:"Named Queries"})}),D.jsxRuntimeExports.jsx(D.Stack,{spacing:1,component:"section",children:$.data.queries.map(X=>D.jsxRuntimeExports.jsx(nVt,{server:R,projectName:w,packageName:N,modelPath:a,versionId:k,queryName:X.name,expandResult:u,hideResultIcon:d,expandEmbedding:f,hideEmbeddingIcon:m,accessToken:B,noView:!0,annotations:X.annotations},X.name))}),D.jsxRuntimeExports.jsx(D.Box$1,{height:"10px"})]}),D.jsxRuntimeExports.jsx(D.Box$1,{height:"5px"})]})})]})}function B0r(a,u,d){return`<Model
|
|
2884
2884
|
server="${a}"
|
|
2885
2885
|
packageName="${u}"
|
|
2886
2886
|
modelPath="${d}"
|
|
2887
2887
|
accessToken={accessToken}
|
|
2888
|
-
/>`}D.axios.defaults.baseURL="http://localhost:4000";const q0r=new nIe(new Oo),U0r=new D.QueryClient;function z0r({server:a,projectName:u,packageName:d,versionId:f,accessToken:m}){const{data:g,isSuccess:x,isError:b,error:v}=D.useQuery({queryKey:["package",a,u,d,f],queryFn:()=>q0r.getPackage(u,d,f,!1,{baseURL:a,withCredentials:!m,headers:{Authorization:m&&`Bearer ${m}`}}),retry:!1},U0r);return D.jsxRuntimeExports.jsx(mo,{variant:"outlined",sx:{padding:"10px",width:"100%"},children:D.jsxRuntimeExports.jsxs(Va,{children:[D.jsxRuntimeExports.jsx(D.Typography,{variant:"overline",fontWeight:"bold",children:"Package Config"}),D.jsxRuntimeExports.jsx(D.Divider,{}),D.jsxRuntimeExports.jsx(D.Box$1,{sx:{mt:"10px",maxHeight:"200px",overflowY:"auto"},children:D.jsxRuntimeExports.jsxs(D.List,{dense:!0,disablePadding:!0,children:[D.jsxRuntimeExports.jsx(D.ListItem,{dense:!0,disablePadding:!0,children:D.jsxRuntimeExports.jsx(D.ListItemText,{primary:"Name",secondary:d})}),!x&&!b&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"20px",m:"auto"},children:"Fethching Package Metadata..."}),x&&(g.data&&D.jsxRuntimeExports.jsx(D.ListItem,{dense:!0,disablePadding:!0,children:D.jsxRuntimeExports.jsx(D.ListItemText,{primary:"Description",secondary:g.data.description})})||D.jsxRuntimeExports.jsxs(D.ListItem,{disablePadding:!0,dense:!0,sx:{mt:"20px"},children:[D.jsxRuntimeExports.jsx(D.ErrorIcon,{sx:{color:"grey.600",mr:"10px"}}),D.jsxRuntimeExports.jsx(D.ListItemText,{primary:"No package manifest"})]})),b&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:`${u} > ${d} > ${f} - ${v.message}`})]})})]})})}const H0r=new Aie(new Oo),G0r=new D.QueryClient;function W0r({connection:a}){return D.jsxRuntimeExports.jsxs(D.TableRow,{children:[D.jsxRuntimeExports.jsx(D.TableCell,{children:D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",children:a.name})}),D.jsxRuntimeExports.jsx(D.TableCell,{children:D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",children:a.type})})]},a.name)}function V0r(a){const{server:u,projectName:d,accessToken:f}=a,{data:m,isSuccess:g,isError:x,error:b}=D.useQuery({queryKey:["connections",u,d],queryFn:()=>H0r.listConnections(d,{baseURL:u,withCredentials:!f,headers:{Authorization:f&&`Bearer ${f}`}}),retry:!1},G0r);return D.jsxRuntimeExports.jsx(mo,{variant:"outlined",sx:{padding:"10px",width:"100%"},children:D.jsxRuntimeExports.jsxs(Va,{children:[D.jsxRuntimeExports.jsx(D.Typography,{variant:"overline",fontWeight:"bold",children:"Database Connections"}),D.jsxRuntimeExports.jsx(D.Divider,{}),D.jsxRuntimeExports.jsxs(D.Box$1,{sx:{mt:"10px",maxHeight:"200px",overflowY:"auto"},children:[!g&&!x&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"20px",m:"auto"},children:"Fetching Connections..."}),g&&m.data.length>0&&D.jsxRuntimeExports.jsx(D.Table,{size:"small",children:D.jsxRuntimeExports.jsxs(D.TableBody,{children:[D.jsxRuntimeExports.jsxs(D.TableRow,{children:[D.jsxRuntimeExports.jsx(D.TableCell,{children:D.jsxRuntimeExports.jsx(D.Typography,{variant:"subtitle2",fontWeight:"bold",children:"Connection Name"})}),D.jsxRuntimeExports.jsx(D.TableCell,{children:D.jsxRuntimeExports.jsx(D.Typography,{variant:"subtitle2",fontWeight:"bold",children:"Type"})})]}),m.data.map(v=>D.jsxRuntimeExports.jsx(W0r,{connection:v},v.name))]})}),g&&m.data.length===0&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",children:"No Connections"}),x&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:`${d} - ${b.message}`})]})]})})}const Q0r=new QHt(new Oo),Y0r=new D.QueryClient;function K0r({server:a,projectName:u,packageName:d,versionId:f,accessToken:m}){const{data:g,isSuccess:x,isError:b,error:v}=D.useQuery({queryKey:["databases",a,u,d,f],queryFn:()=>Q0r.listDatabases(u,d,f,{baseURL:a,withCredentials:!m,headers:{Authorization:m&&`Bearer ${m}`}}),retry:!1},Y0r),_=S=>S>=1024*1024*1024*1024?`${(S/(1024*1024*1024)).toFixed(2)} T`:S>=1024*1024*1024?`${(S/(1024*1024*1024)).toFixed(2)} G`:S>=1024*1024?`${(S/(1024*1024)).toFixed(2)} M`:`${(S/1024).toFixed(2)} K`;return D.jsxRuntimeExports.jsx(mo,{variant:"outlined",sx:{padding:"10px",width:"100%"},children:D.jsxRuntimeExports.jsxs(Va,{children:[D.jsxRuntimeExports.jsx(D.Typography,{variant:"overline",fontWeight:"bold",children:"Embedded Databases"}),D.jsxRuntimeExports.jsx(D.Divider,{}),D.jsxRuntimeExports.jsxs(D.Box$1,{sx:{mt:"10px",maxHeight:"200px",overflowY:"auto"},children:[!x&&!b&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"20px",m:"auto"},children:"Fetching Databases..."}),x&&g.data.length>0&&D.jsxRuntimeExports.jsx(D.TableContainer,{children:D.jsxRuntimeExports.jsxs(D.Table,{size:"small",children:[D.jsxRuntimeExports.jsx(D.TableHead,{children:D.jsxRuntimeExports.jsxs(D.TableRow,{children:[D.jsxRuntimeExports.jsx(D.TableCell,{children:D.jsxRuntimeExports.jsx(D.Typography,{variant:"subtitle2",fontWeight:"bold",children:"Database Name"})}),D.jsxRuntimeExports.jsx(D.TableCell,{align:"right",children:D.jsxRuntimeExports.jsx(D.Typography,{variant:"subtitle2",fontWeight:"bold",children:"Table Rows"})})]})}),D.jsxRuntimeExports.jsx(D.TableBody,{children:g.data.map(S=>D.jsxRuntimeExports.jsxs(D.TableRow,{children:[D.jsxRuntimeExports.jsx(D.TableCell,{children:D.jsxRuntimeExports.jsx(X0r,{database:S})}),D.jsxRuntimeExports.jsx(D.TableCell,{align:"right",children:D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",children:_(S.info.rowCount)})})]},S.path))})]})}),x&&g.data.length===0&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",children:"No Embedded Databases"}),b&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:`${u} > ${d} > ${f} - ${v.message}`})]})]})})}function X0r({database:a}){const[u,d]=Pe.useState(!1);return D.jsxRuntimeExports.jsxs(D.Box$1,{sx:{display:"flex",alignItems:"center"},onClick:()=>d(!u),style:{cursor:"pointer"},children:[D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",color:"primary",sx:{maxWidth:"200px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.path})," ",D.jsxRuntimeExports.jsx(D.Box$1,{sx:{display:"flex",alignItems:"center"},children:D.jsxRuntimeExports.jsx(D.Box$1,{sx:{mr:1,display:"flex",alignItems:"center"},children:D.jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[D.jsxRuntimeExports.jsx("path",{d:"M11 7H6C5.46957 7 4.96086 7.21071 4.58579 7.58579C4.21071 7.96086 4 8.46957 4 9V18C4 18.5304 4.21071 19.0391 4.58579 19.4142C4.96086 19.7893 5.46957 20 6 20H15C15.5304 20 16.0391 19.7893 16.4142 19.4142C16.7893 19.0391 17 18.5304 17 18V13",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),D.jsxRuntimeExports.jsx("path",{d:"M9 15L20 4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),D.jsxRuntimeExports.jsx("path",{d:"M15 4H20V9",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})})}),D.jsxRuntimeExports.jsx(J0r,{database:a,open:u,setClose:()=>d(!1)})]})}function J0r({database:a,open:u,setClose:d}){return D.jsxRuntimeExports.jsxs(D.Dialog,{open:u,onClose:d,maxWidth:"sm",fullWidth:!0,children:[D.jsxRuntimeExports.jsxs(D.DialogTitle,{children:["Schema:"," ",D.jsxRuntimeExports.jsx(D.Typography,{fontSize:"large",variant:"body2",fontFamily:"monospace",component:"span",children:a.path}),D.jsxRuntimeExports.jsx(D.IconButton,{"aria-label":"close",onClick:d,sx:{position:"absolute",right:8,top:8},children:D.jsxRuntimeExports.jsx(D.Box$1,{sx:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:"X"})})]}),D.jsxRuntimeExports.jsx(D.DialogContent,{children:D.jsxRuntimeExports.jsx(D.TableContainer,{children:D.jsxRuntimeExports.jsxs(D.Table,{size:"small",sx:{"& .MuiTableCell-root":{padding:"10px"}},children:[D.jsxRuntimeExports.jsx(D.TableHead,{children:D.jsxRuntimeExports.jsxs(D.TableRow,{children:[D.jsxRuntimeExports.jsx(D.TableCell,{children:"NAME"}),D.jsxRuntimeExports.jsx(D.TableCell,{children:"TYPE"})]})}),D.jsxRuntimeExports.jsx(D.TableBody,{children:a.info.columns.map(f=>D.jsxRuntimeExports.jsxs(D.TableRow,{children:[D.jsxRuntimeExports.jsx(D.TableCell,{children:f.name}),D.jsxRuntimeExports.jsx(D.TableCell,{children:f.type})]},f.name))})]})})})]})}function Nqe({items:a,defaultExpandedItems:u,navigate:d}){return D.jsxRuntimeExports.jsx(D.RichTreeView,{items:ngr(a,d),defaultExpandedItems:u,slots:{item:rgr}})}const Z0r=D.animated(D.Collapse);function egr(a){const u=D.useSpring({to:{opacity:a.in?1:0,transform:`translate3d(0,${a.in?0:20}px,0)`}});return D.jsxRuntimeExports.jsx(Z0r,{style:u,...a})}function tgr({item:a,...u}){return D.jsxRuntimeExports.jsxs(D.TreeItem2Label,{...u,sx:{display:"flex",alignItems:"center",color:"grey.600"},children:[a.fileType==="directory"&&D.jsxRuntimeExports.jsx(D.FolderIcon,{})||a.fileType==="notebook"&&D.jsxRuntimeExports.jsx(D.ArticleIcon,{})||a.fileType==="model"&&D.jsxRuntimeExports.jsx(D.DataArrayIcon,{})||a.fileType=="database"&&D.jsxRuntimeExports.jsx(D.DnsIcon,{})||D.jsxRuntimeExports.jsx(D.ErrorIcon,{}),D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{marginLeft:"5px"},color:a.link?"primary.main":"grey.600",children:a.label})]})}const rgr=Y.forwardRef(function(u,d){const{id:f,itemId:m,label:g,children:x,disabled:b,...v}=u,{getRootProps:_,getContentProps:S,getLabelProps:R,getIconContainerProps:w,getGroupTransitionProps:N,status:k,publicAPI:B}=D.unstable_useTreeItem2({id:f,itemId:m,children:x,label:g,disabled:b,rootRef:d}),P=B.getItem(m);return k.selected=!1,k.focused=!1,D.jsxRuntimeExports.jsx(D.TreeItem2Provider,{itemId:m,children:D.jsxRuntimeExports.jsxs(D.TreeItem2Root,{..._(v),children:[D.jsxRuntimeExports.jsxs(D.TreeItem2Content,{...S(),...P.link&&{onClick:$=>P.link($)},sx:{pointerEvents:!P.selectable&&"none"},children:[D.jsxRuntimeExports.jsx(D.TreeItem2IconContainer,{...w(),children:D.jsxRuntimeExports.jsx(D.TreeItem2Icon,{status:k})}),D.jsxRuntimeExports.jsx(tgr,{...R({item:P})})]}),x&&D.jsxRuntimeExports.jsx(egr,{...N()})]})})});function ngr(a,u){const d=new Map;return a.map(f=>{let m=d;const g=f.path.split("/");g.forEach((x,b)=>{b===g.length-1?m.set(x,f):(m.has(x)||m.set(x,new Map),m=m.get(x))})}),Dqe(d,"",u)}function Dqe(a,u,d){const f=[];return a.forEach((m,g)=>{const x=g.endsWith(".malloy")&&"model"||g.endsWith(".malloynb")&&"notebook"||g.endsWith(".parquet")&&"database"||"unknown";x!=="unknown"?f.push({id:u+g,label:g,fileType:x,link:x==="model"||x==="notebook"?b=>d(u+g,b):void 0,selectable:x==="model"||x==="notebook"}):(u+=`${g}/`,f.push({id:u,label:g,fileType:"directory",selectable:!0,link:void 0,children:Dqe(m,u,d)}))}),f}D.axios.defaults.baseURL="http://localhost:4000";const igr=new TM(new Oo),sgr=new D.QueryClient,ogr=["notebooks/","models/"];function agr({server:a,projectName:u,packageName:d,versionId:f,navigate:m,accessToken:g}){const{data:x,isError:b,error:v,isLoading:_,isSuccess:S}=D.useQuery({queryKey:["models",a,u,d,f],queryFn:()=>igr.listModels(u,d,f,{baseURL:a,withCredentials:!g,headers:{Authorization:g&&`Bearer ${g}`}}),retry:!1},sgr);return D.jsxRuntimeExports.jsx(mo,{variant:"outlined",sx:{padding:"10px",width:"100%"},children:D.jsxRuntimeExports.jsxs(Va,{children:[D.jsxRuntimeExports.jsx(D.Typography,{variant:"overline",fontWeight:"bold",children:"Semantic Models"}),D.jsxRuntimeExports.jsx(D.Divider,{}),D.jsxRuntimeExports.jsxs(D.Box$1,{sx:{mt:"10px",maxHeight:"200px",overflowY:"auto"},children:[_&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:"Fetching Models..."}),S&&(x.data.length>0?D.jsxRuntimeExports.jsx(Nqe,{items:x.data.sort((R,w)=>R.path.localeCompare(w.path)),defaultExpandedItems:ogr,navigate:m}):D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:"No models found"})),b&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:`${u} > ${d} > ${f} - ${v.message}`})]})]})})}const lgr=new rIe(new Oo),ugr=new D.QueryClient,cgr=["notebooks/"];function dgr({server:a,projectName:u,packageName:d,versionId:f,navigate:m,accessToken:g}){const{data:x,isLoading:b,isError:v,error:_,isSuccess:S}=D.useQuery({queryKey:["notebooks",a,u,d,f],queryFn:()=>lgr.listNotebooks(u,d,f,{baseURL:a,withCredentials:!g,headers:{Authorization:g&&`Bearer ${g}`}}),retry:!1},ugr);return D.jsxRuntimeExports.jsx(mo,{variant:"outlined",sx:{padding:"10px",width:"100%"},children:D.jsxRuntimeExports.jsxs(Va,{children:[D.jsxRuntimeExports.jsx(D.Typography,{variant:"overline",fontWeight:"bold",children:"Notebooks"}),D.jsxRuntimeExports.jsx(D.Divider,{}),D.jsxRuntimeExports.jsxs(D.Box$1,{sx:{mt:"10px",maxHeight:"200px",overflowY:"auto"},children:[b&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:"Fetching Notebooks..."}),S&&(x.data.length>0?D.jsxRuntimeExports.jsx(Nqe,{items:x.data.sort((R,w)=>R.path.localeCompare(w.path)),defaultExpandedItems:cgr,navigate:m}):D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:"No notebooks found"})),v&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:`${u} > ${d} > ${f} - ${_.message}`})]})]})})}D.axios.defaults.baseURL="http://localhost:4000";const fgr=new nGt(new Oo),hgr=new D.QueryClient;function pgr({server:a,projectName:u,packageName:d,versionId:f,accessToken:m}){const{data:g,isError:x,isLoading:b,error:v}=D.useQuery({queryKey:["schedules",a,u,d,f],queryFn:()=>fgr.listSchedules(u,d,f,{baseURL:a,withCredentials:!m,headers:{Authorization:m&&`Bearer ${m}`}}),retry:!1},hgr);return b?D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"20px",m:"auto"},children:"Fetching Schedules..."}):x?D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:`${d} > ${f} - ${v.message}`}):g.data.length?D.jsxRuntimeExports.jsx(mo,{variant:"outlined",sx:{padding:"10px",width:"100%"},children:D.jsxRuntimeExports.jsxs(Va,{children:[D.jsxRuntimeExports.jsx(D.Typography,{variant:"overline",fontWeight:"bold",children:"Scheduler"}),D.jsxRuntimeExports.jsx(D.Divider,{}),D.jsxRuntimeExports.jsx(D.Box$1,{sx:{mt:"10px",maxHeight:"200px",overflowY:"auto"},children:D.jsxRuntimeExports.jsx(D.TableContainer,{component:D.Paper,children:D.jsxRuntimeExports.jsxs(D.Table,{sx:{minWidth:300},size:"small",children:[D.jsxRuntimeExports.jsx(D.TableHead,{children:D.jsxRuntimeExports.jsxs(D.TableRow,{children:[D.jsxRuntimeExports.jsx(D.TableCell,{align:"left",children:"Resource"}),D.jsxRuntimeExports.jsx(D.TableCell,{align:"left",children:"Schedule"}),D.jsxRuntimeExports.jsx(D.TableCell,{align:"left",children:"Action"}),D.jsxRuntimeExports.jsx(D.TableCell,{align:"left",children:"Connection"}),D.jsxRuntimeExports.jsx(D.TableCell,{align:"left",children:"Last Run"}),D.jsxRuntimeExports.jsx(D.TableCell,{align:"left",children:"Status"})]})}),D.jsxRuntimeExports.jsx(D.TableBody,{children:g.data.map(_=>D.jsxRuntimeExports.jsxs(D.TableRow,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[D.jsxRuntimeExports.jsx(D.TableCell,{align:"left",children:_.resource}),D.jsxRuntimeExports.jsx(D.TableCell,{align:"left",children:_.schedule}),D.jsxRuntimeExports.jsx(D.TableCell,{align:"left",children:_.action}),D.jsxRuntimeExports.jsx(D.TableCell,{align:"left",children:_.connection}),D.jsxRuntimeExports.jsx(D.TableCell,{align:"left",children:_.lastRunTime?new Date(_.lastRunTime).toLocaleString():"n/a"}),D.jsxRuntimeExports.jsx(D.TableCell,{align:"left",children:_.lastRunStatus})]},_.resource))})]})})})]})}):null}const mgr="README.malloynb";function ggr({server:a,projectName:u,packageName:d,versionId:f,navigate:m,accessToken:g}){return m||(m=x=>{window.location.href=x}),D.jsxRuntimeExports.jsx(FIe,{server:a,accessToken:g,projectName:u,packageName:d,versionId:f,children:D.jsxRuntimeExports.jsxs(D.Grid,{container:!0,spacing:2,columns:12,sx:{mb:x=>x.spacing(2)},children:[D.jsxRuntimeExports.jsx(D.Grid,{size:{xs:12,md:4},children:D.jsxRuntimeExports.jsx(z0r,{server:a,projectName:u,packageName:d,versionId:f,accessToken:g})}),D.jsxRuntimeExports.jsx(D.Grid,{size:{xs:12,md:4},children:D.jsxRuntimeExports.jsx(dgr,{server:a,projectName:u,packageName:d,versionId:f,navigate:m,accessToken:g})}),D.jsxRuntimeExports.jsx(D.Grid,{size:{xs:12,md:4},children:D.jsxRuntimeExports.jsx(agr,{server:a,projectName:u,packageName:d,versionId:f,navigate:m,accessToken:g})}),D.jsxRuntimeExports.jsx(D.Grid,{size:{xs:12,md:6},children:D.jsxRuntimeExports.jsx(K0r,{server:a,projectName:u,packageName:d,versionId:f,accessToken:g})}),D.jsxRuntimeExports.jsx(D.Grid,{size:{xs:12,md:6},children:D.jsxRuntimeExports.jsx(V0r,{navigate:m,server:a,projectName:u,accessToken:g})}),D.jsxRuntimeExports.jsx(D.Grid,{size:{xs:12,md:12},children:D.jsxRuntimeExports.jsx(pgr,{server:a,projectName:u,packageName:d,versionId:f,accessToken:g})}),D.jsxRuntimeExports.jsx(D.Grid,{size:{xs:12,md:12},children:D.jsxRuntimeExports.jsx(kqe,{notebookPath:mgr,expandCodeCells:!0,hideEmbeddingIcons:!0})})]})})}const xgr=Pe.lazy(()=>Promise.resolve().then(()=>require("./RenderedResult-B9Gth8IY.cjs")));function ygr({result:a,minHeight:u,maxHeight:d}){const[f,m]=Pe.useState(!1),[g,x]=Pe.useState(0),[b,v]=Pe.useState(!1),_=Pe.useRef(null),S=Pe.useRef(null),[R,w]=Pe.useState(void 0),N=Pe.useCallback(()=>{const P=f;m(!f),P&&S.current&&setTimeout(()=>{S.current?.scrollIntoView({behavior:"smooth",block:"start"})},100)},[f]),k=Pe.useCallback(P=>{console.log("Content height received:",P),x(P)},[]);if(Pe.useEffect(()=>{if(g===0){v(!1);return}const P=u-20,$=g>P;g<P&&w(g+20),v($)},[g,u]),!a)return null;const B=R?{minHeight:`${R}px`,height:`${R}px`}:{};return D.jsxRuntimeExports.jsx(D.jsxRuntimeExports.Fragment,{children:D.jsxRuntimeExports.jsxs(D.Box$1,{ref:S,sx:{position:"relative",minHeight:`${u}px`,maxHeight:`${f?d:u}px`,border:"0px",borderRadius:0,overflow:"hidden",display:"flex",flexDirection:"column",...B},children:[D.jsxRuntimeExports.jsx(D.Box$1,{ref:_,sx:{flex:1,overflow:f?"auto":"hidden",p:1,pb:b?"40px":1},children:a&&D.jsxRuntimeExports.jsx(Pe.Suspense,{fallback:D.jsxRuntimeExports.jsx("div",{children:"Loading result..."}),children:D.jsxRuntimeExports.jsx(xgr,{result:a,onSizeChange:k})})||D.jsxRuntimeExports.jsx("div",{children:" Loading..."})}),b&&D.jsxRuntimeExports.jsx(D.Box$1,{sx:{position:"absolute",bottom:0,left:0,right:0,height:"32px",backgroundColor:"rgba(255, 255, 255, 0.9)",borderTop:"1px solid #e0e0e0",display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(2px)"},children:D.jsxRuntimeExports.jsx(D.IconButton,{size:"small",onClick:N,sx:{color:"text.secondary","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)"}},title:f?"Collapse to original size":"Expand to full size",children:f?D.jsxRuntimeExports.jsx(D.ExpandLess,{sx:{fontSize:20}}):D.jsxRuntimeExports.jsx(D.ExpandMore,{sx:{fontSize:20}})})})]})})}function vgr({cell:a,notebookPath:u,queryResultCodeSnippet:d,expandCodeCell:f,hideCodeCellIcon:m,expandEmbedding:g,hideEmbeddingIcon:x}){const[b,v]=Pe.useState(f||a.type==="code"&&!a.result),[_,S]=Pe.useState(g),[R,w]=Pe.useState(),[N,k]=Pe.useState(),[B,P]=Pe.useState(!1);return Pe.useEffect(()=>{a.type==="code"&&zv(a.text,"malloy").then($=>{w($)})},[a]),Pe.useEffect(()=>{zv(d,"typescript").then($=>{k($)})},[d]),a.type==="markdown"&&D.jsxRuntimeExports.jsx(mo,{variant:"outlined",sx:{border:0},children:D.jsxRuntimeExports.jsx(Va,{children:D.jsxRuntimeExports.jsx(D.Markdown,{children:a.text})})})||a.type==="code"&&D.jsxRuntimeExports.jsxs(mo,{variant:"outlined",sx:{height:"auto"},children:[(!m||!x&&a.result)&&D.jsxRuntimeExports.jsx(D.Stack,{sx:{flexDirection:"row",justifyContent:"right"},children:D.jsxRuntimeExports.jsxs(D.CardActions,{sx:{padding:"0px 10px 0px 10px",mb:"auto",mt:"auto"},children:[a.newSources&&a.newSources.length>0&&D.jsxRuntimeExports.jsx(D.Tooltip,{title:"Explore Data Sources",children:D.jsxRuntimeExports.jsx(D.IconButton,{size:"small",onClick:()=>{P(!B),S(!1),v(!1)},children:D.jsxRuntimeExports.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:D.jsxRuntimeExports.jsx("path",{d:"M3 3h18v18H3V3zm2 2v14h14V5H5zm2 2h10v2H7V7zm0 4h10v2H7v-2zm0 4h10v2H7v-2z",fill:"currentColor"})})})}),!m&&D.jsxRuntimeExports.jsx(D.Tooltip,{title:b?"Hide Code":"View Code",children:D.jsxRuntimeExports.jsx(D.IconButton,{size:"small",onClick:()=>{v(!b)},children:D.jsxRuntimeExports.jsx(D.CodeIcon,{})})}),!x&&a.result&&D.jsxRuntimeExports.jsx(D.Tooltip,{title:_?"Hide Embedding":"View Embedding",children:D.jsxRuntimeExports.jsx(D.IconButton,{size:"small",onClick:()=>{S(!_)},children:D.jsxRuntimeExports.jsx(D.LinkOutlinedIcon,{})})})]})}),D.jsxRuntimeExports.jsxs(D.Collapse,{in:_,timeout:"auto",unmountOnExit:!0,children:[D.jsxRuntimeExports.jsx(D.Divider,{}),D.jsxRuntimeExports.jsxs(D.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:[D.jsxRuntimeExports.jsx(D.Typography,{component:"div",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},dangerouslySetInnerHTML:{__html:N}}),D.jsxRuntimeExports.jsx(D.Tooltip,{title:"Copy Embeddable Code",children:D.jsxRuntimeExports.jsx(D.IconButton,{sx:{width:"24px",height:"24px"},onClick:()=>{navigator.clipboard.writeText(d)},children:D.jsxRuntimeExports.jsx(D.ContentCopyIcon,{})})})]})]}),D.jsxRuntimeExports.jsxs(D.Collapse,{in:b,timeout:"auto",unmountOnExit:!0,children:[D.jsxRuntimeExports.jsx(D.Divider,{}),D.jsxRuntimeExports.jsx(D.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:D.jsxRuntimeExports.jsx(D.Typography,{component:"div",className:"content",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},dangerouslySetInnerHTML:{__html:R}})})]}),D.jsxRuntimeExports.jsxs(D.Collapse,{in:B,timeout:"auto",unmountOnExit:!0,children:[D.jsxRuntimeExports.jsx(D.Stack,{sx:{p:"10px"},children:D.jsxRuntimeExports.jsx(D.Typography,{children:"Sources"})}),D.jsxRuntimeExports.jsx(Uoe,{sourceAndPaths:a.newSources.map($=>({sourceInfo:JSON.parse($),modelPath:u}))})]}),a.result&&!B&&D.jsxRuntimeExports.jsx(D.jsxRuntimeExports.Fragment,{children:D.jsxRuntimeExports.jsx(ygr,{result:a.result,minHeight:200,maxHeight:800})})]})}const bgr=new rIe(new Oo),Egr=new D.QueryClient;function kqe({notebookPath:a,expandCodeCells:u,hideCodeCellIcons:d,expandEmbeddings:f,hideEmbeddingIcons:m}){const[g,x]=Pe.useState(!1),[b,v]=Pe.useState(),{server:_,projectName:S,packageName:R,accessToken:w,versionId:N}=gS(),k=Sgr(_,R,a,!0);Pe.useEffect(()=>{zv(k,"typescript").then(z=>{v(z)})},[g,k]);const{data:B,isSuccess:P,isError:$,error:q}=D.useQuery({queryKey:["notebook",_,S,R,a,N],queryFn:()=>bgr.getNotebook(S,R,a,N,{baseURL:_,withCredentials:!w,headers:{Authorization:w&&`Bearer ${w}`}}),retry:!1},Egr);return D.jsxRuntimeExports.jsxs(mo,{variant:"outlined",children:[D.jsxRuntimeExports.jsxs(Va,{children:[D.jsxRuntimeExports.jsxs(D.Stack,{sx:{flexDirection:"row",justifyContent:"space-between"},children:[D.jsxRuntimeExports.jsx(D.Typography,{variant:"overline",fontWeight:"bold",children:"Notebook"}),!m&&D.jsxRuntimeExports.jsx(D.CardActions,{sx:{padding:"0px 10px 0px 10px",mb:"auto",mt:"auto"},children:D.jsxRuntimeExports.jsx(D.Tooltip,{title:g?"Hide Embedding":"View Embedding",children:D.jsxRuntimeExports.jsx(D.IconButton,{size:"small",onClick:()=>{x(!g)},children:D.jsxRuntimeExports.jsx(D.LinkOutlinedIcon,{})})})})]}),D.jsxRuntimeExports.jsxs(D.Collapse,{in:g,timeout:"auto",unmountOnExit:!0,children:[D.jsxRuntimeExports.jsx(D.Divider,{}),D.jsxRuntimeExports.jsxs(D.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:[D.jsxRuntimeExports.jsx(D.Typography,{sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:D.jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:b}})}),D.jsxRuntimeExports.jsx(D.Tooltip,{title:"Copy Embeddable Code",children:D.jsxRuntimeExports.jsx(D.IconButton,{sx:{width:"24px",height:"24px"},onClick:()=>{navigator.clipboard.writeText(k)},children:D.jsxRuntimeExports.jsx(D.ContentCopyIcon,{})})})]})]}),D.jsxRuntimeExports.jsx(D.Divider,{})]}),D.jsxRuntimeExports.jsx(mS,{children:D.jsxRuntimeExports.jsxs(D.Stack,{spacing:1,component:"section",children:[!P&&!$&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:"Fetching Notebook..."}),P&&B.data.notebookCells?.map((z,W)=>D.jsxRuntimeExports.jsx(vgr,{cell:z,notebookPath:a,queryResultCodeSnippet:_gr(_,S,R,a,z.text),expandCodeCell:u,hideCodeCellIcon:d,expandEmbedding:f,hideEmbeddingIcon:m},W)),$&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:q.message.includes("404")&&`${a} does not exist`||`${S} > ${R} > ${a} > ${N} - ${q.message}`})]})})]})}function _gr(a,u,d,f,m){return`<QueryResult
|
|
2888
|
+
/>`}D.axios.defaults.baseURL="http://localhost:4000";const q0r=new nIe(new Oo),U0r=new D.QueryClient;function z0r({server:a,projectName:u,packageName:d,versionId:f,accessToken:m}){const{data:g,isSuccess:x,isError:b,error:v}=D.useQuery({queryKey:["package",a,u,d,f],queryFn:()=>q0r.getPackage(u,d,f,!1,{baseURL:a,withCredentials:!m,headers:{Authorization:m&&`Bearer ${m}`}}),retry:!1},U0r);return D.jsxRuntimeExports.jsx(mo,{variant:"outlined",sx:{padding:"10px",width:"100%"},children:D.jsxRuntimeExports.jsxs(Va,{children:[D.jsxRuntimeExports.jsx(D.Typography,{variant:"overline",fontWeight:"bold",children:"Package Config"}),D.jsxRuntimeExports.jsx(D.Divider,{}),D.jsxRuntimeExports.jsx(D.Box$1,{sx:{mt:"10px",maxHeight:"200px",overflowY:"auto"},children:D.jsxRuntimeExports.jsxs(D.List,{dense:!0,disablePadding:!0,children:[D.jsxRuntimeExports.jsx(D.ListItem,{dense:!0,disablePadding:!0,children:D.jsxRuntimeExports.jsx(D.ListItemText,{primary:"Name",secondary:d})}),!x&&!b&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"20px",m:"auto"},children:"Fethching Package Metadata..."}),x&&(g.data&&D.jsxRuntimeExports.jsx(D.ListItem,{dense:!0,disablePadding:!0,children:D.jsxRuntimeExports.jsx(D.ListItemText,{primary:"Description",secondary:g.data.description})})||D.jsxRuntimeExports.jsxs(D.ListItem,{disablePadding:!0,dense:!0,sx:{mt:"20px"},children:[D.jsxRuntimeExports.jsx(D.ErrorIcon,{sx:{color:"grey.600",mr:"10px"}}),D.jsxRuntimeExports.jsx(D.ListItemText,{primary:"No package manifest"})]})),b&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:`${u} > ${d} > ${f} - ${v.message}`})]})})]})})}const H0r=new Aie(new Oo),G0r=new D.QueryClient;function W0r({connection:a}){return D.jsxRuntimeExports.jsxs(D.TableRow,{children:[D.jsxRuntimeExports.jsx(D.TableCell,{children:D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",children:a.name})}),D.jsxRuntimeExports.jsx(D.TableCell,{children:D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",children:a.type})})]},a.name)}function V0r(a){const{server:u,projectName:d,accessToken:f}=a,{data:m,isSuccess:g,isError:x,error:b}=D.useQuery({queryKey:["connections",u,d],queryFn:()=>H0r.listConnections(d,{baseURL:u,withCredentials:!f,headers:{Authorization:f&&`Bearer ${f}`}}),retry:!1},G0r);return D.jsxRuntimeExports.jsx(mo,{variant:"outlined",sx:{padding:"10px",width:"100%"},children:D.jsxRuntimeExports.jsxs(Va,{children:[D.jsxRuntimeExports.jsx(D.Typography,{variant:"overline",fontWeight:"bold",children:"Database Connections"}),D.jsxRuntimeExports.jsx(D.Divider,{}),D.jsxRuntimeExports.jsxs(D.Box$1,{sx:{mt:"10px",maxHeight:"200px",overflowY:"auto"},children:[!g&&!x&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"20px",m:"auto"},children:"Fetching Connections..."}),g&&m.data.length>0&&D.jsxRuntimeExports.jsx(D.Table,{size:"small",children:D.jsxRuntimeExports.jsxs(D.TableBody,{children:[D.jsxRuntimeExports.jsxs(D.TableRow,{children:[D.jsxRuntimeExports.jsx(D.TableCell,{children:D.jsxRuntimeExports.jsx(D.Typography,{variant:"subtitle2",fontWeight:"bold",children:"Connection Name"})}),D.jsxRuntimeExports.jsx(D.TableCell,{children:D.jsxRuntimeExports.jsx(D.Typography,{variant:"subtitle2",fontWeight:"bold",children:"Type"})})]}),m.data.map(v=>D.jsxRuntimeExports.jsx(W0r,{connection:v},v.name))]})}),g&&m.data.length===0&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",children:"No Connections"}),x&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:`${d} - ${b.message}`})]})]})})}const Q0r=new QHt(new Oo),Y0r=new D.QueryClient;function K0r({server:a,projectName:u,packageName:d,versionId:f,accessToken:m}){const{data:g,isSuccess:x,isError:b,error:v}=D.useQuery({queryKey:["databases",a,u,d,f],queryFn:()=>Q0r.listDatabases(u,d,f,{baseURL:a,withCredentials:!m,headers:{Authorization:m&&`Bearer ${m}`}}),retry:!1},Y0r),_=S=>S>=1024*1024*1024*1024?`${(S/(1024*1024*1024)).toFixed(2)} T`:S>=1024*1024*1024?`${(S/(1024*1024*1024)).toFixed(2)} G`:S>=1024*1024?`${(S/(1024*1024)).toFixed(2)} M`:`${(S/1024).toFixed(2)} K`;return D.jsxRuntimeExports.jsx(mo,{variant:"outlined",sx:{padding:"10px",width:"100%"},children:D.jsxRuntimeExports.jsxs(Va,{children:[D.jsxRuntimeExports.jsx(D.Typography,{variant:"overline",fontWeight:"bold",children:"Embedded Databases"}),D.jsxRuntimeExports.jsx(D.Divider,{}),D.jsxRuntimeExports.jsxs(D.Box$1,{sx:{mt:"10px",maxHeight:"200px",overflowY:"auto"},children:[!x&&!b&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"20px",m:"auto"},children:"Fetching Databases..."}),x&&g.data.length>0&&D.jsxRuntimeExports.jsx(D.TableContainer,{children:D.jsxRuntimeExports.jsxs(D.Table,{size:"small",children:[D.jsxRuntimeExports.jsx(D.TableHead,{children:D.jsxRuntimeExports.jsxs(D.TableRow,{children:[D.jsxRuntimeExports.jsx(D.TableCell,{children:D.jsxRuntimeExports.jsx(D.Typography,{variant:"subtitle2",fontWeight:"bold",children:"Database Name"})}),D.jsxRuntimeExports.jsx(D.TableCell,{align:"right",children:D.jsxRuntimeExports.jsx(D.Typography,{variant:"subtitle2",fontWeight:"bold",children:"Table Rows"})})]})}),D.jsxRuntimeExports.jsx(D.TableBody,{children:g.data.map(S=>D.jsxRuntimeExports.jsxs(D.TableRow,{children:[D.jsxRuntimeExports.jsx(D.TableCell,{children:D.jsxRuntimeExports.jsx(X0r,{database:S})}),D.jsxRuntimeExports.jsx(D.TableCell,{align:"right",children:D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",children:_(S.info.rowCount)})})]},S.path))})]})}),x&&g.data.length===0&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",children:"No Embedded Databases"}),b&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:`${u} > ${d} > ${f} - ${v.message}`})]})]})})}function X0r({database:a}){const[u,d]=Pe.useState(!1);return D.jsxRuntimeExports.jsxs(D.Box$1,{sx:{display:"flex",alignItems:"center"},onClick:()=>d(!u),style:{cursor:"pointer"},children:[D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",color:"primary",sx:{maxWidth:"200px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.path})," ",D.jsxRuntimeExports.jsx(D.Box$1,{sx:{display:"flex",alignItems:"center"},children:D.jsxRuntimeExports.jsx(D.Box$1,{sx:{mr:1,display:"flex",alignItems:"center"},children:D.jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[D.jsxRuntimeExports.jsx("path",{d:"M11 7H6C5.46957 7 4.96086 7.21071 4.58579 7.58579C4.21071 7.96086 4 8.46957 4 9V18C4 18.5304 4.21071 19.0391 4.58579 19.4142C4.96086 19.7893 5.46957 20 6 20H15C15.5304 20 16.0391 19.7893 16.4142 19.4142C16.7893 19.0391 17 18.5304 17 18V13",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),D.jsxRuntimeExports.jsx("path",{d:"M9 15L20 4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),D.jsxRuntimeExports.jsx("path",{d:"M15 4H20V9",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})})}),D.jsxRuntimeExports.jsx(J0r,{database:a,open:u,setClose:()=>d(!1)})]})}function J0r({database:a,open:u,setClose:d}){return D.jsxRuntimeExports.jsxs(D.Dialog,{open:u,onClose:d,maxWidth:"sm",fullWidth:!0,children:[D.jsxRuntimeExports.jsxs(D.DialogTitle,{children:["Schema:"," ",D.jsxRuntimeExports.jsx(D.Typography,{fontSize:"large",variant:"body2",fontFamily:"monospace",component:"span",children:a.path}),D.jsxRuntimeExports.jsx(D.IconButton,{"aria-label":"close",onClick:d,sx:{position:"absolute",right:8,top:8},children:D.jsxRuntimeExports.jsx(D.Box$1,{sx:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:"X"})})]}),D.jsxRuntimeExports.jsx(D.DialogContent,{children:D.jsxRuntimeExports.jsx(D.TableContainer,{children:D.jsxRuntimeExports.jsxs(D.Table,{size:"small",sx:{"& .MuiTableCell-root":{padding:"10px"}},children:[D.jsxRuntimeExports.jsx(D.TableHead,{children:D.jsxRuntimeExports.jsxs(D.TableRow,{children:[D.jsxRuntimeExports.jsx(D.TableCell,{children:"NAME"}),D.jsxRuntimeExports.jsx(D.TableCell,{children:"TYPE"})]})}),D.jsxRuntimeExports.jsx(D.TableBody,{children:a.info.columns.map(f=>D.jsxRuntimeExports.jsxs(D.TableRow,{children:[D.jsxRuntimeExports.jsx(D.TableCell,{children:f.name}),D.jsxRuntimeExports.jsx(D.TableCell,{children:f.type})]},f.name))})]})})})]})}function Nqe({items:a,defaultExpandedItems:u,navigate:d}){return D.jsxRuntimeExports.jsx(D.RichTreeView,{items:ngr(a,d),defaultExpandedItems:u,slots:{item:rgr}})}const Z0r=D.animated(D.Collapse);function egr(a){const u=D.useSpring({to:{opacity:a.in?1:0,transform:`translate3d(0,${a.in?0:20}px,0)`}});return D.jsxRuntimeExports.jsx(Z0r,{style:u,...a})}function tgr({item:a,...u}){return D.jsxRuntimeExports.jsxs(D.TreeItem2Label,{...u,sx:{display:"flex",alignItems:"center",color:"grey.600"},children:[a.fileType==="directory"&&D.jsxRuntimeExports.jsx(D.FolderIcon,{})||a.fileType==="notebook"&&D.jsxRuntimeExports.jsx(D.ArticleIcon,{})||a.fileType==="model"&&D.jsxRuntimeExports.jsx(D.DataArrayIcon,{})||a.fileType=="database"&&D.jsxRuntimeExports.jsx(D.DnsIcon,{})||D.jsxRuntimeExports.jsx(D.ErrorIcon,{}),D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{marginLeft:"5px"},color:a.link?"primary.main":"grey.600",children:a.label})]})}const rgr=Y.forwardRef(function(u,d){const{id:f,itemId:m,label:g,children:x,disabled:b,...v}=u,{getRootProps:_,getContentProps:S,getLabelProps:R,getIconContainerProps:w,getGroupTransitionProps:N,status:k,publicAPI:B}=D.unstable_useTreeItem2({id:f,itemId:m,children:x,label:g,disabled:b,rootRef:d}),P=B.getItem(m);return k.selected=!1,k.focused=!1,D.jsxRuntimeExports.jsx(D.TreeItem2Provider,{itemId:m,children:D.jsxRuntimeExports.jsxs(D.TreeItem2Root,{..._(v),children:[D.jsxRuntimeExports.jsxs(D.TreeItem2Content,{...S(),...P.link&&{onClick:$=>P.link($)},sx:{pointerEvents:!P.selectable&&"none"},children:[D.jsxRuntimeExports.jsx(D.TreeItem2IconContainer,{...w(),children:D.jsxRuntimeExports.jsx(D.TreeItem2Icon,{status:k})}),D.jsxRuntimeExports.jsx(tgr,{...R({item:P})})]}),x&&D.jsxRuntimeExports.jsx(egr,{...N()})]})})});function ngr(a,u){const d=new Map;return a.map(f=>{let m=d;const g=f.path.split("/");g.forEach((x,b)=>{b===g.length-1?m.set(x,f):(m.has(x)||m.set(x,new Map),m=m.get(x))})}),Dqe(d,"",u)}function Dqe(a,u,d){const f=[];return a.forEach((m,g)=>{const x=g.endsWith(".malloy")&&"model"||g.endsWith(".malloynb")&&"notebook"||g.endsWith(".parquet")&&"database"||"unknown";x!=="unknown"?f.push({id:u+g,label:g,fileType:x,link:x==="model"||x==="notebook"?b=>d(u+g,b):void 0,selectable:x==="model"||x==="notebook"}):(u+=`${g}/`,f.push({id:u,label:g,fileType:"directory",selectable:!0,link:void 0,children:Dqe(m,u,d)}))}),f}D.axios.defaults.baseURL="http://localhost:4000";const igr=new TM(new Oo),sgr=new D.QueryClient,ogr=["notebooks/","models/"];function agr({server:a,projectName:u,packageName:d,versionId:f,navigate:m,accessToken:g}){const{data:x,isError:b,error:v,isLoading:_,isSuccess:S}=D.useQuery({queryKey:["models",a,u,d,f],queryFn:()=>igr.listModels(u,d,f,{baseURL:a,withCredentials:!g,headers:{Authorization:g&&`Bearer ${g}`}}),retry:!1},sgr);return D.jsxRuntimeExports.jsx(mo,{variant:"outlined",sx:{padding:"10px",width:"100%"},children:D.jsxRuntimeExports.jsxs(Va,{children:[D.jsxRuntimeExports.jsx(D.Typography,{variant:"overline",fontWeight:"bold",children:"Semantic Models"}),D.jsxRuntimeExports.jsx(D.Divider,{}),D.jsxRuntimeExports.jsxs(D.Box$1,{sx:{mt:"10px",maxHeight:"200px",overflowY:"auto"},children:[_&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:"Fetching Models..."}),S&&(x.data.length>0?D.jsxRuntimeExports.jsx(Nqe,{items:x.data.sort((R,w)=>R.path.localeCompare(w.path)),defaultExpandedItems:ogr,navigate:m}):D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:"No models found"})),b&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:`${u} > ${d} > ${f} - ${v.message}`})]})]})})}const lgr=new rIe(new Oo),ugr=new D.QueryClient,cgr=["notebooks/"];function dgr({server:a,projectName:u,packageName:d,versionId:f,navigate:m,accessToken:g}){const{data:x,isLoading:b,isError:v,error:_,isSuccess:S}=D.useQuery({queryKey:["notebooks",a,u,d,f],queryFn:()=>lgr.listNotebooks(u,d,f,{baseURL:a,withCredentials:!g,headers:{Authorization:g&&`Bearer ${g}`}}),retry:!1},ugr);return D.jsxRuntimeExports.jsx(mo,{variant:"outlined",sx:{padding:"10px",width:"100%"},children:D.jsxRuntimeExports.jsxs(Va,{children:[D.jsxRuntimeExports.jsx(D.Typography,{variant:"overline",fontWeight:"bold",children:"Notebooks"}),D.jsxRuntimeExports.jsx(D.Divider,{}),D.jsxRuntimeExports.jsxs(D.Box$1,{sx:{mt:"10px",maxHeight:"200px",overflowY:"auto"},children:[b&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:"Fetching Notebooks..."}),S&&(x.data.length>0?D.jsxRuntimeExports.jsx(Nqe,{items:x.data.sort((R,w)=>R.path.localeCompare(w.path)),defaultExpandedItems:cgr,navigate:m}):D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:"No notebooks found"})),v&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:`${u} > ${d} > ${f} - ${_.message}`})]})]})})}D.axios.defaults.baseURL="http://localhost:4000";const fgr=new nGt(new Oo),hgr=new D.QueryClient;function pgr({server:a,projectName:u,packageName:d,versionId:f,accessToken:m}){const{data:g,isError:x,isLoading:b,error:v}=D.useQuery({queryKey:["schedules",a,u,d,f],queryFn:()=>fgr.listSchedules(u,d,f,{baseURL:a,withCredentials:!m,headers:{Authorization:m&&`Bearer ${m}`}}),retry:!1},hgr);return b?D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"20px",m:"auto"},children:"Fetching Schedules..."}):x?D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:`${d} > ${f} - ${v.message}`}):g.data.length?D.jsxRuntimeExports.jsx(mo,{variant:"outlined",sx:{padding:"10px",width:"100%"},children:D.jsxRuntimeExports.jsxs(Va,{children:[D.jsxRuntimeExports.jsx(D.Typography,{variant:"overline",fontWeight:"bold",children:"Scheduler"}),D.jsxRuntimeExports.jsx(D.Divider,{}),D.jsxRuntimeExports.jsx(D.Box$1,{sx:{mt:"10px",maxHeight:"200px",overflowY:"auto"},children:D.jsxRuntimeExports.jsx(D.TableContainer,{component:D.Paper,children:D.jsxRuntimeExports.jsxs(D.Table,{sx:{minWidth:300},size:"small",children:[D.jsxRuntimeExports.jsx(D.TableHead,{children:D.jsxRuntimeExports.jsxs(D.TableRow,{children:[D.jsxRuntimeExports.jsx(D.TableCell,{align:"left",children:"Resource"}),D.jsxRuntimeExports.jsx(D.TableCell,{align:"left",children:"Schedule"}),D.jsxRuntimeExports.jsx(D.TableCell,{align:"left",children:"Action"}),D.jsxRuntimeExports.jsx(D.TableCell,{align:"left",children:"Connection"}),D.jsxRuntimeExports.jsx(D.TableCell,{align:"left",children:"Last Run"}),D.jsxRuntimeExports.jsx(D.TableCell,{align:"left",children:"Status"})]})}),D.jsxRuntimeExports.jsx(D.TableBody,{children:g.data.map(_=>D.jsxRuntimeExports.jsxs(D.TableRow,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[D.jsxRuntimeExports.jsx(D.TableCell,{align:"left",children:_.resource}),D.jsxRuntimeExports.jsx(D.TableCell,{align:"left",children:_.schedule}),D.jsxRuntimeExports.jsx(D.TableCell,{align:"left",children:_.action}),D.jsxRuntimeExports.jsx(D.TableCell,{align:"left",children:_.connection}),D.jsxRuntimeExports.jsx(D.TableCell,{align:"left",children:_.lastRunTime?new Date(_.lastRunTime).toLocaleString():"n/a"}),D.jsxRuntimeExports.jsx(D.TableCell,{align:"left",children:_.lastRunStatus})]},_.resource))})]})})})]})}):null}const mgr="README.malloynb";function ggr({server:a,projectName:u,packageName:d,versionId:f,navigate:m,accessToken:g}){return m||(m=x=>{window.location.href=x}),D.jsxRuntimeExports.jsx(FIe,{server:a,accessToken:g,projectName:u,packageName:d,versionId:f,children:D.jsxRuntimeExports.jsxs(D.Grid,{container:!0,spacing:2,columns:12,sx:{mb:x=>x.spacing(2)},children:[D.jsxRuntimeExports.jsx(D.Grid,{size:{xs:12,md:4},children:D.jsxRuntimeExports.jsx(z0r,{server:a,projectName:u,packageName:d,versionId:f,accessToken:g})}),D.jsxRuntimeExports.jsx(D.Grid,{size:{xs:12,md:4},children:D.jsxRuntimeExports.jsx(dgr,{server:a,projectName:u,packageName:d,versionId:f,navigate:m,accessToken:g})}),D.jsxRuntimeExports.jsx(D.Grid,{size:{xs:12,md:4},children:D.jsxRuntimeExports.jsx(agr,{server:a,projectName:u,packageName:d,versionId:f,navigate:m,accessToken:g})}),D.jsxRuntimeExports.jsx(D.Grid,{size:{xs:12,md:6},children:D.jsxRuntimeExports.jsx(K0r,{server:a,projectName:u,packageName:d,versionId:f,accessToken:g})}),D.jsxRuntimeExports.jsx(D.Grid,{size:{xs:12,md:6},children:D.jsxRuntimeExports.jsx(V0r,{navigate:m,server:a,projectName:u,accessToken:g})}),D.jsxRuntimeExports.jsx(D.Grid,{size:{xs:12,md:12},children:D.jsxRuntimeExports.jsx(pgr,{server:a,projectName:u,packageName:d,versionId:f,accessToken:g})}),D.jsxRuntimeExports.jsx(D.Grid,{size:{xs:12,md:12},children:D.jsxRuntimeExports.jsx(kqe,{notebookPath:mgr,expandCodeCells:!1,hideEmbeddingIcons:!0})})]})})}const xgr=Pe.lazy(()=>Promise.resolve().then(()=>require("./RenderedResult-B9Gth8IY.cjs")));function ygr({result:a,minHeight:u,maxHeight:d}){const[f,m]=Pe.useState(!1),[g,x]=Pe.useState(0),[b,v]=Pe.useState(!1),_=Pe.useRef(null),S=Pe.useRef(null),[R,w]=Pe.useState(void 0),N=Pe.useCallback(()=>{const P=f;m(!f),P&&S.current&&setTimeout(()=>{S.current?.scrollIntoView({behavior:"smooth",block:"start"})},100)},[f]),k=Pe.useCallback(P=>{console.log("Content height received:",P),x(P)},[]);if(Pe.useEffect(()=>{if(g===0){v(!1);return}const P=u-20,$=g>P;g<P&&w(g+20),v($)},[g,u]),!a)return null;const B=R?{minHeight:`${R}px`,height:`${R}px`}:{};return D.jsxRuntimeExports.jsx(D.jsxRuntimeExports.Fragment,{children:D.jsxRuntimeExports.jsxs(D.Box$1,{ref:S,sx:{position:"relative",minHeight:`${u}px`,maxHeight:`${f?d:u}px`,border:"0px",borderRadius:0,overflow:"hidden",display:"flex",flexDirection:"column",...B},children:[D.jsxRuntimeExports.jsx(D.Box$1,{ref:_,sx:{flex:1,overflow:f?"auto":"hidden",p:1,pb:b?"40px":1},children:a&&D.jsxRuntimeExports.jsx(Pe.Suspense,{fallback:D.jsxRuntimeExports.jsx("div",{children:"Loading result..."}),children:D.jsxRuntimeExports.jsx(xgr,{result:a,onSizeChange:k})})||D.jsxRuntimeExports.jsx("div",{children:" Loading..."})}),b&&D.jsxRuntimeExports.jsx(D.Box$1,{sx:{position:"absolute",bottom:0,left:0,right:0,height:"32px",backgroundColor:"rgba(255,255,255,0.75)",display:"flex",alignItems:"center",justifyContent:"center"},children:D.jsxRuntimeExports.jsx(D.IconButton,{size:"small",onClick:N,sx:{color:"text.secondary","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)"}},title:f?"Collapse to original size":"Expand to full size",children:f?D.jsxRuntimeExports.jsx(D.ExpandLess,{sx:{fontSize:30}}):D.jsxRuntimeExports.jsx(D.ExpandMore,{sx:{fontSize:30}})})})]})})}const vgr=`
|
|
2889
|
+
.code-display pre {
|
|
2890
|
+
margin: 0;
|
|
2891
|
+
padding: 0;
|
|
2892
|
+
}
|
|
2893
|
+
`;function bgr({cell:a,notebookPath:u,queryResultCodeSnippet:d,expandCodeCell:f,hideCodeCellIcon:m,expandEmbedding:g,hideEmbeddingIcon:x}){const[b,v]=Pe.useState(f),[_,S]=Pe.useState(g),[R,w]=Pe.useState(),[N,k]=Pe.useState(),[B,P]=Pe.useState(!1);return Pe.useEffect(()=>{a.type==="code"&&zv(a.text,"malloy").then($=>{w($)})},[a]),Pe.useEffect(()=>{zv(d,"typescript").then($=>{k($)})},[d]),a.type==="markdown"&&D.jsxRuntimeExports.jsx(mo,{variant:"outlined",sx:{border:0},children:D.jsxRuntimeExports.jsx(Va,{children:D.jsxRuntimeExports.jsx(D.Markdown,{children:a.text})})})||a.type==="code"&&D.jsxRuntimeExports.jsxs(mo,{variant:"outlined",sx:{height:"auto"},children:[(!m||!x&&a.result)&&D.jsxRuntimeExports.jsx(D.Stack,{sx:{flexDirection:"row",justifyContent:"right"},children:D.jsxRuntimeExports.jsxs(D.CardActions,{sx:{padding:"0px 10px 0px 10px",mb:"auto",mt:"auto"},children:[a.newSources&&a.newSources.length>0&&D.jsxRuntimeExports.jsx(D.Tooltip,{title:"Explore Data Sources",children:D.jsxRuntimeExports.jsx(D.IconButton,{size:"small",onClick:()=>{P(!B),S(!1),v(!1)},children:D.jsxRuntimeExports.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:D.jsxRuntimeExports.jsx("path",{d:"M3 3h18v18H3V3zm2 2v14h14V5H5zm2 2h10v2H7V7zm0 4h10v2H7v-2zm0 4h10v2H7v-2z",fill:"currentColor"})})})}),!m&&D.jsxRuntimeExports.jsx(D.Tooltip,{title:b?"Hide Code":"View Code",children:D.jsxRuntimeExports.jsx(D.IconButton,{size:"small",onClick:()=>{v(!b)},children:D.jsxRuntimeExports.jsx(D.CodeIcon,{})})}),!x&&a.result&&D.jsxRuntimeExports.jsx(D.Tooltip,{title:_?"Hide Embedding":"View Embedding",children:D.jsxRuntimeExports.jsx(D.IconButton,{size:"small",onClick:()=>{S(!_)},children:D.jsxRuntimeExports.jsx(D.LinkOutlinedIcon,{})})})]})}),D.jsxRuntimeExports.jsx(D.Collapse,{in:_,timeout:"auto",unmountOnExit:!0,children:D.jsxRuntimeExports.jsxs(D.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:[D.jsxRuntimeExports.jsx(D.Typography,{component:"div",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},dangerouslySetInnerHTML:{__html:N}}),D.jsxRuntimeExports.jsx(D.Tooltip,{title:"Copy Embeddable Code",children:D.jsxRuntimeExports.jsx(D.IconButton,{sx:{width:"24px",height:"24px"},onClick:()=>{navigator.clipboard.writeText(d)},children:D.jsxRuntimeExports.jsx(D.ContentCopyIcon,{})})})]})}),D.jsxRuntimeExports.jsxs(D.Collapse,{in:b,timeout:"auto",unmountOnExit:!0,children:[D.jsxRuntimeExports.jsx("style",{children:vgr}),D.jsxRuntimeExports.jsx(D.Stack,{sx:{mx:"15px",mb:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:D.jsxRuntimeExports.jsx("div",{className:"code-display",style:{fontSize:"12px",width:"800px",border:"1px solid rgb(220,220,220)"},dangerouslySetInnerHTML:{__html:R}})})]}),D.jsxRuntimeExports.jsx(D.Collapse,{in:B,timeout:"auto",unmountOnExit:!0,sx:{p:"5px"},children:D.jsxRuntimeExports.jsx(Uoe,{sourceAndPaths:a.newSources.map($=>({sourceInfo:JSON.parse($),modelPath:u}))})}),a.result&&!B&&D.jsxRuntimeExports.jsx(ygr,{result:a.result,minHeight:200,maxHeight:800})]})}const Egr=new rIe(new Oo),_gr=new D.QueryClient;function kqe({notebookPath:a,expandCodeCells:u,hideCodeCellIcons:d,expandEmbeddings:f,hideEmbeddingIcons:m}){const[g,x]=Pe.useState(!1),[b,v]=Pe.useState(),{server:_,projectName:S,packageName:R,accessToken:w,versionId:N}=gS(),k=Agr(_,R,a,!0);Pe.useEffect(()=>{zv(k,"typescript").then(z=>{v(z)})},[g,k]);const{data:B,isSuccess:P,isError:$,error:q}=D.useQuery({queryKey:["notebook",_,S,R,a,N],queryFn:()=>Egr.getNotebook(S,R,a,N,{baseURL:_,withCredentials:!w,headers:{Authorization:w&&`Bearer ${w}`}}),retry:!1},_gr);return D.jsxRuntimeExports.jsxs(mo,{variant:"outlined",children:[D.jsxRuntimeExports.jsxs(Va,{children:[D.jsxRuntimeExports.jsxs(D.Stack,{sx:{flexDirection:"row",justifyContent:"space-between"},children:[D.jsxRuntimeExports.jsx(D.Typography,{variant:"overline",fontWeight:"bold",children:"Notebook"}),!m&&D.jsxRuntimeExports.jsx(D.CardActions,{sx:{padding:"0px 10px 0px 10px",mb:"auto",mt:"auto"},children:D.jsxRuntimeExports.jsx(D.Tooltip,{title:g?"Hide Embedding":"View Embedding",children:D.jsxRuntimeExports.jsx(D.IconButton,{size:"small",onClick:()=>{x(!g)},children:D.jsxRuntimeExports.jsx(D.LinkOutlinedIcon,{})})})})]}),D.jsxRuntimeExports.jsxs(D.Collapse,{in:g,timeout:"auto",unmountOnExit:!0,children:[D.jsxRuntimeExports.jsx(D.Divider,{}),D.jsxRuntimeExports.jsxs(D.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:[D.jsxRuntimeExports.jsx(D.Typography,{sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:D.jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:b}})}),D.jsxRuntimeExports.jsx(D.Tooltip,{title:"Copy Embeddable Code",children:D.jsxRuntimeExports.jsx(D.IconButton,{sx:{width:"24px",height:"24px"},onClick:()=>{navigator.clipboard.writeText(k)},children:D.jsxRuntimeExports.jsx(D.ContentCopyIcon,{})})})]})]}),D.jsxRuntimeExports.jsx(D.Divider,{})]}),D.jsxRuntimeExports.jsx(mS,{children:D.jsxRuntimeExports.jsxs(D.Stack,{spacing:1,component:"section",children:[!P&&!$&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:"Fetching Notebook..."}),P&&B.data.notebookCells?.map((z,W)=>D.jsxRuntimeExports.jsx(bgr,{cell:z,notebookPath:a,queryResultCodeSnippet:Sgr(_,S,R,a,z.text),expandCodeCell:u,hideCodeCellIcon:d,expandEmbedding:f,hideEmbeddingIcon:m},W)),$&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:q.message.includes("404")&&`${a} does not exist`||`${S} > ${R} > ${a} > ${N} - ${q.message}`})]})})]})}function Sgr(a,u,d,f,m){return`<QueryResult
|
|
2889
2894
|
server="${a}"
|
|
2890
2895
|
accessToken={accessToken}
|
|
2891
2896
|
projectName="${u}"
|
|
@@ -2894,16 +2899,16 @@ For more information, see https://radix-ui.com/primitives/docs/components/${u.do
|
|
|
2894
2899
|
query="
|
|
2895
2900
|
${m}
|
|
2896
2901
|
"
|
|
2897
|
-
/>`}function
|
|
2902
|
+
/>`}function Agr(a,u,d,f){return`<Notebook
|
|
2898
2903
|
server="${a}"
|
|
2899
2904
|
packageName="${u}"
|
|
2900
2905
|
notebookPath="${d}"
|
|
2901
2906
|
versionId={versionId}
|
|
2902
2907
|
accessToken={accessToken}
|
|
2903
2908
|
expandCodeCells={${f}}
|
|
2904
|
-
/>`}class
|
|
2909
|
+
/>`}class Cgr{makeKey(u,d){let f=`BROWSER_NOTEBOOK_STORAGE__${u.project}/${u.package}`;return d&&(f+=`/${d}`),f}listNotebooks(u){const d=this.makeKey(u),f=[];for(let m=0;m<localStorage.length;m++){const g=localStorage.key(m);if(g&&g.startsWith(d+"/")){const x=g.substring(d.length+1);f.push(x)}}return f}getNotebook(u,d){const f=this.makeKey(u,d),m=localStorage.getItem(f);if(m===null)throw new Error(`Notebook not found at path: ${d}`);return m}deleteNotebook(u,d){const f=this.makeKey(u,d);if(localStorage.getItem(f)===null)throw new Error(`Notebook not found at path: ${d}`);localStorage.removeItem(f)}saveNotebook(u,d,f){const m=this.makeKey(u,d);localStorage.setItem(m,f)}moveNotebook(u,d,f){const m=this.makeKey(u,d),g=this.makeKey(u,f),x=localStorage.getItem(m);if(x===null)throw new Error(`Notebook not found at path: ${d}`);localStorage.setItem(g,x),localStorage.removeItem(m)}}function Lqe(){const a=zHt.useNavigate();return(u,d)=>{if(!d||!d.metaKey&&!d.ctrlKey&&!d.shiftKey&&d.button!==1){a(u);return}const f=new URL(u,window.location.href).href;(d.metaKey||d.ctrlKey||d.button===1||d.shiftKey)&&window.open(f,"_blank")}}class b5{constructor(u,d,f){Pt(this,"isSaved");Pt(this,"notebookStorage");Pt(this,"userContext");this.notebookData=f,this.notebookStorage=u,this.userContext=d,this.notebookData?this.isSaved=!0:(this.notebookData={models:[],cells:[],notebookPath:void 0},this.isSaved=!1)}getNotebookData(){return this.notebookData}getNotebookPath(){return this.notebookData.notebookPath}renameNotebook(u){if(this.notebookData.notebookPath!==u)try{this.notebookStorage.deleteNotebook(this.userContext,this.notebookData.notebookPath)}catch{}return this.notebookData.notebookPath=u,this.isSaved=!1,this.saveNotebook(),this}getCells(){return this.notebookData.cells}deleteCell(u){return this.notebookData.cells=[...this.notebookData.cells.slice(0,u),...this.notebookData.cells.slice(u+1)],this.isSaved=!1,this}insertCell(u,d){return this.notebookData.cells=[...this.notebookData.cells.slice(0,u),d,...this.notebookData.cells.slice(u)],this.isSaved=!1,this}setCell(u,d){return this.notebookData.cells[u]=d,this.isSaved=!1,this}setModels(u){return this.notebookData.models=u,this.isSaved=!1,this}getModels(){return this.notebookData.models}updateNotebookData(u){return this.notebookData=u,this.isSaved=!1,this}saveNotebook(){if(!this.isSaved){if(!this.notebookData.notebookPath)throw new Error("Notebook path is not set");this.notebookStorage.saveNotebook(this.userContext,this.notebookData.notebookPath,JSON.stringify(this.notebookData)),this.isSaved=!0}return new b5(this.notebookStorage,this.userContext,this.notebookData)}toMalloyNotebook(){return this.notebookData.cells.map(u=>u.isMarkdown?`>>>markdown
|
|
2905
2910
|
`+u.value:`>>>malloy
|
|
2906
2911
|
import {${u.sourceName}}" from '${u.modelPath}'"
|
|
2907
2912
|
`+u.value+`
|
|
2908
2913
|
`).join(`
|
|
2909
|
-
`)}static newNotebook(u,d){return new b5(u,d,void 0)}static loadNotebook(u,d,f){let m;try{const g=u.getNotebook(d,f);g&&(m=JSON.parse(g))}catch{m={models:[],cells:[],notebookPath:f}}return new b5(u,d,m)}}const Cgr=new TM(new Oo),Rgr=new D.QueryClient;function Tgr({initialSelectedModels:a,onModelChange:u}){const{server:d,projectName:f,packageName:m,versionId:g,accessToken:x}=gS(),{data:b,isLoading:v,isSuccess:_,isError:S,error:R}=D.useQuery({queryKey:["models",d,f,m,g],queryFn:()=>Cgr.listModels(f,m,g,{baseURL:d,withCredentials:!x,headers:{Authorization:x&&`Bearer ${x}`}}),retry:!1},Rgr),[w,N]=Pe.useState(a||[]),[k,B]=Pe.useState(!1);Pe.useEffect(()=>{N(a||[])},[a]);const P=z=>{const W=w.filter(X=>X!==z);N(W),u(W)},$=z=>{const W=[...w,z];N(W),u(W),B(!1)};let q=[];return _&&b?.data&&(q=b.data.filter(z=>!w.includes(z.path)).map(z=>z.path)),D.jsxRuntimeExports.jsxs(mo,{sx:{maxWidth:400,marginLeft:"10px",padding:"10px 5px 5px 5px"},children:[D.jsxRuntimeExports.jsx(D.Typography,{variant:"h6",children:"Imported Models"}),D.jsxRuntimeExports.jsxs(D.FormControl,{fullWidth:!0,children:[v&&D.jsxRuntimeExports.jsx(D.Typography,{children:"Loading..."}),S&&D.jsxRuntimeExports.jsxs(D.Typography,{children:["Error: ",R.message]}),D.jsxRuntimeExports.jsxs(D.Stack,{direction:"row",spacing:1,sx:{flexWrap:"wrap",minHeight:30,alignItems:"center",rowGap:"8px"},children:[w.map(z=>D.jsxRuntimeExports.jsx(D.Chip,{label:z,onDelete:()=>P(z),deleteIcon:D.jsxRuntimeExports.jsx(D.CloseIcon,{}),sx:{marginBottom:"5px"}},z)),D.jsxRuntimeExports.jsx(D.Button,{variant:"outlined",size:"small",startIcon:D.jsxRuntimeExports.jsx(D.AddIcon,{}),onClick:()=>B(!0),sx:{height:32,marginTop:"10px"},disabled:v||S||q.length===0,children:"Add Model"})]})]}),D.jsxRuntimeExports.jsxs(D.Dialog,{open:k,onClose:()=>B(!1),children:[D.jsxRuntimeExports.jsx(D.DialogTitle,{children:"Select a Model"}),D.jsxRuntimeExports.jsxs(D.DialogContent,{children:[q.length===0&&D.jsxRuntimeExports.jsx(D.Typography,{children:"No models available"}),D.jsxRuntimeExports.jsx(D.List,{children:q.map(z=>D.jsxRuntimeExports.jsx(D.ListItem,{disablePadding:!0,children:D.jsxRuntimeExports.jsx(D.ListItemButton,{onClick:()=>$(z),children:D.jsxRuntimeExports.jsx(D.ListItemText,{primary:z})})},z))})]}),D.jsxRuntimeExports.jsx(D.DialogActions,{children:D.jsxRuntimeExports.jsx(D.Button,{onClick:()=>B(!1),children:"Cancel"})})]})]})}function wgr({cell:a,sourceAndPaths:u,onCellChange:d,onClose:f}){const m={query:a.value,malloyResult:a.result?JSON.parse(a.result):void 0,malloyQuery:a.queryInfo?JSON.parse(a.queryInfo):void 0};return D.jsxRuntimeExports.jsx(Uoe,{sourceAndPaths:u,existingQuery:m,existingSourceName:a.sourceName,saveResult:(g,x,b)=>{d({...a,value:b.query,result:b.malloyResult?JSON.stringify(b.malloyResult):void 0,queryInfo:b.malloyQuery?JSON.stringify(b.malloyQuery):void 0,sourceName:x,modelPath:g}),f()}})}const Ogr=Pe.lazy(()=>Promise.resolve().then(()=>require("./RenderedResult-B9Gth8IY.cjs")));function Ngr({cell:a,expandCodeCell:u,expandEmbedding:d,editingMalloy:f,editingMarkdown:m,sourceAndPaths:g,newCell:x,onCellChange:b,onClose:v,onEdit:_,onDelete:S}){const[R,w]=Pe.useState(u),[N,k]=Pe.useState(d),[B,P]=Pe.useState(),[$,q]=Pe.useState();Pe.useEffect(()=>{a.isMarkdown||zv(a.value,"malloy").then(ze=>{P(ze)})},[a]);const[z,W]=Pe.useState(a.value);Pe.useEffect(()=>{document.documentElement.setAttribute("data-color-mode","light")});const X=Dgr(ze=>{b({...a,value:ze})}),[J,ee]=Pe.useState(!1),fe=()=>{S(),ee(!1)},be=g.length===0,je=D.jsxRuntimeExports.jsx(D.Tooltip,{title:"Delete Cell",children:D.jsxRuntimeExports.jsx(D.IconButton,{size:"small",onClick:()=>ee(!0),children:D.jsxRuntimeExports.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:D.jsxRuntimeExports.jsx("path",{d:"M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m2 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6h14zM10 11v6M14 11v6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}),_e=D.jsxRuntimeExports.jsxs(D.Dialog,{open:J,onClose:()=>ee(!1),children:[D.jsxRuntimeExports.jsx(D.DialogTitle,{children:"Confirm Delete"}),D.jsxRuntimeExports.jsx(D.DialogContent,{children:D.jsxRuntimeExports.jsx(D.Typography,{children:"Are you sure you want to delete this cell?"})}),D.jsxRuntimeExports.jsxs(D.DialogActions,{children:[D.jsxRuntimeExports.jsx(D.Button,{onClick:()=>ee(!1),children:"Cancel"}),D.jsxRuntimeExports.jsx(D.Button,{onClick:fe,color:"error",children:"Delete"})]})]}),De=a.isMarkdown?D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[je,m&&D.jsxRuntimeExports.jsx(D.Button,{variant:"outlined",size:"small",onClick:v,children:"Save"})||D.jsxRuntimeExports.jsx(D.Button,{variant:"outlined",size:"small",onClick:_,children:"Edit"}),x]}):D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[!f&&D.jsxRuntimeExports.jsx(D.Tooltip,{title:R?"Hide Code":"View Code",children:D.jsxRuntimeExports.jsx(D.IconButton,{size:"small",onClick:()=>{w(!R)},children:D.jsxRuntimeExports.jsx(D.CodeIcon,{})})}),!f&&a.result&&D.jsxRuntimeExports.jsx(D.Tooltip,{title:N?"Hide Embedding":"View Embedding",children:D.jsxRuntimeExports.jsx(D.IconButton,{size:"small",onClick:()=>{k(!N)},children:D.jsxRuntimeExports.jsx(D.LinkOutlinedIcon,{})})}),je,!f&&D.jsxRuntimeExports.jsx(D.Button,{variant:"outlined",size:"small",onClick:_,children:"Edit"}),x]}),Xe=D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx(D.Stack,{sx:{flexDirection:"row",justifyContent:"right"},children:D.jsxRuntimeExports.jsx(D.CardActions,{sx:{padding:"4px",mb:"auto",mt:"auto"},children:De})}),D.jsxRuntimeExports.jsx(D.Box$1,{sx:{borderBottom:"1px solid #e0e0e0",mx:"10px",width:"auto"}})]});return D.jsxRuntimeExports.jsxs(mo,{variant:"outlined",sx:{marginTop:"10px"},children:[a.isMarkdown&&D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[Xe,m&&D.jsxRuntimeExports.jsx(D.Editor,{value:z,preview:"edit",onChange:ze=>{W(ze),X(ze)}}),D.jsxRuntimeExports.jsx(D.Box$1,{sx:{px:.5,pt:0,mt:0,"& h1, & h2, & h3, & h4, & h5, & h6":{mt:.5,mb:.5},"& p":{mt:.5,mb:.5},"& ul, & ol":{mt:.5,mb:.5},"& li":{mt:0,mb:0},"& pre, & code":{mt:.5,mb:.5},"& blockquote":{mt:.5,mb:.5}},children:D.jsxRuntimeExports.jsx(D.Markdown,{children:z})})]})||!a.isMarkdown&&D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[Xe,D.jsxRuntimeExports.jsxs(D.Collapse,{in:N,timeout:"auto",unmountOnExit:!0,children:[D.jsxRuntimeExports.jsx(D.Divider,{}),D.jsxRuntimeExports.jsx(D.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:D.jsxRuntimeExports.jsx(D.Typography,{component:"div",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},dangerouslySetInnerHTML:{__html:$}})})]}),D.jsxRuntimeExports.jsxs(D.Collapse,{in:R,timeout:"auto",unmountOnExit:!0,children:[D.jsxRuntimeExports.jsx(D.Divider,{}),D.jsxRuntimeExports.jsx(D.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:D.jsxRuntimeExports.jsx(D.Typography,{component:"div",className:"content",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},dangerouslySetInnerHTML:{__html:B}})})]}),f&&(be?D.jsxRuntimeExports.jsx(D.Typography,{children:"No Model Imports. Please add a model import above."}):D.jsxRuntimeExports.jsx(wgr,{sourceAndPaths:g,onCellChange:b,onClose:v,cell:a})),!f&&a.result&&D.jsxRuntimeExports.jsx(D.jsxRuntimeExports.Fragment,{children:D.jsxRuntimeExports.jsx(D.CardContent,{sx:{maxHeight:"400px",overflow:"auto"},children:D.jsxRuntimeExports.jsx(Pe.Suspense,{fallback:"Loading malloy...",children:D.jsxRuntimeExports.jsx(Ogr,{result:a.result})})})})]}),J&&_e]})}function Dgr(a,u=2e3){const d=Pe.useRef(void 0);return Pe.useCallback(f=>{d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{a(f)},u)},[a,u])}const Iqe=Pe.createContext(void 0);function kgr({children:a,userContext:u,notebookStorage:d}){const f=Pe.useMemo(()=>({notebookStorage:d,userContext:u}),[d,u]);return D.jsxRuntimeExports.jsx(Iqe.Provider,{value:f,children:a})}function Pqe(){const a=Pe.useContext(Iqe);if(!a)throw new Error("useNotebookStorage must be used within a NotebookStorageProvider");return a}const Lgr=new TM(new Oo);function Igr({notebookPath:a,expandCodeCells:u,expandEmbeddings:d}){const f=Lqe(),{server:m,projectName:g,packageName:x,versionId:b,accessToken:v}=gS();if(!g||!x)throw new Error("Project and package must be provided via PubliserPackageProvider");const{notebookStorage:_,userContext:S}=Pqe();if(!_||!S)throw new Error("Notebook storage and user context must be provided via NotebookStorageProvider");const[R,w]=Pe.useState(),[N,k]=Pe.useState(),[B,P]=Pe.useState(),[$,q]=Pe.useState([]),[z,W]=Pe.useState(null),[X,J]=Pe.useState(null),ee=!!z,fe=(Je,rt)=>{W(Je.currentTarget),J(rt)},be=()=>{W(null),J(null)},je=(Je,rt)=>{R.insertCell(rt,{isMarkdown:Je,value:""}),Ne(),Je?P(rt):k(rt),be()},[_e,De]=Pe.useState(!1),Xe=()=>{De(!0)},ze=Je=>{a&&_&&S&&_.deleteNotebook(S,a),De(!1),f(`/${g}/${x}`,Je)},te=()=>{De(!1)},Ne=Pe.useCallback(()=>{w(R.saveNotebook())},[R]);if(Pe.useEffect(()=>{if(!R)return;const Je=new Map($.map(({modelPath:qe,sourceInfos:ge})=>[qe,ge])),rt=[],vt=[];for(const qe of R.getModels())Je.has(qe)?rt.push({modelPath:qe,sourceInfos:Je.get(qe)}):(console.log("Fetching model from Publisher",qe),vt.push(Lgr.getModel(g,x,qe,b,{baseURL:m,withCredentials:!v}).then(ge=>({modelPath:qe,sourceInfos:ge.data.sourceInfos.map(pe=>JSON.parse(pe))}))));vt.length>0&&Promise.all(vt).then(qe=>{q([...rt,...qe])})},[v,R,x,g,m,$,b]),Pe.useEffect(()=>{a&&w(b5.loadNotebook(_,S,a))},[a,_,S]),!R)return D.jsxRuntimeExports.jsx("div",{children:"Loading..."});const Ge=Je=>{const rt=[];for(const vt of Je)for(const qe of vt.sourceInfos)rt.push({modelPath:vt.modelPath,sourceInfo:qe});return rt},mt=Je=>D.jsxRuntimeExports.jsx(D.CardActions,{sx:{padding:"0px 10px 0px 10px",mb:"auto",mt:"auto",justifyContent:"flex-end"},children:D.jsxRuntimeExports.jsx(D.Button,{variant:"outlined",size:"small",startIcon:D.jsxRuntimeExports.jsx(Pgr,{}),onClick:rt=>fe(rt,Je),children:"New Cell"})});return D.jsxRuntimeExports.jsxs(mo,{variant:"outlined",children:[D.jsxRuntimeExports.jsx(Va,{children:D.jsxRuntimeExports.jsxs(D.Stack,{sx:{flexDirection:"row",justifyContent:"space-between"},children:[D.jsxRuntimeExports.jsx(D.Box$1,{sx:{display:"flex",alignItems:"top",gap:1},children:D.jsxRuntimeExports.jsxs(D.Typography,{sx:{fontSize:"150%",minHeight:"56px",fontWeight:"bold"},children:["Notebook - ",a]})}),D.jsxRuntimeExports.jsxs(D.Stack,{sx:{display:"flex",flexDirection:"row",gap:1},children:[D.jsxRuntimeExports.jsx(D.Box$1,{sx:{display:"flex",alignItems:"center",mt:1,mb:1},children:D.jsxRuntimeExports.jsx(jgr,{notebookData:R})}),D.jsxRuntimeExports.jsxs(D.Box$1,{sx:{display:"flex",alignItems:"center",mt:1,mb:1},children:[D.jsxRuntimeExports.jsx(D.Button,{variant:"outlined",color:"error",onClick:Xe,children:"Delete Notebook"}),D.jsxRuntimeExports.jsxs(D.Dialog,{open:_e,onClose:te,children:[D.jsxRuntimeExports.jsx(D.DialogTitle,{children:"Delete Notebook"}),D.jsxRuntimeExports.jsx(D.DialogContent,{children:D.jsxRuntimeExports.jsxs(D.DialogContentText,{children:['Are you sure you want to delete the notebook "',a,'"? This action cannot be undone.']})}),D.jsxRuntimeExports.jsxs(D.DialogActions,{children:[D.jsxRuntimeExports.jsx(D.Button,{onClick:te,color:"primary",children:"Cancel"}),D.jsxRuntimeExports.jsx(D.Button,{onClick:Je=>ze(Je),color:"error",autoFocus:!0,children:"Delete"})]})]})]})]})]})}),D.jsxRuntimeExports.jsx(Tgr,{initialSelectedModels:R.getModels(),onModelChange:Je=>{w(R.setModels(Je)),Ne()}}),D.jsxRuntimeExports.jsx(mS,{children:D.jsxRuntimeExports.jsxs(D.Stack,{children:[R.getCells().map((Je,rt)=>D.jsxRuntimeExports.jsx(Pe.Fragment,{children:D.jsxRuntimeExports.jsx(Ngr,{cell:Je,newCell:mt(rt),sourceAndPaths:Ge($),expandCodeCell:u,expandEmbedding:d,editingMarkdown:B===rt,editingMalloy:N===rt,onDelete:()=>{w(R.deleteCell(rt)),Ne()},onCellChange:vt=>{w(R.setCell(rt,vt)),Ne()},onEdit:()=>{Je.isMarkdown?P(rt):k(rt)},onClose:()=>{Je.isMarkdown?P(void 0):k(void 0)}})},`${rt}-${R.getCells().length}`)),D.jsxRuntimeExports.jsx(D.Box$1,{style:{paddingRight:"7px",paddingTop:"10px"},children:mt(R.getCells().length)}),D.jsxRuntimeExports.jsxs(D.Menu,{anchorEl:z,open:ee,onClose:be,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:[D.jsxRuntimeExports.jsx(D.MenuItem,{onClick:()=>je(!0,X??0),children:"Add Markdown"}),D.jsxRuntimeExports.jsx(D.MenuItem,{onClick:()=>je(!1,X??0),children:"Add Malloy"})]}),D.jsxRuntimeExports.jsx(D.Stack,{sx:{flexDirection:"row",justifyContent:"flex-end",p:1}})]})})]})}function Pgr(){return D.jsxRuntimeExports.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:D.jsxRuntimeExports.jsx("path",{d:"M19 13H13V19H11V13H5V11H11V5H13V11H19V13Z",fill:"currentColor"})})}function jgr({notebookData:a}){const[u,d]=Pe.useState(!1),f=async()=>{if(!a)return;const m=a.toMalloyNotebook();try{await navigator.clipboard.writeText(m),d(!0),setTimeout(()=>d(!1),1500)}catch{d(!1),alert("Failed to copy to clipboard")}};return D.jsxRuntimeExports.jsx(D.Button,{variant:"outlined",color:"primary",onClick:f,children:u?"Copied!":"Export To Malloy"})}D.axios.defaults.baseURL="http://localhost:4000";const Fgr=new iIe(new Oo),Mgr=new D.QueryClient;function $gr({server:a,projectName:u,accessToken:d}){const{data:f,isSuccess:m,isError:g,error:x}=D.useQuery({queryKey:["about",a,u],queryFn:()=>Fgr.getProject(u,!1,{baseURL:a,withCredentials:!0,headers:{Authorization:d&&`Bearer ${d}`}})},Mgr);return D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[!m&&!g&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:"Fetching About..."}),m&&D.jsxRuntimeExports.jsxs(mo,{variant:"outlined",children:[D.jsxRuntimeExports.jsxs(Va,{children:[D.jsxRuntimeExports.jsx(D.Typography,{variant:"overline",fontWeight:"bold",children:"Readme"}),D.jsxRuntimeExports.jsx(D.Divider,{})]}),D.jsxRuntimeExports.jsx(mS,{children:D.jsxRuntimeExports.jsx(D.Markdown,{children:f.data.readme})})]}),g&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:x.message})]})}const Bgr=new nIe(new Oo),qgr=new D.QueryClient;function Ugr({server:a,projectName:u,navigate:d,accessToken:f}){const{data:m,isSuccess:g,isError:x,error:b}=D.useQuery({queryKey:["packages",a,u],queryFn:()=>Bgr.listPackages(u,{baseURL:a,withCredentials:!f,headers:{Authorization:f&&`Bearer ${f}`}})},qgr);return D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[!g&&!x&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"20px",m:"auto"},children:"Fetching Packages..."}),g&&D.jsxRuntimeExports.jsxs(mo,{variant:"outlined",children:[D.jsxRuntimeExports.jsxs(Va,{children:[D.jsxRuntimeExports.jsx(D.Typography,{variant:"overline",fontWeight:"bold",children:"Packages"}),D.jsxRuntimeExports.jsx(D.Divider,{})]}),D.jsxRuntimeExports.jsx(mS,{children:D.jsxRuntimeExports.jsx(D.Grid,{container:!0,spacing:2,columns:12,sx:{mb:v=>v.spacing(2)},children:m.data.sort((v,_)=>v.name.localeCompare(_.name)).map(v=>D.jsxRuntimeExports.jsx(D.Grid,{size:{xs:12,sm:12,md:12,lg:4},children:D.jsxRuntimeExports.jsx(mo,{variant:"outlined",sx:{padding:"10px",cursor:"pointer"},onClick:_=>d(v.name+"/",_),children:D.jsxRuntimeExports.jsxs(Va,{children:[D.jsxRuntimeExports.jsx(D.Typography,{variant:"overline",color:"primary.main",children:v.name}),D.jsxRuntimeExports.jsx(D.Divider,{}),D.jsxRuntimeExports.jsx(D.Box$1,{sx:{mt:"10px",maxHeight:"100px",overflowY:"auto"},children:D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",children:v.description})})]})})},v.name))})})]}),x&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:b.message})]})}function zgr({server:a,projectName:u,navigate:d,accessToken:f}){return D.jsxRuntimeExports.jsxs(D.Grid,{container:!0,spacing:2,columns:12,sx:{mb:m=>m.spacing(2)},children:[D.jsxRuntimeExports.jsx(D.Grid,{size:{xs:12,md:12},children:D.jsxRuntimeExports.jsx(Ugr,{server:a,projectName:u,navigate:d,accessToken:f})}),D.jsxRuntimeExports.jsx(D.Grid,{size:{xs:12,md:12},children:D.jsxRuntimeExports.jsx($gr,{server:a,projectName:u,accessToken:f})})]})}D.axios.defaults.baseURL="http://localhost:4000";const Hgr=new iIe(new Oo),Ggr=new D.QueryClient;function Wgr({server:a,navigate:u}){const{data:d,isSuccess:f}=D.useQuery({queryKey:["projects",a],queryFn:()=>Hgr.listProjects({baseURL:a})},Ggr);return console.log(JSON.stringify(d?.data,null,2)),f?d.data.length===0?D.jsxRuntimeExports.jsx(D.Typography,{variant:"h4",children:"No projects found"}):d.data.length===1?(u(`/${d.data[0].name}/`),D.jsxRuntimeExports.jsx(D.jsxRuntimeExports.Fragment,{})):D.jsxRuntimeExports.jsx(D.Grid,{container:!0,spacing:2,columns:12,sx:{mb:m=>m.spacing(2)},children:d.data.map(m=>D.jsxRuntimeExports.jsx(D.Grid,{children:D.jsxRuntimeExports.jsx(D.Typography,{variant:"h1",onClick:g=>u(`/${m.name}/`,g),children:m.name})},m.name))}):D.jsxRuntimeExports.jsx(D.Typography,{variant:"h6",children:"Loading projects..."})}const Vgr=new Aie(new Oo),Qgr=new D.QueryClient;function Ygr({server:a,projectName:u,connectionName:d,schemaName:f,accessToken:m,onTableClick:g}){const{data:x,isSuccess:b,isError:v,error:_,isLoading:S}=D.useQuery({queryKey:["tables",a,u,d,f],queryFn:()=>Vgr.listTables(u,d,f,{baseURL:a,withCredentials:!m,headers:{Authorization:m&&`Bearer ${m}`}}),retry:!1},Qgr);return D.jsxRuntimeExports.jsxs(D.Box$1,{sx:{width:"100%"},children:[D.jsxRuntimeExports.jsxs(D.Typography,{variant:"overline",fontWeight:"bold",children:["Tables in ",f]}),D.jsxRuntimeExports.jsx(D.Divider,{}),D.jsxRuntimeExports.jsxs(D.Box$1,{sx:{mt:"10px",maxHeight:"200px",overflowY:"auto"},children:[S&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"20px",m:"auto"},children:"Fetching Tables..."}),v&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:`${u} > ${d} > ${f} - ${_.message}`}),b&&x.data.length===0&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",children:"No Tables"}),b&&x.data.length>0&&D.jsxRuntimeExports.jsx(D.List,{dense:!0,disablePadding:!0,children:x.data.map(R=>D.jsxRuntimeExports.jsx(D.ListItemButton,{onClick:()=>g&&g(R),children:D.jsxRuntimeExports.jsx(D.ListItemText,{primary:R})},R))})]})]})}const jqe=new Aie(new Oo),Fqe=new D.QueryClient;function Kgr({server:a,projectName:u,connectionName:d,accessToken:f}){const[m,g]=Pe.useState(void 0),[x,b]=Pe.useState(null),[v,_]=Pe.useState(!1),{data:S,isSuccess:R,isError:w,error:N,isLoading:k}=D.useQuery({queryKey:["tablePath",a,u,d],queryFn:()=>jqe.listSchemas(u,d,{baseURL:a,withCredentials:!f,headers:{Authorization:f&&`Bearer ${f}`}}),retry:!1},Fqe);return D.jsxRuntimeExports.jsxs(D.Grid,{container:!0,spacing:2,children:[D.jsxRuntimeExports.jsx(D.Grid,{size:{xs:12,md:6},children:D.jsxRuntimeExports.jsxs(D.Paper,{sx:{p:2},children:[D.jsxRuntimeExports.jsxs(D.Box$1,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:1},children:[D.jsxRuntimeExports.jsx(D.Typography,{variant:"overline",fontWeight:"bold",children:"Table Paths"}),D.jsxRuntimeExports.jsx(D.FormControlLabel,{control:D.jsxRuntimeExports.jsx(D.Switch,{checked:v,onChange:B=>_(B.target.checked)}),label:"Hidden Schemas"})]}),D.jsxRuntimeExports.jsx(D.Divider,{}),D.jsxRuntimeExports.jsxs(D.Box$1,{sx:{mt:"10px",maxHeight:"600px",overflowY:"auto"},children:[k&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"20px",m:"auto"},children:"Fetching Table Paths..."}),w&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:`${u} > ${d} - ${N.message}`}),R&&S.data.length===0&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",children:"No Schemas"}),R&&S.data.length>0&&D.jsxRuntimeExports.jsx(D.List,{dense:!0,disablePadding:!0,children:S.data.filter(({isHidden:B})=>v||!B).sort((B,P)=>B.isDefault===P.isDefault?0:B.isDefault?-1:1).map(B=>D.jsxRuntimeExports.jsx(D.ListItemButton,{selected:x===B.name,onClick:()=>b(B.name),children:D.jsxRuntimeExports.jsx(D.ListItemText,{primary:B.name})},B.name))})]})]})}),D.jsxRuntimeExports.jsx(D.Grid,{size:{xs:12,md:6},children:x&&D.jsxRuntimeExports.jsx(D.Paper,{sx:{p:2},children:D.jsxRuntimeExports.jsx(Ygr,{server:a,projectName:u,connectionName:d,schemaName:x,accessToken:f,onTableClick:B=>{g(B)}})})}),m&&D.jsxRuntimeExports.jsx(Xgr,{server:a,projectName:u,connectionName:d,schemaName:x,tableName:m,accessToken:f,onClose:()=>g(void 0)})]})}function Xgr({server:a,projectName:u,connectionName:d,schemaName:f,tableName:m,accessToken:g,onClose:x}){const{data:b,isSuccess:v,isError:_,error:S,isLoading:R}=D.useQuery({queryKey:["tablePathSchema",a,u,d,f,m],queryFn:()=>jqe.getTablesource(u,d,m,`${f}.${m}`,{baseURL:a,withCredentials:!g,headers:{Authorization:g&&`Bearer ${g}`}}),retry:!1},Fqe);return v&&b&&console.log(b),D.jsxRuntimeExports.jsxs(D.Dialog,{open:!0,onClose:onclose,maxWidth:"sm",fullWidth:!0,children:[D.jsxRuntimeExports.jsxs(D.DialogTitle,{children:["Table: ",f,".",m,D.jsxRuntimeExports.jsx(D.Typography,{fontSize:"large",variant:"body2",fontFamily:"monospace",component:"span"}),D.jsxRuntimeExports.jsx(D.IconButton,{"aria-label":"close",onClick:x,sx:{position:"absolute",right:8,top:8},children:D.jsxRuntimeExports.jsx(D.Box$1,{sx:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:"X"})})]}),D.jsxRuntimeExports.jsx(D.DialogContent,{children:D.jsxRuntimeExports.jsx(D.TableContainer,{children:D.jsxRuntimeExports.jsxs(D.Table,{size:"small",sx:{"& .MuiTableCell-root":{padding:"10px"}},children:[D.jsxRuntimeExports.jsx(D.TableHead,{children:D.jsxRuntimeExports.jsxs(D.TableRow,{children:[D.jsxRuntimeExports.jsx(D.TableCell,{children:"NAME"}),D.jsxRuntimeExports.jsx(D.TableCell,{children:"TYPE"})]})}),D.jsxRuntimeExports.jsxs(D.TableBody,{children:[v&&b&&b.data.columns.map(w=>D.jsxRuntimeExports.jsxs(D.TableRow,{children:[D.jsxRuntimeExports.jsx(D.TableCell,{children:w.name}),D.jsxRuntimeExports.jsx(D.TableCell,{children:w.type})]},w.name)),R&&D.jsxRuntimeExports.jsx("div",{children:"Loading..."}),_&&D.jsxRuntimeExports.jsxs("div",{children:["Error: ",S.message]})]})]})})})]})}exports.BrowserNotebookStorage=Agr;exports.ConnectionExplorer=Kgr;exports.Home=Wgr;exports.Model=$0r;exports.MutableNotebook=Igr;exports.Notebook=kqe;exports.NotebookStorageProvider=kgr;exports.Package=ggr;exports.Project=zgr;exports.PublisherPackageProvider=FIe;exports.QueryResult=PIe;exports.SourceExplorerComponent=zoe;exports.SourcesExplorer=Uoe;exports.useNotebookStorage=Pqe;exports.usePublisherPackage=gS;exports.useRouterClickHandler=Lqe;
|
|
2914
|
+
`)}static newNotebook(u,d){return new b5(u,d,void 0)}static loadNotebook(u,d,f){let m;try{const g=u.getNotebook(d,f);g&&(m=JSON.parse(g))}catch{m={models:[],cells:[],notebookPath:f}}return new b5(u,d,m)}}const Rgr=new TM(new Oo),Tgr=new D.QueryClient;function wgr({initialSelectedModels:a,onModelChange:u}){const{server:d,projectName:f,packageName:m,versionId:g,accessToken:x}=gS(),{data:b,isLoading:v,isSuccess:_,isError:S,error:R}=D.useQuery({queryKey:["models",d,f,m,g],queryFn:()=>Rgr.listModels(f,m,g,{baseURL:d,withCredentials:!x,headers:{Authorization:x&&`Bearer ${x}`}}),retry:!1},Tgr),[w,N]=Pe.useState(a||[]),[k,B]=Pe.useState(!1);Pe.useEffect(()=>{N(a||[])},[a]);const P=z=>{const W=w.filter(X=>X!==z);N(W),u(W)},$=z=>{const W=[...w,z];N(W),u(W),B(!1)};let q=[];return _&&b?.data&&(q=b.data.filter(z=>!w.includes(z.path)).map(z=>z.path)),D.jsxRuntimeExports.jsxs(mo,{sx:{maxWidth:400,marginLeft:"10px",padding:"10px 5px 5px 5px"},children:[D.jsxRuntimeExports.jsx(D.Typography,{variant:"h6",children:"Imported Models"}),D.jsxRuntimeExports.jsxs(D.FormControl,{fullWidth:!0,children:[v&&D.jsxRuntimeExports.jsx(D.Typography,{children:"Loading..."}),S&&D.jsxRuntimeExports.jsxs(D.Typography,{children:["Error: ",R.message]}),D.jsxRuntimeExports.jsxs(D.Stack,{direction:"row",spacing:1,sx:{flexWrap:"wrap",minHeight:30,alignItems:"center",rowGap:"8px"},children:[w.map(z=>D.jsxRuntimeExports.jsx(D.Chip,{label:z,onDelete:()=>P(z),deleteIcon:D.jsxRuntimeExports.jsx(D.CloseIcon,{}),sx:{marginBottom:"5px"}},z)),D.jsxRuntimeExports.jsx(D.Button,{variant:"outlined",size:"small",startIcon:D.jsxRuntimeExports.jsx(D.AddIcon,{}),onClick:()=>B(!0),sx:{height:32,marginTop:"10px"},disabled:v||S||q.length===0,children:"Add Model"})]})]}),D.jsxRuntimeExports.jsxs(D.Dialog,{open:k,onClose:()=>B(!1),children:[D.jsxRuntimeExports.jsx(D.DialogTitle,{children:"Select a Model"}),D.jsxRuntimeExports.jsxs(D.DialogContent,{children:[q.length===0&&D.jsxRuntimeExports.jsx(D.Typography,{children:"No models available"}),D.jsxRuntimeExports.jsx(D.List,{children:q.map(z=>D.jsxRuntimeExports.jsx(D.ListItem,{disablePadding:!0,children:D.jsxRuntimeExports.jsx(D.ListItemButton,{onClick:()=>$(z),children:D.jsxRuntimeExports.jsx(D.ListItemText,{primary:z})})},z))})]}),D.jsxRuntimeExports.jsx(D.DialogActions,{children:D.jsxRuntimeExports.jsx(D.Button,{onClick:()=>B(!1),children:"Cancel"})})]})]})}function Ogr({cell:a,sourceAndPaths:u,onCellChange:d,onClose:f}){const m={query:a.value,malloyResult:a.result?JSON.parse(a.result):void 0,malloyQuery:a.queryInfo?JSON.parse(a.queryInfo):void 0};return D.jsxRuntimeExports.jsx(Uoe,{sourceAndPaths:u,existingQuery:m,existingSourceName:a.sourceName,saveResult:(g,x,b)=>{d({...a,value:b.query,result:b.malloyResult?JSON.stringify(b.malloyResult):void 0,queryInfo:b.malloyQuery?JSON.stringify(b.malloyQuery):void 0,sourceName:x,modelPath:g}),f()}})}const Ngr=Pe.lazy(()=>Promise.resolve().then(()=>require("./RenderedResult-B9Gth8IY.cjs")));function Dgr({cell:a,expandCodeCell:u,expandEmbedding:d,editingMalloy:f,editingMarkdown:m,sourceAndPaths:g,newCell:x,onCellChange:b,onClose:v,onEdit:_,onDelete:S}){const[R,w]=Pe.useState(u),[N,k]=Pe.useState(d),[B,P]=Pe.useState(),[$,q]=Pe.useState();Pe.useEffect(()=>{a.isMarkdown||zv(a.value,"malloy").then(ze=>{P(ze)})},[a]);const[z,W]=Pe.useState(a.value);Pe.useEffect(()=>{document.documentElement.setAttribute("data-color-mode","light")});const X=kgr(ze=>{b({...a,value:ze})}),[J,ee]=Pe.useState(!1),fe=()=>{S(),ee(!1)},be=g.length===0,je=D.jsxRuntimeExports.jsx(D.Tooltip,{title:"Delete Cell",children:D.jsxRuntimeExports.jsx(D.IconButton,{size:"small",onClick:()=>ee(!0),children:D.jsxRuntimeExports.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:D.jsxRuntimeExports.jsx("path",{d:"M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m2 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6h14zM10 11v6M14 11v6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}),_e=D.jsxRuntimeExports.jsxs(D.Dialog,{open:J,onClose:()=>ee(!1),children:[D.jsxRuntimeExports.jsx(D.DialogTitle,{children:"Confirm Delete"}),D.jsxRuntimeExports.jsx(D.DialogContent,{children:D.jsxRuntimeExports.jsx(D.Typography,{children:"Are you sure you want to delete this cell?"})}),D.jsxRuntimeExports.jsxs(D.DialogActions,{children:[D.jsxRuntimeExports.jsx(D.Button,{onClick:()=>ee(!1),children:"Cancel"}),D.jsxRuntimeExports.jsx(D.Button,{onClick:fe,color:"error",children:"Delete"})]})]}),De=a.isMarkdown?D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[je,m&&D.jsxRuntimeExports.jsx(D.Button,{variant:"outlined",size:"small",onClick:v,children:"Save"})||D.jsxRuntimeExports.jsx(D.Button,{variant:"outlined",size:"small",onClick:_,children:"Edit"}),x]}):D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[!f&&D.jsxRuntimeExports.jsx(D.Tooltip,{title:R?"Hide Code":"View Code",children:D.jsxRuntimeExports.jsx(D.IconButton,{size:"small",onClick:()=>{w(!R)},children:D.jsxRuntimeExports.jsx(D.CodeIcon,{})})}),!f&&a.result&&D.jsxRuntimeExports.jsx(D.Tooltip,{title:N?"Hide Embedding":"View Embedding",children:D.jsxRuntimeExports.jsx(D.IconButton,{size:"small",onClick:()=>{k(!N)},children:D.jsxRuntimeExports.jsx(D.LinkOutlinedIcon,{})})}),je,!f&&D.jsxRuntimeExports.jsx(D.Button,{variant:"outlined",size:"small",onClick:_,children:"Edit"}),x]}),Xe=D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx(D.Stack,{sx:{flexDirection:"row",justifyContent:"right"},children:D.jsxRuntimeExports.jsx(D.CardActions,{sx:{padding:"4px",mb:"auto",mt:"auto"},children:De})}),D.jsxRuntimeExports.jsx(D.Box$1,{sx:{borderBottom:"1px solid #e0e0e0",mx:"10px",width:"auto"}})]});return D.jsxRuntimeExports.jsxs(mo,{variant:"outlined",sx:{marginTop:"10px"},children:[a.isMarkdown&&D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[Xe,m&&D.jsxRuntimeExports.jsx(D.Editor,{value:z,preview:"edit",onChange:ze=>{W(ze),X(ze)}}),D.jsxRuntimeExports.jsx(D.Box$1,{sx:{px:.5,pt:0,mt:0,"& h1, & h2, & h3, & h4, & h5, & h6":{mt:.5,mb:.5},"& p":{mt:.5,mb:.5},"& ul, & ol":{mt:.5,mb:.5},"& li":{mt:0,mb:0},"& pre, & code":{mt:.5,mb:.5},"& blockquote":{mt:.5,mb:.5}},children:D.jsxRuntimeExports.jsx(D.Markdown,{children:z})})]})||!a.isMarkdown&&D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[Xe,D.jsxRuntimeExports.jsxs(D.Collapse,{in:N,timeout:"auto",unmountOnExit:!0,children:[D.jsxRuntimeExports.jsx(D.Divider,{}),D.jsxRuntimeExports.jsx(D.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:D.jsxRuntimeExports.jsx(D.Typography,{component:"div",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},dangerouslySetInnerHTML:{__html:$}})})]}),D.jsxRuntimeExports.jsxs(D.Collapse,{in:R,timeout:"auto",unmountOnExit:!0,children:[D.jsxRuntimeExports.jsx(D.Divider,{}),D.jsxRuntimeExports.jsx(D.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:D.jsxRuntimeExports.jsx(D.Typography,{component:"div",className:"content",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},dangerouslySetInnerHTML:{__html:B}})})]}),f&&(be?D.jsxRuntimeExports.jsx(D.Typography,{children:"No Model Imports. Please add a model import above."}):D.jsxRuntimeExports.jsx(Ogr,{sourceAndPaths:g,onCellChange:b,onClose:v,cell:a})),!f&&a.result&&D.jsxRuntimeExports.jsx(D.jsxRuntimeExports.Fragment,{children:D.jsxRuntimeExports.jsx(D.CardContent,{sx:{maxHeight:"400px",overflow:"auto"},children:D.jsxRuntimeExports.jsx(Pe.Suspense,{fallback:"Loading malloy...",children:D.jsxRuntimeExports.jsx(Ngr,{result:a.result})})})})]}),J&&_e]})}function kgr(a,u=2e3){const d=Pe.useRef(void 0);return Pe.useCallback(f=>{d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{a(f)},u)},[a,u])}const Iqe=Pe.createContext(void 0);function Lgr({children:a,userContext:u,notebookStorage:d}){const f=Pe.useMemo(()=>({notebookStorage:d,userContext:u}),[d,u]);return D.jsxRuntimeExports.jsx(Iqe.Provider,{value:f,children:a})}function Pqe(){const a=Pe.useContext(Iqe);if(!a)throw new Error("useNotebookStorage must be used within a NotebookStorageProvider");return a}const Igr=new TM(new Oo);function Pgr({notebookPath:a,expandCodeCells:u,expandEmbeddings:d}){const f=Lqe(),{server:m,projectName:g,packageName:x,versionId:b,accessToken:v}=gS();if(!g||!x)throw new Error("Project and package must be provided via PubliserPackageProvider");const{notebookStorage:_,userContext:S}=Pqe();if(!_||!S)throw new Error("Notebook storage and user context must be provided via NotebookStorageProvider");const[R,w]=Pe.useState(),[N,k]=Pe.useState(),[B,P]=Pe.useState(),[$,q]=Pe.useState([]),[z,W]=Pe.useState(null),[X,J]=Pe.useState(null),ee=!!z,fe=(Je,rt)=>{W(Je.currentTarget),J(rt)},be=()=>{W(null),J(null)},je=(Je,rt)=>{R.insertCell(rt,{isMarkdown:Je,value:""}),Ne(),Je?P(rt):k(rt),be()},[_e,De]=Pe.useState(!1),Xe=()=>{De(!0)},ze=Je=>{a&&_&&S&&_.deleteNotebook(S,a),De(!1),f(`/${g}/${x}`,Je)},te=()=>{De(!1)},Ne=Pe.useCallback(()=>{w(R.saveNotebook())},[R]);if(Pe.useEffect(()=>{if(!R)return;const Je=new Map($.map(({modelPath:qe,sourceInfos:ge})=>[qe,ge])),rt=[],vt=[];for(const qe of R.getModels())Je.has(qe)?rt.push({modelPath:qe,sourceInfos:Je.get(qe)}):(console.log("Fetching model from Publisher",qe),vt.push(Igr.getModel(g,x,qe,b,{baseURL:m,withCredentials:!v}).then(ge=>({modelPath:qe,sourceInfos:ge.data.sourceInfos.map(pe=>JSON.parse(pe))}))));vt.length>0&&Promise.all(vt).then(qe=>{q([...rt,...qe])})},[v,R,x,g,m,$,b]),Pe.useEffect(()=>{a&&w(b5.loadNotebook(_,S,a))},[a,_,S]),!R)return D.jsxRuntimeExports.jsx("div",{children:"Loading..."});const Ge=Je=>{const rt=[];for(const vt of Je)for(const qe of vt.sourceInfos)rt.push({modelPath:vt.modelPath,sourceInfo:qe});return rt},mt=Je=>D.jsxRuntimeExports.jsx(D.CardActions,{sx:{padding:"0px 10px 0px 10px",mb:"auto",mt:"auto",justifyContent:"flex-end"},children:D.jsxRuntimeExports.jsx(D.Button,{variant:"outlined",size:"small",startIcon:D.jsxRuntimeExports.jsx(jgr,{}),onClick:rt=>fe(rt,Je),children:"New Cell"})});return D.jsxRuntimeExports.jsxs(mo,{variant:"outlined",children:[D.jsxRuntimeExports.jsx(Va,{children:D.jsxRuntimeExports.jsxs(D.Stack,{sx:{flexDirection:"row",justifyContent:"space-between"},children:[D.jsxRuntimeExports.jsx(D.Box$1,{sx:{display:"flex",alignItems:"top",gap:1},children:D.jsxRuntimeExports.jsxs(D.Typography,{sx:{fontSize:"150%",minHeight:"56px",fontWeight:"bold"},children:["Notebook - ",a]})}),D.jsxRuntimeExports.jsxs(D.Stack,{sx:{display:"flex",flexDirection:"row",gap:1},children:[D.jsxRuntimeExports.jsx(D.Box$1,{sx:{display:"flex",alignItems:"center",mt:1,mb:1},children:D.jsxRuntimeExports.jsx(Fgr,{notebookData:R})}),D.jsxRuntimeExports.jsxs(D.Box$1,{sx:{display:"flex",alignItems:"center",mt:1,mb:1},children:[D.jsxRuntimeExports.jsx(D.Button,{variant:"outlined",color:"error",onClick:Xe,children:"Delete Notebook"}),D.jsxRuntimeExports.jsxs(D.Dialog,{open:_e,onClose:te,children:[D.jsxRuntimeExports.jsx(D.DialogTitle,{children:"Delete Notebook"}),D.jsxRuntimeExports.jsx(D.DialogContent,{children:D.jsxRuntimeExports.jsxs(D.DialogContentText,{children:['Are you sure you want to delete the notebook "',a,'"? This action cannot be undone.']})}),D.jsxRuntimeExports.jsxs(D.DialogActions,{children:[D.jsxRuntimeExports.jsx(D.Button,{onClick:te,color:"primary",children:"Cancel"}),D.jsxRuntimeExports.jsx(D.Button,{onClick:Je=>ze(Je),color:"error",autoFocus:!0,children:"Delete"})]})]})]})]})]})}),D.jsxRuntimeExports.jsx(wgr,{initialSelectedModels:R.getModels(),onModelChange:Je=>{w(R.setModels(Je)),Ne()}}),D.jsxRuntimeExports.jsx(mS,{children:D.jsxRuntimeExports.jsxs(D.Stack,{children:[R.getCells().map((Je,rt)=>D.jsxRuntimeExports.jsx(Pe.Fragment,{children:D.jsxRuntimeExports.jsx(Dgr,{cell:Je,newCell:mt(rt),sourceAndPaths:Ge($),expandCodeCell:u,expandEmbedding:d,editingMarkdown:B===rt,editingMalloy:N===rt,onDelete:()=>{w(R.deleteCell(rt)),Ne()},onCellChange:vt=>{w(R.setCell(rt,vt)),Ne()},onEdit:()=>{Je.isMarkdown?P(rt):k(rt)},onClose:()=>{Je.isMarkdown?P(void 0):k(void 0)}})},`${rt}-${R.getCells().length}`)),D.jsxRuntimeExports.jsx(D.Box$1,{style:{paddingRight:"7px",paddingTop:"10px"},children:mt(R.getCells().length)}),D.jsxRuntimeExports.jsxs(D.Menu,{anchorEl:z,open:ee,onClose:be,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:[D.jsxRuntimeExports.jsx(D.MenuItem,{onClick:()=>je(!0,X??0),children:"Add Markdown"}),D.jsxRuntimeExports.jsx(D.MenuItem,{onClick:()=>je(!1,X??0),children:"Add Malloy"})]}),D.jsxRuntimeExports.jsx(D.Stack,{sx:{flexDirection:"row",justifyContent:"flex-end",p:1}})]})})]})}function jgr(){return D.jsxRuntimeExports.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:D.jsxRuntimeExports.jsx("path",{d:"M19 13H13V19H11V13H5V11H11V5H13V11H19V13Z",fill:"currentColor"})})}function Fgr({notebookData:a}){const[u,d]=Pe.useState(!1),f=async()=>{if(!a)return;const m=a.toMalloyNotebook();try{await navigator.clipboard.writeText(m),d(!0),setTimeout(()=>d(!1),1500)}catch{d(!1),alert("Failed to copy to clipboard")}};return D.jsxRuntimeExports.jsx(D.Button,{variant:"outlined",color:"primary",onClick:f,children:u?"Copied!":"Export To Malloy"})}D.axios.defaults.baseURL="http://localhost:4000";const Mgr=new iIe(new Oo),$gr=new D.QueryClient;function Bgr({server:a,projectName:u,accessToken:d}){const{data:f,isSuccess:m,isError:g,error:x}=D.useQuery({queryKey:["about",a,u],queryFn:()=>Mgr.getProject(u,!1,{baseURL:a,withCredentials:!0,headers:{Authorization:d&&`Bearer ${d}`}})},$gr);return D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[!m&&!g&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:"Fetching About..."}),m&&D.jsxRuntimeExports.jsxs(mo,{variant:"outlined",children:[D.jsxRuntimeExports.jsxs(Va,{children:[D.jsxRuntimeExports.jsx(D.Typography,{variant:"overline",fontWeight:"bold",children:"Readme"}),D.jsxRuntimeExports.jsx(D.Divider,{})]}),D.jsxRuntimeExports.jsx(mS,{children:D.jsxRuntimeExports.jsx(D.Markdown,{children:f.data.readme})})]}),g&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:x.message})]})}const qgr=new nIe(new Oo),Ugr=new D.QueryClient;function zgr({server:a,projectName:u,navigate:d,accessToken:f}){const{data:m,isSuccess:g,isError:x,error:b}=D.useQuery({queryKey:["packages",a,u],queryFn:()=>qgr.listPackages(u,{baseURL:a,withCredentials:!f,headers:{Authorization:f&&`Bearer ${f}`}})},Ugr);return D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[!g&&!x&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"20px",m:"auto"},children:"Fetching Packages..."}),g&&D.jsxRuntimeExports.jsxs(mo,{variant:"outlined",children:[D.jsxRuntimeExports.jsxs(Va,{children:[D.jsxRuntimeExports.jsx(D.Typography,{variant:"overline",fontWeight:"bold",children:"Packages"}),D.jsxRuntimeExports.jsx(D.Divider,{})]}),D.jsxRuntimeExports.jsx(mS,{children:D.jsxRuntimeExports.jsx(D.Grid,{container:!0,spacing:2,columns:12,sx:{mb:v=>v.spacing(2)},children:m.data.sort((v,_)=>v.name.localeCompare(_.name)).map(v=>D.jsxRuntimeExports.jsx(D.Grid,{size:{xs:12,sm:12,md:12,lg:4},children:D.jsxRuntimeExports.jsx(mo,{variant:"outlined",sx:{padding:"10px",cursor:"pointer"},onClick:_=>d(v.name+"/",_),children:D.jsxRuntimeExports.jsxs(Va,{children:[D.jsxRuntimeExports.jsx(D.Typography,{variant:"overline",color:"primary.main",children:v.name}),D.jsxRuntimeExports.jsx(D.Divider,{}),D.jsxRuntimeExports.jsx(D.Box$1,{sx:{mt:"10px",maxHeight:"100px",overflowY:"auto"},children:D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",children:v.description})})]})})},v.name))})})]}),x&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:b.message})]})}function Hgr({server:a,projectName:u,navigate:d,accessToken:f}){return D.jsxRuntimeExports.jsxs(D.Grid,{container:!0,spacing:2,columns:12,sx:{mb:m=>m.spacing(2)},children:[D.jsxRuntimeExports.jsx(D.Grid,{size:{xs:12,md:12},children:D.jsxRuntimeExports.jsx(zgr,{server:a,projectName:u,navigate:d,accessToken:f})}),D.jsxRuntimeExports.jsx(D.Grid,{size:{xs:12,md:12},children:D.jsxRuntimeExports.jsx(Bgr,{server:a,projectName:u,accessToken:f})})]})}D.axios.defaults.baseURL="http://localhost:4000";const Ggr=new iIe(new Oo),Wgr=new D.QueryClient;function Vgr({server:a,navigate:u}){const{data:d,isSuccess:f}=D.useQuery({queryKey:["projects",a],queryFn:()=>Ggr.listProjects({baseURL:a})},Wgr);return console.log(JSON.stringify(d?.data,null,2)),f?d.data.length===0?D.jsxRuntimeExports.jsx(D.Typography,{variant:"h4",children:"No projects found"}):d.data.length===1?(u(`/${d.data[0].name}/`),D.jsxRuntimeExports.jsx(D.jsxRuntimeExports.Fragment,{})):D.jsxRuntimeExports.jsx(D.Grid,{container:!0,spacing:2,columns:12,sx:{mb:m=>m.spacing(2)},children:d.data.map(m=>D.jsxRuntimeExports.jsx(D.Grid,{children:D.jsxRuntimeExports.jsx(D.Typography,{variant:"h1",onClick:g=>u(`/${m.name}/`,g),children:m.name})},m.name))}):D.jsxRuntimeExports.jsx(D.Typography,{variant:"h6",children:"Loading projects..."})}const Qgr=new Aie(new Oo),Ygr=new D.QueryClient;function Kgr({server:a,projectName:u,connectionName:d,schemaName:f,accessToken:m,onTableClick:g}){const{data:x,isSuccess:b,isError:v,error:_,isLoading:S}=D.useQuery({queryKey:["tables",a,u,d,f],queryFn:()=>Qgr.listTables(u,d,f,{baseURL:a,withCredentials:!m,headers:{Authorization:m&&`Bearer ${m}`}}),retry:!1},Ygr);return D.jsxRuntimeExports.jsxs(D.Box$1,{sx:{width:"100%"},children:[D.jsxRuntimeExports.jsxs(D.Typography,{variant:"overline",fontWeight:"bold",children:["Tables in ",f]}),D.jsxRuntimeExports.jsx(D.Divider,{}),D.jsxRuntimeExports.jsxs(D.Box$1,{sx:{mt:"10px",maxHeight:"200px",overflowY:"auto"},children:[S&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"20px",m:"auto"},children:"Fetching Tables..."}),v&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:`${u} > ${d} > ${f} - ${_.message}`}),b&&x.data.length===0&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",children:"No Tables"}),b&&x.data.length>0&&D.jsxRuntimeExports.jsx(D.List,{dense:!0,disablePadding:!0,children:x.data.map(R=>D.jsxRuntimeExports.jsx(D.ListItemButton,{onClick:()=>g&&g(R),children:D.jsxRuntimeExports.jsx(D.ListItemText,{primary:R})},R))})]})]})}const jqe=new Aie(new Oo),Fqe=new D.QueryClient;function Xgr({server:a,projectName:u,connectionName:d,accessToken:f}){const[m,g]=Pe.useState(void 0),[x,b]=Pe.useState(null),[v,_]=Pe.useState(!1),{data:S,isSuccess:R,isError:w,error:N,isLoading:k}=D.useQuery({queryKey:["tablePath",a,u,d],queryFn:()=>jqe.listSchemas(u,d,{baseURL:a,withCredentials:!f,headers:{Authorization:f&&`Bearer ${f}`}}),retry:!1},Fqe);return D.jsxRuntimeExports.jsxs(D.Grid,{container:!0,spacing:2,children:[D.jsxRuntimeExports.jsx(D.Grid,{size:{xs:12,md:6},children:D.jsxRuntimeExports.jsxs(D.Paper,{sx:{p:2},children:[D.jsxRuntimeExports.jsxs(D.Box$1,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:1},children:[D.jsxRuntimeExports.jsx(D.Typography,{variant:"overline",fontWeight:"bold",children:"Table Paths"}),D.jsxRuntimeExports.jsx(D.FormControlLabel,{control:D.jsxRuntimeExports.jsx(D.Switch,{checked:v,onChange:B=>_(B.target.checked)}),label:"Hidden Schemas"})]}),D.jsxRuntimeExports.jsx(D.Divider,{}),D.jsxRuntimeExports.jsxs(D.Box$1,{sx:{mt:"10px",maxHeight:"600px",overflowY:"auto"},children:[k&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"20px",m:"auto"},children:"Fetching Table Paths..."}),w&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:`${u} > ${d} - ${N.message}`}),R&&S.data.length===0&&D.jsxRuntimeExports.jsx(D.Typography,{variant:"body2",children:"No Schemas"}),R&&S.data.length>0&&D.jsxRuntimeExports.jsx(D.List,{dense:!0,disablePadding:!0,children:S.data.filter(({isHidden:B})=>v||!B).sort((B,P)=>B.isDefault===P.isDefault?0:B.isDefault?-1:1).map(B=>D.jsxRuntimeExports.jsx(D.ListItemButton,{selected:x===B.name,onClick:()=>b(B.name),children:D.jsxRuntimeExports.jsx(D.ListItemText,{primary:B.name})},B.name))})]})]})}),D.jsxRuntimeExports.jsx(D.Grid,{size:{xs:12,md:6},children:x&&D.jsxRuntimeExports.jsx(D.Paper,{sx:{p:2},children:D.jsxRuntimeExports.jsx(Kgr,{server:a,projectName:u,connectionName:d,schemaName:x,accessToken:f,onTableClick:B=>{g(B)}})})}),m&&D.jsxRuntimeExports.jsx(Jgr,{server:a,projectName:u,connectionName:d,schemaName:x,tableName:m,accessToken:f,onClose:()=>g(void 0)})]})}function Jgr({server:a,projectName:u,connectionName:d,schemaName:f,tableName:m,accessToken:g,onClose:x}){const{data:b,isSuccess:v,isError:_,error:S,isLoading:R}=D.useQuery({queryKey:["tablePathSchema",a,u,d,f,m],queryFn:()=>jqe.getTablesource(u,d,m,`${f}.${m}`,{baseURL:a,withCredentials:!g,headers:{Authorization:g&&`Bearer ${g}`}}),retry:!1},Fqe);return v&&b&&console.log(b),D.jsxRuntimeExports.jsxs(D.Dialog,{open:!0,onClose:onclose,maxWidth:"sm",fullWidth:!0,children:[D.jsxRuntimeExports.jsxs(D.DialogTitle,{children:["Table: ",f,".",m,D.jsxRuntimeExports.jsx(D.Typography,{fontSize:"large",variant:"body2",fontFamily:"monospace",component:"span"}),D.jsxRuntimeExports.jsx(D.IconButton,{"aria-label":"close",onClick:x,sx:{position:"absolute",right:8,top:8},children:D.jsxRuntimeExports.jsx(D.Box$1,{sx:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:"X"})})]}),D.jsxRuntimeExports.jsx(D.DialogContent,{children:D.jsxRuntimeExports.jsx(D.TableContainer,{children:D.jsxRuntimeExports.jsxs(D.Table,{size:"small",sx:{"& .MuiTableCell-root":{padding:"10px"}},children:[D.jsxRuntimeExports.jsx(D.TableHead,{children:D.jsxRuntimeExports.jsxs(D.TableRow,{children:[D.jsxRuntimeExports.jsx(D.TableCell,{children:"NAME"}),D.jsxRuntimeExports.jsx(D.TableCell,{children:"TYPE"})]})}),D.jsxRuntimeExports.jsxs(D.TableBody,{children:[v&&b&&b.data.columns.map(w=>D.jsxRuntimeExports.jsxs(D.TableRow,{children:[D.jsxRuntimeExports.jsx(D.TableCell,{children:w.name}),D.jsxRuntimeExports.jsx(D.TableCell,{children:w.type})]},w.name)),R&&D.jsxRuntimeExports.jsx("div",{children:"Loading..."}),_&&D.jsxRuntimeExports.jsxs("div",{children:["Error: ",S.message]})]})]})})})]})}exports.BrowserNotebookStorage=Cgr;exports.ConnectionExplorer=Xgr;exports.Home=Vgr;exports.Model=$0r;exports.MutableNotebook=Pgr;exports.Notebook=kqe;exports.NotebookStorageProvider=Lgr;exports.Package=ggr;exports.Project=Hgr;exports.PublisherPackageProvider=FIe;exports.QueryResult=PIe;exports.SourceExplorerComponent=zoe;exports.SourcesExplorer=Uoe;exports.useNotebookStorage=Pqe;exports.usePublisherPackage=gS;exports.useRouterClickHandler=Lqe;
|