aiex-cli 0.1.1-beta.9 → 0.1.2-beta.1

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/cli.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { A as seedConfig, C as CORRECTION_SYSTEM_PROMPT, D as PLACEHOLDER_TEXT, E as PLACEHOLDER_SCHEMA, M as name, N as package_default, O as buildCorrectionUserPrompt, P as version, S as DEFAULT_MINERU_CONFIG, T as EVIDENCE_INSTRUCTIONS, _ as doctorDiagnosticsSeverityRows, a as recognizeImageText, b as DEFAULT_LITEPARSE_CONFIG, c as t, d as readAIConfig, f as writeAIConfig, h as parseJsonSchema, j as description, k as createConfig, l as createProjectDatabase, m as JsonSchemaDefinitionSchema, n as collectDoctorDiagnostics, o as shouldUseImageOcrFallback, p as AIConfigSchema, r as createMigrationConfig, s as initI18n, t as generateDrizzleSchema, u as getDefaultAIConfig, v as doctorDiagnosticsTableRows, w as DEFAULT_PROMPT_CONFIG, x as DEFAULT_MINERU_API_CONFIG, y as formatDoctorDiagnosticsJson } from "./generate-drizzle-schema-BdkbSP5F.mjs";
1
+ import { A as seedConfig, C as CORRECTION_SYSTEM_PROMPT, D as PLACEHOLDER_TEXT, E as PLACEHOLDER_SCHEMA, M as name, N as package_default, O as buildCorrectionUserPrompt, P as version, S as DEFAULT_MINERU_CONFIG, T as EVIDENCE_INSTRUCTIONS, _ as doctorDiagnosticsSeverityRows, a as recognizeImageText, b as DEFAULT_LITEPARSE_CONFIG, c as t, d as readAIConfig, f as writeAIConfig, h as parseJsonSchema, j as description, k as createConfig, l as createProjectDatabase, m as JsonSchemaDefinitionSchema, n as collectDoctorDiagnostics, o as shouldUseImageOcrFallback, p as AIConfigSchema, r as createMigrationConfig, s as initI18n, t as generateDrizzleSchema, u as getDefaultAIConfig, v as doctorDiagnosticsTableRows, w as DEFAULT_PROMPT_CONFIG, x as DEFAULT_MINERU_API_CONFIG, y as formatDoctorDiagnosticsJson } from "./generate-drizzle-schema-ChzQkol3.mjs";
2
2
  import { createRequire } from "node:module";
3
3
  import fs from "node:fs/promises";
4
4
  import os from "node:os";
@@ -2546,7 +2546,7 @@ const extractCommand = defineCommand({
2546
2546
  },
2547
2547
  async run({ args }) {
2548
2548
  intro(pc.inverse(" aiex extract "));
2549
- await initI18n();
2549
+ await /* @__PURE__ */ initI18n();
2550
2550
  const config = createMigrationConfig(process.cwd());
2551
2551
  const aiexDir = path.dirname(config.schemaPath);
2552
2552
  if (args.dir && args.file) {
@@ -2743,6 +2743,36 @@ function enumChanged(previous, next) {
2743
2743
  if (prev.size !== current.size) return true;
2744
2744
  return [...prev].some((value) => !current.has(value));
2745
2745
  }
2746
+ function stableJson(value) {
2747
+ return JSON.stringify(value);
2748
+ }
2749
+ function changed(previous, next) {
2750
+ return stableJson(previous) !== stableJson(next);
2751
+ }
2752
+ function constraintValue(entry, key) {
2753
+ const value = entry.constraints?.[key];
2754
+ return typeof value === "number" ? value : void 0;
2755
+ }
2756
+ function isLowerBoundTightened(previous, next) {
2757
+ if (next === void 0) return false;
2758
+ if (previous === void 0) return true;
2759
+ return next > previous;
2760
+ }
2761
+ function isUpperBoundTightened(previous, next) {
2762
+ if (next === void 0) return false;
2763
+ if (previous === void 0) return true;
2764
+ return next < previous;
2765
+ }
2766
+ function compareConstraint(items, previous, next, key, tightened) {
2767
+ const previousValue = constraintValue(previous, key);
2768
+ const nextValue = constraintValue(next, key);
2769
+ if (previousValue === nextValue) return;
2770
+ const severity = tightened(previousValue, nextValue) ? "high" : "medium";
2771
+ addRisk(items, severity, severity === "high" ? "constraint_tightened" : "constraint_changed", previous.table, previous.column, `Column "${keyOf(previous)}" ${key} changes from ${previousValue ?? "none"} to ${nextValue ?? "none"}.`);
2772
+ }
2773
+ function foreignKeyChanged(previous, next) {
2774
+ return changed(previous.foreignKey, next.foreignKey);
2775
+ }
2746
2776
  function analyzeMigrationRisk(previousEntries, nextEntries) {
2747
2777
  const items = [];
2748
2778
  const previousByKey = new Map(previousEntries.map((entry) => [keyOf(entry), entry]));
@@ -2764,6 +2794,12 @@ function analyzeMigrationRisk(previousEntries, nextEntries) {
2764
2794
  if (previous.primary !== next.primary) addRisk(items, "high", "primary_changed", previous.table, previous.column, `Column "${key}" primary key status changes.`);
2765
2795
  if (isEnumNarrowed(previous, next)) addRisk(items, "high", "enum_narrowed", previous.table, previous.column, `Column "${key}" enum values are narrowed.`);
2766
2796
  else if (enumChanged(previous, next)) addRisk(items, "medium", "enum_changed", previous.table, previous.column, `Column "${key}" enum values change.`);
2797
+ compareConstraint(items, previous, next, "minLength", isLowerBoundTightened);
2798
+ compareConstraint(items, previous, next, "minimum", isLowerBoundTightened);
2799
+ compareConstraint(items, previous, next, "maxLength", isUpperBoundTightened);
2800
+ compareConstraint(items, previous, next, "maximum", isUpperBoundTightened);
2801
+ if (changed(previous.defaultValue, next.defaultValue)) addRisk(items, "medium", "default_changed", previous.table, previous.column, `Column "${key}" default value changes.`);
2802
+ if (foreignKeyChanged(previous, next)) addRisk(items, "high", "foreign_key_changed", previous.table, previous.column, `Column "${key}" foreign key changes.`);
2767
2803
  }
2768
2804
  for (const [key, next] of nextByKey) if (!previousByKey.has(key)) addRisk(items, next.nullable ? "low" : "medium", "column_added", next.table, next.column, `Column "${key}" will be added.`);
2769
2805
  const level = maxSeverity(items);
@@ -3152,7 +3188,7 @@ const schemaCommand = defineCommand({
3152
3188
  },
3153
3189
  async run({ args }) {
3154
3190
  intro(pc.inverse(" aiex schema "));
3155
- await initI18n();
3191
+ await /* @__PURE__ */ initI18n();
3156
3192
  const config = createMigrationConfig(process.cwd());
3157
3193
  const schemaFiles = await listSchemaFiles(config.schemaPath);
3158
3194
  if (schemaFiles.length === 0) {
@@ -3385,7 +3421,7 @@ const watchCommand = defineCommand({
3385
3421
  },
3386
3422
  async run({ args }) {
3387
3423
  intro(pc.inverse(" aiex watch "));
3388
- await initI18n();
3424
+ await /* @__PURE__ */ initI18n();
3389
3425
  const config = createMigrationConfig(process.cwd());
3390
3426
  const aiexDir = path.dirname(config.schemaPath);
3391
3427
  if (!args.schema && !args.dir && !args.model) {
@@ -16916,7 +16952,7 @@ const webCommand = defineCommand({
16916
16952
  default: "13000"
16917
16953
  } },
16918
16954
  async run({ args }) {
16919
- await initI18n();
16955
+ await /* @__PURE__ */ initI18n();
16920
16956
  intro(pc.inverse(" aiex web "));
16921
16957
  const cwd = process.cwd();
16922
16958
  const port = Number(args.port) || 13e3;
@@ -16951,7 +16987,7 @@ const subCommands = {
16951
16987
 
16952
16988
  //#endregion
16953
16989
  //#region src/cli.ts
16954
- await initI18n();
16990
+ await /* @__PURE__ */ initI18n();
16955
16991
  seedConfig(createConfig());
16956
16992
  updateNotifier({ pkg: package_default }).notify();
16957
16993
  process.on("uncaughtException", (error) => {
@@ -16964,7 +17000,7 @@ process.on("unhandledRejection", (reason) => {
16964
17000
  process.exit(1);
16965
17001
  });
16966
17002
  if (process.argv[2] === "_complete") {
16967
- const { getCompletions } = await import("./completions-DPALvX54.mjs");
17003
+ const { getCompletions } = await import("./completions-C2plwRHt.mjs");
16968
17004
  const suggestions = getCompletions(subCommands, process.argv.slice(4));
16969
17005
  for (const s of suggestions) process.stdout.write(`${s}\n`);
16970
17006
  process.exit(0);
@@ -12,7 +12,7 @@ import { Kysely, SqliteDialect, sql } from "kysely";
12
12
 
13
13
  //#region package.json
14
14
  var name = "aiex-cli";
15
- var version = "0.1.1-beta.9";
15
+ var version = "0.1.2-beta.1";
16
16
  var description = "JSON Schema → SQLite with AI-powered data extraction";
17
17
  var package_default = {
18
18
  name,
@@ -64,6 +64,7 @@ var package_default = {
64
64
  "start": "tsx src/index.ts",
65
65
  "test": "vitest",
66
66
  "coverage": "vitest --coverage",
67
+ "smoke:cli": "node scripts/cli-smoke.mjs",
67
68
  "smoke:package": "node scripts/package-smoke.mjs",
68
69
  "typecheck": "tsc",
69
70
  "lint": "eslint .",
@@ -95,8 +96,6 @@ var package_default = {
95
96
  "execa": "catalog:",
96
97
  "file-type": "catalog:",
97
98
  "hono": "catalog:",
98
- "i18next": "catalog:",
99
- "i18next-fs-backend": "catalog:",
100
99
  "jsonfile": "catalog:",
101
100
  "jsonrepair": "catalog:",
102
101
  "kysely": "catalog:",
@@ -477,6 +476,15 @@ function columnNotes(property, column) {
477
476
  if (column.default !== void 0) notes.push("default");
478
477
  return notes;
479
478
  }
479
+ function propertyConstraints(property) {
480
+ const constraints = {};
481
+ if (property.enum?.length) constraints.enumValues = property.enum;
482
+ if (property.minLength !== void 0) constraints.minLength = property.minLength;
483
+ if (property.maxLength !== void 0) constraints.maxLength = property.maxLength;
484
+ if (property.minimum !== void 0) constraints.minimum = property.minimum;
485
+ if (property.maximum !== void 0) constraints.maximum = property.maximum;
486
+ return Object.keys(constraints).length > 0 ? constraints : void 0;
487
+ }
480
488
  function mapColumnToReport(schemaPath, table, property, column, relation) {
481
489
  const columnType = describeColumnType(column.columnType);
482
490
  return {
@@ -489,7 +497,9 @@ function mapColumnToReport(schemaPath, table, property, column, relation) {
489
497
  primary: column.isPrimary,
490
498
  unique: column.isUnique,
491
499
  relation,
492
- constraints: property.enum?.length ? { enumValues: property.enum } : void 0,
500
+ constraints: propertyConstraints(property),
501
+ defaultValue: column.default,
502
+ foreignKey: column.foreignKeyRef,
493
503
  notes: columnNotes(property, column)
494
504
  };
495
505
  }
@@ -595,6 +605,8 @@ function parseNestedObject(propName, property, parentTableName, warnings, mappin
595
605
  primary: true,
596
606
  unique: false,
597
607
  relation: relationType,
608
+ defaultValue: void 0,
609
+ foreignKey: void 0,
598
610
  notes: ["generated_nested_primary_key"]
599
611
  });
600
612
  columns.push({
@@ -620,6 +632,11 @@ function parseNestedObject(propName, property, parentTableName, warnings, mappin
620
632
  primary: false,
621
633
  unique: false,
622
634
  relation: relationType,
635
+ defaultValue: void 0,
636
+ foreignKey: {
637
+ table: parentTableName,
638
+ column: "id"
639
+ },
623
640
  notes: [`generated_parent_foreign_key:${parentTableName}.id`]
624
641
  });
625
642
  if (property.type === "object" && property.properties) for (const [childName, childProp] of Object.entries(property.properties)) {
@@ -1607,46 +1624,17 @@ const en = {
1607
1624
 
1608
1625
  //#endregion
1609
1626
  //#region src/locales/i18n.ts
1610
- let tFn = null;
1611
- let i18nInstance = null;
1612
- let initPromise = null;
1613
- function detectLocale() {
1614
- if ((process.env.LANG || process.env.LC_ALL || process.env.LC_MESSAGES || "").startsWith("zh")) return "zh-CN";
1615
- return "en";
1616
- }
1617
1627
  function resolveFallback(key, options) {
1618
1628
  let value = en;
1619
1629
  const parts = key.split(".");
1620
1630
  for (const part of parts) if (value && typeof value === "object" && part in value) value = value[part];
1621
1631
  else return key;
1622
1632
  if (typeof value !== "string") return key;
1623
- if (options) return Object.entries(options).reduce((str, [k, v]) => str.replace(`{{${k}}}`, String(v)), value);
1633
+ if (options) return Object.entries(options).reduce((str, [k, v]) => str.replaceAll(`{{${k}}}`, String(v)), value);
1624
1634
  return value;
1625
1635
  }
1626
- async function initI18n(lng) {
1627
- if (i18nInstance) return;
1628
- if (initPromise) return initPromise;
1629
- initPromise = (async () => {
1630
- const { createInstance } = await import("i18next");
1631
- const instance = createInstance();
1632
- i18nInstance = instance;
1633
- const locale = lng ?? detectLocale();
1634
- await instance.init({
1635
- lng: locale,
1636
- fallbackLng: "en",
1637
- resources: {
1638
- "en": { translation: en },
1639
- "zh-CN": { translation: await import("./zh-CN-CJiDMnGe.mjs").then((m) => m.zhCN) }
1640
- },
1641
- interpolation: { escapeValue: false },
1642
- returnNull: false
1643
- });
1644
- tFn = instance.t.bind(instance);
1645
- })();
1646
- return initPromise;
1647
- }
1636
+ async function initI18n(_lng) {}
1648
1637
  function t(key, options) {
1649
- if (tFn) return tFn(key, options);
1650
1638
  return resolveFallback(key, options);
1651
1639
  }
1652
1640
 
@@ -2046,7 +2034,8 @@ function generateRelationDefinitions(relations, reverseRelations) {
2046
2034
  return definitions.join("\n\n");
2047
2035
  }
2048
2036
  function generateDrizzleSchema(result) {
2049
- const imports = `import { ${`sqliteTable, text, integer, real${result.tables.some((t$1) => t$1.checks?.length) ? ", check, sql" : ""}`} } from 'drizzle-orm/sqlite-core'\nimport { relations } from 'drizzle-orm'`;
2037
+ const hasChecks = result.tables.some((t$1) => t$1.checks?.length);
2038
+ const imports = `import { ${`sqliteTable, text, integer, real${hasChecks ? ", check" : ""}`} } from 'drizzle-orm/sqlite-core'\nimport { ${`relations${hasChecks ? ", sql" : ""}`} } from 'drizzle-orm'`;
2050
2039
  const tableDefs = result.tables.map(generateTableDefinition).join("\n\n");
2051
2040
  const relationDefs = generateRelationDefinitions(result.relations, result.reverseRelations);
2052
2041
  const parts = [
package/dist/index.d.mts CHANGED
@@ -333,6 +333,15 @@ interface SchemaMappingEntry {
333
333
  relation?: 'root' | 'has-one' | 'has-many';
334
334
  constraints?: {
335
335
  enumValues?: (string | number)[];
336
+ minLength?: number;
337
+ maxLength?: number;
338
+ minimum?: number;
339
+ maximum?: number;
340
+ };
341
+ defaultValue?: unknown;
342
+ foreignKey?: {
343
+ table: string;
344
+ column: string;
336
345
  };
337
346
  notes: string[];
338
347
  }
package/dist/index.mjs CHANGED
@@ -1,3 +1,3 @@
1
- import { _ as doctorDiagnosticsSeverityRows, g as buildDoctorDiagnostics, h as parseJsonSchema, i as generateDrizzleConfig, m as JsonSchemaDefinitionSchema, n as collectDoctorDiagnostics, r as createMigrationConfig, t as generateDrizzleSchema, v as doctorDiagnosticsTableRows, y as formatDoctorDiagnosticsJson } from "./generate-drizzle-schema-BdkbSP5F.mjs";
1
+ import { _ as doctorDiagnosticsSeverityRows, g as buildDoctorDiagnostics, h as parseJsonSchema, i as generateDrizzleConfig, m as JsonSchemaDefinitionSchema, n as collectDoctorDiagnostics, r as createMigrationConfig, t as generateDrizzleSchema, v as doctorDiagnosticsTableRows, y as formatDoctorDiagnosticsJson } from "./generate-drizzle-schema-ChzQkol3.mjs";
2
2
 
3
3
  export { JsonSchemaDefinitionSchema, buildDoctorDiagnostics, collectDoctorDiagnostics, createMigrationConfig, doctorDiagnosticsSeverityRows, doctorDiagnosticsTableRows, formatDoctorDiagnosticsJson, generateDrizzleConfig, generateDrizzleSchema, parseJsonSchema };
@@ -1,5 +1,5 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco.contribution-CNX4GSi9.js","assets/preload-helper-DWTEM3RW.js","assets/editor.api-BT2rf8f6.js","assets/chunk-DtRyYLXJ.js","assets/markers-CggdBp2p.js","assets/markers-Bp6AHK9A.css","assets/editor-D2tYHrWf.css","assets/hoverContribution-LAh7vfny.js","assets/hoverContribution-CE0Jku7D.css"])))=>i.map(i=>d[i]);
2
- import{t as e}from"./chunk-DtRyYLXJ.js";import{$ as t,A as n,C as r,D as i,E as a,G as o,H as s,I as c,It as l,J as u,Jt as d,K as f,L as p,M as m,Mt as h,O as g,Ot as _,P as v,Pt as y,Rt as b,S as x,T as S,U as C,Ut as w,Vt as T,W as E,X as D,Y as ee,Z as te,an as ne,dt as re,en as ie,et as ae,fn as oe,g as se,gn as O,gt as k,ht as A,i as ce,it as le,lt as j,m as ue,n as de,o as fe,on as M,pn as pe,q as N,r as me,rn as he,rt as P,s as ge,tt as _e,u as ve,vt as ye,w as F,x as I,y as L,yt as R}from"./vue-i18n-Du42D0vb.js";import{r as be,t as xe}from"./dialog-CnZ7jH1l.js";import{a as Se,r as Ce,t as we}from"./schemaNaming-COq_SZOU.js";import{r as Te}from"./dist-CElVIpns.js";import{t as Ee}from"./preload-helper-DWTEM3RW.js";import{a as De,i as Oe,n as ke,o as Ae,t as je}from"./textarea-DMpqBhjw.js";var Me=ve.extend({name:`tabpanel`,classes:{root:function(e){return[`p-tabpanel`,{"p-tabpanel-active":e.instance.active}]}}}),Ne={name:`TabPanel`,extends:{name:`BaseTabPanel`,extends:ge,props:{value:{type:[String,Number],default:void 0},as:{type:[String,Object],default:`DIV`},asChild:{type:Boolean,default:!1},header:null,headerStyle:null,headerClass:null,headerProps:null,headerActionProps:null,contentStyle:null,contentClass:null,contentProps:null,disabled:Boolean},style:Me,provide:function(){return{$pcTabPanel:this,$parentInstance:this}}},inheritAttrs:!1,inject:[`$pcTabs`],computed:{active:function(){return oe(this.$pcTabs?.d_value,this.value)},id:function(){return`${this.$pcTabs?.$id}_tabpanel_${this.value}`},ariaLabelledby:function(){return`${this.$pcTabs?.$id}_tab_${this.value}`},attrs:function(){return p(this.a11yAttrs,this.ptmi(`root`,this.ptParams))},a11yAttrs:function(){return{id:this.id,tabindex:this.$pcTabs?.tabindex,role:`tabpanel`,"aria-labelledby":this.ariaLabelledby,"data-pc-name":`tabpanel`,"data-p-active":this.active}},ptParams:function(){return{context:{active:this.active}}}}};function Pe(e,t,n,i,a,o){var s,c;return o.$pcTabs?(E(),S(L,{key:1},[e.asChild?N(e.$slots,`default`,{key:1,class:k(e.cx(`root`)),active:o.active,a11yAttrs:o.a11yAttrs}):(E(),S(L,{key:0},[!((s=o.$pcTabs)!=null&&s.lazy)||o.active?le((E(),r(D(e.as),p({key:0,class:e.cx(`root`)},o.attrs),{default:P(function(){return[N(e.$slots,`default`)]}),_:3},16,[`class`])),[[se,(c=o.$pcTabs)!=null&&c.lazy?!0:o.active]]):F(``,!0)],64))],64)):N(e.$slots,`default`,{key:0})}Ne.render=Pe;var Fe=ve.extend({name:`tab`,classes:{root:function(e){var t=e.instance,n=e.props;return[`p-tab`,{"p-tab-active":t.active,"p-disabled":n.disabled}]}}}),Ie={name:`Tab`,extends:{name:`BaseTab`,extends:ge,props:{value:{type:[String,Number],default:void 0},disabled:{type:Boolean,default:!1},as:{type:[String,Object],default:`BUTTON`},asChild:{type:Boolean,default:!1}},style:Fe,provide:function(){return{$pcTab:this,$parentInstance:this}}},inheritAttrs:!1,inject:[`$pcTabs`,`$pcTabList`],methods:{onFocus:function(){this.$pcTabs.selectOnFocus&&this.changeActiveValue()},onClick:function(){this.changeActiveValue()},onKeydown:function(e){switch(e.code){case`ArrowRight`:this.onArrowRightKey(e);break;case`ArrowLeft`:this.onArrowLeftKey(e);break;case`Home`:this.onHomeKey(e);break;case`End`:this.onEndKey(e);break;case`PageDown`:this.onPageDownKey(e);break;case`PageUp`:this.onPageUpKey(e);break;case`Enter`:case`NumpadEnter`:case`Space`:this.onEnterKey(e);break}},onArrowRightKey:function(e){var t=this.findNextTab(e.currentTarget);t?this.changeFocusedTab(e,t):this.onHomeKey(e),e.preventDefault()},onArrowLeftKey:function(e){var t=this.findPrevTab(e.currentTarget);t?this.changeFocusedTab(e,t):this.onEndKey(e),e.preventDefault()},onHomeKey:function(e){var t=this.findFirstTab();this.changeFocusedTab(e,t),e.preventDefault()},onEndKey:function(e){var t=this.findLastTab();this.changeFocusedTab(e,t),e.preventDefault()},onPageDownKey:function(e){this.scrollInView(this.findLastTab()),e.preventDefault()},onPageUpKey:function(e){this.scrollInView(this.findFirstTab()),e.preventDefault()},onEnterKey:function(e){this.changeActiveValue()},findNextTab:function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1]?e:e.nextElementSibling;return t?l(t,`data-p-disabled`)||l(t,`data-pc-section`)===`activebar`?this.findNextTab(t):ne(t,`[data-pc-name="tab"]`):null},findPrevTab:function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1]?e:e.previousElementSibling;return t?l(t,`data-p-disabled`)||l(t,`data-pc-section`)===`activebar`?this.findPrevTab(t):ne(t,`[data-pc-name="tab"]`):null},findFirstTab:function(){return this.findNextTab(this.$pcTabList.$refs.tabs.firstElementChild,!0)},findLastTab:function(){return this.findPrevTab(this.$pcTabList.$refs.tabs.lastElementChild,!0)},changeActiveValue:function(){this.$pcTabs.updateValue(this.value)},changeFocusedTab:function(e,t){d(t),this.scrollInView(t)},scrollInView:function(e){var t;e==null||(t=e.scrollIntoView)==null||t.call(e,{block:`nearest`})}},computed:{active:function(){return oe(this.$pcTabs?.d_value,this.value)},id:function(){return`${this.$pcTabs?.$id}_tab_${this.value}`},ariaControls:function(){return`${this.$pcTabs?.$id}_tabpanel_${this.value}`},attrs:function(){return p(this.asAttrs,this.a11yAttrs,this.ptmi(`root`,this.ptParams))},asAttrs:function(){return this.as===`BUTTON`?{type:`button`,disabled:this.disabled}:void 0},a11yAttrs:function(){return{id:this.id,tabindex:this.active?this.$pcTabs.tabindex:-1,role:`tab`,"aria-selected":this.active,"aria-controls":this.ariaControls,"data-pc-name":`tab`,"data-p-disabled":this.disabled,"data-p-active":this.active,onFocus:this.onFocus,onKeydown:this.onKeydown}},ptParams:function(){return{context:{active:this.active}}},dataP:function(){return M({active:this.active})}},directives:{ripple:ce}};function Le(e,t,n,i,a,o){var s=ee(`ripple`);return e.asChild?N(e.$slots,`default`,{key:1,dataP:o.dataP,class:k(e.cx(`root`)),active:o.active,a11yAttrs:o.a11yAttrs,onClick:o.onClick}):le((E(),r(D(e.as),p({key:0,class:e.cx(`root`),"data-p":o.dataP,onClick:o.onClick},o.attrs),{default:P(function(){return[N(e.$slots,`default`)]}),_:3},16,[`class`,`data-p`,`onClick`])),[[s]])}Ie.render=Le;var Re={name:`ChevronLeftIcon`,extends:fe};function ze(e){return Ue(e)||He(e)||Ve(e)||Be()}function Be(){throw TypeError(`Invalid attempt to spread non-iterable instance.
2
+ import{t as e}from"./chunk-DtRyYLXJ.js";import{$ as t,A as n,C as r,D as i,E as a,G as o,H as s,I as c,It as l,J as u,Jt as d,K as f,L as p,M as m,Mt as h,O as g,Ot as _,P as v,Pt as y,Rt as b,S as x,T as S,U as C,Ut as w,Vt as T,W as E,X as D,Y as ee,Z as te,an as ne,dt as re,en as ie,et as ae,fn as oe,g as se,gn as O,gt as k,ht as A,i as ce,it as le,lt as j,m as ue,n as de,o as fe,on as M,pn as pe,q as N,r as me,rn as he,rt as P,s as ge,tt as _e,u as ve,vt as ye,w as F,x as I,y as L,yt as R}from"./vue-i18n-Du42D0vb.js";import{r as be,t as xe}from"./dialog-CnZ7jH1l.js";import{a as Se,r as Ce,t as we}from"./schemaNaming-q3Q55JwP.js";import{r as Te}from"./dist-CElVIpns.js";import{t as Ee}from"./preload-helper-DWTEM3RW.js";import{a as De,i as Oe,n as ke,o as Ae,t as je}from"./textarea-DMpqBhjw.js";var Me=ve.extend({name:`tabpanel`,classes:{root:function(e){return[`p-tabpanel`,{"p-tabpanel-active":e.instance.active}]}}}),Ne={name:`TabPanel`,extends:{name:`BaseTabPanel`,extends:ge,props:{value:{type:[String,Number],default:void 0},as:{type:[String,Object],default:`DIV`},asChild:{type:Boolean,default:!1},header:null,headerStyle:null,headerClass:null,headerProps:null,headerActionProps:null,contentStyle:null,contentClass:null,contentProps:null,disabled:Boolean},style:Me,provide:function(){return{$pcTabPanel:this,$parentInstance:this}}},inheritAttrs:!1,inject:[`$pcTabs`],computed:{active:function(){return oe(this.$pcTabs?.d_value,this.value)},id:function(){return`${this.$pcTabs?.$id}_tabpanel_${this.value}`},ariaLabelledby:function(){return`${this.$pcTabs?.$id}_tab_${this.value}`},attrs:function(){return p(this.a11yAttrs,this.ptmi(`root`,this.ptParams))},a11yAttrs:function(){return{id:this.id,tabindex:this.$pcTabs?.tabindex,role:`tabpanel`,"aria-labelledby":this.ariaLabelledby,"data-pc-name":`tabpanel`,"data-p-active":this.active}},ptParams:function(){return{context:{active:this.active}}}}};function Pe(e,t,n,i,a,o){var s,c;return o.$pcTabs?(E(),S(L,{key:1},[e.asChild?N(e.$slots,`default`,{key:1,class:k(e.cx(`root`)),active:o.active,a11yAttrs:o.a11yAttrs}):(E(),S(L,{key:0},[!((s=o.$pcTabs)!=null&&s.lazy)||o.active?le((E(),r(D(e.as),p({key:0,class:e.cx(`root`)},o.attrs),{default:P(function(){return[N(e.$slots,`default`)]}),_:3},16,[`class`])),[[se,(c=o.$pcTabs)!=null&&c.lazy?!0:o.active]]):F(``,!0)],64))],64)):N(e.$slots,`default`,{key:0})}Ne.render=Pe;var Fe=ve.extend({name:`tab`,classes:{root:function(e){var t=e.instance,n=e.props;return[`p-tab`,{"p-tab-active":t.active,"p-disabled":n.disabled}]}}}),Ie={name:`Tab`,extends:{name:`BaseTab`,extends:ge,props:{value:{type:[String,Number],default:void 0},disabled:{type:Boolean,default:!1},as:{type:[String,Object],default:`BUTTON`},asChild:{type:Boolean,default:!1}},style:Fe,provide:function(){return{$pcTab:this,$parentInstance:this}}},inheritAttrs:!1,inject:[`$pcTabs`,`$pcTabList`],methods:{onFocus:function(){this.$pcTabs.selectOnFocus&&this.changeActiveValue()},onClick:function(){this.changeActiveValue()},onKeydown:function(e){switch(e.code){case`ArrowRight`:this.onArrowRightKey(e);break;case`ArrowLeft`:this.onArrowLeftKey(e);break;case`Home`:this.onHomeKey(e);break;case`End`:this.onEndKey(e);break;case`PageDown`:this.onPageDownKey(e);break;case`PageUp`:this.onPageUpKey(e);break;case`Enter`:case`NumpadEnter`:case`Space`:this.onEnterKey(e);break}},onArrowRightKey:function(e){var t=this.findNextTab(e.currentTarget);t?this.changeFocusedTab(e,t):this.onHomeKey(e),e.preventDefault()},onArrowLeftKey:function(e){var t=this.findPrevTab(e.currentTarget);t?this.changeFocusedTab(e,t):this.onEndKey(e),e.preventDefault()},onHomeKey:function(e){var t=this.findFirstTab();this.changeFocusedTab(e,t),e.preventDefault()},onEndKey:function(e){var t=this.findLastTab();this.changeFocusedTab(e,t),e.preventDefault()},onPageDownKey:function(e){this.scrollInView(this.findLastTab()),e.preventDefault()},onPageUpKey:function(e){this.scrollInView(this.findFirstTab()),e.preventDefault()},onEnterKey:function(e){this.changeActiveValue()},findNextTab:function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1]?e:e.nextElementSibling;return t?l(t,`data-p-disabled`)||l(t,`data-pc-section`)===`activebar`?this.findNextTab(t):ne(t,`[data-pc-name="tab"]`):null},findPrevTab:function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1]?e:e.previousElementSibling;return t?l(t,`data-p-disabled`)||l(t,`data-pc-section`)===`activebar`?this.findPrevTab(t):ne(t,`[data-pc-name="tab"]`):null},findFirstTab:function(){return this.findNextTab(this.$pcTabList.$refs.tabs.firstElementChild,!0)},findLastTab:function(){return this.findPrevTab(this.$pcTabList.$refs.tabs.lastElementChild,!0)},changeActiveValue:function(){this.$pcTabs.updateValue(this.value)},changeFocusedTab:function(e,t){d(t),this.scrollInView(t)},scrollInView:function(e){var t;e==null||(t=e.scrollIntoView)==null||t.call(e,{block:`nearest`})}},computed:{active:function(){return oe(this.$pcTabs?.d_value,this.value)},id:function(){return`${this.$pcTabs?.$id}_tab_${this.value}`},ariaControls:function(){return`${this.$pcTabs?.$id}_tabpanel_${this.value}`},attrs:function(){return p(this.asAttrs,this.a11yAttrs,this.ptmi(`root`,this.ptParams))},asAttrs:function(){return this.as===`BUTTON`?{type:`button`,disabled:this.disabled}:void 0},a11yAttrs:function(){return{id:this.id,tabindex:this.active?this.$pcTabs.tabindex:-1,role:`tab`,"aria-selected":this.active,"aria-controls":this.ariaControls,"data-pc-name":`tab`,"data-p-disabled":this.disabled,"data-p-active":this.active,onFocus:this.onFocus,onKeydown:this.onKeydown}},ptParams:function(){return{context:{active:this.active}}},dataP:function(){return M({active:this.active})}},directives:{ripple:ce}};function Le(e,t,n,i,a,o){var s=ee(`ripple`);return e.asChild?N(e.$slots,`default`,{key:1,dataP:o.dataP,class:k(e.cx(`root`)),active:o.active,a11yAttrs:o.a11yAttrs,onClick:o.onClick}):le((E(),r(D(e.as),p({key:0,class:e.cx(`root`),"data-p":o.dataP,onClick:o.onClick},o.attrs),{default:P(function(){return[N(e.$slots,`default`)]}),_:3},16,[`class`,`data-p`,`onClick`])),[[s]])}Ie.render=Le;var Re={name:`ChevronLeftIcon`,extends:fe};function ze(e){return Ue(e)||He(e)||Ve(e)||Be()}function Be(){throw TypeError(`Invalid attempt to spread non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ve(e,t){if(e){if(typeof e==`string`)return We(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?We(e,t):void 0}}function He(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Ue(e){if(Array.isArray(e))return We(e)}function We(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ge(e,t,n,r,i,a){return E(),S(`svg`,p({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e.pti()),ze(t[0]||=[x(`path`,{d:`M9.61296 13C9.50997 13.0005 9.40792 12.9804 9.3128 12.9409C9.21767 12.9014 9.13139 12.8433 9.05902 12.7701L3.83313 7.54416C3.68634 7.39718 3.60388 7.19795 3.60388 6.99022C3.60388 6.78249 3.68634 6.58325 3.83313 6.43628L9.05902 1.21039C9.20762 1.07192 9.40416 0.996539 9.60724 1.00012C9.81032 1.00371 10.0041 1.08597 10.1477 1.22959C10.2913 1.37322 10.3736 1.56698 10.3772 1.77005C10.3808 1.97313 10.3054 2.16968 10.1669 2.31827L5.49496 6.99022L10.1669 11.6622C10.3137 11.8091 10.3962 12.0084 10.3962 12.2161C10.3962 12.4238 10.3137 12.6231 10.1669 12.7701C10.0945 12.8433 10.0083 12.9014 9.91313 12.9409C9.81801 12.9804 9.71596 13.0005 9.61296 13Z`,fill:`currentColor`},null,-1)]),16)}Re.render=Ge;var Ke={name:`ChevronRightIcon`,extends:fe};function qe(e){return Ze(e)||Xe(e)||Ye(e)||Je()}function Je(){throw TypeError(`Invalid attempt to spread non-iterable instance.
4
4
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ye(e,t){if(e){if(typeof e==`string`)return Qe(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qe(e,t):void 0}}function Xe(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Ze(e){if(Array.isArray(e))return Qe(e)}function Qe(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function $e(e,t,n,r,i,a){return E(),S(`svg`,p({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e.pti()),qe(t[0]||=[x(`path`,{d:`M4.38708 13C4.28408 13.0005 4.18203 12.9804 4.08691 12.9409C3.99178 12.9014 3.9055 12.8433 3.83313 12.7701C3.68634 12.6231 3.60388 12.4238 3.60388 12.2161C3.60388 12.0084 3.68634 11.8091 3.83313 11.6622L8.50507 6.99022L3.83313 2.31827C3.69467 2.16968 3.61928 1.97313 3.62287 1.77005C3.62645 1.56698 3.70872 1.37322 3.85234 1.22959C3.99596 1.08597 4.18972 1.00371 4.3928 1.00012C4.59588 0.996539 4.79242 1.07192 4.94102 1.21039L10.1669 6.43628C10.3137 6.58325 10.3962 6.78249 10.3962 6.99022C10.3962 7.19795 10.3137 7.39718 10.1669 7.54416L4.94102 12.7701C4.86865 12.8433 4.78237 12.9014 4.68724 12.9409C4.59212 12.9804 4.49007 13.0005 4.38708 13Z`,fill:`currentColor`},null,-1)]),16)}Ke.render=$e;var et={name:`TabList`,extends:{name:`BaseTabList`,extends:ge,props:{},style:ve.extend({name:`tablist`,classes:{root:`p-tablist`,content:`p-tablist-content p-tablist-viewport`,tabList:`p-tablist-tab-list`,activeBar:`p-tablist-active-bar`,prevButton:`p-tablist-prev-button p-tablist-nav-button`,nextButton:`p-tablist-next-button p-tablist-nav-button`}}),provide:function(){return{$pcTabList:this,$parentInstance:this}}},inheritAttrs:!1,inject:[`$pcTabs`],data:function(){return{isPrevButtonEnabled:!1,isNextButtonEnabled:!0}},resizeObserver:void 0,inkBarObserver:void 0,watch:{showNavigators:function(e){e?this.bindResizeObserver():this.unbindResizeObserver()},activeValue:{flush:`post`,handler:function(){this.updateInkBar(),this.bindInkBarObserver()}}},mounted:function(){var e=this;setTimeout(function(){e.updateInkBar(),e.bindInkBarObserver()},150),this.showNavigators&&(this.updateButtonState(),this.bindResizeObserver())},updated:function(){this.showNavigators&&this.updateButtonState()},beforeUnmount:function(){this.unbindResizeObserver(),this.unbindInkBarObserver()},methods:{onScroll:function(e){this.showNavigators&&this.updateButtonState(),e.preventDefault()},onPrevButtonClick:function(){var e=this.$refs.content,t=this.getVisibleButtonWidths(),n=b(e)-t,r=Math.abs(e.scrollLeft)-n*.8,i=Math.max(r,0);e.scrollLeft=w(e)?-1*i:i},onNextButtonClick:function(){var e=this.$refs.content,t=this.getVisibleButtonWidths(),n=b(e)-t,r=Math.abs(e.scrollLeft)+n*.8,i=e.scrollWidth-n,a=Math.min(r,i);e.scrollLeft=w(e)?-1*a:a},bindResizeObserver:function(){var e=this;this.resizeObserver=new ResizeObserver(function(){return e.updateButtonState()}),this.resizeObserver.observe(this.$refs.list)},unbindResizeObserver:function(){var e;(e=this.resizeObserver)==null||e.unobserve(this.$refs.list),this.resizeObserver=void 0},bindInkBarObserver:function(){var e=this;this.unbindInkBarObserver();var t=this.$refs.content,n=ne(t,`[data-pc-name="tab"][data-p-active="true"]`);n&&(this.inkBarObserver=new ResizeObserver(function(){return e.updateInkBar()}),this.inkBarObserver.observe(n))},unbindInkBarObserver:function(){var e;(e=this.inkBarObserver)==null||e.disconnect(),this.inkBarObserver=void 0},updateInkBar:function(){var e=this.$refs,t=e.content,n=e.inkbar,r=e.tabs;if(n){var i=ne(t,`[data-pc-name="tab"][data-p-active="true"]`);this.$pcTabs.isVertical()?(n.style.height=_(i)+`px`,n.style.top=h(i).top-h(r).top+`px`):(n.style.width=he(i)+`px`,n.style.left=h(i).left-h(r).left+`px`)}},updateButtonState:function(){var e=this.$refs,t=e.list,n=e.content,r=n.scrollTop,i=n.scrollWidth,a=n.scrollHeight,o=n.offsetWidth,s=n.offsetHeight,c=Math.abs(n.scrollLeft),l=[b(n),T(n)],u=l[0],d=l[1];this.$pcTabs.isVertical()?(this.isPrevButtonEnabled=r!==0,this.isNextButtonEnabled=t.offsetHeight>=s&&parseInt(r)!==a-d):(this.isPrevButtonEnabled=c!==0,this.isNextButtonEnabled=t.offsetWidth>=o&&parseInt(c)!==i-u)},getVisibleButtonWidths:function(){var e=this.$refs,t=e.prevButton,n=e.nextButton,r=0;return this.showNavigators&&(r=(t?.offsetWidth||0)+(n?.offsetWidth||0)),r}},computed:{templates:function(){return this.$pcTabs.$slots},activeValue:function(){return this.$pcTabs.d_value},showNavigators:function(){return this.$pcTabs.showNavigators},prevButtonAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.previous:void 0},nextButtonAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.next:void 0},dataP:function(){return M({scrollable:this.$pcTabs.scrollable})}},components:{ChevronLeftIcon:Re,ChevronRightIcon:Ke},directives:{ripple:ce}},tt=[`data-p`],nt=[`aria-label`,`tabindex`],rt=[`data-p`],it=[`aria-orientation`],at=[`aria-label`,`tabindex`];function ot(e,t,n,i,a,o){var s=ee(`ripple`);return E(),S(`div`,p({ref:`list`,class:e.cx(`root`),"data-p":o.dataP},e.ptmi(`root`)),[o.showNavigators&&a.isPrevButtonEnabled?le((E(),S(`button`,p({key:0,ref:`prevButton`,type:`button`,class:e.cx(`prevButton`),"aria-label":o.prevButtonAriaLabel,tabindex:o.$pcTabs.tabindex,onClick:t[0]||=function(){return o.onPrevButtonClick&&o.onPrevButtonClick.apply(o,arguments)}},e.ptm(`prevButton`),{"data-pc-group-section":`navigator`}),[(E(),r(D(o.templates.previcon||`ChevronLeftIcon`),p({"aria-hidden":`true`},e.ptm(`prevIcon`)),null,16))],16,nt)),[[s]]):F(``,!0),x(`div`,p({ref:`content`,class:e.cx(`content`),onScroll:t[1]||=function(){return o.onScroll&&o.onScroll.apply(o,arguments)},"data-p":o.dataP},e.ptm(`content`)),[x(`div`,p({ref:`tabs`,class:e.cx(`tabList`),role:`tablist`,"aria-orientation":o.$pcTabs.orientation||`horizontal`},e.ptm(`tabList`)),[N(e.$slots,`default`),x(`span`,p({ref:`inkbar`,class:e.cx(`activeBar`),role:`presentation`,"aria-hidden":`true`},e.ptm(`activeBar`)),null,16)],16,it)],16,rt),o.showNavigators&&a.isNextButtonEnabled?le((E(),S(`button`,p({key:1,ref:`nextButton`,type:`button`,class:e.cx(`nextButton`),"aria-label":o.nextButtonAriaLabel,tabindex:o.$pcTabs.tabindex,onClick:t[2]||=function(){return o.onNextButtonClick&&o.onNextButtonClick.apply(o,arguments)}},e.ptm(`nextButton`),{"data-pc-group-section":`navigator`}),[(E(),r(D(o.templates.nexticon||`ChevronRightIcon`),p({"aria-hidden":`true`},e.ptm(`nextIcon`)),null,16))],16,at)),[[s]]):F(``,!0)],16,tt)}et.render=ot;var st={name:`TabPanels`,extends:{name:`BaseTabPanels`,extends:ge,props:{},style:ve.extend({name:`tabpanels`,classes:{root:`p-tabpanels`}}),provide:function(){return{$pcTabPanels:this,$parentInstance:this}}},inheritAttrs:!1};function ct(e,t,n,r,i,a){return E(),S(`div`,p({class:e.cx(`root`),role:`presentation`},e.ptmi(`root`)),[N(e.$slots,`default`)],16)}st.render=ct;var lt=ve.extend({name:`tabs`,style:`
5
5
  .p-tabs {