@kong-ui-public/analytics-utilities 10.1.6-pr.2342.d52216ec9.0 → 10.1.6-pr.2346.35af65130.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.
Files changed (81) hide show
  1. package/dist/types/constants.d.ts +2 -0
  2. package/dist/types/constants.d.ts.map +1 -0
  3. package/dist/types/dashboardSchema.d.ts +2978 -0
  4. package/dist/types/dashboardSchema.d.ts.map +1 -0
  5. package/dist/types/dashboardSchema.v2.d.ts +2976 -0
  6. package/dist/types/dashboardSchema.v2.d.ts.map +1 -0
  7. package/dist/types/dashboardSchemaZod.v2.d.ts +2020 -0
  8. package/dist/types/dashboardSchemaZod.v2.d.ts.map +1 -0
  9. package/dist/types/filters.d.ts +3 -0
  10. package/dist/types/filters.d.ts.map +1 -0
  11. package/dist/types/format.d.ts +15 -0
  12. package/dist/types/format.d.ts.map +1 -0
  13. package/dist/types/format.spec.tz.d.ts +2 -0
  14. package/dist/types/format.spec.tz.d.ts.map +1 -0
  15. package/dist/types/granularity.d.ts +27 -0
  16. package/dist/types/granularity.d.ts.map +1 -0
  17. package/dist/types/index.d.ts +11 -0
  18. package/dist/types/index.d.ts.map +1 -0
  19. package/dist/types/queryTime.d.ts +36 -0
  20. package/dist/types/queryTime.d.ts.map +1 -0
  21. package/dist/types/queryTime.spec.tz.d.ts +2 -0
  22. package/dist/types/queryTime.spec.tz.d.ts.map +1 -0
  23. package/dist/types/specUtils.d.ts +3 -0
  24. package/dist/types/specUtils.d.ts.map +1 -0
  25. package/dist/types/timeframes.d.ts +33 -0
  26. package/dist/types/timeframes.d.ts.map +1 -0
  27. package/dist/types/types/analytics-config.d.ts +23 -0
  28. package/dist/types/types/analytics-config.d.ts.map +1 -0
  29. package/dist/types/types/chart-types.d.ts +3 -0
  30. package/dist/types/types/chart-types.d.ts.map +1 -0
  31. package/dist/types/types/datepicker-selection.d.ts +6 -0
  32. package/dist/types/types/datepicker-selection.d.ts.map +1 -0
  33. package/dist/types/types/druid-granularity.d.ts +6 -0
  34. package/dist/types/types/druid-granularity.d.ts.map +1 -0
  35. package/dist/types/types/explore/advanced.d.ts +20 -0
  36. package/dist/types/types/explore/advanced.d.ts.map +1 -0
  37. package/dist/types/types/explore/ai.d.ts +20 -0
  38. package/dist/types/types/explore/ai.d.ts.map +1 -0
  39. package/dist/types/types/explore/all.d.ts +18 -0
  40. package/dist/types/types/explore/all.d.ts.map +1 -0
  41. package/dist/types/types/explore/basic.d.ts +31 -0
  42. package/dist/types/types/explore/basic.d.ts.map +1 -0
  43. package/dist/types/types/explore/common.d.ts +34 -0
  44. package/dist/types/types/explore/common.d.ts.map +1 -0
  45. package/dist/types/types/explore/index.d.ts +8 -0
  46. package/dist/types/types/explore/index.d.ts.map +1 -0
  47. package/dist/types/types/explore/requests.d.ts +57 -0
  48. package/dist/types/types/explore/requests.d.ts.map +1 -0
  49. package/dist/types/types/explore/result.d.ts +48 -0
  50. package/dist/types/types/explore/result.d.ts.map +1 -0
  51. package/dist/types/types/explore/util.d.ts +8 -0
  52. package/dist/types/types/explore/util.d.ts.map +1 -0
  53. package/dist/types/types/index.d.ts +12 -0
  54. package/dist/types/types/index.d.ts.map +1 -0
  55. package/dist/types/types/query-bridge.d.ts +25 -0
  56. package/dist/types/types/query-bridge.d.ts.map +1 -0
  57. package/dist/types/types/query-time.d.ts +13 -0
  58. package/dist/types/types/query-time.d.ts.map +1 -0
  59. package/dist/types/types/time-period.d.ts +9 -0
  60. package/dist/types/types/time-period.d.ts.map +1 -0
  61. package/dist/types/types/timeframe-keys.d.ts +16 -0
  62. package/dist/types/types/timeframe-keys.d.ts.map +1 -0
  63. package/dist/types/types/timeframe-options.d.ts +16 -0
  64. package/dist/types/types/timeframe-options.d.ts.map +1 -0
  65. package/dist/types/types/timeframe.d.ts +17 -0
  66. package/dist/types/types/timeframe.d.ts.map +1 -0
  67. package/dist/types/utils/SeedRandom.d.ts +6 -0
  68. package/dist/types/utils/SeedRandom.d.ts.map +1 -0
  69. package/dist/types/utils/chartDataGenerator.d.ts +9 -0
  70. package/dist/types/utils/chartDataGenerator.d.ts.map +1 -0
  71. package/dist/types/utils/helpers.d.ts +2 -0
  72. package/dist/types/utils/helpers.d.ts.map +1 -0
  73. package/dist/types/utils/index.d.ts +4 -0
  74. package/dist/types/utils/index.d.ts.map +1 -0
  75. package/dist/vitals-utilities.cjs +19 -0
  76. package/dist/vitals-utilities.cjs.map +1 -0
  77. package/dist/vitals-utilities.es.js +6050 -0
  78. package/dist/vitals-utilities.es.js.map +1 -0
  79. package/dist/vitals-utilities.umd.js +19 -0
  80. package/dist/vitals-utilities.umd.js.map +1 -0
  81. package/package.json +4 -3
@@ -0,0 +1,19 @@
1
+ (function(m,q){typeof exports=="object"&&typeof module<"u"?q(exports):typeof define=="function"&&define.amd?define(["exports"],q):(m=typeof globalThis<"u"?globalThis:m||self,q(m["kong-ui-public-vitals-utilities"]={}))})(this,function(m){"use strict";var ih=Object.defineProperty;var ah=(m,q,v)=>q in m?ih(m,q,{enumerable:!0,configurable:!0,writable:!0,value:v}):m[q]=v;var C=(m,q,v)=>ah(m,typeof q!="symbol"?q+"":q,v);var v=(e=>(e.FIFTEEN_MIN="15m",e.ONE_HOUR="1h",e.SIX_HOUR="6h",e.TWELVE_HOUR="12h",e.ONE_DAY="24h",e.SEVEN_DAY="7d",e.THIRTY_DAY="30d",e.CURRENT_WEEK="current_week",e.CURRENT_MONTH="current_month",e.CURRENT_QUARTER="current_quarter",e.PREVIOUS_WEEK="previous_week",e.PREVIOUS_MONTH="previous_month",e.PREVIOUS_QUARTER="previous_quarter",e))(v||{});const li=["horizontal_bar","vertical_bar","timeseries_line","choropleth_map","timeseries_bar","donut","single_value"],zt=["in","not_in","selector"],di=["=","!="],fi=["=","!=","<",">","<=",">="],Dt=["empty","not_empty"],hi=["starts_with","ends_with"],mi=["absolute","relative"],kt=["15m","1h","6h","12h","24h","7d","current_week","previous_week","30d","current_month","previous_month"],He=["secondly","tenSecondly","thirtySecondly","minutely","fiveMinutely","tenMinutely","thirtyMinutely","hourly","twoHourly","twelveHourly","daily","weekly","trend"],Ie=e=>e.filter(t=>t!=="time"),Ze=["api","api_product","api_product_version","control_plane","control_plane_group","data_plane_node","gateway_service","portal","route","status_code","status_code_grouped","time"],ae=Ie(Ze),Ve=["active_services","request_count","request_per_minute","response_latency_average"],Be=[...Ze,"application","consumer","country_code","iso_code","upstream_status_code","upstream_status_code_grouped","response_source","data_plane_node_version","realm"],se=Ie(Be),Ot=[...Ve,"response_latency_p99","response_latency_p95","response_latency_p50","upstream_latency_p99","upstream_latency_p95","upstream_latency_p50","upstream_latency_average","kong_latency_p99","kong_latency_p95","kong_latency_p50","kong_latency_average","response_size_p99","response_size_p95","response_size_p50","response_size_average","response_size_sum","request_size_p99","request_size_p95","request_size_p50","request_size_average","request_size_sum"],Xe=["control_plane","control_plane_group","gateway_service","consumer","application","route","ai_provider","ai_response_model","ai_request_model","llm_cache_status","llm_embeddings_provider","llm_embeddings_model","time","realm","status_code","status_code_grouped","ai_plugin"],ue=Ie(Xe),St=["total_tokens","prompt_tokens","completion_tokens","ai_request_count","cost","llm_cache_embeddings_latency_average","llm_cache_fetch_latency_average","llm_latency_average","llm_embeddings_tokens","llm_embeddings_cost"],mn=["api","api_product","api_product_version","application","auth_type","client_ip","consumer","consumer_group","control_plane","control_plane_group","country_code","data_plane_node","data_plane_node_version","gateway_service","header_host","header_user_agent","http_method","iso_code","portal","realm","request_id","request_uri","response_header_content_type","response_source","route","service_port","service_protocol","sse","status_code_grouped","time","trace_id","upstream_uri","upstream_status_code_grouped","websocket"],pn=Ie(mn),gn=["auth_type","client_ip","country_code","data_plane_node_version","header_host","header_user_agent","http_method","request_id","request_uri","response_header_content_type","response_source","service_port","service_protocol","trace_id","upstream_uri"],pi=gn,_n=["ai_count","latencies_response_ms","latencies_upstream_ms","latencies_kong_gateway_ms","request_body_size","response_body_size","response_header_content_length","status_code","upstream_status_code"],yn=Ie(_n),gi=["15M","1H","6H","12H","24H","7D"],_i=["basic","api_usage","llm_usage"],wn={basic:new Set(ae),api_usage:new Set(se),llm_usage:new Set(ue)},yi=(e,t)=>t.filter(n=>wn[e].has(n.field)),wi=["horizontal_bar","vertical_bar","gauge","donut","timeseries_line","timeseries_bar","golden_signals","top_n","slottable","single_value"],$e={type:"string"},ce={type:"string"},vn={type:"boolean"},bn={type:["object","array"],items:{type:"string"},additionalProperties:{type:"string"}},Tn={type:"object",properties:{type:{type:"string",enum:["slottable"]},id:{type:"string"}},required:["type","id"],additionalProperties:!1},zn={type:"object",properties:{type:{type:"string",enum:["horizontal_bar","vertical_bar"]},stacked:{type:"boolean"},chartDatasetColors:bn,syntheticsDataKey:$e,chartTitle:ce,allowCsvExport:vn},required:["type"],additionalProperties:!1},Dn={type:"object",properties:{type:{type:"string",enum:["timeseries_line","timeseries_bar"]},stacked:{type:"boolean"},threshold:{type:"object",additionalProperties:{type:"number"}},chartDatasetColors:bn,syntheticsDataKey:$e,chartTitle:ce,allowCsvExport:vn},required:["type"],additionalProperties:!1},kn={type:"object",properties:{type:{type:"string",enum:["gauge"]},metricDisplay:{type:"string",enum:["hidden","single","full"]},reverseDataset:{type:"boolean"},numerator:{type:"number"},syntheticsDataKey:$e,chartTitle:ce},required:["type"],additionalProperties:!1},On={type:"object",properties:{type:{type:"string",enum:["donut"]},syntheticsDataKey:$e,chartTitle:ce},required:["type"],additionalProperties:!1},Sn={type:"object",properties:{chartTitle:ce,syntheticsDataKey:$e,type:{type:"string",enum:["top_n"]},description:{type:"string"},entityLink:{type:"string"}},required:["type"],additionalProperties:!1},En={type:"object",properties:{chartTitle:ce,type:{type:"string",enum:["golden_signals"]},longCardTitles:{type:"boolean"},description:{type:"string"},percentileLatency:{type:"boolean"}},required:["type"],additionalProperties:!1},Mn={type:"object",properties:{type:{type:"string",enum:["single_value"]},decimalPoints:{type:"number"},chartTitle:ce},required:["type"],additionalProperties:!1},Et={granularity:{type:"string",description:'Force time grouping into buckets of this duration. Only has an effect if "time" is in the "dimensions" list.',enum:He},time_range:{type:"object",description:"The time range to query.",anyOf:[{type:"object",properties:{tz:{type:"string",default:"Etc/UTC"},type:{type:"string",enum:["relative"]},time_range:{type:"string",enum:kt,default:"1h"}},required:["type","time_range"],additionalProperties:!1},{type:"object",description:"A duration representing an exact start and end time.",properties:{tz:{type:"string"},type:{type:"string",enum:["absolute"]},start:{type:"string"},end:{type:"string"}},required:["type","start","end"],additionalProperties:!1}],default:{type:"relative",time_range:"1h"}},limit:{type:"number"},meta:{type:"object"}},Mt=e=>({type:"array",description:"List of aggregated metrics to collect across the requested time span.",items:{type:"string",enum:e}}),It=e=>({type:"array",description:"List of attributes or entity types to group by.",minItems:0,maxItems:2,items:{type:"string",enum:e}}),Qe=e=>({type:"array",description:"A list of filters to apply to the query",items:{oneOf:[{type:"object",description:"In filter",properties:{field:{type:"string",enum:e},operator:{type:"string",enum:zt},value:{type:"array",items:{type:["string","number","null"]}}},required:["field","operator","value"],additionalProperties:!1},{type:"object",description:"Empty filter",properties:{field:{type:"string",enum:e},operator:{type:"string",enum:Dt}},required:["field","operator"],additionalProperties:!1}]}}),In={type:"object",description:"A query to launch at the advanced explore API",properties:{datasource:{type:"string",enum:["advanced"]},metrics:Mt(Ot),dimensions:It(Be),filters:Qe(se),...Et},required:["datasource"],additionalProperties:!1},Zn={type:"object",description:"A query to launch at the basic explore API",properties:{datasource:{type:"string",enum:["basic"]},metrics:Mt(Ve),dimensions:It(Ze),filters:Qe(ae),...Et},required:["datasource"],additionalProperties:!1},$n={type:"object",description:"A query to launch at the AI explore API",properties:{datasource:{type:"string",enum:["ai"]},metrics:Mt(St),dimensions:It(Xe),filters:Qe(ue),...Et},required:["datasource"],additionalProperties:!1},Pn={anyOf:[In,Zn,$n]},Nn={type:"object",properties:{query:Pn,chart:{anyOf:[zn,kn,On,Dn,En,Sn,Tn,Mn]}},required:["query","chart"],additionalProperties:!1},Cn={type:"object",properties:{position:{type:"object",properties:{col:{type:"number"},row:{type:"number"}},description:"Position of the tile in the grid.",required:["col","row"],additionalProperties:!1},size:{type:"object",properties:{cols:{type:"number"},rows:{type:"number"},fitToContent:{type:"boolean"}},description:"Number of columns and rows the tile occupies. If fitToContent is true for every tile in a row, and each tile only occupies 1 row, then the row will auto-fit to its content.",required:["cols","rows"],additionalProperties:!1}},required:["position","size"],additionalProperties:!1},Rn={type:"object",properties:{definition:Nn,layout:Cn,id:{type:"string",description:"Unique identifier for the tile. If not provided, one will be generated."}},required:["definition","layout"],additionalProperties:!1},vi={type:"object",properties:{tiles:{type:"array",items:Rn},tileHeight:{type:"number",description:"Height of each tile in pixels."},gridSize:{type:"object",properties:{cols:{type:"number"},rows:{type:"number"}},description:"Number of columns and rows in the grid.",required:["cols","rows"],additionalProperties:!1},global_filters:Qe([...new Set([...se,...ae,...ue])])},required:["tiles"],additionalProperties:!1},bi=Object.freeze(Object.defineProperty({__proto__:null,aiQuerySchema:$n,barChartSchema:zn,basicQuerySchema:Zn,dashboardConfigSchema:vi,dashboardTileTypes:wi,donutChartSchema:On,exploreV4QuerySchema:In,gaugeChartSchema:kn,metricCardSchema:En,singleValueSchema:Mn,slottableSchema:Tn,tileConfigSchema:Rn,tileDefinitionSchema:Nn,tileLayoutSchema:Cn,timeseriesChartSchema:Dn,topNTableSchema:Sn,validDashboardQuery:Pn},Symbol.toStringTag,{value:"Module"}));function d(e,t,n){function r(u,l){var f;Object.defineProperty(u,"_zod",{value:u._zod??{},enumerable:!1}),(f=u._zod).traits??(f.traits=new Set),u._zod.traits.add(e),t(u,l);for(const w in s.prototype)w in u||Object.defineProperty(u,w,{value:s.prototype[w].bind(u)});u._zod.constr=s,u._zod.def=l}const o=(n==null?void 0:n.Parent)??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function s(u){var l;const f=n!=null&&n.Parent?new i:this;r(f,u),(l=f._zod).deferred??(l.deferred=[]);for(const w of f._zod.deferred)w();return f}return Object.defineProperty(s,"init",{value:r}),Object.defineProperty(s,Symbol.hasInstance,{value:u=>{var l,f;return n!=null&&n.Parent&&u instanceof n.Parent?!0:(f=(l=u==null?void 0:u._zod)==null?void 0:l.traits)==null?void 0:f.has(e)}}),Object.defineProperty(s,"name",{value:e}),s}class Pe extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const xn={};function te(e){return xn}function Ti(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function Zt(e,t){return typeof t=="bigint"?t.toString():t}function $t(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Pt(e){return e==null}function Nt(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function zi(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let o=(r.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(r)){const l=r.match(/\d?e-(\d?)/);l!=null&&l[1]&&(o=Number.parseInt(l[1]))}const i=n>o?n:o,s=Number.parseInt(e.toFixed(i).replace(".","")),u=Number.parseInt(t.toFixed(i).replace(".",""));return s%u/10**i}const An=Symbol("evaluating");function k(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==An)return r===void 0&&(r=An,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Di(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function le(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function we(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function jn(e){return JSON.stringify(e)}const Fn="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ke(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const ki=$t(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function Ne(e){if(Ke(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(Ke(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Un(e){return Ne(e)?{...e}:e}const Oi=new Set(["string","number","symbol"]);function ve(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function de(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n!=null&&n.parent)&&(r._zod.parent=e),r}function _(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Si(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Ei={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Mi(e,t){const n=e._zod.def,r=we(e._zod.def,{get shape(){const o={};for(const i in t){if(!(i in n.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(o[i]=n.shape[i])}return le(this,"shape",o),o},checks:[]});return de(e,r)}function Ii(e,t){const n=e._zod.def,r=we(e._zod.def,{get shape(){const o={...e._zod.def.shape};for(const i in t){if(!(i in n.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&delete o[i]}return le(this,"shape",o),o},checks:[]});return de(e,r)}function Zi(e,t){if(!Ne(t))throw new Error("Invalid input to extend: expected a plain object");const n=we(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return le(this,"shape",r),r},checks:[]});return de(e,n)}function $i(e,t){const n=we(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return le(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return de(e,n)}function Pi(e,t,n){const r=we(t._zod.def,{get shape(){const o=t._zod.def.shape,i={...o};if(n)for(const s in n){if(!(s in o))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(i[s]=e?new e({type:"optional",innerType:o[s]}):o[s])}else for(const s in o)i[s]=e?new e({type:"optional",innerType:o[s]}):o[s];return le(this,"shape",i),i},checks:[]});return de(t,r)}function Ni(e,t,n){const r=we(t._zod.def,{get shape(){const o=t._zod.def.shape,i={...o};if(n)for(const s in n){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(i[s]=new e({type:"nonoptional",innerType:o[s]}))}else for(const s in o)i[s]=new e({type:"nonoptional",innerType:o[s]});return le(this,"shape",i),i},checks:[]});return de(t,r)}function Ce(e,t=0){var n;for(let r=t;r<e.issues.length;r++)if(((n=e.issues[r])==null?void 0:n.continue)!==!0)return!0;return!1}function be(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Je(e){return typeof e=="string"?e:e==null?void 0:e.message}function ne(e,t,n){var o,i,s,u,l,f;const r={...e,path:e.path??[]};if(!e.message){const w=Je((s=(i=(o=e.inst)==null?void 0:o._zod.def)==null?void 0:i.error)==null?void 0:s.call(i,e))??Je((u=t==null?void 0:t.error)==null?void 0:u.call(t,e))??Je((l=n.customError)==null?void 0:l.call(n,e))??Je((f=n.localeError)==null?void 0:f.call(n,e))??"Invalid input";r.message=w}return delete r.inst,delete r.continue,t!=null&&t.reportInput||delete r.input,r}function Ct(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Re(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const Yn=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Zt,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ln=d("$ZodError",Yn),Gn=d("$ZodError",Yn,{Parent:Error});function Ci(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function Ri(e,t){const n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(const s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(u=>o({issues:u}));else if(s.code==="invalid_key")o({issues:s.issues});else if(s.code==="invalid_element")o({issues:s.issues});else if(s.path.length===0)r._errors.push(n(s));else{let u=r,l=0;for(;l<s.path.length;){const f=s.path[l];l===s.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(n(s))):u[f]=u[f]||{_errors:[]},u=u[f],l++}}};return o(e),r}const xi=e=>(t,n,r,o)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new Pe;if(s.issues.length){const u=new((o==null?void 0:o.Err)??e)(s.issues.map(l=>ne(l,i,te())));throw Fn(u,o==null?void 0:o.callee),u}return s.value},Ai=e=>async(t,n,r,o)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){const u=new((o==null?void 0:o.Err)??e)(s.issues.map(l=>ne(l,i,te())));throw Fn(u,o==null?void 0:o.callee),u}return s.value},Wn=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new Pe;return i.issues.length?{success:!1,error:new(e??Ln)(i.issues.map(s=>ne(s,o,te())))}:{success:!0,data:i.value}},ji=Wn(Gn),qn=e=>async(t,n,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>ne(s,o,te())))}:{success:!0,data:i.value}},Fi=qn(Gn),Ui=/^[cC][^\s-]{8,}$/,Yi=/^[0-9a-z]+$/,Li=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Gi=/^[0-9a-vA-V]{20}$/,Wi=/^[A-Za-z0-9]{27}$/,qi=/^[a-zA-Z0-9_-]{21}$/,Hi=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Vi=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Hn=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,Bi=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Xi="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Qi(){return new RegExp(Xi,"u")}const Ki=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ji=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,ea=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,ta=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,na=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Vn=/^[A-Za-z0-9_-]*$/,ra=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,oa=/^\+(?:[0-9]){6,14}[0-9]$/,Bn="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",ia=new RegExp(`^${Bn}$`);function Xn(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function aa(e){return new RegExp(`^${Xn(e)}$`)}function sa(e){const t=Xn({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${Bn}T(?:${r})$`)}const ua=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},ca=/^\d+$/,la=/^-?\d+(?:\.\d+)?/i,da=/true|false/i,fa=/null/i,ha=/^[^A-Z]*$/,ma=/^[^a-z]*$/,F=d("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Qn={number:"number",bigint:"bigint",object:"date"},Kn=d("$ZodCheckLessThan",(e,t)=>{F.init(e,t);const n=Qn[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,i=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Jn=d("$ZodCheckGreaterThan",(e,t)=>{F.init(e,t);const n=Qn[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,i=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),pa=d("$ZodCheckMultipleOf",(e,t)=>{F.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):zi(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),ga=d("$ZodCheckNumberFormat",(e,t)=>{var s;F.init(e,t),t.format=t.format||"float64";const n=(s=t.format)==null?void 0:s.includes("int"),r=n?"int":"number",[o,i]=Ei[t.format];e._zod.onattach.push(u=>{const l=u._zod.bag;l.format=t.format,l.minimum=o,l.maximum=i,n&&(l.pattern=ca)}),e._zod.check=u=>{const l=u.value;if(n){if(!Number.isInteger(l)){u.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?u.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,continue:!t.abort}):u.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,continue:!t.abort});return}}l<o&&u.issues.push({origin:"number",input:l,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),l>i&&u.issues.push({origin:"number",input:l,code:"too_big",maximum:i,inst:e})}}),_a=d("$ZodCheckMaxLength",(e,t)=>{var n;F.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!Pt(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=t.maximum)return;const s=Ct(o);r.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),ya=d("$ZodCheckMinLength",(e,t)=>{var n;F.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!Pt(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const s=Ct(o);r.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),wa=d("$ZodCheckLengthEquals",(e,t)=>{var n;F.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!Pt(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,i=o.length;if(i===t.length)return;const s=Ct(o),u=i>t.length;r.issues.push({origin:s,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),et=d("$ZodCheckStringFormat",(e,t)=>{var n,r;F.init(e,t),e._zod.onattach.push(o=>{const i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),va=d("$ZodCheckRegex",(e,t)=>{et.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ba=d("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=ha),et.init(e,t)}),Ta=d("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=ma),et.init(e,t)}),za=d("$ZodCheckIncludes",(e,t)=>{F.init(e,t);const n=ve(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),Da=d("$ZodCheckStartsWith",(e,t)=>{F.init(e,t);const n=new RegExp(`^${ve(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),ka=d("$ZodCheckEndsWith",(e,t)=>{F.init(e,t);const n=new RegExp(`.*${ve(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),Oa=d("$ZodCheckOverwrite",(e,t)=>{F.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Sa{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
2
+ `).filter(s=>s),o=Math.min(...r.map(s=>s.length-s.trimStart().length)),i=r.map(s=>s.slice(o)).map(s=>" ".repeat(this.indent*2)+s);for(const s of i)this.content.push(s)}compile(){const t=Function,n=this==null?void 0:this.args,o=[...((this==null?void 0:this.content)??[""]).map(i=>` ${i}`)];return new t(...n,o.join(`
3
+ `))}}const Ea={major:4,minor:0,patch:17},E=d("$ZodType",(e,t)=>{var o;var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ea;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const i of r)for(const s of i._zod.onattach)s(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),(o=e._zod.deferred)==null||o.push(()=>{e._zod.run=e._zod.parse});else{const i=(s,u,l)=>{let f=Ce(s),w;for(const p of u){if(p._zod.def.when){if(!p._zod.def.when(s))continue}else if(f)continue;const g=s.issues.length,b=p._zod.check(s);if(b instanceof Promise&&(l==null?void 0:l.async)===!1)throw new Pe;if(w||b instanceof Promise)w=(w??Promise.resolve()).then(async()=>{await b,s.issues.length!==g&&(f||(f=Ce(s,g)))});else{if(s.issues.length===g)continue;f||(f=Ce(s,g))}}return w?w.then(()=>s):s};e._zod.run=(s,u)=>{const l=e._zod.parse(s,u);if(l instanceof Promise){if(u.async===!1)throw new Pe;return l.then(f=>i(f,r,u))}return i(l,r,u)}}e["~standard"]={validate:i=>{var s;try{const u=ji(e,i);return u.success?{value:u.data}:{issues:(s=u.error)==null?void 0:s.issues}}catch{return Fi(e,i).then(l=>{var f;return l.success?{value:l.data}:{issues:(f=l.error)==null?void 0:f.issues}})}},vendor:"zod",version:1}}),Rt=d("$ZodString",(e,t)=>{var n;E.init(e,t),e._zod.pattern=[...((n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)??[]].pop()??ua(e._zod.bag),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),M=d("$ZodStringFormat",(e,t)=>{et.init(e,t),Rt.init(e,t)}),Ma=d("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Vi),M.init(e,t)}),Ia=d("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Hn(r))}else t.pattern??(t.pattern=Hn());M.init(e,t)}),Za=d("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Bi),M.init(e,t)}),$a=d("$ZodURL",(e,t)=>{M.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:ra.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Pa=d("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Qi()),M.init(e,t)}),Na=d("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=qi),M.init(e,t)}),Ca=d("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Ui),M.init(e,t)}),Ra=d("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Yi),M.init(e,t)}),xa=d("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Li),M.init(e,t)}),Aa=d("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Gi),M.init(e,t)}),ja=d("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Wi),M.init(e,t)}),Fa=d("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=sa(t)),M.init(e,t)}),Ua=d("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=ia),M.init(e,t)}),Ya=d("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=aa(t)),M.init(e,t)}),La=d("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Hi),M.init(e,t)}),Ga=d("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Ki),M.init(e,t),e._zod.onattach.push(n=>{const r=n._zod.bag;r.format="ipv4"})}),Wa=d("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Ji),M.init(e,t),e._zod.onattach.push(n=>{const r=n._zod.bag;r.format="ipv6"}),e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),qa=d("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=ea),M.init(e,t)}),Ha=d("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=ta),M.init(e,t),e._zod.check=n=>{const[r,o]=n.value.split("/");try{if(!o)throw new Error;const i=Number(o);if(`${i}`!==o)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function er(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Va=d("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=na),M.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{er(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Ba(e){if(!Vn.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return er(n)}const Xa=d("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Vn),M.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{Ba(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Qa=d("$ZodE164",(e,t)=>{t.pattern??(t.pattern=oa),M.init(e,t)});function Ka(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const Ja=d("$ZodJWT",(e,t)=>{M.init(e,t),e._zod.check=n=>{Ka(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),tr=d("$ZodNumber",(e,t)=>{E.init(e,t),e._zod.pattern=e._zod.bag.pattern??la,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const o=n.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return n;const i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),n}}),es=d("$ZodNumber",(e,t)=>{ga.init(e,t),tr.init(e,t)}),ts=d("$ZodBoolean",(e,t)=>{E.init(e,t),e._zod.pattern=da,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const o=n.value;return typeof o=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}}),ns=d("$ZodNull",(e,t)=>{E.init(e,t),e._zod.pattern=fa,e._zod.values=new Set([null]),e._zod.parse=(n,r)=>{const o=n.value;return o===null||n.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),n}}),rs=d("$ZodUnknown",(e,t)=>{E.init(e,t),e._zod.parse=n=>n}),os=d("$ZodNever",(e,t)=>{E.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function nr(e,t,n){e.issues.length&&t.issues.push(...be(n,e.issues)),t.value[n]=e.value}const is=d("$ZodArray",(e,t)=>{E.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const i=[];for(let s=0;s<o.length;s++){const u=o[s],l=t.element._zod.run({value:u,issues:[]},r);l instanceof Promise?i.push(l.then(f=>nr(f,n,s))):nr(l,n,s)}return i.length?Promise.all(i).then(()=>n):n}});function tt(e,t,n,r){e.issues.length&&t.issues.push(...be(n,e.issues)),e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}const as=d("$ZodObject",(e,t)=>{E.init(e,t);const n=$t(()=>{const p=Object.keys(t.shape);for(const b of p)if(!t.shape[b]._zod.traits.has("$ZodType"))throw new Error(`Invalid element at key "${b}": expected a Zod schema`);const g=Si(t.shape);return{shape:t.shape,keys:p,keySet:new Set(p),numKeys:p.length,optionalKeys:new Set(g)}});k(e._zod,"propValues",()=>{const p=t.shape,g={};for(const b in p){const O=p[b]._zod;if(O.values){g[b]??(g[b]=new Set);for(const P of O.values)g[b].add(P)}}return g});const r=p=>{const g=new Sa(["shape","payload","ctx"]),b=n.value,O=D=>{const T=jn(D);return`shape[${T}]._zod.run({ value: input[${T}], issues: [] }, ctx)`};g.write("const input = payload.value;");const P=Object.create(null);let W=0;for(const D of b.keys)P[D]=`key_${W++}`;g.write("const newResult = {}");for(const D of b.keys){const T=P[D],$=jn(D);g.write(`const ${T} = ${O(D)};`),g.write(`
4
+ if (${T}.issues.length) {
5
+ payload.issues = payload.issues.concat(${T}.issues.map(iss => ({
6
+ ...iss,
7
+ path: iss.path ? [${$}, ...iss.path] : [${$}]
8
+ })));
9
+ }
10
+
11
+ if (${T}.value === undefined) {
12
+ if (${$} in input) {
13
+ newResult[${$}] = undefined;
14
+ }
15
+ } else {
16
+ newResult[${$}] = ${T}.value;
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=Ke,s=!xn.jitless,l=s&&ki.value,f=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 O=[];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?O.push(oe.then(gt=>tt(gt,p,$,b))):tt(oe,p,$,b)}}if(!f)return O.length?Promise.all(O).then(()=>p):p;const P=[],W=w.keySet,V=f._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?O.push($.then(Ge=>tt(Ge,p,T,b))):tt($,p,T,b)}return P.length&&p.issues.push({code:"unrecognized_keys",keys:P,input:b,inst:e}),O.length?Promise.all(O).then(()=>p):p}});function rr(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=>!Ce(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 or=d("$ZodUnion",(e,t)=>{E.init(e,t),k(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),k(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),k(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),k(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=>Nt(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 u=[];for(const l of t.options){const f=l._zod.run({value:o.value,issues:[]},i);if(f instanceof Promise)u.push(f),s=!0;else{if(f.issues.length===0)return f;u.push(f)}}return s?Promise.all(u).then(l=>rr(l,o,e,i)):rr(u,o,e,i)}}),ss=d("$ZodDiscriminatedUnion",(e,t)=>{or.init(e,t);const n=e._zod.parse;k(e._zod,"propValues",()=>{const o={};for(const i of t.options){const s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const[u,l]of Object.entries(s)){o[u]||(o[u]=new Set);for(const f of l)o[u].add(f)}}return o});const r=$t(()=>{var s;const o=t.options,i=new Map;for(const u of o){const l=(s=u._zod.propValues)==null?void 0:s[t.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(u)}"`);for(const f of l){if(i.has(f))throw new Error(`Duplicate discriminator value "${String(f)}"`);i.set(f,u)}}return i});e._zod.parse=(o,i)=>{const s=o.value;if(!Ke(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),o;const u=r.value.get(s==null?void 0:s[t.discriminator]);return u?u._zod.run(o,i):t.unionFallback?n(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),o)}}),us=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,f])=>ir(n,l,f)):ir(n,i,s)}});function xt(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(Ne(e)&&Ne(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=xt(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=xt(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 ir(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),Ce(e))return e;const r=xt(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 cs=d("$ZodRecord",(e,t)=>{E.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Ne(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 f=t.valueType._zod.run({value:o[l],issues:[]},r);f instanceof Promise?i.push(f.then(w=>{w.issues.length&&n.issues.push(...be(l,w.issues)),n.value[l]=w.value})):(f.issues.length&&n.issues.push(...be(l,f.issues)),n.value[l]=f.value)}let u;for(const l in o)s.has(l)||(u=u??[],u.push(l));u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:u})}else{n.value={};for(const s of Reflect.ownKeys(o)){if(s==="__proto__")continue;const u=t.keyType._zod.run({value:s,issues:[]},r);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(u.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(f=>ne(f,r,te())),input:s,path:[s],inst:e}),n.value[u.value]=u.value;continue}const l=t.valueType._zod.run({value:o[s],issues:[]},r);l instanceof Promise?i.push(l.then(f=>{f.issues.length&&n.issues.push(...be(s,f.issues)),n.value[u.value]=f.value})):(l.issues.length&&n.issues.push(...be(s,l.issues)),n.value[u.value]=l.value)}}return i.length?Promise.all(i).then(()=>n):n}}),ls=d("$ZodEnum",(e,t)=>{E.init(e,t);const n=Ti(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>Oi.has(typeof o)).map(o=>typeof o=="string"?ve(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}}),ds=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"?ve(n):n?ve(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}}),fs=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 Pe;return n.value=o,n}});function ar(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const hs=d("$ZodOptional",(e,t)=>{E.init(e,t),e._zod.optin="optional",e._zod.optout="optional",k(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),k(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Nt(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=>ar(i,n.value)):ar(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),ms=d("$ZodNullable",(e,t)=>{E.init(e,t),k(e._zod,"optin",()=>t.innerType._zod.optin),k(e._zod,"optout",()=>t.innerType._zod.optout),k(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Nt(n.source)}|null)$`):void 0}),k(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)}),ps=d("$ZodDefault",(e,t)=>{E.init(e,t),e._zod.optin="optional",k(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=>sr(i,t)):sr(o,t)}});function sr(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const gs=d("$ZodPrefault",(e,t)=>{E.init(e,t),e._zod.optin="optional",k(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))}),_s=d("$ZodNonOptional",(e,t)=>{E.init(e,t),k(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=>ur(i,e)):ur(o,e)}});function ur(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 ys=d("$ZodCatch",(e,t)=>{E.init(e,t),k(e._zod,"optin",()=>t.innerType._zod.optin),k(e._zod,"optout",()=>t.innerType._zod.optout),k(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)}}),ws=d("$ZodPipe",(e,t)=>{E.init(e,t),k(e._zod,"values",()=>t.in._zod.values),k(e._zod,"optin",()=>t.in._zod.optin),k(e._zod,"optout",()=>t.out._zod.optout),k(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=>cr(i,t,r)):cr(o,t,r)}});function cr(e,t,n){return e.issues.length?e:t.out._zod.run({value:e.value,issues:e.issues},n)}const vs=d("$ZodReadonly",(e,t)=>{E.init(e,t),k(e._zod,"propValues",()=>t.innerType._zod.propValues),k(e._zod,"values",()=>t.innerType._zod.values),k(e._zod,"optin",()=>t.innerType._zod.optin),k(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(lr):lr(o)}});function lr(e){return e.value=Object.freeze(e.value),e}const bs=d("$ZodCustom",(e,t)=>{F.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=>dr(i,n,r,e));dr(o,n,r,e)}});function dr(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(Re(o))}}class Ts{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 zs(){return new Ts}const nt=zs();function Ds(e,t){return new e({type:"string",..._(t)})}function ks(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,..._(t)})}function fr(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,..._(t)})}function Os(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,..._(t)})}function Ss(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",..._(t)})}function Es(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",..._(t)})}function Ms(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",..._(t)})}function Is(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,..._(t)})}function Zs(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,..._(t)})}function $s(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,..._(t)})}function Ps(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,..._(t)})}function Ns(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,..._(t)})}function Cs(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,..._(t)})}function Rs(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,..._(t)})}function xs(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,..._(t)})}function As(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,..._(t)})}function js(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,..._(t)})}function Fs(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,..._(t)})}function Us(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,..._(t)})}function Ys(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,..._(t)})}function Ls(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,..._(t)})}function Gs(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,..._(t)})}function Ws(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,..._(t)})}function qs(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,..._(t)})}function Hs(e,t){return new e({type:"string",format:"date",check:"string_format",..._(t)})}function Vs(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,..._(t)})}function Bs(e,t){return new e({type:"string",format:"duration",check:"string_format",..._(t)})}function Xs(e,t){return new e({type:"number",checks:[],..._(t)})}function Qs(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",..._(t)})}function Ks(e,t){return new e({type:"boolean",..._(t)})}function Js(e,t){return new e({type:"null",..._(t)})}function eu(e){return new e({type:"unknown"})}function tu(e,t){return new e({type:"never",..._(t)})}function hr(e,t){return new Kn({check:"less_than",..._(t),value:e,inclusive:!1})}function At(e,t){return new Kn({check:"less_than",..._(t),value:e,inclusive:!0})}function mr(e,t){return new Jn({check:"greater_than",..._(t),value:e,inclusive:!1})}function jt(e,t){return new Jn({check:"greater_than",..._(t),value:e,inclusive:!0})}function pr(e,t){return new pa({check:"multiple_of",..._(t),value:e})}function gr(e,t){return new _a({check:"max_length",..._(t),maximum:e})}function rt(e,t){return new ya({check:"min_length",..._(t),minimum:e})}function _r(e,t){return new wa({check:"length_equals",..._(t),length:e})}function nu(e,t){return new va({check:"string_format",format:"regex",..._(t),pattern:e})}function ru(e){return new ba({check:"string_format",format:"lowercase",..._(e)})}function ou(e){return new Ta({check:"string_format",format:"uppercase",..._(e)})}function iu(e,t){return new za({check:"string_format",format:"includes",..._(t),includes:e})}function au(e,t){return new Da({check:"string_format",format:"starts_with",..._(t),prefix:e})}function su(e,t){return new ka({check:"string_format",format:"ends_with",..._(t),suffix:e})}function xe(e){return new Oa({check:"overwrite",tx:e})}function uu(e){return xe(t=>t.normalize(e))}function cu(){return xe(e=>e.trim())}function lu(){return xe(e=>e.toLowerCase())}function du(){return xe(e=>e.toUpperCase())}function fu(e,t,n){return new e({type:"array",element:t,..._(n)})}function hu(e,t,n){return new e({type:"custom",check:"custom",fn:t,..._(n)})}function mu(e){const t=pu(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(Re(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(Re(o))}},e(n.value,n)));return t}function pu(e,t){const n=new F({check:"custom",..._(t)});return n._zod.check=e,n}const gu=d("ZodISODateTime",(e,t)=>{Fa.init(e,t),Z.init(e,t)});function _u(e){return qs(gu,e)}const yu=d("ZodISODate",(e,t)=>{Ua.init(e,t),Z.init(e,t)});function wu(e){return Hs(yu,e)}const vu=d("ZodISOTime",(e,t)=>{Ya.init(e,t),Z.init(e,t)});function bu(e){return Vs(vu,e)}const Tu=d("ZodISODuration",(e,t)=>{La.init(e,t),Z.init(e,t)});function zu(e){return Bs(Tu,e)}const ot=d("ZodError",(e,t)=>{Ln.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Ri(e,n)},flatten:{value:n=>Ci(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Zt,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Zt,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),Du=xi(ot),ku=Ai(ot),Ou=Wn(ot),Su=qn(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)=>Du(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>Ou(e,n,r),e.parseAsync=async(n,r)=>ku(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>Su(e,n,r),e.spa=e.safeParseAsync,e.refine=(n,r)=>e.check(vc(n,r)),e.superRefine=n=>e.check(bc(n)),e.overwrite=n=>e.check(xe(n)),e.optional=()=>Or(e),e.nullable=()=>Sr(e),e.nullish=()=>Or(Sr(e)),e.nonoptional=n=>hc(e,n),e.array=()=>he(e),e.or=n=>Ft([e,n]),e.and=n=>rc(e,n),e.transform=n=>Mr(e,sc(n)),e.default=n=>lc(e,n),e.prefault=n=>fc(e,n),e.catch=n=>pc(e,n),e.pipe=n=>Mr(e,n),e.readonly=()=>yc(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)),yr=d("_ZodString",(e,t)=>{Rt.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(nu(...r)),e.includes=(...r)=>e.check(iu(...r)),e.startsWith=(...r)=>e.check(au(...r)),e.endsWith=(...r)=>e.check(su(...r)),e.min=(...r)=>e.check(rt(...r)),e.max=(...r)=>e.check(gr(...r)),e.length=(...r)=>e.check(_r(...r)),e.nonempty=(...r)=>e.check(rt(1,...r)),e.lowercase=r=>e.check(ru(r)),e.uppercase=r=>e.check(ou(r)),e.trim=()=>e.check(cu()),e.normalize=(...r)=>e.check(uu(...r)),e.toLowerCase=()=>e.check(lu()),e.toUpperCase=()=>e.check(du())}),Eu=d("ZodString",(e,t)=>{Rt.init(e,t),yr.init(e,t),e.email=n=>e.check(ks(Mu,n)),e.url=n=>e.check(Is(Iu,n)),e.jwt=n=>e.check(Ws(Wu,n)),e.emoji=n=>e.check(Zs(Zu,n)),e.guid=n=>e.check(fr(wr,n)),e.uuid=n=>e.check(Os(it,n)),e.uuidv4=n=>e.check(Ss(it,n)),e.uuidv6=n=>e.check(Es(it,n)),e.uuidv7=n=>e.check(Ms(it,n)),e.nanoid=n=>e.check($s($u,n)),e.guid=n=>e.check(fr(wr,n)),e.cuid=n=>e.check(Ps(Pu,n)),e.cuid2=n=>e.check(Ns(Nu,n)),e.ulid=n=>e.check(Cs(Cu,n)),e.base64=n=>e.check(Ys(Yu,n)),e.base64url=n=>e.check(Ls(Lu,n)),e.xid=n=>e.check(Rs(Ru,n)),e.ksuid=n=>e.check(xs(xu,n)),e.ipv4=n=>e.check(As(Au,n)),e.ipv6=n=>e.check(js(ju,n)),e.cidrv4=n=>e.check(Fs(Fu,n)),e.cidrv6=n=>e.check(Us(Uu,n)),e.e164=n=>e.check(Gs(Gu,n)),e.datetime=n=>e.check(_u(n)),e.date=n=>e.check(wu(n)),e.time=n=>e.check(bu(n)),e.duration=n=>e.check(zu(n))});function R(e){return Ds(Eu,e)}const Z=d("ZodStringFormat",(e,t)=>{M.init(e,t),yr.init(e,t)}),Mu=d("ZodEmail",(e,t)=>{Za.init(e,t),Z.init(e,t)}),wr=d("ZodGUID",(e,t)=>{Ma.init(e,t),Z.init(e,t)}),it=d("ZodUUID",(e,t)=>{Ia.init(e,t),Z.init(e,t)}),Iu=d("ZodURL",(e,t)=>{$a.init(e,t),Z.init(e,t)}),Zu=d("ZodEmoji",(e,t)=>{Pa.init(e,t),Z.init(e,t)}),$u=d("ZodNanoID",(e,t)=>{Na.init(e,t),Z.init(e,t)}),Pu=d("ZodCUID",(e,t)=>{Ca.init(e,t),Z.init(e,t)}),Nu=d("ZodCUID2",(e,t)=>{Ra.init(e,t),Z.init(e,t)}),Cu=d("ZodULID",(e,t)=>{xa.init(e,t),Z.init(e,t)}),Ru=d("ZodXID",(e,t)=>{Aa.init(e,t),Z.init(e,t)}),xu=d("ZodKSUID",(e,t)=>{ja.init(e,t),Z.init(e,t)}),Au=d("ZodIPv4",(e,t)=>{Ga.init(e,t),Z.init(e,t)}),ju=d("ZodIPv6",(e,t)=>{Wa.init(e,t),Z.init(e,t)}),Fu=d("ZodCIDRv4",(e,t)=>{qa.init(e,t),Z.init(e,t)}),Uu=d("ZodCIDRv6",(e,t)=>{Ha.init(e,t),Z.init(e,t)}),Yu=d("ZodBase64",(e,t)=>{Va.init(e,t),Z.init(e,t)}),Lu=d("ZodBase64URL",(e,t)=>{Xa.init(e,t),Z.init(e,t)}),Gu=d("ZodE164",(e,t)=>{Qa.init(e,t),Z.init(e,t)}),Wu=d("ZodJWT",(e,t)=>{Ja.init(e,t),Z.init(e,t)}),vr=d("ZodNumber",(e,t)=>{tr.init(e,t),I.init(e,t),e.gt=(r,o)=>e.check(mr(r,o)),e.gte=(r,o)=>e.check(jt(r,o)),e.min=(r,o)=>e.check(jt(r,o)),e.lt=(r,o)=>e.check(hr(r,o)),e.lte=(r,o)=>e.check(At(r,o)),e.max=(r,o)=>e.check(At(r,o)),e.int=r=>e.check(br(r)),e.safe=r=>e.check(br(r)),e.positive=r=>e.check(mr(0,r)),e.nonnegative=r=>e.check(jt(0,r)),e.negative=r=>e.check(hr(0,r)),e.nonpositive=r=>e.check(At(0,r)),e.multipleOf=(r,o)=>e.check(pr(r,o)),e.step=(r,o)=>e.check(pr(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 Xs(vr,e)}const qu=d("ZodNumberFormat",(e,t)=>{es.init(e,t),vr.init(e,t)});function br(e){return Qs(qu,e)}const Hu=d("ZodBoolean",(e,t)=>{ts.init(e,t),I.init(e,t)});function fe(e){return Ks(Hu,e)}const Vu=d("ZodNull",(e,t)=>{ns.init(e,t),I.init(e,t)});function Bu(e){return Js(Vu,e)}const Xu=d("ZodUnknown",(e,t)=>{rs.init(e,t),I.init(e,t)});function Tr(){return eu(Xu)}const Qu=d("ZodNever",(e,t)=>{os.init(e,t),I.init(e,t)});function Ku(e){return tu(Qu,e)}const Ju=d("ZodArray",(e,t)=>{is.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(gr(n,r)),e.length=(n,r)=>e.check(_r(n,r)),e.unwrap=()=>e.element});function he(e,t){return fu(Ju,e,t)}const ec=d("ZodObject",(e,t)=>{as.init(e,t),I.init(e,t),k(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:Tr()}),e.loose=()=>e.clone({...e._zod.def,catchall:Tr()}),e.strict=()=>e.clone({...e._zod.def,catchall:Ku()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>Zi(e,n),e.merge=n=>$i(e,n),e.pick=n=>Mi(e,n),e.omit=n=>Ii(e,n),e.partial=(...n)=>Pi(kr,e,n[0]),e.required=(...n)=>Ni(Er,e,n[0])});function N(e,t){const n={type:"object",get shape(){return le(this,"shape",e?Di(e):{}),this.shape},..._(t)};return new ec(n)}const zr=d("ZodUnion",(e,t)=>{or.init(e,t),I.init(e,t),e.options=t.options});function Ft(e,t){return new zr({type:"union",options:e,..._(t)})}const tc=d("ZodDiscriminatedUnion",(e,t)=>{zr.init(e,t),ss.init(e,t)});function at(e,t,n){return new tc({type:"union",options:t,discriminator:e,..._(n)})}const nc=d("ZodIntersection",(e,t)=>{us.init(e,t),I.init(e,t)});function rc(e,t){return new nc({type:"intersection",left:e,right:t})}const oc=d("ZodRecord",(e,t)=>{cs.init(e,t),I.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function Dr(e,t,n){return new oc({type:"record",keyType:e,valueType:t,..._(n)})}const Ut=d("ZodEnum",(e,t)=>{ls.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 Ut({...t,checks:[],..._(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 Ut({...t,checks:[],..._(o),entries:i})}});function L(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Ut({type:"enum",entries:n,..._(t)})}const ic=d("ZodLiteral",(e,t)=>{ds.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 ic({type:"literal",values:Array.isArray(e)?e:[e],..._(t)})}const ac=d("ZodTransform",(e,t)=>{fs.init(e,t),I.init(e,t),e._zod.parse=(n,r)=>{n.addIssue=i=>{if(typeof i=="string")n.issues.push(Re(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(Re(s))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n)):(n.value=o,n)}});function sc(e){return new ac({type:"transform",transform:e})}const kr=d("ZodOptional",(e,t)=>{hs.init(e,t),I.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Or(e){return new kr({type:"optional",innerType:e})}const uc=d("ZodNullable",(e,t)=>{ms.init(e,t),I.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Sr(e){return new uc({type:"nullable",innerType:e})}const cc=d("ZodDefault",(e,t)=>{ps.init(e,t),I.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function lc(e,t){return new cc({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Un(t)}})}const dc=d("ZodPrefault",(e,t)=>{gs.init(e,t),I.init(e,t),e.unwrap=()=>e._zod.def.innerType});function fc(e,t){return new dc({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Un(t)}})}const Er=d("ZodNonOptional",(e,t)=>{_s.init(e,t),I.init(e,t),e.unwrap=()=>e._zod.def.innerType});function hc(e,t){return new Er({type:"nonoptional",innerType:e,..._(t)})}const mc=d("ZodCatch",(e,t)=>{ys.init(e,t),I.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function pc(e,t){return new mc({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const gc=d("ZodPipe",(e,t)=>{ws.init(e,t),I.init(e,t),e.in=t.in,e.out=t.out});function Mr(e,t){return new gc({type:"pipe",in:e,out:t})}const _c=d("ZodReadonly",(e,t)=>{vs.init(e,t),I.init(e,t),e.unwrap=()=>e._zod.def.innerType});function yc(e){return new _c({type:"readonly",innerType:e})}const wc=d("ZodCustom",(e,t)=>{bs.init(e,t),I.init(e,t)});function vc(e,t={}){return hu(wc,e,t)}function bc(e){return mu(e)}const Tc=["horizontal_bar","vertical_bar","gauge","donut","timeseries_line","timeseries_bar","golden_signals","top_n","slottable","single_value"],Ae=R(),me=R(),Ir=fe(),Zr=Ft([he(R()),Dr(R(),R())]),$r=N({type:B("slottable"),id:R()}).strict(),Pr=N({type:L(["horizontal_bar","vertical_bar"]),stacked:fe().optional(),chart_dataset_colors:Zr.optional(),synthetics_data_key:Ae.optional(),chart_title:me.optional(),allow_csv_export:Ir.optional()}).strict(),Nr=N({type:L(["timeseries_line","timeseries_bar"]),stacked:fe().optional(),threshold:Dr(R(),X()).optional(),chart_dataset_colors:Zr.optional(),synthetics_data_key:Ae.optional(),chart_title:me.optional(),allow_csv_export:Ir.optional()}).strict(),Cr=N({type:B("gauge"),metric_display:L(["hidden","single","full"]).optional(),reverse_dataset:fe().optional(),numerator:X().optional(),synthetics_data_key:Ae.optional(),chart_title:me.optional()}).strict(),Rr=N({type:B("donut"),synthetics_data_key:Ae.optional(),chart_title:me.optional()}).strict(),xr=N({type:B("top_n"),chart_title:me.optional(),synthetics_data_key:Ae.optional(),description:R().optional(),entity_link:R().optional()}).strict(),Ar=N({type:B("golden_signals"),chart_title:me.optional(),long_card_titles:fe().optional(),description:R().optional(),percentile_latency:fe().optional()}).strict(),jr=N({type:B("single_value"),decimal_points:X().optional(),chart_title:me.optional()}).strict(),zc=at("type",[Pr,Cr,Rr,Nr,Ar,xr,$r,jr]),Dc=N({tz:R().optional().default("Etc/UTC"),type:B("relative"),time_range:L(kt).optional().default("1h")}).strict(),kc=N({tz:R().optional(),type:B("absolute"),start:R(),end:R()}).strict(),Oc=at("type",[Dc,kc]).optional().default({tz:Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC",type:"relative",time_range:"1h"}),Yt=N({granularity:L(He).optional(),time_range:Oc.optional(),limit:X().optional(),meta:N().optional()}),Lt=e=>he(L(e)).optional(),Gt=e=>he(L(e)).max(2).optional(),st=e=>{const t=N({field:L(e),operator:L(zt),value:he(Ft([R(),X(),Bu()]))}).strict(),n=N({field:L(e),operator:L(Dt)}).strict();return he(at("operator",[t,n])).optional()},Fr=Yt.extend({datasource:B("api_usage"),metrics:Lt(Ot).optional(),dimensions:Gt(Be).optional(),filters:st(se).optional()}).strict(),Ur=Yt.extend({datasource:B("basic"),metrics:Lt(Ve).optional(),dimensions:Gt(Ze).optional(),filters:st(ae).optional()}).strict(),Yr=Yt.extend({datasource:B("llm_usage"),metrics:Lt(St).optional(),dimensions:Gt(Xe).optional(),filters:st(ue).optional()}).strict(),Lr=at("datasource",[Fr,Ur,Yr]),Gr=N({query:Lr,chart:zc}).strict(),Wr=N({position:N({col:X(),row:X()}).strict(),size:N({cols:X(),rows:X(),fit_to_content:fe().optional()}).strict()}).strict(),qr=N({type:L(["chart"]),definition:Gr,layout:Wr,id:R().optional()}).strict(),Hr=N({tiles:he(qr),tile_height:X().optional(),preset_filters:st([...se,...ae,...ue]),template_id:R().nullable().optional()}).strict(),Sc=e=>Hr.parse(e),Ec=e=>{const t=[];return ae.includes(e)&&t.push("basic"),se.includes(e)&&t.push("api_usage"),ue.includes(e)&&t.push("llm_usage"),(pn.includes(e)||yn.includes(e))&&t.push("requests"),t},Vr=6048e5,Mc=864e5,Ic=60,Zc=3600,Br=Symbol.for("constructDateFrom");function H(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Br in e?e[Br](t):e instanceof Date?new e.constructor(t):new Date(t)}function x(e,t){return H(t||e,e)}function Xr(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 $c(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 Pc={};function je(){return Pc}function Q(e,t){var u,l,f,w;const n=je(),r=(t==null?void 0:t.weekStartsOn)??((l=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((w=(f=n.locale)==null?void 0:f.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 ut(e,t){return Q(e,{...t,weekStartsOn:1})}function Qr(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=ut(o),s=H(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const u=ut(s);return n.getTime()>=i.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function Kr(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 Nc(e,...t){const n=H.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function ct(e,t){const n=x(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function Cc(e,t,n){const[r,o]=Nc(n==null?void 0:n.in,e,t),i=ct(r),s=ct(o),u=+i-Kr(i),l=+s-Kr(s);return Math.round((u-l)/Mc)}function Rc(e,t){const n=Qr(e,t),r=H(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),ut(r)}function xc(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Ac(e){return!(!xc(e)&&typeof e!="number"||isNaN(+x(e)))}function Te(e,t){const n=x(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function jc(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 Fc={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"}},Uc=(e,t,n)=>{let r;const o=Fc[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 Wt(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Yc={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Lc={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Gc={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Wc={date:Wt({formats:Yc,defaultWidth:"full"}),time:Wt({formats:Lc,defaultWidth:"full"}),dateTime:Wt({formats:Gc,defaultWidth:"full"})},qc={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Hc=(e,t,n,r)=>qc[e];function Fe(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,u=n!=null&&n.width?String(n.width):s;o=e.formattingValues[u]||e.formattingValues[s]}else{const s=e.defaultWidth,u=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[u]||e.values[s]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const Vc={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Bc={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Xc={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"]},Qc={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"]},Kc={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"}},Jc={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"}},el={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:Fe({values:Vc,defaultWidth:"wide"}),quarter:Fe({values:Bc,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Fe({values:Xc,defaultWidth:"wide"}),day:Fe({values:Qc,defaultWidth:"wide"}),dayPeriod:Fe({values:Kc,defaultWidth:"wide",formattingValues:Jc,defaultFormattingWidth:"wide"})};function Ue(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],u=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(u)?nl(u,p=>p.test(s)):tl(u,p=>p.test(s));let f;f=e.valueCallback?e.valueCallback(l):l,f=n.valueCallback?n.valueCallback(f):f;const w=t.slice(s.length);return{value:f,rest:w}}}function tl(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function nl(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function rl(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 u=t.slice(o.length);return{value:s,rest:u}}}const ol=/^(\d+)(th|st|nd|rd)?/i,il=/\d+/i,al={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},sl={any:[/^b/i,/^(a|c)/i]},ul={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},cl={any:[/1/i,/2/i,/3/i,/4/i]},ll={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},dl={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]},fl={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},hl={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]},ml={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},pl={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}},gl={ordinalNumber:rl({matchPattern:ol,parsePattern:il,valueCallback:e=>parseInt(e,10)}),era:Ue({matchPatterns:al,defaultMatchWidth:"wide",parsePatterns:sl,defaultParseWidth:"any"}),quarter:Ue({matchPatterns:ul,defaultMatchWidth:"wide",parsePatterns:cl,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ue({matchPatterns:ll,defaultMatchWidth:"wide",parsePatterns:dl,defaultParseWidth:"any"}),day:Ue({matchPatterns:fl,defaultMatchWidth:"wide",parsePatterns:hl,defaultParseWidth:"any"}),dayPeriod:Ue({matchPatterns:ml,defaultMatchWidth:"any",parsePatterns:pl,defaultParseWidth:"any"})},_l={code:"en-US",formatDistance:Uc,formatLong:Wc,formatRelative:Hc,localize:el,match:gl,options:{weekStartsOn:0,firstWeekContainsDate:1}};function yl(e,t){const n=x(e,t==null?void 0:t.in);return Cc(n,jc(n))+1}function wl(e,t){const n=x(e,t==null?void 0:t.in),r=+ut(n)-+Rc(n);return Math.round(r/Vr)+1}function Jr(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 u=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 f=Q(l,t);return+n>=+u?r+1:+n>=+f?r:r-1}function vl(e,t){var u,l,f,w;const n=je(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((w=(f=n.locale)==null?void 0:f.options)==null?void 0:w.firstWeekContainsDate)??1,o=Jr(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 bl(e,t){const n=x(e,t==null?void 0:t.in),r=+Q(n,t)-+vl(n,t);return Math.round(r/Vr)+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)}},ze={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},eo={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=Jr(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=Qr(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=bl(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):z(o,t.length)},I:function(e,t,n){const r=wl(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=yl(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=ze.noon:r===0?o=ze.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=ze.evening:r>=12?o=ze.afternoon:r>=4?o=ze.morning:o=ze.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 no(r);case"XXXX":case"XX":return pe(r);case"XXXXX":case"XXX":default:return pe(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return no(r);case"xxxx":case"xx":return pe(r);case"xxxxx":case"xxx":default:return pe(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+to(r,":");case"OOOO":default:return"GMT"+pe(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+to(r,":");case"zzzz":default:return"GMT"+pe(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 to(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 no(e,t){return e%60===0?(e>0?"-":"+")+z(Math.abs(e)/60,2):pe(e,t)}function pe(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 ro=(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"})}},oo=(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"})}},Tl={p:oo,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return ro(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}}",ro(r,t)).replace("{{time}}",oo(o,t))}},zl=/^D+$/,Dl=/^Y+$/,kl=["D","DD","YY","YYYY"];function Ol(e){return zl.test(e)}function Sl(e){return Dl.test(e)}function El(e,t,n){const r=Ml(e,t,n);if(console.warn(r),kl.includes(e))throw new RangeError(r)}function Ml(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 Il=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Zl=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,$l=/^'([^]*?)'?$/,Pl=/''/g,Nl=/[a-zA-Z]/;function io(e,t,n){var w,p,g,b,O,P,W,V;const r=je(),o=(n==null?void 0:n.locale)??r.locale??_l,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=(O=n==null?void 0:n.locale)==null?void 0:O.options)==null?void 0:P.weekStartsOn)??r.weekStartsOn??((V=(W=r.locale)==null?void 0:W.options)==null?void 0:V.weekStartsOn)??0,u=x(e,n==null?void 0:n.in);if(!Ac(u))throw new RangeError("Invalid time value");let l=t.match(Zl).map(D=>{const T=D[0];if(T==="p"||T==="P"){const $=Tl[T];return $(D,o.formatLong)}return D}).join("").match(Il).map(D=>{if(D==="''")return{isToken:!1,value:"'"};const T=D[0];if(T==="'")return{isToken:!1,value:Cl(D)};if(eo[T])return{isToken:!0,value:D};if(T.match(Nl))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");return{isToken:!1,value:D}});o.localize.preprocessor&&(l=o.localize.preprocessor(u,l));const f={firstWeekContainsDate:i,weekStartsOn:s,locale:o};return l.map(D=>{if(!D.isToken)return D.value;const T=D.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Sl(T)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Ol(T))&&El(T,t,String(e));const $=eo[T[0]];return $(u,T,o.localize,f)}).join("")}function Cl(e){const t=e.match($l);return t?t[1].replace(Pl,"'"):e}function Rl(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 xl(){return Object.assign({},je())}function ao(e){return+x(e)}function so(e){return Math.trunc(+x(e)/1e3)}function Al(e){return Math.trunc(e*Zc)}function jl(e){const t=e/Ic;return Math.trunc(t)}function uo(e,t,n){return $c(e,-1,n)}function co(e,t,n){const r=xl(),o=Yl(e,n.timeZone,n.locale??r.locale);return"formatToParts"in o?Fl(o,t):Ul(o,t)}function Fl(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 Ul(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(n);return r?r[0].substr(1):""}function Yl(e,t,n){return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:t,timeZoneName:e})}function Ll(e,t){const n=Vl(t);return"formatToParts"in n?Wl(n,e):ql(n,e)}const Gl={year:0,month:1,day:2,hour:3,minute:4,second:5};function Wl(e,t){try{const n=e.formatToParts(t),r=[];for(let o=0;o<n.length;o++){const i=Gl[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 ql(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 qt={},lo=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")),Hl=lo==="06/25/2014, 00:00:00"||lo==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function Vl(e){return qt[e]||(qt[e]=Hl?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"})),qt[e]}function Ht(e,t,n,r,o,i,s){const u=new Date(0);return u.setUTCFullYear(e,t,n),u.setUTCHours(r,o,i,s),u}const fo=36e5,Bl=6e4,Vt={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Ye(e,t,n){if(!e)return 0;let r=Vt.timezoneZ.exec(e);if(r)return 0;let o,i;if(r=Vt.timezoneHH.exec(e),r)return o=parseInt(r[1],10),ho(o)?-(o*fo):NaN;if(r=Vt.timezoneHHMM.exec(e),r){o=parseInt(r[2],10);const s=parseInt(r[3],10);return ho(o,s)?(i=Math.abs(o)*fo+s*Bl,r[1]==="+"?-i:i):NaN}if(Kl(e)){t=new Date(t||Date.now());const s=n?t:Xl(t),u=Bt(s,e);return-(n?u:Ql(t,u,e))}return NaN}function Xl(e){return Ht(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function Bt(e,t){const n=Ll(e,t),r=Ht(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 Ql(e,t,n){let o=e.getTime()-t;const i=Bt(new Date(o),n);if(t===i)return t;o-=i-t;const s=Bt(new Date(o),n);return i===s?i:Math.max(i,s)}function ho(e,t){return-23<=e&&e<=23&&(t==null||0<=t&&t<=59)}const mo={};function Kl(e){if(mo[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),mo[e]=!0,!0}catch{return!1}}const Jl=60*1e3,ed={X:function(e,t,n){const r=Xt(n.timeZone,e);if(r===0)return"Z";switch(t){case"X":return po(r);case"XXXX":case"XX":return De(r);case"XXXXX":case"XXX":default:return De(r,":")}},x:function(e,t,n){const r=Xt(n.timeZone,e);switch(t){case"x":return po(r);case"xxxx":case"xx":return De(r);case"xxxxx":case"xxx":default:return De(r,":")}},O:function(e,t,n){const r=Xt(n.timeZone,e);switch(t){case"O":case"OO":case"OOO":return"GMT"+td(r,":");case"OOOO":default:return"GMT"+De(r,":")}},z:function(e,t,n){switch(t){case"z":case"zz":case"zzz":return co("short",e,n);case"zzzz":default:return co("long",e,n)}}};function Xt(e,t){const n=e?Ye(e,t,!0)/Jl:(t==null?void 0:t.getTimezoneOffset())??0;if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+e);return n}function lt(e,t){const n=e<0?"-":"";let r=Math.abs(e).toString();for(;r.length<t;)r="0"+r;return n+r}function De(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=lt(Math.floor(r/60),2),i=lt(Math.floor(r%60),2);return n+o+t+i}function po(e,t){return e%60===0?(e>0?"-":"+")+lt(Math.abs(e)/60,2):De(e,t)}function td(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+lt(i,2)}function go(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 _o=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Qt=36e5,yo=6e4,nd=2,j={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:_o};function dt(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?nd: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=rd(e),{year:o,restDateString:i}=od(r.date,n),s=id(i,o);if(s===null||isNaN(s.getTime()))return new Date(NaN);if(s){const u=s.getTime();let l=0,f;if(r.time&&(l=ad(r.time),l===null||isNaN(l)))return new Date(NaN);if(r.timeZone||t.timeZone){if(f=Ye(r.timeZone||t.timeZone,new Date(u+l)),isNaN(f))return new Date(NaN)}else f=go(new Date(u+l)),f=go(new Date(u+l+f));return new Date(u+l+f)}else return new Date(NaN)}function rd(e){const t={};let n=j.dateTimePattern.exec(e),r;if(n?(t.date=n[1],r=n[3]):(n=j.datePattern.exec(e),n?(t.date=n[1],r=n[2]):(t.date=null,r=e)),r){const o=j.timeZone.exec(r);o?(t.time=r.replace(o[1],""),t.timeZone=o[1].trim()):t.time=r}return t}function od(e,t){if(e){const n=j.YYY[t],r=j.YYYYY[t];let o=j.YYYY.exec(e)||r.exec(e);if(o){const i=o[1];return{year:parseInt(i,10),restDateString:e.slice(i.length)}}if(o=j.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 id(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=j.MM.exec(e);if(i)return n=new Date(0),r=parseInt(i[1],10)-1,bo(t,r)?(n.setUTCFullYear(t,r),n):new Date(NaN);if(i=j.DDD.exec(e),i){n=new Date(0);const s=parseInt(i[1],10);return cd(t,s)?(n.setUTCFullYear(t,0,s),n):new Date(NaN)}if(i=j.MMDD.exec(e),i){n=new Date(0),r=parseInt(i[1],10)-1;const s=parseInt(i[2],10);return bo(t,r,s)?(n.setUTCFullYear(t,r,s),n):new Date(NaN)}if(i=j.Www.exec(e),i)return o=parseInt(i[1],10)-1,To(o)?wo(t,o):new Date(NaN);if(i=j.WwwD.exec(e),i){o=parseInt(i[1],10)-1;const s=parseInt(i[2],10)-1;return To(o,s)?wo(t,o,s):new Date(NaN)}return null}function ad(e){let t,n,r=j.HH.exec(e);if(r)return t=parseFloat(r[1].replace(",",".")),Kt(t)?t%24*Qt:NaN;if(r=j.HHMM.exec(e),r)return t=parseInt(r[1],10),n=parseFloat(r[2].replace(",",".")),Kt(t,n)?t%24*Qt+n*yo:NaN;if(r=j.HHMMSS.exec(e),r){t=parseInt(r[1],10),n=parseInt(r[2],10);const o=parseFloat(r[3].replace(",","."));return Kt(t,n,o)?t%24*Qt+n*yo+o*1e3:NaN}return null}function wo(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 sd=[31,28,31,30,31,30,31,31,30,31,30,31],ud=[31,29,31,30,31,30,31,31,30,31,30,31];function vo(e){return e%400===0||e%4===0&&e%100!==0}function bo(e,t,n){if(t<0||t>11)return!1;if(n!=null){if(n<1)return!1;const r=vo(e);if(r&&n>ud[t]||!r&&n>sd[t])return!1}return!0}function cd(e,t){if(t<1)return!1;const n=vo(e);return!(n&&t>366||!n&&t>365)}function To(e,t){return!(e<0||e>52||t!=null&&(t<0||t>6))}function Kt(e,t,n){return!(e<0||e>=25||t!=null&&(t<0||t>=60)||n!=null&&(n<0||n>=60))}const ld=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function dd(e,t,n={}){t=String(t);const r=t.match(ld);if(r){const o=dt(n.originalDate||e,n);t=r.reduce(function(i,s){if(s[0]==="'")return i;const u=i.indexOf(s),l=i[u-1]==="'",f=i.replace(s,"'"+ed[s[0]](o,s,n)+"'");return l?f.substring(0,u-1)+f.substring(u+1):f},t)}return io(e,t,n)}function zo(e,t,n){e=dt(e,n);const r=Ye(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 fd(e,t,n,r){return r={...r,timeZone:t,originalDate:e},dd(zo(e,t,{timeZone:r.timeZone}),n,r)}function hd(e,t,n){if(typeof e=="string"&&!e.match(_o))return dt(e,{...n,timeZone:t});e=dt(e,n);const r=Ht(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()).getTime(),o=Ye(t,new Date(r));return new Date(r+o)}function Do(e,t){return-Ye(e,t)}function md(e){return io(e,"yyyy-MM-dd'T'HH:mm:ss.SSSXXX")}function Jt(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 fd(o,n,r)}catch{return console.error("Invalid value passed to formatTime",e),"(invalid date)"}}function pd(e,t){return`${Jt(e.getTime())} - ${Jt(t.getTime(),{includeTZ:!0})}`}const Le={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 gd(e,t){return e.map(n=>({value:n,label:t.t(`configuration.vitals.reports.granularity.${n}`)}))}function ko(e,t){return{duration:e,type:"duration",origin:t}}function _d(e){return e&&He.find(n=>e<=Le[n])||null}function Oo(e,t,n,r){const o=Le[n];let i=0;return o>=Le.daily&&(r?i=-Do(r,t):i=t.getTimezoneOffset()*60*1e3),new Date(e((t.getTime()-i)/o)*o+i)}function So(e,t,n){return Oo(Math.floor,e,t,n)}function en(e,t,n){return Oo(Math.ceil,e,t,n)}class ft{constructor(t,n,r){C(this,"timeframe");C(this,"tz");C(this,"dataGranularity");if(this.constructor===ft)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=So(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 ko(this.granularityMs(),this.startDate().toISOString())}startSeconds(){return so(this.startDate())}endSeconds(){return so(this.endDate())}startMs(){return ao(this.startDate())}endMs(){return ao(this.endDate())}}class yd extends ft{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 en(this.timeframe.rawEnd(),this.granularity,this.tz)}granularityMs(){return Le[this.granularity]}}class Eo extends ft{startDate(){return this.calculateStartDate(this.timeframe.isRelative,this.dataGranularity)}endDate(){return en(this.timeframe.rawEnd(this.tz),this.dataGranularity,this.tz)}granularityMs(){return this.endDate().getTime()-this.startDate().getTime()}}class wd extends Eo{startDate(){return this.calculateStartDate(this.timeframe.isRelative,this.dataGranularity,2)}granularityMs(){return this.endDate().getTime()-super.startDate().getTime()}}var ht=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var mt={exports:{}};mt.exports,function(e,t){var n=200,r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",s="[object Array]",u="[object Boolean]",l="[object Date]",f="[object Error]",w="[object Function]",p="[object GeneratorFunction]",g="[object Map]",b="[object Number]",O="[object Object]",P="[object Promise]",W="[object RegExp]",V="[object Set]",D="[object String]",T="[object Symbol]",$="[object WeakMap]",Ge="[object ArrayBuffer]",oe="[object DataView]",gt="[object Float32Array]",Zo="[object Float64Array]",$o="[object Int8Array]",Po="[object Int16Array]",No="[object Int32Array]",Co="[object Uint8Array]",Ro="[object Uint8ClampedArray]",xo="[object Uint16Array]",Ao="[object Uint32Array]",Nd=/[\\^$.*+?()[\]{}|]/g,Cd=/\w*$/,Rd=/^\[object .+?Constructor\]$/,xd=/^(?:0|[1-9]\d*)$/,S={};S[i]=S[s]=S[Ge]=S[oe]=S[u]=S[l]=S[gt]=S[Zo]=S[$o]=S[Po]=S[No]=S[g]=S[b]=S[O]=S[W]=S[V]=S[D]=S[T]=S[Co]=S[Ro]=S[xo]=S[Ao]=!0,S[f]=S[w]=S[$]=!1;var Ad=typeof ht=="object"&&ht&&ht.Object===Object&&ht,jd=typeof self=="object"&&self&&self.Object===Object&&self,K=Ad||jd||Function("return this")(),jo=t&&!t.nodeType&&t,Fo=jo&&!0&&e&&!e.nodeType&&e,Fd=Fo&&Fo.exports===jo;function Ud(a,c){return a.set(c[0],c[1]),a}function Yd(a,c){return a.add(c),a}function Ld(a,c){for(var h=-1,y=a?a.length:0;++h<y&&c(a[h],h,a)!==!1;);return a}function Gd(a,c){for(var h=-1,y=c.length,A=a.length;++h<y;)a[A+h]=c[h];return a}function Uo(a,c,h,y){for(var A=-1,U=a?a.length:0;++A<U;)h=c(h,a[A],A,a);return h}function Wd(a,c){for(var h=-1,y=Array(a);++h<a;)y[h]=c(h);return y}function qd(a,c){return a==null?void 0:a[c]}function Yo(a){var c=!1;if(a!=null&&typeof a.toString!="function")try{c=!!(a+"")}catch{}return c}function Lo(a){var c=-1,h=Array(a.size);return a.forEach(function(y,A){h[++c]=[A,y]}),h}function nn(a,c){return function(h){return a(c(h))}}function Go(a){var c=-1,h=Array(a.size);return a.forEach(function(y){h[++c]=y}),h}var Hd=Array.prototype,Vd=Function.prototype,_t=Object.prototype,rn=K["__core-js_shared__"],Wo=function(){var a=/[^.]+$/.exec(rn&&rn.keys&&rn.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}(),qo=Vd.toString,ie=_t.hasOwnProperty,yt=_t.toString,Bd=RegExp("^"+qo.call(ie).replace(Nd,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ho=Fd?K.Buffer:void 0,Vo=K.Symbol,Bo=K.Uint8Array,Xd=nn(Object.getPrototypeOf,Object),Qd=Object.create,Kd=_t.propertyIsEnumerable,Jd=Hd.splice,Xo=Object.getOwnPropertySymbols,ef=Ho?Ho.isBuffer:void 0,tf=nn(Object.keys,Object),on=Ee(K,"DataView"),We=Ee(K,"Map"),an=Ee(K,"Promise"),sn=Ee(K,"Set"),un=Ee(K,"WeakMap"),qe=Ee(Object,"create"),nf=ye(on),rf=ye(We),of=ye(an),af=ye(sn),sf=ye(un),Qo=Vo?Vo.prototype:void 0,Ko=Qo?Qo.valueOf:void 0;function ge(a){var c=-1,h=a?a.length:0;for(this.clear();++c<h;){var y=a[c];this.set(y[0],y[1])}}function uf(){this.__data__=qe?qe(null):{}}function cf(a){return this.has(a)&&delete this.__data__[a]}function lf(a){var c=this.__data__;if(qe){var h=c[a];return h===r?void 0:h}return ie.call(c,a)?c[a]:void 0}function df(a){var c=this.__data__;return qe?c[a]!==void 0:ie.call(c,a)}function ff(a,c){var h=this.__data__;return h[a]=qe&&c===void 0?r:c,this}ge.prototype.clear=uf,ge.prototype.delete=cf,ge.prototype.get=lf,ge.prototype.has=df,ge.prototype.set=ff;function J(a){var c=-1,h=a?a.length:0;for(this.clear();++c<h;){var y=a[c];this.set(y[0],y[1])}}function hf(){this.__data__=[]}function mf(a){var c=this.__data__,h=wt(c,a);if(h<0)return!1;var y=c.length-1;return h==y?c.pop():Jd.call(c,h,1),!0}function pf(a){var c=this.__data__,h=wt(c,a);return h<0?void 0:c[h][1]}function gf(a){return wt(this.__data__,a)>-1}function _f(a,c){var h=this.__data__,y=wt(h,a);return y<0?h.push([a,c]):h[y][1]=c,this}J.prototype.clear=hf,J.prototype.delete=mf,J.prototype.get=pf,J.prototype.has=gf,J.prototype.set=_f;function Oe(a){var c=-1,h=a?a.length:0;for(this.clear();++c<h;){var y=a[c];this.set(y[0],y[1])}}function yf(){this.__data__={hash:new ge,map:new(We||J),string:new ge}}function wf(a){return vt(this,a).delete(a)}function vf(a){return vt(this,a).get(a)}function bf(a){return vt(this,a).has(a)}function Tf(a,c){return vt(this,a).set(a,c),this}Oe.prototype.clear=yf,Oe.prototype.delete=wf,Oe.prototype.get=vf,Oe.prototype.has=bf,Oe.prototype.set=Tf;function Se(a){this.__data__=new J(a)}function zf(){this.__data__=new J}function Df(a){return this.__data__.delete(a)}function kf(a){return this.__data__.get(a)}function Of(a){return this.__data__.has(a)}function Sf(a,c){var h=this.__data__;if(h instanceof J){var y=h.__data__;if(!We||y.length<n-1)return y.push([a,c]),this;h=this.__data__=new Oe(y)}return h.set(a,c),this}Se.prototype.clear=zf,Se.prototype.delete=Df,Se.prototype.get=kf,Se.prototype.has=Of,Se.prototype.set=Sf;function Ef(a,c){var h=dn(a)||Kf(a)?Wd(a.length,String):[],y=h.length,A=!!y;for(var U in a)ie.call(a,U)&&!(A&&(U=="length"||Vf(U,y)))&&h.push(U);return h}function Jo(a,c,h){var y=a[c];(!(ie.call(a,c)&&ri(y,h))||h===void 0&&!(c in a))&&(a[c]=h)}function wt(a,c){for(var h=a.length;h--;)if(ri(a[h][0],c))return h;return-1}function Mf(a,c){return a&&ei(c,fn(c),a)}function cn(a,c,h,y,A,U,ee){var Y;if(y&&(Y=U?y(a,A,U,ee):y(a)),Y!==void 0)return Y;if(!bt(a))return a;var ai=dn(a);if(ai){if(Y=Wf(a),!c)return Yf(a,Y)}else{var Me=_e(a),si=Me==w||Me==p;if(eh(a))return Cf(a,c);if(Me==O||Me==i||si&&!U){if(Yo(a))return U?a:{};if(Y=qf(si?{}:a),!c)return Lf(a,Mf(Y,a))}else{if(!S[Me])return U?a:{};Y=Hf(a,Me,cn,c)}}ee||(ee=new Se);var ui=ee.get(a);if(ui)return ui;if(ee.set(a,Y),!ai)var ci=h?Gf(a):fn(a);return Ld(ci||a,function(hn,Tt){ci&&(Tt=hn,hn=a[Tt]),Jo(Y,Tt,cn(hn,c,h,y,Tt,a,ee))}),Y}function If(a){return bt(a)?Qd(a):{}}function Zf(a,c,h){var y=c(a);return dn(a)?y:Gd(y,h(a))}function $f(a){return yt.call(a)}function Pf(a){if(!bt(a)||Xf(a))return!1;var c=ii(a)||Yo(a)?Bd:Rd;return c.test(ye(a))}function Nf(a){if(!ni(a))return tf(a);var c=[];for(var h in Object(a))ie.call(a,h)&&h!="constructor"&&c.push(h);return c}function Cf(a,c){if(c)return a.slice();var h=new a.constructor(a.length);return a.copy(h),h}function ln(a){var c=new a.constructor(a.byteLength);return new Bo(c).set(new Bo(a)),c}function Rf(a,c){var h=c?ln(a.buffer):a.buffer;return new a.constructor(h,a.byteOffset,a.byteLength)}function xf(a,c,h){var y=c?h(Lo(a),!0):Lo(a);return Uo(y,Ud,new a.constructor)}function Af(a){var c=new a.constructor(a.source,Cd.exec(a));return c.lastIndex=a.lastIndex,c}function jf(a,c,h){var y=c?h(Go(a),!0):Go(a);return Uo(y,Yd,new a.constructor)}function Ff(a){return Ko?Object(Ko.call(a)):{}}function Uf(a,c){var h=c?ln(a.buffer):a.buffer;return new a.constructor(h,a.byteOffset,a.length)}function Yf(a,c){var h=-1,y=a.length;for(c||(c=Array(y));++h<y;)c[h]=a[h];return c}function ei(a,c,h,y){h||(h={});for(var A=-1,U=c.length;++A<U;){var ee=c[A],Y=void 0;Jo(h,ee,Y===void 0?a[ee]:Y)}return h}function Lf(a,c){return ei(a,ti(a),c)}function Gf(a){return Zf(a,fn,ti)}function vt(a,c){var h=a.__data__;return Bf(c)?h[typeof c=="string"?"string":"hash"]:h.map}function Ee(a,c){var h=qd(a,c);return Pf(h)?h:void 0}var ti=Xo?nn(Xo,Object):rh,_e=$f;(on&&_e(new on(new ArrayBuffer(1)))!=oe||We&&_e(new We)!=g||an&&_e(an.resolve())!=P||sn&&_e(new sn)!=V||un&&_e(new un)!=$)&&(_e=function(a){var c=yt.call(a),h=c==O?a.constructor:void 0,y=h?ye(h):void 0;if(y)switch(y){case nf:return oe;case rf:return g;case of:return P;case af:return V;case sf:return $}return c});function Wf(a){var c=a.length,h=a.constructor(c);return c&&typeof a[0]=="string"&&ie.call(a,"index")&&(h.index=a.index,h.input=a.input),h}function qf(a){return typeof a.constructor=="function"&&!ni(a)?If(Xd(a)):{}}function Hf(a,c,h,y){var A=a.constructor;switch(c){case Ge:return ln(a);case u:case l:return new A(+a);case oe:return Rf(a,y);case gt:case Zo:case $o:case Po:case No:case Co:case Ro:case xo:case Ao:return Uf(a,y);case g:return xf(a,y,h);case b:case D:return new A(a);case W:return Af(a);case V:return jf(a,y,h);case T:return Ff(a)}}function Vf(a,c){return c=c??o,!!c&&(typeof a=="number"||xd.test(a))&&a>-1&&a%1==0&&a<c}function Bf(a){var c=typeof a;return c=="string"||c=="number"||c=="symbol"||c=="boolean"?a!=="__proto__":a===null}function Xf(a){return!!Wo&&Wo in a}function ni(a){var c=a&&a.constructor,h=typeof c=="function"&&c.prototype||_t;return a===h}function ye(a){if(a!=null){try{return qo.call(a)}catch{}try{return a+""}catch{}}return""}function Qf(a){return cn(a,!0,!0)}function ri(a,c){return a===c||a!==a&&c!==c}function Kf(a){return Jf(a)&&ie.call(a,"callee")&&(!Kd.call(a,"callee")||yt.call(a)==i)}var dn=Array.isArray;function oi(a){return a!=null&&th(a.length)&&!ii(a)}function Jf(a){return nh(a)&&oi(a)}var eh=ef||oh;function ii(a){var c=bt(a)?yt.call(a):"";return c==w||c==p}function th(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=o}function bt(a){var c=typeof a;return!!a&&(c=="object"||c=="function")}function nh(a){return!!a&&typeof a=="object"}function fn(a){return oi(a)?Ef(a):Nf(a)}function rh(){return[]}function oh(){return!1}e.exports=Qf}(mt,mt.exports);var bd=mt.exports;const Td=vd(bd),ke=(e,t)=>new Date(e.getTime()-Do(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=hd(new Date,new Intl.DateTimeFormat().resolvedOptions().timeZone);return zo(n,t)}}class zd extends G{rawStart(t){let n=Q(this.tzAdjustedDate(t),{weekStartsOn:1});return t&&(n=ke(n,t)),n}maximumTimeframeLength(){return 60*60*24*7}}class Dd extends G{rawStart(t){let n=Te(this.tzAdjustedDate(t));return t&&(n=ke(n,t)),n}maximumTimeframeLength(){return 60*60*24*31}}class kd extends G{rawEnd(t){let n=Q(this.tzAdjustedDate(t),{weekStartsOn:1});return t&&(n=ke(n,t)),n}rawStart(t){const n=this.tzAdjustedDate(t);let r=Q(n.setDate(n.getDate()-7),{weekStartsOn:1});return t&&(r=ke(r,t)),r}}class Od extends G{rawEnd(t){let n=Te(this.tzAdjustedDate(t));return t&&(n=ke(n,t)),n}rawStart(t){let n=Te(uo(this.tzAdjustedDate(t)));return t&&(n=ke(n,t)),n}}const Mo=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 zd({key:v.CURRENT_WEEK,display:"This week",timeframeText:"Week",timeframeLength:()=>{const e=Q(new Date,{weekStartsOn:1});return(ct(Xr(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 Dd({key:v.CURRENT_MONTH,display:"This month",timeframeText:"Month",timeframeLength:()=>{const e=Te(new Date);return(ct(Xr(new Date,1)).getTime()-e.getTime())/1e3},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]})],[v.PREVIOUS_WEEK,new kd({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 Od({key:v.PREVIOUS_MONTH,display:"Previous month",timeframeText:"Month",timeframeLength:()=>{let e=0;const t=Te(new Date),n=Te(uo(new Date));return t.getTimezoneOffset()!==n.getTimezoneOffset()&&(e=Io(t,n)),60*60*24*Rl(new Date().setMonth(new Date().getMonth()-1))+Al(e)},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]})]]);function Sd(e){const t=new Date(e.start),n=new Date(e.end),r=(n.getTime()-t.getTime())/1e3;return e.timePeriodsKey&&Td(Mo.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 Ed(e){return{...e.key!=="custom"&&{timePeriodsKey:e.key},start:e.rawStart(),end:e.rawEnd()}}function Md(e){return{key:e.key,display:e.display,timeframeText:e.timeframeText,timeframeLength:()=>e.key,start:()=>e.rawStart(),end:()=>e.rawEnd()}}function Io(e,t){return jl(e.getTimezoneOffset()-t.getTimezoneOffset())}const Id={"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 pt{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 Zd=(e,t,n)=>{const r=tn(10,1e4),o=new pt(r),i=Date.now()-6*60*60*1e3,s=Date.now(),u=[];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 O={[g]:b,[e.name]:l},P={version:"1.0",timestamp:new Date(p).toISOString(),event:O};u.push(P)});else{l+=o.next(50,500);const g={version:"1.0",timestamp:new Date(p).toISOString(),event:{[e.name]:l}};u.push(g)}const f={};if(t)for(const p in t)f[p]={},t[p].forEach(g=>{f[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:f,...n??{}};return{data:u,meta:w}},$d=(e,t)=>{const n=tn(10,1e4),r=new pt(n),o=Date.now()-6*60*60*1e3,i=Date.now(),s=[],u={};e.forEach(f=>{u[f.name]=0});for(let f=o;f<=i;f+=60*60*1e3){const w={};e.forEach(g=>{u[g.name]+=r.next(50,500),w[g.name]=u[g.name]});const p={version:"1.0",timestamp:new Date(f).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(f=>f.name),metric_units:e.reduce((f,w)=>(f[w.name]=w.unit,f),{}),granularity_ms:60*60*1e3,display:{},...t??{}};return{data:s,meta:l}},Pd=(e,t,n)=>{const r=Math.floor(Math.random()*9991)+10,o=new pt(r),i=Date.now()-6*60*60*1e3,s=Date.now(),u=new Date((i+s)/2).toISOString(),l=[];if(t){const p=Object.keys(t),g=Object.values(t),b=(O,P)=>{if(P===p.length){e.forEach(W=>{O[W.name]=o.next(1e3,5e7)}),l.push({version:"1.0",timestamp:new Date().toISOString(),event:{...O}});return}g[P].forEach(W=>{b({...O,[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:u,event:p})}const f={};if(t)for(const p in t)f[p]={},t[p].forEach(g=>{f[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:f,granularity_ms:s-i,...n??{}};return{data:l,meta:w}};function tn(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1)+e)}m.DeltaQueryTime=wd,m.Granularities=Le,m.REFRESH_INTERVAL_MS=3e4,m.SeededRandom=pt,m.TIMEFRAME_LOOKUP=Id,m.TimePeriods=Mo,m.Timeframe=G,m.TimeframeKeys=v,m.TimeseriesQueryTime=yd,m.UnaryQueryTime=Eo,m.aiExploreAggregations=St,m.basicExploreAggregations=Ve,m.ceilToNearestTimeGrain=en,m.dashboardTileTypes=Tc,m.dashboardsSchemaV1=bi,m.datasourceToFilterableDimensions=wn,m.datePickerSelectionToTimeframe=Sd,m.dstOffsetHours=Io,m.exploreAggregations=Ot,m.exploreFilterTypesV2=zt,m.filterableAiExploreDimensions=ue,m.filterableBasicExploreDimensions=ae,m.filterableExploreDimensions=se,m.filterableRequestDimensions=pn,m.filterableRequestMetrics=yn,m.filterableRequestWildcardDimensions=pi,m.floorToNearestTimeGrain=So,m.formatISOTimeWithTZ=md,m.formatTime=Jt,m.formatTimeRange=pd,m.generateCrossSectionalData=Pd,m.generateMultipleMetricTimeSeriesData=$d,m.generateSingleMetricTimeSeriesData=Zd,m.getFieldDataSources=Ec,m.granularitiesToOptions=gd,m.granularityMsToQuery=ko,m.granularityValues=He,m.msToGranularity=_d,m.parseDashboardConfig=Sc,m.queryDatasources=_i,m.queryableAiExploreDimensions=Xe,m.queryableBasicExploreDimensions=Ze,m.queryableExploreDimensions=Be,m.queryableRequestDimensions=mn,m.queryableRequestMetrics=_n,m.queryableRequestWildcardDimensions=gn,m.rand=tn,m.relativeTimeRangeValuesRequestV2=gi,m.relativeTimeRangeValuesV4=kt,m.reportChartTypes=li,m.requestFilterTypeEmptyV2=Dt,m.requestFilterTypeEqualsV2=di,m.requestFilterTypeMetricV2=fi,m.requestFilterTypeWildcardV2=hi,m.stripUnknownFilters=yi,m.timeRangeTypeV2=mi,m.timeframeToDatepickerSelection=Ed,m.timeframeToDatepickerTimeperiod=Md,m.zApiUsageQuery=Fr,m.zBarChartSchema=Pr,m.zBasicQuery=Ur,m.zDashboardConfig=Hr,m.zDonutChartSchema=Rr,m.zGaugeChartSchema=Cr,m.zLlmUsageQuery=Yr,m.zMetricCardSchema=Ar,m.zSingleValueSchema=jr,m.zSlottableSchema=$r,m.zTileConfig=qr,m.zTileDefinition=Gr,m.zTileLayout=Wr,m.zTimeseriesChartSchema=Nr,m.zTopNTableSchema=xr,m.zValidDashboardQuery=Lr,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})});
19
+ //# sourceMappingURL=vitals-utilities.umd.js.map