@malloy-publisher/sdk 0.13.0 → 0.14.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.
@@ -1,4 +1,4 @@
1
- "use strict";const $=require("react/jsx-runtime"),de=require("@mui/material"),w=require("react"),u=require("./useCompiledDocument-UADoxvYb.cjs.js"),G=require("./ServerProvider-Cvllj0GN.cjs.js"),v=u.reportClasses.drillCell;function me(e,t){const r=new Set;let a;try{a=e.getMetadata()?.getAllFields()??[]}catch{return r}const o=new Set;for(const n of a)!n||t(n)||n.tag?.tag("hidden")===void 0&&o.add(n.tag?.text("label")??n.name);for(const n of a){if(!n||!t(n))continue;const l=n.tag?.text("label")??n.name;o.has(l)||r.add(l)}return r}function j(e){const t=/^\s*(\d+)/.exec(e.style?.gridColumn??"");return t?t[1]:void 0}function be(e,t){if(t.size!==0)for(const r of e.querySelectorAll(".malloy-table")){const a=l=>l.closest(".malloy-table")===r,o=new Set;for(const l of r.querySelectorAll(".column-cell.th")){if(!a(l))continue;const i=(l.textContent??"").replace(/\u200b/g,"").trim(),m=j(l);m&&t.has(i)&&o.add(m)}if(o.size===0)continue;const n=new Set;for(const l of r.querySelectorAll(`.${v}[tabindex="0"]`)){if(!a(l))continue;const i=j(l);i&&(n.has(i)?l.tabIndex=-1:n.add(i))}for(const l of r.querySelectorAll(".column-cell.td")){if(!a(l))continue;const i=j(l),m=!l.querySelector(".value-null")&&(l.textContent??"").trim()!=="";if(i&&m&&o.has(i)&&!l.querySelector(".malloy-table")){if(l.classList.add(v),l.tabIndex===0)n.add(i);else{const p=n.has(i);p||n.add(i),l.tabIndex=p?-1:0}l.setAttribute("role","button")}}}}function Ce(e){const t=e.closest(".malloy-table"),r=j(e);return!t||!r?[]:Array.from(t.querySelectorAll(`.${v}`)).filter(a=>a.closest(".malloy-table")===t&&j(a)===r)}function ce(e,t){const r=Ce(e),a=r.indexOf(e);if(a===-1)return;const o=t==="first"?r[0]:t==="last"?r[r.length-1]:r[Math.min(Math.max(a+t,0),r.length-1)];if(o){for(const n of r)n.tabIndex=n===o?0:-1;return o}}function fe(e){return{background:e.dashboardRoot,tableBackground:e.tableBackground,tableHeaderColor:e.tableHeader,tableBodyColor:e.tableBody,tableBorder:e.border,tablePinnedBackground:e.tableHeaderBackground,tablePinnedBorder:e.pinnedBorder,tableFontSize:`${e.font.size}px`,fontFamily:e.font.family,mapColor:e.mapColor}}function ye(e){const{foreground:t,axisFaint:r,gridline:a,font:o}=e,n={background:e.background,font:o.family,title:{color:t,font:o.family},axis:{labelColor:t,titleColor:t,domainColor:r,tickColor:r,gridColor:a,labelFont:o.family,titleFont:o.family},legend:{labelColor:t,titleColor:t,labelFont:o.family,titleFont:o.family},header:{labelColor:t,titleColor:t},range:{category:e.series}},l={...n,legend:{...n.legend,orient:"bottom"}};return i=>i==="shape_map"?l:n}function pe(e){if(!e)return;const t=e.tag("theme");if(!t)return;const r={},a=t.tag("palette");if(a){const n={},l=a.textArray("series");l&&l.length>0&&(n.series=l);for(const i of G.PER_MODE_COLOR_KEYS){const m=a.tag(i);if(!m)continue;const p={},C=m.text("light"),x=m.text("dark");C&&(p.light=C),x&&(p.dark=x),Object.keys(p).length>0&&(n[i]=p)}Object.keys(n).length>0&&(r.palette=n)}const o=t.tag("font");if(o){const n={},l=o.text("family");l&&(n.family=l);const i=o.numeric("size");typeof i=="number"&&Number.isFinite(i)&&(n.size=i),Object.keys(n).length>0&&(r.font=n)}return Object.keys(r).length>0?r:void 0}const ee=e=>(e??[]).map(t=>t?.value).filter(t=>typeof t=="string");function Re(e){const t=e.replace(/[-_]+/g," ").replace(/\s+/g," ").trim();return t.charAt(0).toUpperCase()+t.slice(1)}const Te=e=>ee(e.annotations).some(t=>{const r=t.trim();return/^#[^("]/.test(r)&&/(?:^#|[\s{])label\s*=/.test(r)}),Ae=e=>`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`,Ee=e=>e.type?.element_type?.fields??e.type?.fields;function ge(e,t){let r=!1;return{fields:e.map(o=>{const n=Ee(o);if(n){const i=ge(n,u.requestsRowChart(ee(o.annotations)));if(!i.changed)return o;r=!0;const m=o.type?.element_type?{...o.type,element_type:{...o.type.element_type,fields:i.fields}}:{...o.type,fields:i.fields};return{...o,type:m}}if(!t||!o.name||Te(o))return o;const l=Re(o.name);return l===o.name?o:(r=!0,{...o,annotations:[{value:`# label=${Ae(l)}
1
+ "use strict";const $=require("react/jsx-runtime"),de=require("@mui/material"),w=require("react"),u=require("./useCompiledDocument-Co-INO6B.cjs.js"),G=require("./ServerProvider-D97_rUv5.cjs.js"),v=u.reportClasses.drillCell;function me(e,t){const r=new Set;let a;try{a=e.getMetadata()?.getAllFields()??[]}catch{return r}const o=new Set;for(const n of a)!n||t(n)||n.tag?.tag("hidden")===void 0&&o.add(n.tag?.text("label")??n.name);for(const n of a){if(!n||!t(n))continue;const l=n.tag?.text("label")??n.name;o.has(l)||r.add(l)}return r}function j(e){const t=/^\s*(\d+)/.exec(e.style?.gridColumn??"");return t?t[1]:void 0}function be(e,t){if(t.size!==0)for(const r of e.querySelectorAll(".malloy-table")){const a=l=>l.closest(".malloy-table")===r,o=new Set;for(const l of r.querySelectorAll(".column-cell.th")){if(!a(l))continue;const i=(l.textContent??"").replace(/\u200b/g,"").trim(),m=j(l);m&&t.has(i)&&o.add(m)}if(o.size===0)continue;const n=new Set;for(const l of r.querySelectorAll(`.${v}[tabindex="0"]`)){if(!a(l))continue;const i=j(l);i&&(n.has(i)?l.tabIndex=-1:n.add(i))}for(const l of r.querySelectorAll(".column-cell.td")){if(!a(l))continue;const i=j(l),m=!l.querySelector(".value-null")&&(l.textContent??"").trim()!=="";if(i&&m&&o.has(i)&&!l.querySelector(".malloy-table")){if(l.classList.add(v),l.tabIndex===0)n.add(i);else{const p=n.has(i);p||n.add(i),l.tabIndex=p?-1:0}l.setAttribute("role","button")}}}}function Ce(e){const t=e.closest(".malloy-table"),r=j(e);return!t||!r?[]:Array.from(t.querySelectorAll(`.${v}`)).filter(a=>a.closest(".malloy-table")===t&&j(a)===r)}function ce(e,t){const r=Ce(e),a=r.indexOf(e);if(a===-1)return;const o=t==="first"?r[0]:t==="last"?r[r.length-1]:r[Math.min(Math.max(a+t,0),r.length-1)];if(o){for(const n of r)n.tabIndex=n===o?0:-1;return o}}function fe(e){return{background:e.dashboardRoot,tableBackground:e.tableBackground,tableHeaderColor:e.tableHeader,tableBodyColor:e.tableBody,tableBorder:e.border,tablePinnedBackground:e.tableHeaderBackground,tablePinnedBorder:e.pinnedBorder,tableFontSize:`${e.font.size}px`,fontFamily:e.font.family,mapColor:e.mapColor}}function ye(e){const{foreground:t,axisFaint:r,gridline:a,font:o}=e,n={background:e.background,font:o.family,title:{color:t,font:o.family},axis:{labelColor:t,titleColor:t,domainColor:r,tickColor:r,gridColor:a,labelFont:o.family,titleFont:o.family},legend:{labelColor:t,titleColor:t,labelFont:o.family,titleFont:o.family},header:{labelColor:t,titleColor:t},range:{category:e.series}},l={...n,legend:{...n.legend,orient:"bottom"}};return i=>i==="shape_map"?l:n}function pe(e){if(!e)return;const t=e.tag("theme");if(!t)return;const r={},a=t.tag("palette");if(a){const n={},l=a.textArray("series");l&&l.length>0&&(n.series=l);for(const i of G.PER_MODE_COLOR_KEYS){const m=a.tag(i);if(!m)continue;const p={},C=m.text("light"),x=m.text("dark");C&&(p.light=C),x&&(p.dark=x),Object.keys(p).length>0&&(n[i]=p)}Object.keys(n).length>0&&(r.palette=n)}const o=t.tag("font");if(o){const n={},l=o.text("family");l&&(n.family=l);const i=o.numeric("size");typeof i=="number"&&Number.isFinite(i)&&(n.size=i),Object.keys(n).length>0&&(r.font=n)}return Object.keys(r).length>0?r:void 0}const ee=e=>(e??[]).map(t=>t?.value).filter(t=>typeof t=="string");function Re(e){const t=e.replace(/[-_]+/g," ").replace(/\s+/g," ").trim();return t.charAt(0).toUpperCase()+t.slice(1)}const Te=e=>ee(e.annotations).some(t=>{const r=t.trim();return/^#[^("]/.test(r)&&/(?:^#|[\s{])label\s*=/.test(r)}),Ae=e=>`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`,Ee=e=>e.type?.element_type?.fields??e.type?.fields;function ge(e,t){let r=!1;return{fields:e.map(o=>{const n=Ee(o);if(n){const i=ge(n,u.requestsRowChart(ee(o.annotations)));if(!i.changed)return o;r=!0;const m=o.type?.element_type?{...o.type,element_type:{...o.type.element_type,fields:i.fields}}:{...o.type,fields:i.fields};return{...o,type:m}}if(!t||!o.name||Te(o))return o;const l=Re(o.name);return l===o.name?o:(r=!0,{...o,annotations:[{value:`# label=${Ae(l)}
2
2
  `},...o.annotations??[]]})}),changed:r}}function Se(e){if(!e||typeof e!="object")return e;const t=e,r=t.schema?.fields;if(!Array.isArray(r))return e;const{fields:a,changed:o}=ge(r,u.requestsRowChart(ee(t.annotations)));return o?{...t,schema:{...t.schema,fields:a}}:e}const ue=320,_e=10,De=96,Oe=4e3;function Fe(e,t){if(e!=="bar"&&e!=="combo"&&e!=="line"&&e!=="chart"&&e!=="scatter_chart")return;if(e!=="bar"&&e!=="combo")return ue;const r=t?.data?.array_value?.length,a=r===void 0?0:r*_e+De;return Math.min(Math.max(ue,a),Oe)}function Le(e){let t;return{onClick:r=>{const a={...r,...ze(r)};t=a,queueMicrotask(()=>{t===a&&(t=void 0),e(a)})},onDrill:r=>{const a=t;t=void 0,a&&r.stableDrillClauses!==void 0&&(a.drillClauses=r.stableDrillClauses)}}}function ze(e){const t=e.field;try{const r=t?.getEffectiveQueryTimezone?.();return r?{timezone:r}:{}}catch{return{}}}function Ie(e){const t=r=>{let a=!1;try{a=r.isArray?.()===!0}catch{a=!1}a&&"stableDrillFilters"in r&&Object.defineProperty(r,"stableDrillFilters",{configurable:!0,get:()=>[]});for(const o of r.fields??[])t(o)};e&&t(e)}const B="data-publisher-fill";let X;function ve(){if(X===void 0)try{X=new Function("return true")()===!0}catch{X=!1}return X}const Me=async(e,t,r)=>{if(typeof window>"u")throw new Error("MalloyRenderer can only be used in browser environment");const{MalloyRenderer:a}=await u.loadMalloyRenderer();return new a({onClick:t,...r?{onDrill:r,tableConfig:{enableDrill:!0}}:{},vegaConfigOverride:ye(e),...ve()?{}:{useVegaInterpreter:!0},theme:fe(e),onError:n=>{console.error("Error rendering visualization:",typeof n,n)}}).createViz()};async function $e(e){if(!e||typeof e!="object")return;const t=e,r=[...Array.isArray(t.model_annotations)?t.model_annotations:[],...Array.isArray(t.source_annotations)?t.source_annotations:[],...Array.isArray(t.annotations)?t.annotations:[]].map(o=>typeof o?.value=="string"?o.value:void 0).filter(o=>!!o);if(r.length===0)return;let a;try{({parseAnnotation:a}=await u.loadMalloyTag())}catch{return}try{const{tag:o}=a(r);return pe(o)}catch(o){console.warn("Failed to parse # theme.* annotations; chart will render with the shell theme.",{error:o,lines:r});return}}function Be(e,t,r){const a=u.buildTableCssVars(t,r);for(const[o,n]of Object.entries(a))e.style.setProperty(o,n)}const je=`
3
3
  /* Card geometry, through the renderer's OWN theme vars rather than over the top
4
4
  of them. It declares --malloy-theme--dashboard-* on .malloy-render itself and
@@ -1,8 +1,8 @@
1
1
  import { jsx as I } from "react/jsx-runtime";
2
2
  import { Box as de } from "@mui/material";
3
3
  import { Suspense as we, useRef as M, useMemo as ce, useEffect as ke, useLayoutEffect as xe } from "react";
4
- import { r as Ce, a as fe, D as Re, b as Z, T as V, l as Ee, c as Ae, d as Te, e as Se, R as _e, m as De, f as Oe, g as ue } from "./useCompiledDocument-CwMwrEXo.es.js";
5
- import { bx as Fe, bv as ze, by as Le, bz as Me } from "./ServerProvider-8Eul_YOl.es.js";
4
+ import { r as Ce, a as fe, D as Re, b as Z, T as V, l as Ee, c as Ae, d as Te, e as Se, R as _e, m as De, f as Oe, g as ue } from "./useCompiledDocument-CF5s0cXj.es.js";
5
+ import { bx as Fe, bv as ze, by as Le, bz as Me } from "./ServerProvider-BHM9y5l0.es.js";
6
6
  const g = Ce.drillCell;
7
7
  function Ie(e, t) {
8
8
  const r = /* @__PURE__ */ new Set();
@@ -639,6 +639,7 @@ const v = function(l, ...r) {
639
639
  Below: "below"
640
640
  }, _t = {
641
641
  View: "view",
642
+ Query: "query",
642
643
  Rollup: "rollup",
643
644
  Materialized: "materialized",
644
645
  Live: "live"
@@ -665,6 +666,7 @@ const v = function(l, ...r) {
665
666
  DynamicProjection: "dynamic_projection",
666
667
  DynamicJoin: "dynamic_join",
667
668
  DynamicJoinedWhere: "dynamic_joined_where",
669
+ InheritedWhereWithGiven: "inherited_where_with_given",
668
670
  PartitionWithoutStorage: "partition_without_storage",
669
671
  PartitionColumnUnknown: "partition_column_unknown",
670
672
  PartitionColumnNotPublic: "partition_column_not_public",
@@ -674,8 +676,12 @@ const v = function(l, ...r) {
674
676
  NotDuckdbPortable: "not_duckdb_portable",
675
677
  PublicSurfaceUnknown: "public_surface_unknown",
676
678
  ReadOnlyDialect: "read_only_dialect",
679
+ StorageSourceUnsupported: "storage_source_unsupported",
677
680
  EnvReference: "env_reference",
678
- RollupNameCollision: "rollup_name_collision"
681
+ RollupNameCollision: "rollup_name_collision",
682
+ EmptyStorage: "empty_storage",
683
+ TableNameCollision: "table_name_collision",
684
+ CurrentTime: "current_time"
679
685
  }, Zt = {
680
686
  Grid: "grid",
681
687
  Linear: "linear"
@@ -3548,7 +3554,7 @@ const xn = {
3548
3554
  }, ia = function(l) {
3549
3555
  return {
3550
3556
  /**
3551
- * Creates a new Malloy package within the specified environment. A package serves as a container for models, notebooks, embedded databases, and other resources. The package will be initialized with the provided metadata and can immediately accept content. ## Dry run With `?dryRun=true` the request needs a `location`. The tree there is downloaded and loaded, and the publish checks run, exactly as a publish would run them, and then it is discarded: nothing is installed, served or listed, the package already served under the name (if any) is untouched, no version is recorded, and the load\'s connections are closed. The answer is what a publish would answer for the tree itself: the same 400 or 424 refusal, or 200 with the package as it would load, its `warnings` included, plus the `location` it was loaded from. The 200 also carries what a publish would build and serve: the `buildPlan`, and `serveVerdicts`, each materialized source\'s serve verdict with each stored source\'s named views compiled against a serve shape (no table is built). With package versioning on, the tree\'s `publisher.json` must declare a valid version, as a versioned publish requires (400 `MANIFEST_VERSION_MISSING` or `MANIFEST_VERSION_INVALID`), and the 200 names it as `versionId`. Version lifecycle checks (a version that already exists, `latest`) are not part of it, and the 200 carries no `latestVersion` or `status`, which describe the package being served. A frozen configuration refuses a dry run as it refuses a publish, since the server still downloads and loads the caller\'s content; so does memory backpressure (503). A server runs at most 2 dry runs at once and refuses more with 503. With package versioning on, a `description` that is not a string or a `manifestLocation` that names no manifest is the 400 a versioned publish answers. ## Versioned publish Package versioning is a server setting, `PUBLISHER_PACKAGE_VERSIONING` (`on` by default; `ServerStatus.packageVersioning` reports it), and a transition: a later release removes the setting and always publishes versions. With it off, a request that carries a `location` installs the package in place, replacing the previous publish, as before versions, whatever its `publisher.json` declares; the package has no versions, and the server logs a warning that names it. A package that already has published versions refuses that with 409 (`reason` `PACKAGE_IS_VERSIONED`). With it on, a request that carries a `location` publishes an immutable version of the package: the one its own `publisher.json` declares. The request takes no version parameter: the version is that field, the way `npm publish` reads `package.json`, so bumping it is the release action. - A `publisher.json` with no `version` is refused with 400 (`reason` `MANIFEST_VERSION_MISSING`), and one whose `version` is not a semantic version with 400 (`reason` `MANIFEST_VERSION_INVALID`). Nothing is written. - Publishing a version the package already has, with different content, is refused with 409 (`reason` `VERSION_CONFLICT`). The same content again succeeds and writes no files, so re-loading a version onto a server that already holds it is safe to retry; a non-null `manifestLocation` on that request binds the version to it. A re-load leaves `latest` where it is, so a retried publish never undoes a rollback; it sets `latest` only for a package that has none. Re-publishing an archived version is refused with 410 (`reason` `VERSION_ARCHIVED`): unarchive it instead. - A version that does not pass the publish checks (the same ones an unversioned publish applies) is refused with 400, and the versions already published keep serving. - Under `versionPromotion: \"on-publish\"` (the default), the new version becomes the package\'s `latest` unless a higher version already is. Under `\"explicit\"`, publish never moves `latest`; `PUT .../packages/{packageName}/latest` does. - A package mounted for watch mode is the author\'s own source directory, so it cannot hold immutable versions: publishing a version of it is refused with 400. - The request\'s `description`, when sent, is the package\'s description. Each version keeps the `description` from its own publisher.json. A request without a `location` registers a directory already in the environment as a single unversioned package, as packages loaded from `publisher.config.json` are with versioning off. A package that already has versions refuses that with 409 (`reason` `PACKAGE_IS_VERSIONED`).
3557
+ * Creates a new Malloy package within the specified environment. A package serves as a container for models, notebooks, embedded databases, and other resources. The package will be initialized with the provided metadata and can immediately accept content. ## Dry run With `?dryRun=true` the request needs a `location`. The tree there is downloaded and loaded, and the publish checks run, exactly as a publish would run them, and then it is discarded: nothing is installed, served or listed, the package already served under the name (if any) is untouched, no version is recorded, and the load\'s connections are closed. The answer is what a publish would answer for the tree itself: the same 400 or 424 refusal, or 200 with the package as it would load, its `warnings` included, plus the `location` it was loaded from. The 200 also carries what a publish would build and serve: the `buildPlan`, and `serveVerdicts`, each materialized source\'s serve verdict with each stored source\'s named views compiled against a compile-only served copy (no table is built). With package versioning on, the tree\'s `publisher.json` must declare a valid version, as a versioned publish requires (400 `MANIFEST_VERSION_MISSING` or `MANIFEST_VERSION_INVALID`), and the 200 names it as `versionId`. Version lifecycle checks (a version that already exists, `latest`) are not part of it, and the 200 carries no `latestVersion` or `status`, which describe the package being served. A frozen configuration refuses a dry run as it refuses a publish, since the server still downloads and loads the caller\'s content; so does memory backpressure (503). A server runs at most 2 dry runs at once and refuses more with 503. With package versioning on, a `description` that is not a string or a `manifestLocation` that names no manifest is the 400 a versioned publish answers. ## Versioned publish Package versioning is a server setting, `PUBLISHER_PACKAGE_VERSIONING` (`on` by default; `ServerStatus.packageVersioning` reports it), and a transition: a later release removes the setting and always publishes versions. With it off, a request that carries a `location` installs the package in place, replacing the previous publish, as before versions, whatever its `publisher.json` declares; the package has no versions, and the server logs a warning that names it. A package that already has published versions refuses that with 409 (`reason` `PACKAGE_IS_VERSIONED`). With it on, a request that carries a `location` publishes an immutable version of the package: the one its own `publisher.json` declares. The request takes no version parameter: the version is that field, the way `npm publish` reads `package.json`, so bumping it is the release action. - A `publisher.json` with no `version` is refused with 400 (`reason` `MANIFEST_VERSION_MISSING`), and one whose `version` is not a semantic version with 400 (`reason` `MANIFEST_VERSION_INVALID`). Nothing is written. - Publishing a version the package already has, with different content, is refused with 409 (`reason` `VERSION_CONFLICT`). The same content again succeeds and writes no files, so re-loading a version onto a server that already holds it is safe to retry; a non-null `manifestLocation` on that request binds the version to it. A re-load leaves `latest` where it is, so a retried publish never undoes a rollback; it sets `latest` only for a package that has none. Re-publishing an archived version is refused with 410 (`reason` `VERSION_ARCHIVED`): unarchive it instead. - A version that does not pass the publish checks (the same ones an unversioned publish applies) is refused with 400, and the versions already published keep serving. - Under `versionPromotion: \"on-publish\"` (the default), the new version becomes the package\'s `latest` unless a higher version already is. Under `\"explicit\"`, publish never moves `latest`; `PUT .../packages/{packageName}/latest` does. - A package mounted for watch mode is the author\'s own source directory, so it cannot hold immutable versions: publishing a version of it is refused with 400. - The request\'s `description`, when sent, is the package\'s description. Each version keeps the `description` from its own publisher.json. A request without a `location` registers a directory already in the environment as a single unversioned package, as packages loaded from `publisher.config.json` are with versioning off. A package that already has versions refuses that with 409 (`reason` `PACKAGE_IS_VERSIONED`).
3552
3558
  * @summary Create a new package
3553
3559
  * @param {string} environmentName Name of the environment
3554
3560
  * @param {Package} _package
@@ -3772,7 +3778,7 @@ const xn = {
3772
3778
  const r = ia(l);
3773
3779
  return {
3774
3780
  /**
3775
- * Creates a new Malloy package within the specified environment. A package serves as a container for models, notebooks, embedded databases, and other resources. The package will be initialized with the provided metadata and can immediately accept content. ## Dry run With `?dryRun=true` the request needs a `location`. The tree there is downloaded and loaded, and the publish checks run, exactly as a publish would run them, and then it is discarded: nothing is installed, served or listed, the package already served under the name (if any) is untouched, no version is recorded, and the load\'s connections are closed. The answer is what a publish would answer for the tree itself: the same 400 or 424 refusal, or 200 with the package as it would load, its `warnings` included, plus the `location` it was loaded from. The 200 also carries what a publish would build and serve: the `buildPlan`, and `serveVerdicts`, each materialized source\'s serve verdict with each stored source\'s named views compiled against a serve shape (no table is built). With package versioning on, the tree\'s `publisher.json` must declare a valid version, as a versioned publish requires (400 `MANIFEST_VERSION_MISSING` or `MANIFEST_VERSION_INVALID`), and the 200 names it as `versionId`. Version lifecycle checks (a version that already exists, `latest`) are not part of it, and the 200 carries no `latestVersion` or `status`, which describe the package being served. A frozen configuration refuses a dry run as it refuses a publish, since the server still downloads and loads the caller\'s content; so does memory backpressure (503). A server runs at most 2 dry runs at once and refuses more with 503. With package versioning on, a `description` that is not a string or a `manifestLocation` that names no manifest is the 400 a versioned publish answers. ## Versioned publish Package versioning is a server setting, `PUBLISHER_PACKAGE_VERSIONING` (`on` by default; `ServerStatus.packageVersioning` reports it), and a transition: a later release removes the setting and always publishes versions. With it off, a request that carries a `location` installs the package in place, replacing the previous publish, as before versions, whatever its `publisher.json` declares; the package has no versions, and the server logs a warning that names it. A package that already has published versions refuses that with 409 (`reason` `PACKAGE_IS_VERSIONED`). With it on, a request that carries a `location` publishes an immutable version of the package: the one its own `publisher.json` declares. The request takes no version parameter: the version is that field, the way `npm publish` reads `package.json`, so bumping it is the release action. - A `publisher.json` with no `version` is refused with 400 (`reason` `MANIFEST_VERSION_MISSING`), and one whose `version` is not a semantic version with 400 (`reason` `MANIFEST_VERSION_INVALID`). Nothing is written. - Publishing a version the package already has, with different content, is refused with 409 (`reason` `VERSION_CONFLICT`). The same content again succeeds and writes no files, so re-loading a version onto a server that already holds it is safe to retry; a non-null `manifestLocation` on that request binds the version to it. A re-load leaves `latest` where it is, so a retried publish never undoes a rollback; it sets `latest` only for a package that has none. Re-publishing an archived version is refused with 410 (`reason` `VERSION_ARCHIVED`): unarchive it instead. - A version that does not pass the publish checks (the same ones an unversioned publish applies) is refused with 400, and the versions already published keep serving. - Under `versionPromotion: \"on-publish\"` (the default), the new version becomes the package\'s `latest` unless a higher version already is. Under `\"explicit\"`, publish never moves `latest`; `PUT .../packages/{packageName}/latest` does. - A package mounted for watch mode is the author\'s own source directory, so it cannot hold immutable versions: publishing a version of it is refused with 400. - The request\'s `description`, when sent, is the package\'s description. Each version keeps the `description` from its own publisher.json. A request without a `location` registers a directory already in the environment as a single unversioned package, as packages loaded from `publisher.config.json` are with versioning off. A package that already has versions refuses that with 409 (`reason` `PACKAGE_IS_VERSIONED`).
3781
+ * Creates a new Malloy package within the specified environment. A package serves as a container for models, notebooks, embedded databases, and other resources. The package will be initialized with the provided metadata and can immediately accept content. ## Dry run With `?dryRun=true` the request needs a `location`. The tree there is downloaded and loaded, and the publish checks run, exactly as a publish would run them, and then it is discarded: nothing is installed, served or listed, the package already served under the name (if any) is untouched, no version is recorded, and the load\'s connections are closed. The answer is what a publish would answer for the tree itself: the same 400 or 424 refusal, or 200 with the package as it would load, its `warnings` included, plus the `location` it was loaded from. The 200 also carries what a publish would build and serve: the `buildPlan`, and `serveVerdicts`, each materialized source\'s serve verdict with each stored source\'s named views compiled against a compile-only served copy (no table is built). With package versioning on, the tree\'s `publisher.json` must declare a valid version, as a versioned publish requires (400 `MANIFEST_VERSION_MISSING` or `MANIFEST_VERSION_INVALID`), and the 200 names it as `versionId`. Version lifecycle checks (a version that already exists, `latest`) are not part of it, and the 200 carries no `latestVersion` or `status`, which describe the package being served. A frozen configuration refuses a dry run as it refuses a publish, since the server still downloads and loads the caller\'s content; so does memory backpressure (503). A server runs at most 2 dry runs at once and refuses more with 503. With package versioning on, a `description` that is not a string or a `manifestLocation` that names no manifest is the 400 a versioned publish answers. ## Versioned publish Package versioning is a server setting, `PUBLISHER_PACKAGE_VERSIONING` (`on` by default; `ServerStatus.packageVersioning` reports it), and a transition: a later release removes the setting and always publishes versions. With it off, a request that carries a `location` installs the package in place, replacing the previous publish, as before versions, whatever its `publisher.json` declares; the package has no versions, and the server logs a warning that names it. A package that already has published versions refuses that with 409 (`reason` `PACKAGE_IS_VERSIONED`). With it on, a request that carries a `location` publishes an immutable version of the package: the one its own `publisher.json` declares. The request takes no version parameter: the version is that field, the way `npm publish` reads `package.json`, so bumping it is the release action. - A `publisher.json` with no `version` is refused with 400 (`reason` `MANIFEST_VERSION_MISSING`), and one whose `version` is not a semantic version with 400 (`reason` `MANIFEST_VERSION_INVALID`). Nothing is written. - Publishing a version the package already has, with different content, is refused with 409 (`reason` `VERSION_CONFLICT`). The same content again succeeds and writes no files, so re-loading a version onto a server that already holds it is safe to retry; a non-null `manifestLocation` on that request binds the version to it. A re-load leaves `latest` where it is, so a retried publish never undoes a rollback; it sets `latest` only for a package that has none. Re-publishing an archived version is refused with 410 (`reason` `VERSION_ARCHIVED`): unarchive it instead. - A version that does not pass the publish checks (the same ones an unversioned publish applies) is refused with 400, and the versions already published keep serving. - Under `versionPromotion: \"on-publish\"` (the default), the new version becomes the package\'s `latest` unless a higher version already is. Under `\"explicit\"`, publish never moves `latest`; `PUT .../packages/{packageName}/latest` does. - A package mounted for watch mode is the author\'s own source directory, so it cannot hold immutable versions: publishing a version of it is refused with 400. - The request\'s `description`, when sent, is the package\'s description. Each version keeps the `description` from its own publisher.json. A request without a `location` registers a directory already in the environment as a single unversioned package, as packages loaded from `publisher.config.json` are with versioning off. A package that already has versions refuses that with 409 (`reason` `PACKAGE_IS_VERSIONED`).
3776
3782
  * @summary Create a new package
3777
3783
  * @param {string} environmentName Name of the environment
3778
3784
  * @param {Package} _package
@@ -3906,7 +3912,7 @@ const xn = {
3906
3912
  const n = R(l);
3907
3913
  return {
3908
3914
  /**
3909
- * Creates a new Malloy package within the specified environment. A package serves as a container for models, notebooks, embedded databases, and other resources. The package will be initialized with the provided metadata and can immediately accept content. ## Dry run With `?dryRun=true` the request needs a `location`. The tree there is downloaded and loaded, and the publish checks run, exactly as a publish would run them, and then it is discarded: nothing is installed, served or listed, the package already served under the name (if any) is untouched, no version is recorded, and the load\'s connections are closed. The answer is what a publish would answer for the tree itself: the same 400 or 424 refusal, or 200 with the package as it would load, its `warnings` included, plus the `location` it was loaded from. The 200 also carries what a publish would build and serve: the `buildPlan`, and `serveVerdicts`, each materialized source\'s serve verdict with each stored source\'s named views compiled against a serve shape (no table is built). With package versioning on, the tree\'s `publisher.json` must declare a valid version, as a versioned publish requires (400 `MANIFEST_VERSION_MISSING` or `MANIFEST_VERSION_INVALID`), and the 200 names it as `versionId`. Version lifecycle checks (a version that already exists, `latest`) are not part of it, and the 200 carries no `latestVersion` or `status`, which describe the package being served. A frozen configuration refuses a dry run as it refuses a publish, since the server still downloads and loads the caller\'s content; so does memory backpressure (503). A server runs at most 2 dry runs at once and refuses more with 503. With package versioning on, a `description` that is not a string or a `manifestLocation` that names no manifest is the 400 a versioned publish answers. ## Versioned publish Package versioning is a server setting, `PUBLISHER_PACKAGE_VERSIONING` (`on` by default; `ServerStatus.packageVersioning` reports it), and a transition: a later release removes the setting and always publishes versions. With it off, a request that carries a `location` installs the package in place, replacing the previous publish, as before versions, whatever its `publisher.json` declares; the package has no versions, and the server logs a warning that names it. A package that already has published versions refuses that with 409 (`reason` `PACKAGE_IS_VERSIONED`). With it on, a request that carries a `location` publishes an immutable version of the package: the one its own `publisher.json` declares. The request takes no version parameter: the version is that field, the way `npm publish` reads `package.json`, so bumping it is the release action. - A `publisher.json` with no `version` is refused with 400 (`reason` `MANIFEST_VERSION_MISSING`), and one whose `version` is not a semantic version with 400 (`reason` `MANIFEST_VERSION_INVALID`). Nothing is written. - Publishing a version the package already has, with different content, is refused with 409 (`reason` `VERSION_CONFLICT`). The same content again succeeds and writes no files, so re-loading a version onto a server that already holds it is safe to retry; a non-null `manifestLocation` on that request binds the version to it. A re-load leaves `latest` where it is, so a retried publish never undoes a rollback; it sets `latest` only for a package that has none. Re-publishing an archived version is refused with 410 (`reason` `VERSION_ARCHIVED`): unarchive it instead. - A version that does not pass the publish checks (the same ones an unversioned publish applies) is refused with 400, and the versions already published keep serving. - Under `versionPromotion: \"on-publish\"` (the default), the new version becomes the package\'s `latest` unless a higher version already is. Under `\"explicit\"`, publish never moves `latest`; `PUT .../packages/{packageName}/latest` does. - A package mounted for watch mode is the author\'s own source directory, so it cannot hold immutable versions: publishing a version of it is refused with 400. - The request\'s `description`, when sent, is the package\'s description. Each version keeps the `description` from its own publisher.json. A request without a `location` registers a directory already in the environment as a single unversioned package, as packages loaded from `publisher.config.json` are with versioning off. A package that already has versions refuses that with 409 (`reason` `PACKAGE_IS_VERSIONED`).
3915
+ * Creates a new Malloy package within the specified environment. A package serves as a container for models, notebooks, embedded databases, and other resources. The package will be initialized with the provided metadata and can immediately accept content. ## Dry run With `?dryRun=true` the request needs a `location`. The tree there is downloaded and loaded, and the publish checks run, exactly as a publish would run them, and then it is discarded: nothing is installed, served or listed, the package already served under the name (if any) is untouched, no version is recorded, and the load\'s connections are closed. The answer is what a publish would answer for the tree itself: the same 400 or 424 refusal, or 200 with the package as it would load, its `warnings` included, plus the `location` it was loaded from. The 200 also carries what a publish would build and serve: the `buildPlan`, and `serveVerdicts`, each materialized source\'s serve verdict with each stored source\'s named views compiled against a compile-only served copy (no table is built). With package versioning on, the tree\'s `publisher.json` must declare a valid version, as a versioned publish requires (400 `MANIFEST_VERSION_MISSING` or `MANIFEST_VERSION_INVALID`), and the 200 names it as `versionId`. Version lifecycle checks (a version that already exists, `latest`) are not part of it, and the 200 carries no `latestVersion` or `status`, which describe the package being served. A frozen configuration refuses a dry run as it refuses a publish, since the server still downloads and loads the caller\'s content; so does memory backpressure (503). A server runs at most 2 dry runs at once and refuses more with 503. With package versioning on, a `description` that is not a string or a `manifestLocation` that names no manifest is the 400 a versioned publish answers. ## Versioned publish Package versioning is a server setting, `PUBLISHER_PACKAGE_VERSIONING` (`on` by default; `ServerStatus.packageVersioning` reports it), and a transition: a later release removes the setting and always publishes versions. With it off, a request that carries a `location` installs the package in place, replacing the previous publish, as before versions, whatever its `publisher.json` declares; the package has no versions, and the server logs a warning that names it. A package that already has published versions refuses that with 409 (`reason` `PACKAGE_IS_VERSIONED`). With it on, a request that carries a `location` publishes an immutable version of the package: the one its own `publisher.json` declares. The request takes no version parameter: the version is that field, the way `npm publish` reads `package.json`, so bumping it is the release action. - A `publisher.json` with no `version` is refused with 400 (`reason` `MANIFEST_VERSION_MISSING`), and one whose `version` is not a semantic version with 400 (`reason` `MANIFEST_VERSION_INVALID`). Nothing is written. - Publishing a version the package already has, with different content, is refused with 409 (`reason` `VERSION_CONFLICT`). The same content again succeeds and writes no files, so re-loading a version onto a server that already holds it is safe to retry; a non-null `manifestLocation` on that request binds the version to it. A re-load leaves `latest` where it is, so a retried publish never undoes a rollback; it sets `latest` only for a package that has none. Re-publishing an archived version is refused with 410 (`reason` `VERSION_ARCHIVED`): unarchive it instead. - A version that does not pass the publish checks (the same ones an unversioned publish applies) is refused with 400, and the versions already published keep serving. - Under `versionPromotion: \"on-publish\"` (the default), the new version becomes the package\'s `latest` unless a higher version already is. Under `\"explicit\"`, publish never moves `latest`; `PUT .../packages/{packageName}/latest` does. - A package mounted for watch mode is the author\'s own source directory, so it cannot hold immutable versions: publishing a version of it is refused with 400. - The request\'s `description`, when sent, is the package\'s description. Each version keeps the `description` from its own publisher.json. A request without a `location` registers a directory already in the environment as a single unversioned package, as packages loaded from `publisher.config.json` are with versioning off. A package that already has versions refuses that with 409 (`reason` `PACKAGE_IS_VERSIONED`).
3910
3916
  * @summary Create a new package
3911
3917
  * @param {string} environmentName Name of the environment
3912
3918
  * @param {Package} _package
@@ -4029,7 +4035,7 @@ const xn = {
4029
4035
  };
4030
4036
  class pa extends I {
4031
4037
  /**
4032
- * Creates a new Malloy package within the specified environment. A package serves as a container for models, notebooks, embedded databases, and other resources. The package will be initialized with the provided metadata and can immediately accept content. ## Dry run With `?dryRun=true` the request needs a `location`. The tree there is downloaded and loaded, and the publish checks run, exactly as a publish would run them, and then it is discarded: nothing is installed, served or listed, the package already served under the name (if any) is untouched, no version is recorded, and the load\'s connections are closed. The answer is what a publish would answer for the tree itself: the same 400 or 424 refusal, or 200 with the package as it would load, its `warnings` included, plus the `location` it was loaded from. The 200 also carries what a publish would build and serve: the `buildPlan`, and `serveVerdicts`, each materialized source\'s serve verdict with each stored source\'s named views compiled against a serve shape (no table is built). With package versioning on, the tree\'s `publisher.json` must declare a valid version, as a versioned publish requires (400 `MANIFEST_VERSION_MISSING` or `MANIFEST_VERSION_INVALID`), and the 200 names it as `versionId`. Version lifecycle checks (a version that already exists, `latest`) are not part of it, and the 200 carries no `latestVersion` or `status`, which describe the package being served. A frozen configuration refuses a dry run as it refuses a publish, since the server still downloads and loads the caller\'s content; so does memory backpressure (503). A server runs at most 2 dry runs at once and refuses more with 503. With package versioning on, a `description` that is not a string or a `manifestLocation` that names no manifest is the 400 a versioned publish answers. ## Versioned publish Package versioning is a server setting, `PUBLISHER_PACKAGE_VERSIONING` (`on` by default; `ServerStatus.packageVersioning` reports it), and a transition: a later release removes the setting and always publishes versions. With it off, a request that carries a `location` installs the package in place, replacing the previous publish, as before versions, whatever its `publisher.json` declares; the package has no versions, and the server logs a warning that names it. A package that already has published versions refuses that with 409 (`reason` `PACKAGE_IS_VERSIONED`). With it on, a request that carries a `location` publishes an immutable version of the package: the one its own `publisher.json` declares. The request takes no version parameter: the version is that field, the way `npm publish` reads `package.json`, so bumping it is the release action. - A `publisher.json` with no `version` is refused with 400 (`reason` `MANIFEST_VERSION_MISSING`), and one whose `version` is not a semantic version with 400 (`reason` `MANIFEST_VERSION_INVALID`). Nothing is written. - Publishing a version the package already has, with different content, is refused with 409 (`reason` `VERSION_CONFLICT`). The same content again succeeds and writes no files, so re-loading a version onto a server that already holds it is safe to retry; a non-null `manifestLocation` on that request binds the version to it. A re-load leaves `latest` where it is, so a retried publish never undoes a rollback; it sets `latest` only for a package that has none. Re-publishing an archived version is refused with 410 (`reason` `VERSION_ARCHIVED`): unarchive it instead. - A version that does not pass the publish checks (the same ones an unversioned publish applies) is refused with 400, and the versions already published keep serving. - Under `versionPromotion: \"on-publish\"` (the default), the new version becomes the package\'s `latest` unless a higher version already is. Under `\"explicit\"`, publish never moves `latest`; `PUT .../packages/{packageName}/latest` does. - A package mounted for watch mode is the author\'s own source directory, so it cannot hold immutable versions: publishing a version of it is refused with 400. - The request\'s `description`, when sent, is the package\'s description. Each version keeps the `description` from its own publisher.json. A request without a `location` registers a directory already in the environment as a single unversioned package, as packages loaded from `publisher.config.json` are with versioning off. A package that already has versions refuses that with 409 (`reason` `PACKAGE_IS_VERSIONED`).
4038
+ * Creates a new Malloy package within the specified environment. A package serves as a container for models, notebooks, embedded databases, and other resources. The package will be initialized with the provided metadata and can immediately accept content. ## Dry run With `?dryRun=true` the request needs a `location`. The tree there is downloaded and loaded, and the publish checks run, exactly as a publish would run them, and then it is discarded: nothing is installed, served or listed, the package already served under the name (if any) is untouched, no version is recorded, and the load\'s connections are closed. The answer is what a publish would answer for the tree itself: the same 400 or 424 refusal, or 200 with the package as it would load, its `warnings` included, plus the `location` it was loaded from. The 200 also carries what a publish would build and serve: the `buildPlan`, and `serveVerdicts`, each materialized source\'s serve verdict with each stored source\'s named views compiled against a compile-only served copy (no table is built). With package versioning on, the tree\'s `publisher.json` must declare a valid version, as a versioned publish requires (400 `MANIFEST_VERSION_MISSING` or `MANIFEST_VERSION_INVALID`), and the 200 names it as `versionId`. Version lifecycle checks (a version that already exists, `latest`) are not part of it, and the 200 carries no `latestVersion` or `status`, which describe the package being served. A frozen configuration refuses a dry run as it refuses a publish, since the server still downloads and loads the caller\'s content; so does memory backpressure (503). A server runs at most 2 dry runs at once and refuses more with 503. With package versioning on, a `description` that is not a string or a `manifestLocation` that names no manifest is the 400 a versioned publish answers. ## Versioned publish Package versioning is a server setting, `PUBLISHER_PACKAGE_VERSIONING` (`on` by default; `ServerStatus.packageVersioning` reports it), and a transition: a later release removes the setting and always publishes versions. With it off, a request that carries a `location` installs the package in place, replacing the previous publish, as before versions, whatever its `publisher.json` declares; the package has no versions, and the server logs a warning that names it. A package that already has published versions refuses that with 409 (`reason` `PACKAGE_IS_VERSIONED`). With it on, a request that carries a `location` publishes an immutable version of the package: the one its own `publisher.json` declares. The request takes no version parameter: the version is that field, the way `npm publish` reads `package.json`, so bumping it is the release action. - A `publisher.json` with no `version` is refused with 400 (`reason` `MANIFEST_VERSION_MISSING`), and one whose `version` is not a semantic version with 400 (`reason` `MANIFEST_VERSION_INVALID`). Nothing is written. - Publishing a version the package already has, with different content, is refused with 409 (`reason` `VERSION_CONFLICT`). The same content again succeeds and writes no files, so re-loading a version onto a server that already holds it is safe to retry; a non-null `manifestLocation` on that request binds the version to it. A re-load leaves `latest` where it is, so a retried publish never undoes a rollback; it sets `latest` only for a package that has none. Re-publishing an archived version is refused with 410 (`reason` `VERSION_ARCHIVED`): unarchive it instead. - A version that does not pass the publish checks (the same ones an unversioned publish applies) is refused with 400, and the versions already published keep serving. - Under `versionPromotion: \"on-publish\"` (the default), the new version becomes the package\'s `latest` unless a higher version already is. Under `\"explicit\"`, publish never moves `latest`; `PUT .../packages/{packageName}/latest` does. - A package mounted for watch mode is the author\'s own source directory, so it cannot hold immutable versions: publishing a version of it is refused with 400. - The request\'s `description`, when sent, is the package\'s description. Each version keeps the `description` from its own publisher.json. A request without a `location` registers a directory already in the environment as a single unversioned package, as packages loaded from `publisher.config.json` are with versioning off. A package that already has versions refuses that with 409 (`reason` `PACKAGE_IS_VERSIONED`).
4033
4039
  * @summary Create a new package
4034
4040
  * @param {string} environmentName Name of the environment
4035
4041
  * @param {Package} _package
@@ -0,0 +1 @@
1
+ "use strict";const H=require("react/jsx-runtime"),ne=require("@tanstack/react-query"),u=require("axios"),R=require("react"),N=require("@mui/material"),de="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace",T={radius:{control:"6px",tile:"8px",menu:"10px",dialog:"12px"},size:{control:32,chip:24},type:{pageTitle:{fontSize:24,fontWeight:600,letterSpacing:"-0.01em"},tileTitle:{fontSize:14,fontWeight:600,lineHeight:1.4},prose:{fontSize:15,lineHeight:1.6},control:{fontSize:13,fontWeight:500},caption:{fontSize:12,lineHeight:1.4},label:{fontSize:12,fontWeight:600,lineHeight:1.4},code:{fontSize:11.5,fontFamily:de}},font:{mono:de},shadow:{menu:"0 8px 24px rgba(16, 24, 40, 0.12)"}};function me(c){if(!c)return T;const r={...T.font,...c.font},a={...T.type};a.code={...a.code,fontFamily:r.mono};for(const[n,e]of Object.entries(c.type??{}))a[n]={...a[n],...e};return{radius:{...T.radius,...c.radius},size:{...T.size,...c.size},type:a,font:r,shadow:{...T.shadow,...c.shadow}}}const x={blue:"#2563eb",indigo:"#4f46e5",violet:"#7c3aed",pink:"#be185d",red:"#dc2626",orange:"#c2410c",amber:"#b45309",lime:"#4d7c0f",emerald:"#059669",teal:"#0f766e",cyan:"#0e7490",slate:"#475569"},oa={environment:x.emerald,package:x.teal,connection:x.orange},sa='"JetBrains Mono", "ui-monospace", "SFMono-Regular", "Menlo", monospace',ia=N.styled(N.Card)({display:"flex",flexDirection:"column",height:"100%",boxShadow:"none",border:"none",backgroundColor:"transparent"}),ca=N.styled(N.CardContent)({display:"flex",flexDirection:"column",padding:"0",flexGrow:1}),la=N.styled(N.CardMedia)({padding:"0"}),pa=N.styled("div")({backgroundColor:"transparent",paddingTop:"12px",paddingBottom:"2px",borderRadius:"8px",border:"none",boxShadow:"none",marginBottom:"0"}),da=N.styled("div")({height:"100%"}),ma=N.styled("div")({height:"75vh",width:"100%",overflowY:"auto"}),ha={light:{accent:x.blue,accentHover:"#1d4ed8",accentContrast:"#ffffff"},dark:{accent:"#60a5fa",accentHover:"#93c5fd",accentContrast:"#0f172a"}},ua={light:"#ffffff",dark:"#0f172a"},ga=3,B=c=>{const r=/^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(c.trim());if(!r)return;const a=r[1].length===3?[...r[1]].map(n=>n+n).join(""):r[1];return[0,2,4].map(n=>parseInt(a.slice(n,n+2),16))},he=c=>`#${c.map(r=>Math.round(r).toString(16).padStart(2,"0")).join("")}`,J=(c,r,a)=>he(c.map(n=>n+(r-n)*a)),Z=c=>{const[r,a,n]=c.map(e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4});return .2126*r+.7152*a+.0722*n},_=(c,r)=>{const[a,n]=[Z(c),Z(r)].sort((e,t)=>t-e);return(a+.05)/(n+.05)};function Pa(c,r){const a=B(c),n=B(r);return a&&n?_(a,n):void 0}const Sa=[15,23,42];function X(c,r,a=ga){const n=B(c),e=B(r);if(!n||!e||_(n,e)>=a)return c;const t=Z(e)<.5?255:0;for(let s=.05;s<1;s+=.05){const o=B(J(n,t,s));if(o&&_(o,e)>=a)return he(o)}return t===255?"#ffffff":"#000000"}function ee(c,r,a=ua[r]){const n=ha[r];if(!c||c.toLowerCase()===x.blue)return n;if(!B(c))return r==="light"?{...n,accent:c,accentHover:c}:n;const e=X(c,a),t=B(e),s=r==="dark"?J(t,255,.25):J(t,0,.2),o=_(t,[255,255,255]),i=_(t,Sa);return{accent:e,accentHover:s,accentContrast:o>=i?"#ffffff":"#0f172a"}}const va=[x.blue,x.orange,x.emerald,x.pink,x.violet,x.amber,x.cyan,x.lime],Va="Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",G={defaultMode:"light",allowUserToggle:!0,palette:{series:va,background:{light:"#ffffff",dark:"#0f172a"},tableHeader:{light:"#475569",dark:"#cbd5e1"},tableHeaderBackground:{light:"#f8fafc",dark:"#1e293b"},tableBody:{light:"#475569",dark:"#e2e8f0"},tile:{light:"#ffffff",dark:"#0f172a"},tileTitle:{light:"#475569",dark:"#94a3b8"},mapColor:{light:x.blue,dark:x.blue},border:{light:"#e2e8f0",dark:"#334155"},cardBorder:{light:"#cbd5e1",dark:"#475569"},axis:{light:"#cbd5e1",dark:"#475569"},gridline:{light:"#cbd5e1",dark:"#475569"},chartText:{light:"#0f172a",dark:"#e2e8f0"},value:{light:"#0f172a",dark:"#f1f5f9"}},font:{family:Va,size:12}},ue=["background","tableHeader","tableHeaderBackground","tableBody","tile","tileTitle","mapColor","border","cardBorder","axis","gridline","chartText","value"];function re(c,r){const a=G.palette??{},n=G.font??{family:"sans-serif",size:12};let e=[...a.series??[]],t=!1,s=n.family??"sans-serif",o=n.size??12;const i={background:{...a.background??{}},tableHeader:{...a.tableHeader??{}},tableHeaderBackground:{...a.tableHeaderBackground??{}},tableBody:{...a.tableBody??{}},tile:{...a.tile??{}},tileTitle:{...a.tileTitle??{}},mapColor:{...a.mapColor??{}},border:{...a.border??{}},cardBorder:{...a.cardBorder??{}},axis:{...a.axis??{}},gridline:{...a.gridline??{}},chartText:{...a.chartText??{}},value:{...a.value??{}}},l={light:new Set,dark:new Set};for(const A of c)if(A){Array.isArray(A.palette?.series)&&(e=[...A.palette.series],t=!0);for(const C of ue){const U=A.palette?.[C];U&&(i[C]={...i[C],...U},U.light!==void 0&&l.light.add(C),U.dark!==void 0&&l.dark.add(C))}typeof A.font?.family=="string"&&(s=A.font.family),typeof A.font?.size=="number"&&(o=A.font.size)}const p=r==="dark",d=A=>i[A][r]??a[A]?.[r],h=d("background"),k=p&&l.light.has("mapColor")&&!l.dark.has("mapColor")?X(i.mapColor.light,h):d("mapColor");return{mode:r,ui:T,series:p&&t?e.map(A=>X(A,h)):e,...ee(e[0],r,h),font:{family:s,size:o},background:h,tableHeader:d("tableHeader"),tableHeaderBackground:d("tableHeaderBackground"),tableBody:d("tableBody"),tile:d("tile"),tileTitle:d("tileTitle"),mapColor:k,tableBackground:h,border:`1px solid ${d("border")}`,cardBorder:`1px solid ${d("cardBorder")}`,pinnedBorder:`1px solid ${d("cardBorder")}`,valueColor:d("value"),foreground:d("chartText"),axisFaint:d("axis"),gridline:d("gridline"),shadow:p?{lift:"0 2px 12px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08)",drag:"0 12px 32px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.12)"}:{lift:"0 2px 10px rgba(0, 0, 0, 0.10)",drag:"0 12px 32px rgba(0, 0, 0, 0.22)"},dashboardRoot:p?"#0f172a":"#ffffff",drillLink:ee(void 0,r).accent}}function ba(c,r){const a=r.palette?.series;if(!Array.isArray(a)||a.length!==1)return r;const n=a[0],e=c.reduce((l,p)=>Array.isArray(p?.palette?.series)?p.palette.series:l,G.palette?.series??[]),t=l=>l.toLowerCase()===n.toLowerCase(),[s,...o]=e,i=o.length>0?o.map(l=>t(l)?s:l):[s].filter(l=>l!==void 0&&!t(l));return{...r,palette:{...r.palette,series:[n,...i]}}}function ge(c,r,a){const n=r??c??"light";return n==="auto"?a?"dark":"light":n}const Pe=R.createContext(void 0);function Se({layers:c,mode:r,userChoice:a,setMode:n,allowUserToggle:e=!0,ui:t,children:s}){const o=JSON.stringify(t??null),i=R.useMemo(()=>me(t),[o]),l=R.useMemo(()=>({...re(c,r),ui:i}),[c,r,i]),p=R.useMemo(()=>({theme:l,layers:c,mode:r,userChoice:a,setMode:n,allowUserToggle:e}),[l,c,r,a,n,e]);return H.jsx(Pe.Provider,{value:p,children:s})}function ka(){const c=R.useContext(Pe);return c||{theme:re([],"light"),layers:[],mode:"light",userChoice:void 0,setMode:()=>{},allowUserToggle:!1}}const g="http://localhost/api/v0".replace(/\/+$/,"");class I{constructor(r,a=g,n=u){this.basePath=a,this.axios=n,r&&(this.configuration=r,this.basePath=r.basePath??a)}configuration}class Aa extends Error{constructor(r,a){super(a),this.field=r,this.name="RequiredError"}}const P={},S="https://example.com",m=function(c,r,a){if(a==null)throw new Aa(r,`Required parameter ${r} was null or undefined when calling ${c}.`)};function ae(c,r,a=""){r!=null&&(typeof r=="object"?Array.isArray(r)||r instanceof Set?r.forEach(n=>ae(c,n,a)):Object.keys(r).forEach(n=>ae(c,r[n],`${a}${a!==""?".":""}${n}`)):c.has(a)?c.append(a,r):c.set(a,r))}const v=function(c,...r){const a=new URLSearchParams(c.search);ae(a,r),c.search=a.toString()},Oa=function(c,r){return r instanceof Set?Array.from(r):r},O=function(c,r,a){const n=typeof c!="string";return(n&&a&&a.isJsonMime?a.isJsonMime(r.headers["Content-Type"]):n)?JSON.stringify(c!==void 0?c:{},Oa):c||""},V=function(c){return c.pathname+c.search+c.hash},b=function(c,r,a,n){return(e=r,t=a)=>{const s={...c.options,url:(e.defaults.baseURL?"":n?.basePath??t)+c.url};return e.request(s)}},ya={Bigquery:"bigquery",Snowflake:"snowflake",Postgres:"postgres",Gcs:"gcs",S3:"s3",Azure:"azure"},Ca={ServicePrincipal:"service_principal",SasToken:"sas_token"},Ia={Error:"error",Warn:"warn",Debug:"debug"},xa={Append:"append",File:"file",Package:"package"},Ra={Success:"success",Error:"error"},Ea={Grid:"grid",Linear:"linear"},Na={Dashboard:"dashboard",Notebook:"notebook"},Ua={Postgres:"postgres",Bigquery:"bigquery",Snowflake:"snowflake",Trino:"trino",Databricks:"databricks",Mysql:"mysql",Sqlserver:"sqlserver",Duckdb:"duckdb",Motherduck:"motherduck",Ducklake:"ducklake",Publisher:"publisher"},Ta={Ssh:"ssh"},fa={Ok:"ok",Failed:"failed"},wa={Grid:"grid",Linear:"linear"},Fa={Dashboard:"dashboard",Notebook:"notebook"},Ma={Query:"query",Text:"text"},Ba={Viewport:"viewport"},Da={Embedded:"embedded",Materialized:"materialized"},ja={Equal:"equal",In:"in",Like:"like",GreaterThan:"greater_than",LessThan:"less_than"},La={Live:"live",StaleOk:"stale_ok",Fail:"fail"},Qa={Select:"select",Multiselect:"multiselect"},qa={Merge:"merge",RangeReplace:"range_replace"},za={Debug:"debug",Info:"info",Warn:"warn",Error:"error"},Ha={Persist:"persist",Preaggregate:"preaggregate"},_a={Reused:"reused",Recomputed:"recomputed"},Ga={Live:"live",StaleOk:"stale_ok",Fail:"fail"},Wa={Delta:"delta",Full:"full",None:"none"},Ka={Pending:"PENDING",ManifestRowsReady:"MANIFEST_ROWS_READY",ManifestFileReady:"MANIFEST_FILE_READY",Failed:"FAILED",Cancelled:"CANCELLED"},$a={Compile:"compile",Extraction:"extraction"},Ya={Markdown:"markdown",Code:"code"},Ja={Markdown:"markdown",Query:"query",Definition:"definition"},Za={Markdown:"markdown",Code:"code"},Xa={Markdown:"markdown",Query:"query",Definition:"definition"},et={Archive:"archive",Unarchive:"unarchive"},at={Version:"version",Package:"package"},tt={Declared:"declared",All:"all"},nt={Unbound:"unbound",Bound:"bound",LiveFallback:"live_fallback"},rt={Lexical:"lexical",Indexing:"indexing",Ready:"ready",Error:"error",Cooldown:"cooldown",TooManyEntities:"too-many-entities"},ot={Cooldown:"cooldown",TooManyEntities:"too-many-entities"},st={Keyphrase:"keyphrase",SourceSummary:"source_summary"},it={Archive:"archive",Unarchive:"unarchive"},ct={Unbound:"unbound",Bound:"bound",LiveFallback:"live_fallback"},lt={Archive:"archive",Unarchive:"unarchive"},pt={Version:"version",Package:"package"},dt={Declared:"declared",All:"all"},mt={Unbound:"unbound",Bound:"bound",LiveFallback:"live_fallback"},ht={Archive:"archive",Unarchive:"unarchive"},ut={Unbound:"unbound",Bound:"bound",LiveFallback:"live_fallback"},gt={Archive:"archive",Unarchive:"unarchive"},Pt={Archive:"archive",Unarchive:"unarchive"},St={Error:"error",Warn:"warn"},vt={Persist:"persist",Preaggregate:"preaggregate"},Vt={Disable:"disable",NoVerify:"no-verify",VerifyCa:"verify-ca",VerifyFull:"verify-full"},bt={Interactive:"interactive",Materialize:"materialize",Index:"index",Ops:"ops"},kt={Used:"used",Skipped:"skipped"},At={Sibling:"sibling",Below:"below"},Ot={View:"view",Query:"query",Rollup:"rollup",Materialized:"materialized",Live:"live"},yt={Query:"query",ServerDefault:"server_default"},Ct={Storage:"storage",LiveFallback:"live_fallback"},It={Malloynb:"malloynb",Malloy:"malloy"},xt={Snapshot:"SNAPSHOT",Copy:"COPY"},Rt={Storage:"storage",Colocated:"colocated",Preaggregate:"preaggregate"},Et={FreeParameter:"free_parameter",Given:"given",GivenInPersistedQuery:"given_in_persisted_query",DynamicProjection:"dynamic_projection",DynamicJoin:"dynamic_join",DynamicJoinedWhere:"dynamic_joined_where",InheritedWhereWithGiven:"inherited_where_with_given",PartitionWithoutStorage:"partition_without_storage",PartitionColumnUnknown:"partition_column_unknown",PartitionColumnNotPublic:"partition_column_not_public",MergeKeyScopeUnresolved:"merge_key_scope_unresolved",PreaggregateOverDynamicSource:"preaggregate_over_dynamic_source",Authorize:"authorize",NotDuckdbPortable:"not_duckdb_portable",PublicSurfaceUnknown:"public_surface_unknown",ReadOnlyDialect:"read_only_dialect",StorageSourceUnsupported:"storage_source_unsupported",EnvReference:"env_reference",RollupNameCollision:"rollup_name_collision",EmptyStorage:"empty_storage",TableNameCollision:"table_name_collision",CurrentTime:"current_time"},Nt={Grid:"grid",Linear:"linear"},Ut={Malloynb:"malloynb",Malloy:"malloy"},Tt={Grid:"grid",Linear:"linear"},ft={Query:"query",Text:"text"},wt={Publish:"publish",OnDemand:"on_demand",Scheduler:"scheduler"},Ft={Config:"config",CredentialChain:"credential_chain"},Mt={Initializing:"initializing",Serving:"serving",Draining:"draining",Throttled:"throttled"},Bt={Off:"off",On:"on"},Dt={OnPublish:"on-publish",Explicit:"explicit"},jt={Explorer:"explorer",Viewer:"viewer"},Lt={Bundled:"bundled",Package:"package"},Qt={Bundled:"bundled",Package:"package"},qt={NotBuilt:"NOT_BUILT",Warned:"WARNED",MissingField:"MISSING_FIELD",Contract:"CONTRACT",GrainTooCoarse:"GRAIN_TOO_COARSE",TimeZone:"TIME_ZONE",CrossConnection:"CROSS_CONNECTION",CountSemantics:"COUNT_SEMANTICS",Stale:"STALE",RunFailed:"RUN_FAILED"},zt={Persist:"persist",Preaggregate:"preaggregate"},Ht={Light:"light",Dark:"dark",Auto:"auto"},ve=function(c){return{getAgent:async(r,a,n,e,t,s={})=>{m("getAgent","environmentName",r),m("getAgent","packageName",a),m("getAgent","agentName",n);const o="/environments/{environmentName}/packages/{packageName}/agents/{agentName}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))).replace("{agentName}",encodeURIComponent(String(n))),i=new URL(o,S);let l;c&&(l=c.baseOptions);const p={method:"GET",...l,...s},d={},h={};e!==void 0&&(h.skills=e),t!==void 0&&(h.versionId=t),d.Accept="application/json",v(i,h);let k=l&&l.headers?l.headers:{};return p.headers={...d,...k,...s.headers},{url:V(i),options:p}},getAgentSkillFile:async(r,a,n,e,t,s={})=>{m("getAgentSkillFile","environmentName",r),m("getAgentSkillFile","packageName",a),m("getAgentSkillFile","agentName",n),m("getAgentSkillFile","relativeFilepath",e);const o="/environments/{environmentName}/packages/{packageName}/agents/{agentName}/skills/{relativeFilepath}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))).replace("{agentName}",encodeURIComponent(String(n))).replace("{relativeFilepath}",encodeURIComponent(String(e))),i=new URL(o,S);let l;c&&(l=c.baseOptions);const p={method:"GET",...l,...s},d={},h={};t!==void 0&&(h.versionId=t),d.Accept="application/json",v(i,h);let k=l&&l.headers?l.headers:{};return p.headers={...d,...k,...s.headers},{url:V(i),options:p}},listAgents:async(r,a,n,e={})=>{m("listAgents","environmentName",r),m("listAgents","packageName",a);const t="/environments/{environmentName}/packages/{packageName}/agents".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))),s=new URL(t,S);let o;c&&(o=c.baseOptions);const i={method:"GET",...o,...e},l={},p={};n!==void 0&&(p.versionId=n),l.Accept="application/json",v(s,p);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...e.headers},{url:V(s),options:i}}}},Q=function(c){const r=ve(c);return{async getAgent(a,n,e,t,s,o){const i=await r.getAgent(a,n,e,t,s,o),l=c?.serverIndex??0,p=P["AgentsApi.getAgent"]?.[l]?.url;return(d,h)=>b(i,u,g,c)(d,p||h)},async getAgentSkillFile(a,n,e,t,s,o){const i=await r.getAgentSkillFile(a,n,e,t,s,o),l=c?.serverIndex??0,p=P["AgentsApi.getAgentSkillFile"]?.[l]?.url;return(d,h)=>b(i,u,g,c)(d,p||h)},async listAgents(a,n,e,t){const s=await r.listAgents(a,n,e,t),o=c?.serverIndex??0,i=P["AgentsApi.listAgents"]?.[o]?.url;return(l,p)=>b(s,u,g,c)(l,i||p)}}},_t=function(c,r,a){const n=Q(c);return{getAgent(e,t,s,o,i,l){return n.getAgent(e,t,s,o,i,l).then(p=>p(a,r))},getAgentSkillFile(e,t,s,o,i,l){return n.getAgentSkillFile(e,t,s,o,i,l).then(p=>p(a,r))},listAgents(e,t,s,o){return n.listAgents(e,t,s,o).then(i=>i(a,r))}}};class Ve extends I{getAgent(r,a,n,e,t,s){return Q(this.configuration).getAgent(r,a,n,e,t,s).then(o=>o(this.axios,this.basePath))}getAgentSkillFile(r,a,n,e,t,s){return Q(this.configuration).getAgentSkillFile(r,a,n,e,t,s).then(o=>o(this.axios,this.basePath))}listAgents(r,a,n,e){return Q(this.configuration).listAgents(r,a,n,e).then(t=>t(this.axios,this.basePath))}}const Gt={Full:"full",Summary:"summary"},be=function(c){return{createConnection:async(r,a,n,e={})=>{m("createConnection","environmentName",r),m("createConnection","connectionName",a),m("createConnection","connection",n);const t="/environments/{environmentName}/connections/{connectionName}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{connectionName}",encodeURIComponent(String(a))),s=new URL(t,S);let o;c&&(o=c.baseOptions);const i={method:"POST",...o,...e},l={},p={};l["Content-Type"]="application/json",l.Accept="application/json",v(s,p);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...e.headers},i.data=O(n,i,c),{url:V(s),options:i}},deleteConnection:async(r,a,n={})=>{m("deleteConnection","environmentName",r),m("deleteConnection","connectionName",a);const e="/environments/{environmentName}/connections/{connectionName}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{connectionName}",encodeURIComponent(String(a))),t=new URL(e,S);let s;c&&(s=c.baseOptions);const o={method:"DELETE",...s,...n},i={},l={};i.Accept="application/json",v(t,l);let p=s&&s.headers?s.headers:{};return o.headers={...i,...p,...n.headers},{url:V(t),options:o}},getConnection:async(r,a,n={})=>{m("getConnection","environmentName",r),m("getConnection","connectionName",a);const e="/environments/{environmentName}/connections/{connectionName}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{connectionName}",encodeURIComponent(String(a))),t=new URL(e,S);let s;c&&(s=c.baseOptions);const o={method:"GET",...s,...n},i={},l={};i.Accept="application/json",v(t,l);let p=s&&s.headers?s.headers:{};return o.headers={...i,...p,...n.headers},{url:V(t),options:o}},getTable:async(r,a,n,e,t={})=>{m("getTable","environmentName",r),m("getTable","connectionName",a),m("getTable","schemaName",n),m("getTable","tablePath",e);const s="/environments/{environmentName}/connections/{connectionName}/schemas/{schemaName}/tables/{tablePath}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{connectionName}",encodeURIComponent(String(a))).replace("{schemaName}",encodeURIComponent(String(n))).replace("{tablePath}",encodeURIComponent(String(e))),o=new URL(s,S);let i;c&&(i=c.baseOptions);const l={method:"GET",...i,...t},p={},d={};p.Accept="application/json",v(o,d);let h=i&&i.headers?i.headers:{};return l.headers={...p,...h,...t.headers},{url:V(o),options:l}},getTableInPackage:async(r,a,n,e,t,s,o={})=>{m("getTableInPackage","environmentName",r),m("getTableInPackage","packageName",a),m("getTableInPackage","connectionName",n),m("getTableInPackage","schemaName",e),m("getTableInPackage","tablePath",t);const i="/environments/{environmentName}/packages/{packageName}/connections/{connectionName}/schemas/{schemaName}/tables/{tablePath}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))).replace("{connectionName}",encodeURIComponent(String(n))).replace("{schemaName}",encodeURIComponent(String(e))).replace("{tablePath}",encodeURIComponent(String(t))),l=new URL(i,S);let p;c&&(p=c.baseOptions);const d={method:"GET",...p,...o},h={},k={};s!==void 0&&(k.versionId=s),h.Accept="application/json",v(l,k);let A=p&&p.headers?p.headers:{};return d.headers={...h,...A,...o.headers},{url:V(l),options:d}},listConnections:async(r,a={})=>{m("listConnections","environmentName",r);const n="/environments/{environmentName}/connections".replace("{environmentName}",encodeURIComponent(String(r))),e=new URL(n,S);let t;c&&(t=c.baseOptions);const s={method:"GET",...t,...a},o={},i={};o.Accept="application/json",v(e,i);let l=t&&t.headers?t.headers:{};return s.headers={...o,...l,...a.headers},{url:V(e),options:s}},listSchemas:async(r,a,n={})=>{m("listSchemas","environmentName",r),m("listSchemas","connectionName",a);const e="/environments/{environmentName}/connections/{connectionName}/schemas".replace("{environmentName}",encodeURIComponent(String(r))).replace("{connectionName}",encodeURIComponent(String(a))),t=new URL(e,S);let s;c&&(s=c.baseOptions);const o={method:"GET",...s,...n},i={},l={};i.Accept="application/json",v(t,l);let p=s&&s.headers?s.headers:{};return o.headers={...i,...p,...n.headers},{url:V(t),options:o}},listSchemasInPackage:async(r,a,n,e,t={})=>{m("listSchemasInPackage","environmentName",r),m("listSchemasInPackage","packageName",a),m("listSchemasInPackage","connectionName",n);const s="/environments/{environmentName}/packages/{packageName}/connections/{connectionName}/schemas".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))).replace("{connectionName}",encodeURIComponent(String(n))),o=new URL(s,S);let i;c&&(i=c.baseOptions);const l={method:"GET",...i,...t},p={},d={};e!==void 0&&(d.versionId=e),p.Accept="application/json",v(o,d);let h=i&&i.headers?i.headers:{};return l.headers={...p,...h,...t.headers},{url:V(o),options:l}},listTables:async(r,a,n,e,t={})=>{m("listTables","environmentName",r),m("listTables","connectionName",a),m("listTables","schemaName",n);const s="/environments/{environmentName}/connections/{connectionName}/schemas/{schemaName}/tables".replace("{environmentName}",encodeURIComponent(String(r))).replace("{connectionName}",encodeURIComponent(String(a))).replace("{schemaName}",encodeURIComponent(String(n))),o=new URL(s,S);let i;c&&(i=c.baseOptions);const l={method:"GET",...i,...t},p={},d={};e&&(d.tableNames=e),p.Accept="application/json",v(o,d);let h=i&&i.headers?i.headers:{};return l.headers={...p,...h,...t.headers},{url:V(o),options:l}},listTablesInPackage:async(r,a,n,e,t,s,o={})=>{m("listTablesInPackage","environmentName",r),m("listTablesInPackage","packageName",a),m("listTablesInPackage","connectionName",n),m("listTablesInPackage","schemaName",e);const i="/environments/{environmentName}/packages/{packageName}/connections/{connectionName}/schemas/{schemaName}/tables".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))).replace("{connectionName}",encodeURIComponent(String(n))).replace("{schemaName}",encodeURIComponent(String(e))),l=new URL(i,S);let p;c&&(p=c.baseOptions);const d={method:"GET",...p,...o},h={},k={};t&&(k.tableNames=t),s!==void 0&&(k.versionId=s),h.Accept="application/json",v(l,k);let A=p&&p.headers?p.headers:{};return d.headers={...h,...A,...o.headers},{url:V(l),options:d}},postQuerydata:async(r,a,n,e={})=>{m("postQuerydata","environmentName",r),m("postQuerydata","connectionName",a),m("postQuerydata","postQuerydataRequest",n);const t="/environments/{environmentName}/connections/{connectionName}/sqlQuery".replace("{environmentName}",encodeURIComponent(String(r))).replace("{connectionName}",encodeURIComponent(String(a))),s=new URL(t,S);let o;c&&(o=c.baseOptions);const i={method:"POST",...o,...e},l={},p={};l["Content-Type"]="application/json",l.Accept="application/json",v(s,p);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...e.headers},i.data=O(n,i,c),{url:V(s),options:i}},postQuerydataInPackage:async(r,a,n,e,t,s={})=>{m("postQuerydataInPackage","environmentName",r),m("postQuerydataInPackage","packageName",a),m("postQuerydataInPackage","connectionName",n),m("postQuerydataInPackage","postQuerydataRequest",e);const o="/environments/{environmentName}/packages/{packageName}/connections/{connectionName}/sqlQuery".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))).replace("{connectionName}",encodeURIComponent(String(n))),i=new URL(o,S);let l;c&&(l=c.baseOptions);const p={method:"POST",...l,...s},d={},h={};t!==void 0&&(h.versionId=t),d["Content-Type"]="application/json",d.Accept="application/json",v(i,h);let k=l&&l.headers?l.headers:{};return p.headers={...d,...k,...s.headers},p.data=O(e,p,c),{url:V(i),options:p}},postSqlsource:async(r,a,n,e={})=>{m("postSqlsource","environmentName",r),m("postSqlsource","connectionName",a),m("postSqlsource","postSqlsourceRequest",n);const t="/environments/{environmentName}/connections/{connectionName}/sqlSource".replace("{environmentName}",encodeURIComponent(String(r))).replace("{connectionName}",encodeURIComponent(String(a))),s=new URL(t,S);let o;c&&(o=c.baseOptions);const i={method:"POST",...o,...e},l={},p={};l["Content-Type"]="application/json",l.Accept="application/json",v(s,p);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...e.headers},i.data=O(n,i,c),{url:V(s),options:i}},postSqlsourceInPackage:async(r,a,n,e,t,s={})=>{m("postSqlsourceInPackage","environmentName",r),m("postSqlsourceInPackage","packageName",a),m("postSqlsourceInPackage","connectionName",n),m("postSqlsourceInPackage","postSqlsourceRequest",e);const o="/environments/{environmentName}/packages/{packageName}/connections/{connectionName}/sqlSource".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))).replace("{connectionName}",encodeURIComponent(String(n))),i=new URL(o,S);let l;c&&(l=c.baseOptions);const p={method:"POST",...l,...s},d={},h={};t!==void 0&&(h.versionId=t),d["Content-Type"]="application/json",d.Accept="application/json",v(i,h);let k=l&&l.headers?l.headers:{};return p.headers={...d,...k,...s.headers},p.data=O(e,p,c),{url:V(i),options:p}},postTemporarytable:async(r,a,n,e={})=>{m("postTemporarytable","environmentName",r),m("postTemporarytable","connectionName",a),m("postTemporarytable","postSqlsourceRequest",n);const t="/environments/{environmentName}/connections/{connectionName}/sqlTemporaryTable".replace("{environmentName}",encodeURIComponent(String(r))).replace("{connectionName}",encodeURIComponent(String(a))),s=new URL(t,S);let o;c&&(o=c.baseOptions);const i={method:"POST",...o,...e},l={},p={};l["Content-Type"]="application/json",l.Accept="application/json",v(s,p);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...e.headers},i.data=O(n,i,c),{url:V(s),options:i}},postTemporarytableInPackage:async(r,a,n,e,t,s={})=>{m("postTemporarytableInPackage","environmentName",r),m("postTemporarytableInPackage","packageName",a),m("postTemporarytableInPackage","connectionName",n),m("postTemporarytableInPackage","postSqlsourceRequest",e);const o="/environments/{environmentName}/packages/{packageName}/connections/{connectionName}/sqlTemporaryTable".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))).replace("{connectionName}",encodeURIComponent(String(n))),i=new URL(o,S);let l;c&&(l=c.baseOptions);const p={method:"POST",...l,...s},d={},h={};t!==void 0&&(h.versionId=t),d["Content-Type"]="application/json",d.Accept="application/json",v(i,h);let k=l&&l.headers?l.headers:{};return p.headers={...d,...k,...s.headers},p.data=O(e,p,c),{url:V(i),options:p}},updateConnection:async(r,a,n,e={})=>{m("updateConnection","environmentName",r),m("updateConnection","connectionName",a),m("updateConnection","updateConnectionRequest",n);const t="/environments/{environmentName}/connections/{connectionName}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{connectionName}",encodeURIComponent(String(a))),s=new URL(t,S);let o;c&&(o=c.baseOptions);const i={method:"PATCH",...o,...e},l={},p={};l["Content-Type"]="application/json",l.Accept="application/json",v(s,p);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...e.headers},i.data=O(n,i,c),{url:V(s),options:i}}}},y=function(c){const r=be(c);return{async createConnection(a,n,e,t){const s=await r.createConnection(a,n,e,t),o=c?.serverIndex??0,i=P["ConnectionsApi.createConnection"]?.[o]?.url;return(l,p)=>b(s,u,g,c)(l,i||p)},async deleteConnection(a,n,e){const t=await r.deleteConnection(a,n,e),s=c?.serverIndex??0,o=P["ConnectionsApi.deleteConnection"]?.[s]?.url;return(i,l)=>b(t,u,g,c)(i,o||l)},async getConnection(a,n,e){const t=await r.getConnection(a,n,e),s=c?.serverIndex??0,o=P["ConnectionsApi.getConnection"]?.[s]?.url;return(i,l)=>b(t,u,g,c)(i,o||l)},async getTable(a,n,e,t,s){const o=await r.getTable(a,n,e,t,s),i=c?.serverIndex??0,l=P["ConnectionsApi.getTable"]?.[i]?.url;return(p,d)=>b(o,u,g,c)(p,l||d)},async getTableInPackage(a,n,e,t,s,o,i){const l=await r.getTableInPackage(a,n,e,t,s,o,i),p=c?.serverIndex??0,d=P["ConnectionsApi.getTableInPackage"]?.[p]?.url;return(h,k)=>b(l,u,g,c)(h,d||k)},async listConnections(a,n){const e=await r.listConnections(a,n),t=c?.serverIndex??0,s=P["ConnectionsApi.listConnections"]?.[t]?.url;return(o,i)=>b(e,u,g,c)(o,s||i)},async listSchemas(a,n,e){const t=await r.listSchemas(a,n,e),s=c?.serverIndex??0,o=P["ConnectionsApi.listSchemas"]?.[s]?.url;return(i,l)=>b(t,u,g,c)(i,o||l)},async listSchemasInPackage(a,n,e,t,s){const o=await r.listSchemasInPackage(a,n,e,t,s),i=c?.serverIndex??0,l=P["ConnectionsApi.listSchemasInPackage"]?.[i]?.url;return(p,d)=>b(o,u,g,c)(p,l||d)},async listTables(a,n,e,t,s){const o=await r.listTables(a,n,e,t,s),i=c?.serverIndex??0,l=P["ConnectionsApi.listTables"]?.[i]?.url;return(p,d)=>b(o,u,g,c)(p,l||d)},async listTablesInPackage(a,n,e,t,s,o,i){const l=await r.listTablesInPackage(a,n,e,t,s,o,i),p=c?.serverIndex??0,d=P["ConnectionsApi.listTablesInPackage"]?.[p]?.url;return(h,k)=>b(l,u,g,c)(h,d||k)},async postQuerydata(a,n,e,t){const s=await r.postQuerydata(a,n,e,t),o=c?.serverIndex??0,i=P["ConnectionsApi.postQuerydata"]?.[o]?.url;return(l,p)=>b(s,u,g,c)(l,i||p)},async postQuerydataInPackage(a,n,e,t,s,o){const i=await r.postQuerydataInPackage(a,n,e,t,s,o),l=c?.serverIndex??0,p=P["ConnectionsApi.postQuerydataInPackage"]?.[l]?.url;return(d,h)=>b(i,u,g,c)(d,p||h)},async postSqlsource(a,n,e,t){const s=await r.postSqlsource(a,n,e,t),o=c?.serverIndex??0,i=P["ConnectionsApi.postSqlsource"]?.[o]?.url;return(l,p)=>b(s,u,g,c)(l,i||p)},async postSqlsourceInPackage(a,n,e,t,s,o){const i=await r.postSqlsourceInPackage(a,n,e,t,s,o),l=c?.serverIndex??0,p=P["ConnectionsApi.postSqlsourceInPackage"]?.[l]?.url;return(d,h)=>b(i,u,g,c)(d,p||h)},async postTemporarytable(a,n,e,t){const s=await r.postTemporarytable(a,n,e,t),o=c?.serverIndex??0,i=P["ConnectionsApi.postTemporarytable"]?.[o]?.url;return(l,p)=>b(s,u,g,c)(l,i||p)},async postTemporarytableInPackage(a,n,e,t,s,o){const i=await r.postTemporarytableInPackage(a,n,e,t,s,o),l=c?.serverIndex??0,p=P["ConnectionsApi.postTemporarytableInPackage"]?.[l]?.url;return(d,h)=>b(i,u,g,c)(d,p||h)},async updateConnection(a,n,e,t){const s=await r.updateConnection(a,n,e,t),o=c?.serverIndex??0,i=P["ConnectionsApi.updateConnection"]?.[o]?.url;return(l,p)=>b(s,u,g,c)(l,i||p)}}},Wt=function(c,r,a){const n=y(c);return{createConnection(e,t,s,o){return n.createConnection(e,t,s,o).then(i=>i(a,r))},deleteConnection(e,t,s){return n.deleteConnection(e,t,s).then(o=>o(a,r))},getConnection(e,t,s){return n.getConnection(e,t,s).then(o=>o(a,r))},getTable(e,t,s,o,i){return n.getTable(e,t,s,o,i).then(l=>l(a,r))},getTableInPackage(e,t,s,o,i,l,p){return n.getTableInPackage(e,t,s,o,i,l,p).then(d=>d(a,r))},listConnections(e,t){return n.listConnections(e,t).then(s=>s(a,r))},listSchemas(e,t,s){return n.listSchemas(e,t,s).then(o=>o(a,r))},listSchemasInPackage(e,t,s,o,i){return n.listSchemasInPackage(e,t,s,o,i).then(l=>l(a,r))},listTables(e,t,s,o,i){return n.listTables(e,t,s,o,i).then(l=>l(a,r))},listTablesInPackage(e,t,s,o,i,l,p){return n.listTablesInPackage(e,t,s,o,i,l,p).then(d=>d(a,r))},postQuerydata(e,t,s,o){return n.postQuerydata(e,t,s,o).then(i=>i(a,r))},postQuerydataInPackage(e,t,s,o,i,l){return n.postQuerydataInPackage(e,t,s,o,i,l).then(p=>p(a,r))},postSqlsource(e,t,s,o){return n.postSqlsource(e,t,s,o).then(i=>i(a,r))},postSqlsourceInPackage(e,t,s,o,i,l){return n.postSqlsourceInPackage(e,t,s,o,i,l).then(p=>p(a,r))},postTemporarytable(e,t,s,o){return n.postTemporarytable(e,t,s,o).then(i=>i(a,r))},postTemporarytableInPackage(e,t,s,o,i,l){return n.postTemporarytableInPackage(e,t,s,o,i,l).then(p=>p(a,r))},updateConnection(e,t,s,o){return n.updateConnection(e,t,s,o).then(i=>i(a,r))}}};class ke extends I{createConnection(r,a,n,e){return y(this.configuration).createConnection(r,a,n,e).then(t=>t(this.axios,this.basePath))}deleteConnection(r,a,n){return y(this.configuration).deleteConnection(r,a,n).then(e=>e(this.axios,this.basePath))}getConnection(r,a,n){return y(this.configuration).getConnection(r,a,n).then(e=>e(this.axios,this.basePath))}getTable(r,a,n,e,t){return y(this.configuration).getTable(r,a,n,e,t).then(s=>s(this.axios,this.basePath))}getTableInPackage(r,a,n,e,t,s,o){return y(this.configuration).getTableInPackage(r,a,n,e,t,s,o).then(i=>i(this.axios,this.basePath))}listConnections(r,a){return y(this.configuration).listConnections(r,a).then(n=>n(this.axios,this.basePath))}listSchemas(r,a,n){return y(this.configuration).listSchemas(r,a,n).then(e=>e(this.axios,this.basePath))}listSchemasInPackage(r,a,n,e,t){return y(this.configuration).listSchemasInPackage(r,a,n,e,t).then(s=>s(this.axios,this.basePath))}listTables(r,a,n,e,t){return y(this.configuration).listTables(r,a,n,e,t).then(s=>s(this.axios,this.basePath))}listTablesInPackage(r,a,n,e,t,s,o){return y(this.configuration).listTablesInPackage(r,a,n,e,t,s,o).then(i=>i(this.axios,this.basePath))}postQuerydata(r,a,n,e){return y(this.configuration).postQuerydata(r,a,n,e).then(t=>t(this.axios,this.basePath))}postQuerydataInPackage(r,a,n,e,t,s){return y(this.configuration).postQuerydataInPackage(r,a,n,e,t,s).then(o=>o(this.axios,this.basePath))}postSqlsource(r,a,n,e){return y(this.configuration).postSqlsource(r,a,n,e).then(t=>t(this.axios,this.basePath))}postSqlsourceInPackage(r,a,n,e,t,s){return y(this.configuration).postSqlsourceInPackage(r,a,n,e,t,s).then(o=>o(this.axios,this.basePath))}postTemporarytable(r,a,n,e){return y(this.configuration).postTemporarytable(r,a,n,e).then(t=>t(this.axios,this.basePath))}postTemporarytableInPackage(r,a,n,e,t,s){return y(this.configuration).postTemporarytableInPackage(r,a,n,e,t,s).then(o=>o(this.axios,this.basePath))}updateConnection(r,a,n,e){return y(this.configuration).updateConnection(r,a,n,e).then(t=>t(this.axios,this.basePath))}}const Ae=function(c){return{testConnectionConfiguration:async(r,a={})=>{m("testConnectionConfiguration","connection",r);const n="/connections/test",e=new URL(n,S);let t;c&&(t=c.baseOptions);const s={method:"POST",...t,...a},o={},i={};o["Content-Type"]="application/json",o.Accept="application/json",v(e,i);let l=t&&t.headers?t.headers:{};return s.headers={...o,...l,...a.headers},s.data=O(r,s,c),{url:V(e),options:s}}}},oe=function(c){const r=Ae(c);return{async testConnectionConfiguration(a,n){const e=await r.testConnectionConfiguration(a,n),t=c?.serverIndex??0,s=P["ConnectionsTestApi.testConnectionConfiguration"]?.[t]?.url;return(o,i)=>b(e,u,g,c)(o,s||i)}}},Kt=function(c,r,a){const n=oe(c);return{testConnectionConfiguration(e,t){return n.testConnectionConfiguration(e,t).then(s=>s(a,r))}}};class $t extends I{testConnectionConfiguration(r,a){return oe(this.configuration).testConnectionConfiguration(r,a).then(n=>n(this.axios,this.basePath))}}const Oe=function(c){return{getDashboard:async(r,a,n,e,t={})=>{m("getDashboard","environmentName",r),m("getDashboard","packageName",a),m("getDashboard","dashboardName",n);const s="/environments/{environmentName}/packages/{packageName}/dashboards/{dashboardName}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))).replace("{dashboardName}",encodeURIComponent(String(n))),o=new URL(s,S);let i;c&&(i=c.baseOptions);const l={method:"GET",...i,...t},p={},d={};e!==void 0&&(d.versionId=e),p.Accept="application/json",v(o,d);let h=i&&i.headers?i.headers:{};return l.headers={...p,...h,...t.headers},{url:V(o),options:l}},listDashboards:async(r,a,n,e={})=>{m("listDashboards","environmentName",r),m("listDashboards","packageName",a);const t="/environments/{environmentName}/packages/{packageName}/dashboards".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))),s=new URL(t,S);let o;c&&(o=c.baseOptions);const i={method:"GET",...o,...e},l={},p={};n!==void 0&&(p.versionId=n),l.Accept="application/json",v(s,p);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...e.headers},{url:V(s),options:i}}}},W=function(c){const r=Oe(c);return{async getDashboard(a,n,e,t,s){const o=await r.getDashboard(a,n,e,t,s),i=c?.serverIndex??0,l=P["DashboardsApi.getDashboard"]?.[i]?.url;return(p,d)=>b(o,u,g,c)(p,l||d)},async listDashboards(a,n,e,t){const s=await r.listDashboards(a,n,e,t),o=c?.serverIndex??0,i=P["DashboardsApi.listDashboards"]?.[o]?.url;return(l,p)=>b(s,u,g,c)(l,i||p)}}},Yt=function(c,r,a){const n=W(c);return{getDashboard(e,t,s,o,i){return n.getDashboard(e,t,s,o,i).then(l=>l(a,r))},listDashboards(e,t,s,o){return n.listDashboards(e,t,s,o).then(i=>i(a,r))}}};class ye extends I{getDashboard(r,a,n,e,t){return W(this.configuration).getDashboard(r,a,n,e,t).then(s=>s(this.axios,this.basePath))}listDashboards(r,a,n,e){return W(this.configuration).listDashboards(r,a,n,e).then(t=>t(this.axios,this.basePath))}}const Ce=function(c){return{listDataApps:async(r,a,n,e={})=>{m("listDataApps","environmentName",r),m("listDataApps","packageName",a);const t="/environments/{environmentName}/packages/{packageName}/data-apps".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))),s=new URL(t,S);let o;c&&(o=c.baseOptions);const i={method:"GET",...o,...e},l={},p={};n!==void 0&&(p.versionId=n),l.Accept="application/json",v(s,p);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...e.headers},{url:V(s),options:i}}}},se=function(c){const r=Ce(c);return{async listDataApps(a,n,e,t){const s=await r.listDataApps(a,n,e,t),o=c?.serverIndex??0,i=P["DataAppsApi.listDataApps"]?.[o]?.url;return(l,p)=>b(s,u,g,c)(l,i||p)}}},Jt=function(c,r,a){const n=se(c);return{listDataApps(e,t,s,o){return n.listDataApps(e,t,s,o).then(i=>i(a,r))}}};class Ie extends I{listDataApps(r,a,n,e){return se(this.configuration).listDataApps(r,a,n,e).then(t=>t(this.axios,this.basePath))}}const xe=function(c){return{listDatabases:async(r,a,n,e={})=>{m("listDatabases","environmentName",r),m("listDatabases","packageName",a);const t="/environments/{environmentName}/packages/{packageName}/databases".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))),s=new URL(t,S);let o;c&&(o=c.baseOptions);const i={method:"GET",...o,...e},l={},p={};n!==void 0&&(p.versionId=n),l.Accept="application/json",v(s,p);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...e.headers},{url:V(s),options:i}}}},ie=function(c){const r=xe(c);return{async listDatabases(a,n,e,t){const s=await r.listDatabases(a,n,e,t),o=c?.serverIndex??0,i=P["DatabasesApi.listDatabases"]?.[o]?.url;return(l,p)=>b(s,u,g,c)(l,i||p)}}},Zt=function(c,r,a){const n=ie(c);return{listDatabases(e,t,s,o){return n.listDatabases(e,t,s,o).then(i=>i(a,r))}}};class Re extends I{listDatabases(r,a,n,e){return ie(this.configuration).listDatabases(r,a,n,e).then(t=>t(this.axios,this.basePath))}}const Ee=function(c){return{createEnvironment:async(r,a={})=>{m("createEnvironment","environment",r);const n="/environments",e=new URL(n,S);let t;c&&(t=c.baseOptions);const s={method:"POST",...t,...a},o={},i={};o["Content-Type"]="application/json",o.Accept="application/json",v(e,i);let l=t&&t.headers?t.headers:{};return s.headers={...o,...l,...a.headers},s.data=O(r,s,c),{url:V(e),options:s}},deleteEnvironment:async(r,a={})=>{m("deleteEnvironment","environmentName",r);const n="/environments/{environmentName}".replace("{environmentName}",encodeURIComponent(String(r))),e=new URL(n,S);let t;c&&(t=c.baseOptions);const s={method:"DELETE",...t,...a},o={},i={};o.Accept="application/json",v(e,i);let l=t&&t.headers?t.headers:{};return s.headers={...o,...l,...a.headers},{url:V(e),options:s}},getEnvironment:async(r,a,n={})=>{m("getEnvironment","environmentName",r);const e="/environments/{environmentName}".replace("{environmentName}",encodeURIComponent(String(r))),t=new URL(e,S);let s;c&&(s=c.baseOptions);const o={method:"GET",...s,...n},i={},l={};a!==void 0&&(l.reload=a),i.Accept="application/json",v(t,l);let p=s&&s.headers?s.headers:{};return o.headers={...i,...p,...n.headers},{url:V(t),options:o}},listEnvironments:async(r={})=>{const a="/environments",n=new URL(a,S);let e;c&&(e=c.baseOptions);const t={method:"GET",...e,...r},s={},o={};s.Accept="application/json",v(n,o);let i=e&&e.headers?e.headers:{};return t.headers={...s,...i,...r.headers},{url:V(n),options:t}},updateEnvironment:async(r,a,n={})=>{m("updateEnvironment","environmentName",r),m("updateEnvironment","environment",a);const e="/environments/{environmentName}".replace("{environmentName}",encodeURIComponent(String(r))),t=new URL(e,S);let s;c&&(s=c.baseOptions);const o={method:"PATCH",...s,...n},i={},l={};i["Content-Type"]="application/json",i.Accept="application/json",v(t,l);let p=s&&s.headers?s.headers:{};return o.headers={...i,...p,...n.headers},o.data=O(a,o,c),{url:V(t),options:o}}}},w=function(c){const r=Ee(c);return{async createEnvironment(a,n){const e=await r.createEnvironment(a,n),t=c?.serverIndex??0,s=P["EnvironmentsApi.createEnvironment"]?.[t]?.url;return(o,i)=>b(e,u,g,c)(o,s||i)},async deleteEnvironment(a,n){const e=await r.deleteEnvironment(a,n),t=c?.serverIndex??0,s=P["EnvironmentsApi.deleteEnvironment"]?.[t]?.url;return(o,i)=>b(e,u,g,c)(o,s||i)},async getEnvironment(a,n,e){const t=await r.getEnvironment(a,n,e),s=c?.serverIndex??0,o=P["EnvironmentsApi.getEnvironment"]?.[s]?.url;return(i,l)=>b(t,u,g,c)(i,o||l)},async listEnvironments(a){const n=await r.listEnvironments(a),e=c?.serverIndex??0,t=P["EnvironmentsApi.listEnvironments"]?.[e]?.url;return(s,o)=>b(n,u,g,c)(s,t||o)},async updateEnvironment(a,n,e){const t=await r.updateEnvironment(a,n,e),s=c?.serverIndex??0,o=P["EnvironmentsApi.updateEnvironment"]?.[s]?.url;return(i,l)=>b(t,u,g,c)(i,o||l)}}},Xt=function(c,r,a){const n=w(c);return{createEnvironment(e,t){return n.createEnvironment(e,t).then(s=>s(a,r))},deleteEnvironment(e,t){return n.deleteEnvironment(e,t).then(s=>s(a,r))},getEnvironment(e,t,s){return n.getEnvironment(e,t,s).then(o=>o(a,r))},listEnvironments(e){return n.listEnvironments(e).then(t=>t(a,r))},updateEnvironment(e,t,s){return n.updateEnvironment(e,t,s).then(o=>o(a,r))}}};class Ne extends I{createEnvironment(r,a){return w(this.configuration).createEnvironment(r,a).then(n=>n(this.axios,this.basePath))}deleteEnvironment(r,a){return w(this.configuration).deleteEnvironment(r,a).then(n=>n(this.axios,this.basePath))}getEnvironment(r,a,n){return w(this.configuration).getEnvironment(r,a,n).then(e=>e(this.axios,this.basePath))}listEnvironments(r){return w(this.configuration).listEnvironments(r).then(a=>a(this.axios,this.basePath))}updateEnvironment(r,a,n){return w(this.configuration).updateEnvironment(r,a,n).then(e=>e(this.axios,this.basePath))}}const Ue=function(c){return{createMaterialization:async(r,a,n,e={})=>{m("createMaterialization","environmentName",r),m("createMaterialization","packageName",a);const t="/environments/{environmentName}/packages/{packageName}/materializations".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))),s=new URL(t,S);let o;c&&(o=c.baseOptions);const i={method:"POST",...o,...e},l={},p={};l["Content-Type"]="application/json",l.Accept="application/json",v(s,p);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...e.headers},i.data=O(n,i,c),{url:V(s),options:i}},deleteMaterialization:async(r,a,n,e,t,s={})=>{m("deleteMaterialization","environmentName",r),m("deleteMaterialization","packageName",a),m("deleteMaterialization","materializationId",n);const o="/environments/{environmentName}/packages/{packageName}/materializations/{materializationId}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))).replace("{materializationId}",encodeURIComponent(String(n))),i=new URL(o,S);let l;c&&(l=c.baseOptions);const p={method:"DELETE",...l,...s},d={},h={};e!==void 0&&(h.dropTables=e),t!==void 0&&(h.versionId=t),d.Accept="application/json",v(i,h);let k=l&&l.headers?l.headers:{};return p.headers={...d,...k,...s.headers},{url:V(i),options:p}},getMaterialization:async(r,a,n,e,t={})=>{m("getMaterialization","environmentName",r),m("getMaterialization","packageName",a),m("getMaterialization","materializationId",n);const s="/environments/{environmentName}/packages/{packageName}/materializations/{materializationId}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))).replace("{materializationId}",encodeURIComponent(String(n))),o=new URL(s,S);let i;c&&(i=c.baseOptions);const l={method:"GET",...i,...t},p={},d={};e!==void 0&&(d.versionId=e),p.Accept="application/json",v(o,d);let h=i&&i.headers?i.headers:{};return l.headers={...p,...h,...t.headers},{url:V(o),options:l}},listMaterializations:async(r,a,n,e,t,s={})=>{m("listMaterializations","environmentName",r),m("listMaterializations","packageName",a);const o="/environments/{environmentName}/packages/{packageName}/materializations".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))),i=new URL(o,S);let l;c&&(l=c.baseOptions);const p={method:"GET",...l,...s},d={},h={};n!==void 0&&(h.limit=n),e!==void 0&&(h.offset=e),t!==void 0&&(h.versionId=t),d.Accept="application/json",v(i,h);let k=l&&l.headers?l.headers:{};return p.headers={...d,...k,...s.headers},{url:V(i),options:p}},materializationAction:async(r,a,n,e,t,s={})=>{m("materializationAction","environmentName",r),m("materializationAction","packageName",a),m("materializationAction","materializationId",n),m("materializationAction","action",e);const o="/environments/{environmentName}/packages/{packageName}/materializations/{materializationId}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))).replace("{materializationId}",encodeURIComponent(String(n))),i=new URL(o,S);let l;c&&(l=c.baseOptions);const p={method:"POST",...l,...s},d={},h={};e!==void 0&&(h.action=e),t!==void 0&&(h.versionId=t),d.Accept="application/json",v(i,h);let k=l&&l.headers?l.headers:{};return p.headers={...d,...k,...s.headers},{url:V(i),options:p}}}},F=function(c){const r=Ue(c);return{async createMaterialization(a,n,e,t){const s=await r.createMaterialization(a,n,e,t),o=c?.serverIndex??0,i=P["MaterializationsApi.createMaterialization"]?.[o]?.url;return(l,p)=>b(s,u,g,c)(l,i||p)},async deleteMaterialization(a,n,e,t,s,o){const i=await r.deleteMaterialization(a,n,e,t,s,o),l=c?.serverIndex??0,p=P["MaterializationsApi.deleteMaterialization"]?.[l]?.url;return(d,h)=>b(i,u,g,c)(d,p||h)},async getMaterialization(a,n,e,t,s){const o=await r.getMaterialization(a,n,e,t,s),i=c?.serverIndex??0,l=P["MaterializationsApi.getMaterialization"]?.[i]?.url;return(p,d)=>b(o,u,g,c)(p,l||d)},async listMaterializations(a,n,e,t,s,o){const i=await r.listMaterializations(a,n,e,t,s,o),l=c?.serverIndex??0,p=P["MaterializationsApi.listMaterializations"]?.[l]?.url;return(d,h)=>b(i,u,g,c)(d,p||h)},async materializationAction(a,n,e,t,s,o){const i=await r.materializationAction(a,n,e,t,s,o),l=c?.serverIndex??0,p=P["MaterializationsApi.materializationAction"]?.[l]?.url;return(d,h)=>b(i,u,g,c)(d,p||h)}}},en=function(c,r,a){const n=F(c);return{createMaterialization(e,t,s,o){return n.createMaterialization(e,t,s,o).then(i=>i(a,r))},deleteMaterialization(e,t,s,o,i,l){return n.deleteMaterialization(e,t,s,o,i,l).then(p=>p(a,r))},getMaterialization(e,t,s,o,i){return n.getMaterialization(e,t,s,o,i).then(l=>l(a,r))},listMaterializations(e,t,s,o,i,l){return n.listMaterializations(e,t,s,o,i,l).then(p=>p(a,r))},materializationAction(e,t,s,o,i,l){return n.materializationAction(e,t,s,o,i,l).then(p=>p(a,r))}}};class Te extends I{createMaterialization(r,a,n,e){return F(this.configuration).createMaterialization(r,a,n,e).then(t=>t(this.axios,this.basePath))}deleteMaterialization(r,a,n,e,t,s){return F(this.configuration).deleteMaterialization(r,a,n,e,t,s).then(o=>o(this.axios,this.basePath))}getMaterialization(r,a,n,e,t){return F(this.configuration).getMaterialization(r,a,n,e,t).then(s=>s(this.axios,this.basePath))}listMaterializations(r,a,n,e,t,s){return F(this.configuration).listMaterializations(r,a,n,e,t,s).then(o=>o(this.axios,this.basePath))}materializationAction(r,a,n,e,t,s){return F(this.configuration).materializationAction(r,a,n,e,t,s).then(o=>o(this.axios,this.basePath))}}const an={Stop:"stop"},fe=function(c){return{compileModelSource:async(r,a,n,e,t,s={})=>{m("compileModelSource","environmentName",r),m("compileModelSource","packageName",a),m("compileModelSource","path",n),m("compileModelSource","compileRequest",e);const o="/environments/{environmentName}/packages/{packageName}/models/{path}/compile".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))).replace("{path}",encodeURIComponent(String(n))),i=new URL(o,S);let l;c&&(l=c.baseOptions);const p={method:"POST",...l,...s},d={},h={};t!==void 0&&(h.versionId=t),d["Content-Type"]="application/json",d.Accept="application/json",v(i,h);let k=l&&l.headers?l.headers:{};return p.headers={...d,...k,...s.headers},p.data=O(e,p,c),{url:V(i),options:p}},executeQueryModel:async(r,a,n,e,t,s={})=>{m("executeQueryModel","environmentName",r),m("executeQueryModel","packageName",a),m("executeQueryModel","path",n),m("executeQueryModel","queryRequest",e);const o="/environments/{environmentName}/packages/{packageName}/models/{path}/query".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))).replace("{path}",encodeURIComponent(String(n))),i=new URL(o,S);let l;c&&(l=c.baseOptions);const p={method:"POST",...l,...s},d={},h={};t!==void 0&&(h.includeHiddenFilesAndSources=t),d["Content-Type"]="application/json",d.Accept="application/json",v(i,h);let k=l&&l.headers?l.headers:{};return p.headers={...d,...k,...s.headers},p.data=O(e,p,c),{url:V(i),options:p}},getModel:async(r,a,n,e,t,s,o={})=>{m("getModel","environmentName",r),m("getModel","packageName",a),m("getModel","path",n);const i="/environments/{environmentName}/packages/{packageName}/models/{path}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))).replace("{path}",encodeURIComponent(String(n))),l=new URL(i,S);let p;c&&(p=c.baseOptions);const d={method:"GET",...p,...o},h={},k={};e!==void 0&&(k.versionId=e),t!==void 0&&(k.includeHiddenFilesAndSources=t),s!==void 0&&(k.givens=s),h.Accept="application/json",v(l,k);let A=p&&p.headers?p.headers:{};return d.headers={...h,...A,...o.headers},{url:V(l),options:d}},listModels:async(r,a,n,e,t={})=>{m("listModels","environmentName",r),m("listModels","packageName",a);const s="/environments/{environmentName}/packages/{packageName}/models".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))),o=new URL(s,S);let i;c&&(i=c.baseOptions);const l={method:"GET",...i,...t},p={},d={};n!==void 0&&(d.versionId=n),e!==void 0&&(d.includeHiddenFilesAndSources=e),p.Accept="application/json",v(o,d);let h=i&&i.headers?i.headers:{};return l.headers={...p,...h,...t.headers},{url:V(o),options:l}},updateModelSource:async(r,a,n,e,t,s={})=>{m("updateModelSource","environmentName",r),m("updateModelSource","packageName",a),m("updateModelSource","path",n),m("updateModelSource","modelSourceWriteRequest",e);const o="/environments/{environmentName}/packages/{packageName}/models/{path}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))).replace("{path}",encodeURIComponent(String(n))),i=new URL(o,S);let l;c&&(l=c.baseOptions);const p={method:"PUT",...l,...s},d={},h={};t!==void 0&&(h.versionId=t),d["Content-Type"]="application/json",d.Accept="application/json",v(i,h);let k=l&&l.headers?l.headers:{};return p.headers={...d,...k,...s.headers},p.data=O(e,p,c),{url:V(i),options:p}}}},M=function(c){const r=fe(c);return{async compileModelSource(a,n,e,t,s,o){const i=await r.compileModelSource(a,n,e,t,s,o),l=c?.serverIndex??0,p=P["ModelsApi.compileModelSource"]?.[l]?.url;return(d,h)=>b(i,u,g,c)(d,p||h)},async executeQueryModel(a,n,e,t,s,o){const i=await r.executeQueryModel(a,n,e,t,s,o),l=c?.serverIndex??0,p=P["ModelsApi.executeQueryModel"]?.[l]?.url;return(d,h)=>b(i,u,g,c)(d,p||h)},async getModel(a,n,e,t,s,o,i){const l=await r.getModel(a,n,e,t,s,o,i),p=c?.serverIndex??0,d=P["ModelsApi.getModel"]?.[p]?.url;return(h,k)=>b(l,u,g,c)(h,d||k)},async listModels(a,n,e,t,s){const o=await r.listModels(a,n,e,t,s),i=c?.serverIndex??0,l=P["ModelsApi.listModels"]?.[i]?.url;return(p,d)=>b(o,u,g,c)(p,l||d)},async updateModelSource(a,n,e,t,s,o){const i=await r.updateModelSource(a,n,e,t,s,o),l=c?.serverIndex??0,p=P["ModelsApi.updateModelSource"]?.[l]?.url;return(d,h)=>b(i,u,g,c)(d,p||h)}}},tn=function(c,r,a){const n=M(c);return{compileModelSource(e,t,s,o,i,l){return n.compileModelSource(e,t,s,o,i,l).then(p=>p(a,r))},executeQueryModel(e,t,s,o,i,l){return n.executeQueryModel(e,t,s,o,i,l).then(p=>p(a,r))},getModel(e,t,s,o,i,l,p){return n.getModel(e,t,s,o,i,l,p).then(d=>d(a,r))},listModels(e,t,s,o,i){return n.listModels(e,t,s,o,i).then(l=>l(a,r))},updateModelSource(e,t,s,o,i,l){return n.updateModelSource(e,t,s,o,i,l).then(p=>p(a,r))}}};class we extends I{compileModelSource(r,a,n,e,t,s){return M(this.configuration).compileModelSource(r,a,n,e,t,s).then(o=>o(this.axios,this.basePath))}executeQueryModel(r,a,n,e,t,s){return M(this.configuration).executeQueryModel(r,a,n,e,t,s).then(o=>o(this.axios,this.basePath))}getModel(r,a,n,e,t,s,o){return M(this.configuration).getModel(r,a,n,e,t,s,o).then(i=>i(this.axios,this.basePath))}listModels(r,a,n,e,t){return M(this.configuration).listModels(r,a,n,e,t).then(s=>s(this.axios,this.basePath))}updateModelSource(r,a,n,e,t,s){return M(this.configuration).updateModelSource(r,a,n,e,t,s).then(o=>o(this.axios,this.basePath))}}const Fe=function(c){return{executeNotebookCell:async(r,a,n,e,t,s,o,i,l={})=>{m("executeNotebookCell","environmentName",r),m("executeNotebookCell","packageName",a),m("executeNotebookCell","path",n),m("executeNotebookCell","cellIndex",e);const p="/environments/{environmentName}/packages/{packageName}/notebooks/{path}/cells/{cellIndex}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))).replace("{path}",encodeURIComponent(String(n))).replace("{cellIndex}",encodeURIComponent(String(e))),d=new URL(p,S);let h;c&&(h=c.baseOptions);const k={method:"GET",...h,...l},A={},C={};t!==void 0&&(C.versionId=t),s!==void 0&&(C.filter_params=s),o!==void 0&&(C.bypass_filters=o),i!==void 0&&(C.givens=i),A.Accept="application/json",v(d,C);let U=h&&h.headers?h.headers:{};return k.headers={...A,...U,...l.headers},{url:V(d),options:k}},getNotebook:async(r,a,n,e,t={})=>{m("getNotebook","environmentName",r),m("getNotebook","packageName",a),m("getNotebook","path",n);const s="/environments/{environmentName}/packages/{packageName}/notebooks/{path}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))).replace("{path}",encodeURIComponent(String(n))),o=new URL(s,S);let i;c&&(i=c.baseOptions);const l={method:"GET",...i,...t},p={},d={};e!==void 0&&(d.versionId=e),p.Accept="application/json",v(o,d);let h=i&&i.headers?i.headers:{};return l.headers={...p,...h,...t.headers},{url:V(o),options:l}},listNotebooks:async(r,a,n,e={})=>{m("listNotebooks","environmentName",r),m("listNotebooks","packageName",a);const t="/environments/{environmentName}/packages/{packageName}/notebooks".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))),s=new URL(t,S);let o;c&&(o=c.baseOptions);const i={method:"GET",...o,...e},l={},p={};n!==void 0&&(p.versionId=n),l.Accept="application/json",v(s,p);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...e.headers},{url:V(s),options:i}}}},q=function(c){const r=Fe(c);return{async executeNotebookCell(a,n,e,t,s,o,i,l,p){const d=await r.executeNotebookCell(a,n,e,t,s,o,i,l,p),h=c?.serverIndex??0,k=P["NotebooksApi.executeNotebookCell"]?.[h]?.url;return(A,C)=>b(d,u,g,c)(A,k||C)},async getNotebook(a,n,e,t,s){const o=await r.getNotebook(a,n,e,t,s),i=c?.serverIndex??0,l=P["NotebooksApi.getNotebook"]?.[i]?.url;return(p,d)=>b(o,u,g,c)(p,l||d)},async listNotebooks(a,n,e,t){const s=await r.listNotebooks(a,n,e,t),o=c?.serverIndex??0,i=P["NotebooksApi.listNotebooks"]?.[o]?.url;return(l,p)=>b(s,u,g,c)(l,i||p)}}},nn=function(c,r,a){const n=q(c);return{executeNotebookCell(e,t,s,o,i,l,p,d,h){return n.executeNotebookCell(e,t,s,o,i,l,p,d,h).then(k=>k(a,r))},getNotebook(e,t,s,o,i){return n.getNotebook(e,t,s,o,i).then(l=>l(a,r))},listNotebooks(e,t,s,o){return n.listNotebooks(e,t,s,o).then(i=>i(a,r))}}};class Me extends I{executeNotebookCell(r,a,n,e,t,s,o,i,l){return q(this.configuration).executeNotebookCell(r,a,n,e,t,s,o,i,l).then(p=>p(this.axios,this.basePath))}getNotebook(r,a,n,e,t){return q(this.configuration).getNotebook(r,a,n,e,t).then(s=>s(this.axios,this.basePath))}listNotebooks(r,a,n,e){return q(this.configuration).listNotebooks(r,a,n,e).then(t=>t(this.axios,this.basePath))}}const rn={True:"true",False:"false"},Be=function(c){return{createPackage:async(r,a,n,e={})=>{m("createPackage","environmentName",r),m("createPackage","_package",a);const t="/environments/{environmentName}/packages".replace("{environmentName}",encodeURIComponent(String(r))),s=new URL(t,S);let o;c&&(o=c.baseOptions);const i={method:"POST",...o,...e},l={},p={};n!==void 0&&(p.dryRun=n),l["Content-Type"]="application/json",l.Accept="application/json",v(s,p);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...e.headers},i.data=O(a,i,c),{url:V(s),options:i}},deletePackage:async(r,a,n={})=>{m("deletePackage","environmentName",r),m("deletePackage","packageName",a);const e="/environments/{environmentName}/packages/{packageName}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))),t=new URL(e,S);let s;c&&(s=c.baseOptions);const o={method:"DELETE",...s,...n},i={},l={};i.Accept="application/json",v(t,l);let p=s&&s.headers?s.headers:{};return o.headers={...i,...p,...n.headers},{url:V(t),options:o}},getPackage:async(r,a,n,e,t={})=>{m("getPackage","environmentName",r),m("getPackage","packageName",a);const s="/environments/{environmentName}/packages/{packageName}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))),o=new URL(s,S);let i;c&&(i=c.baseOptions);const l={method:"GET",...i,...t},p={},d={};n!==void 0&&(d.versionId=n),e!==void 0&&(d.reload=e),p.Accept="application/json",v(o,d);let h=i&&i.headers?i.headers:{};return l.headers={...p,...h,...t.headers},{url:V(o),options:l}},getPackageBuildPlan:async(r,a,n,e={})=>{m("getPackageBuildPlan","environmentName",r),m("getPackageBuildPlan","packageName",a);const t="/environments/{environmentName}/packages/{packageName}/build-plan".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))),s=new URL(t,S);let o;c&&(o=c.baseOptions);const i={method:"GET",...o,...e},l={},p={};n!==void 0&&(p.versionId=n),l.Accept="application/json",v(s,p);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...e.headers},{url:V(s),options:i}},getPackageClassification:async(r,a,n,e={})=>{m("getPackageClassification","environmentName",r),m("getPackageClassification","packageName",a);const t="/environments/{environmentName}/packages/{packageName}/classification".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))),s=new URL(t,S);let o;c&&(o=c.baseOptions);const i={method:"GET",...o,...e},l={},p={};n!==void 0&&(p.versionId=n),l.Accept="application/json",v(s,p);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...e.headers},{url:V(s),options:i}},getPackageEmbeddingIndex:async(r,a,n,e={})=>{m("getPackageEmbeddingIndex","environmentName",r),m("getPackageEmbeddingIndex","packageName",a);const t="/environments/{environmentName}/packages/{packageName}/embedding-index".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))),s=new URL(t,S);let o;c&&(o=c.baseOptions);const i={method:"GET",...o,...e},l={},p={};n!==void 0&&(p.versionId=n),l.Accept="application/json",v(s,p);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...e.headers},{url:V(s),options:i}},getPackageEntities:async(r,a,n,e,t={})=>{m("getPackageEntities","environmentName",r),m("getPackageEntities","packageName",a);const s="/environments/{environmentName}/packages/{packageName}/entities".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))),o=new URL(s,S);let i;c&&(i=c.baseOptions);const l={method:"GET",...i,...t},p={},d={};n!==void 0&&(d.versionId=n),e!==void 0&&(d.includeHiddenFilesAndSources=e),p.Accept="application/json",v(o,d);let h=i&&i.headers?i.headers:{};return l.headers={...p,...h,...t.headers},{url:V(o),options:l}},getPackageStatus:async(r,a,n,e={})=>{m("getPackageStatus","environmentName",r),m("getPackageStatus","packageName",a);const t="/environments/{environmentName}/packages/{packageName}/status".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))),s=new URL(t,S);let o;c&&(o=c.baseOptions);const i={method:"GET",...o,...e},l={},p={};n!==void 0&&(p.versionId=n),l.Accept="application/json",v(s,p);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...e.headers},{url:V(s),options:i}},listPackages:async(r,a={})=>{m("listPackages","environmentName",r);const n="/environments/{environmentName}/packages".replace("{environmentName}",encodeURIComponent(String(r))),e=new URL(n,S);let t;c&&(t=c.baseOptions);const s={method:"GET",...t,...a},o={},i={};o.Accept="application/json",v(e,i);let l=t&&t.headers?t.headers:{};return s.headers={...o,...l,...a.headers},{url:V(e),options:s}},updatePackage:async(r,a,n,e={})=>{m("updatePackage","environmentName",r),m("updatePackage","packageName",a),m("updatePackage","_package",n);const t="/environments/{environmentName}/packages/{packageName}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))),s=new URL(t,S);let o;c&&(o=c.baseOptions);const i={method:"PATCH",...o,...e},l={},p={};l["Content-Type"]="application/json",l.Accept="application/json",v(s,p);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...e.headers},i.data=O(n,i,c),{url:V(s),options:i}}}},E=function(c){const r=Be(c);return{async createPackage(a,n,e,t){const s=await r.createPackage(a,n,e,t),o=c?.serverIndex??0,i=P["PackagesApi.createPackage"]?.[o]?.url;return(l,p)=>b(s,u,g,c)(l,i||p)},async deletePackage(a,n,e){const t=await r.deletePackage(a,n,e),s=c?.serverIndex??0,o=P["PackagesApi.deletePackage"]?.[s]?.url;return(i,l)=>b(t,u,g,c)(i,o||l)},async getPackage(a,n,e,t,s){const o=await r.getPackage(a,n,e,t,s),i=c?.serverIndex??0,l=P["PackagesApi.getPackage"]?.[i]?.url;return(p,d)=>b(o,u,g,c)(p,l||d)},async getPackageBuildPlan(a,n,e,t){const s=await r.getPackageBuildPlan(a,n,e,t),o=c?.serverIndex??0,i=P["PackagesApi.getPackageBuildPlan"]?.[o]?.url;return(l,p)=>b(s,u,g,c)(l,i||p)},async getPackageClassification(a,n,e,t){const s=await r.getPackageClassification(a,n,e,t),o=c?.serverIndex??0,i=P["PackagesApi.getPackageClassification"]?.[o]?.url;return(l,p)=>b(s,u,g,c)(l,i||p)},async getPackageEmbeddingIndex(a,n,e,t){const s=await r.getPackageEmbeddingIndex(a,n,e,t),o=c?.serverIndex??0,i=P["PackagesApi.getPackageEmbeddingIndex"]?.[o]?.url;return(l,p)=>b(s,u,g,c)(l,i||p)},async getPackageEntities(a,n,e,t,s){const o=await r.getPackageEntities(a,n,e,t,s),i=c?.serverIndex??0,l=P["PackagesApi.getPackageEntities"]?.[i]?.url;return(p,d)=>b(o,u,g,c)(p,l||d)},async getPackageStatus(a,n,e,t){const s=await r.getPackageStatus(a,n,e,t),o=c?.serverIndex??0,i=P["PackagesApi.getPackageStatus"]?.[o]?.url;return(l,p)=>b(s,u,g,c)(l,i||p)},async listPackages(a,n){const e=await r.listPackages(a,n),t=c?.serverIndex??0,s=P["PackagesApi.listPackages"]?.[t]?.url;return(o,i)=>b(e,u,g,c)(o,s||i)},async updatePackage(a,n,e,t){const s=await r.updatePackage(a,n,e,t),o=c?.serverIndex??0,i=P["PackagesApi.updatePackage"]?.[o]?.url;return(l,p)=>b(s,u,g,c)(l,i||p)}}},on=function(c,r,a){const n=E(c);return{createPackage(e,t,s,o){return n.createPackage(e,t,s,o).then(i=>i(a,r))},deletePackage(e,t,s){return n.deletePackage(e,t,s).then(o=>o(a,r))},getPackage(e,t,s,o,i){return n.getPackage(e,t,s,o,i).then(l=>l(a,r))},getPackageBuildPlan(e,t,s,o){return n.getPackageBuildPlan(e,t,s,o).then(i=>i(a,r))},getPackageClassification(e,t,s,o){return n.getPackageClassification(e,t,s,o).then(i=>i(a,r))},getPackageEmbeddingIndex(e,t,s,o){return n.getPackageEmbeddingIndex(e,t,s,o).then(i=>i(a,r))},getPackageEntities(e,t,s,o,i){return n.getPackageEntities(e,t,s,o,i).then(l=>l(a,r))},getPackageStatus(e,t,s,o){return n.getPackageStatus(e,t,s,o).then(i=>i(a,r))},listPackages(e,t){return n.listPackages(e,t).then(s=>s(a,r))},updatePackage(e,t,s,o){return n.updatePackage(e,t,s,o).then(i=>i(a,r))}}};class De extends I{createPackage(r,a,n,e){return E(this.configuration).createPackage(r,a,n,e).then(t=>t(this.axios,this.basePath))}deletePackage(r,a,n){return E(this.configuration).deletePackage(r,a,n).then(e=>e(this.axios,this.basePath))}getPackage(r,a,n,e,t){return E(this.configuration).getPackage(r,a,n,e,t).then(s=>s(this.axios,this.basePath))}getPackageBuildPlan(r,a,n,e){return E(this.configuration).getPackageBuildPlan(r,a,n,e).then(t=>t(this.axios,this.basePath))}getPackageClassification(r,a,n,e){return E(this.configuration).getPackageClassification(r,a,n,e).then(t=>t(this.axios,this.basePath))}getPackageEmbeddingIndex(r,a,n,e){return E(this.configuration).getPackageEmbeddingIndex(r,a,n,e).then(t=>t(this.axios,this.basePath))}getPackageEntities(r,a,n,e,t){return E(this.configuration).getPackageEntities(r,a,n,e,t).then(s=>s(this.axios,this.basePath))}getPackageStatus(r,a,n,e){return E(this.configuration).getPackageStatus(r,a,n,e).then(t=>t(this.axios,this.basePath))}listPackages(r,a){return E(this.configuration).listPackages(r,a).then(n=>n(this.axios,this.basePath))}updatePackage(r,a,n,e){return E(this.configuration).updatePackage(r,a,n,e).then(t=>t(this.axios,this.basePath))}}const je=function(c){return{deleteTheme:async(r={})=>{const a="/theme",n=new URL(a,S);let e;c&&(e=c.baseOptions);const t={method:"DELETE",...e,...r},s={},o={};s.Accept="application/json",v(n,o);let i=e&&e.headers?e.headers:{};return t.headers={...s,...i,...r.headers},{url:V(n),options:t}},getStatus:async(r,a={})=>{const n="/status",e=new URL(n,S);let t;c&&(t=c.baseOptions);const s={method:"GET",...t,...a},o={},i={};r!==void 0&&(i.includeLoading=r),o.Accept="application/json",v(e,i);let l=t&&t.headers?t.headers:{};return s.headers={...o,...l,...a.headers},{url:V(e),options:s}},getTheme:async(r={})=>{const a="/theme",n=new URL(a,S);let e;c&&(e=c.baseOptions);const t={method:"GET",...e,...r},s={},o={};s.Accept="application/json",v(n,o);let i=e&&e.headers?e.headers:{};return t.headers={...s,...i,...r.headers},{url:V(n),options:t}},updateTheme:async(r,a={})=>{m("updateTheme","theme",r);const n="/theme",e=new URL(n,S);let t;c&&(t=c.baseOptions);const s={method:"PUT",...t,...a},o={},i={};o["Content-Type"]="application/json",o.Accept="application/json",v(e,i);let l=t&&t.headers?t.headers:{};return s.headers={...o,...l,...a.headers},s.data=O(r,s,c),{url:V(e),options:s}}}},j=function(c){const r=je(c);return{async deleteTheme(a){const n=await r.deleteTheme(a),e=c?.serverIndex??0,t=P["PublisherApi.deleteTheme"]?.[e]?.url;return(s,o)=>b(n,u,g,c)(s,t||o)},async getStatus(a,n){const e=await r.getStatus(a,n),t=c?.serverIndex??0,s=P["PublisherApi.getStatus"]?.[t]?.url;return(o,i)=>b(e,u,g,c)(o,s||i)},async getTheme(a){const n=await r.getTheme(a),e=c?.serverIndex??0,t=P["PublisherApi.getTheme"]?.[e]?.url;return(s,o)=>b(n,u,g,c)(s,t||o)},async updateTheme(a,n){const e=await r.updateTheme(a,n),t=c?.serverIndex??0,s=P["PublisherApi.updateTheme"]?.[t]?.url;return(o,i)=>b(e,u,g,c)(o,s||i)}}},sn=function(c,r,a){const n=j(c);return{deleteTheme(e){return n.deleteTheme(e).then(t=>t(a,r))},getStatus(e,t){return n.getStatus(e,t).then(s=>s(a,r))},getTheme(e){return n.getTheme(e).then(t=>t(a,r))},updateTheme(e,t){return n.updateTheme(e,t).then(s=>s(a,r))}}};class Le extends I{deleteTheme(r){return j(this.configuration).deleteTheme(r).then(a=>a(this.axios,this.basePath))}getStatus(r,a){return j(this.configuration).getStatus(r,a).then(n=>n(this.axios,this.basePath))}getTheme(r){return j(this.configuration).getTheme(r).then(a=>a(this.axios,this.basePath))}updateTheme(r,a){return j(this.configuration).updateTheme(r,a).then(n=>n(this.axios,this.basePath))}}const Qe=function(c){return{getReport:async(r,a,n,e,t={})=>{m("getReport","environmentName",r),m("getReport","packageName",a),m("getReport","path",n);const s="/environments/{environmentName}/packages/{packageName}/reports/{path}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))).replace("{path}",encodeURIComponent(String(n))),o=new URL(s,S);let i;c&&(i=c.baseOptions);const l={method:"GET",...i,...t},p={},d={};e!==void 0&&(d.versionId=e),p.Accept="application/json",v(o,d);let h=i&&i.headers?i.headers:{};return l.headers={...p,...h,...t.headers},{url:V(o),options:l}},listReports:async(r,a,n,e={})=>{m("listReports","environmentName",r),m("listReports","packageName",a);const t="/environments/{environmentName}/packages/{packageName}/reports".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))),s=new URL(t,S);let o;c&&(o=c.baseOptions);const i={method:"GET",...o,...e},l={},p={};n!==void 0&&(p.versionId=n),l.Accept="application/json",v(s,p);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...e.headers},{url:V(s),options:i}}}},K=function(c){const r=Qe(c);return{async getReport(a,n,e,t,s){const o=await r.getReport(a,n,e,t,s),i=c?.serverIndex??0,l=P["ReportsApi.getReport"]?.[i]?.url;return(p,d)=>b(o,u,g,c)(p,l||d)},async listReports(a,n,e,t){const s=await r.listReports(a,n,e,t),o=c?.serverIndex??0,i=P["ReportsApi.listReports"]?.[o]?.url;return(l,p)=>b(s,u,g,c)(l,i||p)}}},cn=function(c,r,a){const n=K(c);return{getReport(e,t,s,o,i){return n.getReport(e,t,s,o,i).then(l=>l(a,r))},listReports(e,t,s,o){return n.listReports(e,t,s,o).then(i=>i(a,r))}}};class qe extends I{getReport(r,a,n,e,t){return K(this.configuration).getReport(r,a,n,e,t).then(s=>s(this.axios,this.basePath))}listReports(r,a,n,e){return K(this.configuration).listReports(r,a,n,e).then(t=>t(this.axios,this.basePath))}}const ze=function(c){return{getSkill:async(r,a,n,e,t={})=>{m("getSkill","environmentName",r),m("getSkill","packageName",a),m("getSkill","skillName",n);const s="/environments/{environmentName}/packages/{packageName}/skills/{skillName}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))).replace("{skillName}",encodeURIComponent(String(n))),o=new URL(s,S);let i;c&&(i=c.baseOptions);const l={method:"GET",...i,...t},p={},d={};e!==void 0&&(d.versionId=e),p.Accept="application/json",v(o,d);let h=i&&i.headers?i.headers:{};return l.headers={...p,...h,...t.headers},{url:V(o),options:l}},listSkills:async(r,a,n,e={})=>{m("listSkills","environmentName",r),m("listSkills","packageName",a);const t="/environments/{environmentName}/packages/{packageName}/skills".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))),s=new URL(t,S);let o;c&&(o=c.baseOptions);const i={method:"GET",...o,...e},l={},p={};n!==void 0&&(p.versionId=n),l.Accept="application/json",v(s,p);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...e.headers},{url:V(s),options:i}}}},$=function(c){const r=ze(c);return{async getSkill(a,n,e,t,s){const o=await r.getSkill(a,n,e,t,s),i=c?.serverIndex??0,l=P["SkillsApi.getSkill"]?.[i]?.url;return(p,d)=>b(o,u,g,c)(p,l||d)},async listSkills(a,n,e,t){const s=await r.listSkills(a,n,e,t),o=c?.serverIndex??0,i=P["SkillsApi.listSkills"]?.[o]?.url;return(l,p)=>b(s,u,g,c)(l,i||p)}}},ln=function(c,r,a){const n=$(c);return{getSkill(e,t,s,o,i){return n.getSkill(e,t,s,o,i).then(l=>l(a,r))},listSkills(e,t,s,o){return n.listSkills(e,t,s,o).then(i=>i(a,r))}}};class pn extends I{getSkill(r,a,n,e,t){return $(this.configuration).getSkill(r,a,n,e,t).then(s=>s(this.axios,this.basePath))}listSkills(r,a,n,e){return $(this.configuration).listSkills(r,a,n,e).then(t=>t(this.axios,this.basePath))}}const He=function(c){return{createStorageDestinationFileCleanup:async(r,a,n,e={})=>{m("createStorageDestinationFileCleanup","environmentName",r),m("createStorageDestinationFileCleanup","destinationName",a),m("createStorageDestinationFileCleanup","storageFileCleanupRequest",n);const t="/environments/{environmentName}/storageDestinations/{destinationName}/fileCleanups".replace("{environmentName}",encodeURIComponent(String(r))).replace("{destinationName}",encodeURIComponent(String(a))),s=new URL(t,S);let o;c&&(o=c.baseOptions);const i={method:"POST",...o,...e},l={},p={};l["Content-Type"]="application/json",l.Accept="application/json",v(s,p);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...e.headers},i.data=O(n,i,c),{url:V(s),options:i}},deleteStorageDestinationTable:async(r,a,n,e,t={})=>{m("deleteStorageDestinationTable","environmentName",r),m("deleteStorageDestinationTable","destinationName",a),m("deleteStorageDestinationTable","schemaName",n),m("deleteStorageDestinationTable","tableName",e);const s="/environments/{environmentName}/storageDestinations/{destinationName}/schemas/{schemaName}/tables/{tableName}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{destinationName}",encodeURIComponent(String(a))).replace("{schemaName}",encodeURIComponent(String(n))).replace("{tableName}",encodeURIComponent(String(e))),o=new URL(s,S);let i;c&&(i=c.baseOptions);const l={method:"DELETE",...i,...t},p={},d={};p.Accept="application/json",v(o,d);let h=i&&i.headers?i.headers:{};return l.headers={...p,...h,...t.headers},{url:V(o),options:l}},listStorageDestinationTables:async(r,a,n,e={})=>{m("listStorageDestinationTables","environmentName",r),m("listStorageDestinationTables","destinationName",a),m("listStorageDestinationTables","schemaName",n);const t="/environments/{environmentName}/storageDestinations/{destinationName}/schemas/{schemaName}/tables".replace("{environmentName}",encodeURIComponent(String(r))).replace("{destinationName}",encodeURIComponent(String(a))).replace("{schemaName}",encodeURIComponent(String(n))),s=new URL(t,S);let o;c&&(o=c.baseOptions);const i={method:"GET",...o,...e},l={},p={};l.Accept="application/json",v(s,p);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...e.headers},{url:V(s),options:i}}}},z=function(c){const r=He(c);return{async createStorageDestinationFileCleanup(a,n,e,t){const s=await r.createStorageDestinationFileCleanup(a,n,e,t),o=c?.serverIndex??0,i=P["StorageDestinationsApi.createStorageDestinationFileCleanup"]?.[o]?.url;return(l,p)=>b(s,u,g,c)(l,i||p)},async deleteStorageDestinationTable(a,n,e,t,s){const o=await r.deleteStorageDestinationTable(a,n,e,t,s),i=c?.serverIndex??0,l=P["StorageDestinationsApi.deleteStorageDestinationTable"]?.[i]?.url;return(p,d)=>b(o,u,g,c)(p,l||d)},async listStorageDestinationTables(a,n,e,t){const s=await r.listStorageDestinationTables(a,n,e,t),o=c?.serverIndex??0,i=P["StorageDestinationsApi.listStorageDestinationTables"]?.[o]?.url;return(l,p)=>b(s,u,g,c)(l,i||p)}}},dn=function(c,r,a){const n=z(c);return{createStorageDestinationFileCleanup(e,t,s,o){return n.createStorageDestinationFileCleanup(e,t,s,o).then(i=>i(a,r))},deleteStorageDestinationTable(e,t,s,o,i){return n.deleteStorageDestinationTable(e,t,s,o,i).then(l=>l(a,r))},listStorageDestinationTables(e,t,s,o){return n.listStorageDestinationTables(e,t,s,o).then(i=>i(a,r))}}};class mn extends I{createStorageDestinationFileCleanup(r,a,n,e){return z(this.configuration).createStorageDestinationFileCleanup(r,a,n,e).then(t=>t(this.axios,this.basePath))}deleteStorageDestinationTable(r,a,n,e,t){return z(this.configuration).deleteStorageDestinationTable(r,a,n,e,t).then(s=>s(this.axios,this.basePath))}listStorageDestinationTables(r,a,n,e){return z(this.configuration).listStorageDestinationTables(r,a,n,e).then(t=>t(this.axios,this.basePath))}}const _e=function(c){return{deletePackageVersion:async(r,a,n,e={})=>{m("deletePackageVersion","environmentName",r),m("deletePackageVersion","packageName",a),m("deletePackageVersion","version",n);const t="/environments/{environmentName}/packages/{packageName}/versions/{version}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))).replace("{version}",encodeURIComponent(String(n))),s=new URL(t,S);let o;c&&(o=c.baseOptions);const i={method:"DELETE",...o,...e},l={},p={};l.Accept="application/json",v(s,p);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...e.headers},{url:V(s),options:i}},getPackageVersion:async(r,a,n,e={})=>{m("getPackageVersion","environmentName",r),m("getPackageVersion","packageName",a),m("getPackageVersion","version",n);const t="/environments/{environmentName}/packages/{packageName}/versions/{version}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))).replace("{version}",encodeURIComponent(String(n))),s=new URL(t,S);let o;c&&(o=c.baseOptions);const i={method:"GET",...o,...e},l={},p={};l.Accept="application/json",v(s,p);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...e.headers},{url:V(s),options:i}},listPackageVersions:async(r,a,n={})=>{m("listPackageVersions","environmentName",r),m("listPackageVersions","packageName",a);const e="/environments/{environmentName}/packages/{packageName}/versions".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))),t=new URL(e,S);let s;c&&(s=c.baseOptions);const o={method:"GET",...s,...n},i={},l={};i.Accept="application/json",v(t,l);let p=s&&s.headers?s.headers:{};return o.headers={...i,...p,...n.headers},{url:V(t),options:o}},setPackageLatestVersion:async(r,a,n,e={})=>{m("setPackageLatestVersion","environmentName",r),m("setPackageLatestVersion","packageName",a),m("setPackageLatestVersion","packageLatestVersion",n);const t="/environments/{environmentName}/packages/{packageName}/latest".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))),s=new URL(t,S);let o;c&&(o=c.baseOptions);const i={method:"PUT",...o,...e},l={},p={};l["Content-Type"]="application/json",l.Accept="application/json",v(s,p);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...e.headers},i.data=O(n,i,c),{url:V(s),options:i}},setPackageVersionManifest:async(r,a,n,e,t={})=>{m("setPackageVersionManifest","environmentName",r),m("setPackageVersionManifest","packageName",a),m("setPackageVersionManifest","version",n),m("setPackageVersionManifest","packageVersionManifest",e);const s="/environments/{environmentName}/packages/{packageName}/versions/{version}/manifest".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))).replace("{version}",encodeURIComponent(String(n))),o=new URL(s,S);let i;c&&(i=c.baseOptions);const l={method:"PUT",...i,...t},p={},d={};p["Content-Type"]="application/json",p.Accept="application/json",v(o,d);let h=i&&i.headers?i.headers:{};return l.headers={...p,...h,...t.headers},l.data=O(e,l,c),{url:V(o),options:l}},updatePackageVersion:async(r,a,n,e,t={})=>{m("updatePackageVersion","environmentName",r),m("updatePackageVersion","packageName",a),m("updatePackageVersion","version",n),m("updatePackageVersion","packageVersionUpdate",e);const s="/environments/{environmentName}/packages/{packageName}/versions/{version}".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))).replace("{version}",encodeURIComponent(String(n))),o=new URL(s,S);let i;c&&(i=c.baseOptions);const l={method:"PATCH",...i,...t},p={},d={};p["Content-Type"]="application/json",p.Accept="application/json",v(o,d);let h=i&&i.headers?i.headers:{};return l.headers={...p,...h,...t.headers},l.data=O(e,l,c),{url:V(o),options:l}}}},f=function(c){const r=_e(c);return{async deletePackageVersion(a,n,e,t){const s=await r.deletePackageVersion(a,n,e,t),o=c?.serverIndex??0,i=P["VersionsApi.deletePackageVersion"]?.[o]?.url;return(l,p)=>b(s,u,g,c)(l,i||p)},async getPackageVersion(a,n,e,t){const s=await r.getPackageVersion(a,n,e,t),o=c?.serverIndex??0,i=P["VersionsApi.getPackageVersion"]?.[o]?.url;return(l,p)=>b(s,u,g,c)(l,i||p)},async listPackageVersions(a,n,e){const t=await r.listPackageVersions(a,n,e),s=c?.serverIndex??0,o=P["VersionsApi.listPackageVersions"]?.[s]?.url;return(i,l)=>b(t,u,g,c)(i,o||l)},async setPackageLatestVersion(a,n,e,t){const s=await r.setPackageLatestVersion(a,n,e,t),o=c?.serverIndex??0,i=P["VersionsApi.setPackageLatestVersion"]?.[o]?.url;return(l,p)=>b(s,u,g,c)(l,i||p)},async setPackageVersionManifest(a,n,e,t,s){const o=await r.setPackageVersionManifest(a,n,e,t,s),i=c?.serverIndex??0,l=P["VersionsApi.setPackageVersionManifest"]?.[i]?.url;return(p,d)=>b(o,u,g,c)(p,l||d)},async updatePackageVersion(a,n,e,t,s){const o=await r.updatePackageVersion(a,n,e,t,s),i=c?.serverIndex??0,l=P["VersionsApi.updatePackageVersion"]?.[i]?.url;return(p,d)=>b(o,u,g,c)(p,l||d)}}},hn=function(c,r,a){const n=f(c);return{deletePackageVersion(e,t,s,o){return n.deletePackageVersion(e,t,s,o).then(i=>i(a,r))},getPackageVersion(e,t,s,o){return n.getPackageVersion(e,t,s,o).then(i=>i(a,r))},listPackageVersions(e,t,s){return n.listPackageVersions(e,t,s).then(o=>o(a,r))},setPackageLatestVersion(e,t,s,o){return n.setPackageLatestVersion(e,t,s,o).then(i=>i(a,r))},setPackageVersionManifest(e,t,s,o,i){return n.setPackageVersionManifest(e,t,s,o,i).then(l=>l(a,r))},updatePackageVersion(e,t,s,o,i){return n.updatePackageVersion(e,t,s,o,i).then(l=>l(a,r))}}};class Ge extends I{deletePackageVersion(r,a,n,e){return f(this.configuration).deletePackageVersion(r,a,n,e).then(t=>t(this.axios,this.basePath))}getPackageVersion(r,a,n,e){return f(this.configuration).getPackageVersion(r,a,n,e).then(t=>t(this.axios,this.basePath))}listPackageVersions(r,a,n){return f(this.configuration).listPackageVersions(r,a,n).then(e=>e(this.axios,this.basePath))}setPackageLatestVersion(r,a,n,e){return f(this.configuration).setPackageLatestVersion(r,a,n,e).then(t=>t(this.axios,this.basePath))}setPackageVersionManifest(r,a,n,e,t){return f(this.configuration).setPackageVersionManifest(r,a,n,e,t).then(s=>s(this.axios,this.basePath))}updatePackageVersion(r,a,n,e,t){return f(this.configuration).updatePackageVersion(r,a,n,e,t).then(s=>s(this.axios,this.basePath))}}const We=function(c){return{getWatchStatus:async(r={})=>{const a="/watch-mode/status",n=new URL(a,S);let e;c&&(e=c.baseOptions);const t={method:"GET",...e,...r},s={},o={};s.Accept="application/json",v(n,o);let i=e&&e.headers?e.headers:{};return t.headers={...s,...i,...r.headers},{url:V(n),options:t}},startWatching:async(r,a={})=>{m("startWatching","startWatchRequest",r);const n="/watch-mode/start",e=new URL(n,S);let t;c&&(t=c.baseOptions);const s={method:"POST",...t,...a},o={},i={};o["Content-Type"]="application/json",o.Accept="application/json",v(e,i);let l=t&&t.headers?t.headers:{};return s.headers={...o,...l,...a.headers},s.data=O(r,s,c),{url:V(e),options:s}},stopWatching:async(r={})=>{const a="/watch-mode/stop",n=new URL(a,S);let e;c&&(e=c.baseOptions);const t={method:"POST",...e,...r},s={},o={};s.Accept="application/json",v(n,o);let i=e&&e.headers?e.headers:{};return t.headers={...s,...i,...r.headers},{url:V(n),options:t}},streamPackageEvents:async(r,a,n,e={})=>{m("streamPackageEvents","environmentName",r),m("streamPackageEvents","packageName",a);const t="/environments/{environmentName}/packages/{packageName}/events".replace("{environmentName}",encodeURIComponent(String(r))).replace("{packageName}",encodeURIComponent(String(a))),s=new URL(t,S);let o;c&&(o=c.baseOptions);const i={method:"GET",...o,...e},l={},p={};n!==void 0&&(p.versionId=n),l.Accept="text/event-stream,application/json",v(s,p);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...e.headers},{url:V(s),options:i}}}},L=function(c){const r=We(c);return{async getWatchStatus(a){const n=await r.getWatchStatus(a),e=c?.serverIndex??0,t=P["WatchModeApi.getWatchStatus"]?.[e]?.url;return(s,o)=>b(n,u,g,c)(s,t||o)},async startWatching(a,n){const e=await r.startWatching(a,n),t=c?.serverIndex??0,s=P["WatchModeApi.startWatching"]?.[t]?.url;return(o,i)=>b(e,u,g,c)(o,s||i)},async stopWatching(a){const n=await r.stopWatching(a),e=c?.serverIndex??0,t=P["WatchModeApi.stopWatching"]?.[e]?.url;return(s,o)=>b(n,u,g,c)(s,t||o)},async streamPackageEvents(a,n,e,t){const s=await r.streamPackageEvents(a,n,e,t),o=c?.serverIndex??0,i=P["WatchModeApi.streamPackageEvents"]?.[o]?.url;return(l,p)=>b(s,u,g,c)(l,i||p)}}},un=function(c,r,a){const n=L(c);return{getWatchStatus(e){return n.getWatchStatus(e).then(t=>t(a,r))},startWatching(e,t){return n.startWatching(e,t).then(s=>s(a,r))},stopWatching(e){return n.stopWatching(e).then(t=>t(a,r))},streamPackageEvents(e,t,s,o){return n.streamPackageEvents(e,t,s,o).then(i=>i(a,r))}}};class Ke extends I{getWatchStatus(r){return L(this.configuration).getWatchStatus(r).then(a=>a(this.axios,this.basePath))}startWatching(r,a){return L(this.configuration).startWatching(r,a).then(n=>n(this.axios,this.basePath))}stopWatching(r){return L(this.configuration).stopWatching(r).then(a=>a(this.axios,this.basePath))}streamPackageEvents(r,a,n,e){return L(this.configuration).streamPackageEvents(r,a,n,e).then(t=>t(this.axios,this.basePath))}}class $e{apiKey;username;password;accessToken;awsv4;basePath;serverIndex;baseOptions;formDataCtor;constructor(r={}){this.apiKey=r.apiKey,this.username=r.username,this.password=r.password,this.accessToken=r.accessToken,this.awsv4=r.awsv4,this.basePath=r.basePath,this.serverIndex=r.serverIndex,this.baseOptions={...r.baseOptions,headers:{...r.baseOptions?.headers}},this.formDataCtor=r.formDataCtor}isJsonMime(r){return r!==null&&/^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i.test(r)}}const Ye=new ne.QueryClient({defaultOptions:{queries:{retry:!1,throwOnError:!1,refetchOnWindowFocus:!1},mutations:{retry:!1,throwOnError:!1}}}),gn={staleTime:300*1e3,refetchOnWindowFocus:!1,refetchOnReconnect:!1};function Pn(c,r){return r||c?.modelPage==="viewer"?"viewer":"explorer"}function Sn(c){return{modelPage:Pn(c.data,c.isError&&c.data===void 0),isLoadingStatus:c.isPending}}const te="publisher:themeMode";function vn(){if(!(typeof window>"u"))try{const c=window.localStorage.getItem(te);if(c==="light"||c==="dark"||c==="auto")return c}catch{}}function Vn(c){if(!(typeof window>"u"))try{c===void 0?window.localStorage.removeItem(te):window.localStorage.setItem(te,c)}catch{}}function bn(){return typeof window>"u"||!window.matchMedia?!1:window.matchMedia("(prefers-color-scheme: dark)").matches}u.defaults.baseURL||(u.defaults.baseURL="IfYouAreSeeingThis_baseURL_IsNotSet");const Je=R.createContext(void 0),kn=(c,r,a)=>{const n=`${window.location.protocol}//${window.location.host}/api/v0`,e=u.create({baseURL:c||n,withCredentials:!0,timeout:6e5,...a?{adapter:a}:{}});e.interceptors.request.use(async s=>{const o=await r?.();return s.headers.Authorization=o||"",s});const t=new $e({basePath:n});return{models:new we(t,n,e),publisher:new Le(t,n,e),environments:new Ne(t,n,e),packages:new De(t,n,e),agents:new Ve(t,n,e),dashboards:new ye(t,n,e),dataApps:new Ie(t,n,e),notebooks:new Me(t,n,e),reports:new qe(t,n,e),connections:new ke(t,n,e),databases:new Re(t,n,e),materializations:new Te(t,n,e),watchMode:new Ke(t,n,e),versions:new Ge(t,n,e)}},An=c=>H.jsx(ne.QueryClientProvider,{client:Ye,children:H.jsx(On,{...c})}),On=({children:c,getAccessToken:r,baseURL:a,mutable:n,theme:e,ui:t,adapter:s,mode:o})=>{const i=R.useMemo(()=>kn(a,r,s),[a,r,s]),l=a||`${window.location.protocol}//${window.location.host}/api/v0`,p=ne.useQuery({queryKey:["status",l],retry:3,queryFn:async()=>(await i.publisher.getStatus()).data});p.error&&console.error("Failed to fetch publisher status:",p.error);const d=p.data?.frozenConfig,h=p.data?.theme,{modelPage:k,isLoadingStatus:A}=Sn(p);let C;p.isLoading||p.error?C=n:d?C=!1:C=n??!0;const U=R.useMemo(()=>[h,e],[h,e]),[Ze,Xe]=R.useState(vn),[ce,ea]=R.useState(bn);R.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const D=window.matchMedia("(prefers-color-scheme: dark)"),pe=ra=>ea(ra.matches);return D.addEventListener("change",pe),()=>D.removeEventListener("change",pe)},[]);const aa=R.useCallback(D=>{Xe(D),Vn(D)},[]),le=h?.allowUserToggle??!0,Y=le?Ze:void 0,ta=R.useMemo(()=>o??ge(h?.defaultMode,Y,ce),[o,h?.defaultMode,Y,ce]),na={server:l,getAccessToken:r,apiClients:i,mutable:C,isLoadingStatus:A,instanceTheme:h,modelPage:k};return H.jsx(Je.Provider,{value:na,children:H.jsx(Se,{layers:U,mode:ta,userChoice:Y,setMode:aa,allowUserToggle:le&&o===void 0,...t?{ui:t}:{},children:c})})},yn=()=>{const c=R.useContext(Je);if(c===void 0)throw new Error("useServer must be used within a ServerProvider");return c};exports.AgentsApi=Ve;exports.AgentsApiAxiosParamCreator=ve;exports.AgentsApiFactory=_t;exports.AgentsApiFp=Q;exports.AttachedDatabaseTypeEnum=ya;exports.AzureConnectionAuthTypeEnum=Ca;exports.CHART_RESULT_QUERY_OPTIONS=gn;exports.CleanMetricCard=pa;exports.CompileProblemSeverityEnum=Ia;exports.CompileRequestScopeEnum=xa;exports.CompileResultStatusEnum=Ra;exports.CompiledDocumentKindEnum=Na;exports.CompiledDocumentLayoutEnum=Ea;exports.Configuration=$e;exports.ConnectionProxyTypeEnum=Ta;exports.ConnectionStatusStatusEnum=fa;exports.ConnectionTypeEnum=Ua;exports.ConnectionsApi=ke;exports.ConnectionsApiAxiosParamCreator=be;exports.ConnectionsApiFactory=Wt;exports.ConnectionsApiFp=y;exports.ConnectionsTestApi=$t;exports.ConnectionsTestApiAxiosParamCreator=Ae;exports.ConnectionsTestApiFactory=Kt;exports.ConnectionsTestApiFp=oe;exports.DEFAULT_THEME=G;exports.DEFAULT_UI=T;exports.DashboardManifestKindEnum=Fa;exports.DashboardManifestLayoutEnum=wa;exports.DashboardTileKindEnum=Ma;exports.DashboardsApi=ye;exports.DashboardsApiAxiosParamCreator=Oe;exports.DashboardsApiFactory=Yt;exports.DashboardsApiFp=W;exports.DataAppFitEnum=Ba;exports.DataAppsApi=Ie;exports.DataAppsApiAxiosParamCreator=Ce;exports.DataAppsApiFactory=Jt;exports.DataAppsApiFp=se;exports.DatabaseTypeEnum=Da;exports.DatabasesApi=Re;exports.DatabasesApiAxiosParamCreator=xe;exports.DatabasesApiFactory=Zt;exports.DatabasesApiFp=ie;exports.EnvironmentsApi=Ne;exports.EnvironmentsApiAxiosParamCreator=Ee;exports.EnvironmentsApiFactory=Xt;exports.EnvironmentsApiFp=w;exports.ExecuteNotebookCellBypassFiltersEnum=rn;exports.FilterTypeEnum=ja;exports.FreshnessFallbackEnum=La;exports.GetAgentSkillsEnum=Gt;exports.GivenControlEnum=Qa;exports.LedgerEntryStrategyEnum=qa;exports.LogMessageSeverityEnum=za;exports.MONO_FONT_FAMILY=sa;exports.ManifestEntryFreshnessFallbackEnum=Ga;exports.ManifestEntryOriginEnum=Ha;exports.ManifestEntryRefreshEnum=Wa;exports.ManifestEntryUpstreamReuseEnum=_a;exports.MaterializationActionActionEnum=an;exports.MaterializationStatus=Ka;exports.MaterializationsApi=Te;exports.MaterializationsApiAxiosParamCreator=Ue;exports.MaterializationsApiFactory=en;exports.MaterializationsApiFp=F;exports.ModelEntitiesErrorKindEnum=$a;exports.ModelsApi=we;exports.ModelsApiAxiosParamCreator=fe;exports.ModelsApiFactory=tn;exports.ModelsApiFp=M;exports.NotebookCellKindEnum=Ja;exports.NotebookCellResultKindEnum=Xa;exports.NotebookCellResultTypeEnum=Za;exports.NotebookCellTypeEnum=Ya;exports.NotebooksApi=Me;exports.NotebooksApiAxiosParamCreator=Fe;exports.NotebooksApiFactory=nn;exports.NotebooksApiFp=q;exports.PALETTE=x;exports.PER_MODE_COLOR_KEYS=ue;exports.PackageArchiveStatusEnum=et;exports.PackageEmbeddingIndexReasonEnum=ot;exports.PackageEmbeddingIndexStageEnum=st;exports.PackageEmbeddingIndexStatusEnum=rt;exports.PackageManifestBindingStatusEnum=nt;exports.PackageQueryableSourcesEnum=tt;exports.PackageScopeEnum=at;exports.PackageServingStateArchiveStatusEnum=it;exports.PackageServingStateManifestBindingStatusEnum=ct;exports.PackageStatusEntryArchiveStatusEnum=lt;exports.PackageStatusEntryFieldsArchiveStatusEnum=ht;exports.PackageStatusEntryFieldsManifestBindingStatusEnum=ut;exports.PackageStatusEntryManifestBindingStatusEnum=mt;exports.PackageStatusEntryQueryableSourcesEnum=dt;exports.PackageStatusEntryScopeEnum=pt;exports.PackageVersionArchiveStatusEnum=gt;exports.PackageVersionUpdateArchiveStatusEnum=Pt;exports.PackageWarningsInnerSeverityEnum=St;exports.PackagesApi=De;exports.PackagesApiAxiosParamCreator=Be;exports.PackagesApiFactory=on;exports.PackagesApiFp=E;exports.PersistSourcePlanOriginEnum=vt;exports.PostgresConnectionSslmodeEnum=Vt;exports.PublisherApi=Le;exports.PublisherApiAxiosParamCreator=je;exports.PublisherApiFactory=sn;exports.PublisherApiFp=j;exports.QueryClass=bt;exports.QueryPathCandidateOutcomeEnum=kt;exports.QueryPathNearbyRelationshipEnum=At;exports.QueryPathTableKind=Ot;exports.QueryResultQueryRowLimitSourceEnum=yt;exports.QueryResultServedFromEnum=Ct;exports.RawNotebookFormatEnum=It;exports.Realization=xt;exports.RefusedSourceReasonEnum=Et;exports.RefusedSourceTierEnum=Rt;exports.ReportCellsFormatEnum=Ut;exports.ReportLayoutEnum=Nt;exports.ReportManifestLayoutEnum=Tt;exports.ReportTileKindEnum=ft;exports.ReportsApi=qe;exports.ReportsApiAxiosParamCreator=Qe;exports.ReportsApiFactory=cn;exports.ReportsApiFp=K;exports.RunContextTriggerEnum=wt;exports.S3ConnectionProviderEnum=Ft;exports.SURFACE_TINT=oa;exports.ServerProvider=An;exports.ServerStatusModelPageEnum=jt;exports.ServerStatusOperationalStateEnum=Mt;exports.ServerStatusPackageVersioningEnum=Bt;exports.ServerStatusVersionPromotionEnum=Dt;exports.SkillOriginEnum=Lt;exports.SkillSummaryOriginEnum=Qt;exports.SkillsApi=pn;exports.SkillsApiAxiosParamCreator=ze;exports.SkillsApiFactory=ln;exports.SkillsApiFp=$;exports.SkipReason=qt;exports.StorageDestinationsApi=mn;exports.StorageDestinationsApiAxiosParamCreator=He;exports.StorageDestinationsApiFactory=dn;exports.StorageDestinationsApiFp=z;exports.StorageServeBindingOriginEnum=zt;exports.StyledCard=ia;exports.StyledCardContent=ca;exports.StyledCardMedia=la;exports.StyledExplorerContent=ma;exports.StyledExplorerPage=da;exports.ThemeDefaultModeEnum=Ht;exports.ThemeProvider=Se;exports.VersionsApi=Ge;exports.VersionsApiAxiosParamCreator=_e;exports.VersionsApiFactory=hn;exports.VersionsApiFp=f;exports.WatchModeApi=Ke;exports.WatchModeApiAxiosParamCreator=We;exports.WatchModeApiFactory=un;exports.WatchModeApiFp=L;exports.accentFor=ee;exports.chartThemeLayer=ba;exports.contrastRatio=Pa;exports.globalQueryClient=Ye;exports.mergeUi=me;exports.resolveMode=ge;exports.resolveTheme=re;exports.usePublisherTheme=ka;exports.useServer=yn;