@kong-ui-public/analytics-utilities 10.1.6-pr.2346.32c222100.0 → 10.1.6-pr.2346.5bc4acfaa.0

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.
@@ -15,5 +15,5 @@
15
15
  } else {
16
16
  newResult[${$}] = ${T}.value;
17
17
  }
18
- `)}g.write("payload.value = newResult;"),g.write("return payload;");const V=g.compile();return(D,T)=>V(p,D,T)};let o;const i=Pt,s=!Cn.jitless,l=s&&Ti.value,h=t.catchall;let w;e._zod.parse=(p,g)=>{w??(w=n.value);const b=p.value;if(!i(b))return p.issues.push({expected:"object",code:"invalid_type",input:b,inst:e}),p;const k=[];if(s&&l&&(g==null?void 0:g.async)===!1&&g.jitless!==!0)o||(o=r(t.shape)),p=o(p,g);else{p.value={};const T=w.shape;for(const $ of w.keys){const oe=T[$]._zod.run({value:b[$],issues:[]},g);oe instanceof Promise?k.push(oe.then(pt=>tt(pt,p,$,b))):tt(oe,p,$,b)}}if(!h)return k.length?Promise.all(k).then(()=>p):p;const P=[],W=w.keySet,V=h._zod,D=V.def.type;for(const T of Object.keys(b)){if(W.has(T))continue;if(D==="never"){P.push(T);continue}const $=V.run({value:b[T],issues:[]},g);$ instanceof Promise?k.push($.then(We=>tt(We,p,T,b))):tt($,p,T,b)}return P.length&&p.issues.push({code:"unrecognized_keys",keys:P,input:b,inst:e}),k.length?Promise.all(k).then(()=>p):p}});function nr(e,t,n,r){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const o=e.filter(i=>!Re(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(s=>ne(s,r,te())))}),t)}const os=d("$ZodUnion",(e,t)=>{E.init(e,t),O(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),O(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),O(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),O(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>$t(i.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(n)return r(o,i);let s=!1;const c=[];for(const l of t.options){const h=l._zod.run({value:o.value,issues:[]},i);if(h instanceof Promise)c.push(h),s=!0;else{if(h.issues.length===0)return h;c.push(h)}}return s?Promise.all(c).then(l=>nr(l,o,e,i)):nr(c,o,e,i)}}),is=d("$ZodIntersection",(e,t)=>{E.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,i=t.left._zod.run({value:o,issues:[]},r),s=t.right._zod.run({value:o,issues:[]},r);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([l,h])=>rr(n,l,h)):rr(n,i,s)}});function Rt(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ce(e)&&Ce(t)){const n=Object.keys(t),r=Object.keys(e).filter(i=>n.indexOf(i)!==-1),o={...e,...t};for(const i of r){const s=Rt(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=e[r],i=t[r],s=Rt(o,i);if(!s.valid)return{valid:!1,mergeErrorPath:[r,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function rr(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),Re(e))return e;const r=Rt(t.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const as=d("$ZodRecord",(e,t)=>{E.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Ce(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),n;const i=[];if(t.keyType._zod.values){const s=t.keyType._zod.values;n.value={};for(const l of s)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){const h=t.valueType._zod.run({value:o[l],issues:[]},r);h instanceof Promise?i.push(h.then(w=>{w.issues.length&&n.issues.push(...Te(l,w.issues)),n.value[l]=w.value})):(h.issues.length&&n.issues.push(...Te(l,h.issues)),n.value[l]=h.value)}let c;for(const l in o)s.has(l)||(c=c??[],c.push(l));c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:c})}else{n.value={};for(const s of Reflect.ownKeys(o)){if(s==="__proto__")continue;const c=t.keyType._zod.run({value:s,issues:[]},r);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(c.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(h=>ne(h,r,te())),input:s,path:[s],inst:e}),n.value[c.value]=c.value;continue}const l=t.valueType._zod.run({value:o[s],issues:[]},r);l instanceof Promise?i.push(l.then(h=>{h.issues.length&&n.issues.push(...Te(s,h.issues)),n.value[c.value]=h.value})):(l.issues.length&&n.issues.push(...Te(s,l.issues)),n.value[c.value]=l.value)}}return i.length?Promise.all(i).then(()=>n):n}}),ss=d("$ZodEnum",(e,t)=>{E.init(e,t);const n=wi(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>zi.has(typeof o)).map(o=>typeof o=="string"?be(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{const s=o.value;return r.has(s)||o.issues.push({code:"invalid_value",values:n,input:s,inst:e}),o}}),us=d("$ZodLiteral",(e,t)=>{if(E.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?be(n):n?be(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,r)=>{const o=n.value;return e._zod.values.has(o)||n.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),n}}),cs=d("$ZodTransform",(e,t)=>{E.init(e,t),e._zod.parse=(n,r)=>{const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(n.value=s,n));if(o instanceof Promise)throw new Ne;return n.value=o,n}});function or(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const ls=d("$ZodOptional",(e,t)=>{E.init(e,t),e._zod.optin="optional",e._zod.optout="optional",O(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),O(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${$t(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>or(i,n.value)):or(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),ds=d("$ZodNullable",(e,t)=>{E.init(e,t),O(e._zod,"optin",()=>t.innerType._zod.optin),O(e._zod,"optout",()=>t.innerType._zod.optout),O(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${$t(n.source)}|null)$`):void 0}),O(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),fs=d("$ZodDefault",(e,t)=>{E.init(e,t),e._zod.optin="optional",O(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>ir(i,t)):ir(o,t)}});function ir(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const hs=d("$ZodPrefault",(e,t)=>{E.init(e,t),e._zod.optin="optional",O(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),ms=d("$ZodNonOptional",(e,t)=>{E.init(e,t),O(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>ar(i,e)):ar(o,e)}});function ar(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const ps=d("$ZodCatch",(e,t)=>{E.init(e,t),O(e._zod,"optin",()=>t.innerType._zod.optin),O(e._zod,"optout",()=>t.innerType._zod.optout),O(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(s=>ne(s,r,te()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(i=>ne(i,r,te()))},input:n.value}),n.issues=[]),n)}}),gs=d("$ZodPipe",(e,t)=>{E.init(e,t),O(e._zod,"values",()=>t.in._zod.values),O(e._zod,"optin",()=>t.in._zod.optin),O(e._zod,"optout",()=>t.out._zod.optout),O(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(i=>sr(i,t,r)):sr(o,t,r)}});function sr(e,t,n){return e.issues.length?e:t.out._zod.run({value:e.value,issues:e.issues},n)}const _s=d("$ZodReadonly",(e,t)=>{E.init(e,t),O(e._zod,"propValues",()=>t.innerType._zod.propValues),O(e._zod,"values",()=>t.innerType._zod.values),O(e._zod,"optin",()=>t.innerType._zod.optin),O(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(ur):ur(o)}});function ur(e){return e.value=Object.freeze(e.value),e}const ys=d("$ZodCustom",(e,t)=>{j.init(e,t),E.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(i=>cr(i,n,r,e));cr(o,n,r,e)}});function cr(e,t,n,r){if(!e){const o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(xe(o))}}class ws{constructor(){this._map=new Map,this._idmap=new Map}add(t,...n){const r=n[0];if(this._map.set(t,r),r&&typeof r=="object"&&"id"in r){if(this._idmap.has(r.id))throw new Error(`ID ${r.id} already exists in the registry`);this._idmap.set(r.id,t)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function vs(){return new ws}const nt=vs();function bs(e,t){return new e({type:"string",...y(t)})}function Ts(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...y(t)})}function lr(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...y(t)})}function zs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...y(t)})}function Ds(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...y(t)})}function ks(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...y(t)})}function Os(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...y(t)})}function Ss(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...y(t)})}function Es(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...y(t)})}function Ms(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...y(t)})}function Is(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...y(t)})}function Zs(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...y(t)})}function $s(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...y(t)})}function Ps(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...y(t)})}function Ns(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...y(t)})}function Cs(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...y(t)})}function Rs(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...y(t)})}function xs(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...y(t)})}function As(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...y(t)})}function Fs(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...y(t)})}function js(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...y(t)})}function Us(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...y(t)})}function Ys(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...y(t)})}function Ls(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...y(t)})}function Gs(e,t){return new e({type:"string",format:"date",check:"string_format",...y(t)})}function Ws(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...y(t)})}function qs(e,t){return new e({type:"string",format:"duration",check:"string_format",...y(t)})}function Hs(e,t){return new e({type:"number",checks:[],...y(t)})}function Vs(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...y(t)})}function Bs(e,t){return new e({type:"boolean",...y(t)})}function Xs(e,t){return new e({type:"null",...y(t)})}function Qs(e){return new e({type:"unknown"})}function Ks(e,t){return new e({type:"never",...y(t)})}function dr(e,t){return new Qn({check:"less_than",...y(t),value:e,inclusive:!1})}function xt(e,t){return new Qn({check:"less_than",...y(t),value:e,inclusive:!0})}function fr(e,t){return new Kn({check:"greater_than",...y(t),value:e,inclusive:!1})}function At(e,t){return new Kn({check:"greater_than",...y(t),value:e,inclusive:!0})}function hr(e,t){return new fa({check:"multiple_of",...y(t),value:e})}function mr(e,t){return new ma({check:"max_length",...y(t),maximum:e})}function rt(e,t){return new pa({check:"min_length",...y(t),minimum:e})}function pr(e,t){return new ga({check:"length_equals",...y(t),length:e})}function Js(e,t){return new _a({check:"string_format",format:"regex",...y(t),pattern:e})}function eu(e){return new ya({check:"string_format",format:"lowercase",...y(e)})}function tu(e){return new wa({check:"string_format",format:"uppercase",...y(e)})}function nu(e,t){return new va({check:"string_format",format:"includes",...y(t),includes:e})}function ru(e,t){return new ba({check:"string_format",format:"starts_with",...y(t),prefix:e})}function ou(e,t){return new Ta({check:"string_format",format:"ends_with",...y(t),suffix:e})}function Ae(e){return new za({check:"overwrite",tx:e})}function iu(e){return Ae(t=>t.normalize(e))}function au(){return Ae(e=>e.trim())}function su(){return Ae(e=>e.toLowerCase())}function uu(){return Ae(e=>e.toUpperCase())}function cu(e,t,n){return new e({type:"array",element:t,...y(n)})}function lu(e,t,n){return new e({type:"custom",check:"custom",fn:t,...y(n)})}function du(e){const t=fu(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(xe(r,n.value,t._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(xe(o))}},e(n.value,n)));return t}function fu(e,t){const n=new j({check:"custom",...y(t)});return n._zod.check=e,n}const hu=d("ZodISODateTime",(e,t)=>{xa.init(e,t),Z.init(e,t)});function mu(e){return Ls(hu,e)}const pu=d("ZodISODate",(e,t)=>{Aa.init(e,t),Z.init(e,t)});function gu(e){return Gs(pu,e)}const _u=d("ZodISOTime",(e,t)=>{Fa.init(e,t),Z.init(e,t)});function yu(e){return Ws(_u,e)}const wu=d("ZodISODuration",(e,t)=>{ja.init(e,t),Z.init(e,t)});function vu(e){return qs(wu,e)}const ot=d("ZodError",(e,t)=>{Yn.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Pi(e,n)},flatten:{value:n=>$i(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,It,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,It,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),bu=Ni(ot),Tu=Ci(ot),zu=Gn(ot),Du=Wn(ot),I=d("ZodType",(e,t)=>(E.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),e.clone=(n,r)=>de(e,n,r),e.brand=()=>e,e.register=(n,r)=>(n.add(e,r),e),e.parse=(n,r)=>bu(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>zu(e,n,r),e.parseAsync=async(n,r)=>Tu(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>Du(e,n,r),e.spa=e.safeParseAsync,e.refine=(n,r)=>e.check(_c(n,r)),e.superRefine=n=>e.check(yc(n)),e.overwrite=n=>e.check(Ae(n)),e.optional=()=>zr(e),e.nullable=()=>Dr(e),e.nullish=()=>zr(Dr(e)),e.nonoptional=n=>lc(e,n),e.array=()=>he(e),e.or=n=>me([e,n]),e.and=n=>ec(e,n),e.transform=n=>Or(e,oc(n)),e.default=n=>sc(e,n),e.prefault=n=>cc(e,n),e.catch=n=>fc(e,n),e.pipe=n=>Or(e,n),e.readonly=()=>pc(e),e.describe=n=>{const r=e.clone();return nt.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){var n;return(n=nt.get(e))==null?void 0:n.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return nt.get(e);const r=e.clone();return nt.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),gr=d("_ZodString",(e,t)=>{Ct.init(e,t),I.init(e,t);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(Js(...r)),e.includes=(...r)=>e.check(nu(...r)),e.startsWith=(...r)=>e.check(ru(...r)),e.endsWith=(...r)=>e.check(ou(...r)),e.min=(...r)=>e.check(rt(...r)),e.max=(...r)=>e.check(mr(...r)),e.length=(...r)=>e.check(pr(...r)),e.nonempty=(...r)=>e.check(rt(1,...r)),e.lowercase=r=>e.check(eu(r)),e.uppercase=r=>e.check(tu(r)),e.trim=()=>e.check(au()),e.normalize=(...r)=>e.check(iu(...r)),e.toLowerCase=()=>e.check(su()),e.toUpperCase=()=>e.check(uu())}),ku=d("ZodString",(e,t)=>{Ct.init(e,t),gr.init(e,t),e.email=n=>e.check(Ts(Ou,n)),e.url=n=>e.check(Ss(Su,n)),e.jwt=n=>e.check(Ys(Yu,n)),e.emoji=n=>e.check(Es(Eu,n)),e.guid=n=>e.check(lr(_r,n)),e.uuid=n=>e.check(zs(it,n)),e.uuidv4=n=>e.check(Ds(it,n)),e.uuidv6=n=>e.check(ks(it,n)),e.uuidv7=n=>e.check(Os(it,n)),e.nanoid=n=>e.check(Ms(Mu,n)),e.guid=n=>e.check(lr(_r,n)),e.cuid=n=>e.check(Is(Iu,n)),e.cuid2=n=>e.check(Zs(Zu,n)),e.ulid=n=>e.check($s($u,n)),e.base64=n=>e.check(Fs(Fu,n)),e.base64url=n=>e.check(js(ju,n)),e.xid=n=>e.check(Ps(Pu,n)),e.ksuid=n=>e.check(Ns(Nu,n)),e.ipv4=n=>e.check(Cs(Cu,n)),e.ipv6=n=>e.check(Rs(Ru,n)),e.cidrv4=n=>e.check(xs(xu,n)),e.cidrv6=n=>e.check(As(Au,n)),e.e164=n=>e.check(Us(Uu,n)),e.datetime=n=>e.check(mu(n)),e.date=n=>e.check(gu(n)),e.time=n=>e.check(yu(n)),e.duration=n=>e.check(vu(n))});function R(e){return bs(ku,e)}const Z=d("ZodStringFormat",(e,t)=>{M.init(e,t),gr.init(e,t)}),Ou=d("ZodEmail",(e,t)=>{Ea.init(e,t),Z.init(e,t)}),_r=d("ZodGUID",(e,t)=>{Oa.init(e,t),Z.init(e,t)}),it=d("ZodUUID",(e,t)=>{Sa.init(e,t),Z.init(e,t)}),Su=d("ZodURL",(e,t)=>{Ma.init(e,t),Z.init(e,t)}),Eu=d("ZodEmoji",(e,t)=>{Ia.init(e,t),Z.init(e,t)}),Mu=d("ZodNanoID",(e,t)=>{Za.init(e,t),Z.init(e,t)}),Iu=d("ZodCUID",(e,t)=>{$a.init(e,t),Z.init(e,t)}),Zu=d("ZodCUID2",(e,t)=>{Pa.init(e,t),Z.init(e,t)}),$u=d("ZodULID",(e,t)=>{Na.init(e,t),Z.init(e,t)}),Pu=d("ZodXID",(e,t)=>{Ca.init(e,t),Z.init(e,t)}),Nu=d("ZodKSUID",(e,t)=>{Ra.init(e,t),Z.init(e,t)}),Cu=d("ZodIPv4",(e,t)=>{Ua.init(e,t),Z.init(e,t)}),Ru=d("ZodIPv6",(e,t)=>{Ya.init(e,t),Z.init(e,t)}),xu=d("ZodCIDRv4",(e,t)=>{La.init(e,t),Z.init(e,t)}),Au=d("ZodCIDRv6",(e,t)=>{Ga.init(e,t),Z.init(e,t)}),Fu=d("ZodBase64",(e,t)=>{Wa.init(e,t),Z.init(e,t)}),ju=d("ZodBase64URL",(e,t)=>{Ha.init(e,t),Z.init(e,t)}),Uu=d("ZodE164",(e,t)=>{Va.init(e,t),Z.init(e,t)}),Yu=d("ZodJWT",(e,t)=>{Xa.init(e,t),Z.init(e,t)}),yr=d("ZodNumber",(e,t)=>{er.init(e,t),I.init(e,t),e.gt=(r,o)=>e.check(fr(r,o)),e.gte=(r,o)=>e.check(At(r,o)),e.min=(r,o)=>e.check(At(r,o)),e.lt=(r,o)=>e.check(dr(r,o)),e.lte=(r,o)=>e.check(xt(r,o)),e.max=(r,o)=>e.check(xt(r,o)),e.int=r=>e.check(wr(r)),e.safe=r=>e.check(wr(r)),e.positive=r=>e.check(fr(0,r)),e.nonnegative=r=>e.check(At(0,r)),e.negative=r=>e.check(dr(0,r)),e.nonpositive=r=>e.check(xt(0,r)),e.multipleOf=(r,o)=>e.check(hr(r,o)),e.step=(r,o)=>e.check(hr(r,o)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function X(e){return Hs(yr,e)}const Lu=d("ZodNumberFormat",(e,t)=>{Qa.init(e,t),yr.init(e,t)});function wr(e){return Vs(Lu,e)}const Gu=d("ZodBoolean",(e,t)=>{Ka.init(e,t),I.init(e,t)});function fe(e){return Bs(Gu,e)}const Wu=d("ZodNull",(e,t)=>{Ja.init(e,t),I.init(e,t)});function qu(e){return Xs(Wu,e)}const Hu=d("ZodUnknown",(e,t)=>{es.init(e,t),I.init(e,t)});function vr(){return Qs(Hu)}const Vu=d("ZodNever",(e,t)=>{ts.init(e,t),I.init(e,t)});function Bu(e){return Ks(Vu,e)}const Xu=d("ZodArray",(e,t)=>{ns.init(e,t),I.init(e,t),e.element=t.element,e.min=(n,r)=>e.check(rt(n,r)),e.nonempty=n=>e.check(rt(1,n)),e.max=(n,r)=>e.check(mr(n,r)),e.length=(n,r)=>e.check(pr(n,r)),e.unwrap=()=>e.element});function he(e,t){return cu(Xu,e,t)}const Qu=d("ZodObject",(e,t)=>{rs.init(e,t),I.init(e,t),O(e,"shape",()=>t.shape),e.keyof=()=>L(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:vr()}),e.loose=()=>e.clone({...e._zod.def,catchall:vr()}),e.strict=()=>e.clone({...e._zod.def,catchall:Bu()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>Ei(e,n),e.merge=n=>Mi(e,n),e.pick=n=>Oi(e,n),e.omit=n=>Si(e,n),e.partial=(...n)=>Ii(Tr,e,n[0]),e.required=(...n)=>Zi(kr,e,n[0])});function N(e,t){const n={type:"object",get shape(){return le(this,"shape",e?bi(e):{}),this.shape},...y(t)};return new Qu(n)}const Ku=d("ZodUnion",(e,t)=>{os.init(e,t),I.init(e,t),e.options=t.options});function me(e,t){return new Ku({type:"union",options:e,...y(t)})}const Ju=d("ZodIntersection",(e,t)=>{is.init(e,t),I.init(e,t)});function ec(e,t){return new Ju({type:"intersection",left:e,right:t})}const tc=d("ZodRecord",(e,t)=>{as.init(e,t),I.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function br(e,t,n){return new tc({type:"record",keyType:e,valueType:t,...y(n)})}const Ft=d("ZodEnum",(e,t)=>{ss.init(e,t),I.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const i={};for(const s of r)if(n.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Ft({...t,checks:[],...y(o),entries:i})},e.exclude=(r,o)=>{const i={...t.entries};for(const s of r)if(n.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new Ft({...t,checks:[],...y(o),entries:i})}});function L(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Ft({type:"enum",entries:n,...y(t)})}const nc=d("ZodLiteral",(e,t)=>{us.init(e,t),I.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function B(e,t){return new nc({type:"literal",values:Array.isArray(e)?e:[e],...y(t)})}const rc=d("ZodTransform",(e,t)=>{cs.init(e,t),I.init(e,t),e._zod.parse=(n,r)=>{n.addIssue=i=>{if(typeof i=="string")n.issues.push(xe(i,n.value,t));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(xe(s))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n)):(n.value=o,n)}});function oc(e){return new rc({type:"transform",transform:e})}const Tr=d("ZodOptional",(e,t)=>{ls.init(e,t),I.init(e,t),e.unwrap=()=>e._zod.def.innerType});function zr(e){return new Tr({type:"optional",innerType:e})}const ic=d("ZodNullable",(e,t)=>{ds.init(e,t),I.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Dr(e){return new ic({type:"nullable",innerType:e})}const ac=d("ZodDefault",(e,t)=>{fs.init(e,t),I.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function sc(e,t){return new ac({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():jn(t)}})}const uc=d("ZodPrefault",(e,t)=>{hs.init(e,t),I.init(e,t),e.unwrap=()=>e._zod.def.innerType});function cc(e,t){return new uc({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():jn(t)}})}const kr=d("ZodNonOptional",(e,t)=>{ms.init(e,t),I.init(e,t),e.unwrap=()=>e._zod.def.innerType});function lc(e,t){return new kr({type:"nonoptional",innerType:e,...y(t)})}const dc=d("ZodCatch",(e,t)=>{ps.init(e,t),I.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function fc(e,t){return new dc({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const hc=d("ZodPipe",(e,t)=>{gs.init(e,t),I.init(e,t),e.in=t.in,e.out=t.out});function Or(e,t){return new hc({type:"pipe",in:e,out:t})}const mc=d("ZodReadonly",(e,t)=>{_s.init(e,t),I.init(e,t),e.unwrap=()=>e._zod.def.innerType});function pc(e){return new mc({type:"readonly",innerType:e})}const gc=d("ZodCustom",(e,t)=>{ys.init(e,t),I.init(e,t)});function _c(e,t={}){return lu(gc,e,t)}function yc(e){return du(e)}const wc=["horizontal_bar","vertical_bar","gauge","donut","timeseries_line","timeseries_bar","golden_signals","top_n","slottable","single_value"],Fe=R(),pe=R(),Sr=fe(),Er=me([he(R()),br(R(),R())]),Mr=N({type:B("slottable"),id:R()}).strict(),Ir=N({type:L(["horizontal_bar","vertical_bar"]),stacked:fe().optional(),chart_dataset_colors:Er.optional(),synthetics_data_key:Fe.optional(),chart_title:pe.optional(),allow_csv_export:Sr.optional()}).strict(),Zr=N({type:L(["timeseries_line","timeseries_bar"]),stacked:fe().optional(),threshold:br(R(),X()).optional(),chart_dataset_colors:Er.optional(),synthetics_data_key:Fe.optional(),chart_title:pe.optional(),allow_csv_export:Sr.optional()}).strict(),$r=N({type:B("gauge"),metric_display:L(["hidden","single","full"]).optional(),reverse_dataset:fe().optional(),numerator:X().optional(),synthetics_data_key:Fe.optional(),chart_title:pe.optional()}).strict(),Pr=N({type:B("donut"),synthetics_data_key:Fe.optional(),chart_title:pe.optional()}).strict(),Nr=N({type:B("top_n"),chart_title:pe.optional(),synthetics_data_key:Fe.optional(),description:R().optional(),entity_link:R().optional()}).strict(),Cr=N({type:B("golden_signals"),chart_title:pe.optional(),long_card_titles:fe().optional(),description:R().optional(),percentile_latency:fe().optional()}).strict(),Rr=N({type:B("single_value"),decimal_points:X().optional(),chart_title:pe.optional()}).strict(),vc=N({tz:R().optional().default("Etc/UTC"),type:B("relative"),time_range:L(Dt).optional().default("1h")}).strict(),bc=N({tz:R().optional(),type:B("absolute"),start:R(),end:R()}).strict(),Tc=me([vc,bc]).optional().default({tz:Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC",type:"relative",time_range:"1h"}),jt=N({granularity:L(Ve).optional(),time_range:Tc,limit:X().optional(),meta:N().optional()}),Ut=e=>he(L(e)).optional(),Yt=e=>he(L(e)).max(2).optional(),at=e=>{const t=N({field:L(e),operator:L(Tt),value:he(me([R(),X(),qu()]))}).strict(),n=N({field:L(e),operator:L(zt)}).strict();return he(me([t,n])).optional()},xr=jt.extend({datasource:B("api_usage"),metrics:Ut(kt),dimensions:Yt(Xe),filters:at(se)}).strict(),Ar=jt.extend({datasource:B("basic"),metrics:Ut(Be),dimensions:Yt($e),filters:at(ae)}).strict(),Fr=jt.extend({datasource:B("llm_usage"),metrics:Ut(Ot),dimensions:Yt(Qe),filters:at(ue)}).strict(),jr=me([xr,Ar,Fr]),Ur=N({query:jr,chart:me([Ir,$r,Pr,Zr,Cr,Nr,Mr,Rr])}).strict(),Yr=N({position:N({col:X(),row:X()}).strict(),size:N({cols:X(),rows:X(),fit_to_content:fe().optional()}).strict()}).strict(),Lr=N({type:L(["chart"]),definition:Ur,layout:Yr,id:R().optional()}).strict(),Gr=N({tiles:he(Lr),tile_height:X().optional(),preset_filters:at([...se,...ae,...ue]),template_id:R().nullable().optional()}).strict(),zc=e=>Gr.parse(e),Dc=e=>{const t=[];return ae.includes(e)&&t.push("basic"),se.includes(e)&&t.push("api_usage"),ue.includes(e)&&t.push("llm_usage"),(hn.includes(e)||gn.includes(e))&&t.push("requests"),t},Wr=6048e5,kc=864e5,Oc=60,Sc=3600,qr=Symbol.for("constructDateFrom");function H(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&qr in e?e[qr](t):e instanceof Date?new e.constructor(t):new Date(t)}function x(e,t){return H(t||e,e)}function Hr(e,t,n){const r=x(e,n==null?void 0:n.in);return isNaN(t)?H(e,NaN):(r.setDate(r.getDate()+t),r)}function Ec(e,t,n){const r=x(e,n==null?void 0:n.in);if(isNaN(t))return H(e,NaN);const o=r.getDate(),i=H(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const s=i.getDate();return o>=s?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}let Mc={};function je(){return Mc}function Q(e,t){var c,l,h,w;const n=je(),r=(t==null?void 0:t.weekStartsOn)??((l=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((w=(h=n.locale)==null?void 0:h.options)==null?void 0:w.weekStartsOn)??0,o=x(e,t==null?void 0:t.in),i=o.getDay(),s=(i<r?7:0)+i-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function st(e,t){return Q(e,{...t,weekStartsOn:1})}function Vr(e,t){const n=x(e,t==null?void 0:t.in),r=n.getFullYear(),o=H(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=st(o),s=H(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const c=st(s);return n.getTime()>=i.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function Br(e){const t=x(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Ic(e,...t){const n=H.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function ut(e,t){const n=x(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function Zc(e,t,n){const[r,o]=Ic(n==null?void 0:n.in,e,t),i=ut(r),s=ut(o),c=+i-Br(i),l=+s-Br(s);return Math.round((c-l)/kc)}function $c(e,t){const n=Vr(e,t),r=H(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),st(r)}function Pc(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Nc(e){return!(!Pc(e)&&typeof e!="number"||isNaN(+x(e)))}function ze(e,t){const n=x(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Cc(e,t){const n=x(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const Rc={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},xc=(e,t,n)=>{let r;const o=Rc[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Lt(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Ac={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Fc={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},jc={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Uc={date:Lt({formats:Ac,defaultWidth:"full"}),time:Lt({formats:Fc,defaultWidth:"full"}),dateTime:Lt({formats:jc,defaultWidth:"full"})},Yc={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Lc=(e,t,n,r)=>Yc[e];function Ue(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,c=n!=null&&n.width?String(n.width):s;o=e.formattingValues[c]||e.formattingValues[s]}else{const s=e.defaultWidth,c=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[c]||e.values[s]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const Gc={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Wc={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},qc={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Hc={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Vc={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Bc={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Xc={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Ue({values:Gc,defaultWidth:"wide"}),quarter:Ue({values:Wc,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ue({values:qc,defaultWidth:"wide"}),day:Ue({values:Hc,defaultWidth:"wide"}),dayPeriod:Ue({values:Vc,defaultWidth:"wide",formattingValues:Bc,defaultFormattingWidth:"wide"})};function Ye(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const s=i[0],c=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(c)?Kc(c,p=>p.test(s)):Qc(c,p=>p.test(s));let h;h=e.valueCallback?e.valueCallback(l):l,h=n.valueCallback?n.valueCallback(h):h;const w=t.slice(s.length);return{value:h,rest:w}}}function Qc(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Kc(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Jc(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let s=e.valueCallback?e.valueCallback(i[0]):i[0];s=n.valueCallback?n.valueCallback(s):s;const c=t.slice(o.length);return{value:s,rest:c}}}const el=/^(\d+)(th|st|nd|rd)?/i,tl=/\d+/i,nl={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},rl={any:[/^b/i,/^(a|c)/i]},ol={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},il={any:[/1/i,/2/i,/3/i,/4/i]},al={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},sl={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},ul={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},cl={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ll={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},dl={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},fl={ordinalNumber:Jc({matchPattern:el,parsePattern:tl,valueCallback:e=>parseInt(e,10)}),era:Ye({matchPatterns:nl,defaultMatchWidth:"wide",parsePatterns:rl,defaultParseWidth:"any"}),quarter:Ye({matchPatterns:ol,defaultMatchWidth:"wide",parsePatterns:il,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ye({matchPatterns:al,defaultMatchWidth:"wide",parsePatterns:sl,defaultParseWidth:"any"}),day:Ye({matchPatterns:ul,defaultMatchWidth:"wide",parsePatterns:cl,defaultParseWidth:"any"}),dayPeriod:Ye({matchPatterns:ll,defaultMatchWidth:"any",parsePatterns:dl,defaultParseWidth:"any"})},hl={code:"en-US",formatDistance:xc,formatLong:Uc,formatRelative:Lc,localize:Xc,match:fl,options:{weekStartsOn:0,firstWeekContainsDate:1}};function ml(e,t){const n=x(e,t==null?void 0:t.in);return Zc(n,Cc(n))+1}function pl(e,t){const n=x(e,t==null?void 0:t.in),r=+st(n)-+$c(n);return Math.round(r/Wr)+1}function Xr(e,t){var w,p,g,b;const n=x(e,t==null?void 0:t.in),r=n.getFullYear(),o=je(),i=(t==null?void 0:t.firstWeekContainsDate)??((p=(w=t==null?void 0:t.locale)==null?void 0:w.options)==null?void 0:p.firstWeekContainsDate)??o.firstWeekContainsDate??((b=(g=o.locale)==null?void 0:g.options)==null?void 0:b.firstWeekContainsDate)??1,s=H((t==null?void 0:t.in)||e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);const c=Q(s,t),l=H((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const h=Q(l,t);return+n>=+c?r+1:+n>=+h?r:r-1}function gl(e,t){var c,l,h,w;const n=je(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((w=(h=n.locale)==null?void 0:h.options)==null?void 0:w.firstWeekContainsDate)??1,o=Xr(e,t),i=H((t==null?void 0:t.in)||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),Q(i,t)}function _l(e,t){const n=x(e,t==null?void 0:t.in),r=+Q(n,t)-+gl(n,t);return Math.round(r/Wr)+1}function z(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const re={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return z(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):z(n+1,2)},d(e,t){return z(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return z(e.getHours()%12||12,t.length)},H(e,t){return z(e.getHours(),t.length)},m(e,t){return z(e.getMinutes(),t.length)},s(e,t){return z(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return z(o,t.length)}},De={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Qr={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return re.y(e,t)},Y:function(e,t,n,r){const o=Xr(e,r),i=o>0?o:1-o;if(t==="YY"){const s=i%100;return z(s,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):z(i,t.length)},R:function(e,t){const n=Vr(e);return z(n,t.length)},u:function(e,t){const n=e.getFullYear();return z(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return z(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return z(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return re.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return z(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=_l(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):z(o,t.length)},I:function(e,t,n){const r=pl(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):z(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):re.d(e,t)},D:function(e,t,n){const r=ml(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):z(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return z(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return z(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return z(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=De.noon:r===0?o=De.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=De.evening:r>=12?o=De.afternoon:r>=4?o=De.morning:o=De.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return re.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):re.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):z(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):z(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):re.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):re.s(e,t)},S:function(e,t){return re.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Jr(r);case"XXXX":case"XX":return ge(r);case"XXXXX":case"XXX":default:return ge(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Jr(r);case"xxxx":case"xx":return ge(r);case"xxxxx":case"xxx":default:return ge(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Kr(r,":");case"OOOO":default:return"GMT"+ge(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Kr(r,":");case"zzzz":default:return"GMT"+ge(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return z(r,t.length)},T:function(e,t,n){return z(+e,t.length)}};function Kr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+z(i,2)}function Jr(e,t){return e%60===0?(e>0?"-":"+")+z(Math.abs(e)/60,2):ge(e,t)}function ge(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=z(Math.trunc(r/60),2),i=z(r%60,2);return n+o+t+i}const eo=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},to=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},yl={p:to,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return eo(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",eo(r,t)).replace("{{time}}",to(o,t))}},wl=/^D+$/,vl=/^Y+$/,bl=["D","DD","YY","YYYY"];function Tl(e){return wl.test(e)}function zl(e){return vl.test(e)}function Dl(e,t,n){const r=kl(e,t,n);if(console.warn(r),bl.includes(e))throw new RangeError(r)}function kl(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Ol=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Sl=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,El=/^'([^]*?)'?$/,Ml=/''/g,Il=/[a-zA-Z]/;function no(e,t,n){var w,p,g,b,k,P,W,V;const r=je(),o=(n==null?void 0:n.locale)??r.locale??hl,i=(n==null?void 0:n.firstWeekContainsDate)??((p=(w=n==null?void 0:n.locale)==null?void 0:w.options)==null?void 0:p.firstWeekContainsDate)??r.firstWeekContainsDate??((b=(g=r.locale)==null?void 0:g.options)==null?void 0:b.firstWeekContainsDate)??1,s=(n==null?void 0:n.weekStartsOn)??((P=(k=n==null?void 0:n.locale)==null?void 0:k.options)==null?void 0:P.weekStartsOn)??r.weekStartsOn??((V=(W=r.locale)==null?void 0:W.options)==null?void 0:V.weekStartsOn)??0,c=x(e,n==null?void 0:n.in);if(!Nc(c))throw new RangeError("Invalid time value");let l=t.match(Sl).map(D=>{const T=D[0];if(T==="p"||T==="P"){const $=yl[T];return $(D,o.formatLong)}return D}).join("").match(Ol).map(D=>{if(D==="''")return{isToken:!1,value:"'"};const T=D[0];if(T==="'")return{isToken:!1,value:Zl(D)};if(Qr[T])return{isToken:!0,value:D};if(T.match(Il))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");return{isToken:!1,value:D}});o.localize.preprocessor&&(l=o.localize.preprocessor(c,l));const h={firstWeekContainsDate:i,weekStartsOn:s,locale:o};return l.map(D=>{if(!D.isToken)return D.value;const T=D.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&zl(T)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Tl(T))&&Dl(T,t,String(e));const $=Qr[T[0]];return $(c,T,o.localize,h)}).join("")}function Zl(e){const t=e.match(El);return t?t[1].replace(Ml,"'"):e}function $l(e,t){const n=x(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),i=H(n,0);return i.setFullYear(r,o+1,0),i.setHours(0,0,0,0),i.getDate()}function Pl(){return Object.assign({},je())}function ro(e){return+x(e)}function oo(e){return Math.trunc(+x(e)/1e3)}function Nl(e){return Math.trunc(e*Sc)}function Cl(e){const t=e/Oc;return Math.trunc(t)}function io(e,t,n){return Ec(e,-1,n)}function ao(e,t,n){const r=Pl(),o=Al(e,n.timeZone,n.locale??r.locale);return"formatToParts"in o?Rl(o,t):xl(o,t)}function Rl(e,t){const n=e.formatToParts(t);for(let r=n.length-1;r>=0;--r)if(n[r].type==="timeZoneName")return n[r].value}function xl(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(n);return r?r[0].substr(1):""}function Al(e,t,n){return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:t,timeZoneName:e})}function Fl(e,t){const n=Gl(t);return"formatToParts"in n?Ul(n,e):Yl(n,e)}const jl={year:0,month:1,day:2,hour:3,minute:4,second:5};function Ul(e,t){try{const n=e.formatToParts(t),r=[];for(let o=0;o<n.length;o++){const i=jl[n[o].type];i!==void 0&&(r[i]=parseInt(n[o].value,10))}return r}catch(n){if(n instanceof RangeError)return[NaN];throw n}}function Yl(e,t){const n=e.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}const Gt={},so=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),Ll=so==="06/25/2014, 00:00:00"||so==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function Gl(e){return Gt[e]||(Gt[e]=Ll?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),Gt[e]}function Wt(e,t,n,r,o,i,s){const c=new Date(0);return c.setUTCFullYear(e,t,n),c.setUTCHours(r,o,i,s),c}const uo=36e5,Wl=6e4,qt={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Le(e,t,n){if(!e)return 0;let r=qt.timezoneZ.exec(e);if(r)return 0;let o,i;if(r=qt.timezoneHH.exec(e),r)return o=parseInt(r[1],10),co(o)?-(o*uo):NaN;if(r=qt.timezoneHHMM.exec(e),r){o=parseInt(r[2],10);const s=parseInt(r[3],10);return co(o,s)?(i=Math.abs(o)*uo+s*Wl,r[1]==="+"?-i:i):NaN}if(Vl(e)){t=new Date(t||Date.now());const s=n?t:ql(t),c=Ht(s,e);return-(n?c:Hl(t,c,e))}return NaN}function ql(e){return Wt(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function Ht(e,t){const n=Fl(e,t),r=Wt(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime();let o=e.getTime();const i=o%1e3;return o-=i>=0?i:1e3+i,r-o}function Hl(e,t,n){let o=e.getTime()-t;const i=Ht(new Date(o),n);if(t===i)return t;o-=i-t;const s=Ht(new Date(o),n);return i===s?i:Math.max(i,s)}function co(e,t){return-23<=e&&e<=23&&(t==null||0<=t&&t<=59)}const lo={};function Vl(e){if(lo[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),lo[e]=!0,!0}catch{return!1}}const Bl=60*1e3,Xl={X:function(e,t,n){const r=Vt(n.timeZone,e);if(r===0)return"Z";switch(t){case"X":return fo(r);case"XXXX":case"XX":return ke(r);case"XXXXX":case"XXX":default:return ke(r,":")}},x:function(e,t,n){const r=Vt(n.timeZone,e);switch(t){case"x":return fo(r);case"xxxx":case"xx":return ke(r);case"xxxxx":case"xxx":default:return ke(r,":")}},O:function(e,t,n){const r=Vt(n.timeZone,e);switch(t){case"O":case"OO":case"OOO":return"GMT"+Ql(r,":");case"OOOO":default:return"GMT"+ke(r,":")}},z:function(e,t,n){switch(t){case"z":case"zz":case"zzz":return ao("short",e,n);case"zzzz":default:return ao("long",e,n)}}};function Vt(e,t){const n=e?Le(e,t,!0)/Bl:(t==null?void 0:t.getTimezoneOffset())??0;if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+e);return n}function ct(e,t){const n=e<0?"-":"";let r=Math.abs(e).toString();for(;r.length<t;)r="0"+r;return n+r}function ke(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=ct(Math.floor(r/60),2),i=ct(Math.floor(r%60),2);return n+o+t+i}function fo(e,t){return e%60===0?(e>0?"-":"+")+ct(Math.abs(e)/60,2):ke(e,t)}function Ql(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+ct(i,2)}function ho(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+e-+t}const mo=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Bt=36e5,po=6e4,Kl=2,F={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:mo};function lt(e,t={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(e===null)return new Date(NaN);const n=t.additionalDigits==null?Kl:Number(t.additionalDigits);if(n!==2&&n!==1&&n!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]")return new Date(e.getTime());if(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")return new Date(e);if(Object.prototype.toString.call(e)!=="[object String]")return new Date(NaN);const r=Jl(e),{year:o,restDateString:i}=ed(r.date,n),s=td(i,o);if(s===null||isNaN(s.getTime()))return new Date(NaN);if(s){const c=s.getTime();let l=0,h;if(r.time&&(l=nd(r.time),l===null||isNaN(l)))return new Date(NaN);if(r.timeZone||t.timeZone){if(h=Le(r.timeZone||t.timeZone,new Date(c+l)),isNaN(h))return new Date(NaN)}else h=ho(new Date(c+l)),h=ho(new Date(c+l+h));return new Date(c+l+h)}else return new Date(NaN)}function Jl(e){const t={};let n=F.dateTimePattern.exec(e),r;if(n?(t.date=n[1],r=n[3]):(n=F.datePattern.exec(e),n?(t.date=n[1],r=n[2]):(t.date=null,r=e)),r){const o=F.timeZone.exec(r);o?(t.time=r.replace(o[1],""),t.timeZone=o[1].trim()):t.time=r}return t}function ed(e,t){if(e){const n=F.YYY[t],r=F.YYYYY[t];let o=F.YYYY.exec(e)||r.exec(e);if(o){const i=o[1];return{year:parseInt(i,10),restDateString:e.slice(i.length)}}if(o=F.YY.exec(e)||n.exec(e),o){const i=o[1];return{year:parseInt(i,10)*100,restDateString:e.slice(i.length)}}}return{year:null}}function td(e,t){if(t===null)return null;let n,r,o;if(!e||!e.length)return n=new Date(0),n.setUTCFullYear(t),n;let i=F.MM.exec(e);if(i)return n=new Date(0),r=parseInt(i[1],10)-1,yo(t,r)?(n.setUTCFullYear(t,r),n):new Date(NaN);if(i=F.DDD.exec(e),i){n=new Date(0);const s=parseInt(i[1],10);return id(t,s)?(n.setUTCFullYear(t,0,s),n):new Date(NaN)}if(i=F.MMDD.exec(e),i){n=new Date(0),r=parseInt(i[1],10)-1;const s=parseInt(i[2],10);return yo(t,r,s)?(n.setUTCFullYear(t,r,s),n):new Date(NaN)}if(i=F.Www.exec(e),i)return o=parseInt(i[1],10)-1,wo(o)?go(t,o):new Date(NaN);if(i=F.WwwD.exec(e),i){o=parseInt(i[1],10)-1;const s=parseInt(i[2],10)-1;return wo(o,s)?go(t,o,s):new Date(NaN)}return null}function nd(e){let t,n,r=F.HH.exec(e);if(r)return t=parseFloat(r[1].replace(",",".")),Xt(t)?t%24*Bt:NaN;if(r=F.HHMM.exec(e),r)return t=parseInt(r[1],10),n=parseFloat(r[2].replace(",",".")),Xt(t,n)?t%24*Bt+n*po:NaN;if(r=F.HHMMSS.exec(e),r){t=parseInt(r[1],10),n=parseInt(r[2],10);const o=parseFloat(r[3].replace(",","."));return Xt(t,n,o)?t%24*Bt+n*po+o*1e3:NaN}return null}function go(e,t,n){t=t||0,n=n||0;const r=new Date(0);r.setUTCFullYear(e,0,4);const o=r.getUTCDay()||7,i=t*7+n+1-o;return r.setUTCDate(r.getUTCDate()+i),r}const rd=[31,28,31,30,31,30,31,31,30,31,30,31],od=[31,29,31,30,31,30,31,31,30,31,30,31];function _o(e){return e%400===0||e%4===0&&e%100!==0}function yo(e,t,n){if(t<0||t>11)return!1;if(n!=null){if(n<1)return!1;const r=_o(e);if(r&&n>od[t]||!r&&n>rd[t])return!1}return!0}function id(e,t){if(t<1)return!1;const n=_o(e);return!(n&&t>366||!n&&t>365)}function wo(e,t){return!(e<0||e>52||t!=null&&(t<0||t>6))}function Xt(e,t,n){return!(e<0||e>=25||t!=null&&(t<0||t>=60)||n!=null&&(n<0||n>=60))}const ad=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function sd(e,t,n={}){t=String(t);const r=t.match(ad);if(r){const o=lt(n.originalDate||e,n);t=r.reduce(function(i,s){if(s[0]==="'")return i;const c=i.indexOf(s),l=i[c-1]==="'",h=i.replace(s,"'"+Xl[s[0]](o,s,n)+"'");return l?h.substring(0,c-1)+h.substring(c+1):h},t)}return no(e,t,n)}function vo(e,t,n){e=lt(e,n);const r=Le(t,e,!0),o=new Date(e.getTime()-r),i=new Date(0);return i.setFullYear(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()),i.setHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()),i}function ud(e,t,n,r){return r={...r,timeZone:t,originalDate:e},sd(vo(e,t,{timeZone:r.timeZone}),n,r)}function cd(e,t,n){if(typeof e=="string"&&!e.match(mo))return lt(e,{...n,timeZone:t});e=lt(e,n);const r=Wt(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()).getTime(),o=Le(t,new Date(r));return new Date(r+o)}function bo(e,t){return-Le(e,t)}function ld(e){return no(e,"yyyy-MM-dd'T'HH:mm:ss.SSSXXX")}function Qt(e,t={}){if(!e)return e;const n=t.tz||Intl.DateTimeFormat().resolvedOptions().timeZone;try{let r="MMM dd, yyy hh:mm a";t.short&&(r="MMM dd, yyy"),t.includeTZ&&(r+=" (z)");const o=new Date(e);return ud(o,n,r)}catch{return console.error("Invalid value passed to formatTime",e),"(invalid date)"}}function dd(e,t){return`${Qt(e.getTime())} - ${Qt(t.getTime(),{includeTZ:!0})}`}const Ge={secondly:1e3,tenSecondly:10*1e3,thirtySecondly:30*1e3,minutely:60*1e3,fiveMinutely:5*60*1e3,tenMinutely:10*60*1e3,thirtyMinutely:30*60*1e3,hourly:60*60*1e3,twoHourly:2*60*60*1e3,twelveHourly:12*60*60*1e3,daily:60*60*24*1e3,weekly:60*60*24*7*1e3,trend:0};function fd(e,t){return e.map(n=>({value:n,label:t.t(`configuration.vitals.reports.granularity.${n}`)}))}function To(e,t){return{duration:e,type:"duration",origin:t}}function hd(e){return e&&Ve.find(n=>e<=Ge[n])||null}function zo(e,t,n,r){const o=Ge[n];let i=0;return o>=Ge.daily&&(r?i=-bo(r,t):i=t.getTimezoneOffset()*60*1e3),new Date(e((t.getTime()-i)/o)*o+i)}function Do(e,t,n){return zo(Math.floor,e,t,n)}function Kt(e,t,n){return zo(Math.ceil,e,t,n)}class dt{constructor(t,n,r){C(this,"timeframe");C(this,"tz");C(this,"dataGranularity");if(this.constructor===dt)throw new Error("BaseQueryTime is not meant to be used directly.");this.timeframe=t,this.tz=n,this.dataGranularity=r??t.dataGranularity}calculateStartDate(t,n,r=1){if(t)return new Date(this.endDate().getTime()-this.timeframe.timeframeLengthMs()*r);{const o=this.endDate(),i=this.timeframe.rawStart(this.tz),s=Do(i,n,this.tz),l=(o.getTime()-s.getTime())*(r-1);return new Date(s.getTime()-l)}}granularitySeconds(){return Math.floor(this.granularityMs()/1e3)}granularityDruid(){return To(this.granularityMs(),this.startDate().toISOString())}startSeconds(){return oo(this.startDate())}endSeconds(){return oo(this.endDate())}startMs(){return ro(this.startDate())}endMs(){return ro(this.endDate())}}class md extends dt{constructor(n,r,o,i,s){super(n,o,i);C(this,"granularity");r&&n.allowedGranularities(s).has(r)?this.granularity=r:s?this.granularity=n.fineGrainedDefaultGranularity??n.defaultResponseGranularity:this.granularity=n.defaultResponseGranularity}startDate(){return this.calculateStartDate(this.timeframe.isRelative,this.granularity)}endDate(){return Kt(this.timeframe.rawEnd(),this.granularity,this.tz)}granularityMs(){return Ge[this.granularity]}}class ko extends dt{startDate(){return this.calculateStartDate(this.timeframe.isRelative,this.dataGranularity)}endDate(){return Kt(this.timeframe.rawEnd(this.tz),this.dataGranularity,this.tz)}granularityMs(){return this.endDate().getTime()-this.startDate().getTime()}}class pd extends ko{startDate(){return this.calculateStartDate(this.timeframe.isRelative,this.dataGranularity,2)}granularityMs(){return this.endDate().getTime()-super.startDate().getTime()}}var ft=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ht={exports:{}};ht.exports,function(e,t){var n=200,r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",s="[object Array]",c="[object Boolean]",l="[object Date]",h="[object Error]",w="[object Function]",p="[object GeneratorFunction]",g="[object Map]",b="[object Number]",k="[object Object]",P="[object Promise]",W="[object RegExp]",V="[object Set]",D="[object String]",T="[object Symbol]",$="[object WeakMap]",We="[object ArrayBuffer]",oe="[object DataView]",pt="[object Float32Array]",Eo="[object Float64Array]",Mo="[object Int8Array]",Io="[object Int16Array]",Zo="[object Int32Array]",$o="[object Uint8Array]",Po="[object Uint8ClampedArray]",No="[object Uint16Array]",Co="[object Uint32Array]",Id=/[\\^$.*+?()[\]{}|]/g,Zd=/\w*$/,$d=/^\[object .+?Constructor\]$/,Pd=/^(?:0|[1-9]\d*)$/,S={};S[i]=S[s]=S[We]=S[oe]=S[c]=S[l]=S[pt]=S[Eo]=S[Mo]=S[Io]=S[Zo]=S[g]=S[b]=S[k]=S[W]=S[V]=S[D]=S[T]=S[$o]=S[Po]=S[No]=S[Co]=!0,S[h]=S[w]=S[$]=!1;var Nd=typeof ft=="object"&&ft&&ft.Object===Object&&ft,Cd=typeof self=="object"&&self&&self.Object===Object&&self,K=Nd||Cd||Function("return this")(),Ro=t&&!t.nodeType&&t,xo=Ro&&!0&&e&&!e.nodeType&&e,Rd=xo&&xo.exports===Ro;function xd(a,u){return a.set(u[0],u[1]),a}function Ad(a,u){return a.add(u),a}function Fd(a,u){for(var f=-1,_=a?a.length:0;++f<_&&u(a[f],f,a)!==!1;);return a}function jd(a,u){for(var f=-1,_=u.length,A=a.length;++f<_;)a[A+f]=u[f];return a}function Ao(a,u,f,_){for(var A=-1,U=a?a.length:0;++A<U;)f=u(f,a[A],A,a);return f}function Ud(a,u){for(var f=-1,_=Array(a);++f<a;)_[f]=u(f);return _}function Yd(a,u){return a==null?void 0:a[u]}function Fo(a){var u=!1;if(a!=null&&typeof a.toString!="function")try{u=!!(a+"")}catch{}return u}function jo(a){var u=-1,f=Array(a.size);return a.forEach(function(_,A){f[++u]=[A,_]}),f}function en(a,u){return function(f){return a(u(f))}}function Uo(a){var u=-1,f=Array(a.size);return a.forEach(function(_){f[++u]=_}),f}var Ld=Array.prototype,Gd=Function.prototype,gt=Object.prototype,tn=K["__core-js_shared__"],Yo=function(){var a=/[^.]+$/.exec(tn&&tn.keys&&tn.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}(),Lo=Gd.toString,ie=gt.hasOwnProperty,_t=gt.toString,Wd=RegExp("^"+Lo.call(ie).replace(Id,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Go=Rd?K.Buffer:void 0,Wo=K.Symbol,qo=K.Uint8Array,qd=en(Object.getPrototypeOf,Object),Hd=Object.create,Vd=gt.propertyIsEnumerable,Bd=Ld.splice,Ho=Object.getOwnPropertySymbols,Xd=Go?Go.isBuffer:void 0,Qd=en(Object.keys,Object),nn=Me(K,"DataView"),qe=Me(K,"Map"),rn=Me(K,"Promise"),on=Me(K,"Set"),an=Me(K,"WeakMap"),He=Me(Object,"create"),Kd=we(nn),Jd=we(qe),ef=we(rn),tf=we(on),nf=we(an),Vo=Wo?Wo.prototype:void 0,Bo=Vo?Vo.valueOf:void 0;function _e(a){var u=-1,f=a?a.length:0;for(this.clear();++u<f;){var _=a[u];this.set(_[0],_[1])}}function rf(){this.__data__=He?He(null):{}}function of(a){return this.has(a)&&delete this.__data__[a]}function af(a){var u=this.__data__;if(He){var f=u[a];return f===r?void 0:f}return ie.call(u,a)?u[a]:void 0}function sf(a){var u=this.__data__;return He?u[a]!==void 0:ie.call(u,a)}function uf(a,u){var f=this.__data__;return f[a]=He&&u===void 0?r:u,this}_e.prototype.clear=rf,_e.prototype.delete=of,_e.prototype.get=af,_e.prototype.has=sf,_e.prototype.set=uf;function J(a){var u=-1,f=a?a.length:0;for(this.clear();++u<f;){var _=a[u];this.set(_[0],_[1])}}function cf(){this.__data__=[]}function lf(a){var u=this.__data__,f=yt(u,a);if(f<0)return!1;var _=u.length-1;return f==_?u.pop():Bd.call(u,f,1),!0}function df(a){var u=this.__data__,f=yt(u,a);return f<0?void 0:u[f][1]}function ff(a){return yt(this.__data__,a)>-1}function hf(a,u){var f=this.__data__,_=yt(f,a);return _<0?f.push([a,u]):f[_][1]=u,this}J.prototype.clear=cf,J.prototype.delete=lf,J.prototype.get=df,J.prototype.has=ff,J.prototype.set=hf;function Se(a){var u=-1,f=a?a.length:0;for(this.clear();++u<f;){var _=a[u];this.set(_[0],_[1])}}function mf(){this.__data__={hash:new _e,map:new(qe||J),string:new _e}}function pf(a){return wt(this,a).delete(a)}function gf(a){return wt(this,a).get(a)}function _f(a){return wt(this,a).has(a)}function yf(a,u){return wt(this,a).set(a,u),this}Se.prototype.clear=mf,Se.prototype.delete=pf,Se.prototype.get=gf,Se.prototype.has=_f,Se.prototype.set=yf;function Ee(a){this.__data__=new J(a)}function wf(){this.__data__=new J}function vf(a){return this.__data__.delete(a)}function bf(a){return this.__data__.get(a)}function Tf(a){return this.__data__.has(a)}function zf(a,u){var f=this.__data__;if(f instanceof J){var _=f.__data__;if(!qe||_.length<n-1)return _.push([a,u]),this;f=this.__data__=new Se(_)}return f.set(a,u),this}Ee.prototype.clear=wf,Ee.prototype.delete=vf,Ee.prototype.get=bf,Ee.prototype.has=Tf,Ee.prototype.set=zf;function Df(a,u){var f=cn(a)||Vf(a)?Ud(a.length,String):[],_=f.length,A=!!_;for(var U in a)ie.call(a,U)&&!(A&&(U=="length"||Gf(U,_)))&&f.push(U);return f}function Xo(a,u,f){var _=a[u];(!(ie.call(a,u)&&ei(_,f))||f===void 0&&!(u in a))&&(a[u]=f)}function yt(a,u){for(var f=a.length;f--;)if(ei(a[f][0],u))return f;return-1}function kf(a,u){return a&&Qo(u,ln(u),a)}function sn(a,u,f,_,A,U,ee){var Y;if(_&&(Y=U?_(a,A,U,ee):_(a)),Y!==void 0)return Y;if(!vt(a))return a;var ri=cn(a);if(ri){if(Y=Uf(a),!u)return Af(a,Y)}else{var Ie=ye(a),oi=Ie==w||Ie==p;if(Xf(a))return Zf(a,u);if(Ie==k||Ie==i||oi&&!U){if(Fo(a))return U?a:{};if(Y=Yf(oi?{}:a),!u)return Ff(a,kf(Y,a))}else{if(!S[Ie])return U?a:{};Y=Lf(a,Ie,sn,u)}}ee||(ee=new Ee);var ii=ee.get(a);if(ii)return ii;if(ee.set(a,Y),!ri)var ai=f?jf(a):ln(a);return Fd(ai||a,function(dn,bt){ai&&(bt=dn,dn=a[bt]),Xo(Y,bt,sn(dn,u,f,_,bt,a,ee))}),Y}function Of(a){return vt(a)?Hd(a):{}}function Sf(a,u,f){var _=u(a);return cn(a)?_:jd(_,f(a))}function Ef(a){return _t.call(a)}function Mf(a){if(!vt(a)||qf(a))return!1;var u=ni(a)||Fo(a)?Wd:$d;return u.test(we(a))}function If(a){if(!Jo(a))return Qd(a);var u=[];for(var f in Object(a))ie.call(a,f)&&f!="constructor"&&u.push(f);return u}function Zf(a,u){if(u)return a.slice();var f=new a.constructor(a.length);return a.copy(f),f}function un(a){var u=new a.constructor(a.byteLength);return new qo(u).set(new qo(a)),u}function $f(a,u){var f=u?un(a.buffer):a.buffer;return new a.constructor(f,a.byteOffset,a.byteLength)}function Pf(a,u,f){var _=u?f(jo(a),!0):jo(a);return Ao(_,xd,new a.constructor)}function Nf(a){var u=new a.constructor(a.source,Zd.exec(a));return u.lastIndex=a.lastIndex,u}function Cf(a,u,f){var _=u?f(Uo(a),!0):Uo(a);return Ao(_,Ad,new a.constructor)}function Rf(a){return Bo?Object(Bo.call(a)):{}}function xf(a,u){var f=u?un(a.buffer):a.buffer;return new a.constructor(f,a.byteOffset,a.length)}function Af(a,u){var f=-1,_=a.length;for(u||(u=Array(_));++f<_;)u[f]=a[f];return u}function Qo(a,u,f,_){f||(f={});for(var A=-1,U=u.length;++A<U;){var ee=u[A],Y=void 0;Xo(f,ee,Y===void 0?a[ee]:Y)}return f}function Ff(a,u){return Qo(a,Ko(a),u)}function jf(a){return Sf(a,ln,Ko)}function wt(a,u){var f=a.__data__;return Wf(u)?f[typeof u=="string"?"string":"hash"]:f.map}function Me(a,u){var f=Yd(a,u);return Mf(f)?f:void 0}var Ko=Ho?en(Ho,Object):Jf,ye=Ef;(nn&&ye(new nn(new ArrayBuffer(1)))!=oe||qe&&ye(new qe)!=g||rn&&ye(rn.resolve())!=P||on&&ye(new on)!=V||an&&ye(new an)!=$)&&(ye=function(a){var u=_t.call(a),f=u==k?a.constructor:void 0,_=f?we(f):void 0;if(_)switch(_){case Kd:return oe;case Jd:return g;case ef:return P;case tf:return V;case nf:return $}return u});function Uf(a){var u=a.length,f=a.constructor(u);return u&&typeof a[0]=="string"&&ie.call(a,"index")&&(f.index=a.index,f.input=a.input),f}function Yf(a){return typeof a.constructor=="function"&&!Jo(a)?Of(qd(a)):{}}function Lf(a,u,f,_){var A=a.constructor;switch(u){case We:return un(a);case c:case l:return new A(+a);case oe:return $f(a,_);case pt:case Eo:case Mo:case Io:case Zo:case $o:case Po:case No:case Co:return xf(a,_);case g:return Pf(a,_,f);case b:case D:return new A(a);case W:return Nf(a);case V:return Cf(a,_,f);case T:return Rf(a)}}function Gf(a,u){return u=u??o,!!u&&(typeof a=="number"||Pd.test(a))&&a>-1&&a%1==0&&a<u}function Wf(a){var u=typeof a;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?a!=="__proto__":a===null}function qf(a){return!!Yo&&Yo in a}function Jo(a){var u=a&&a.constructor,f=typeof u=="function"&&u.prototype||gt;return a===f}function we(a){if(a!=null){try{return Lo.call(a)}catch{}try{return a+""}catch{}}return""}function Hf(a){return sn(a,!0,!0)}function ei(a,u){return a===u||a!==a&&u!==u}function Vf(a){return Bf(a)&&ie.call(a,"callee")&&(!Vd.call(a,"callee")||_t.call(a)==i)}var cn=Array.isArray;function ti(a){return a!=null&&Qf(a.length)&&!ni(a)}function Bf(a){return Kf(a)&&ti(a)}var Xf=Xd||eh;function ni(a){var u=vt(a)?_t.call(a):"";return u==w||u==p}function Qf(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=o}function vt(a){var u=typeof a;return!!a&&(u=="object"||u=="function")}function Kf(a){return!!a&&typeof a=="object"}function ln(a){return ti(a)?Df(a):If(a)}function Jf(){return[]}function eh(){return!1}e.exports=Hf}(ht,ht.exports);var _d=ht.exports;const yd=gd(_d),Oe=(e,t)=>new Date(e.getTime()-bo(t,e));class G{constructor(t){C(this,"timeframeText");C(this,"key");C(this,"display");C(this,"timeframeLength");C(this,"allowedTiers");C(this,"defaultResponseGranularity");C(this,"dataGranularity");C(this,"isRelative");C(this,"fineGrainedDefaultGranularity");C(this,"_startCustom");C(this,"_endCustom");C(this,"_allowedGranularitiesOverride");this.display=t.display,this.timeframeText=t.timeframeText,this.key=t.key,this.timeframeLength=t.timeframeLength,this.allowedTiers=t.allowedTiers,this.defaultResponseGranularity=t.defaultResponseGranularity,this.dataGranularity=t.dataGranularity,this.isRelative=t.isRelative,this._startCustom=t.startCustom,this._endCustom=t.endCustom,this._allowedGranularitiesOverride=t.allowedGranularitiesOverride,this.fineGrainedDefaultGranularity=t.fineGrainedDefaultGranularity}rawEnd(t){return this._endCustom||new Date}rawStart(t){return this._startCustom||new Date(this.rawEnd().getTime()-this.timeframeLengthMs())}timeframeLengthMs(){return this.timeframeLength()*1e3}maximumTimeframeLength(){return this.timeframeLength()}allowedGranularities(t){if(this._allowedGranularitiesOverride&&t)return new Set(this._allowedGranularitiesOverride);const n=new Set,r=this.maximumTimeframeLength()/3600;return r<=6&&n.add("minutely"),r>=2&&r<=7*24&&n.add("hourly"),r>=2*24&&n.add("daily"),r>=2*24*14&&n.add("weekly"),n}cacheKey(){return this.key!=="custom"?this.key:`${this.rawStart().toISOString()}-${this.rawEnd().toISOString()}`}v4Query(t){return this.key==="custom"?{type:"absolute",start:this.rawStart(),end:this.rawEnd(),tz:t}:{type:"relative",time_range:this.key,tz:t}}tzAdjustedDate(t){if(!t)return new Date;const n=cd(new Date,new Intl.DateTimeFormat().resolvedOptions().timeZone);return vo(n,t)}}class wd extends G{rawStart(t){let n=Q(this.tzAdjustedDate(t),{weekStartsOn:1});return t&&(n=Oe(n,t)),n}maximumTimeframeLength(){return 60*60*24*7}}class vd extends G{rawStart(t){let n=ze(this.tzAdjustedDate(t));return t&&(n=Oe(n,t)),n}maximumTimeframeLength(){return 60*60*24*31}}class bd extends G{rawEnd(t){let n=Q(this.tzAdjustedDate(t),{weekStartsOn:1});return t&&(n=Oe(n,t)),n}rawStart(t){const n=this.tzAdjustedDate(t);let r=Q(n.setDate(n.getDate()-7),{weekStartsOn:1});return t&&(r=Oe(r,t)),r}}class Td extends G{rawEnd(t){let n=ze(this.tzAdjustedDate(t));return t&&(n=Oe(n,t)),n}rawStart(t){let n=ze(io(this.tzAdjustedDate(t)));return t&&(n=Oe(n,t)),n}}const Oo=new Map([[v.FIFTEEN_MIN,new G({key:v.FIFTEEN_MIN,display:"Last 15 minutes",timeframeText:"15 minutes",timeframeLength:()=>60*15,defaultResponseGranularity:"minutely",dataGranularity:"minutely",isRelative:!0,fineGrainedDefaultGranularity:"thirtySecondly",allowedTiers:["free","trial","plus","enterprise"],allowedGranularitiesOverride:["tenSecondly","thirtySecondly","minutely"]})],[v.ONE_HOUR,new G({key:v.ONE_HOUR,display:"Last hour",timeframeText:"One hour",timeframeLength:()=>60*60*1,defaultResponseGranularity:"minutely",dataGranularity:"minutely",isRelative:!0,fineGrainedDefaultGranularity:"minutely",allowedTiers:["free","trial","plus","enterprise"],allowedGranularitiesOverride:["tenSecondly","thirtySecondly","minutely","fiveMinutely","tenMinutely"]})],[v.SIX_HOUR,new G({key:v.SIX_HOUR,display:"Last 6 hours",timeframeText:"6 hours",timeframeLength:()=>60*60*6,defaultResponseGranularity:"hourly",dataGranularity:"hourly",isRelative:!0,fineGrainedDefaultGranularity:"fiveMinutely",allowedTiers:["free","trial","plus","enterprise"],allowedGranularitiesOverride:["thirtySecondly","minutely","fiveMinutely","tenMinutely","thirtyMinutely","hourly"]})],[v.TWELVE_HOUR,new G({key:v.TWELVE_HOUR,display:"Last 12 hours",timeframeText:"12 hours",timeframeLength:()=>60*60*12,defaultResponseGranularity:"hourly",dataGranularity:"hourly",isRelative:!0,fineGrainedDefaultGranularity:"tenMinutely",allowedTiers:["free","trial","plus","enterprise"],allowedGranularitiesOverride:["minutely","fiveMinutely","tenMinutely","thirtyMinutely","hourly"]})],[v.ONE_DAY,new G({key:v.ONE_DAY,display:"Last 24 hours",timeframeText:"24 hours",timeframeLength:()=>60*60*24,defaultResponseGranularity:"hourly",dataGranularity:"hourly",isRelative:!0,fineGrainedDefaultGranularity:"thirtyMinutely",allowedTiers:["free","trial","plus","enterprise"],allowedGranularitiesOverride:["fiveMinutely","tenMinutely","thirtyMinutely","hourly"]})],[v.SEVEN_DAY,new G({key:v.SEVEN_DAY,display:"Last 7 days",timeframeText:"7 days",timeframeLength:()=>60*60*24*7,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!0,fineGrainedDefaultGranularity:"twoHourly",allowedTiers:["trial","plus","enterprise"],allowedGranularitiesOverride:["thirtyMinutely","hourly","twoHourly","twelveHourly","daily"]})],[v.THIRTY_DAY,new G({key:v.THIRTY_DAY,display:"Last 30 days",timeframeText:"30 days",timeframeLength:()=>60*60*24*30,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!0,fineGrainedDefaultGranularity:"twelveHourly",allowedTiers:["trial","plus","enterprise"],allowedGranularitiesOverride:["hourly","twoHourly","twelveHourly","daily","weekly"]})],[v.CURRENT_WEEK,new wd({key:v.CURRENT_WEEK,display:"This week",timeframeText:"Week",timeframeLength:()=>{const e=Q(new Date,{weekStartsOn:1});return(ut(Hr(new Date,1)).getTime()-e.getTime())/1e3},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,fineGrainedDefaultGranularity:"twoHourly",allowedTiers:["plus","enterprise"],allowedGranularitiesOverride:["thirtyMinutely","hourly","twoHourly","twelveHourly","daily"]})],[v.CURRENT_MONTH,new vd({key:v.CURRENT_MONTH,display:"This month",timeframeText:"Month",timeframeLength:()=>{const e=ze(new Date);return(ut(Hr(new Date,1)).getTime()-e.getTime())/1e3},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]})],[v.PREVIOUS_WEEK,new bd({key:v.PREVIOUS_WEEK,display:"Previous week",timeframeText:"Week",timeframeLength:()=>60*60*24*7,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,fineGrainedDefaultGranularity:"twoHourly",allowedTiers:["plus","enterprise"],allowedGranularitiesOverride:["thirtyMinutely","hourly","twoHourly","twelveHourly","daily"]})],[v.PREVIOUS_MONTH,new Td({key:v.PREVIOUS_MONTH,display:"Previous month",timeframeText:"Month",timeframeLength:()=>{let e=0;const t=ze(new Date),n=ze(io(new Date));return t.getTimezoneOffset()!==n.getTimezoneOffset()&&(e=So(t,n)),60*60*24*$l(new Date().setMonth(new Date().getMonth()-1))+Nl(e)},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]})]]);function zd(e){const t=new Date(e.start),n=new Date(e.end),r=(n.getTime()-t.getTime())/1e3;return e.timePeriodsKey&&yd(Oo.get(e.timePeriodsKey))||new G({key:"custom",timeframeText:"custom",display:"custom",startCustom:t,endCustom:n,timeframeLength:()=>r,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["free","plus","enterprise"]})}function Dd(e){return{...e.key!=="custom"&&{timePeriodsKey:e.key},start:e.rawStart(),end:e.rawEnd()}}function kd(e){return{key:e.key,display:e.display,timeframeText:e.timeframeText,timeframeLength:()=>e.key,start:()=>e.rawStart(),end:()=>e.rawEnd()}}function So(e,t){return Cl(e.getTimezoneOffset()-t.getTimezoneOffset())}const Od={"15M":v.FIFTEEN_MIN,"1H":v.ONE_HOUR,"6H":v.SIX_HOUR,"12H":v.TWELVE_HOUR,"24H":v.ONE_DAY,"7D":v.SEVEN_DAY,"15m":v.FIFTEEN_MIN,"1h":v.ONE_HOUR,"6h":v.SIX_HOUR,"12h":v.TWELVE_HOUR,"24h":v.ONE_DAY,"7d":v.SEVEN_DAY,"30d":v.THIRTY_DAY,current_week:v.CURRENT_WEEK,current_month:v.CURRENT_MONTH,previous_week:v.PREVIOUS_WEEK,previous_month:v.PREVIOUS_MONTH};class mt{constructor(t){C(this,"_seed");this._seed=t}next(t,n){const r=Math.sin(this._seed++)*1e4,o=r-Math.floor(r);return Math.floor(o*(n-t+1))+t}}const Sd=(e,t,n)=>{const r=Jt(10,1e4),o=new mt(r),i=Date.now()-6*60*60*1e3,s=Date.now(),c=[];let l=0;for(let p=i;p<=s;p+=60*60*1e3)if(t)for(const g in t)t[g].forEach(b=>{l+=o.next(50,500);const k={[g]:b,[e.name]:l},P={version:"1.0",timestamp:new Date(p).toISOString(),event:k};c.push(P)});else{l+=o.next(50,500);const g={version:"1.0",timestamp:new Date(p).toISOString(),event:{[e.name]:l}};c.push(g)}const h={};if(t)for(const p in t)h[p]={},t[p].forEach(g=>{h[p][g]={name:g,deleted:!1}});const w={start_ms:i,end_ms:s,start:new Date(i).toISOString(),end:new Date(s).toISOString(),query_id:"12345",metric_names:[e.name],metric_units:{[e.name]:e.unit},granularity_ms:60*60*1e3,display:h,...n??{}};return{data:c,meta:w}},Ed=(e,t)=>{const n=Jt(10,1e4),r=new mt(n),o=Date.now()-6*60*60*1e3,i=Date.now(),s=[],c={};e.forEach(h=>{c[h.name]=0});for(let h=o;h<=i;h+=60*60*1e3){const w={};e.forEach(g=>{c[g.name]+=r.next(50,500),w[g.name]=c[g.name]});const p={version:"1.0",timestamp:new Date(h).toISOString(),event:w};s.push(p)}const l={start_ms:o,end_ms:i,start:new Date(o).toISOString(),end:new Date(i).toISOString(),query_id:"12345",metric_names:e.map(h=>h.name),metric_units:e.reduce((h,w)=>(h[w.name]=w.unit,h),{}),granularity_ms:60*60*1e3,display:{},...t??{}};return{data:s,meta:l}},Md=(e,t,n)=>{const r=Math.floor(Math.random()*9991)+10,o=new mt(r),i=Date.now()-6*60*60*1e3,s=Date.now(),c=new Date((i+s)/2).toISOString(),l=[];if(t){const p=Object.keys(t),g=Object.values(t),b=(k,P)=>{if(P===p.length){e.forEach(W=>{k[W.name]=o.next(1e3,5e7)}),l.push({version:"1.0",timestamp:new Date().toISOString(),event:{...k}});return}g[P].forEach(W=>{b({...k,[p[P]]:W},P+1)})};b({},0)}else{const p={};e.forEach(g=>{p[g.name]=o.next(50,500)}),l.push({version:"1.0",timestamp:c,event:p})}const h={};if(t)for(const p in t)h[p]={},t[p].forEach(g=>{h[p][g]={name:g,deleted:!1}});const w={start_ms:i,end_ms:s,start:new Date(i).toISOString(),end:new Date(s).toISOString(),query_id:"12345",metric_names:e.map(p=>p.name),metric_units:e.reduce((p,g)=>(p[g.name]=g.unit,p),{}),truncated:!1,limit:50,display:h,granularity_ms:s-i,...n??{}};return{data:l,meta:w}};function Jt(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1)+e)}m.DeltaQueryTime=pd,m.Granularities=Ge,m.REFRESH_INTERVAL_MS=3e4,m.SeededRandom=mt,m.TIMEFRAME_LOOKUP=Od,m.TimePeriods=Oo,m.Timeframe=G,m.TimeframeKeys=v,m.TimeseriesQueryTime=md,m.UnaryQueryTime=ko,m.aiExploreAggregations=Ot,m.basicExploreAggregations=Be,m.ceilToNearestTimeGrain=Kt,m.dashboardTileTypes=wc,m.dashboardsSchemaV1=yi,m.datasourceToFilterableDimensions=_n,m.datePickerSelectionToTimeframe=zd,m.dstOffsetHours=So,m.exploreAggregations=kt,m.exploreFilterTypesV2=Tt,m.filterableAiExploreDimensions=ue,m.filterableBasicExploreDimensions=ae,m.filterableExploreDimensions=se,m.filterableRequestDimensions=hn,m.filterableRequestMetrics=gn,m.filterableRequestWildcardDimensions=fi,m.floorToNearestTimeGrain=Do,m.formatISOTimeWithTZ=ld,m.formatTime=Qt,m.formatTimeRange=dd,m.generateCrossSectionalData=Md,m.generateMultipleMetricTimeSeriesData=Ed,m.generateSingleMetricTimeSeriesData=Sd,m.getFieldDataSources=Dc,m.granularitiesToOptions=fd,m.granularityMsToQuery=To,m.granularityValues=Ve,m.msToGranularity=hd,m.parseDashboardConfig=zc,m.queryDatasources=mi,m.queryableAiExploreDimensions=Qe,m.queryableBasicExploreDimensions=$e,m.queryableExploreDimensions=Xe,m.queryableRequestDimensions=fn,m.queryableRequestMetrics=pn,m.queryableRequestWildcardDimensions=mn,m.rand=Jt,m.relativeTimeRangeValuesRequestV2=hi,m.relativeTimeRangeValuesV4=Dt,m.reportChartTypes=si,m.requestFilterTypeEmptyV2=zt,m.requestFilterTypeEqualsV2=ui,m.requestFilterTypeMetricV2=ci,m.requestFilterTypeWildcardV2=li,m.stripUnknownFilters=pi,m.timeRangeTypeV2=di,m.timeframeToDatepickerSelection=Dd,m.timeframeToDatepickerTimeperiod=kd,m.zApiUsageQuery=xr,m.zBarChartSchema=Ir,m.zBasicQuery=Ar,m.zDashboardConfig=Gr,m.zDonutChartSchema=Pr,m.zGaugeChartSchema=$r,m.zLlmUsageQuery=Fr,m.zMetricCardSchema=Cr,m.zSingleValueSchema=Rr,m.zSlottableSchema=Mr,m.zTileConfig=Lr,m.zTileDefinition=Ur,m.zTileLayout=Yr,m.zTimeseriesChartSchema=Zr,m.zTopNTableSchema=Nr,m.zValidDashboardQuery=jr,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})});
18
+ `)}g.write("payload.value = newResult;"),g.write("return payload;");const V=g.compile();return(D,T)=>V(p,D,T)};let o;const i=Pt,s=!Cn.jitless,l=s&&Ti.value,h=t.catchall;let w;e._zod.parse=(p,g)=>{w??(w=n.value);const b=p.value;if(!i(b))return p.issues.push({expected:"object",code:"invalid_type",input:b,inst:e}),p;const k=[];if(s&&l&&(g==null?void 0:g.async)===!1&&g.jitless!==!0)o||(o=r(t.shape)),p=o(p,g);else{p.value={};const T=w.shape;for(const $ of w.keys){const oe=T[$]._zod.run({value:b[$],issues:[]},g);oe instanceof Promise?k.push(oe.then(pt=>tt(pt,p,$,b))):tt(oe,p,$,b)}}if(!h)return k.length?Promise.all(k).then(()=>p):p;const P=[],W=w.keySet,V=h._zod,D=V.def.type;for(const T of Object.keys(b)){if(W.has(T))continue;if(D==="never"){P.push(T);continue}const $=V.run({value:b[T],issues:[]},g);$ instanceof Promise?k.push($.then(We=>tt(We,p,T,b))):tt($,p,T,b)}return P.length&&p.issues.push({code:"unrecognized_keys",keys:P,input:b,inst:e}),k.length?Promise.all(k).then(()=>p):p}});function nr(e,t,n,r){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const o=e.filter(i=>!Re(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(s=>ne(s,r,te())))}),t)}const os=d("$ZodUnion",(e,t)=>{E.init(e,t),O(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),O(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),O(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),O(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>$t(i.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(n)return r(o,i);let s=!1;const c=[];for(const l of t.options){const h=l._zod.run({value:o.value,issues:[]},i);if(h instanceof Promise)c.push(h),s=!0;else{if(h.issues.length===0)return h;c.push(h)}}return s?Promise.all(c).then(l=>nr(l,o,e,i)):nr(c,o,e,i)}}),is=d("$ZodIntersection",(e,t)=>{E.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,i=t.left._zod.run({value:o,issues:[]},r),s=t.right._zod.run({value:o,issues:[]},r);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([l,h])=>rr(n,l,h)):rr(n,i,s)}});function Rt(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ce(e)&&Ce(t)){const n=Object.keys(t),r=Object.keys(e).filter(i=>n.indexOf(i)!==-1),o={...e,...t};for(const i of r){const s=Rt(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=e[r],i=t[r],s=Rt(o,i);if(!s.valid)return{valid:!1,mergeErrorPath:[r,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function rr(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),Re(e))return e;const r=Rt(t.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const as=d("$ZodRecord",(e,t)=>{E.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Ce(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),n;const i=[];if(t.keyType._zod.values){const s=t.keyType._zod.values;n.value={};for(const l of s)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){const h=t.valueType._zod.run({value:o[l],issues:[]},r);h instanceof Promise?i.push(h.then(w=>{w.issues.length&&n.issues.push(...Te(l,w.issues)),n.value[l]=w.value})):(h.issues.length&&n.issues.push(...Te(l,h.issues)),n.value[l]=h.value)}let c;for(const l in o)s.has(l)||(c=c??[],c.push(l));c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:c})}else{n.value={};for(const s of Reflect.ownKeys(o)){if(s==="__proto__")continue;const c=t.keyType._zod.run({value:s,issues:[]},r);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(c.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(h=>ne(h,r,te())),input:s,path:[s],inst:e}),n.value[c.value]=c.value;continue}const l=t.valueType._zod.run({value:o[s],issues:[]},r);l instanceof Promise?i.push(l.then(h=>{h.issues.length&&n.issues.push(...Te(s,h.issues)),n.value[c.value]=h.value})):(l.issues.length&&n.issues.push(...Te(s,l.issues)),n.value[c.value]=l.value)}}return i.length?Promise.all(i).then(()=>n):n}}),ss=d("$ZodEnum",(e,t)=>{E.init(e,t);const n=wi(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>zi.has(typeof o)).map(o=>typeof o=="string"?be(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{const s=o.value;return r.has(s)||o.issues.push({code:"invalid_value",values:n,input:s,inst:e}),o}}),us=d("$ZodLiteral",(e,t)=>{if(E.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?be(n):n?be(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,r)=>{const o=n.value;return e._zod.values.has(o)||n.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),n}}),cs=d("$ZodTransform",(e,t)=>{E.init(e,t),e._zod.parse=(n,r)=>{const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(n.value=s,n));if(o instanceof Promise)throw new Ne;return n.value=o,n}});function or(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const ls=d("$ZodOptional",(e,t)=>{E.init(e,t),e._zod.optin="optional",e._zod.optout="optional",O(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),O(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${$t(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>or(i,n.value)):or(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),ds=d("$ZodNullable",(e,t)=>{E.init(e,t),O(e._zod,"optin",()=>t.innerType._zod.optin),O(e._zod,"optout",()=>t.innerType._zod.optout),O(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${$t(n.source)}|null)$`):void 0}),O(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),fs=d("$ZodDefault",(e,t)=>{E.init(e,t),e._zod.optin="optional",O(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>ir(i,t)):ir(o,t)}});function ir(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const hs=d("$ZodPrefault",(e,t)=>{E.init(e,t),e._zod.optin="optional",O(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),ms=d("$ZodNonOptional",(e,t)=>{E.init(e,t),O(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>ar(i,e)):ar(o,e)}});function ar(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const ps=d("$ZodCatch",(e,t)=>{E.init(e,t),O(e._zod,"optin",()=>t.innerType._zod.optin),O(e._zod,"optout",()=>t.innerType._zod.optout),O(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(s=>ne(s,r,te()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(i=>ne(i,r,te()))},input:n.value}),n.issues=[]),n)}}),gs=d("$ZodPipe",(e,t)=>{E.init(e,t),O(e._zod,"values",()=>t.in._zod.values),O(e._zod,"optin",()=>t.in._zod.optin),O(e._zod,"optout",()=>t.out._zod.optout),O(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(i=>sr(i,t,r)):sr(o,t,r)}});function sr(e,t,n){return e.issues.length?e:t.out._zod.run({value:e.value,issues:e.issues},n)}const _s=d("$ZodReadonly",(e,t)=>{E.init(e,t),O(e._zod,"propValues",()=>t.innerType._zod.propValues),O(e._zod,"values",()=>t.innerType._zod.values),O(e._zod,"optin",()=>t.innerType._zod.optin),O(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(ur):ur(o)}});function ur(e){return e.value=Object.freeze(e.value),e}const ys=d("$ZodCustom",(e,t)=>{j.init(e,t),E.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(i=>cr(i,n,r,e));cr(o,n,r,e)}});function cr(e,t,n,r){if(!e){const o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(xe(o))}}class ws{constructor(){this._map=new Map,this._idmap=new Map}add(t,...n){const r=n[0];if(this._map.set(t,r),r&&typeof r=="object"&&"id"in r){if(this._idmap.has(r.id))throw new Error(`ID ${r.id} already exists in the registry`);this._idmap.set(r.id,t)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function vs(){return new ws}const nt=vs();function bs(e,t){return new e({type:"string",...y(t)})}function Ts(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...y(t)})}function lr(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...y(t)})}function zs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...y(t)})}function Ds(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...y(t)})}function ks(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...y(t)})}function Os(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...y(t)})}function Ss(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...y(t)})}function Es(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...y(t)})}function Ms(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...y(t)})}function Is(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...y(t)})}function Zs(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...y(t)})}function $s(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...y(t)})}function Ps(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...y(t)})}function Ns(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...y(t)})}function Cs(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...y(t)})}function Rs(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...y(t)})}function xs(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...y(t)})}function As(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...y(t)})}function Fs(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...y(t)})}function js(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...y(t)})}function Us(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...y(t)})}function Ys(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...y(t)})}function Ls(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...y(t)})}function Gs(e,t){return new e({type:"string",format:"date",check:"string_format",...y(t)})}function Ws(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...y(t)})}function qs(e,t){return new e({type:"string",format:"duration",check:"string_format",...y(t)})}function Hs(e,t){return new e({type:"number",checks:[],...y(t)})}function Vs(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...y(t)})}function Bs(e,t){return new e({type:"boolean",...y(t)})}function Xs(e,t){return new e({type:"null",...y(t)})}function Qs(e){return new e({type:"unknown"})}function Ks(e,t){return new e({type:"never",...y(t)})}function dr(e,t){return new Qn({check:"less_than",...y(t),value:e,inclusive:!1})}function xt(e,t){return new Qn({check:"less_than",...y(t),value:e,inclusive:!0})}function fr(e,t){return new Kn({check:"greater_than",...y(t),value:e,inclusive:!1})}function At(e,t){return new Kn({check:"greater_than",...y(t),value:e,inclusive:!0})}function hr(e,t){return new fa({check:"multiple_of",...y(t),value:e})}function mr(e,t){return new ma({check:"max_length",...y(t),maximum:e})}function rt(e,t){return new pa({check:"min_length",...y(t),minimum:e})}function pr(e,t){return new ga({check:"length_equals",...y(t),length:e})}function Js(e,t){return new _a({check:"string_format",format:"regex",...y(t),pattern:e})}function eu(e){return new ya({check:"string_format",format:"lowercase",...y(e)})}function tu(e){return new wa({check:"string_format",format:"uppercase",...y(e)})}function nu(e,t){return new va({check:"string_format",format:"includes",...y(t),includes:e})}function ru(e,t){return new ba({check:"string_format",format:"starts_with",...y(t),prefix:e})}function ou(e,t){return new Ta({check:"string_format",format:"ends_with",...y(t),suffix:e})}function Ae(e){return new za({check:"overwrite",tx:e})}function iu(e){return Ae(t=>t.normalize(e))}function au(){return Ae(e=>e.trim())}function su(){return Ae(e=>e.toLowerCase())}function uu(){return Ae(e=>e.toUpperCase())}function cu(e,t,n){return new e({type:"array",element:t,...y(n)})}function lu(e,t,n){return new e({type:"custom",check:"custom",fn:t,...y(n)})}function du(e){const t=fu(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(xe(r,n.value,t._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(xe(o))}},e(n.value,n)));return t}function fu(e,t){const n=new j({check:"custom",...y(t)});return n._zod.check=e,n}const hu=d("ZodISODateTime",(e,t)=>{xa.init(e,t),Z.init(e,t)});function mu(e){return Ls(hu,e)}const pu=d("ZodISODate",(e,t)=>{Aa.init(e,t),Z.init(e,t)});function gu(e){return Gs(pu,e)}const _u=d("ZodISOTime",(e,t)=>{Fa.init(e,t),Z.init(e,t)});function yu(e){return Ws(_u,e)}const wu=d("ZodISODuration",(e,t)=>{ja.init(e,t),Z.init(e,t)});function vu(e){return qs(wu,e)}const ot=d("ZodError",(e,t)=>{Yn.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Pi(e,n)},flatten:{value:n=>$i(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,It,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,It,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),bu=Ni(ot),Tu=Ci(ot),zu=Gn(ot),Du=Wn(ot),I=d("ZodType",(e,t)=>(E.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),e.clone=(n,r)=>de(e,n,r),e.brand=()=>e,e.register=(n,r)=>(n.add(e,r),e),e.parse=(n,r)=>bu(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>zu(e,n,r),e.parseAsync=async(n,r)=>Tu(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>Du(e,n,r),e.spa=e.safeParseAsync,e.refine=(n,r)=>e.check(_c(n,r)),e.superRefine=n=>e.check(yc(n)),e.overwrite=n=>e.check(Ae(n)),e.optional=()=>zr(e),e.nullable=()=>Dr(e),e.nullish=()=>zr(Dr(e)),e.nonoptional=n=>lc(e,n),e.array=()=>he(e),e.or=n=>me([e,n]),e.and=n=>ec(e,n),e.transform=n=>Or(e,oc(n)),e.default=n=>sc(e,n),e.prefault=n=>cc(e,n),e.catch=n=>fc(e,n),e.pipe=n=>Or(e,n),e.readonly=()=>pc(e),e.describe=n=>{const r=e.clone();return nt.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){var n;return(n=nt.get(e))==null?void 0:n.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return nt.get(e);const r=e.clone();return nt.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),gr=d("_ZodString",(e,t)=>{Ct.init(e,t),I.init(e,t);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(Js(...r)),e.includes=(...r)=>e.check(nu(...r)),e.startsWith=(...r)=>e.check(ru(...r)),e.endsWith=(...r)=>e.check(ou(...r)),e.min=(...r)=>e.check(rt(...r)),e.max=(...r)=>e.check(mr(...r)),e.length=(...r)=>e.check(pr(...r)),e.nonempty=(...r)=>e.check(rt(1,...r)),e.lowercase=r=>e.check(eu(r)),e.uppercase=r=>e.check(tu(r)),e.trim=()=>e.check(au()),e.normalize=(...r)=>e.check(iu(...r)),e.toLowerCase=()=>e.check(su()),e.toUpperCase=()=>e.check(uu())}),ku=d("ZodString",(e,t)=>{Ct.init(e,t),gr.init(e,t),e.email=n=>e.check(Ts(Ou,n)),e.url=n=>e.check(Ss(Su,n)),e.jwt=n=>e.check(Ys(Yu,n)),e.emoji=n=>e.check(Es(Eu,n)),e.guid=n=>e.check(lr(_r,n)),e.uuid=n=>e.check(zs(it,n)),e.uuidv4=n=>e.check(Ds(it,n)),e.uuidv6=n=>e.check(ks(it,n)),e.uuidv7=n=>e.check(Os(it,n)),e.nanoid=n=>e.check(Ms(Mu,n)),e.guid=n=>e.check(lr(_r,n)),e.cuid=n=>e.check(Is(Iu,n)),e.cuid2=n=>e.check(Zs(Zu,n)),e.ulid=n=>e.check($s($u,n)),e.base64=n=>e.check(Fs(Fu,n)),e.base64url=n=>e.check(js(ju,n)),e.xid=n=>e.check(Ps(Pu,n)),e.ksuid=n=>e.check(Ns(Nu,n)),e.ipv4=n=>e.check(Cs(Cu,n)),e.ipv6=n=>e.check(Rs(Ru,n)),e.cidrv4=n=>e.check(xs(xu,n)),e.cidrv6=n=>e.check(As(Au,n)),e.e164=n=>e.check(Us(Uu,n)),e.datetime=n=>e.check(mu(n)),e.date=n=>e.check(gu(n)),e.time=n=>e.check(yu(n)),e.duration=n=>e.check(vu(n))});function R(e){return bs(ku,e)}const Z=d("ZodStringFormat",(e,t)=>{M.init(e,t),gr.init(e,t)}),Ou=d("ZodEmail",(e,t)=>{Ea.init(e,t),Z.init(e,t)}),_r=d("ZodGUID",(e,t)=>{Oa.init(e,t),Z.init(e,t)}),it=d("ZodUUID",(e,t)=>{Sa.init(e,t),Z.init(e,t)}),Su=d("ZodURL",(e,t)=>{Ma.init(e,t),Z.init(e,t)}),Eu=d("ZodEmoji",(e,t)=>{Ia.init(e,t),Z.init(e,t)}),Mu=d("ZodNanoID",(e,t)=>{Za.init(e,t),Z.init(e,t)}),Iu=d("ZodCUID",(e,t)=>{$a.init(e,t),Z.init(e,t)}),Zu=d("ZodCUID2",(e,t)=>{Pa.init(e,t),Z.init(e,t)}),$u=d("ZodULID",(e,t)=>{Na.init(e,t),Z.init(e,t)}),Pu=d("ZodXID",(e,t)=>{Ca.init(e,t),Z.init(e,t)}),Nu=d("ZodKSUID",(e,t)=>{Ra.init(e,t),Z.init(e,t)}),Cu=d("ZodIPv4",(e,t)=>{Ua.init(e,t),Z.init(e,t)}),Ru=d("ZodIPv6",(e,t)=>{Ya.init(e,t),Z.init(e,t)}),xu=d("ZodCIDRv4",(e,t)=>{La.init(e,t),Z.init(e,t)}),Au=d("ZodCIDRv6",(e,t)=>{Ga.init(e,t),Z.init(e,t)}),Fu=d("ZodBase64",(e,t)=>{Wa.init(e,t),Z.init(e,t)}),ju=d("ZodBase64URL",(e,t)=>{Ha.init(e,t),Z.init(e,t)}),Uu=d("ZodE164",(e,t)=>{Va.init(e,t),Z.init(e,t)}),Yu=d("ZodJWT",(e,t)=>{Xa.init(e,t),Z.init(e,t)}),yr=d("ZodNumber",(e,t)=>{er.init(e,t),I.init(e,t),e.gt=(r,o)=>e.check(fr(r,o)),e.gte=(r,o)=>e.check(At(r,o)),e.min=(r,o)=>e.check(At(r,o)),e.lt=(r,o)=>e.check(dr(r,o)),e.lte=(r,o)=>e.check(xt(r,o)),e.max=(r,o)=>e.check(xt(r,o)),e.int=r=>e.check(wr(r)),e.safe=r=>e.check(wr(r)),e.positive=r=>e.check(fr(0,r)),e.nonnegative=r=>e.check(At(0,r)),e.negative=r=>e.check(dr(0,r)),e.nonpositive=r=>e.check(xt(0,r)),e.multipleOf=(r,o)=>e.check(hr(r,o)),e.step=(r,o)=>e.check(hr(r,o)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function X(e){return Hs(yr,e)}const Lu=d("ZodNumberFormat",(e,t)=>{Qa.init(e,t),yr.init(e,t)});function wr(e){return Vs(Lu,e)}const Gu=d("ZodBoolean",(e,t)=>{Ka.init(e,t),I.init(e,t)});function fe(e){return Bs(Gu,e)}const Wu=d("ZodNull",(e,t)=>{Ja.init(e,t),I.init(e,t)});function qu(e){return Xs(Wu,e)}const Hu=d("ZodUnknown",(e,t)=>{es.init(e,t),I.init(e,t)});function vr(){return Qs(Hu)}const Vu=d("ZodNever",(e,t)=>{ts.init(e,t),I.init(e,t)});function Bu(e){return Ks(Vu,e)}const Xu=d("ZodArray",(e,t)=>{ns.init(e,t),I.init(e,t),e.element=t.element,e.min=(n,r)=>e.check(rt(n,r)),e.nonempty=n=>e.check(rt(1,n)),e.max=(n,r)=>e.check(mr(n,r)),e.length=(n,r)=>e.check(pr(n,r)),e.unwrap=()=>e.element});function he(e,t){return cu(Xu,e,t)}const Qu=d("ZodObject",(e,t)=>{rs.init(e,t),I.init(e,t),O(e,"shape",()=>t.shape),e.keyof=()=>L(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:vr()}),e.loose=()=>e.clone({...e._zod.def,catchall:vr()}),e.strict=()=>e.clone({...e._zod.def,catchall:Bu()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>Ei(e,n),e.merge=n=>Mi(e,n),e.pick=n=>Oi(e,n),e.omit=n=>Si(e,n),e.partial=(...n)=>Ii(Tr,e,n[0]),e.required=(...n)=>Zi(kr,e,n[0])});function N(e,t){const n={type:"object",get shape(){return le(this,"shape",e?bi(e):{}),this.shape},...y(t)};return new Qu(n)}const Ku=d("ZodUnion",(e,t)=>{os.init(e,t),I.init(e,t),e.options=t.options});function me(e,t){return new Ku({type:"union",options:e,...y(t)})}const Ju=d("ZodIntersection",(e,t)=>{is.init(e,t),I.init(e,t)});function ec(e,t){return new Ju({type:"intersection",left:e,right:t})}const tc=d("ZodRecord",(e,t)=>{as.init(e,t),I.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function br(e,t,n){return new tc({type:"record",keyType:e,valueType:t,...y(n)})}const Ft=d("ZodEnum",(e,t)=>{ss.init(e,t),I.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const i={};for(const s of r)if(n.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Ft({...t,checks:[],...y(o),entries:i})},e.exclude=(r,o)=>{const i={...t.entries};for(const s of r)if(n.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new Ft({...t,checks:[],...y(o),entries:i})}});function L(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Ft({type:"enum",entries:n,...y(t)})}const nc=d("ZodLiteral",(e,t)=>{us.init(e,t),I.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function B(e,t){return new nc({type:"literal",values:Array.isArray(e)?e:[e],...y(t)})}const rc=d("ZodTransform",(e,t)=>{cs.init(e,t),I.init(e,t),e._zod.parse=(n,r)=>{n.addIssue=i=>{if(typeof i=="string")n.issues.push(xe(i,n.value,t));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(xe(s))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n)):(n.value=o,n)}});function oc(e){return new rc({type:"transform",transform:e})}const Tr=d("ZodOptional",(e,t)=>{ls.init(e,t),I.init(e,t),e.unwrap=()=>e._zod.def.innerType});function zr(e){return new Tr({type:"optional",innerType:e})}const ic=d("ZodNullable",(e,t)=>{ds.init(e,t),I.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Dr(e){return new ic({type:"nullable",innerType:e})}const ac=d("ZodDefault",(e,t)=>{fs.init(e,t),I.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function sc(e,t){return new ac({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():jn(t)}})}const uc=d("ZodPrefault",(e,t)=>{hs.init(e,t),I.init(e,t),e.unwrap=()=>e._zod.def.innerType});function cc(e,t){return new uc({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():jn(t)}})}const kr=d("ZodNonOptional",(e,t)=>{ms.init(e,t),I.init(e,t),e.unwrap=()=>e._zod.def.innerType});function lc(e,t){return new kr({type:"nonoptional",innerType:e,...y(t)})}const dc=d("ZodCatch",(e,t)=>{ps.init(e,t),I.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function fc(e,t){return new dc({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const hc=d("ZodPipe",(e,t)=>{gs.init(e,t),I.init(e,t),e.in=t.in,e.out=t.out});function Or(e,t){return new hc({type:"pipe",in:e,out:t})}const mc=d("ZodReadonly",(e,t)=>{_s.init(e,t),I.init(e,t),e.unwrap=()=>e._zod.def.innerType});function pc(e){return new mc({type:"readonly",innerType:e})}const gc=d("ZodCustom",(e,t)=>{ys.init(e,t),I.init(e,t)});function _c(e,t={}){return lu(gc,e,t)}function yc(e){return du(e)}const wc=["horizontal_bar","vertical_bar","gauge","donut","timeseries_line","timeseries_bar","golden_signals","top_n","slottable","single_value"],Fe=R(),pe=R(),Sr=fe(),Er=me([he(R()),br(R(),R())]),Mr=N({type:B("slottable"),id:R()}).strict(),Ir=N({type:L(["horizontal_bar","vertical_bar"]),stacked:fe().optional(),chart_dataset_colors:Er.optional(),synthetics_data_key:Fe.optional(),chart_title:pe.optional(),allow_csv_export:Sr.optional()}).strict(),Zr=N({type:L(["timeseries_line","timeseries_bar"]),stacked:fe().optional(),threshold:br(R(),X()).optional(),chart_dataset_colors:Er.optional(),synthetics_data_key:Fe.optional(),chart_title:pe.optional(),allow_csv_export:Sr.optional()}).strict(),$r=N({type:B("gauge"),metric_display:L(["hidden","single","full"]).optional(),reverse_dataset:fe().optional(),numerator:X().optional(),synthetics_data_key:Fe.optional(),chart_title:pe.optional()}).strict(),Pr=N({type:B("donut"),synthetics_data_key:Fe.optional(),chart_title:pe.optional()}).strict(),Nr=N({type:B("top_n"),chart_title:pe.optional(),synthetics_data_key:Fe.optional(),description:R().optional(),entity_link:R().optional()}).strict(),Cr=N({type:B("golden_signals"),chart_title:pe.optional(),long_card_titles:fe().optional(),description:R().optional(),percentile_latency:fe().optional()}).strict(),Rr=N({type:B("single_value"),decimal_points:X().optional(),chart_title:pe.optional()}).strict(),vc=N({tz:R().optional().default("Etc/UTC"),type:B("relative"),time_range:L(Dt).optional().default("1h")}).strict(),bc=N({tz:R().optional(),type:B("absolute"),start:R(),end:R()}).strict(),Tc=me([vc,bc]).optional().default({tz:Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC",type:"relative",time_range:"1h"}),jt=N({granularity:L(Ve).optional(),time_range:Tc.optional(),limit:X().optional(),meta:N().optional()}),Ut=e=>he(L(e)).optional(),Yt=e=>he(L(e)).max(2).optional(),at=e=>{const t=N({field:L(e),operator:L(Tt),value:he(me([R(),X(),qu()]))}).strict(),n=N({field:L(e),operator:L(zt)}).strict();return he(me([t,n])).optional()},xr=jt.extend({datasource:B("api_usage"),metrics:Ut(kt).optional(),dimensions:Yt(Xe).optional(),filters:at(se).optional()}).strict(),Ar=jt.extend({datasource:B("basic"),metrics:Ut(Be).optional(),dimensions:Yt($e).optional(),filters:at(ae).optional()}).strict(),Fr=jt.extend({datasource:B("llm_usage"),metrics:Ut(Ot).optional(),dimensions:Yt(Qe).optional(),filters:at(ue).optional()}).strict(),jr=me([xr,Ar,Fr]),Ur=N({query:jr,chart:me([Ir,$r,Pr,Zr,Cr,Nr,Mr,Rr])}).strict(),Yr=N({position:N({col:X(),row:X()}).strict(),size:N({cols:X(),rows:X(),fit_to_content:fe().optional()}).strict()}).strict(),Lr=N({type:L(["chart"]),definition:Ur,layout:Yr,id:R().optional()}).strict(),Gr=N({tiles:he(Lr),tile_height:X().optional(),preset_filters:at([...se,...ae,...ue]),template_id:R().nullable().optional()}).strict(),zc=e=>Gr.parse(e),Dc=e=>{const t=[];return ae.includes(e)&&t.push("basic"),se.includes(e)&&t.push("api_usage"),ue.includes(e)&&t.push("llm_usage"),(hn.includes(e)||gn.includes(e))&&t.push("requests"),t},Wr=6048e5,kc=864e5,Oc=60,Sc=3600,qr=Symbol.for("constructDateFrom");function H(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&qr in e?e[qr](t):e instanceof Date?new e.constructor(t):new Date(t)}function x(e,t){return H(t||e,e)}function Hr(e,t,n){const r=x(e,n==null?void 0:n.in);return isNaN(t)?H(e,NaN):(r.setDate(r.getDate()+t),r)}function Ec(e,t,n){const r=x(e,n==null?void 0:n.in);if(isNaN(t))return H(e,NaN);const o=r.getDate(),i=H(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const s=i.getDate();return o>=s?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}let Mc={};function je(){return Mc}function Q(e,t){var c,l,h,w;const n=je(),r=(t==null?void 0:t.weekStartsOn)??((l=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((w=(h=n.locale)==null?void 0:h.options)==null?void 0:w.weekStartsOn)??0,o=x(e,t==null?void 0:t.in),i=o.getDay(),s=(i<r?7:0)+i-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function st(e,t){return Q(e,{...t,weekStartsOn:1})}function Vr(e,t){const n=x(e,t==null?void 0:t.in),r=n.getFullYear(),o=H(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=st(o),s=H(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const c=st(s);return n.getTime()>=i.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function Br(e){const t=x(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Ic(e,...t){const n=H.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function ut(e,t){const n=x(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function Zc(e,t,n){const[r,o]=Ic(n==null?void 0:n.in,e,t),i=ut(r),s=ut(o),c=+i-Br(i),l=+s-Br(s);return Math.round((c-l)/kc)}function $c(e,t){const n=Vr(e,t),r=H(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),st(r)}function Pc(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Nc(e){return!(!Pc(e)&&typeof e!="number"||isNaN(+x(e)))}function ze(e,t){const n=x(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Cc(e,t){const n=x(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const Rc={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},xc=(e,t,n)=>{let r;const o=Rc[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Lt(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Ac={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Fc={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},jc={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Uc={date:Lt({formats:Ac,defaultWidth:"full"}),time:Lt({formats:Fc,defaultWidth:"full"}),dateTime:Lt({formats:jc,defaultWidth:"full"})},Yc={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Lc=(e,t,n,r)=>Yc[e];function Ue(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,c=n!=null&&n.width?String(n.width):s;o=e.formattingValues[c]||e.formattingValues[s]}else{const s=e.defaultWidth,c=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[c]||e.values[s]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const Gc={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Wc={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},qc={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Hc={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Vc={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Bc={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Xc={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Ue({values:Gc,defaultWidth:"wide"}),quarter:Ue({values:Wc,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ue({values:qc,defaultWidth:"wide"}),day:Ue({values:Hc,defaultWidth:"wide"}),dayPeriod:Ue({values:Vc,defaultWidth:"wide",formattingValues:Bc,defaultFormattingWidth:"wide"})};function Ye(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const s=i[0],c=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(c)?Kc(c,p=>p.test(s)):Qc(c,p=>p.test(s));let h;h=e.valueCallback?e.valueCallback(l):l,h=n.valueCallback?n.valueCallback(h):h;const w=t.slice(s.length);return{value:h,rest:w}}}function Qc(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Kc(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Jc(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let s=e.valueCallback?e.valueCallback(i[0]):i[0];s=n.valueCallback?n.valueCallback(s):s;const c=t.slice(o.length);return{value:s,rest:c}}}const el=/^(\d+)(th|st|nd|rd)?/i,tl=/\d+/i,nl={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},rl={any:[/^b/i,/^(a|c)/i]},ol={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},il={any:[/1/i,/2/i,/3/i,/4/i]},al={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},sl={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},ul={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},cl={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ll={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},dl={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},fl={ordinalNumber:Jc({matchPattern:el,parsePattern:tl,valueCallback:e=>parseInt(e,10)}),era:Ye({matchPatterns:nl,defaultMatchWidth:"wide",parsePatterns:rl,defaultParseWidth:"any"}),quarter:Ye({matchPatterns:ol,defaultMatchWidth:"wide",parsePatterns:il,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ye({matchPatterns:al,defaultMatchWidth:"wide",parsePatterns:sl,defaultParseWidth:"any"}),day:Ye({matchPatterns:ul,defaultMatchWidth:"wide",parsePatterns:cl,defaultParseWidth:"any"}),dayPeriod:Ye({matchPatterns:ll,defaultMatchWidth:"any",parsePatterns:dl,defaultParseWidth:"any"})},hl={code:"en-US",formatDistance:xc,formatLong:Uc,formatRelative:Lc,localize:Xc,match:fl,options:{weekStartsOn:0,firstWeekContainsDate:1}};function ml(e,t){const n=x(e,t==null?void 0:t.in);return Zc(n,Cc(n))+1}function pl(e,t){const n=x(e,t==null?void 0:t.in),r=+st(n)-+$c(n);return Math.round(r/Wr)+1}function Xr(e,t){var w,p,g,b;const n=x(e,t==null?void 0:t.in),r=n.getFullYear(),o=je(),i=(t==null?void 0:t.firstWeekContainsDate)??((p=(w=t==null?void 0:t.locale)==null?void 0:w.options)==null?void 0:p.firstWeekContainsDate)??o.firstWeekContainsDate??((b=(g=o.locale)==null?void 0:g.options)==null?void 0:b.firstWeekContainsDate)??1,s=H((t==null?void 0:t.in)||e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);const c=Q(s,t),l=H((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const h=Q(l,t);return+n>=+c?r+1:+n>=+h?r:r-1}function gl(e,t){var c,l,h,w;const n=je(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((w=(h=n.locale)==null?void 0:h.options)==null?void 0:w.firstWeekContainsDate)??1,o=Xr(e,t),i=H((t==null?void 0:t.in)||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),Q(i,t)}function _l(e,t){const n=x(e,t==null?void 0:t.in),r=+Q(n,t)-+gl(n,t);return Math.round(r/Wr)+1}function z(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const re={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return z(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):z(n+1,2)},d(e,t){return z(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return z(e.getHours()%12||12,t.length)},H(e,t){return z(e.getHours(),t.length)},m(e,t){return z(e.getMinutes(),t.length)},s(e,t){return z(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return z(o,t.length)}},De={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Qr={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return re.y(e,t)},Y:function(e,t,n,r){const o=Xr(e,r),i=o>0?o:1-o;if(t==="YY"){const s=i%100;return z(s,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):z(i,t.length)},R:function(e,t){const n=Vr(e);return z(n,t.length)},u:function(e,t){const n=e.getFullYear();return z(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return z(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return z(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return re.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return z(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=_l(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):z(o,t.length)},I:function(e,t,n){const r=pl(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):z(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):re.d(e,t)},D:function(e,t,n){const r=ml(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):z(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return z(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return z(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return z(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=De.noon:r===0?o=De.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=De.evening:r>=12?o=De.afternoon:r>=4?o=De.morning:o=De.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return re.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):re.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):z(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):z(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):re.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):re.s(e,t)},S:function(e,t){return re.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Jr(r);case"XXXX":case"XX":return ge(r);case"XXXXX":case"XXX":default:return ge(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Jr(r);case"xxxx":case"xx":return ge(r);case"xxxxx":case"xxx":default:return ge(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Kr(r,":");case"OOOO":default:return"GMT"+ge(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Kr(r,":");case"zzzz":default:return"GMT"+ge(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return z(r,t.length)},T:function(e,t,n){return z(+e,t.length)}};function Kr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+z(i,2)}function Jr(e,t){return e%60===0?(e>0?"-":"+")+z(Math.abs(e)/60,2):ge(e,t)}function ge(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=z(Math.trunc(r/60),2),i=z(r%60,2);return n+o+t+i}const eo=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},to=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},yl={p:to,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return eo(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",eo(r,t)).replace("{{time}}",to(o,t))}},wl=/^D+$/,vl=/^Y+$/,bl=["D","DD","YY","YYYY"];function Tl(e){return wl.test(e)}function zl(e){return vl.test(e)}function Dl(e,t,n){const r=kl(e,t,n);if(console.warn(r),bl.includes(e))throw new RangeError(r)}function kl(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Ol=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Sl=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,El=/^'([^]*?)'?$/,Ml=/''/g,Il=/[a-zA-Z]/;function no(e,t,n){var w,p,g,b,k,P,W,V;const r=je(),o=(n==null?void 0:n.locale)??r.locale??hl,i=(n==null?void 0:n.firstWeekContainsDate)??((p=(w=n==null?void 0:n.locale)==null?void 0:w.options)==null?void 0:p.firstWeekContainsDate)??r.firstWeekContainsDate??((b=(g=r.locale)==null?void 0:g.options)==null?void 0:b.firstWeekContainsDate)??1,s=(n==null?void 0:n.weekStartsOn)??((P=(k=n==null?void 0:n.locale)==null?void 0:k.options)==null?void 0:P.weekStartsOn)??r.weekStartsOn??((V=(W=r.locale)==null?void 0:W.options)==null?void 0:V.weekStartsOn)??0,c=x(e,n==null?void 0:n.in);if(!Nc(c))throw new RangeError("Invalid time value");let l=t.match(Sl).map(D=>{const T=D[0];if(T==="p"||T==="P"){const $=yl[T];return $(D,o.formatLong)}return D}).join("").match(Ol).map(D=>{if(D==="''")return{isToken:!1,value:"'"};const T=D[0];if(T==="'")return{isToken:!1,value:Zl(D)};if(Qr[T])return{isToken:!0,value:D};if(T.match(Il))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");return{isToken:!1,value:D}});o.localize.preprocessor&&(l=o.localize.preprocessor(c,l));const h={firstWeekContainsDate:i,weekStartsOn:s,locale:o};return l.map(D=>{if(!D.isToken)return D.value;const T=D.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&zl(T)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Tl(T))&&Dl(T,t,String(e));const $=Qr[T[0]];return $(c,T,o.localize,h)}).join("")}function Zl(e){const t=e.match(El);return t?t[1].replace(Ml,"'"):e}function $l(e,t){const n=x(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),i=H(n,0);return i.setFullYear(r,o+1,0),i.setHours(0,0,0,0),i.getDate()}function Pl(){return Object.assign({},je())}function ro(e){return+x(e)}function oo(e){return Math.trunc(+x(e)/1e3)}function Nl(e){return Math.trunc(e*Sc)}function Cl(e){const t=e/Oc;return Math.trunc(t)}function io(e,t,n){return Ec(e,-1,n)}function ao(e,t,n){const r=Pl(),o=Al(e,n.timeZone,n.locale??r.locale);return"formatToParts"in o?Rl(o,t):xl(o,t)}function Rl(e,t){const n=e.formatToParts(t);for(let r=n.length-1;r>=0;--r)if(n[r].type==="timeZoneName")return n[r].value}function xl(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(n);return r?r[0].substr(1):""}function Al(e,t,n){return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:t,timeZoneName:e})}function Fl(e,t){const n=Gl(t);return"formatToParts"in n?Ul(n,e):Yl(n,e)}const jl={year:0,month:1,day:2,hour:3,minute:4,second:5};function Ul(e,t){try{const n=e.formatToParts(t),r=[];for(let o=0;o<n.length;o++){const i=jl[n[o].type];i!==void 0&&(r[i]=parseInt(n[o].value,10))}return r}catch(n){if(n instanceof RangeError)return[NaN];throw n}}function Yl(e,t){const n=e.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}const Gt={},so=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),Ll=so==="06/25/2014, 00:00:00"||so==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function Gl(e){return Gt[e]||(Gt[e]=Ll?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),Gt[e]}function Wt(e,t,n,r,o,i,s){const c=new Date(0);return c.setUTCFullYear(e,t,n),c.setUTCHours(r,o,i,s),c}const uo=36e5,Wl=6e4,qt={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Le(e,t,n){if(!e)return 0;let r=qt.timezoneZ.exec(e);if(r)return 0;let o,i;if(r=qt.timezoneHH.exec(e),r)return o=parseInt(r[1],10),co(o)?-(o*uo):NaN;if(r=qt.timezoneHHMM.exec(e),r){o=parseInt(r[2],10);const s=parseInt(r[3],10);return co(o,s)?(i=Math.abs(o)*uo+s*Wl,r[1]==="+"?-i:i):NaN}if(Vl(e)){t=new Date(t||Date.now());const s=n?t:ql(t),c=Ht(s,e);return-(n?c:Hl(t,c,e))}return NaN}function ql(e){return Wt(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function Ht(e,t){const n=Fl(e,t),r=Wt(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime();let o=e.getTime();const i=o%1e3;return o-=i>=0?i:1e3+i,r-o}function Hl(e,t,n){let o=e.getTime()-t;const i=Ht(new Date(o),n);if(t===i)return t;o-=i-t;const s=Ht(new Date(o),n);return i===s?i:Math.max(i,s)}function co(e,t){return-23<=e&&e<=23&&(t==null||0<=t&&t<=59)}const lo={};function Vl(e){if(lo[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),lo[e]=!0,!0}catch{return!1}}const Bl=60*1e3,Xl={X:function(e,t,n){const r=Vt(n.timeZone,e);if(r===0)return"Z";switch(t){case"X":return fo(r);case"XXXX":case"XX":return ke(r);case"XXXXX":case"XXX":default:return ke(r,":")}},x:function(e,t,n){const r=Vt(n.timeZone,e);switch(t){case"x":return fo(r);case"xxxx":case"xx":return ke(r);case"xxxxx":case"xxx":default:return ke(r,":")}},O:function(e,t,n){const r=Vt(n.timeZone,e);switch(t){case"O":case"OO":case"OOO":return"GMT"+Ql(r,":");case"OOOO":default:return"GMT"+ke(r,":")}},z:function(e,t,n){switch(t){case"z":case"zz":case"zzz":return ao("short",e,n);case"zzzz":default:return ao("long",e,n)}}};function Vt(e,t){const n=e?Le(e,t,!0)/Bl:(t==null?void 0:t.getTimezoneOffset())??0;if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+e);return n}function ct(e,t){const n=e<0?"-":"";let r=Math.abs(e).toString();for(;r.length<t;)r="0"+r;return n+r}function ke(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=ct(Math.floor(r/60),2),i=ct(Math.floor(r%60),2);return n+o+t+i}function fo(e,t){return e%60===0?(e>0?"-":"+")+ct(Math.abs(e)/60,2):ke(e,t)}function Ql(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+ct(i,2)}function ho(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+e-+t}const mo=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Bt=36e5,po=6e4,Kl=2,F={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:mo};function lt(e,t={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(e===null)return new Date(NaN);const n=t.additionalDigits==null?Kl:Number(t.additionalDigits);if(n!==2&&n!==1&&n!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]")return new Date(e.getTime());if(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")return new Date(e);if(Object.prototype.toString.call(e)!=="[object String]")return new Date(NaN);const r=Jl(e),{year:o,restDateString:i}=ed(r.date,n),s=td(i,o);if(s===null||isNaN(s.getTime()))return new Date(NaN);if(s){const c=s.getTime();let l=0,h;if(r.time&&(l=nd(r.time),l===null||isNaN(l)))return new Date(NaN);if(r.timeZone||t.timeZone){if(h=Le(r.timeZone||t.timeZone,new Date(c+l)),isNaN(h))return new Date(NaN)}else h=ho(new Date(c+l)),h=ho(new Date(c+l+h));return new Date(c+l+h)}else return new Date(NaN)}function Jl(e){const t={};let n=F.dateTimePattern.exec(e),r;if(n?(t.date=n[1],r=n[3]):(n=F.datePattern.exec(e),n?(t.date=n[1],r=n[2]):(t.date=null,r=e)),r){const o=F.timeZone.exec(r);o?(t.time=r.replace(o[1],""),t.timeZone=o[1].trim()):t.time=r}return t}function ed(e,t){if(e){const n=F.YYY[t],r=F.YYYYY[t];let o=F.YYYY.exec(e)||r.exec(e);if(o){const i=o[1];return{year:parseInt(i,10),restDateString:e.slice(i.length)}}if(o=F.YY.exec(e)||n.exec(e),o){const i=o[1];return{year:parseInt(i,10)*100,restDateString:e.slice(i.length)}}}return{year:null}}function td(e,t){if(t===null)return null;let n,r,o;if(!e||!e.length)return n=new Date(0),n.setUTCFullYear(t),n;let i=F.MM.exec(e);if(i)return n=new Date(0),r=parseInt(i[1],10)-1,yo(t,r)?(n.setUTCFullYear(t,r),n):new Date(NaN);if(i=F.DDD.exec(e),i){n=new Date(0);const s=parseInt(i[1],10);return id(t,s)?(n.setUTCFullYear(t,0,s),n):new Date(NaN)}if(i=F.MMDD.exec(e),i){n=new Date(0),r=parseInt(i[1],10)-1;const s=parseInt(i[2],10);return yo(t,r,s)?(n.setUTCFullYear(t,r,s),n):new Date(NaN)}if(i=F.Www.exec(e),i)return o=parseInt(i[1],10)-1,wo(o)?go(t,o):new Date(NaN);if(i=F.WwwD.exec(e),i){o=parseInt(i[1],10)-1;const s=parseInt(i[2],10)-1;return wo(o,s)?go(t,o,s):new Date(NaN)}return null}function nd(e){let t,n,r=F.HH.exec(e);if(r)return t=parseFloat(r[1].replace(",",".")),Xt(t)?t%24*Bt:NaN;if(r=F.HHMM.exec(e),r)return t=parseInt(r[1],10),n=parseFloat(r[2].replace(",",".")),Xt(t,n)?t%24*Bt+n*po:NaN;if(r=F.HHMMSS.exec(e),r){t=parseInt(r[1],10),n=parseInt(r[2],10);const o=parseFloat(r[3].replace(",","."));return Xt(t,n,o)?t%24*Bt+n*po+o*1e3:NaN}return null}function go(e,t,n){t=t||0,n=n||0;const r=new Date(0);r.setUTCFullYear(e,0,4);const o=r.getUTCDay()||7,i=t*7+n+1-o;return r.setUTCDate(r.getUTCDate()+i),r}const rd=[31,28,31,30,31,30,31,31,30,31,30,31],od=[31,29,31,30,31,30,31,31,30,31,30,31];function _o(e){return e%400===0||e%4===0&&e%100!==0}function yo(e,t,n){if(t<0||t>11)return!1;if(n!=null){if(n<1)return!1;const r=_o(e);if(r&&n>od[t]||!r&&n>rd[t])return!1}return!0}function id(e,t){if(t<1)return!1;const n=_o(e);return!(n&&t>366||!n&&t>365)}function wo(e,t){return!(e<0||e>52||t!=null&&(t<0||t>6))}function Xt(e,t,n){return!(e<0||e>=25||t!=null&&(t<0||t>=60)||n!=null&&(n<0||n>=60))}const ad=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function sd(e,t,n={}){t=String(t);const r=t.match(ad);if(r){const o=lt(n.originalDate||e,n);t=r.reduce(function(i,s){if(s[0]==="'")return i;const c=i.indexOf(s),l=i[c-1]==="'",h=i.replace(s,"'"+Xl[s[0]](o,s,n)+"'");return l?h.substring(0,c-1)+h.substring(c+1):h},t)}return no(e,t,n)}function vo(e,t,n){e=lt(e,n);const r=Le(t,e,!0),o=new Date(e.getTime()-r),i=new Date(0);return i.setFullYear(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()),i.setHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()),i}function ud(e,t,n,r){return r={...r,timeZone:t,originalDate:e},sd(vo(e,t,{timeZone:r.timeZone}),n,r)}function cd(e,t,n){if(typeof e=="string"&&!e.match(mo))return lt(e,{...n,timeZone:t});e=lt(e,n);const r=Wt(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()).getTime(),o=Le(t,new Date(r));return new Date(r+o)}function bo(e,t){return-Le(e,t)}function ld(e){return no(e,"yyyy-MM-dd'T'HH:mm:ss.SSSXXX")}function Qt(e,t={}){if(!e)return e;const n=t.tz||Intl.DateTimeFormat().resolvedOptions().timeZone;try{let r="MMM dd, yyy hh:mm a";t.short&&(r="MMM dd, yyy"),t.includeTZ&&(r+=" (z)");const o=new Date(e);return ud(o,n,r)}catch{return console.error("Invalid value passed to formatTime",e),"(invalid date)"}}function dd(e,t){return`${Qt(e.getTime())} - ${Qt(t.getTime(),{includeTZ:!0})}`}const Ge={secondly:1e3,tenSecondly:10*1e3,thirtySecondly:30*1e3,minutely:60*1e3,fiveMinutely:5*60*1e3,tenMinutely:10*60*1e3,thirtyMinutely:30*60*1e3,hourly:60*60*1e3,twoHourly:2*60*60*1e3,twelveHourly:12*60*60*1e3,daily:60*60*24*1e3,weekly:60*60*24*7*1e3,trend:0};function fd(e,t){return e.map(n=>({value:n,label:t.t(`configuration.vitals.reports.granularity.${n}`)}))}function To(e,t){return{duration:e,type:"duration",origin:t}}function hd(e){return e&&Ve.find(n=>e<=Ge[n])||null}function zo(e,t,n,r){const o=Ge[n];let i=0;return o>=Ge.daily&&(r?i=-bo(r,t):i=t.getTimezoneOffset()*60*1e3),new Date(e((t.getTime()-i)/o)*o+i)}function Do(e,t,n){return zo(Math.floor,e,t,n)}function Kt(e,t,n){return zo(Math.ceil,e,t,n)}class dt{constructor(t,n,r){C(this,"timeframe");C(this,"tz");C(this,"dataGranularity");if(this.constructor===dt)throw new Error("BaseQueryTime is not meant to be used directly.");this.timeframe=t,this.tz=n,this.dataGranularity=r??t.dataGranularity}calculateStartDate(t,n,r=1){if(t)return new Date(this.endDate().getTime()-this.timeframe.timeframeLengthMs()*r);{const o=this.endDate(),i=this.timeframe.rawStart(this.tz),s=Do(i,n,this.tz),l=(o.getTime()-s.getTime())*(r-1);return new Date(s.getTime()-l)}}granularitySeconds(){return Math.floor(this.granularityMs()/1e3)}granularityDruid(){return To(this.granularityMs(),this.startDate().toISOString())}startSeconds(){return oo(this.startDate())}endSeconds(){return oo(this.endDate())}startMs(){return ro(this.startDate())}endMs(){return ro(this.endDate())}}class md extends dt{constructor(n,r,o,i,s){super(n,o,i);C(this,"granularity");r&&n.allowedGranularities(s).has(r)?this.granularity=r:s?this.granularity=n.fineGrainedDefaultGranularity??n.defaultResponseGranularity:this.granularity=n.defaultResponseGranularity}startDate(){return this.calculateStartDate(this.timeframe.isRelative,this.granularity)}endDate(){return Kt(this.timeframe.rawEnd(),this.granularity,this.tz)}granularityMs(){return Ge[this.granularity]}}class ko extends dt{startDate(){return this.calculateStartDate(this.timeframe.isRelative,this.dataGranularity)}endDate(){return Kt(this.timeframe.rawEnd(this.tz),this.dataGranularity,this.tz)}granularityMs(){return this.endDate().getTime()-this.startDate().getTime()}}class pd extends ko{startDate(){return this.calculateStartDate(this.timeframe.isRelative,this.dataGranularity,2)}granularityMs(){return this.endDate().getTime()-super.startDate().getTime()}}var ft=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ht={exports:{}};ht.exports,function(e,t){var n=200,r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",s="[object Array]",c="[object Boolean]",l="[object Date]",h="[object Error]",w="[object Function]",p="[object GeneratorFunction]",g="[object Map]",b="[object Number]",k="[object Object]",P="[object Promise]",W="[object RegExp]",V="[object Set]",D="[object String]",T="[object Symbol]",$="[object WeakMap]",We="[object ArrayBuffer]",oe="[object DataView]",pt="[object Float32Array]",Eo="[object Float64Array]",Mo="[object Int8Array]",Io="[object Int16Array]",Zo="[object Int32Array]",$o="[object Uint8Array]",Po="[object Uint8ClampedArray]",No="[object Uint16Array]",Co="[object Uint32Array]",Id=/[\\^$.*+?()[\]{}|]/g,Zd=/\w*$/,$d=/^\[object .+?Constructor\]$/,Pd=/^(?:0|[1-9]\d*)$/,S={};S[i]=S[s]=S[We]=S[oe]=S[c]=S[l]=S[pt]=S[Eo]=S[Mo]=S[Io]=S[Zo]=S[g]=S[b]=S[k]=S[W]=S[V]=S[D]=S[T]=S[$o]=S[Po]=S[No]=S[Co]=!0,S[h]=S[w]=S[$]=!1;var Nd=typeof ft=="object"&&ft&&ft.Object===Object&&ft,Cd=typeof self=="object"&&self&&self.Object===Object&&self,K=Nd||Cd||Function("return this")(),Ro=t&&!t.nodeType&&t,xo=Ro&&!0&&e&&!e.nodeType&&e,Rd=xo&&xo.exports===Ro;function xd(a,u){return a.set(u[0],u[1]),a}function Ad(a,u){return a.add(u),a}function Fd(a,u){for(var f=-1,_=a?a.length:0;++f<_&&u(a[f],f,a)!==!1;);return a}function jd(a,u){for(var f=-1,_=u.length,A=a.length;++f<_;)a[A+f]=u[f];return a}function Ao(a,u,f,_){for(var A=-1,U=a?a.length:0;++A<U;)f=u(f,a[A],A,a);return f}function Ud(a,u){for(var f=-1,_=Array(a);++f<a;)_[f]=u(f);return _}function Yd(a,u){return a==null?void 0:a[u]}function Fo(a){var u=!1;if(a!=null&&typeof a.toString!="function")try{u=!!(a+"")}catch{}return u}function jo(a){var u=-1,f=Array(a.size);return a.forEach(function(_,A){f[++u]=[A,_]}),f}function en(a,u){return function(f){return a(u(f))}}function Uo(a){var u=-1,f=Array(a.size);return a.forEach(function(_){f[++u]=_}),f}var Ld=Array.prototype,Gd=Function.prototype,gt=Object.prototype,tn=K["__core-js_shared__"],Yo=function(){var a=/[^.]+$/.exec(tn&&tn.keys&&tn.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}(),Lo=Gd.toString,ie=gt.hasOwnProperty,_t=gt.toString,Wd=RegExp("^"+Lo.call(ie).replace(Id,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Go=Rd?K.Buffer:void 0,Wo=K.Symbol,qo=K.Uint8Array,qd=en(Object.getPrototypeOf,Object),Hd=Object.create,Vd=gt.propertyIsEnumerable,Bd=Ld.splice,Ho=Object.getOwnPropertySymbols,Xd=Go?Go.isBuffer:void 0,Qd=en(Object.keys,Object),nn=Me(K,"DataView"),qe=Me(K,"Map"),rn=Me(K,"Promise"),on=Me(K,"Set"),an=Me(K,"WeakMap"),He=Me(Object,"create"),Kd=we(nn),Jd=we(qe),ef=we(rn),tf=we(on),nf=we(an),Vo=Wo?Wo.prototype:void 0,Bo=Vo?Vo.valueOf:void 0;function _e(a){var u=-1,f=a?a.length:0;for(this.clear();++u<f;){var _=a[u];this.set(_[0],_[1])}}function rf(){this.__data__=He?He(null):{}}function of(a){return this.has(a)&&delete this.__data__[a]}function af(a){var u=this.__data__;if(He){var f=u[a];return f===r?void 0:f}return ie.call(u,a)?u[a]:void 0}function sf(a){var u=this.__data__;return He?u[a]!==void 0:ie.call(u,a)}function uf(a,u){var f=this.__data__;return f[a]=He&&u===void 0?r:u,this}_e.prototype.clear=rf,_e.prototype.delete=of,_e.prototype.get=af,_e.prototype.has=sf,_e.prototype.set=uf;function J(a){var u=-1,f=a?a.length:0;for(this.clear();++u<f;){var _=a[u];this.set(_[0],_[1])}}function cf(){this.__data__=[]}function lf(a){var u=this.__data__,f=yt(u,a);if(f<0)return!1;var _=u.length-1;return f==_?u.pop():Bd.call(u,f,1),!0}function df(a){var u=this.__data__,f=yt(u,a);return f<0?void 0:u[f][1]}function ff(a){return yt(this.__data__,a)>-1}function hf(a,u){var f=this.__data__,_=yt(f,a);return _<0?f.push([a,u]):f[_][1]=u,this}J.prototype.clear=cf,J.prototype.delete=lf,J.prototype.get=df,J.prototype.has=ff,J.prototype.set=hf;function Se(a){var u=-1,f=a?a.length:0;for(this.clear();++u<f;){var _=a[u];this.set(_[0],_[1])}}function mf(){this.__data__={hash:new _e,map:new(qe||J),string:new _e}}function pf(a){return wt(this,a).delete(a)}function gf(a){return wt(this,a).get(a)}function _f(a){return wt(this,a).has(a)}function yf(a,u){return wt(this,a).set(a,u),this}Se.prototype.clear=mf,Se.prototype.delete=pf,Se.prototype.get=gf,Se.prototype.has=_f,Se.prototype.set=yf;function Ee(a){this.__data__=new J(a)}function wf(){this.__data__=new J}function vf(a){return this.__data__.delete(a)}function bf(a){return this.__data__.get(a)}function Tf(a){return this.__data__.has(a)}function zf(a,u){var f=this.__data__;if(f instanceof J){var _=f.__data__;if(!qe||_.length<n-1)return _.push([a,u]),this;f=this.__data__=new Se(_)}return f.set(a,u),this}Ee.prototype.clear=wf,Ee.prototype.delete=vf,Ee.prototype.get=bf,Ee.prototype.has=Tf,Ee.prototype.set=zf;function Df(a,u){var f=cn(a)||Vf(a)?Ud(a.length,String):[],_=f.length,A=!!_;for(var U in a)ie.call(a,U)&&!(A&&(U=="length"||Gf(U,_)))&&f.push(U);return f}function Xo(a,u,f){var _=a[u];(!(ie.call(a,u)&&ei(_,f))||f===void 0&&!(u in a))&&(a[u]=f)}function yt(a,u){for(var f=a.length;f--;)if(ei(a[f][0],u))return f;return-1}function kf(a,u){return a&&Qo(u,ln(u),a)}function sn(a,u,f,_,A,U,ee){var Y;if(_&&(Y=U?_(a,A,U,ee):_(a)),Y!==void 0)return Y;if(!vt(a))return a;var ri=cn(a);if(ri){if(Y=Uf(a),!u)return Af(a,Y)}else{var Ie=ye(a),oi=Ie==w||Ie==p;if(Xf(a))return Zf(a,u);if(Ie==k||Ie==i||oi&&!U){if(Fo(a))return U?a:{};if(Y=Yf(oi?{}:a),!u)return Ff(a,kf(Y,a))}else{if(!S[Ie])return U?a:{};Y=Lf(a,Ie,sn,u)}}ee||(ee=new Ee);var ii=ee.get(a);if(ii)return ii;if(ee.set(a,Y),!ri)var ai=f?jf(a):ln(a);return Fd(ai||a,function(dn,bt){ai&&(bt=dn,dn=a[bt]),Xo(Y,bt,sn(dn,u,f,_,bt,a,ee))}),Y}function Of(a){return vt(a)?Hd(a):{}}function Sf(a,u,f){var _=u(a);return cn(a)?_:jd(_,f(a))}function Ef(a){return _t.call(a)}function Mf(a){if(!vt(a)||qf(a))return!1;var u=ni(a)||Fo(a)?Wd:$d;return u.test(we(a))}function If(a){if(!Jo(a))return Qd(a);var u=[];for(var f in Object(a))ie.call(a,f)&&f!="constructor"&&u.push(f);return u}function Zf(a,u){if(u)return a.slice();var f=new a.constructor(a.length);return a.copy(f),f}function un(a){var u=new a.constructor(a.byteLength);return new qo(u).set(new qo(a)),u}function $f(a,u){var f=u?un(a.buffer):a.buffer;return new a.constructor(f,a.byteOffset,a.byteLength)}function Pf(a,u,f){var _=u?f(jo(a),!0):jo(a);return Ao(_,xd,new a.constructor)}function Nf(a){var u=new a.constructor(a.source,Zd.exec(a));return u.lastIndex=a.lastIndex,u}function Cf(a,u,f){var _=u?f(Uo(a),!0):Uo(a);return Ao(_,Ad,new a.constructor)}function Rf(a){return Bo?Object(Bo.call(a)):{}}function xf(a,u){var f=u?un(a.buffer):a.buffer;return new a.constructor(f,a.byteOffset,a.length)}function Af(a,u){var f=-1,_=a.length;for(u||(u=Array(_));++f<_;)u[f]=a[f];return u}function Qo(a,u,f,_){f||(f={});for(var A=-1,U=u.length;++A<U;){var ee=u[A],Y=void 0;Xo(f,ee,Y===void 0?a[ee]:Y)}return f}function Ff(a,u){return Qo(a,Ko(a),u)}function jf(a){return Sf(a,ln,Ko)}function wt(a,u){var f=a.__data__;return Wf(u)?f[typeof u=="string"?"string":"hash"]:f.map}function Me(a,u){var f=Yd(a,u);return Mf(f)?f:void 0}var Ko=Ho?en(Ho,Object):Jf,ye=Ef;(nn&&ye(new nn(new ArrayBuffer(1)))!=oe||qe&&ye(new qe)!=g||rn&&ye(rn.resolve())!=P||on&&ye(new on)!=V||an&&ye(new an)!=$)&&(ye=function(a){var u=_t.call(a),f=u==k?a.constructor:void 0,_=f?we(f):void 0;if(_)switch(_){case Kd:return oe;case Jd:return g;case ef:return P;case tf:return V;case nf:return $}return u});function Uf(a){var u=a.length,f=a.constructor(u);return u&&typeof a[0]=="string"&&ie.call(a,"index")&&(f.index=a.index,f.input=a.input),f}function Yf(a){return typeof a.constructor=="function"&&!Jo(a)?Of(qd(a)):{}}function Lf(a,u,f,_){var A=a.constructor;switch(u){case We:return un(a);case c:case l:return new A(+a);case oe:return $f(a,_);case pt:case Eo:case Mo:case Io:case Zo:case $o:case Po:case No:case Co:return xf(a,_);case g:return Pf(a,_,f);case b:case D:return new A(a);case W:return Nf(a);case V:return Cf(a,_,f);case T:return Rf(a)}}function Gf(a,u){return u=u??o,!!u&&(typeof a=="number"||Pd.test(a))&&a>-1&&a%1==0&&a<u}function Wf(a){var u=typeof a;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?a!=="__proto__":a===null}function qf(a){return!!Yo&&Yo in a}function Jo(a){var u=a&&a.constructor,f=typeof u=="function"&&u.prototype||gt;return a===f}function we(a){if(a!=null){try{return Lo.call(a)}catch{}try{return a+""}catch{}}return""}function Hf(a){return sn(a,!0,!0)}function ei(a,u){return a===u||a!==a&&u!==u}function Vf(a){return Bf(a)&&ie.call(a,"callee")&&(!Vd.call(a,"callee")||_t.call(a)==i)}var cn=Array.isArray;function ti(a){return a!=null&&Qf(a.length)&&!ni(a)}function Bf(a){return Kf(a)&&ti(a)}var Xf=Xd||eh;function ni(a){var u=vt(a)?_t.call(a):"";return u==w||u==p}function Qf(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=o}function vt(a){var u=typeof a;return!!a&&(u=="object"||u=="function")}function Kf(a){return!!a&&typeof a=="object"}function ln(a){return ti(a)?Df(a):If(a)}function Jf(){return[]}function eh(){return!1}e.exports=Hf}(ht,ht.exports);var _d=ht.exports;const yd=gd(_d),Oe=(e,t)=>new Date(e.getTime()-bo(t,e));class G{constructor(t){C(this,"timeframeText");C(this,"key");C(this,"display");C(this,"timeframeLength");C(this,"allowedTiers");C(this,"defaultResponseGranularity");C(this,"dataGranularity");C(this,"isRelative");C(this,"fineGrainedDefaultGranularity");C(this,"_startCustom");C(this,"_endCustom");C(this,"_allowedGranularitiesOverride");this.display=t.display,this.timeframeText=t.timeframeText,this.key=t.key,this.timeframeLength=t.timeframeLength,this.allowedTiers=t.allowedTiers,this.defaultResponseGranularity=t.defaultResponseGranularity,this.dataGranularity=t.dataGranularity,this.isRelative=t.isRelative,this._startCustom=t.startCustom,this._endCustom=t.endCustom,this._allowedGranularitiesOverride=t.allowedGranularitiesOverride,this.fineGrainedDefaultGranularity=t.fineGrainedDefaultGranularity}rawEnd(t){return this._endCustom||new Date}rawStart(t){return this._startCustom||new Date(this.rawEnd().getTime()-this.timeframeLengthMs())}timeframeLengthMs(){return this.timeframeLength()*1e3}maximumTimeframeLength(){return this.timeframeLength()}allowedGranularities(t){if(this._allowedGranularitiesOverride&&t)return new Set(this._allowedGranularitiesOverride);const n=new Set,r=this.maximumTimeframeLength()/3600;return r<=6&&n.add("minutely"),r>=2&&r<=7*24&&n.add("hourly"),r>=2*24&&n.add("daily"),r>=2*24*14&&n.add("weekly"),n}cacheKey(){return this.key!=="custom"?this.key:`${this.rawStart().toISOString()}-${this.rawEnd().toISOString()}`}v4Query(t){return this.key==="custom"?{type:"absolute",start:this.rawStart(),end:this.rawEnd(),tz:t}:{type:"relative",time_range:this.key,tz:t}}tzAdjustedDate(t){if(!t)return new Date;const n=cd(new Date,new Intl.DateTimeFormat().resolvedOptions().timeZone);return vo(n,t)}}class wd extends G{rawStart(t){let n=Q(this.tzAdjustedDate(t),{weekStartsOn:1});return t&&(n=Oe(n,t)),n}maximumTimeframeLength(){return 60*60*24*7}}class vd extends G{rawStart(t){let n=ze(this.tzAdjustedDate(t));return t&&(n=Oe(n,t)),n}maximumTimeframeLength(){return 60*60*24*31}}class bd extends G{rawEnd(t){let n=Q(this.tzAdjustedDate(t),{weekStartsOn:1});return t&&(n=Oe(n,t)),n}rawStart(t){const n=this.tzAdjustedDate(t);let r=Q(n.setDate(n.getDate()-7),{weekStartsOn:1});return t&&(r=Oe(r,t)),r}}class Td extends G{rawEnd(t){let n=ze(this.tzAdjustedDate(t));return t&&(n=Oe(n,t)),n}rawStart(t){let n=ze(io(this.tzAdjustedDate(t)));return t&&(n=Oe(n,t)),n}}const Oo=new Map([[v.FIFTEEN_MIN,new G({key:v.FIFTEEN_MIN,display:"Last 15 minutes",timeframeText:"15 minutes",timeframeLength:()=>60*15,defaultResponseGranularity:"minutely",dataGranularity:"minutely",isRelative:!0,fineGrainedDefaultGranularity:"thirtySecondly",allowedTiers:["free","trial","plus","enterprise"],allowedGranularitiesOverride:["tenSecondly","thirtySecondly","minutely"]})],[v.ONE_HOUR,new G({key:v.ONE_HOUR,display:"Last hour",timeframeText:"One hour",timeframeLength:()=>60*60*1,defaultResponseGranularity:"minutely",dataGranularity:"minutely",isRelative:!0,fineGrainedDefaultGranularity:"minutely",allowedTiers:["free","trial","plus","enterprise"],allowedGranularitiesOverride:["tenSecondly","thirtySecondly","minutely","fiveMinutely","tenMinutely"]})],[v.SIX_HOUR,new G({key:v.SIX_HOUR,display:"Last 6 hours",timeframeText:"6 hours",timeframeLength:()=>60*60*6,defaultResponseGranularity:"hourly",dataGranularity:"hourly",isRelative:!0,fineGrainedDefaultGranularity:"fiveMinutely",allowedTiers:["free","trial","plus","enterprise"],allowedGranularitiesOverride:["thirtySecondly","minutely","fiveMinutely","tenMinutely","thirtyMinutely","hourly"]})],[v.TWELVE_HOUR,new G({key:v.TWELVE_HOUR,display:"Last 12 hours",timeframeText:"12 hours",timeframeLength:()=>60*60*12,defaultResponseGranularity:"hourly",dataGranularity:"hourly",isRelative:!0,fineGrainedDefaultGranularity:"tenMinutely",allowedTiers:["free","trial","plus","enterprise"],allowedGranularitiesOverride:["minutely","fiveMinutely","tenMinutely","thirtyMinutely","hourly"]})],[v.ONE_DAY,new G({key:v.ONE_DAY,display:"Last 24 hours",timeframeText:"24 hours",timeframeLength:()=>60*60*24,defaultResponseGranularity:"hourly",dataGranularity:"hourly",isRelative:!0,fineGrainedDefaultGranularity:"thirtyMinutely",allowedTiers:["free","trial","plus","enterprise"],allowedGranularitiesOverride:["fiveMinutely","tenMinutely","thirtyMinutely","hourly"]})],[v.SEVEN_DAY,new G({key:v.SEVEN_DAY,display:"Last 7 days",timeframeText:"7 days",timeframeLength:()=>60*60*24*7,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!0,fineGrainedDefaultGranularity:"twoHourly",allowedTiers:["trial","plus","enterprise"],allowedGranularitiesOverride:["thirtyMinutely","hourly","twoHourly","twelveHourly","daily"]})],[v.THIRTY_DAY,new G({key:v.THIRTY_DAY,display:"Last 30 days",timeframeText:"30 days",timeframeLength:()=>60*60*24*30,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!0,fineGrainedDefaultGranularity:"twelveHourly",allowedTiers:["trial","plus","enterprise"],allowedGranularitiesOverride:["hourly","twoHourly","twelveHourly","daily","weekly"]})],[v.CURRENT_WEEK,new wd({key:v.CURRENT_WEEK,display:"This week",timeframeText:"Week",timeframeLength:()=>{const e=Q(new Date,{weekStartsOn:1});return(ut(Hr(new Date,1)).getTime()-e.getTime())/1e3},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,fineGrainedDefaultGranularity:"twoHourly",allowedTiers:["plus","enterprise"],allowedGranularitiesOverride:["thirtyMinutely","hourly","twoHourly","twelveHourly","daily"]})],[v.CURRENT_MONTH,new vd({key:v.CURRENT_MONTH,display:"This month",timeframeText:"Month",timeframeLength:()=>{const e=ze(new Date);return(ut(Hr(new Date,1)).getTime()-e.getTime())/1e3},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]})],[v.PREVIOUS_WEEK,new bd({key:v.PREVIOUS_WEEK,display:"Previous week",timeframeText:"Week",timeframeLength:()=>60*60*24*7,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,fineGrainedDefaultGranularity:"twoHourly",allowedTiers:["plus","enterprise"],allowedGranularitiesOverride:["thirtyMinutely","hourly","twoHourly","twelveHourly","daily"]})],[v.PREVIOUS_MONTH,new Td({key:v.PREVIOUS_MONTH,display:"Previous month",timeframeText:"Month",timeframeLength:()=>{let e=0;const t=ze(new Date),n=ze(io(new Date));return t.getTimezoneOffset()!==n.getTimezoneOffset()&&(e=So(t,n)),60*60*24*$l(new Date().setMonth(new Date().getMonth()-1))+Nl(e)},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]})]]);function zd(e){const t=new Date(e.start),n=new Date(e.end),r=(n.getTime()-t.getTime())/1e3;return e.timePeriodsKey&&yd(Oo.get(e.timePeriodsKey))||new G({key:"custom",timeframeText:"custom",display:"custom",startCustom:t,endCustom:n,timeframeLength:()=>r,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["free","plus","enterprise"]})}function Dd(e){return{...e.key!=="custom"&&{timePeriodsKey:e.key},start:e.rawStart(),end:e.rawEnd()}}function kd(e){return{key:e.key,display:e.display,timeframeText:e.timeframeText,timeframeLength:()=>e.key,start:()=>e.rawStart(),end:()=>e.rawEnd()}}function So(e,t){return Cl(e.getTimezoneOffset()-t.getTimezoneOffset())}const Od={"15M":v.FIFTEEN_MIN,"1H":v.ONE_HOUR,"6H":v.SIX_HOUR,"12H":v.TWELVE_HOUR,"24H":v.ONE_DAY,"7D":v.SEVEN_DAY,"15m":v.FIFTEEN_MIN,"1h":v.ONE_HOUR,"6h":v.SIX_HOUR,"12h":v.TWELVE_HOUR,"24h":v.ONE_DAY,"7d":v.SEVEN_DAY,"30d":v.THIRTY_DAY,current_week:v.CURRENT_WEEK,current_month:v.CURRENT_MONTH,previous_week:v.PREVIOUS_WEEK,previous_month:v.PREVIOUS_MONTH};class mt{constructor(t){C(this,"_seed");this._seed=t}next(t,n){const r=Math.sin(this._seed++)*1e4,o=r-Math.floor(r);return Math.floor(o*(n-t+1))+t}}const Sd=(e,t,n)=>{const r=Jt(10,1e4),o=new mt(r),i=Date.now()-6*60*60*1e3,s=Date.now(),c=[];let l=0;for(let p=i;p<=s;p+=60*60*1e3)if(t)for(const g in t)t[g].forEach(b=>{l+=o.next(50,500);const k={[g]:b,[e.name]:l},P={version:"1.0",timestamp:new Date(p).toISOString(),event:k};c.push(P)});else{l+=o.next(50,500);const g={version:"1.0",timestamp:new Date(p).toISOString(),event:{[e.name]:l}};c.push(g)}const h={};if(t)for(const p in t)h[p]={},t[p].forEach(g=>{h[p][g]={name:g,deleted:!1}});const w={start_ms:i,end_ms:s,start:new Date(i).toISOString(),end:new Date(s).toISOString(),query_id:"12345",metric_names:[e.name],metric_units:{[e.name]:e.unit},granularity_ms:60*60*1e3,display:h,...n??{}};return{data:c,meta:w}},Ed=(e,t)=>{const n=Jt(10,1e4),r=new mt(n),o=Date.now()-6*60*60*1e3,i=Date.now(),s=[],c={};e.forEach(h=>{c[h.name]=0});for(let h=o;h<=i;h+=60*60*1e3){const w={};e.forEach(g=>{c[g.name]+=r.next(50,500),w[g.name]=c[g.name]});const p={version:"1.0",timestamp:new Date(h).toISOString(),event:w};s.push(p)}const l={start_ms:o,end_ms:i,start:new Date(o).toISOString(),end:new Date(i).toISOString(),query_id:"12345",metric_names:e.map(h=>h.name),metric_units:e.reduce((h,w)=>(h[w.name]=w.unit,h),{}),granularity_ms:60*60*1e3,display:{},...t??{}};return{data:s,meta:l}},Md=(e,t,n)=>{const r=Math.floor(Math.random()*9991)+10,o=new mt(r),i=Date.now()-6*60*60*1e3,s=Date.now(),c=new Date((i+s)/2).toISOString(),l=[];if(t){const p=Object.keys(t),g=Object.values(t),b=(k,P)=>{if(P===p.length){e.forEach(W=>{k[W.name]=o.next(1e3,5e7)}),l.push({version:"1.0",timestamp:new Date().toISOString(),event:{...k}});return}g[P].forEach(W=>{b({...k,[p[P]]:W},P+1)})};b({},0)}else{const p={};e.forEach(g=>{p[g.name]=o.next(50,500)}),l.push({version:"1.0",timestamp:c,event:p})}const h={};if(t)for(const p in t)h[p]={},t[p].forEach(g=>{h[p][g]={name:g,deleted:!1}});const w={start_ms:i,end_ms:s,start:new Date(i).toISOString(),end:new Date(s).toISOString(),query_id:"12345",metric_names:e.map(p=>p.name),metric_units:e.reduce((p,g)=>(p[g.name]=g.unit,p),{}),truncated:!1,limit:50,display:h,granularity_ms:s-i,...n??{}};return{data:l,meta:w}};function Jt(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1)+e)}m.DeltaQueryTime=pd,m.Granularities=Ge,m.REFRESH_INTERVAL_MS=3e4,m.SeededRandom=mt,m.TIMEFRAME_LOOKUP=Od,m.TimePeriods=Oo,m.Timeframe=G,m.TimeframeKeys=v,m.TimeseriesQueryTime=md,m.UnaryQueryTime=ko,m.aiExploreAggregations=Ot,m.basicExploreAggregations=Be,m.ceilToNearestTimeGrain=Kt,m.dashboardTileTypes=wc,m.dashboardsSchemaV1=yi,m.datasourceToFilterableDimensions=_n,m.datePickerSelectionToTimeframe=zd,m.dstOffsetHours=So,m.exploreAggregations=kt,m.exploreFilterTypesV2=Tt,m.filterableAiExploreDimensions=ue,m.filterableBasicExploreDimensions=ae,m.filterableExploreDimensions=se,m.filterableRequestDimensions=hn,m.filterableRequestMetrics=gn,m.filterableRequestWildcardDimensions=fi,m.floorToNearestTimeGrain=Do,m.formatISOTimeWithTZ=ld,m.formatTime=Qt,m.formatTimeRange=dd,m.generateCrossSectionalData=Md,m.generateMultipleMetricTimeSeriesData=Ed,m.generateSingleMetricTimeSeriesData=Sd,m.getFieldDataSources=Dc,m.granularitiesToOptions=fd,m.granularityMsToQuery=To,m.granularityValues=Ve,m.msToGranularity=hd,m.parseDashboardConfig=zc,m.queryDatasources=mi,m.queryableAiExploreDimensions=Qe,m.queryableBasicExploreDimensions=$e,m.queryableExploreDimensions=Xe,m.queryableRequestDimensions=fn,m.queryableRequestMetrics=pn,m.queryableRequestWildcardDimensions=mn,m.rand=Jt,m.relativeTimeRangeValuesRequestV2=hi,m.relativeTimeRangeValuesV4=Dt,m.reportChartTypes=si,m.requestFilterTypeEmptyV2=zt,m.requestFilterTypeEqualsV2=ui,m.requestFilterTypeMetricV2=ci,m.requestFilterTypeWildcardV2=li,m.stripUnknownFilters=pi,m.timeRangeTypeV2=di,m.timeframeToDatepickerSelection=Dd,m.timeframeToDatepickerTimeperiod=kd,m.zApiUsageQuery=xr,m.zBarChartSchema=Ir,m.zBasicQuery=Ar,m.zDashboardConfig=Gr,m.zDonutChartSchema=Pr,m.zGaugeChartSchema=$r,m.zLlmUsageQuery=Fr,m.zMetricCardSchema=Cr,m.zSingleValueSchema=Rr,m.zSlottableSchema=Mr,m.zTileConfig=Lr,m.zTileDefinition=Ur,m.zTileLayout=Yr,m.zTimeseriesChartSchema=Zr,m.zTopNTableSchema=Nr,m.zValidDashboardQuery=jr,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})});
19
19
  //# sourceMappingURL=vitals-utilities.umd.js.map