@marimo-team/islands 0.25.3-dev462 → 0.25.3-dev463
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ErrorBoundary-BnH_3-iX.js → ErrorBoundary-LEY4eR-u.js} +1 -1
- package/dist/assets/__vite-browser-external-DoIBUY2I.js +1 -0
- package/dist/assets/{worker-D70Lo75A.js → worker-DFvnFhLF.js} +2 -2
- package/dist/{chat-ui-Ci-OmyBN.js → chat-ui-Ow2U38zW.js} +3 -3
- package/dist/{code-visibility-9cVyvQDR.js → code-visibility-B6vd-MS9.js} +2 -2
- package/dist/{common-BFNJT3tG.js → common-CmFmwC3k.js} +3 -3
- package/dist/{data-grid-overlay-editor-CQpih6Vr.js → data-grid-overlay-editor-DLAyzP8s.js} +1 -1
- package/dist/{error-entries-DMWlemUn.js → error-entries-DEV4YOvI.js} +18 -22
- package/dist/{feedback-button-D_xvjRAC.js → feedback-button-ln7KZEYq.js} +3 -3
- package/dist/{glide-data-editor-ttA3lt4w.js → glide-data-editor-DwVqbx2W.js} +3 -3
- package/dist/{globals-DgHMWwtp.js → globals-DqKjaSau.js} +1 -1
- package/dist/{html-to-image-CDlYnllr.js → html-to-image-BdgBPfgg.js} +1 -1
- package/dist/main.js +4345 -4361
- package/dist/{number-overlay-editor-VuSNPGWk.js → number-overlay-editor-D9vaIlf5.js} +1 -1
- package/dist/{process-output-89n_C_pU.js → process-output-C_EHwiTn.js} +2 -2
- package/dist/{reveal-component-D63GuWKz.js → reveal-component-BrnL8w_N.js} +2 -2
- package/package.json +1 -1
- package/src/__mocks__/notebook.ts +6 -3
- package/src/core/cells/execution-console.ts +18 -13
- package/src/core/islands/__tests__/bridge.test.ts +8 -1
- package/src/core/islands/bridge.ts +7 -3
- package/src/core/notebook/replica/__tests__/executions.test.ts +8 -7
- package/src/core/notebook/replica/__tests__/replica.test.ts +3 -1
- package/src/core/notebook/replica/replica.ts +2 -8
- package/src/core/notebook/replica/resources/executions.ts +1 -6
- package/src/core/session/__tests__/backend.test.ts +1 -1
- package/src/core/session/__tests__/useNotebookSession.hook.test.tsx +8 -11
- package/src/stories/layout/vertical/one-column.stories.tsx +1 -2
- package/dist/assets/__vite-browser-external-DxDOnHRB.js +0 -1
|
@@ -148,7 +148,7 @@ function L(e) {
|
|
|
148
148
|
}
|
|
149
149
|
//#endregion
|
|
150
150
|
//#region src/components/editor/boundary/ErrorBoundary.tsx
|
|
151
|
-
var R = (0, T.lazy)(() => import("./feedback-button-
|
|
151
|
+
var R = (0, T.lazy)(() => import("./feedback-button-ln7KZEYq.js").then((e) => ({ default: e.FeedbackModal }))), z = (e) => {
|
|
152
152
|
let t = (0, w.c)(2), n;
|
|
153
153
|
return t[0] === e.children ? n = t[1] : (n = /* @__PURE__ */ (0, N.jsx)(O, {
|
|
154
154
|
FallbackComponent: B,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./worker-DFvnFhLF.js";var t=/* @__PURE__ */ e(((e,t)=>{t.exports={}}));export default t();
|
|
@@ -110,9 +110,9 @@ function Ea(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...w(n)})}//
|
|
|
110
110
|
function Da(e,t){let n=/* @__PURE__ */ Oa(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(He(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(He(r))}},e(t.value,t)),t);return n}// @__NO_SIDE_EFFECTS__
|
|
111
111
|
function Oa(e,t){let n=new M({check:`custom`,...w(t)});return n._zod.check=e,n}function ka(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&y(e,t,n[t]);return e}function Aa(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Ti,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:/* @__PURE__ */ new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function F(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function I(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,I(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&ka(o.schema,c),t.io===`input`&&L(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function ja(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function Ma(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=/* @__PURE__ */ new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${ja(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+ja(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
112
112
|
|
|
113
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0])a(n);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function Na(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;Na(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}const Pa=/* @__PURE__ */ new Set([`type`,`properties`,`required`,`additionalProperties`]),Fa=[`oneOf`,`anyOf`];function Ia(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function La(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!Pa.has(e))return null;t.push(n)}let n={},r=/* @__PURE__ */ new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??Ia(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}y(n,r,e.length===1?e[0]:La(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=Ia(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function Ra(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of Pa)if(t in e)return;let n=t.filter(e=>Fa.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=La(t);else{let e=n[0],i=Fa.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>La([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,ka(e,r))}function za(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):ka(i,s),ka(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())Na(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=/* @__PURE__ */ new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])Ra(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}ka(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,y(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:Va(t,`input`,e.processors),output:Va(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function L(e,t){let n=t??{seen:/* @__PURE__ */ new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return L(r.element,n);if(r.type===`set`)return L(r.valueType,n);if(r.type===`lazy`)return L(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return L(r.innerType,n);if(r.type===`intersection`)return L(r.left,n)||L(r.right,n);if(r.type===`record`||r.type===`map`)return L(r.keyType,n)||L(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:L(r.in,n)||L(r.out,n);if(r.type===`object`){for(let e in r.shape)if(L(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(L(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(L(e,n))return!0;return!!(r.rest&&L(r.rest,n))}return!1}const Ba=(e,t={})=>n=>{let r=Aa({...n,processors:t});return I(e,r),Ma(r,e),za(r,e)},Va=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Aa({...i??{},target:a,io:t,processors:n});return I(e,o),Ma(o,e),za(o,e)},Ha=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},Ua=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},Wa=(e,t)=>{Ha(e,`minimum`,t),Ua(e,`maximum`,t)},Ga=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},Ka=(e,t)=>{e.patterns??=/* @__PURE__ */ new Set,e.patterns.add(t)},qa=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},Ja=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},Ya=(e,t)=>Ha(e,`minimum`,t.minimum),Xa=(e,t)=>Ua(e,`maximum`,t.maximum),Za=e=>(t,n)=>{Ja(t,n.format);let[r,i]=e[n.format];Ha(t,`minimum`,r),Ua(t,`maximum`,i)},Qa={greater_than:(e,t)=>Ha(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>Ua(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>Ga(e,t.value),number_format:Za(Se),bigint_format:Za(Ce),min_length:Ya,max_length:Xa,length_equals:(e,t)=>Wa(e,t.length),min_size:Ya,max_size:Xa,size_equals:(e,t)=>Wa(e,t.size),string_format:(e,t)=>{Ja(e,t.format),t.pattern&&Ka(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>qa(e,t.mime)};function R(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)Qa[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&Ha(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&Ha(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&Ua(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&Ua(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&Ga(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&qa(t,i.mime);for(let e of i.patterns??[])Ka(t,e);return t}const $a={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},eo=/* @__PURE__ */ new Map([[dr,Yt],[pr,Xt]]),to=e=>eo.get(e)??e,no=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=R(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=$a[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(to);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},ro=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=R(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=/* @__PURE__ */ new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):F(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},io=(e,t,n,r)=>{n.type=`boolean`},ao=(e,t,n,r)=>{n.not={}},oo=(e,t,n,r)=>{let i=e._zod.def,a=_(i.entries);a.length===0?n.not={}:(a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a)},so=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(F(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(F(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},co=(e,t,n,r)=>{F(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},lo=(e,t,n,r)=>{F(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},uo=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=R(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=I(a.element,t,{...r,path:[...r.path,`items`]})};function fo(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?fo(t.out):t.type===`catch`?fo(t.innerType):e._zod.optin}const po=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&F(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)y(i.properties,e,I(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?fo(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=I(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},mo=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>I(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},ho=(e,t,n,r)=>{let i=e._zod.def,a=I(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=I(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)};function go(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=go(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>go(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i&&(p.type=`string`,a||(p.pattern=(r.includes(`number`)?cn:sn).source)),p}const _o=/* @__PURE__ */ new WeakMap;function vo(e){let t=/* @__PURE__ */ new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=/* @__PURE__ */ new Map;for(let r of _o.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=go(t,a,/* @__PURE__ */ new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}const yo=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=R(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=I(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)y(i.patternProperties,to(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=I(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=_o.get(t);n||(n=[],_o.set(t,n),t.deferred.push(()=>vo(t))),n.push(e)}i.additionalProperties=I(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&fo(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},bo=(e,t,n,r)=>{let i=e._zod.def,a=I(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},xo=(e,t,n,r)=>{let i=e._zod.def;I(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},So=Symbol();function Co(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(F(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),So):JSON.parse(o)}const wo=(e,t,n,r)=>{let i=e._zod.def;I(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=Co(i.defaultValue,e,t,n,r);o!==So&&(n.default=o)},To=(e,t,n,r)=>{let i=e._zod.def;I(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=Co(i.defaultValue,e,t,n,r);o!==So&&(n._prefault=o)},Eo=(e,t,n,r)=>{let i=e._zod.def;I(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{F(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},Do=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;I(o,t,r);let s=t.seen.get(e);s.ref=o},Oo=(e,t,n,r)=>{let i=e._zod.def;I(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},ko=(e,t,n,r)=>{let i=e._zod.def;I(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ao=/* @__PURE__ */ new WeakSet([Object.prototype,Error.prototype]);function jo(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}const z=/*@__PURE__*/ k(`ZodError`,(e,t)=>{ut.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);Ao.has(n)||(Ao.add(n),jo(n,`format`,e=>t=>pt(e,t)),jo(n,`flatten`,e=>t=>ft(e,t)),jo(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,te,2)}),jo(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,te,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),Mo=/* @__PURE__ */ ht(z),No=/* @__PURE__ */ gt(z),Po=/* @__PURE__ */ _t(z),Fo=/* @__PURE__ */ yt(z),Io=/* @__PURE__ */ Tt(z),Lo=/* @__PURE__ */ Et(z),Ro=/* @__PURE__ */ Dt(z),zo=/* @__PURE__ */ Ot(z),Bo=/* @__PURE__ */ kt(z),Vo=/* @__PURE__ */ At(z),Ho=/* @__PURE__ */ jt(z),Uo=/* @__PURE__ */ Mt(z);function Wo(){A.localeError||j(xi())}function Go(){A.memoizer||j({memoizer:vi()})}const B=/*@__PURE__*/ k(`ZodType`,(e,t)=>(Wo(),N.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(S(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return C(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(rc(e,t))},superRefine(e,t){return this.check(ic(e,t))},overwrite(e){return this.check(/* @__PURE__ */ ya(e))},optional(){return zs(this)},exactOptional(){return Vs(this)},nullable(){return Us(this)},nullish(){return zs(Us(this))},nonoptional(e){return Ys(this,e)},array(){return G(this)},or(e){return Os([this,e])},and(e){return As(this,e)},transform(e){return $s(this,Ls(e))},default(e){return Gs(this,e)},prefault(e){return qs(this,e)},catch(e){return Zs(this,e)},pipe(e){return $s(this,e)},readonly(){return tc(this)},describe(e){let t=this.clone();return Ti.add(t,{description:e}),t},meta(...e){if(e.length===0)return Ti.get(this);let t=this.clone();return Ti.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return We(this,`~standard`,{...Nn(this),jsonSchema:{input:Va(this,`input`),output:Va(this,`output`)}})},set"~standard"(e){D(this,`~standard`,e)},parse:function e(t,n){return Mo(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await No(this,t,n,{callee:e})},safeParse(e,t){return Po(this,e,t)},async safeParseAsync(e,t){return Fo(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){D(this,`spa`,e)},validate(e,t){return St(this,e,t)},validateAsync(e,t){return wt(this,e,t)},encode:function e(t,n){return Io(this,t,n,{callee:e})},decode:function e(t,n){return Lo(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await Ro(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await zo(this,t,n,{callee:e})},safeEncode(e,t){return Bo(this,e,t)},safeDecode(e,t){return Vo(this,e,t)},async safeEncodeAsync(e,t){return Ho(this,e,t)},async safeDecodeAsync(e,t){return Uo(this,e,t)},toJSONSchema(e){return Ba(this,{})(e)},get description(){return Ti.get(this)?.description},get _def(){return this._zod.def}}),Ko=/*@__PURE__*/ k(`_ZodString`,(e,t)=>{Pn.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>no(e,t,n,r)},/*@__PURE__*/ Ge({format:e=>R(e).format??null,minLength:e=>R(e).minimum??null,maxLength:e=>R(e).maximum??null},{regex(...e){return this.check(/* @__PURE__ */ pa(...e))},includes(...e){return this.check(/* @__PURE__ */ ga(...e))},startsWith(...e){return this.check(/* @__PURE__ */ _a(...e))},endsWith(...e){return this.check(/* @__PURE__ */ va(...e))},min(...e){return this.check(/* @__PURE__ */ da(...e))},max(...e){return this.check(/* @__PURE__ */ ua(...e))},length(...e){return this.check(/* @__PURE__ */ fa(...e))},nonempty(...e){return this.check(/* @__PURE__ */ da(1,...e))},lowercase(e){return this.check(/* @__PURE__ */ ma(e))},uppercase(e){return this.check(/* @__PURE__ */ ha(e))},trim(){return this.check(/* @__PURE__ */ xa())},normalize(...e){return this.check(/* @__PURE__ */ ba(...e))},toLowerCase(){return this.check(/* @__PURE__ */ Sa())},toUpperCase(){return this.check(/* @__PURE__ */ Ca())},slugify(){return this.check(/* @__PURE__ */ wa())}})),qo=/*@__PURE__*/ k(`ZodString`,(e,t)=>{Pn.init(e,t),Ko.init(e,t)},{email(e){return this.check(/* @__PURE__ */ Oi(Qo,e))},url(e){return this.check(/* @__PURE__ */ Pi(ts,e))},jwt(e){return this.check(/* @__PURE__ */ Yi(gs,e))},emoji(e){return this.check(/* @__PURE__ */ Fi(ns,e))},guid(e){return this.check(/* @__PURE__ */ ki($o,e))},uuid(e){return this.check(/* @__PURE__ */ Ai(es,e))},uuidv4(e){return this.check(/* @__PURE__ */ ji(es,e))},uuidv6(e){return this.check(/* @__PURE__ */ Mi(es,e))},uuidv7(e){return this.check(/* @__PURE__ */ Ni(es,e))},nanoid(e){return this.check(/* @__PURE__ */ Ii(rs,e))},cuid(e){return this.check(/* @__PURE__ */ Li(is,e))},cuid2(e){return this.check(/* @__PURE__ */ Ri(as,e))},ulid(e){return this.check(/* @__PURE__ */ zi(os,e))},base64(e){return this.check(/* @__PURE__ */ Ki(ps,e))},base64url(e){return this.check(/* @__PURE__ */ qi(ms,e))},xid(e){return this.check(/* @__PURE__ */ Bi(ss,e))},ksuid(e){return this.check(/* @__PURE__ */ Vi(cs,e))},ipv4(e){return this.check(/* @__PURE__ */ Hi(ls,e))},ipv6(e){return this.check(/* @__PURE__ */ Ui(us,e))},cidrv4(e){return this.check(/* @__PURE__ */ Wi(ds,e))},cidrv6(e){return this.check(/* @__PURE__ */ Gi(fs,e))},e164(e){return this.check(/* @__PURE__ */ Ji(hs,e))},datetime(e){return this.check(/* @__PURE__ */ Xi(Jo,e))},date(e){return this.check(/* @__PURE__ */ Zi(Yo,e))},time(e){return this.check(/* @__PURE__ */ Qi(Xo,e))},duration(e){return this.check(/* @__PURE__ */ $i(Zo,e))}});function V(e){return/* @__PURE__ */ Di(qo,e)}const H=/*@__PURE__*/ k(`ZodStringFormat`,(e,t)=>{P.init(e,t),Ko.init(e,t)}),Jo=/*@__PURE__*/ k(`ZodISODateTime`,(e,t)=>{$n.init(e,t),H.init(e,t)}),Yo=/*@__PURE__*/ k(`ZodISODate`,(e,t)=>{er.init(e,t),H.init(e,t)}),Xo=/*@__PURE__*/ k(`ZodISOTime`,(e,t)=>{tr.init(e,t),H.init(e,t)}),Zo=/*@__PURE__*/ k(`ZodISODuration`,(e,t)=>{nr.init(e,t),H.init(e,t)}),Qo=/*@__PURE__*/ k(`ZodEmail`,(e,t)=>{Ln.init(e,t),H.init(e,t)}),$o=/*@__PURE__*/ k(`ZodGUID`,(e,t)=>{Fn.init(e,t),H.init(e,t)}),es=/*@__PURE__*/ k(`ZodUUID`,(e,t)=>{In.init(e,t),H.init(e,t)}),ts=/*@__PURE__*/ k(`ZodURL`,(e,t)=>{Gn.init(e,t),H.init(e,t)}),ns=/*@__PURE__*/ k(`ZodEmoji`,(e,t)=>{Kn.init(e,t),H.init(e,t)}),rs=/*@__PURE__*/ k(`ZodNanoID`,(e,t)=>{qn.init(e,t),H.init(e,t)}),is=/*@__PURE__*/ k(`ZodCUID`,(e,t)=>{Jn.init(e,t),H.init(e,t)}),as=/*@__PURE__*/ k(`ZodCUID2`,(e,t)=>{Yn.init(e,t),H.init(e,t)}),os=/*@__PURE__*/ k(`ZodULID`,(e,t)=>{Xn.init(e,t),H.init(e,t)}),ss=/*@__PURE__*/ k(`ZodXID`,(e,t)=>{Zn.init(e,t),H.init(e,t)}),cs=/*@__PURE__*/ k(`ZodKSUID`,(e,t)=>{Qn.init(e,t),H.init(e,t)}),ls=/*@__PURE__*/ k(`ZodIPv4`,(e,t)=>{rr.init(e,t),H.init(e,t)}),us=/*@__PURE__*/ k(`ZodIPv6`,(e,t)=>{or.init(e,t),H.init(e,t)}),ds=/*@__PURE__*/ k(`ZodCIDRv4`,(e,t)=>{sr.init(e,t),H.init(e,t)}),fs=/*@__PURE__*/ k(`ZodCIDRv6`,(e,t)=>{lr.init(e,t),H.init(e,t)}),ps=/*@__PURE__*/ k(`ZodBase64`,(e,t)=>{fr.init(e,t),H.init(e,t)}),ms=/*@__PURE__*/ k(`ZodBase64URL`,(e,t)=>{hr.init(e,t),H.init(e,t)}),hs=/*@__PURE__*/ k(`ZodE164`,(e,t)=>{gr.init(e,t),H.init(e,t)}),gs=/*@__PURE__*/ k(`ZodJWT`,(e,t)=>{vr.init(e,t),H.init(e,t)}),_s=/*@__PURE__*/ k(`ZodNumber`,(e,t)=>{yr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ro(e,t,n,r),e.isFinite=!0},/*@__PURE__*/ Ge({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=R(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=R(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=R(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>R(e).format??null},{gt(e,t){return this.check(/* @__PURE__ */ sa(e,t))},gte(e,t){return this.check(/* @__PURE__ */ ca(e,t))},min(e,t){return this.check(/* @__PURE__ */ ca(e,t))},lt(e,t){return this.check(/* @__PURE__ */ aa(e,t))},lte(e,t){return this.check(/* @__PURE__ */ oa(e,t))},max(e,t){return this.check(/* @__PURE__ */ oa(e,t))},int(e){return this.check(ys(e))},safe(e){return this.check(ys(e))},positive(e){return this.check(/* @__PURE__ */ sa(0,e))},nonnegative(e){return this.check(/* @__PURE__ */ ca(0,e))},negative(e){return this.check(/* @__PURE__ */ aa(0,e))},nonpositive(e){return this.check(/* @__PURE__ */ oa(0,e))},multipleOf(e,t){return this.check(/* @__PURE__ */ la(e,t))},step(e,t){return this.check(/* @__PURE__ */ la(e,t))},finite(){return this}}));function U(e){return/* @__PURE__ */ ea(_s,e)}const vs=/*@__PURE__*/ k(`ZodNumberFormat`,(e,t)=>{br.init(e,t),_s.init(e,t)});function ys(e){return/* @__PURE__ */ ta(vs,e)}const bs=/*@__PURE__*/ k(`ZodBoolean`,(e,t)=>{xr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>io(e,t,n,r)});function W(e){return/* @__PURE__ */ na(bs,e)}const xs=/*@__PURE__*/ k(`ZodUnknown`,(e,t)=>{Sr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Ss(){return/* @__PURE__ */ ra(xs)}const Cs=/*@__PURE__*/ k(`ZodNever`,(e,t)=>{Cr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ao(e,t,n,r)});function ws(e){return/* @__PURE__ */ ia(Cs,e)}const Ts=/*@__PURE__*/ k(`ZodArray`,(e,t)=>{Go(),Dr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uo(e,t,n,r),e.element=t.element},{min(e,t){return this.check(/* @__PURE__ */ da(e,t))},nonempty(e){return this.check(/* @__PURE__ */ da(1,e))},max(e,t){return this.check(/* @__PURE__ */ ua(e,t))},length(e,t){return this.check(/* @__PURE__ */ fa(e,t))},unwrap(){return this.element}});function G(e,t){return/* @__PURE__ */ Ta(Ts,e,t)}const Es=/*@__PURE__*/ k(`ZodObject`,(e,t)=>{Go(),Nr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>po(e,t,n,r),Ze(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return J(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(S(this._zod.def,{catchall:e}))},passthrough(){return this.clone(S(this._zod.def,{catchall:Ss()}))},loose(){return this.clone(S(this._zod.def,{catchall:Ss()}))},strict(){return this.clone(S(this._zod.def,{catchall:ws()}))},strip(){return this.clone(S(this._zod.def,{catchall:void 0}))},extend(e){return De(this,e)},safeExtend(e){return ke(this,e)},merge(e){return Ae(this,e)},pick(e){return we(this,e)},omit(e){return Ee(this,e)},partial(...e){return je(Rs,this,e[0])},exactPartial(...e){return je(Bs,this,e[0],`exactPartial`)},required(...e){return Me(Js,this,e[0])}});function K(e,t){let n={type:`object`,shape:e??{},...w(t)};return new Es(n)}function q(e,t){return new Es({type:`object`,shape:e,catchall:Ss(),...w(t)})}const Ds=/*@__PURE__*/ k(`ZodUnion`,(e,t)=>{Fr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mo(e,t,n,r),e.options=t.options});function Os(e,t){return new Ds({type:`union`,options:e,...w(t)})}const ks=/*@__PURE__*/ k(`ZodIntersection`,(e,t)=>{Ir.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ho(e,t,n,r)});function As(e,t){return new ks({type:`intersection`,left:e,right:t})}const js=/*@__PURE__*/ k(`ZodRecord`,(e,t)=>{Go(),zr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yo(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function Ms(e,t,n){return!t||!t._zod?new js({type:`record`,keyType:V(),valueType:e,...w(t)}):new js({type:`record`,keyType:e,valueType:t,...w(n)})}const Ns=/*@__PURE__*/ k(`ZodEnum`,(e,t)=>{Br.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oo(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Ns({...t,checks:[],...w(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Ns({...t,checks:[],...w(r),entries:i})}});function J(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new Ns({type:`enum`,entries:n,...w(t)})}const Ps=/*@__PURE__*/ k(`ZodLiteral`,(e,t)=>{Vr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>so(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Fs(e,t){return new Ps({type:`literal`,values:Array.isArray(e)?e:[e],...w(t)})}const Is=/*@__PURE__*/ k(`ZodTransform`,(e,t)=>{Go(),Hr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lo(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new it(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(He(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(He(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Ls(e){return new Is({type:`transform`,transform:e})}const Rs=/*@__PURE__*/ k(`ZodOptional`,(e,t)=>{Wr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ko(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function zs(e){return new Rs({type:`optional`,innerType:e})}const Bs=/*@__PURE__*/ k(`ZodExactOptional`,(e,t)=>{Gr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ko(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Vs(e){return new Bs({type:`optional`,innerType:e})}const Hs=/*@__PURE__*/ k(`ZodNullable`,(e,t)=>{Kr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Us(e){return new Hs({type:`nullable`,innerType:e})}const Ws=/*@__PURE__*/ k(`ZodDefault`,(e,t)=>{qr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Gs(e,t){return new Ws({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():_e(t)}})}const Ks=/*@__PURE__*/ k(`ZodPrefault`,(e,t)=>{Yr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>To(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function qs(e,t){return new Ks({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():_e(t)}})}const Js=/*@__PURE__*/ k(`ZodNonOptional`,(e,t)=>{Xr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ys(e,t){return new Js({type:`nonoptional`,innerType:e,...w(t)})}const Xs=/*@__PURE__*/ k(`ZodCatch`,(e,t)=>{$r.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Eo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Zs(e,t){return new Xs({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:Qe(t)})}const Qs=/*@__PURE__*/ k(`ZodPipe`,(e,t)=>{ei.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Do(e,t,n,r),e.in=t.in,e.out=t.out});function $s(e,t){return new Qs({type:`pipe`,in:e,out:t})}const ec=/*@__PURE__*/ k(`ZodReadonly`,(e,t)=>{ni.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Oo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function tc(e){return new ec({type:`readonly`,innerType:e})}const nc=/*@__PURE__*/ k(`ZodCustom`,(e,t)=>{ii.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>co(e,t,n,r)});function rc(e,t={}){return/* @__PURE__ */ Ea(nc,e,t)}function ic(e,t){return/* @__PURE__ */ Da(e,t)}const ac=[`notebook`,`cell`,`document`,`attachment`,`runtime`,`run`,`execution`,`console`,`display`,`input`,`output`,`variable`,`marimo`];K({marimo:Ss()}),u.CLOSED,d.KERNEL_DISCONNECTED;function oc(e){return e}function sc(e,t){let n=e.map(e=>`"${e}"`).join(`, `);return/* @__PURE__ */ Error(`This RPC instance cannot ${t} because the transport did not provide one or more of these methods: ${n}`)}function cc(e={}){let t={};function n(e){t=e}let r={};function i(e){r.unregisterHandler&&r.unregisterHandler(),r=e,r.registerHandler?.(re)}let a;function o(e){a=typeof e==`function`?e:(t,n)=>{let r=e[t];if(r)return r(n);let i=e._;if(!i)throw Error(`The requested method has no handler: ${t}`);return i(t,n)}}let{maxRequestTime:s=1e3}=e;e.transport&&i(e.transport),e.requestHandler&&o(e.requestHandler),e._debugHooks&&n(e._debugHooks);let c=0;function l(){return c<=1e10?++c:c=0}let u=/* @__PURE__ */ new Map,d=/* @__PURE__ */ new Map;function f(e,...n){let i=n[0];return new Promise((n,a)=>{if(!r.send)throw sc([`send`],`make requests`);let o=l(),c={type:`request`,id:o,method:e,params:i};u.set(o,{resolve:n,reject:a}),s!==1/0&&d.set(o,setTimeout(()=>{d.delete(o),a(/* @__PURE__ */ Error(`RPC request timed out.`))},s)),t.onSend?.(c),r.send(c)})}let p=new Proxy(f,{get:(e,t,n)=>t in e?Reflect.get(e,t,n):e=>f(t,e)}),m=p;function h(e,...n){let i=n[0];if(!r.send)throw sc([`send`],`send messages`);let a={type:`message`,id:e,payload:i};t.onSend?.(a),r.send(a)}let ee=new Proxy(h,{get:(e,t,n)=>t in e?Reflect.get(e,t,n):e=>h(t,e)}),g=ee,_=/* @__PURE__ */ new Map,v=/* @__PURE__ */ new Set;function te(e,t){if(!r.registerHandler)throw sc([`registerHandler`],`register message listeners`);e===`*`?v.add(t):(_.has(e)||_.set(e,/* @__PURE__ */ new Set),_.get(e)?.add(t))}function ne(e,t){e===`*`?v.delete(t):(_.get(e)?.delete(t),_.get(e)?.size===0&&_.delete(e))}async function re(e){if(t.onReceive?.(e),!(`type`in e))throw Error(`Message does not contain a type.`);if(e.type===`request`){if(!r.send||!a)throw sc([`send`,`requestHandler`],`handle requests`);let{id:n,method:i,params:o}=e,s;try{s={type:`response`,id:n,success:!0,payload:await a(i,o)}}catch(e){if(!(e instanceof Error))throw e;s={type:`response`,id:n,success:!1,error:e.message}}t.onSend?.(s),r.send(s)}else if(e.type===`response`){let t=d.get(e.id);t!=null&&clearTimeout(t);let{resolve:n,reject:r}=u.get(e.id)??{};e.success?n?.(e.payload):r?.(Error(e.error))}else if(e.type===`message`){for(let t of v)t(e.id,e.payload);let t=_.get(e.id);if(!t)return;for(let n of t)n(e.payload)}else throw Error(`Unexpected RPC message type: ${e.type}`)}return{setTransport:i,setRequestHandler:o,request:p,requestProxy:m,send:ee,sendProxy:g,addMessageListener:te,removeMessageListener:ne,proxy:{send:g,request:m},_setDebugHooks:n}}function lc(e){return cc(e)}const uc=`[transport-id]`;function dc(e,t){let{transportId:n}=t;return n==null?e:{[uc]:n,data:e}}function fc(e,t){let{transportId:n,filter:r}=t,i=r?.();if(n!=null&&i!=null)throw Error("Cannot use both `transportId` and `filter` at the same time");let a=e;if(n){if(e[uc]!==n)return[!0];a=e.data}return i===!1?[!0]:[!1,a]}function pc(e,t={}){let{transportId:n,filter:r,remotePort:i}=t,a=e,o=i??e,s;return{send(e){o.postMessage(dc(e,{transportId:n}))},registerHandler(e){s=t=>{let i=t.data,[a,o]=fc(i,{transportId:n,filter:()=>r?.(t)});a||e(o)},a.addEventListener(`message`,s)},unregisterHandler(){s&&a.removeEventListener(`message`,s)}}}function mc(e){return pc(self,e)}const hc=/(^|\n)\s*(?:import\s+[^\n#]*\bduckdb\b|from\s+duckdb\b|[^\n#]*\bduckdb\s*\.)/;function gc(e,t){return e.includes(`mo.sql`)||hc.test(e)||t?.has(`duckdb`)===!0}var _c=Object.defineProperty,Y=(e,t)=>_c(e,`name`,{value:t,configurable:!0}),vc=(e=>typeof l<`u`?l:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof l<`u`?l:e)[t]}):e)(function(e){if(typeof l<`u`)return l.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)}),yc=(()=>{for(var e=/* @__PURE__ */ new Uint8Array(128),t=0;t<64;t++)e[t<26?t+65:t<52?t+71:t<62?t-4:t*4-205]=t;return t=>{for(var n=t.length,r=new Uint8Array((n-(t[n-1]==`=`)-(t[n-2]==`=`))*3/4|0),i=0,a=0;i<n;){var o=e[t.charCodeAt(i++)],s=e[t.charCodeAt(i++)],c=e[t.charCodeAt(i++)],l=e[t.charCodeAt(i++)];r[a++]=o<<2|s>>4,r[a++]=s<<4|c>>2,r[a++]=c<<6|l}return r}})();function bc(e){return!isNaN(parseFloat(e))&&isFinite(e)}Y(bc,`_isNumber`);function X(e){return e.charAt(0).toUpperCase()+e.substring(1)}Y(X,`_capitalize`);function xc(e){return function(){return this[e]}}Y(xc,`_getter`);var Sc=[`isConstructor`,`isEval`,`isNative`,`isToplevel`],Cc=[`columnNumber`,`lineNumber`],wc=[`fileName`,`functionName`,`source`],Tc=Sc.concat(Cc,wc,[`args`],[`evalOrigin`]);function Z(e){if(e)for(var t=0;t<Tc.length;t++)e[Tc[t]]!==void 0&&this[`set`+X(Tc[t])](e[Tc[t]])}for(Y(Z,`StackFrame`),Z.prototype={getArgs:Y(function(){return this.args},`getArgs`),setArgs:Y(function(e){if(Object.prototype.toString.call(e)!==`[object Array]`)throw TypeError(`Args must be an Array`);this.args=e},`setArgs`),getEvalOrigin:Y(function(){return this.evalOrigin},`getEvalOrigin`),setEvalOrigin:Y(function(e){if(e instanceof Z)this.evalOrigin=e;else if(e instanceof Object)this.evalOrigin=new Z(e);else throw TypeError(`Eval Origin must be an Object or StackFrame`)},`setEvalOrigin`),toString:Y(function(){var e=this.getFileName()||``,t=this.getLineNumber()||``,n=this.getColumnNumber()||``,r=this.getFunctionName()||``;return this.getIsEval()?e?`[eval] (`+e+`:`+t+`:`+n+`)`:`[eval]:`+t+`:`+n:r?r+` (`+e+`:`+t+`:`+n+`)`:e+`:`+t+`:`+n},`toString`)},Z.fromString=Y(function(e){var t=e.indexOf(`(`),n=e.lastIndexOf(`)`),r=e.substring(0,t),i=e.substring(t+1,n).split(`,`),a=e.substring(n+1);if(a.indexOf(`@`)===0)var o=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(a,``),s=o[1],c=o[2],l=o[3];return new Z({functionName:r,args:i||void 0,fileName:s,lineNumber:c||void 0,columnNumber:l||void 0})},`StackFrame$$fromString`),Ec=0;Ec<Sc.length;Ec++)Z.prototype[`get`+X(Sc[Ec])]=xc(Sc[Ec]),Z.prototype[`set`+X(Sc[Ec])]=function(e){return function(t){this[e]=!!t}}(Sc[Ec]);var Ec;for(Dc=0;Dc<Cc.length;Dc++)Z.prototype[`get`+X(Cc[Dc])]=xc(Cc[Dc]),Z.prototype[`set`+X(Cc[Dc])]=function(e){return function(t){if(!bc(t))throw TypeError(e+` must be a Number`);this[e]=Number(t)}}(Cc[Dc]);var Dc;for(Oc=0;Oc<wc.length;Oc++)Z.prototype[`get`+X(wc[Oc])]=xc(wc[Oc]),Z.prototype[`set`+X(wc[Oc])]=function(e){return function(t){this[e]=String(t)}}(wc[Oc]);var Oc,kc=Z;function Ac(){var e=/^\s*at .*(\S+:\d+|\(native\))/m,t=/^(eval@)?(\[native code])?$/;return{parse:Y(function(t){if(t.stack&&t.stack.match(e))return this.parseV8OrIE(t);if(t.stack)return this.parseFFOrSafari(t);throw Error(`Cannot parse given Error object`)},`ErrorStackParser$$parse`),extractLocation:Y(function(e){if(e.indexOf(`:`)===-1)return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,``));return[t[1],t[2]||void 0,t[3]||void 0]},`ErrorStackParser$$extractLocation`),parseV8OrIE:Y(function(t){return t.stack.split(`
|
|
113
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0])a(n);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function Na(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;Na(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}const Pa=/* @__PURE__ */ new Set([`type`,`properties`,`required`,`additionalProperties`]),Fa=[`oneOf`,`anyOf`];function Ia(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function La(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!Pa.has(e))return null;t.push(n)}let n={},r=/* @__PURE__ */ new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??Ia(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}y(n,r,e.length===1?e[0]:La(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=Ia(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function Ra(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of Pa)if(t in e)return;let n=t.filter(e=>Fa.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=La(t);else{let e=n[0],i=Fa.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>La([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,ka(e,r))}function za(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):ka(i,s),ka(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())Na(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=/* @__PURE__ */ new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])Ra(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}ka(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,y(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:Va(t,`input`,e.processors),output:Va(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function L(e,t){let n=t??{seen:/* @__PURE__ */ new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return L(r.element,n);if(r.type===`set`)return L(r.valueType,n);if(r.type===`lazy`)return L(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return L(r.innerType,n);if(r.type===`intersection`)return L(r.left,n)||L(r.right,n);if(r.type===`record`||r.type===`map`)return L(r.keyType,n)||L(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:L(r.in,n)||L(r.out,n);if(r.type===`object`){for(let e in r.shape)if(L(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(L(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(L(e,n))return!0;return!!(r.rest&&L(r.rest,n))}return!1}const Ba=(e,t={})=>n=>{let r=Aa({...n,processors:t});return I(e,r),Ma(r,e),za(r,e)},Va=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Aa({...i??{},target:a,io:t,processors:n});return I(e,o),Ma(o,e),za(o,e)},Ha=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},Ua=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},Wa=(e,t)=>{Ha(e,`minimum`,t),Ua(e,`maximum`,t)},Ga=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},Ka=(e,t)=>{e.patterns??=/* @__PURE__ */ new Set,e.patterns.add(t)},qa=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},Ja=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},Ya=(e,t)=>Ha(e,`minimum`,t.minimum),Xa=(e,t)=>Ua(e,`maximum`,t.maximum),Za=e=>(t,n)=>{Ja(t,n.format);let[r,i]=e[n.format];Ha(t,`minimum`,r),Ua(t,`maximum`,i)},Qa={greater_than:(e,t)=>Ha(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>Ua(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>Ga(e,t.value),number_format:Za(Se),bigint_format:Za(Ce),min_length:Ya,max_length:Xa,length_equals:(e,t)=>Wa(e,t.length),min_size:Ya,max_size:Xa,size_equals:(e,t)=>Wa(e,t.size),string_format:(e,t)=>{Ja(e,t.format),t.pattern&&Ka(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>qa(e,t.mime)};function R(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)Qa[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&Ha(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&Ha(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&Ua(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&Ua(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&Ga(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&qa(t,i.mime);for(let e of i.patterns??[])Ka(t,e);return t}const $a={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},eo=/* @__PURE__ */ new Map([[dr,Yt],[pr,Xt]]),to=e=>eo.get(e)??e,no=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=R(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=$a[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(to);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},ro=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=R(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=/* @__PURE__ */ new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):F(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},io=(e,t,n,r)=>{n.type=`boolean`},ao=(e,t,n,r)=>{n.not={}},oo=(e,t,n,r)=>{let i=e._zod.def,a=_(i.entries);a.length===0?n.not={}:(a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a)},so=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(F(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(F(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},co=(e,t,n,r)=>{F(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},lo=(e,t,n,r)=>{F(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},uo=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=R(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=I(a.element,t,{...r,path:[...r.path,`items`]})};function fo(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?fo(t.out):t.type===`catch`?fo(t.innerType):e._zod.optin}const po=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&F(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)y(i.properties,e,I(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?fo(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=I(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},mo=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>I(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},ho=(e,t,n,r)=>{let i=e._zod.def,a=I(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=I(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)};function go(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=go(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>go(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i&&(p.type=`string`,a||(p.pattern=(r.includes(`number`)?cn:sn).source)),p}const _o=/* @__PURE__ */ new WeakMap;function vo(e){let t=/* @__PURE__ */ new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=/* @__PURE__ */ new Map;for(let r of _o.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=go(t,a,/* @__PURE__ */ new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}const yo=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=R(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=I(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)y(i.patternProperties,to(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=I(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=_o.get(t);n||(n=[],_o.set(t,n),t.deferred.push(()=>vo(t))),n.push(e)}i.additionalProperties=I(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&fo(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},bo=(e,t,n,r)=>{let i=e._zod.def,a=I(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},xo=(e,t,n,r)=>{let i=e._zod.def;I(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},So=Symbol();function Co(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(F(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),So):JSON.parse(o)}const wo=(e,t,n,r)=>{let i=e._zod.def;I(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=Co(i.defaultValue,e,t,n,r);o!==So&&(n.default=o)},To=(e,t,n,r)=>{let i=e._zod.def;I(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=Co(i.defaultValue,e,t,n,r);o!==So&&(n._prefault=o)},Eo=(e,t,n,r)=>{let i=e._zod.def;I(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{F(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},Do=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;I(o,t,r);let s=t.seen.get(e);s.ref=o},Oo=(e,t,n,r)=>{let i=e._zod.def;I(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},ko=(e,t,n,r)=>{let i=e._zod.def;I(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ao=/* @__PURE__ */ new WeakSet([Object.prototype,Error.prototype]);function jo(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}const z=/*@__PURE__*/ k(`ZodError`,(e,t)=>{ut.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);Ao.has(n)||(Ao.add(n),jo(n,`format`,e=>t=>pt(e,t)),jo(n,`flatten`,e=>t=>ft(e,t)),jo(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,te,2)}),jo(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,te,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),Mo=/* @__PURE__ */ ht(z),No=/* @__PURE__ */ gt(z),Po=/* @__PURE__ */ _t(z),Fo=/* @__PURE__ */ yt(z),Io=/* @__PURE__ */ Tt(z),Lo=/* @__PURE__ */ Et(z),Ro=/* @__PURE__ */ Dt(z),zo=/* @__PURE__ */ Ot(z),Bo=/* @__PURE__ */ kt(z),Vo=/* @__PURE__ */ At(z),Ho=/* @__PURE__ */ jt(z),Uo=/* @__PURE__ */ Mt(z);function Wo(){A.localeError||j(xi())}function Go(){A.memoizer||j({memoizer:vi()})}const B=/*@__PURE__*/ k(`ZodType`,(e,t)=>(Wo(),N.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(S(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return C(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(rc(e,t))},superRefine(e,t){return this.check(ic(e,t))},overwrite(e){return this.check(/* @__PURE__ */ ya(e))},optional(){return zs(this)},exactOptional(){return Vs(this)},nullable(){return Us(this)},nullish(){return zs(Us(this))},nonoptional(e){return Ys(this,e)},array(){return G(this)},or(e){return Os([this,e])},and(e){return As(this,e)},transform(e){return $s(this,Ls(e))},default(e){return Gs(this,e)},prefault(e){return qs(this,e)},catch(e){return Zs(this,e)},pipe(e){return $s(this,e)},readonly(){return tc(this)},describe(e){let t=this.clone();return Ti.add(t,{description:e}),t},meta(...e){if(e.length===0)return Ti.get(this);let t=this.clone();return Ti.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return We(this,`~standard`,{...Nn(this),jsonSchema:{input:Va(this,`input`),output:Va(this,`output`)}})},set"~standard"(e){D(this,`~standard`,e)},parse:function e(t,n){return Mo(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await No(this,t,n,{callee:e})},safeParse(e,t){return Po(this,e,t)},async safeParseAsync(e,t){return Fo(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){D(this,`spa`,e)},validate(e,t){return St(this,e,t)},validateAsync(e,t){return wt(this,e,t)},encode:function e(t,n){return Io(this,t,n,{callee:e})},decode:function e(t,n){return Lo(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await Ro(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await zo(this,t,n,{callee:e})},safeEncode(e,t){return Bo(this,e,t)},safeDecode(e,t){return Vo(this,e,t)},async safeEncodeAsync(e,t){return Ho(this,e,t)},async safeDecodeAsync(e,t){return Uo(this,e,t)},toJSONSchema(e){return Ba(this,{})(e)},get description(){return Ti.get(this)?.description},get _def(){return this._zod.def}}),Ko=/*@__PURE__*/ k(`_ZodString`,(e,t)=>{Pn.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>no(e,t,n,r)},/*@__PURE__*/ Ge({format:e=>R(e).format??null,minLength:e=>R(e).minimum??null,maxLength:e=>R(e).maximum??null},{regex(...e){return this.check(/* @__PURE__ */ pa(...e))},includes(...e){return this.check(/* @__PURE__ */ ga(...e))},startsWith(...e){return this.check(/* @__PURE__ */ _a(...e))},endsWith(...e){return this.check(/* @__PURE__ */ va(...e))},min(...e){return this.check(/* @__PURE__ */ da(...e))},max(...e){return this.check(/* @__PURE__ */ ua(...e))},length(...e){return this.check(/* @__PURE__ */ fa(...e))},nonempty(...e){return this.check(/* @__PURE__ */ da(1,...e))},lowercase(e){return this.check(/* @__PURE__ */ ma(e))},uppercase(e){return this.check(/* @__PURE__ */ ha(e))},trim(){return this.check(/* @__PURE__ */ xa())},normalize(...e){return this.check(/* @__PURE__ */ ba(...e))},toLowerCase(){return this.check(/* @__PURE__ */ Sa())},toUpperCase(){return this.check(/* @__PURE__ */ Ca())},slugify(){return this.check(/* @__PURE__ */ wa())}})),qo=/*@__PURE__*/ k(`ZodString`,(e,t)=>{Pn.init(e,t),Ko.init(e,t)},{email(e){return this.check(/* @__PURE__ */ Oi(Qo,e))},url(e){return this.check(/* @__PURE__ */ Pi(ts,e))},jwt(e){return this.check(/* @__PURE__ */ Yi(gs,e))},emoji(e){return this.check(/* @__PURE__ */ Fi(ns,e))},guid(e){return this.check(/* @__PURE__ */ ki($o,e))},uuid(e){return this.check(/* @__PURE__ */ Ai(es,e))},uuidv4(e){return this.check(/* @__PURE__ */ ji(es,e))},uuidv6(e){return this.check(/* @__PURE__ */ Mi(es,e))},uuidv7(e){return this.check(/* @__PURE__ */ Ni(es,e))},nanoid(e){return this.check(/* @__PURE__ */ Ii(rs,e))},cuid(e){return this.check(/* @__PURE__ */ Li(is,e))},cuid2(e){return this.check(/* @__PURE__ */ Ri(as,e))},ulid(e){return this.check(/* @__PURE__ */ zi(os,e))},base64(e){return this.check(/* @__PURE__ */ Ki(ps,e))},base64url(e){return this.check(/* @__PURE__ */ qi(ms,e))},xid(e){return this.check(/* @__PURE__ */ Bi(ss,e))},ksuid(e){return this.check(/* @__PURE__ */ Vi(cs,e))},ipv4(e){return this.check(/* @__PURE__ */ Hi(ls,e))},ipv6(e){return this.check(/* @__PURE__ */ Ui(us,e))},cidrv4(e){return this.check(/* @__PURE__ */ Wi(ds,e))},cidrv6(e){return this.check(/* @__PURE__ */ Gi(fs,e))},e164(e){return this.check(/* @__PURE__ */ Ji(hs,e))},datetime(e){return this.check(/* @__PURE__ */ Xi(Jo,e))},date(e){return this.check(/* @__PURE__ */ Zi(Yo,e))},time(e){return this.check(/* @__PURE__ */ Qi(Xo,e))},duration(e){return this.check(/* @__PURE__ */ $i(Zo,e))}});function V(e){return/* @__PURE__ */ Di(qo,e)}const H=/*@__PURE__*/ k(`ZodStringFormat`,(e,t)=>{P.init(e,t),Ko.init(e,t)}),Jo=/*@__PURE__*/ k(`ZodISODateTime`,(e,t)=>{$n.init(e,t),H.init(e,t)}),Yo=/*@__PURE__*/ k(`ZodISODate`,(e,t)=>{er.init(e,t),H.init(e,t)}),Xo=/*@__PURE__*/ k(`ZodISOTime`,(e,t)=>{tr.init(e,t),H.init(e,t)}),Zo=/*@__PURE__*/ k(`ZodISODuration`,(e,t)=>{nr.init(e,t),H.init(e,t)}),Qo=/*@__PURE__*/ k(`ZodEmail`,(e,t)=>{Ln.init(e,t),H.init(e,t)}),$o=/*@__PURE__*/ k(`ZodGUID`,(e,t)=>{Fn.init(e,t),H.init(e,t)}),es=/*@__PURE__*/ k(`ZodUUID`,(e,t)=>{In.init(e,t),H.init(e,t)}),ts=/*@__PURE__*/ k(`ZodURL`,(e,t)=>{Gn.init(e,t),H.init(e,t)}),ns=/*@__PURE__*/ k(`ZodEmoji`,(e,t)=>{Kn.init(e,t),H.init(e,t)}),rs=/*@__PURE__*/ k(`ZodNanoID`,(e,t)=>{qn.init(e,t),H.init(e,t)}),is=/*@__PURE__*/ k(`ZodCUID`,(e,t)=>{Jn.init(e,t),H.init(e,t)}),as=/*@__PURE__*/ k(`ZodCUID2`,(e,t)=>{Yn.init(e,t),H.init(e,t)}),os=/*@__PURE__*/ k(`ZodULID`,(e,t)=>{Xn.init(e,t),H.init(e,t)}),ss=/*@__PURE__*/ k(`ZodXID`,(e,t)=>{Zn.init(e,t),H.init(e,t)}),cs=/*@__PURE__*/ k(`ZodKSUID`,(e,t)=>{Qn.init(e,t),H.init(e,t)}),ls=/*@__PURE__*/ k(`ZodIPv4`,(e,t)=>{rr.init(e,t),H.init(e,t)}),us=/*@__PURE__*/ k(`ZodIPv6`,(e,t)=>{or.init(e,t),H.init(e,t)}),ds=/*@__PURE__*/ k(`ZodCIDRv4`,(e,t)=>{sr.init(e,t),H.init(e,t)}),fs=/*@__PURE__*/ k(`ZodCIDRv6`,(e,t)=>{lr.init(e,t),H.init(e,t)}),ps=/*@__PURE__*/ k(`ZodBase64`,(e,t)=>{fr.init(e,t),H.init(e,t)}),ms=/*@__PURE__*/ k(`ZodBase64URL`,(e,t)=>{hr.init(e,t),H.init(e,t)}),hs=/*@__PURE__*/ k(`ZodE164`,(e,t)=>{gr.init(e,t),H.init(e,t)}),gs=/*@__PURE__*/ k(`ZodJWT`,(e,t)=>{vr.init(e,t),H.init(e,t)}),_s=/*@__PURE__*/ k(`ZodNumber`,(e,t)=>{yr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ro(e,t,n,r),e.isFinite=!0},/*@__PURE__*/ Ge({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=R(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=R(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=R(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>R(e).format??null},{gt(e,t){return this.check(/* @__PURE__ */ sa(e,t))},gte(e,t){return this.check(/* @__PURE__ */ ca(e,t))},min(e,t){return this.check(/* @__PURE__ */ ca(e,t))},lt(e,t){return this.check(/* @__PURE__ */ aa(e,t))},lte(e,t){return this.check(/* @__PURE__ */ oa(e,t))},max(e,t){return this.check(/* @__PURE__ */ oa(e,t))},int(e){return this.check(ys(e))},safe(e){return this.check(ys(e))},positive(e){return this.check(/* @__PURE__ */ sa(0,e))},nonnegative(e){return this.check(/* @__PURE__ */ ca(0,e))},negative(e){return this.check(/* @__PURE__ */ aa(0,e))},nonpositive(e){return this.check(/* @__PURE__ */ oa(0,e))},multipleOf(e,t){return this.check(/* @__PURE__ */ la(e,t))},step(e,t){return this.check(/* @__PURE__ */ la(e,t))},finite(){return this}}));function U(e){return/* @__PURE__ */ ea(_s,e)}const vs=/*@__PURE__*/ k(`ZodNumberFormat`,(e,t)=>{br.init(e,t),_s.init(e,t)});function ys(e){return/* @__PURE__ */ ta(vs,e)}const bs=/*@__PURE__*/ k(`ZodBoolean`,(e,t)=>{xr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>io(e,t,n,r)});function W(e){return/* @__PURE__ */ na(bs,e)}const xs=/*@__PURE__*/ k(`ZodUnknown`,(e,t)=>{Sr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Ss(){return/* @__PURE__ */ ra(xs)}const Cs=/*@__PURE__*/ k(`ZodNever`,(e,t)=>{Cr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ao(e,t,n,r)});function ws(e){return/* @__PURE__ */ ia(Cs,e)}const Ts=/*@__PURE__*/ k(`ZodArray`,(e,t)=>{Go(),Dr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uo(e,t,n,r),e.element=t.element},{min(e,t){return this.check(/* @__PURE__ */ da(e,t))},nonempty(e){return this.check(/* @__PURE__ */ da(1,e))},max(e,t){return this.check(/* @__PURE__ */ ua(e,t))},length(e,t){return this.check(/* @__PURE__ */ fa(e,t))},unwrap(){return this.element}});function G(e,t){return/* @__PURE__ */ Ta(Ts,e,t)}const Es=/*@__PURE__*/ k(`ZodObject`,(e,t)=>{Go(),Nr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>po(e,t,n,r),Ze(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return J(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(S(this._zod.def,{catchall:e}))},passthrough(){return this.clone(S(this._zod.def,{catchall:Ss()}))},loose(){return this.clone(S(this._zod.def,{catchall:Ss()}))},strict(){return this.clone(S(this._zod.def,{catchall:ws()}))},strip(){return this.clone(S(this._zod.def,{catchall:void 0}))},extend(e){return De(this,e)},safeExtend(e){return ke(this,e)},merge(e){return Ae(this,e)},pick(e){return we(this,e)},omit(e){return Ee(this,e)},partial(...e){return je(Rs,this,e[0])},exactPartial(...e){return je(Bs,this,e[0],`exactPartial`)},required(...e){return Me(Js,this,e[0])}});function K(e,t){let n={type:`object`,shape:e??{},...w(t)};return new Es(n)}function q(e,t){return new Es({type:`object`,shape:e,catchall:Ss(),...w(t)})}const Ds=/*@__PURE__*/ k(`ZodUnion`,(e,t)=>{Fr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mo(e,t,n,r),e.options=t.options});function Os(e,t){return new Ds({type:`union`,options:e,...w(t)})}const ks=/*@__PURE__*/ k(`ZodIntersection`,(e,t)=>{Ir.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ho(e,t,n,r)});function As(e,t){return new ks({type:`intersection`,left:e,right:t})}const js=/*@__PURE__*/ k(`ZodRecord`,(e,t)=>{Go(),zr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yo(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function Ms(e,t,n){return!t||!t._zod?new js({type:`record`,keyType:V(),valueType:e,...w(t)}):new js({type:`record`,keyType:e,valueType:t,...w(n)})}const Ns=/*@__PURE__*/ k(`ZodEnum`,(e,t)=>{Br.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oo(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Ns({...t,checks:[],...w(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Ns({...t,checks:[],...w(r),entries:i})}});function J(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new Ns({type:`enum`,entries:n,...w(t)})}const Ps=/*@__PURE__*/ k(`ZodLiteral`,(e,t)=>{Vr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>so(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Fs(e,t){return new Ps({type:`literal`,values:Array.isArray(e)?e:[e],...w(t)})}const Is=/*@__PURE__*/ k(`ZodTransform`,(e,t)=>{Go(),Hr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lo(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new it(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(He(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(He(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Ls(e){return new Is({type:`transform`,transform:e})}const Rs=/*@__PURE__*/ k(`ZodOptional`,(e,t)=>{Wr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ko(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function zs(e){return new Rs({type:`optional`,innerType:e})}const Bs=/*@__PURE__*/ k(`ZodExactOptional`,(e,t)=>{Gr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ko(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Vs(e){return new Bs({type:`optional`,innerType:e})}const Hs=/*@__PURE__*/ k(`ZodNullable`,(e,t)=>{Kr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Us(e){return new Hs({type:`nullable`,innerType:e})}const Ws=/*@__PURE__*/ k(`ZodDefault`,(e,t)=>{qr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Gs(e,t){return new Ws({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():_e(t)}})}const Ks=/*@__PURE__*/ k(`ZodPrefault`,(e,t)=>{Yr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>To(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function qs(e,t){return new Ks({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():_e(t)}})}const Js=/*@__PURE__*/ k(`ZodNonOptional`,(e,t)=>{Xr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ys(e,t){return new Js({type:`nonoptional`,innerType:e,...w(t)})}const Xs=/*@__PURE__*/ k(`ZodCatch`,(e,t)=>{$r.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Eo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Zs(e,t){return new Xs({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:Qe(t)})}const Qs=/*@__PURE__*/ k(`ZodPipe`,(e,t)=>{ei.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Do(e,t,n,r),e.in=t.in,e.out=t.out});function $s(e,t){return new Qs({type:`pipe`,in:e,out:t})}const ec=/*@__PURE__*/ k(`ZodReadonly`,(e,t)=>{ni.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Oo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function tc(e){return new ec({type:`readonly`,innerType:e})}const nc=/*@__PURE__*/ k(`ZodCustom`,(e,t)=>{ii.init(e,t),B.init(e,t),e._zod.processJSONSchema=(t,n,r)=>co(e,t,n,r)});function rc(e,t={}){return/* @__PURE__ */ Ea(nc,e,t)}function ic(e,t){return/* @__PURE__ */ Da(e,t)}const ac=[`notebook`,`cell`,`document`,`attachment`,`runtime`,`run`,`execution`,`console`,`input`,`output`,`variable`,`marimo`];K({marimo:Ss()}),u.CLOSED,d.KERNEL_DISCONNECTED;function oc(e){return e}function sc(e,t){let n=e.map(e=>`"${e}"`).join(`, `);return/* @__PURE__ */ Error(`This RPC instance cannot ${t} because the transport did not provide one or more of these methods: ${n}`)}function cc(e={}){let t={};function n(e){t=e}let r={};function i(e){r.unregisterHandler&&r.unregisterHandler(),r=e,r.registerHandler?.(re)}let a;function o(e){a=typeof e==`function`?e:(t,n)=>{let r=e[t];if(r)return r(n);let i=e._;if(!i)throw Error(`The requested method has no handler: ${t}`);return i(t,n)}}let{maxRequestTime:s=1e3}=e;e.transport&&i(e.transport),e.requestHandler&&o(e.requestHandler),e._debugHooks&&n(e._debugHooks);let c=0;function l(){return c<=1e10?++c:c=0}let u=/* @__PURE__ */ new Map,d=/* @__PURE__ */ new Map;function f(e,...n){let i=n[0];return new Promise((n,a)=>{if(!r.send)throw sc([`send`],`make requests`);let o=l(),c={type:`request`,id:o,method:e,params:i};u.set(o,{resolve:n,reject:a}),s!==1/0&&d.set(o,setTimeout(()=>{d.delete(o),a(/* @__PURE__ */ Error(`RPC request timed out.`))},s)),t.onSend?.(c),r.send(c)})}let p=new Proxy(f,{get:(e,t,n)=>t in e?Reflect.get(e,t,n):e=>f(t,e)}),m=p;function h(e,...n){let i=n[0];if(!r.send)throw sc([`send`],`send messages`);let a={type:`message`,id:e,payload:i};t.onSend?.(a),r.send(a)}let ee=new Proxy(h,{get:(e,t,n)=>t in e?Reflect.get(e,t,n):e=>h(t,e)}),g=ee,_=/* @__PURE__ */ new Map,v=/* @__PURE__ */ new Set;function te(e,t){if(!r.registerHandler)throw sc([`registerHandler`],`register message listeners`);e===`*`?v.add(t):(_.has(e)||_.set(e,/* @__PURE__ */ new Set),_.get(e)?.add(t))}function ne(e,t){e===`*`?v.delete(t):(_.get(e)?.delete(t),_.get(e)?.size===0&&_.delete(e))}async function re(e){if(t.onReceive?.(e),!(`type`in e))throw Error(`Message does not contain a type.`);if(e.type===`request`){if(!r.send||!a)throw sc([`send`,`requestHandler`],`handle requests`);let{id:n,method:i,params:o}=e,s;try{s={type:`response`,id:n,success:!0,payload:await a(i,o)}}catch(e){if(!(e instanceof Error))throw e;s={type:`response`,id:n,success:!1,error:e.message}}t.onSend?.(s),r.send(s)}else if(e.type===`response`){let t=d.get(e.id);t!=null&&clearTimeout(t);let{resolve:n,reject:r}=u.get(e.id)??{};e.success?n?.(e.payload):r?.(Error(e.error))}else if(e.type===`message`){for(let t of v)t(e.id,e.payload);let t=_.get(e.id);if(!t)return;for(let n of t)n(e.payload)}else throw Error(`Unexpected RPC message type: ${e.type}`)}return{setTransport:i,setRequestHandler:o,request:p,requestProxy:m,send:ee,sendProxy:g,addMessageListener:te,removeMessageListener:ne,proxy:{send:g,request:m},_setDebugHooks:n}}function lc(e){return cc(e)}const uc=`[transport-id]`;function dc(e,t){let{transportId:n}=t;return n==null?e:{[uc]:n,data:e}}function fc(e,t){let{transportId:n,filter:r}=t,i=r?.();if(n!=null&&i!=null)throw Error("Cannot use both `transportId` and `filter` at the same time");let a=e;if(n){if(e[uc]!==n)return[!0];a=e.data}return i===!1?[!0]:[!1,a]}function pc(e,t={}){let{transportId:n,filter:r,remotePort:i}=t,a=e,o=i??e,s;return{send(e){o.postMessage(dc(e,{transportId:n}))},registerHandler(e){s=t=>{let i=t.data,[a,o]=fc(i,{transportId:n,filter:()=>r?.(t)});a||e(o)},a.addEventListener(`message`,s)},unregisterHandler(){s&&a.removeEventListener(`message`,s)}}}function mc(e){return pc(self,e)}const hc=/(^|\n)\s*(?:import\s+[^\n#]*\bduckdb\b|from\s+duckdb\b|[^\n#]*\bduckdb\s*\.)/;function gc(e,t){return e.includes(`mo.sql`)||hc.test(e)||t?.has(`duckdb`)===!0}var _c=Object.defineProperty,Y=(e,t)=>_c(e,`name`,{value:t,configurable:!0}),vc=(e=>typeof l<`u`?l:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof l<`u`?l:e)[t]}):e)(function(e){if(typeof l<`u`)return l.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)}),yc=(()=>{for(var e=/* @__PURE__ */ new Uint8Array(128),t=0;t<64;t++)e[t<26?t+65:t<52?t+71:t<62?t-4:t*4-205]=t;return t=>{for(var n=t.length,r=new Uint8Array((n-(t[n-1]==`=`)-(t[n-2]==`=`))*3/4|0),i=0,a=0;i<n;){var o=e[t.charCodeAt(i++)],s=e[t.charCodeAt(i++)],c=e[t.charCodeAt(i++)],l=e[t.charCodeAt(i++)];r[a++]=o<<2|s>>4,r[a++]=s<<4|c>>2,r[a++]=c<<6|l}return r}})();function bc(e){return!isNaN(parseFloat(e))&&isFinite(e)}Y(bc,`_isNumber`);function X(e){return e.charAt(0).toUpperCase()+e.substring(1)}Y(X,`_capitalize`);function xc(e){return function(){return this[e]}}Y(xc,`_getter`);var Sc=[`isConstructor`,`isEval`,`isNative`,`isToplevel`],Cc=[`columnNumber`,`lineNumber`],wc=[`fileName`,`functionName`,`source`],Tc=Sc.concat(Cc,wc,[`args`],[`evalOrigin`]);function Z(e){if(e)for(var t=0;t<Tc.length;t++)e[Tc[t]]!==void 0&&this[`set`+X(Tc[t])](e[Tc[t]])}for(Y(Z,`StackFrame`),Z.prototype={getArgs:Y(function(){return this.args},`getArgs`),setArgs:Y(function(e){if(Object.prototype.toString.call(e)!==`[object Array]`)throw TypeError(`Args must be an Array`);this.args=e},`setArgs`),getEvalOrigin:Y(function(){return this.evalOrigin},`getEvalOrigin`),setEvalOrigin:Y(function(e){if(e instanceof Z)this.evalOrigin=e;else if(e instanceof Object)this.evalOrigin=new Z(e);else throw TypeError(`Eval Origin must be an Object or StackFrame`)},`setEvalOrigin`),toString:Y(function(){var e=this.getFileName()||``,t=this.getLineNumber()||``,n=this.getColumnNumber()||``,r=this.getFunctionName()||``;return this.getIsEval()?e?`[eval] (`+e+`:`+t+`:`+n+`)`:`[eval]:`+t+`:`+n:r?r+` (`+e+`:`+t+`:`+n+`)`:e+`:`+t+`:`+n},`toString`)},Z.fromString=Y(function(e){var t=e.indexOf(`(`),n=e.lastIndexOf(`)`),r=e.substring(0,t),i=e.substring(t+1,n).split(`,`),a=e.substring(n+1);if(a.indexOf(`@`)===0)var o=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(a,``),s=o[1],c=o[2],l=o[3];return new Z({functionName:r,args:i||void 0,fileName:s,lineNumber:c||void 0,columnNumber:l||void 0})},`StackFrame$$fromString`),Ec=0;Ec<Sc.length;Ec++)Z.prototype[`get`+X(Sc[Ec])]=xc(Sc[Ec]),Z.prototype[`set`+X(Sc[Ec])]=function(e){return function(t){this[e]=!!t}}(Sc[Ec]);var Ec;for(Dc=0;Dc<Cc.length;Dc++)Z.prototype[`get`+X(Cc[Dc])]=xc(Cc[Dc]),Z.prototype[`set`+X(Cc[Dc])]=function(e){return function(t){if(!bc(t))throw TypeError(e+` must be a Number`);this[e]=Number(t)}}(Cc[Dc]);var Dc;for(Oc=0;Oc<wc.length;Oc++)Z.prototype[`get`+X(wc[Oc])]=xc(wc[Oc]),Z.prototype[`set`+X(wc[Oc])]=function(e){return function(t){this[e]=String(t)}}(wc[Oc]);var Oc,kc=Z;function Ac(){var e=/^\s*at .*(\S+:\d+|\(native\))/m,t=/^(eval@)?(\[native code])?$/;return{parse:Y(function(t){if(t.stack&&t.stack.match(e))return this.parseV8OrIE(t);if(t.stack)return this.parseFFOrSafari(t);throw Error(`Cannot parse given Error object`)},`ErrorStackParser$$parse`),extractLocation:Y(function(e){if(e.indexOf(`:`)===-1)return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,``));return[t[1],t[2]||void 0,t[3]||void 0]},`ErrorStackParser$$extractLocation`),parseV8OrIE:Y(function(t){return t.stack.split(`
|
|
114
114
|
`).filter(function(t){return!!t.match(e)},this).map(function(e){e.indexOf(`(eval `)>-1&&(e=e.replace(/eval code/g,`eval`).replace(/(\(eval at [^()]*)|(,.*$)/g,``));var t=e.replace(/^\s+/,``).replace(/\(eval code/g,`(`).replace(/^.*?\s+/,``),n=t.match(/ (\(.+\)$)/);t=n?t.replace(n[0],``):t;var r=this.extractLocation(n?n[1]:t);return new kc({functionName:n&&t||void 0,fileName:[`eval`,`<anonymous>`].indexOf(r[0])>-1?void 0:r[0],lineNumber:r[1],columnNumber:r[2],source:e})},this)},`ErrorStackParser$$parseV8OrIE`),parseFFOrSafari:Y(function(e){return e.stack.split(`
|
|
115
|
-
`).filter(function(e){return!e.match(t)},this).map(function(e){if(e.indexOf(` > eval`)>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,`:$1`)),e.indexOf(`@`)===-1&&e.indexOf(`:`)===-1)return new kc({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),r=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(t,``));return new kc({functionName:r,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})},this)},`ErrorStackParser$$parseFFOrSafari`)}}Y(Ac,`ErrorStackParser`);var jc=new Ac;function Mc(){return typeof API<`u`&&API!==globalThis.API?API.runtimeEnv:Nc({IN_BUN:typeof Bun<`u`,IN_DENO:typeof Deno<`u`,IN_NODE:typeof process==`object`&&typeof process.versions==`object`&&typeof process.versions.node==`string`&&!process.browser,IN_SAFARI:typeof navigator==`object`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Chrome`)===-1&&navigator.userAgent.indexOf(`Safari`)>-1,IN_SHELL:typeof read==`function`&&typeof load==`function`,IN_WORKERD:typeof navigator==`object`&&navigator.userAgent?.includes(`Cloudflare-Workers`)})}Y(Mc,`getGlobalRuntimeEnv`);var Q=Mc();function Nc(e){let t=e.IN_NODE&&typeof module<`u`&&module.exports&&typeof vc==`function`&&typeof __dirname==`string`,n=e.IN_NODE&&!t,r=!e.IN_NODE&&!e.IN_DENO&&!e.IN_BUN,i=r&&typeof window<`u`&&typeof window.document<`u`&&typeof document.createElement==`function`&&`sessionStorage`in window&&typeof globalThis.importScripts!=`function`,a=r&&typeof globalThis.WorkerGlobalScope<`u`&&typeof globalThis.self<`u`&&globalThis.self instanceof globalThis.WorkerGlobalScope;if(a&&Pc())throw Error(`Classic web workers are not supported`);let o={...e,IN_BROWSER:r,IN_BROWSER_MAIN_THREAD:i,IN_BROWSER_WEB_WORKER:a,IN_NODE_COMMONJS:t,IN_NODE_ESM:n};if(!(o.IN_BROWSER_MAIN_THREAD||o.IN_BROWSER_WEB_WORKER||o.IN_NODE||o.IN_SHELL||o.IN_WORKERD))throw Error(`Cannot determine runtime environment: ${JSON.stringify(o)}`);return o}Y(Nc,`calculateDerivedFlags`);function Pc(){try{return globalThis.importScripts(`data:text/javascript,`),!0}catch{return!1}}Y(Pc,`isClassicWorker`);var Fc,Ic,Lc,Rc;async function zc(){if(!Q.IN_NODE||(Fc=(await import(`./__vite-browser-external-DxDOnHRB.js`).then(e=>/* @__PURE__ */ c(e.default,1))).default,Lc=await import(`./__vite-browser-external-DxDOnHRB.js`).then(e=>/* @__PURE__ */ c(e.default,1)),Rc=await import(`./__vite-browser-external-DxDOnHRB.js`).then(e=>/* @__PURE__ */ c(e.default,1)),(await import(`./__vite-browser-external-DxDOnHRB.js`).then(e=>/* @__PURE__ */ c(e.default,1))).default,Ic=await import(`./__vite-browser-external-DxDOnHRB.js`).then(e=>/* @__PURE__ */ c(e.default,1)),Uc=Ic.sep,typeof vc<`u`))return;let e={fs:Lc,crypto:await import(`./__vite-browser-external-DxDOnHRB.js`).then(e=>/* @__PURE__ */ c(e.default,1)),ws:await import(`./__vite-browser-external-DxDOnHRB.js`).then(e=>/* @__PURE__ */ c(e.default,1)),child_process:await import(`./__vite-browser-external-DxDOnHRB.js`).then(e=>/* @__PURE__ */ c(e.default,1))};globalThis.require=function(t){return e[t]}}Y(zc,`initNodeModules`);function Bc(e,t){return Ic.resolve(t||`.`,e)}Y(Bc,`node_resolvePath`);function Vc(e,t){return t===void 0&&(t=location),new URL(e,t).toString()}Y(Vc,`browser_resolvePath`);var Hc=Q.IN_NODE?Bc:Q.IN_SHELL?Y(e=>e,`resolvePath`):Vc,Uc;Q.IN_NODE||(Uc=`/`);function Wc(e,t){return e.startsWith(`file://`)&&(e=e.slice(7)),e.includes(`://`)?{response:fetch(e)}:{binary:Rc.readFile(e).then(e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}}Y(Wc,`node_getBinaryResponse`);function Gc(e,t){if(e.startsWith(`file://`)&&(e=e.slice(7)),e.includes(`://`))throw Error(`Shell cannot fetch urls`);return{binary:Promise.resolve(new Uint8Array(readbuffer(e)))}}Y(Gc,`shell_getBinaryResponse`);function Kc(e,t){let n=new URL(e,location);return{response:fetch(n,t?{integrity:t}:{})}}Y(Kc,`browser_getBinaryResponse`);var qc=Q.IN_NODE?Wc:Q.IN_SHELL?Gc:Kc;async function Jc(e,t){let{response:n,binary:r}=qc(e,t);if(r)return r;let i=await n;if(!i.ok)throw Error(`Failed to load '${e}': request failed.`);return new Uint8Array(await i.arrayBuffer())}Y(Jc,`loadBinaryFile`);var Yc=Q.IN_NODE?Xc:Y(async e=>await import(e),`loadScript`);async function Xc(e){return e.startsWith(`file://`)&&(e=e.slice(7)),e.includes(`://`)?await import(e):await import(Fc.pathToFileURL(e).href)}Y(Xc,`nodeLoadScript`);async function Zc(e){if(Q.IN_NODE){await zc();let t=await Rc.readFile(e,{encoding:`utf8`});return JSON.parse(t)}if(Q.IN_SHELL){let t=read(e);return JSON.parse(t)}return await(await fetch(e)).json()}Y(Zc,`loadLockFile`);async function Qc(){if(Q.IN_NODE_COMMONJS)return __dirname;let e;try{throw Error()}catch(t){e=t}let t=jc.parse(e)[0].fileName;if(Q.IN_NODE&&!t.startsWith(`file://`)&&(t=`file://${t}`),Q.IN_NODE_ESM){let e=await import(`./__vite-browser-external-DxDOnHRB.js`).then(e=>/* @__PURE__ */ c(e.default,1));return(await import(`./__vite-browser-external-DxDOnHRB.js`).then(e=>/* @__PURE__ */ c(e.default,1))).fileURLToPath(e.dirname(t))}let n=t.lastIndexOf(Uc);if(n===-1)throw Error(`Could not extract indexURL path from pyodide module location. Please pass the indexURL explicitly to loadPyodide.`);return t.slice(0,n)}Y(Qc,`calculateDirname`);function $c(e){return e.substring(0,e.lastIndexOf(`/`)+1)||globalThis.location?.toString()||`.`}Y($c,`calculateInstallBaseUrl`);function el(e){let t=e.FS,n=e.FS.filesystems.MEMFS,r=e.PATH,i={DIR_MODE:16895,FILE_MODE:33279,mount:Y(function(e){if(!e.opts.fileSystemHandle)throw Error(`opts.fileSystemHandle is required`);return n.mount.apply(null,arguments)},`mount`),syncfs:Y(async(e,t,n)=>{try{let r=i.getLocalSet(e),a=await i.getRemoteSet(e),o=t?a:r,s=t?r:a;await i.reconcile(e,o,s),n(null)}catch(e){n(e)}},`syncfs`),getLocalSet:Y(e=>{let n=Object.create(null);function i(e){return e!==`.`&&e!==`..`}Y(i,`isRealDir`);function a(e){return t=>r.join2(e,t)}Y(a,`toAbsolute`);let o=t.readdir(e.mountpoint).filter(i).map(a(e.mountpoint));for(;o.length;){let e=o.pop(),r=t.stat(e);t.isDir(r.mode)&&o.push.apply(o,t.readdir(e).filter(i).map(a(e))),n[e]={timestamp:r.mtime,mode:r.mode}}return{type:`local`,entries:n}},`getLocalSet`),getRemoteSet:Y(async e=>{let t=Object.create(null),n=await tl(e.opts.fileSystemHandle);for(let[a,o]of n)a!==`.`&&(t[r.join2(e.mountpoint,a)]={timestamp:o.kind===`file`?new Date((await o.getFile()).lastModified):/* @__PURE__ */ new Date,mode:o.kind===`file`?i.FILE_MODE:i.DIR_MODE});return{type:`remote`,entries:t,handles:n}},`getRemoteSet`),loadLocalEntry:Y(e=>{let r=t.lookupPath(e,{}).node,i=t.stat(e);if(t.isDir(i.mode))return{timestamp:i.mtime,mode:i.mode};if(t.isFile(i.mode))return r.contents=n.getFileDataAsTypedArray(r),{timestamp:i.mtime,mode:i.mode,contents:r.contents};throw Error(`node type not supported`)},`loadLocalEntry`),storeLocalEntry:Y((e,n)=>{if(t.isDir(n.mode))t.mkdirTree(e,n.mode);else if(t.isFile(n.mode))t.writeFile(e,n.contents,{canOwn:!0});else throw Error(`node type not supported`);t.chmod(e,n.mode),t.utime(e,n.timestamp,n.timestamp)},`storeLocalEntry`),removeLocalEntry:Y(e=>{var n=t.stat(e);t.isDir(n.mode)?t.rmdir(e):t.isFile(n.mode)&&t.unlink(e)},`removeLocalEntry`),loadRemoteEntry:Y(async e=>{if(e.kind===`file`){let t=await e.getFile();return{contents:new Uint8Array(await t.arrayBuffer()),mode:i.FILE_MODE,timestamp:new Date(t.lastModified)}}if(e.kind===`directory`)return{mode:i.DIR_MODE,timestamp:/* @__PURE__ */ new Date};throw Error(`unknown kind: `+e.kind)},`loadRemoteEntry`),storeRemoteEntry:Y(async(e,n,i)=>{let a=e.get(r.dirname(n)),o=t.isFile(i.mode)?await a.getFileHandle(r.basename(n),{create:!0}):await a.getDirectoryHandle(r.basename(n),{create:!0});if(o.kind===`file`){let e=await o.createWritable();await e.write(i.contents),await e.close()}e.set(n,o)},`storeRemoteEntry`),removeRemoteEntry:Y(async(e,t)=>{await e.get(r.dirname(t)).removeEntry(r.basename(t)),e.delete(t)},`removeRemoteEntry`),reconcile:Y(async(e,n,a)=>{let o=0,s=[];Object.keys(n.entries).forEach(function(e){let r=n.entries[e],i=a.entries[e];(!i||t.isFile(r.mode)&&r.timestamp.getTime()>i.timestamp.getTime())&&(s.push(e),o++)}),s.sort();let c=[];if(Object.keys(a.entries).forEach(function(e){n.entries[e]||(c.push(e),o++)}),c.sort().reverse(),!o)return;let l=n.type===`remote`?n.handles:a.handles;for(let t of s){let n=r.normalize(t.replace(e.mountpoint,`/`)).substring(1);if(a.type===`local`){let e=l.get(n),r=await i.loadRemoteEntry(e);i.storeLocalEntry(t,r)}else{let e=i.loadLocalEntry(t);await i.storeRemoteEntry(l,n,e)}}for(let t of c)if(a.type===`local`)i.removeLocalEntry(t);else{let n=r.normalize(t.replace(e.mountpoint,`/`)).substring(1);await i.removeRemoteEntry(l,n)}},`reconcile`)};e.FS.filesystems.NATIVEFS_ASYNC=i}Y(el,`initializeNativeFS`);var tl=Y(async e=>{let t=[];async function n(e){for await(let r of e.values())t.push(r),r.kind===`directory`&&await n(r)}Y(n,`collect`),await n(e);let r=/* @__PURE__ */ new Map;r.set(`.`,e);for(let n of t){let t=(await e.resolve(n)).join(`/`);r.set(t,n)}return r},`getFsHandles`),nl=yc(`AGFzbQEAAAABDANfAGAAAW9gAW8BfwMDAgECBygCE0pzdl9HZXRFcnJvcl9pbXBvcnQAAA5Kc3ZFcnJvcl9DaGVjawABChMCBwD7AQD7GwsJACAA+xr7FAAL`),rl=async function(){if(!(globalThis.navigator&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||navigator.platform===`MacIntel`&&typeof navigator.maxTouchPoints<`u`&&navigator.maxTouchPoints>1)))try{let e=await WebAssembly.compile(nl);return await WebAssembly.instantiate(e)}catch(e){if(e instanceof WebAssembly.CompileError)return;throw e}}();async function il(){let e=await rl;if(e)return e.exports;let t=Symbol(`error marker`);return{Jsv_GetError_import:Y(()=>t,`Jsv_GetError_import`),JsvError_Check:Y(e=>e===t,`JsvError_Check`)}}Y(il,`getJsvErrorImport`);function al(e){let t={config:e,runtimeEnv:Q},n={noImageDecoding:!0,noAudioDecoding:!0,noWasmDecoding:!1,preRun:dl(e),print:e.stdout,printErr:e.stderr,onExit(e){n.exitCode=e},thisProgram:e._sysExecutable,arguments:e.args,API:t,locateFile:Y(t=>e.indexURL+t,`locateFile`),instantiateWasm:fl(e.indexURL)};return n}Y(al,`createSettings`);function ol(e){return function(t){try{t.FS.mkdirTree(e)}catch(t){console.error(`Error occurred while making a home directory '${e}':`),console.error(t),console.error(`Using '/' for a home directory instead`),e=`/`}t.FS.chdir(e)}}Y(ol,`createHomeDirectory`);function sl(e){return function(t){Object.assign(t.ENV,e)}}Y(sl,`setEnvironment`);function cl(e){return e?[async t=>{t.addRunDependency(`fsInitHook`);try{await e(t.FS,{sitePackages:t.API.sitePackages})}finally{t.removeRunDependency(`fsInitHook`)}}]:[]}Y(cl,`callFsInitHook`);function ll(e){let t=e.HEAPU32[e._Py_Version>>>2];return[t>>>24&255,t>>>16&255,t>>>8&255]}Y(ll,`computeVersionTuple`);function ul(e){let t=Jc(e);return async e=>{e.API.pyVersionTuple=ll(e);let[n,r]=e.API.pyVersionTuple;e.FS.mkdirTree(`/lib`),e.API.sitePackages=`/lib/python${n}.${r}/site-packages`,e.FS.mkdirTree(e.API.sitePackages),e.addRunDependency(`install-stdlib`);try{let i=await t;e.FS.writeFile(`/lib/python${n}${r}.zip`,i)}catch(e){console.error(`Error occurred while installing the standard library:`),console.error(e)}finally{e.removeRunDependency(`install-stdlib`)}}}Y(ul,`installStdlib`);function dl(e){let t;return t=e.stdLibURL==null?e.indexURL+`python_stdlib.zip`:e.stdLibURL,[ul(t),ol(e.env.HOME),sl(e.env),el,...cl(e.fsInit)]}Y(dl,`getFileSystemInitializationFuncs`);function fl(e){if(typeof WasmOffsetConverter<`u`)return;let{binary:t,response:n}=qc(e+`pyodide.asm.wasm`),r=il();return function(e,i){return async function(){let{Jsv_GetError_import:a,JsvError_Check:o}=await r;e.env.Jsv_GetError_import=a,e.env.JsvError_Check=o;try{let r;r=n?await WebAssembly.instantiateStreaming(n,e):await WebAssembly.instantiate(await t,e);let{instance:a,module:o}=r;i(a,o)}catch(e){console.warn(`wasm instantiation failed!`),console.warn(e)}}(),{}}}Y(fl,`getInstantiateWasmFunc`);var pl=`314.0.0`;function ml(e){return e===void 0||e.endsWith(`/`)?e:e+`/`}Y(ml,`withTrailingSlash`);var hl=pl;async function gl(e={}){if(await zc(),e.lockFileContents&&e.lockFileURL)throw Error(`Can't pass both lockFileContents and lockFileURL`);let t=e.indexURL||await Qc();if(t=ml(Hc(t)),e.packageBaseUrl=ml(e.packageBaseUrl),e.cdnUrl=ml(e.packageBaseUrl??`https://cdn.jsdelivr.net/pyodide/v314.0.0/full/`),!e.lockFileContents){let n=e.lockFileURL??t+`pyodide-lock.json`;e.lockFileContents=Zc(n),e.packageBaseUrl??=$c(n)}e.indexURL=t,e.packageCacheDir&&=ml(Hc(e.packageCacheDir));let n={jsglobals:globalThis,stdin:globalThis.prompt?()=>globalThis.prompt():void 0,args:[],env:{},packages:[],packageCacheDir:e.packageBaseUrl,enableRunUntilComplete:!0,checkAPIVersion:!0,BUILD_ID:`2ff9f3fe6c88624a7e283d5651688da7f6169834ab51663b07be67c0bd43e53e`},r=Object.assign(n,e);return r.env.HOME??=`/home/pyodide`,r.env.PYTHONINSPECT??=`1`,r}Y(gl,`initializeConfiguration`);function _l(e){let t=al(e),n=t.API;return n.lockFilePromise=Promise.resolve(e.lockFileContents),t}Y(_l,`createEmscriptenSettings`);async function vl(e){return e.createPyodideModule?e.createPyodideModule:(await Yc(`${e.indexURL}pyodide.asm.mjs`)).default}Y(vl,`loadWasmScript`);async function yl(e,t){if(!e._loadSnapshot)return;let n=await e._loadSnapshot,r=ArrayBuffer.isView(n)?n:new Uint8Array(n);return t.noInitialRun=!0,t.INITIAL_MEMORY=r.length,r}Y(yl,`prepareSnapshot`);async function bl(e,t){let n=await e(t);if(t.exitCode!==void 0)throw new n.ExitStatus(t.exitCode);return n}Y(bl,`instantiatePyodideModule`);function xl(e,t){let n=e.API;if(t.pyproxyToStringRepr&&n.setPyProxyToStringMethod(!0),t.convertNullToNone&&n.setCompatNullToNone(!0),t.toJsLiteralMap&&n.setCompatToJsLiteralMap(!0),n.version!==`314.0.0`&&t.checkAPIVersion)throw Error(`Pyodide version does not match: '${hl}' <==> '${n.version}'. If you updated the Pyodide version, make sure you also updated the 'indexURL' parameter passed to loadPyodide.`);e.locateFile=e=>{throw e.endsWith(`.so`)?/* @__PURE__ */ Error(`Failed to find dynamic library "${e}"`):/* @__PURE__ */ Error(`Unexpected call to locateFile("${e}")`)}}Y(xl,`configureAPI`);function Sl(e,t,n){let r=e.API,i;return t&&(i=r.restoreSnapshot(t)),r.finalizeBootstrap(i,n._snapshotDeserializer)}Y(Sl,`bootstrapPyodide`);async function Cl(e,t){let n=e._api;return n.sys.path.insert(0,``),n._pyodide.set_excepthook(),await n.packageIndexReady,n.initializeStreams(t.stdin,t.stdout,t.stderr),e}Y(Cl,`finalizeSetup`);async function wl(e={}){let t=await gl(e),n=_l(t),r=await vl(t),i=await yl(t,n),a=await bl(r,n);return xl(a,t),await Cl(Sl(a,i,t),t)}Y(wl,`loadPyodide`);function Tl(e){return e.includes(`dev`),`v${hl}`}const El=K({detail:V()}),Dl=K({error:V()});function Ol(e){if(!e)return`Unknown error`;if(e instanceof Error){let t=El.safeParse(e.cause);return t.success?t.data.detail:kl(e.message)}if(typeof e==`object`){let t=El.safeParse(e);if(t.success)return t.data.detail;let n=Dl.safeParse(e);if(n.success)return n.data.error}try{return JSON.stringify(e)}catch{return String(e)}}function kl(e){let t=Al(e);if(!t)return e;let n=El.safeParse(t);if(n.success)return n.data.detail;let r=Dl.safeParse(t);return r.success?r.data.error:e}function Al(e){try{return JSON.parse(e)}catch{return e}}function jl(e,t){if(!e)throw Error(t)}const Ml=[`pip`,`uv`,`rye`,`poetry`,`pixi`],Nl=[`normal`,`compact`,`medium`,`full`,`columns`],Pl=[`auto`,`native`,`polars`,`lazy-polars`,`pandas`],Fl=[`html`,`markdown`,`ipynb`],Il=[`off`,`jedi`],Ll=[`manual`,`ask`,`agent`,`code_mode`],$=K({api_key:V().optional(),base_url:V().optional(),project:V().optional()}).loose(),Rl=K({chat_model:V().nullish().prefault(null),edit_model:V().nullish().prefault(null),autocomplete_model:V().nullish().prefault(null),displayed_models:G(V()).default([]),custom_models:G(V()).default([])}),zl=q({completion:K({activate_on_typing:W().prefault(!0),signature_hint_on_typing:W().prefault(!1),auto_close_pairs:W().prefault(!0),copilot:Os([W(),J([`github`,`custom`]),Fs(`codeium`).transform(()=>!1)]).prefault(!1).transform(e=>e===!0?`github`:e)}).prefault({}),save:q({autosave:J([`off`,`after_delay`]).prefault(`after_delay`),autosave_delay:U().nonnegative().transform(e=>Math.max(e,1e3)).prefault(1e3),format_on_save:W().prefault(!1)}).prefault({}),formatting:q({line_length:U().nonnegative().prefault(79).transform(e=>Math.min(e,1e3)),infer_types:J(Il).prefault(`off`)}).prefault({}),keymap:q({preset:J([`default`,`vim`]).prefault(`default`),overrides:Ms(V(),V()).prefault({}),destructive_delete:W().prefault(!0)}).prefault({}),runtime:q({auto_instantiate:W().prefault(!0),on_cell_change:J([`lazy`,`autorun`]).prefault(`autorun`),auto_reload:J([`off`,`lazy`,`autorun`]).prefault(`off`),reactive_tests:W().prefault(!0),watcher_on_save:J([`lazy`,`autorun`]).prefault(`lazy`),sql_default_limit:U().int().nullable().optional(),default_sql_output:J(Pl).prefault(`auto`),default_auto_download:G(J(Fl)).prefault([]),show_tracebacks:W().prefault(!1),pythonpath:G(V()).prefault([]),cache_cells:W().prefault(!1),pin_modules:W().prefault(!0),serve_cached_sessions_in_apps:W().prefault(!1)}).prefault({}),display:q({theme:J([`light`,`dark`,`system`]).prefault(`light`),code_editor_font_size:U().nonnegative().prefault(14),cell_output:J([`above`,`below`]).prefault(`below`),dataframes:J([`rich`,`plain`]).prefault(`rich`),default_table_page_size:U().prefault(10),default_table_max_columns:U().prefault(50),default_width:J(Nl).prefault(`medium`).transform(e=>e===`normal`?`compact`:e),locale:V().nullable().optional(),reference_highlighting:W().prefault(!0),code_lens:W().prefault(!0)}).prefault({}),package_management:q({manager:J(Ml).prefault(`pip`)}).prefault({}),ai:q({enabled:W().prefault(!0),rules:V().prefault(``),max_tokens:U().int().positive().nullable().prefault(null),mode:J(Ll).transform(e=>e===`manual`?`ask`:e).prefault(`ask`),inline_tooltip:W().prefault(!1),allow_provider_config:W().prefault(!0),open_ai:$.optional(),github:$.optional(),anthropic:$.optional(),google:$.optional(),ollama:$.optional(),openrouter:$.optional(),wandb:$.optional(),opencode_go:$.optional(),open_ai_compatible:$.optional(),azure:$.optional(),bedrock:q({region_name:V().optional(),profile_name:V().optional(),aws_access_key_id:V().optional(),aws_secret_access_key:V().optional()}).optional(),custom_providers:Ms(V(),$).prefault({}),models:Rl.prefault({displayed_models:[],custom_models:[]})}).prefault({}),experimental:q({markdown:W().optional(),isolate_apps:W().prefault(!1),debugger:W().prefault(!1),line_timing:W().prefault(!1),execution_type:J([`relaxed`,`strict`]).prefault(`relaxed`)}).prefault(()=>({})),server:q({host:V().optional(),port:U().int().min(0).max(65535).nullish(),proxy:V().nullish(),base_url:V().optional(),allow_origins:G(V()).optional(),headless:W().optional(),watch:W().optional(),skew_protection:W().optional(),timeout:U().nullish(),session_ttl:U().int().nullish(),token:W().optional(),token_password:V().nullish(),token_password_file:V().nullish(),include_code:W().optional(),redirect_console_to_browser:W().optional(),skip_update_check:W().optional(),session_cookie_secure:W().optional(),session_cookie_partitioned:W().optional(),session_secret:V().nullish().prefault(null),disable_file_downloads:W().prefault(!1),transport:J([`websocket`,`sse`]).optional()}).prefault(()=>({})),language_servers:q({pylsp:q({enabled:W().prefault(!1),enable_mypy:W().prefault(!0),enable_ruff:W().prefault(!0),enable_flake8:W().prefault(!1),enable_pydocstyle:W().prefault(!1),enable_pylint:W().prefault(!1),enable_pyflakes:W().prefault(!1)}).prefault({})}).prefault({}),snippets:q({custom_paths:G(V()).prefault([]),include_default_snippets:W().prefault(!0)}).prefault({}),diagnostics:q({enabled:W().optional(),sql_linter:W().prefault(!0)}).prefault(()=>({})),file_browser:q({folders:G(K({path:V(),name:V().nullish().prefault(null)})).prefault([])}).nullish().prefault(null),sharing:q({html:W().optional(),wasm:W().optional(),molab:W().optional()}).nullish().prefault(null),lint:q({select:G(V()).prefault([]),ignore:G(V()).prefault([])}).prefault({}),datasources:q({auto_discover_schemas:Os([W(),Fs(`auto`)]).optional(),auto_discover_tables:Os([W(),Fs(`auto`)]).optional(),auto_discover_columns:Os([W(),Fs(`auto`)]).optional()}).prefault({}),venv:q({path:V().nullable().prefault(null),writable:W().prefault(!1)}).prefault({}),cache:q({verification:J([`off`,`on`,`strict`]).prefault(`off`),store:Ss().prefault(null),loader:V().prefault(`lazy`)}).prefault({}),signing:q({trusted_signers:Ms(V(),V()).prefault({}),private_key_path:V().nullable().prefault(null)}).prefault({}),mcp:q({presets:G(J([`marimo`,`context7`])).prefault([]),mcpServers:Ms(V(),Ss()).prefault({})}).optional().prefault({})}).partial().prefault(()=>({completion:{},save:{},formatting:{},keymap:{},runtime:{},display:{},diagnostics:{},language_servers:{},snippets:{},file_browser:null,sharing:null,experimental:{},server:{},ai:{},package_management:{},mcp:{},cache:{},venv:{},signing:{},lint:{},datasources:{}})),Bl=V(),Vl=J(Pl).prefault(`auto`);K({width:J(Nl).prefault(`compact`).transform(e=>e===`normal`?`compact`:e),app_title:Bl.nullish(),css_file:V().nullish(),html_head_file:V().nullish(),auto_download:G(J(Fl)).prefault([]),sql_output:Vl}).prefault(()=>({width:`compact`,auto_download:[],sql_output:`auto`}));function Hl(){return zl.parse({completion:{},save:{},formatting:{},keymap:{},runtime:{},display:{},diagnostics:{},language_servers:{},snippets:{},file_browser:null,sharing:null,experimental:{},server:{},ai:{},package_management:{},mcp:{},cache:{},venv:{},signing:{},lint:{},datasources:{}})}function Ul(e){let t,n=!1;return function(...r){return n||(n=!0,t=e.apply(this,r)),t}}const Wl=e=>new TextDecoder().decode(e);function Gl(e){return e.FS}const Kl=`notebook.py`,ql=`/marimo`,Jl={NOTEBOOK_FILENAME:Kl,HOME_DIR:ql,createHomeDir:e=>{let t=Gl(e);try{t.mkdirTree(ql)}catch{}t.chdir(ql)},mountFS:e=>{globalThis.origin!==`null`&&Gl(e).mount(e.FS.filesystems.IDBFS,{root:`.`},ql)},populateFilesToMemory:async e=>{await Yl(e,!0)},persistFilesToRemote:async e=>{await Yl(e,!1)},readNotebook:e=>{let t=Gl(e),n=`${ql}/${Kl}`;return Wl(t.readFile(n))},initNotebookCode:e=>{let{pyodide:t,filename:n,code:r}=e,i=Gl(t),a=e=>{try{return Wl(i.readFile(e))}catch{return null}};if(n&&n!==Kl){let e=a(n);if(e)return{code:e,filename:n}}return i.writeFile(Kl,r),{code:r,filename:Kl}}};function Yl(e,t){return new Promise((n,r)=>{Gl(e).syncfs(t,e=>{e instanceof Error?r(e):n()})})}function Xl(){return`marimo-base`}const Zl=new class{spans=[];startSpan(e,t={}){let n={name:e,startTime:Date.now(),attributes:t,end:(e=`ok`)=>this.endSpan(n,e)};return this.spans.push(n),n}endSpan(e,t=`ok`){e.endTime=Date.now(),e.status=t}getSpans(){return this.spans}wrap(e,t,n={}){let r=this.startSpan(t||e.name,n);try{let t=e();return this.endSpan(r),t}catch(e){throw this.endSpan(r,`error`),e}}wrapAsync(e,t,n={}){return async(...r)=>{let i=this.startSpan(t||e.name,n);try{let t=await e(...r);return this.endSpan(i),t}catch(e){throw this.endSpan(i,`error`),e}}}logSpans(){}};globalThis.t=Zl;function Ql(e){return e.trim().split(/[[<>=!~;@\s]/)[0]}var $l=class{pyodide=null;packageLoadQueue=Promise.resolve();sessionGeneration=0;sessions=/* @__PURE__ */ new Set;get requirePyodide(){return jl(this.pyodide,`Pyodide not loaded`),this.pyodide}async bootstrap(e){return await this.loadPyodideAndPackages(e)}async loadPyodideAndPackages(e){if(!wl)throw Error(`loadPyodide is not defined`);let t=Zl.startSpan(`loadPyodide`);try{let n=e.pyodideIndexUrl??`https://cdn.jsdelivr.net/pyodide/${e.pyodideVersion}/full/`,r=await wl({packages:[`micropip`,`msgspec`,Xl(),`Markdown`,`pymdown-extensions`,`narwhals`,`packaging`],_makeSnapshot:!1,lockFileURL:e.pyodideLockfileUrl??`https://wasm.marimo.app/pyodide-lock.json?v=${e.version}&pyodide=${e.pyodideVersion}`,indexURL:n,packageBaseUrl:n,convertNullToNone:!0});if(e.pypiIndexUrl){let t=r.pyimport(`micropip`);try{t.set_index_urls(e.pypiIndexUrl)}finally{t.destroy()}}return this.pyodide=r,t.end(`ok`),r}catch(e){throw g.error(`Failed to load Pyodide`,e),e}}async mountFilesystem(e){let t=Zl.startSpan(`mountFilesystem`);return Jl.createHomeDir(this.requirePyodide),Jl.mountFS(this.requirePyodide),await Jl.populateFilesToMemory(this.requirePyodide),t.end(`ok`),Jl.initNotebookCode({pyodide:this.requirePyodide,code:e.code,filename:e.filename})}async prepareSession(e){let t=this.sessionGeneration,{code:n,filename:r,queryParameters:i,userConfig:a}=e;self.query_params=i,self.user_config=a;let o=Zl.startSpan(`prepareSession.runPython`),s=r||Jl.NOTEBOOK_FILENAME,c=this.requirePyodide.runPython(`
|
|
115
|
+
`).filter(function(e){return!e.match(t)},this).map(function(e){if(e.indexOf(` > eval`)>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,`:$1`)),e.indexOf(`@`)===-1&&e.indexOf(`:`)===-1)return new kc({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),r=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(t,``));return new kc({functionName:r,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})},this)},`ErrorStackParser$$parseFFOrSafari`)}}Y(Ac,`ErrorStackParser`);var jc=new Ac;function Mc(){return typeof API<`u`&&API!==globalThis.API?API.runtimeEnv:Nc({IN_BUN:typeof Bun<`u`,IN_DENO:typeof Deno<`u`,IN_NODE:typeof process==`object`&&typeof process.versions==`object`&&typeof process.versions.node==`string`&&!process.browser,IN_SAFARI:typeof navigator==`object`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Chrome`)===-1&&navigator.userAgent.indexOf(`Safari`)>-1,IN_SHELL:typeof read==`function`&&typeof load==`function`,IN_WORKERD:typeof navigator==`object`&&navigator.userAgent?.includes(`Cloudflare-Workers`)})}Y(Mc,`getGlobalRuntimeEnv`);var Q=Mc();function Nc(e){let t=e.IN_NODE&&typeof module<`u`&&module.exports&&typeof vc==`function`&&typeof __dirname==`string`,n=e.IN_NODE&&!t,r=!e.IN_NODE&&!e.IN_DENO&&!e.IN_BUN,i=r&&typeof window<`u`&&typeof window.document<`u`&&typeof document.createElement==`function`&&`sessionStorage`in window&&typeof globalThis.importScripts!=`function`,a=r&&typeof globalThis.WorkerGlobalScope<`u`&&typeof globalThis.self<`u`&&globalThis.self instanceof globalThis.WorkerGlobalScope;if(a&&Pc())throw Error(`Classic web workers are not supported`);let o={...e,IN_BROWSER:r,IN_BROWSER_MAIN_THREAD:i,IN_BROWSER_WEB_WORKER:a,IN_NODE_COMMONJS:t,IN_NODE_ESM:n};if(!(o.IN_BROWSER_MAIN_THREAD||o.IN_BROWSER_WEB_WORKER||o.IN_NODE||o.IN_SHELL||o.IN_WORKERD))throw Error(`Cannot determine runtime environment: ${JSON.stringify(o)}`);return o}Y(Nc,`calculateDerivedFlags`);function Pc(){try{return globalThis.importScripts(`data:text/javascript,`),!0}catch{return!1}}Y(Pc,`isClassicWorker`);var Fc,Ic,Lc,Rc;async function zc(){if(!Q.IN_NODE||(Fc=(await import(`./__vite-browser-external-DoIBUY2I.js`).then(e=>/* @__PURE__ */ c(e.default,1))).default,Lc=await import(`./__vite-browser-external-DoIBUY2I.js`).then(e=>/* @__PURE__ */ c(e.default,1)),Rc=await import(`./__vite-browser-external-DoIBUY2I.js`).then(e=>/* @__PURE__ */ c(e.default,1)),(await import(`./__vite-browser-external-DoIBUY2I.js`).then(e=>/* @__PURE__ */ c(e.default,1))).default,Ic=await import(`./__vite-browser-external-DoIBUY2I.js`).then(e=>/* @__PURE__ */ c(e.default,1)),Uc=Ic.sep,typeof vc<`u`))return;let e={fs:Lc,crypto:await import(`./__vite-browser-external-DoIBUY2I.js`).then(e=>/* @__PURE__ */ c(e.default,1)),ws:await import(`./__vite-browser-external-DoIBUY2I.js`).then(e=>/* @__PURE__ */ c(e.default,1)),child_process:await import(`./__vite-browser-external-DoIBUY2I.js`).then(e=>/* @__PURE__ */ c(e.default,1))};globalThis.require=function(t){return e[t]}}Y(zc,`initNodeModules`);function Bc(e,t){return Ic.resolve(t||`.`,e)}Y(Bc,`node_resolvePath`);function Vc(e,t){return t===void 0&&(t=location),new URL(e,t).toString()}Y(Vc,`browser_resolvePath`);var Hc=Q.IN_NODE?Bc:Q.IN_SHELL?Y(e=>e,`resolvePath`):Vc,Uc;Q.IN_NODE||(Uc=`/`);function Wc(e,t){return e.startsWith(`file://`)&&(e=e.slice(7)),e.includes(`://`)?{response:fetch(e)}:{binary:Rc.readFile(e).then(e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}}Y(Wc,`node_getBinaryResponse`);function Gc(e,t){if(e.startsWith(`file://`)&&(e=e.slice(7)),e.includes(`://`))throw Error(`Shell cannot fetch urls`);return{binary:Promise.resolve(new Uint8Array(readbuffer(e)))}}Y(Gc,`shell_getBinaryResponse`);function Kc(e,t){let n=new URL(e,location);return{response:fetch(n,t?{integrity:t}:{})}}Y(Kc,`browser_getBinaryResponse`);var qc=Q.IN_NODE?Wc:Q.IN_SHELL?Gc:Kc;async function Jc(e,t){let{response:n,binary:r}=qc(e,t);if(r)return r;let i=await n;if(!i.ok)throw Error(`Failed to load '${e}': request failed.`);return new Uint8Array(await i.arrayBuffer())}Y(Jc,`loadBinaryFile`);var Yc=Q.IN_NODE?Xc:Y(async e=>await import(e),`loadScript`);async function Xc(e){return e.startsWith(`file://`)&&(e=e.slice(7)),e.includes(`://`)?await import(e):await import(Fc.pathToFileURL(e).href)}Y(Xc,`nodeLoadScript`);async function Zc(e){if(Q.IN_NODE){await zc();let t=await Rc.readFile(e,{encoding:`utf8`});return JSON.parse(t)}if(Q.IN_SHELL){let t=read(e);return JSON.parse(t)}return await(await fetch(e)).json()}Y(Zc,`loadLockFile`);async function Qc(){if(Q.IN_NODE_COMMONJS)return __dirname;let e;try{throw Error()}catch(t){e=t}let t=jc.parse(e)[0].fileName;if(Q.IN_NODE&&!t.startsWith(`file://`)&&(t=`file://${t}`),Q.IN_NODE_ESM){let e=await import(`./__vite-browser-external-DoIBUY2I.js`).then(e=>/* @__PURE__ */ c(e.default,1));return(await import(`./__vite-browser-external-DoIBUY2I.js`).then(e=>/* @__PURE__ */ c(e.default,1))).fileURLToPath(e.dirname(t))}let n=t.lastIndexOf(Uc);if(n===-1)throw Error(`Could not extract indexURL path from pyodide module location. Please pass the indexURL explicitly to loadPyodide.`);return t.slice(0,n)}Y(Qc,`calculateDirname`);function $c(e){return e.substring(0,e.lastIndexOf(`/`)+1)||globalThis.location?.toString()||`.`}Y($c,`calculateInstallBaseUrl`);function el(e){let t=e.FS,n=e.FS.filesystems.MEMFS,r=e.PATH,i={DIR_MODE:16895,FILE_MODE:33279,mount:Y(function(e){if(!e.opts.fileSystemHandle)throw Error(`opts.fileSystemHandle is required`);return n.mount.apply(null,arguments)},`mount`),syncfs:Y(async(e,t,n)=>{try{let r=i.getLocalSet(e),a=await i.getRemoteSet(e),o=t?a:r,s=t?r:a;await i.reconcile(e,o,s),n(null)}catch(e){n(e)}},`syncfs`),getLocalSet:Y(e=>{let n=Object.create(null);function i(e){return e!==`.`&&e!==`..`}Y(i,`isRealDir`);function a(e){return t=>r.join2(e,t)}Y(a,`toAbsolute`);let o=t.readdir(e.mountpoint).filter(i).map(a(e.mountpoint));for(;o.length;){let e=o.pop(),r=t.stat(e);t.isDir(r.mode)&&o.push.apply(o,t.readdir(e).filter(i).map(a(e))),n[e]={timestamp:r.mtime,mode:r.mode}}return{type:`local`,entries:n}},`getLocalSet`),getRemoteSet:Y(async e=>{let t=Object.create(null),n=await tl(e.opts.fileSystemHandle);for(let[a,o]of n)a!==`.`&&(t[r.join2(e.mountpoint,a)]={timestamp:o.kind===`file`?new Date((await o.getFile()).lastModified):/* @__PURE__ */ new Date,mode:o.kind===`file`?i.FILE_MODE:i.DIR_MODE});return{type:`remote`,entries:t,handles:n}},`getRemoteSet`),loadLocalEntry:Y(e=>{let r=t.lookupPath(e,{}).node,i=t.stat(e);if(t.isDir(i.mode))return{timestamp:i.mtime,mode:i.mode};if(t.isFile(i.mode))return r.contents=n.getFileDataAsTypedArray(r),{timestamp:i.mtime,mode:i.mode,contents:r.contents};throw Error(`node type not supported`)},`loadLocalEntry`),storeLocalEntry:Y((e,n)=>{if(t.isDir(n.mode))t.mkdirTree(e,n.mode);else if(t.isFile(n.mode))t.writeFile(e,n.contents,{canOwn:!0});else throw Error(`node type not supported`);t.chmod(e,n.mode),t.utime(e,n.timestamp,n.timestamp)},`storeLocalEntry`),removeLocalEntry:Y(e=>{var n=t.stat(e);t.isDir(n.mode)?t.rmdir(e):t.isFile(n.mode)&&t.unlink(e)},`removeLocalEntry`),loadRemoteEntry:Y(async e=>{if(e.kind===`file`){let t=await e.getFile();return{contents:new Uint8Array(await t.arrayBuffer()),mode:i.FILE_MODE,timestamp:new Date(t.lastModified)}}if(e.kind===`directory`)return{mode:i.DIR_MODE,timestamp:/* @__PURE__ */ new Date};throw Error(`unknown kind: `+e.kind)},`loadRemoteEntry`),storeRemoteEntry:Y(async(e,n,i)=>{let a=e.get(r.dirname(n)),o=t.isFile(i.mode)?await a.getFileHandle(r.basename(n),{create:!0}):await a.getDirectoryHandle(r.basename(n),{create:!0});if(o.kind===`file`){let e=await o.createWritable();await e.write(i.contents),await e.close()}e.set(n,o)},`storeRemoteEntry`),removeRemoteEntry:Y(async(e,t)=>{await e.get(r.dirname(t)).removeEntry(r.basename(t)),e.delete(t)},`removeRemoteEntry`),reconcile:Y(async(e,n,a)=>{let o=0,s=[];Object.keys(n.entries).forEach(function(e){let r=n.entries[e],i=a.entries[e];(!i||t.isFile(r.mode)&&r.timestamp.getTime()>i.timestamp.getTime())&&(s.push(e),o++)}),s.sort();let c=[];if(Object.keys(a.entries).forEach(function(e){n.entries[e]||(c.push(e),o++)}),c.sort().reverse(),!o)return;let l=n.type===`remote`?n.handles:a.handles;for(let t of s){let n=r.normalize(t.replace(e.mountpoint,`/`)).substring(1);if(a.type===`local`){let e=l.get(n),r=await i.loadRemoteEntry(e);i.storeLocalEntry(t,r)}else{let e=i.loadLocalEntry(t);await i.storeRemoteEntry(l,n,e)}}for(let t of c)if(a.type===`local`)i.removeLocalEntry(t);else{let n=r.normalize(t.replace(e.mountpoint,`/`)).substring(1);await i.removeRemoteEntry(l,n)}},`reconcile`)};e.FS.filesystems.NATIVEFS_ASYNC=i}Y(el,`initializeNativeFS`);var tl=Y(async e=>{let t=[];async function n(e){for await(let r of e.values())t.push(r),r.kind===`directory`&&await n(r)}Y(n,`collect`),await n(e);let r=/* @__PURE__ */ new Map;r.set(`.`,e);for(let n of t){let t=(await e.resolve(n)).join(`/`);r.set(t,n)}return r},`getFsHandles`),nl=yc(`AGFzbQEAAAABDANfAGAAAW9gAW8BfwMDAgECBygCE0pzdl9HZXRFcnJvcl9pbXBvcnQAAA5Kc3ZFcnJvcl9DaGVjawABChMCBwD7AQD7GwsJACAA+xr7FAAL`),rl=async function(){if(!(globalThis.navigator&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||navigator.platform===`MacIntel`&&typeof navigator.maxTouchPoints<`u`&&navigator.maxTouchPoints>1)))try{let e=await WebAssembly.compile(nl);return await WebAssembly.instantiate(e)}catch(e){if(e instanceof WebAssembly.CompileError)return;throw e}}();async function il(){let e=await rl;if(e)return e.exports;let t=Symbol(`error marker`);return{Jsv_GetError_import:Y(()=>t,`Jsv_GetError_import`),JsvError_Check:Y(e=>e===t,`JsvError_Check`)}}Y(il,`getJsvErrorImport`);function al(e){let t={config:e,runtimeEnv:Q},n={noImageDecoding:!0,noAudioDecoding:!0,noWasmDecoding:!1,preRun:dl(e),print:e.stdout,printErr:e.stderr,onExit(e){n.exitCode=e},thisProgram:e._sysExecutable,arguments:e.args,API:t,locateFile:Y(t=>e.indexURL+t,`locateFile`),instantiateWasm:fl(e.indexURL)};return n}Y(al,`createSettings`);function ol(e){return function(t){try{t.FS.mkdirTree(e)}catch(t){console.error(`Error occurred while making a home directory '${e}':`),console.error(t),console.error(`Using '/' for a home directory instead`),e=`/`}t.FS.chdir(e)}}Y(ol,`createHomeDirectory`);function sl(e){return function(t){Object.assign(t.ENV,e)}}Y(sl,`setEnvironment`);function cl(e){return e?[async t=>{t.addRunDependency(`fsInitHook`);try{await e(t.FS,{sitePackages:t.API.sitePackages})}finally{t.removeRunDependency(`fsInitHook`)}}]:[]}Y(cl,`callFsInitHook`);function ll(e){let t=e.HEAPU32[e._Py_Version>>>2];return[t>>>24&255,t>>>16&255,t>>>8&255]}Y(ll,`computeVersionTuple`);function ul(e){let t=Jc(e);return async e=>{e.API.pyVersionTuple=ll(e);let[n,r]=e.API.pyVersionTuple;e.FS.mkdirTree(`/lib`),e.API.sitePackages=`/lib/python${n}.${r}/site-packages`,e.FS.mkdirTree(e.API.sitePackages),e.addRunDependency(`install-stdlib`);try{let i=await t;e.FS.writeFile(`/lib/python${n}${r}.zip`,i)}catch(e){console.error(`Error occurred while installing the standard library:`),console.error(e)}finally{e.removeRunDependency(`install-stdlib`)}}}Y(ul,`installStdlib`);function dl(e){let t;return t=e.stdLibURL==null?e.indexURL+`python_stdlib.zip`:e.stdLibURL,[ul(t),ol(e.env.HOME),sl(e.env),el,...cl(e.fsInit)]}Y(dl,`getFileSystemInitializationFuncs`);function fl(e){if(typeof WasmOffsetConverter<`u`)return;let{binary:t,response:n}=qc(e+`pyodide.asm.wasm`),r=il();return function(e,i){return async function(){let{Jsv_GetError_import:a,JsvError_Check:o}=await r;e.env.Jsv_GetError_import=a,e.env.JsvError_Check=o;try{let r;r=n?await WebAssembly.instantiateStreaming(n,e):await WebAssembly.instantiate(await t,e);let{instance:a,module:o}=r;i(a,o)}catch(e){console.warn(`wasm instantiation failed!`),console.warn(e)}}(),{}}}Y(fl,`getInstantiateWasmFunc`);var pl=`314.0.0`;function ml(e){return e===void 0||e.endsWith(`/`)?e:e+`/`}Y(ml,`withTrailingSlash`);var hl=pl;async function gl(e={}){if(await zc(),e.lockFileContents&&e.lockFileURL)throw Error(`Can't pass both lockFileContents and lockFileURL`);let t=e.indexURL||await Qc();if(t=ml(Hc(t)),e.packageBaseUrl=ml(e.packageBaseUrl),e.cdnUrl=ml(e.packageBaseUrl??`https://cdn.jsdelivr.net/pyodide/v314.0.0/full/`),!e.lockFileContents){let n=e.lockFileURL??t+`pyodide-lock.json`;e.lockFileContents=Zc(n),e.packageBaseUrl??=$c(n)}e.indexURL=t,e.packageCacheDir&&=ml(Hc(e.packageCacheDir));let n={jsglobals:globalThis,stdin:globalThis.prompt?()=>globalThis.prompt():void 0,args:[],env:{},packages:[],packageCacheDir:e.packageBaseUrl,enableRunUntilComplete:!0,checkAPIVersion:!0,BUILD_ID:`2ff9f3fe6c88624a7e283d5651688da7f6169834ab51663b07be67c0bd43e53e`},r=Object.assign(n,e);return r.env.HOME??=`/home/pyodide`,r.env.PYTHONINSPECT??=`1`,r}Y(gl,`initializeConfiguration`);function _l(e){let t=al(e),n=t.API;return n.lockFilePromise=Promise.resolve(e.lockFileContents),t}Y(_l,`createEmscriptenSettings`);async function vl(e){return e.createPyodideModule?e.createPyodideModule:(await Yc(`${e.indexURL}pyodide.asm.mjs`)).default}Y(vl,`loadWasmScript`);async function yl(e,t){if(!e._loadSnapshot)return;let n=await e._loadSnapshot,r=ArrayBuffer.isView(n)?n:new Uint8Array(n);return t.noInitialRun=!0,t.INITIAL_MEMORY=r.length,r}Y(yl,`prepareSnapshot`);async function bl(e,t){let n=await e(t);if(t.exitCode!==void 0)throw new n.ExitStatus(t.exitCode);return n}Y(bl,`instantiatePyodideModule`);function xl(e,t){let n=e.API;if(t.pyproxyToStringRepr&&n.setPyProxyToStringMethod(!0),t.convertNullToNone&&n.setCompatNullToNone(!0),t.toJsLiteralMap&&n.setCompatToJsLiteralMap(!0),n.version!==`314.0.0`&&t.checkAPIVersion)throw Error(`Pyodide version does not match: '${hl}' <==> '${n.version}'. If you updated the Pyodide version, make sure you also updated the 'indexURL' parameter passed to loadPyodide.`);e.locateFile=e=>{throw e.endsWith(`.so`)?/* @__PURE__ */ Error(`Failed to find dynamic library "${e}"`):/* @__PURE__ */ Error(`Unexpected call to locateFile("${e}")`)}}Y(xl,`configureAPI`);function Sl(e,t,n){let r=e.API,i;return t&&(i=r.restoreSnapshot(t)),r.finalizeBootstrap(i,n._snapshotDeserializer)}Y(Sl,`bootstrapPyodide`);async function Cl(e,t){let n=e._api;return n.sys.path.insert(0,``),n._pyodide.set_excepthook(),await n.packageIndexReady,n.initializeStreams(t.stdin,t.stdout,t.stderr),e}Y(Cl,`finalizeSetup`);async function wl(e={}){let t=await gl(e),n=_l(t),r=await vl(t),i=await yl(t,n),a=await bl(r,n);return xl(a,t),await Cl(Sl(a,i,t),t)}Y(wl,`loadPyodide`);function Tl(e){return e.includes(`dev`),`v${hl}`}const El=K({detail:V()}),Dl=K({error:V()});function Ol(e){if(!e)return`Unknown error`;if(e instanceof Error){let t=El.safeParse(e.cause);return t.success?t.data.detail:kl(e.message)}if(typeof e==`object`){let t=El.safeParse(e);if(t.success)return t.data.detail;let n=Dl.safeParse(e);if(n.success)return n.data.error}try{return JSON.stringify(e)}catch{return String(e)}}function kl(e){let t=Al(e);if(!t)return e;let n=El.safeParse(t);if(n.success)return n.data.detail;let r=Dl.safeParse(t);return r.success?r.data.error:e}function Al(e){try{return JSON.parse(e)}catch{return e}}function jl(e,t){if(!e)throw Error(t)}const Ml=[`pip`,`uv`,`rye`,`poetry`,`pixi`],Nl=[`normal`,`compact`,`medium`,`full`,`columns`],Pl=[`auto`,`native`,`polars`,`lazy-polars`,`pandas`],Fl=[`html`,`markdown`,`ipynb`],Il=[`off`,`jedi`],Ll=[`manual`,`ask`,`agent`,`code_mode`],$=K({api_key:V().optional(),base_url:V().optional(),project:V().optional()}).loose(),Rl=K({chat_model:V().nullish().prefault(null),edit_model:V().nullish().prefault(null),autocomplete_model:V().nullish().prefault(null),displayed_models:G(V()).default([]),custom_models:G(V()).default([])}),zl=q({completion:K({activate_on_typing:W().prefault(!0),signature_hint_on_typing:W().prefault(!1),auto_close_pairs:W().prefault(!0),copilot:Os([W(),J([`github`,`custom`]),Fs(`codeium`).transform(()=>!1)]).prefault(!1).transform(e=>e===!0?`github`:e)}).prefault({}),save:q({autosave:J([`off`,`after_delay`]).prefault(`after_delay`),autosave_delay:U().nonnegative().transform(e=>Math.max(e,1e3)).prefault(1e3),format_on_save:W().prefault(!1)}).prefault({}),formatting:q({line_length:U().nonnegative().prefault(79).transform(e=>Math.min(e,1e3)),infer_types:J(Il).prefault(`off`)}).prefault({}),keymap:q({preset:J([`default`,`vim`]).prefault(`default`),overrides:Ms(V(),V()).prefault({}),destructive_delete:W().prefault(!0)}).prefault({}),runtime:q({auto_instantiate:W().prefault(!0),on_cell_change:J([`lazy`,`autorun`]).prefault(`autorun`),auto_reload:J([`off`,`lazy`,`autorun`]).prefault(`off`),reactive_tests:W().prefault(!0),watcher_on_save:J([`lazy`,`autorun`]).prefault(`lazy`),sql_default_limit:U().int().nullable().optional(),default_sql_output:J(Pl).prefault(`auto`),default_auto_download:G(J(Fl)).prefault([]),show_tracebacks:W().prefault(!1),pythonpath:G(V()).prefault([]),cache_cells:W().prefault(!1),pin_modules:W().prefault(!0),serve_cached_sessions_in_apps:W().prefault(!1)}).prefault({}),display:q({theme:J([`light`,`dark`,`system`]).prefault(`light`),code_editor_font_size:U().nonnegative().prefault(14),cell_output:J([`above`,`below`]).prefault(`below`),dataframes:J([`rich`,`plain`]).prefault(`rich`),default_table_page_size:U().prefault(10),default_table_max_columns:U().prefault(50),default_width:J(Nl).prefault(`medium`).transform(e=>e===`normal`?`compact`:e),locale:V().nullable().optional(),reference_highlighting:W().prefault(!0),code_lens:W().prefault(!0)}).prefault({}),package_management:q({manager:J(Ml).prefault(`pip`)}).prefault({}),ai:q({enabled:W().prefault(!0),rules:V().prefault(``),max_tokens:U().int().positive().nullable().prefault(null),mode:J(Ll).transform(e=>e===`manual`?`ask`:e).prefault(`ask`),inline_tooltip:W().prefault(!1),allow_provider_config:W().prefault(!0),open_ai:$.optional(),github:$.optional(),anthropic:$.optional(),google:$.optional(),ollama:$.optional(),openrouter:$.optional(),wandb:$.optional(),opencode_go:$.optional(),open_ai_compatible:$.optional(),azure:$.optional(),bedrock:q({region_name:V().optional(),profile_name:V().optional(),aws_access_key_id:V().optional(),aws_secret_access_key:V().optional()}).optional(),custom_providers:Ms(V(),$).prefault({}),models:Rl.prefault({displayed_models:[],custom_models:[]})}).prefault({}),experimental:q({markdown:W().optional(),isolate_apps:W().prefault(!1),debugger:W().prefault(!1),line_timing:W().prefault(!1),execution_type:J([`relaxed`,`strict`]).prefault(`relaxed`)}).prefault(()=>({})),server:q({host:V().optional(),port:U().int().min(0).max(65535).nullish(),proxy:V().nullish(),base_url:V().optional(),allow_origins:G(V()).optional(),headless:W().optional(),watch:W().optional(),skew_protection:W().optional(),timeout:U().nullish(),session_ttl:U().int().nullish(),token:W().optional(),token_password:V().nullish(),token_password_file:V().nullish(),include_code:W().optional(),redirect_console_to_browser:W().optional(),skip_update_check:W().optional(),session_cookie_secure:W().optional(),session_cookie_partitioned:W().optional(),session_secret:V().nullish().prefault(null),disable_file_downloads:W().prefault(!1),transport:J([`websocket`,`sse`]).optional()}).prefault(()=>({})),language_servers:q({pylsp:q({enabled:W().prefault(!1),enable_mypy:W().prefault(!0),enable_ruff:W().prefault(!0),enable_flake8:W().prefault(!1),enable_pydocstyle:W().prefault(!1),enable_pylint:W().prefault(!1),enable_pyflakes:W().prefault(!1)}).prefault({})}).prefault({}),snippets:q({custom_paths:G(V()).prefault([]),include_default_snippets:W().prefault(!0)}).prefault({}),diagnostics:q({enabled:W().optional(),sql_linter:W().prefault(!0)}).prefault(()=>({})),file_browser:q({folders:G(K({path:V(),name:V().nullish().prefault(null)})).prefault([])}).nullish().prefault(null),sharing:q({html:W().optional(),wasm:W().optional(),molab:W().optional()}).nullish().prefault(null),lint:q({select:G(V()).prefault([]),ignore:G(V()).prefault([])}).prefault({}),datasources:q({auto_discover_schemas:Os([W(),Fs(`auto`)]).optional(),auto_discover_tables:Os([W(),Fs(`auto`)]).optional(),auto_discover_columns:Os([W(),Fs(`auto`)]).optional()}).prefault({}),venv:q({path:V().nullable().prefault(null),writable:W().prefault(!1)}).prefault({}),cache:q({verification:J([`off`,`on`,`strict`]).prefault(`off`),store:Ss().prefault(null),loader:V().prefault(`lazy`)}).prefault({}),signing:q({trusted_signers:Ms(V(),V()).prefault({}),private_key_path:V().nullable().prefault(null)}).prefault({}),mcp:q({presets:G(J([`marimo`,`context7`])).prefault([]),mcpServers:Ms(V(),Ss()).prefault({})}).optional().prefault({})}).partial().prefault(()=>({completion:{},save:{},formatting:{},keymap:{},runtime:{},display:{},diagnostics:{},language_servers:{},snippets:{},file_browser:null,sharing:null,experimental:{},server:{},ai:{},package_management:{},mcp:{},cache:{},venv:{},signing:{},lint:{},datasources:{}})),Bl=V(),Vl=J(Pl).prefault(`auto`);K({width:J(Nl).prefault(`compact`).transform(e=>e===`normal`?`compact`:e),app_title:Bl.nullish(),css_file:V().nullish(),html_head_file:V().nullish(),auto_download:G(J(Fl)).prefault([]),sql_output:Vl}).prefault(()=>({width:`compact`,auto_download:[],sql_output:`auto`}));function Hl(){return zl.parse({completion:{},save:{},formatting:{},keymap:{},runtime:{},display:{},diagnostics:{},language_servers:{},snippets:{},file_browser:null,sharing:null,experimental:{},server:{},ai:{},package_management:{},mcp:{},cache:{},venv:{},signing:{},lint:{},datasources:{}})}function Ul(e){let t,n=!1;return function(...r){return n||(n=!0,t=e.apply(this,r)),t}}const Wl=e=>new TextDecoder().decode(e);function Gl(e){return e.FS}const Kl=`notebook.py`,ql=`/marimo`,Jl={NOTEBOOK_FILENAME:Kl,HOME_DIR:ql,createHomeDir:e=>{let t=Gl(e);try{t.mkdirTree(ql)}catch{}t.chdir(ql)},mountFS:e=>{globalThis.origin!==`null`&&Gl(e).mount(e.FS.filesystems.IDBFS,{root:`.`},ql)},populateFilesToMemory:async e=>{await Yl(e,!0)},persistFilesToRemote:async e=>{await Yl(e,!1)},readNotebook:e=>{let t=Gl(e),n=`${ql}/${Kl}`;return Wl(t.readFile(n))},initNotebookCode:e=>{let{pyodide:t,filename:n,code:r}=e,i=Gl(t),a=e=>{try{return Wl(i.readFile(e))}catch{return null}};if(n&&n!==Kl){let e=a(n);if(e)return{code:e,filename:n}}return i.writeFile(Kl,r),{code:r,filename:Kl}}};function Yl(e,t){return new Promise((n,r)=>{Gl(e).syncfs(t,e=>{e instanceof Error?r(e):n()})})}function Xl(){return`marimo-base`}const Zl=new class{spans=[];startSpan(e,t={}){let n={name:e,startTime:Date.now(),attributes:t,end:(e=`ok`)=>this.endSpan(n,e)};return this.spans.push(n),n}endSpan(e,t=`ok`){e.endTime=Date.now(),e.status=t}getSpans(){return this.spans}wrap(e,t,n={}){let r=this.startSpan(t||e.name,n);try{let t=e();return this.endSpan(r),t}catch(e){throw this.endSpan(r,`error`),e}}wrapAsync(e,t,n={}){return async(...r)=>{let i=this.startSpan(t||e.name,n);try{let t=await e(...r);return this.endSpan(i),t}catch(e){throw this.endSpan(i,`error`),e}}}logSpans(){}};globalThis.t=Zl;function Ql(e){return e.trim().split(/[[<>=!~;@\s]/)[0]}var $l=class{pyodide=null;packageLoadQueue=Promise.resolve();sessionGeneration=0;sessions=/* @__PURE__ */ new Set;get requirePyodide(){return jl(this.pyodide,`Pyodide not loaded`),this.pyodide}async bootstrap(e){return await this.loadPyodideAndPackages(e)}async loadPyodideAndPackages(e){if(!wl)throw Error(`loadPyodide is not defined`);let t=Zl.startSpan(`loadPyodide`);try{let n=e.pyodideIndexUrl??`https://cdn.jsdelivr.net/pyodide/${e.pyodideVersion}/full/`,r=await wl({packages:[`micropip`,`msgspec`,Xl(),`Markdown`,`pymdown-extensions`,`narwhals`,`packaging`],_makeSnapshot:!1,lockFileURL:e.pyodideLockfileUrl??`https://wasm.marimo.app/pyodide-lock.json?v=${e.version}&pyodide=${e.pyodideVersion}`,indexURL:n,packageBaseUrl:n,convertNullToNone:!0});if(e.pypiIndexUrl){let t=r.pyimport(`micropip`);try{t.set_index_urls(e.pypiIndexUrl)}finally{t.destroy()}}return this.pyodide=r,t.end(`ok`),r}catch(e){throw g.error(`Failed to load Pyodide`,e),e}}async mountFilesystem(e){let t=Zl.startSpan(`mountFilesystem`);return Jl.createHomeDir(this.requirePyodide),Jl.mountFS(this.requirePyodide),await Jl.populateFilesToMemory(this.requirePyodide),t.end(`ok`),Jl.initNotebookCode({pyodide:this.requirePyodide,code:e.code,filename:e.filename})}async prepareSession(e){let t=this.sessionGeneration,{code:n,filename:r,queryParameters:i,userConfig:a}=e;self.query_params=i,self.user_config=a;let o=Zl.startSpan(`prepareSession.runPython`),s=r||Jl.NOTEBOOK_FILENAME,c=this.requirePyodide.runPython(`
|
|
116
116
|
print("[py] Starting marimo...")
|
|
117
117
|
import asyncio
|
|
118
118
|
import gc
|
|
@@ -3,13 +3,13 @@ import { g as n, h as r, i, t as a } from "./button-qQhINE7z.js";
|
|
|
3
3
|
import { t as o } from "./react-Bgs_wQh3.js";
|
|
4
4
|
import { t as s } from "./compiler-runtime-C5KHtL5D.js";
|
|
5
5
|
import { i as c, t as l } from "./copy-icon-CDvvlY90.js";
|
|
6
|
-
import { At as u, Bt as d, Dt as f, Et as p, Ft as m, Ht as h, J as g, Lt as _, M as v, Ot as y, Pt as b, Rt as x, U as S, V as C, W as w, Y as T, a as E, dt as D, et as O, f as k, g as A, h as j, ht as M, l as N, m as P, n as ee, nt as te, p as F, r as ne, st as re, t as ie, tt as ae, u as oe, v as se, wt as ce, xt as le } from "./html-to-image-
|
|
6
|
+
import { At as u, Bt as d, Dt as f, Et as p, Ft as m, Ht as h, J as g, Lt as _, M as v, Ot as y, Pt as b, Rt as x, U as S, V as C, W as w, Y as T, a as E, dt as D, et as O, f as k, g as A, h as j, ht as M, l as N, m as P, n as ee, nt as te, p as F, r as ne, st as re, t as ie, tt as ae, u as oe, v as se, wt as ce, xt as le } from "./html-to-image-BdgBPfgg.js";
|
|
7
7
|
import { h as I, t as ue } from "./tooltip-CiJ919pg.js";
|
|
8
8
|
import { d as de } from "./select-PQHWLm64.js";
|
|
9
9
|
import { Cn as fe, _ as pe, f as me, h as he, i as ge, n as _e, t as ve, xn as ye } from "./dropdown-menu-B12Nf3Zf.js";
|
|
10
10
|
import { a as be, l as xe } from "./config-C8TXSDmC.js";
|
|
11
|
-
import { F as Se, G as Ce, M as we, Tt as Te, Vt as Ee, an as De, g as Oe, i as ke, kt as Ae, r as je, t as Me, yt as Ne } from "./error-entries-
|
|
12
|
-
import { c as Pe, d as Fe, l as Ie, n as Le, t as Re, u as ze } from "./process-output-
|
|
11
|
+
import { F as Se, G as Ce, M as we, Tt as Te, Vt as Ee, an as De, g as Oe, i as ke, kt as Ae, r as je, t as Me, yt as Ne } from "./error-entries-DEV4YOvI.js";
|
|
12
|
+
import { c as Pe, d as Fe, l as Ie, n as Le, t as Re, u as ze } from "./process-output-C_EHwiTn.js";
|
|
13
13
|
import { t as Be } from "./pencil-BC7pOv9g.js";
|
|
14
14
|
import { n as Ve, r as He, s as Ue } from "./assertNever-DOTNJ2Y4.js";
|
|
15
15
|
import { t as We } from "./jsx-runtime-D8btoEHk.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { g as e } from "./button-qQhINE7z.js";
|
|
2
|
-
import { Kt as t, O as n, en as r } from "./error-entries-
|
|
2
|
+
import { Kt as t, O as n, en as r } from "./error-entries-DEV4YOvI.js";
|
|
3
3
|
import { n as i } from "./assertNever-DOTNJ2Y4.js";
|
|
4
4
|
import { Dt as a, Rt as o, Vt as s, f as c, h as l } from "./use-restore-focus-BLj45Ibw.js";
|
|
5
5
|
import { c as u, m as d, n as f, o as p } from "./static-state-CWXd6dYX.js";
|
|
@@ -14,7 +14,7 @@ function y() {
|
|
|
14
14
|
return e.warn("Failed to get version from mount config"), null;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
var b = y() || "0.25.3-
|
|
17
|
+
var b = y() || "0.25.3-dev463", x = s(b), S = s(!0);
|
|
18
18
|
s(null);
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region src/core/wasm/state.ts
|
|
@@ -3,7 +3,7 @@ import { _ as t, f as n, g as r, h as i, i as a, m as o, n as s, p as c, r as l,
|
|
|
3
3
|
import { t as d } from "./react-Bgs_wQh3.js";
|
|
4
4
|
import { t as f } from "./compiler-runtime-C5KHtL5D.js";
|
|
5
5
|
import { i as p, n as m, r as h, t as g } from "./copy-icon-CDvvlY90.js";
|
|
6
|
-
import { $ as _, A as v, C as y, D as b, Et as x, Ft as S, G as C, Gt as w, H as T, Ht as E, K as D, Kt as O, Lt as k, M as A, N as j, Nt as M, Ot as N, Q as P, Rt as F, S as I, Tt as ee, U as L, Ut as R, V as z, W as B, Wt as te, Y as ne, Z as V, at as re, d as ie, ft as ae, gt as oe, jt as se, k as ce, mt as le, n as ue, pt as de, r as fe, s as pe, t as me, w as he, x as ge, y as _e, z as ve, zt as ye } from "./html-to-image-
|
|
6
|
+
import { $ as _, A as v, C as y, D as b, Et as x, Ft as S, G as C, Gt as w, H as T, Ht as E, K as D, Kt as O, Lt as k, M as A, N as j, Nt as M, Ot as N, Q as P, Rt as F, S as I, Tt as ee, U as L, Ut as R, V as z, W as B, Wt as te, Y as ne, Z as V, at as re, d as ie, ft as ae, gt as oe, jt as se, k as ce, mt as le, n as ue, pt as de, r as fe, s as pe, t as me, w as he, x as ge, y as _e, z as ve, zt as ye } from "./html-to-image-BdgBPfgg.js";
|
|
7
7
|
import { a as be, f as xe, h as H, n as Se, o as Ce, r as we, t as U } from "./tooltip-CiJ919pg.js";
|
|
8
8
|
import { r as Te, s as Ee } from "./useLifecycle-mKiMNa4V.js";
|
|
9
9
|
import { a as De, i as Oe, n as ke, o as Ae, r as je, t as Me } from "./useDateFormatter-C659lkax.js";
|
|
@@ -11,7 +11,7 @@ import { t as Ne } from "./check-CApwK1fD.js";
|
|
|
11
11
|
import { A as Pe, C as Fe, M as Ie, S as Le, T as Re, _ as ze, b as Be, c as Ve, d as He, f as Ue, g as We, h as Ge, i as Ke, l as qe, m as Je, n as Ye, s as Xe, t as Ze, u as Qe, v as $e, x as et, y as tt } from "./select-PQHWLm64.js";
|
|
12
12
|
import { $ as nt, $t as rt, A as it, At as at, B as ot, Bt as st, C as ct, Cn as lt, Ct as ut, D as dt, Dt as ft, E as pt, Et as mt, F as ht, Ft as gt, G as _t, Gt as vt, H as yt, Ht as bt, I as xt, It as St, J as Ct, Jt as wt, K as Tt, Kt as Et, L as Dt, Lt as Ot, M as kt, Mt as At, N as jt, Nt as Mt, O as Nt, Ot as Pt, P as Ft, Pt as It, Q as Lt, Qt as Rt, R as zt, Rt as Bt, S as Vt, Sn as Ht, St as Ut, Tt as Wt, U as Gt, Ut as Kt, V as qt, Vt as Jt, W as Yt, Wt as Xt, Xt as Zt, Yt as Qt, Z as $t, Zt as en, _ as tn, _n as nn, _t as rn, a as an, at as on, bn as sn, bt as cn, cn as ln, ct as un, d as dn, dn as fn, dt as pn, en as mn, et as hn, f as gn, fn as _n, ft as vn, gn as yn, gt as bn, h as xn, hn as Sn, ht as Cn, i as wn, in as Tn, it as En, j as Dn, jt as On, k as kn, kt as An, l as jn, ln as Mn, lt as Nn, mn as Pn, n as Fn, nn as In, nt as Ln, o as Rn, on as zn, ot as Bn, pt as Vn, q as Hn, qt as Un, rn as Wn, rt as Gn, s as Kn, sn as qn, st as Jn, t as Yn, tn as Xn, tt as Zn, u as Qn, ut as $n, vn as er, vt as tr, w as nr, wt as rr, x as ir, xn as ar, xt as or, yn as sr, yt as cr, z as lr, zt as ur } from "./dropdown-menu-B12Nf3Zf.js";
|
|
13
13
|
import { a as dr, n as fr, r as pr, t as mr } from "./config-C8TXSDmC.js";
|
|
14
|
-
import { At as hr, D as gr, Et as _r, G as vr, H as yr, Ht as br, I as xr, Q as Sr, Rt as Cr, T as wr, Tt as Tr, U as Er, V as Dr, Vt as Or, Xt as kr, an as Ar, b as jr, d as Mr, g as Nr, in as Pr, j as Fr, kt as Ir, q as Lr, rn as Rr, t as zr, u as Br, x as Vr, yt as Hr, zt as Ur } from "./error-entries-
|
|
14
|
+
import { At as hr, D as gr, Et as _r, G as vr, H as yr, Ht as br, I as xr, Q as Sr, Rt as Cr, T as wr, Tt as Tr, U as Er, V as Dr, Vt as Or, Xt as kr, an as Ar, b as jr, d as Mr, g as Nr, in as Pr, j as Fr, kt as Ir, q as Lr, rn as Rr, t as zr, u as Br, x as Vr, yt as Hr, zt as Ur } from "./error-entries-DEV4YOvI.js";
|
|
15
15
|
import { n as Wr, o as Gr, r as Kr, s as qr, t as Jr } from "./assertNever-DOTNJ2Y4.js";
|
|
16
16
|
import { t as Yr } from "./clsx-CoeGtWvn.js";
|
|
17
17
|
import { t as Xr } from "./react-dom-DdqGVp5N.js";
|
|
@@ -33,7 +33,7 @@ import { o as ba } from "./dist-DNkrY12t.js";
|
|
|
33
33
|
import { a as xa, i as Sa, n as Ca, o as wa, r as Ta, t as Ea } from "./dialog-rgayPemF.js";
|
|
34
34
|
import { t as Da } from "./useAsyncData-P5-Oovhq.js";
|
|
35
35
|
import { n as W, t as G } from "./objectWithoutPropertiesLoose-BRDcTsfB.js";
|
|
36
|
-
import { n as Oa, t as ka } from "./ErrorBoundary-
|
|
36
|
+
import { n as Oa, t as ka } from "./ErrorBoundary-LEY4eR-u.js";
|
|
37
37
|
import { W as Aa, n as ja } from "./vega-loader.browser-Co9gYE8Z.js";
|
|
38
38
|
import { a as Ma, n as Na, r as Pa, t as Fa } from "./loader-Bin_dutt.js";
|
|
39
39
|
import { t as Ia } from "./useIframeCapabilities-HTZiVlGV.js";
|
|
@@ -2,7 +2,7 @@ import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
|
|
|
2
2
|
import { t } from "./react-Bgs_wQh3.js";
|
|
3
3
|
import { t as n } from "./react-dom-DdqGVp5N.js";
|
|
4
4
|
import { c as r, l as i, u as a } from "./data-grid-types-DIX_pCco.js";
|
|
5
|
-
import { a as o, i as s, n as c, r as l } from "./glide-data-editor-
|
|
5
|
+
import { a as o, i as s, n as c, r as l } from "./glide-data-editor-DwVqbx2W.js";
|
|
6
6
|
//#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.17.21_marked@15.0.12_react-dom@19.3.1_57c124ac5a994dbbf13fd11838cf9ba9/node_modules/@glideapps/glide-data-grid/dist/esm/internal/data-grid-overlay-editor/data-grid-overlay-editor-style.js
|
|
7
7
|
var u = /* @__PURE__ */ e(t(), 1), d = /* @__PURE__ */ e(n(), 1), f = /*#__PURE__*/ o("div")({
|
|
8
8
|
name: "DataGridOverlayEditorStyle",
|
|
@@ -505,12 +505,6 @@ var ft = {
|
|
|
505
505
|
time: t.time
|
|
506
506
|
}),
|
|
507
507
|
"console.removed": (e, { data: t }) => ot(e, t.id),
|
|
508
|
-
display: (e, { data: t }) => at(e, {
|
|
509
|
-
...t.display,
|
|
510
|
-
kind: "display",
|
|
511
|
-
time: t.time
|
|
512
|
-
}),
|
|
513
|
-
"display.removed": (e, { data: t }) => ot(e, t.id),
|
|
514
508
|
input: (e, { data: t }) => at(e, {
|
|
515
509
|
...t.input,
|
|
516
510
|
kind: "input",
|
|
@@ -1987,21 +1981,23 @@ function wr(e) {
|
|
|
1987
1981
|
function Tr(e, t, n) {
|
|
1988
1982
|
let r = e.time === void 0 ? t : Date.parse(e.time) / 1e3, i = e.seq + 1;
|
|
1989
1983
|
switch (e.kind) {
|
|
1990
|
-
case "console":
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
1984
|
+
case "console":
|
|
1985
|
+
if (e.content.kind === "text") return {
|
|
1986
|
+
id: i,
|
|
1987
|
+
channel: e.content.stream,
|
|
1988
|
+
data: e.content.text,
|
|
1989
|
+
mimetype: "text/plain",
|
|
1990
|
+
timestamp: r
|
|
1991
|
+
};
|
|
1992
|
+
let { media: t } = e.content;
|
|
1993
|
+
return {
|
|
1994
|
+
id: i,
|
|
1995
|
+
channel: t.mimetype === "application/vnd.marimo+traceback" ? "stderr" : "media",
|
|
1996
|
+
mimetype: t.mimetype,
|
|
1997
|
+
data: t.data,
|
|
1998
|
+
code: t.mimetype === "application/vnd.marimo+traceback" ? n : void 0,
|
|
1999
|
+
timestamp: r
|
|
2000
|
+
};
|
|
2005
2001
|
case "input": return {
|
|
2006
2002
|
id: i,
|
|
2007
2003
|
channel: "stdin",
|
|
@@ -2026,7 +2022,7 @@ function Er(e, t) {
|
|
|
2026
2022
|
o.channel === "media" && Bn.INSTANCE.track({
|
|
2027
2023
|
cell_id: i,
|
|
2028
2024
|
output: o
|
|
2029
|
-
}), r && (
|
|
2025
|
+
}), r && (o.channel === "stdout" || o.channel === "stderr") && e.addLogs({ logs: mr({
|
|
2030
2026
|
cell_id: i,
|
|
2031
2027
|
console: o
|
|
2032
2028
|
}) });
|
|
@@ -3,14 +3,14 @@ import { h as t, t as n } from "./button-qQhINE7z.js";
|
|
|
3
3
|
import { t as r } from "./react-Bgs_wQh3.js";
|
|
4
4
|
import { t as i } from "./compiler-runtime-C5KHtL5D.js";
|
|
5
5
|
import { t as a } from "./copy-icon-CDvvlY90.js";
|
|
6
|
-
import { D as o, I as s, K as c, O as l, P as u, an as d, en as f, i as p, n as m } from "./error-entries-
|
|
7
|
-
import { n as h, t as ee } from "./globals-
|
|
6
|
+
import { D as o, I as s, K as c, O as l, P as u, an as d, en as f, i as p, n as m } from "./error-entries-DEV4YOvI.js";
|
|
7
|
+
import { n as h, t as ee } from "./globals-DqKjaSau.js";
|
|
8
8
|
import { r as g } from "./assertNever-DOTNJ2Y4.js";
|
|
9
9
|
import { t as _ } from "./jsx-runtime-D8btoEHk.js";
|
|
10
10
|
import { Rt as te, St as ne, m as v } from "./use-restore-focus-BLj45Ibw.js";
|
|
11
11
|
import { a as re, i as ie, n as ae, r as oe } from "./dialog-rgayPemF.js";
|
|
12
12
|
import { t as se } from "./useAsyncData-P5-Oovhq.js";
|
|
13
|
-
import { t as ce } from "./code-visibility-
|
|
13
|
+
import { t as ce } from "./code-visibility-B6vd-MS9.js";
|
|
14
14
|
//#region src/components/ui/skeleton.tsx
|
|
15
15
|
var y = /* @__PURE__ */ e(r(), 1), b = i(), x = _(), le = (e) => {
|
|
16
16
|
let n = (0, b.c)(8), r, i;
|
|
@@ -14,7 +14,7 @@ import { t as F } from "./jsx-runtime-D8btoEHk.js";
|
|
|
14
14
|
import { d as ae, r as I } from "./use-restore-focus-BLj45Ibw.js";
|
|
15
15
|
import { t as oe } from "./useEvent-BoN7U38T.js";
|
|
16
16
|
import { n as L, t as se } from "./objectWithoutPropertiesLoose-BRDcTsfB.js";
|
|
17
|
-
import { t as ce } from "./ErrorBoundary-
|
|
17
|
+
import { t as ce } from "./ErrorBoundary-LEY4eR-u.js";
|
|
18
18
|
import { A as le, C as ue, D as de, E as fe, F as pe, I as me, L as he, M as ge, N as R, O as z, P as _e, R as ve, S as ye, T as be, _ as xe, a as Se, b as B, c as Ce, d as we, f as V, g as Te, h as Ee, i as De, j as H, k as Oe, l as ke, m as Ae, n as je, o as Me, p as Ne, r as U, s as Pe, t as Fe, u as Ie, v as Le, w as Re, x as ze, y as Be, z as Ve } from "./data-grid-types-DIX_pCco.js";
|
|
19
19
|
//#region ../node_modules/.pnpm/@emotion+memoize@0.9.0/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js
|
|
20
20
|
function He(e) {
|
|
@@ -7061,7 +7061,7 @@ function ds(e, t, n, r, i) {
|
|
|
7061
7061
|
}
|
|
7062
7062
|
//#endregion
|
|
7063
7063
|
//#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.17.21_marked@15.0.12_react-dom@19.3.1_57c124ac5a994dbbf13fd11838cf9ba9/node_modules/@glideapps/glide-data-grid/dist/esm/data-editor/data-editor.js
|
|
7064
|
-
var fs = /* @__PURE__ */ e(Tr(), 1), ps = /* @__PURE__ */ e(kr(), 1), ms = W.lazy(async () => await import("./data-grid-overlay-editor-
|
|
7064
|
+
var fs = /* @__PURE__ */ e(Tr(), 1), ps = /* @__PURE__ */ e(kr(), 1), ms = W.lazy(async () => await import("./data-grid-overlay-editor-DLAyzP8s.js")), hs = 0;
|
|
7065
7065
|
function gs(e) {
|
|
7066
7066
|
return (0, fs.default)((0, ps.default)((0, ps.default)(e).filter((e) => e.span !== void 0).map((e) => (0, ao.default)((e.span?.[0] ?? 0) + 1, (e.span?.[1] ?? 0) + 1))));
|
|
7067
7067
|
}
|
|
@@ -9284,7 +9284,7 @@ function Ys(e, t, n, r, i) {
|
|
|
9284
9284
|
}
|
|
9285
9285
|
//#endregion
|
|
9286
9286
|
//#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.17.21_marked@15.0.12_react-dom@19.3.1_57c124ac5a994dbbf13fd11838cf9ba9/node_modules/@glideapps/glide-data-grid/dist/esm/cells/number-cell.js
|
|
9287
|
-
var Xs = W.lazy(async () => await import("./number-overlay-editor-
|
|
9287
|
+
var Xs = W.lazy(async () => await import("./number-overlay-editor-D9vaIlf5.js")), Zs = {
|
|
9288
9288
|
getAccessibilityString: (e) => e.data?.toString() ?? "",
|
|
9289
9289
|
kind: U.Number,
|
|
9290
9290
|
needsHover: (e) => e.hoverEffect === !0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h as e } from "./tooltip-CiJ919pg.js";
|
|
2
2
|
import { St as t } from "./use-restore-focus-BLj45Ibw.js";
|
|
3
|
-
import { r as n } from "./code-visibility-
|
|
3
|
+
import { r as n } from "./code-visibility-B6vd-MS9.js";
|
|
4
4
|
var r = e("triangle-alert", [
|
|
5
5
|
["path", {
|
|
6
6
|
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
|
|
@@ -9,7 +9,7 @@ import { a as D, i as ne, o as re, r as O, s as k, t as ie } from "./useLifecycl
|
|
|
9
9
|
import { a as ae, c as oe, i as se, n as ce, o as le, r as ue, s as de, t as fe } from "./select-PQHWLm64.js";
|
|
10
10
|
import { J as pe, X as me, ht as he } from "./dropdown-menu-B12Nf3Zf.js";
|
|
11
11
|
import { c as ge, l as _e, n as ve } from "./config-C8TXSDmC.js";
|
|
12
|
-
import { $ as A, A as j, At as ye, Bt as be, C as xe, D as Se, E as Ce, F as M, G as we, Gt as Te, I as Ee, Jt as De, L as Oe, Lt as ke, Mt as Ae, N as je, Ot as Me, Rt as Ne, S as Pe, St as Fe, Ut as Ie, Vt as Le, W as Re, Wt as ze, Xt as Be, Yt as Ve, _t as He, a as Ue, at as We, c as Ge, ct as Ke, dt as qe, et as Je, ft as Ye, g as Xe, gt as Ze, it as Qe, k as $e, lt as et, m as tt, o as nt, ot as rt, p as it, pt as at, rn as ot, s as st, st as ct, tn as lt, tt as ut, ut as dt, v as ft, w as pt, y as mt } from "./error-entries-
|
|
12
|
+
import { $ as A, A as j, At as ye, Bt as be, C as xe, D as Se, E as Ce, F as M, G as we, Gt as Te, I as Ee, Jt as De, L as Oe, Lt as ke, Mt as Ae, N as je, Ot as Me, Rt as Ne, S as Pe, St as Fe, Ut as Ie, Vt as Le, W as Re, Wt as ze, Xt as Be, Yt as Ve, _t as He, a as Ue, at as We, c as Ge, ct as Ke, dt as qe, et as Je, ft as Ye, g as Xe, gt as Ze, it as Qe, k as $e, lt as et, m as tt, o as nt, ot as rt, p as it, pt as at, rn as ot, s as st, st as ct, tn as lt, tt as ut, ut as dt, v as ft, w as pt, y as mt } from "./error-entries-DEV4YOvI.js";
|
|
13
13
|
import { n as ht } from "./assertNever-DOTNJ2Y4.js";
|
|
14
14
|
import { t as gt } from "./react-dom-DdqGVp5N.js";
|
|
15
15
|
import { t as _t } from "./jsx-runtime-D8btoEHk.js";
|