aiex-cli 0.0.3-beta.3 → 0.0.3-beta.5

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.
@@ -74,7 +74,7 @@ function doctorDiagnosticsTableRows(d) {
74
74
  //#endregion
75
75
  //#region package.json
76
76
  var name = "aiex-cli";
77
- var version = "0.0.3-beta.3";
77
+ var version = "0.0.3-beta.5";
78
78
  var description = "JSON Schema → SQLite with AI-powered data extraction";
79
79
  var package_default = {
80
80
  name,
@@ -111,7 +111,10 @@ var package_default = {
111
111
  main: "./dist/index.mjs",
112
112
  module: "./dist/index.mjs",
113
113
  types: "./dist/index.d.mts",
114
- bin: { "aiex": "./bin/cli.mjs" },
114
+ bin: {
115
+ "aiex": "./bin/cli.mjs",
116
+ "aiex-cli": "./bin/cli.mjs"
117
+ },
115
118
  files: [
116
119
  "bin",
117
120
  "dist",
@@ -140,6 +143,7 @@ var package_default = {
140
143
  "@opentelemetry/sdk-trace-node": "catalog:",
141
144
  "ai": "catalog:",
142
145
  "better-sqlite3": "catalog:",
146
+ "chokidar": "catalog:",
143
147
  "citty": "catalog:",
144
148
  "cli-table3": "catalog:",
145
149
  "conf": "catalog:",
@@ -163,6 +167,7 @@ var package_default = {
163
167
  "tsx": "catalog:cli",
164
168
  "unpdf": "catalog:",
165
169
  "update-notifier": "catalog:",
170
+ "xlsx": "catalog:",
166
171
  "zod": "catalog:"
167
172
  },
168
173
  optionalDependencies: { "@napi-rs/system-ocr": "catalog:" },
@@ -242,10 +247,12 @@ const PdfConfigSchema = z.object({
242
247
  "unpdf",
243
248
  "mineru",
244
249
  "markitdown",
250
+ "marker",
245
251
  "external"
246
252
  ]),
247
253
  mineru: ExternalPdfConverterConfigSchema.optional(),
248
254
  markitdown: ExternalPdfConverterConfigSchema.optional(),
255
+ marker: ExternalPdfConverterConfigSchema.optional(),
249
256
  external: ExternalPdfConverterConfigSchema.optional()
250
257
  });
251
258
  const LangfuseConfigSchema = z.object({
@@ -339,10 +346,23 @@ const DEFAULT_MARKITDOWN_CONFIG = {
339
346
  fallbackToUnpdf: true,
340
347
  keepOutput: true
341
348
  };
349
+ const DEFAULT_MARKER_CONFIG = {
350
+ command: "marker_single",
351
+ args: [
352
+ "{input}",
353
+ "--output_dir",
354
+ "{outputDir}"
355
+ ],
356
+ outputFile: "{outputDir}/{basename}/{basename}.md",
357
+ timeout: 600,
358
+ fallbackToUnpdf: true,
359
+ keepOutput: true
360
+ };
342
361
  const DEFAULT_PDF_CONFIG = {
343
362
  converter: "unpdf",
344
363
  mineru: DEFAULT_MINERU_CONFIG,
345
- markitdown: DEFAULT_MARKITDOWN_CONFIG
364
+ markitdown: DEFAULT_MARKITDOWN_CONFIG,
365
+ marker: DEFAULT_MARKER_CONFIG
346
366
  };
347
367
  const DEFAULT_AI_CONFIG = {
348
368
  provider: DEFAULT_PROVIDER_CONFIG,
@@ -799,6 +819,10 @@ const TableConfigSchema = z.object({
799
819
  timestamps: z.boolean().optional(),
800
820
  softDelete: z.boolean().optional()
801
821
  });
822
+ const ExamplePairSchema = z.object({
823
+ text: z.string().min(1),
824
+ output: z.record(z.string(), z.unknown())
825
+ });
802
826
  const JsonSchemaDefinitionSchema = z.object({
803
827
  $schema: z.string().optional(),
804
828
  title: z.string().min(1),
@@ -806,7 +830,8 @@ const JsonSchemaDefinitionSchema = z.object({
806
830
  type: z.literal("object"),
807
831
  table: TableConfigSchema,
808
832
  properties: z.record(z.string(), JsonSchemaPropertySchema),
809
- required: z.array(z.string()).optional()
833
+ required: z.array(z.string()).optional(),
834
+ examples: z.array(ExamplePairSchema).optional()
810
835
  }).refine((schema) => Object.keys(schema.properties).length >= 1, {
811
836
  message: "At least one property is required",
812
837
  path: ["properties"]
@@ -948,4 +973,4 @@ async function collectDoctorDiagnostics(options = {}) {
948
973
  }
949
974
 
950
975
  //#endregion
951
- export { package_default as C, formatDoctorDiagnosticsJson as D, doctorDiagnosticsTableRows as E, name as S, buildDoctorDiagnostics as T, PLACEHOLDER_TEXT as _, parseJsonSchema as a, seedConfig as b, recognizeImageText as c, readAIConfig as d, writeAIConfig as f, PLACEHOLDER_SCHEMA as g, DEFAULT_PROMPT_CONFIG as h, JsonSchemaDefinitionSchema as i, shouldUseImageOcrFallback as l, DEFAULT_MINERU_CONFIG as m, createMigrationConfig as n, toSnakeCase as o, DEFAULT_MARKITDOWN_CONFIG as p, generateDrizzleConfig as r, generateDrizzleSchema as s, collectDoctorDiagnostics as t, getDefaultAIConfig as u, AIConfigSchema as v, version as w, description as x, createConfig as y };
976
+ export { name as C, doctorDiagnosticsTableRows as D, buildDoctorDiagnostics as E, formatDoctorDiagnosticsJson as O, description as S, version as T, PLACEHOLDER_SCHEMA as _, parseJsonSchema as a, createConfig as b, recognizeImageText as c, readAIConfig as d, writeAIConfig as f, DEFAULT_PROMPT_CONFIG as g, DEFAULT_MINERU_CONFIG as h, JsonSchemaDefinitionSchema as i, shouldUseImageOcrFallback as l, DEFAULT_MARKITDOWN_CONFIG as m, createMigrationConfig as n, toSnakeCase as o, DEFAULT_MARKER_CONFIG as p, generateDrizzleConfig as r, generateDrizzleSchema as s, collectDoctorDiagnostics as t, getDefaultAIConfig as u, PLACEHOLDER_TEXT as v, package_default as w, seedConfig as x, AIConfigSchema as y };
package/dist/index.d.mts CHANGED
@@ -137,6 +137,7 @@ declare function createMigrationConfig(cwd: string): MigrationConfig;
137
137
  declare function generateDrizzleConfig(): string;
138
138
  //#endregion
139
139
  //#region src/core/schema-sqlite/schemas.d.ts
140
+
140
141
  declare const JsonSchemaDefinitionSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
141
142
  $schema: z.ZodOptional<z.ZodString>;
142
143
  title: z.ZodString;
@@ -157,6 +158,16 @@ declare const JsonSchemaDefinitionSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects
157
158
  }>;
158
159
  properties: z.ZodRecord<z.ZodString, z.ZodType<JsonSchemaProperty, z.ZodTypeDef, JsonSchemaProperty>>;
159
160
  required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
161
+ examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
162
+ text: z.ZodString;
163
+ output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
164
+ }, "strip", z.ZodTypeAny, {
165
+ text: string;
166
+ output: Record<string, unknown>;
167
+ }, {
168
+ text: string;
169
+ output: Record<string, unknown>;
170
+ }>, "many">>;
160
171
  }, "strip", z.ZodTypeAny, {
161
172
  type: "object";
162
173
  table: {
@@ -169,6 +180,10 @@ declare const JsonSchemaDefinitionSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects
169
180
  $schema?: string | undefined;
170
181
  description?: string | undefined;
171
182
  required?: string[] | undefined;
183
+ examples?: {
184
+ text: string;
185
+ output: Record<string, unknown>;
186
+ }[] | undefined;
172
187
  }, {
173
188
  type: "object";
174
189
  table: {
@@ -181,6 +196,10 @@ declare const JsonSchemaDefinitionSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects
181
196
  $schema?: string | undefined;
182
197
  description?: string | undefined;
183
198
  required?: string[] | undefined;
199
+ examples?: {
200
+ text: string;
201
+ output: Record<string, unknown>;
202
+ }[] | undefined;
184
203
  }>, {
185
204
  type: "object";
186
205
  table: {
@@ -193,6 +212,10 @@ declare const JsonSchemaDefinitionSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects
193
212
  $schema?: string | undefined;
194
213
  description?: string | undefined;
195
214
  required?: string[] | undefined;
215
+ examples?: {
216
+ text: string;
217
+ output: Record<string, unknown>;
218
+ }[] | undefined;
196
219
  }, {
197
220
  type: "object";
198
221
  table: {
@@ -205,6 +228,10 @@ declare const JsonSchemaDefinitionSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects
205
228
  $schema?: string | undefined;
206
229
  description?: string | undefined;
207
230
  required?: string[] | undefined;
231
+ examples?: {
232
+ text: string;
233
+ output: Record<string, unknown>;
234
+ }[] | undefined;
208
235
  }>, {
209
236
  type: "object";
210
237
  table: {
@@ -217,6 +244,10 @@ declare const JsonSchemaDefinitionSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects
217
244
  $schema?: string | undefined;
218
245
  description?: string | undefined;
219
246
  required?: string[] | undefined;
247
+ examples?: {
248
+ text: string;
249
+ output: Record<string, unknown>;
250
+ }[] | undefined;
220
251
  }, {
221
252
  type: "object";
222
253
  table: {
@@ -229,6 +260,10 @@ declare const JsonSchemaDefinitionSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects
229
260
  $schema?: string | undefined;
230
261
  description?: string | undefined;
231
262
  required?: string[] | undefined;
263
+ examples?: {
264
+ text: string;
265
+ output: Record<string, unknown>;
266
+ }[] | undefined;
232
267
  }>, {
233
268
  type: "object";
234
269
  table: {
@@ -241,6 +276,10 @@ declare const JsonSchemaDefinitionSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects
241
276
  $schema?: string | undefined;
242
277
  description?: string | undefined;
243
278
  required?: string[] | undefined;
279
+ examples?: {
280
+ text: string;
281
+ output: Record<string, unknown>;
282
+ }[] | undefined;
244
283
  }, {
245
284
  type: "object";
246
285
  table: {
@@ -253,6 +292,10 @@ declare const JsonSchemaDefinitionSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects
253
292
  $schema?: string | undefined;
254
293
  description?: string | undefined;
255
294
  required?: string[] | undefined;
295
+ examples?: {
296
+ text: string;
297
+ output: Record<string, unknown>;
298
+ }[] | undefined;
256
299
  }>;
257
300
  interface ForeignKeyRef {
258
301
  table: string;
package/dist/index.mjs CHANGED
@@ -1,3 +1,3 @@
1
- import { D as formatDoctorDiagnosticsJson, E as doctorDiagnosticsTableRows, T as buildDoctorDiagnostics, a as parseJsonSchema, i as JsonSchemaDefinitionSchema, n as createMigrationConfig, r as generateDrizzleConfig, s as generateDrizzleSchema, t as collectDoctorDiagnostics } from "./doctor-collector-Cz7mb2L8.mjs";
1
+ import { D as doctorDiagnosticsTableRows, E as buildDoctorDiagnostics, O as formatDoctorDiagnosticsJson, a as parseJsonSchema, i as JsonSchemaDefinitionSchema, n as createMigrationConfig, r as generateDrizzleConfig, s as generateDrizzleSchema, t as collectDoctorDiagnostics } from "./doctor-collector-DnH1Qu1e.mjs";
2
2
 
3
3
  export { JsonSchemaDefinitionSchema, buildDoctorDiagnostics, collectDoctorDiagnostics, createMigrationConfig, doctorDiagnosticsTableRows, formatDoctorDiagnosticsJson, generateDrizzleConfig, generateDrizzleSchema, parseJsonSchema };
@@ -0,0 +1,272 @@
1
+ import{B as e,H as t,Jt as n,K as r,L as ee,Lt as i,M as a,Pn as o,Pt as s,Q as c,R as te,S as l,Sn as ne,Tn as u,U as d,W as f,Yt as p,_ as m,c as h,d as re,et as ie,g,h as _,ht as v,i as y,in as b,j as x,jn as ae,lt as S,m as C,nt as oe,t as w,un as se,v as T,w as ce,x as E}from"./button-Cdgr9Igy.js";import{i as le,n as D,r as ue,s as de,t as fe}from"./dialog-CUkPLPNP.js";import{s as pe,t as me}from"./runtime-dom.esm-bundler-ei_N7Xjw.js";import{_ as O,a as he,f as ge,m as _e,n as ve,s as ye}from"./api-client-BsgtGnzl.js";import{a as k,i as A,n as be,r as xe,s as j,t as M}from"./textarea-DEQMRfG8.js";var N={name:`MinusIcon`,extends:y};function Se(e){return P(e)||Te(e)||we(e)||Ce()}function Ce(){throw TypeError(`Invalid attempt to spread non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function we(e,t){if(e){if(typeof e==`string`)return F(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)?F(e,t):void 0}}function Te(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function P(e){if(Array.isArray(e))return F(e)}function F(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 Ee(t,n,r,ee,i,o){return e(),T(`svg`,a({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},t.pti()),Se(n[0]||=[_(`path`,{d:`M13.2222 7.77778H0.777778C0.571498 7.77778 0.373667 7.69584 0.227806 7.54998C0.0819442 7.40412 0 7.20629 0 7.00001C0 6.79373 0.0819442 6.5959 0.227806 6.45003C0.373667 6.30417 0.571498 6.22223 0.777778 6.22223H13.2222C13.4285 6.22223 13.6263 6.30417 13.7722 6.45003C13.9181 6.5959 14 6.79373 14 7.00001C14 7.20629 13.9181 7.40412 13.7722 7.54998C13.6263 7.69584 13.4285 7.77778 13.2222 7.77778Z`,fill:`currentColor`},null,-1)]),16)}N.render=Ee;var De=h.extend({name:`checkbox`,style:`
3
+ .p-checkbox {
4
+ position: relative;
5
+ display: inline-flex;
6
+ user-select: none;
7
+ vertical-align: bottom;
8
+ width: dt('checkbox.width');
9
+ height: dt('checkbox.height');
10
+ }
11
+
12
+ .p-checkbox-input {
13
+ cursor: pointer;
14
+ appearance: none;
15
+ position: absolute;
16
+ inset-block-start: 0;
17
+ inset-inline-start: 0;
18
+ width: 100%;
19
+ height: 100%;
20
+ padding: 0;
21
+ margin: 0;
22
+ opacity: 0;
23
+ z-index: 1;
24
+ outline: 0 none;
25
+ border: 1px solid transparent;
26
+ border-radius: dt('checkbox.border.radius');
27
+ }
28
+
29
+ .p-checkbox-box {
30
+ display: flex;
31
+ justify-content: center;
32
+ align-items: center;
33
+ border-radius: dt('checkbox.border.radius');
34
+ border: 1px solid dt('checkbox.border.color');
35
+ background: dt('checkbox.background');
36
+ width: dt('checkbox.width');
37
+ height: dt('checkbox.height');
38
+ transition:
39
+ background dt('checkbox.transition.duration'),
40
+ color dt('checkbox.transition.duration'),
41
+ border-color dt('checkbox.transition.duration'),
42
+ box-shadow dt('checkbox.transition.duration'),
43
+ outline-color dt('checkbox.transition.duration');
44
+ outline-color: transparent;
45
+ box-shadow: dt('checkbox.shadow');
46
+ }
47
+
48
+ .p-checkbox-icon {
49
+ transition-duration: dt('checkbox.transition.duration');
50
+ color: dt('checkbox.icon.color');
51
+ font-size: dt('checkbox.icon.size');
52
+ width: dt('checkbox.icon.size');
53
+ height: dt('checkbox.icon.size');
54
+ }
55
+
56
+ .p-checkbox:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-box {
57
+ border-color: dt('checkbox.hover.border.color');
58
+ }
59
+
60
+ .p-checkbox-checked .p-checkbox-box {
61
+ border-color: dt('checkbox.checked.border.color');
62
+ background: dt('checkbox.checked.background');
63
+ }
64
+
65
+ .p-checkbox-checked .p-checkbox-icon {
66
+ color: dt('checkbox.icon.checked.color');
67
+ }
68
+
69
+ .p-checkbox-checked:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-box {
70
+ background: dt('checkbox.checked.hover.background');
71
+ border-color: dt('checkbox.checked.hover.border.color');
72
+ }
73
+
74
+ .p-checkbox-checked:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-icon {
75
+ color: dt('checkbox.icon.checked.hover.color');
76
+ }
77
+
78
+ .p-checkbox:not(.p-disabled):has(.p-checkbox-input:focus-visible) .p-checkbox-box {
79
+ border-color: dt('checkbox.focus.border.color');
80
+ box-shadow: dt('checkbox.focus.ring.shadow');
81
+ outline: dt('checkbox.focus.ring.width') dt('checkbox.focus.ring.style') dt('checkbox.focus.ring.color');
82
+ outline-offset: dt('checkbox.focus.ring.offset');
83
+ }
84
+
85
+ .p-checkbox-checked:not(.p-disabled):has(.p-checkbox-input:focus-visible) .p-checkbox-box {
86
+ border-color: dt('checkbox.checked.focus.border.color');
87
+ }
88
+
89
+ .p-checkbox.p-invalid > .p-checkbox-box {
90
+ border-color: dt('checkbox.invalid.border.color');
91
+ }
92
+
93
+ .p-checkbox.p-variant-filled .p-checkbox-box {
94
+ background: dt('checkbox.filled.background');
95
+ }
96
+
97
+ .p-checkbox-checked.p-variant-filled .p-checkbox-box {
98
+ background: dt('checkbox.checked.background');
99
+ }
100
+
101
+ .p-checkbox-checked.p-variant-filled:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-box {
102
+ background: dt('checkbox.checked.hover.background');
103
+ }
104
+
105
+ .p-checkbox.p-disabled {
106
+ opacity: 1;
107
+ }
108
+
109
+ .p-checkbox.p-disabled .p-checkbox-box {
110
+ background: dt('checkbox.disabled.background');
111
+ border-color: dt('checkbox.checked.disabled.border.color');
112
+ }
113
+
114
+ .p-checkbox.p-disabled .p-checkbox-box .p-checkbox-icon {
115
+ color: dt('checkbox.icon.disabled.color');
116
+ }
117
+
118
+ .p-checkbox-sm,
119
+ .p-checkbox-sm .p-checkbox-box {
120
+ width: dt('checkbox.sm.width');
121
+ height: dt('checkbox.sm.height');
122
+ }
123
+
124
+ .p-checkbox-sm .p-checkbox-icon {
125
+ font-size: dt('checkbox.icon.sm.size');
126
+ width: dt('checkbox.icon.sm.size');
127
+ height: dt('checkbox.icon.sm.size');
128
+ }
129
+
130
+ .p-checkbox-lg,
131
+ .p-checkbox-lg .p-checkbox-box {
132
+ width: dt('checkbox.lg.width');
133
+ height: dt('checkbox.lg.height');
134
+ }
135
+
136
+ .p-checkbox-lg .p-checkbox-icon {
137
+ font-size: dt('checkbox.icon.lg.size');
138
+ width: dt('checkbox.icon.lg.size');
139
+ height: dt('checkbox.icon.lg.size');
140
+ }
141
+ `,classes:{root:function(e){var t=e.instance,n=e.props;return[`p-checkbox p-component`,{"p-checkbox-checked":t.checked,"p-disabled":n.disabled,"p-invalid":t.$pcCheckboxGroup?t.$pcCheckboxGroup.$invalid:t.$invalid,"p-variant-filled":t.$variant===`filled`,"p-checkbox-sm p-inputfield-sm":n.size===`small`,"p-checkbox-lg p-inputfield-lg":n.size===`large`}]},box:`p-checkbox-box`,input:`p-checkbox-input`,icon:`p-checkbox-icon`}}),Oe={name:`BaseCheckbox`,extends:k,props:{value:null,binary:Boolean,indeterminate:{type:Boolean,default:!1},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},tabindex:{type:Number,default:null},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:De,provide:function(){return{$pcCheckbox:this,$parentInstance:this}}};function I(e){"@babel/helpers - typeof";return I=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},I(e)}function L(e,t,n){return(t=ke(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ke(e){var t=Ae(e,`string`);return I(t)==`symbol`?t:t+``}function Ae(e,t){if(I(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(I(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function je(e){return Pe(e)||Ne(e)||Me(e)||R()}function R(){throw TypeError(`Invalid attempt to spread non-iterable instance.
142
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Me(e,t){if(e){if(typeof e==`string`)return z(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)?z(e,t):void 0}}function Ne(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Pe(e){if(Array.isArray(e))return z(e)}function z(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}var B={name:`Checkbox`,extends:Oe,inheritAttrs:!1,emits:[`change`,`focus`,`blur`,`update:indeterminate`],inject:{$pcCheckboxGroup:{default:void 0}},data:function(){return{d_indeterminate:this.indeterminate}},watch:{indeterminate:function(e){this.d_indeterminate=e,this.updateIndeterminate()}},mounted:function(){this.updateIndeterminate()},updated:function(){this.updateIndeterminate()},methods:{getPTOptions:function(e){return(e===`root`?this.ptmi:this.ptm)(e,{context:{checked:this.checked,indeterminate:this.d_indeterminate,disabled:this.disabled}})},onChange:function(e){var t=this;if(!this.disabled&&!this.readonly){var n=this.$pcCheckboxGroup?this.$pcCheckboxGroup.d_value:this.d_value,r=this.binary?this.d_indeterminate?this.trueValue:this.checked?this.falseValue:this.trueValue:this.checked||this.d_indeterminate?n.filter(function(e){return!ae(e,t.value)}):n?[].concat(je(n),[this.value]):[this.value];this.d_indeterminate&&(this.d_indeterminate=!1,this.$emit(`update:indeterminate`,this.d_indeterminate)),this.$pcCheckboxGroup?this.$pcCheckboxGroup.writeValue(r,e):this.writeValue(r,e),this.$emit(`change`,e)}},onFocus:function(e){this.$emit(`focus`,e)},onBlur:function(e){var t,n;this.$emit(`blur`,e),(t=(n=this.formField).onBlur)==null||t.call(n,e)},updateIndeterminate:function(){this.$refs.input&&(this.$refs.input.indeterminate=this.d_indeterminate)}},computed:{groupName:function(){return this.$pcCheckboxGroup?this.$pcCheckboxGroup.groupName:this.$formName},checked:function(){var e=this.$pcCheckboxGroup?this.$pcCheckboxGroup.d_value:this.d_value;return this.d_indeterminate?!1:this.binary?e===this.trueValue:o(this.value,e)},dataP:function(){return u(L({invalid:this.$invalid,checked:this.checked,disabled:this.disabled,filled:this.$variant===`filled`},this.size,this.size))}},components:{CheckIcon:j,MinusIcon:N}},V=[`data-p-checked`,`data-p-indeterminate`,`data-p-disabled`,`data-p`],H=[`id`,`value`,`name`,`checked`,`tabindex`,`disabled`,`readonly`,`required`,`aria-labelledby`,`aria-label`,`aria-invalid`],U=[`data-p`];function W(t,n,r,ee,i,o){var c=f(`CheckIcon`),te=f(`MinusIcon`);return e(),T(`div`,a({class:t.cx(`root`)},o.getPTOptions(`root`),{"data-p-checked":o.checked,"data-p-indeterminate":i.d_indeterminate||void 0,"data-p-disabled":t.disabled,"data-p":o.dataP}),[_(`input`,a({ref:`input`,id:t.inputId,type:`checkbox`,class:[t.cx(`input`),t.inputClass],style:t.inputStyle,value:t.value,name:o.groupName,checked:o.checked,tabindex:t.tabindex,disabled:t.disabled,readonly:t.readonly,required:t.required,"aria-labelledby":t.ariaLabelledby,"aria-label":t.ariaLabel,"aria-invalid":t.invalid||void 0,onFocus:n[0]||=function(){return o.onFocus&&o.onFocus.apply(o,arguments)},onBlur:n[1]||=function(){return o.onBlur&&o.onBlur.apply(o,arguments)},onChange:n[2]||=function(){return o.onChange&&o.onChange.apply(o,arguments)}},o.getPTOptions(`input`)),null,16,H),_(`div`,a({class:t.cx(`box`)},o.getPTOptions(`box`),{"data-p":o.dataP}),[d(t.$slots,`icon`,{checked:o.checked,indeterminate:i.d_indeterminate,class:s(t.cx(`icon`)),dataP:o.dataP},function(){return[o.checked?(e(),g(c,a({key:0,class:t.cx(`icon`)},o.getPTOptions(`icon`),{"data-p":o.dataP}),null,16,[`class`,`data-p`])):i.d_indeterminate?(e(),g(te,a({key:1,class:t.cx(`icon`)},o.getPTOptions(`icon`),{"data-p":o.dataP}),null,16,[`class`,`data-p`])):m(``,!0)]})],16,U)],16,V)}B.render=W;var G={name:`EyeIcon`,extends:y};function K(e){return Ie(e)||J(e)||q(e)||Fe()}function Fe(){throw TypeError(`Invalid attempt to spread non-iterable instance.
143
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function q(e,t){if(e){if(typeof e==`string`)return Y(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)?Y(e,t):void 0}}function J(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Ie(e){if(Array.isArray(e))return Y(e)}function Y(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 X(t,n,r,ee,i,o){return e(),T(`svg`,a({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},t.pti()),K(n[0]||=[_(`path`,{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M0.0535499 7.25213C0.208567 7.59162 2.40413 12.4 7 12.4C11.5959 12.4 13.7914 7.59162 13.9465 7.25213C13.9487 7.2471 13.9506 7.24304 13.952 7.24001C13.9837 7.16396 14 7.08239 14 7.00001C14 6.91762 13.9837 6.83605 13.952 6.76001C13.9506 6.75697 13.9487 6.75292 13.9465 6.74788C13.7914 6.4084 11.5959 1.60001 7 1.60001C2.40413 1.60001 0.208567 6.40839 0.0535499 6.74788C0.0512519 6.75292 0.0494023 6.75697 0.048 6.76001C0.0163137 6.83605 0 6.91762 0 7.00001C0 7.08239 0.0163137 7.16396 0.048 7.24001C0.0494023 7.24304 0.0512519 7.2471 0.0535499 7.25213ZM7 11.2C3.664 11.2 1.736 7.92001 1.264 7.00001C1.736 6.08001 3.664 2.80001 7 2.80001C10.336 2.80001 12.264 6.08001 12.736 7.00001C12.264 7.92001 10.336 11.2 7 11.2ZM5.55551 9.16182C5.98308 9.44751 6.48576 9.6 7 9.6C7.68891 9.59789 8.349 9.32328 8.83614 8.83614C9.32328 8.349 9.59789 7.68891 9.59999 7C9.59999 6.48576 9.44751 5.98308 9.16182 5.55551C8.87612 5.12794 8.47006 4.7947 7.99497 4.59791C7.51988 4.40112 6.99711 4.34963 6.49276 4.44995C5.98841 4.55027 5.52513 4.7979 5.16152 5.16152C4.7979 5.52513 4.55027 5.98841 4.44995 6.49276C4.34963 6.99711 4.40112 7.51988 4.59791 7.99497C4.7947 8.47006 5.12794 8.87612 5.55551 9.16182ZM6.2222 5.83594C6.45243 5.6821 6.7231 5.6 7 5.6C7.37065 5.6021 7.72553 5.75027 7.98762 6.01237C8.24972 6.27446 8.39789 6.62934 8.4 7C8.4 7.27689 8.31789 7.54756 8.16405 7.77779C8.01022 8.00802 7.79157 8.18746 7.53575 8.29343C7.27994 8.39939 6.99844 8.42711 6.72687 8.37309C6.4553 8.31908 6.20584 8.18574 6.01005 7.98994C5.81425 7.79415 5.68091 7.54469 5.6269 7.27312C5.57288 7.00155 5.6006 6.72006 5.70656 6.46424C5.81253 6.20842 5.99197 5.98977 6.2222 5.83594Z`,fill:`currentColor`},null,-1)]),16)}G.render=X;var Z={name:`EyeSlashIcon`,extends:y};function Le(e){return Ve(e)||Be(e)||ze(e)||Re()}function Re(){throw TypeError(`Invalid attempt to spread non-iterable instance.
144
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ze(e,t){if(e){if(typeof e==`string`)return He(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)?He(e,t):void 0}}function Be(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Ve(e){if(Array.isArray(e))return He(e)}function He(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 Ue(t,n,r,ee,i,o){return e(),T(`svg`,a({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},t.pti()),Le(n[0]||=[_(`path`,{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M13.9414 6.74792C13.9437 6.75295 13.9455 6.757 13.9469 6.76003C13.982 6.8394 14.0001 6.9252 14.0001 7.01195C14.0001 7.0987 13.982 7.1845 13.9469 7.26386C13.6004 8.00059 13.1711 8.69549 12.6674 9.33515C12.6115 9.4071 12.54 9.46538 12.4582 9.50556C12.3765 9.54574 12.2866 9.56678 12.1955 9.56707C12.0834 9.56671 11.9737 9.53496 11.8788 9.47541C11.7838 9.41586 11.7074 9.3309 11.6583 9.23015C11.6092 9.12941 11.5893 9.01691 11.6008 8.90543C11.6124 8.79394 11.6549 8.68793 11.7237 8.5994C12.1065 8.09726 12.4437 7.56199 12.7313 6.99995C12.2595 6.08027 10.3402 2.8014 6.99732 2.8014C6.63723 2.80218 6.27816 2.83969 5.92569 2.91336C5.77666 2.93304 5.62568 2.89606 5.50263 2.80972C5.37958 2.72337 5.29344 2.59398 5.26125 2.44714C5.22907 2.30031 5.2532 2.14674 5.32885 2.01685C5.40451 1.88696 5.52618 1.79021 5.66978 1.74576C6.10574 1.64961 6.55089 1.60134 6.99732 1.60181C11.5916 1.60181 13.7864 6.40856 13.9414 6.74792ZM2.20333 1.61685C2.35871 1.61411 2.5091 1.67179 2.6228 1.77774L12.2195 11.3744C12.3318 11.4869 12.3949 11.6393 12.3949 11.7983C12.3949 11.9572 12.3318 12.1097 12.2195 12.2221C12.107 12.3345 11.9546 12.3976 11.7956 12.3976C11.6367 12.3976 11.4842 12.3345 11.3718 12.2221L10.5081 11.3584C9.46549 12.0426 8.24432 12.4042 6.99729 12.3981C2.403 12.3981 0.208197 7.59135 0.0532336 7.25198C0.0509364 7.24694 0.0490875 7.2429 0.0476856 7.23986C0.0162332 7.16518 3.05176e-05 7.08497 3.05176e-05 7.00394C3.05176e-05 6.92291 0.0162332 6.8427 0.0476856 6.76802C0.631261 5.47831 1.46902 4.31959 2.51084 3.36119L1.77509 2.62545C1.66914 2.51175 1.61146 2.36136 1.61421 2.20597C1.61695 2.05059 1.6799 1.90233 1.78979 1.79244C1.89968 1.68254 2.04794 1.6196 2.20333 1.61685ZM7.45314 8.35147L5.68574 6.57609V6.5361C5.5872 6.78938 5.56498 7.06597 5.62183 7.33173C5.67868 7.59749 5.8121 7.84078 6.00563 8.03158C6.19567 8.21043 6.43052 8.33458 6.68533 8.39089C6.94014 8.44721 7.20543 8.43359 7.45314 8.35147ZM1.26327 6.99994C1.7351 7.91163 3.64645 11.1985 6.99729 11.1985C7.9267 11.2048 8.8408 10.9618 9.64438 10.4947L8.35682 9.20718C7.86027 9.51441 7.27449 9.64491 6.69448 9.57752C6.11446 9.51014 5.57421 9.24881 5.16131 8.83592C4.74842 8.42303 4.4871 7.88277 4.41971 7.30276C4.35232 6.72274 4.48282 6.13697 4.79005 5.64041L3.35855 4.2089C2.4954 5.00336 1.78523 5.94935 1.26327 6.99994Z`,fill:`currentColor`},null,-1)]),16)}Z.render=Ue;var We=h.extend({name:`password`,style:`
145
+ .p-password {
146
+ display: inline-flex;
147
+ position: relative;
148
+ }
149
+
150
+ .p-password .p-password-overlay {
151
+ min-width: 100%;
152
+ }
153
+
154
+ .p-password-meter {
155
+ height: dt('password.meter.height');
156
+ background: dt('password.meter.background');
157
+ border-radius: dt('password.meter.border.radius');
158
+ }
159
+
160
+ .p-password-meter-label {
161
+ height: 100%;
162
+ width: 0;
163
+ transition: width 1s ease-in-out;
164
+ border-radius: dt('password.meter.border.radius');
165
+ }
166
+
167
+ .p-password-meter-weak {
168
+ background: dt('password.strength.weak.background');
169
+ }
170
+
171
+ .p-password-meter-medium {
172
+ background: dt('password.strength.medium.background');
173
+ }
174
+
175
+ .p-password-meter-strong {
176
+ background: dt('password.strength.strong.background');
177
+ }
178
+
179
+ .p-password-fluid {
180
+ display: flex;
181
+ }
182
+
183
+ .p-password-fluid .p-password-input {
184
+ width: 100%;
185
+ }
186
+
187
+ .p-password-input::-ms-reveal,
188
+ .p-password-input::-ms-clear {
189
+ display: none;
190
+ }
191
+
192
+ .p-password-overlay {
193
+ padding: dt('password.overlay.padding');
194
+ background: dt('password.overlay.background');
195
+ color: dt('password.overlay.color');
196
+ border: 1px solid dt('password.overlay.border.color');
197
+ box-shadow: dt('password.overlay.shadow');
198
+ border-radius: dt('password.overlay.border.radius');
199
+ }
200
+
201
+ .p-password-content {
202
+ display: flex;
203
+ flex-direction: column;
204
+ gap: dt('password.content.gap');
205
+ }
206
+
207
+ .p-password-toggle-mask-icon {
208
+ inset-inline-end: dt('form.field.padding.x');
209
+ color: dt('password.icon.color');
210
+ position: absolute;
211
+ top: 50%;
212
+ margin-top: calc(-1 * calc(dt('icon.size') / 2));
213
+ width: dt('icon.size');
214
+ height: dt('icon.size');
215
+ }
216
+
217
+ .p-password-clear-icon {
218
+ position: absolute;
219
+ top: 50%;
220
+ margin-top: -0.5rem;
221
+ cursor: pointer;
222
+ inset-inline-end: dt('form.field.padding.x');
223
+ color: dt('form.field.icon.color');
224
+ }
225
+
226
+ .p-password:has(.p-password-toggle-mask-icon) .p-password-input {
227
+ padding-inline-end: calc((dt('form.field.padding.x') * 2) + dt('icon.size'));
228
+ }
229
+
230
+ .p-password:has(.p-password-toggle-mask-icon) .p-password-clear-icon {
231
+ inset-inline-end: calc((dt('form.field.padding.x') * 2) + dt('icon.size'));
232
+ }
233
+
234
+ .p-password:has(.p-password-clear-icon) .p-password-input {
235
+ padding-inline-end: calc((dt('form.field.padding.x') * 2) + dt('icon.size'));
236
+ }
237
+
238
+ .p-password:has(.p-password-clear-icon):has(.p-password-toggle-mask-icon) .p-password-input {
239
+ padding-inline-end: calc((dt('form.field.padding.x') * 3) + calc(dt('icon.size') * 2));
240
+ }
241
+
242
+ `,classes:{root:function(e){var t=e.instance;return[`p-password p-component p-inputwrapper`,{"p-inputwrapper-filled":t.$filled,"p-inputwrapper-focus":t.focused,"p-password-fluid":t.$fluid}]},pcInputText:`p-password-input`,maskIcon:`p-password-toggle-mask-icon p-password-mask-icon`,unmaskIcon:`p-password-toggle-mask-icon p-password-unmask-icon`,clearIcon:`p-password-clear-icon`,overlay:`p-password-overlay p-component`,content:`p-password-content`,meter:`p-password-meter`,meterLabel:function(e){var t=e.instance;return`p-password-meter-label ${t.meter?`p-password-meter-`+t.meter.strength:``}`},meterText:`p-password-meter-text`},inlineStyles:{root:function(e){return{position:e.props.appendTo===`self`?`relative`:void 0}}}}),Ge={name:`BasePassword`,extends:k,props:{promptLabel:{type:String,default:null},mediumRegex:{type:[String,RegExp],default:`^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})`},strongRegex:{type:[String,RegExp],default:`^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})`},weakLabel:{type:String,default:null},mediumLabel:{type:String,default:null},strongLabel:{type:String,default:null},feedback:{type:Boolean,default:!0},appendTo:{type:[String,Object],default:`body`},toggleMask:{type:Boolean,default:!1},hideIcon:{type:String,default:void 0},maskIcon:{type:String,default:void 0},showIcon:{type:String,default:void 0},unmaskIcon:{type:String,default:void 0},showClear:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},required:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelId:{type:String,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},overlayId:{type:String,default:null},overlayClass:{type:[String,Object],default:null},overlayStyle:{type:Object,default:null},overlayProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null},autofocus:{type:Boolean,default:null}},style:We,provide:function(){return{$pcPassword:this,$parentInstance:this}}};function Q(e){"@babel/helpers - typeof";return Q=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Q(e)}function Ke(e,t,n){return(t=qe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qe(e){var t=Je(e,`string`);return Q(t)==`symbol`?t:t+``}function Je(e,t){if(Q(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Q(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Ye={name:`Password`,extends:Ge,inheritAttrs:!1,emits:[`change`,`focus`,`blur`,`invalid`],inject:{$pcFluid:{default:null}},data:function(){return{overlayVisible:!1,meter:null,infoText:null,focused:!1,unmasked:!1}},mediumCheckRegExp:null,strongCheckRegExp:null,resizeListener:null,scrollHandler:null,overlay:null,mounted:function(){this.infoText=this.promptText,this.mediumCheckRegExp=new RegExp(this.mediumRegex),this.strongCheckRegExp=new RegExp(this.strongRegex)},beforeUnmount:function(){this.unbindResizeListener(),this.scrollHandler&&=(this.scrollHandler.destroy(),null),this.overlay&&=(de.clear(this.overlay),null)},methods:{onOverlayEnter:function(e){de.set(`overlay`,e,this.$primevue.config.zIndex.overlay),b(e,{position:`absolute`,top:`0`}),this.alignOverlay(),this.bindScrollListener(),this.bindResizeListener(),this.$attrSelector&&e.setAttribute(this.$attrSelector,``)},onOverlayLeave:function(){this.unbindScrollListener(),this.unbindResizeListener(),this.overlay=null},onOverlayAfterLeave:function(e){de.clear(e)},alignOverlay:function(){this.appendTo===`self`?p(this.overlay,this.$refs.input.$el):(this.overlay.style.minWidth=ne(this.$refs.input.$el)+`px`,n(this.overlay,this.$refs.input.$el))},testStrength:function(e){var t=0;return this.strongCheckRegExp.test(e)?t=3:this.mediumCheckRegExp.test(e)?t=2:e.length&&(t=1),t},onInput:function(e){this.writeValue(e.target.value,e),this.$emit(`change`,e)},onFocus:function(e){this.focused=!0,this.feedback&&(this.setPasswordMeter(this.d_value),this.overlayVisible=!0),this.$emit(`focus`,e)},onBlur:function(e){this.focused=!1,this.feedback&&(this.overlayVisible=!1),this.$emit(`blur`,e)},onKeyUp:function(e){if(this.feedback){var t=e.target.value,n=this.checkPasswordStrength(t),r=n.meter,ee=n.label;if(this.meter=r,this.infoText=ee,e.code===`Escape`){this.overlayVisible&&=!1;return}this.overlayVisible||=!0}},setPasswordMeter:function(){if(!this.d_value){this.meter=null,this.infoText=this.promptText;return}var e=this.checkPasswordStrength(this.d_value),t=e.meter,n=e.label;this.meter=t,this.infoText=n,this.overlayVisible||=!0},checkPasswordStrength:function(e){var t=null,n=null;switch(this.testStrength(e)){case 1:t=this.weakText,n={strength:`weak`,width:`33.33%`};break;case 2:t=this.mediumText,n={strength:`medium`,width:`66.66%`};break;case 3:t=this.strongText,n={strength:`strong`,width:`100%`};break;default:t=this.promptText,n=null;break}return{label:t,meter:n}},onInvalid:function(e){this.$emit(`invalid`,e)},bindScrollListener:function(){var e=this;this.scrollHandler||=new le(this.$refs.input.$el,function(){e.overlayVisible&&=!1}),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!se()&&(e.overlayVisible=!1)},window.addEventListener(`resize`,this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&=(window.removeEventListener(`resize`,this.resizeListener),null)},overlayRef:function(e){this.overlay=e},onMaskToggle:function(){this.unmasked=!this.unmasked},onClearClick:function(e){this.writeValue(null,{})},onOverlayClick:function(e){xe.emit(`overlay-click`,{originalEvent:e,target:this.$el})}},computed:{inputType:function(){return this.unmasked?`text`:`password`},weakText:function(){return this.weakLabel||this.$primevue.config.locale.weak},mediumText:function(){return this.mediumLabel||this.$primevue.config.locale.medium},strongText:function(){return this.strongLabel||this.$primevue.config.locale.strong},promptText:function(){return this.promptLabel||this.$primevue.config.locale.passwordPrompt},isClearIconVisible:function(){return this.showClear&&this.$filled&&!this.disabled},overlayUniqueId:function(){return this.$id+`_overlay`},containerDataP:function(){return u({fluid:this.$fluid})},meterDataP:function(){return u(Ke({},this.meter?.strength,this.meter?.strength))},overlayDataP:function(){return u(Ke({},`portal-`+this.appendTo,`portal-`+this.appendTo))}},components:{InputText:A,Portal:D,EyeSlashIcon:Z,EyeIcon:G,TimesIcon:ue}};function $(e){"@babel/helpers - typeof";return $=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},$(e)}function Xe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ze(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Xe(Object(n),!0).forEach(function(t){Qe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xe(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Qe(e,t,n){return(t=$e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $e(e){var t=et(e,`string`);return $(t)==`symbol`?t:t+``}function et(e,t){if($(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var tt=[`data-p`],nt=[`id`,`data-p`],rt=[`data-p`];function it(t,n,ee,o,s,c){var te=f(`InputText`),ne=f(`TimesIcon`),u=f(`Portal`);return e(),T(`div`,a({class:t.cx(`root`),style:t.sx(`root`),"data-p":c.containerDataP},t.ptmi(`root`)),[l(te,a({ref:`input`,id:t.inputId,type:c.inputType,class:[t.cx(`pcInputText`),t.inputClass],style:t.inputStyle,defaultValue:t.d_value,name:t.$formName,"aria-labelledby":t.ariaLabelledby,"aria-label":t.ariaLabel,"aria-expanded":s.overlayVisible,"aria-controls":s.overlayVisible?t.overlayProps&&t.overlayProps.id||t.overlayId||t.panelProps&&t.panelProps.id||t.panelId||c.overlayUniqueId:void 0,"aria-haspopup":t.feedback,placeholder:t.placeholder,required:t.required,fluid:t.fluid,disabled:t.disabled,variant:t.variant,invalid:t.invalid,size:t.size,autofocus:t.autofocus,onInput:c.onInput,onFocus:c.onFocus,onBlur:c.onBlur,onKeyup:c.onKeyUp,onInvalid:c.onInvalid},t.inputProps,{"data-p-has-e-icon":t.toggleMask,pt:t.ptm(`pcInputText`),unstyled:t.unstyled}),null,16,`id.type.class.style.defaultValue.name.aria-labelledby.aria-label.aria-expanded.aria-controls.aria-haspopup.placeholder.required.fluid.disabled.variant.invalid.size.autofocus.onInput.onFocus.onBlur.onKeyup.onInvalid.data-p-has-e-icon.pt.unstyled`.split(`.`)),t.toggleMask&&s.unmasked?d(t.$slots,t.$slots.maskicon?`maskicon`:`hideicon`,a({key:0,toggleCallback:c.onMaskToggle,class:[t.cx(`maskIcon`),t.maskIcon]},t.ptm(`maskIcon`)),function(){return[(e(),g(r(t.maskIcon?`i`:`EyeSlashIcon`),a({class:[t.cx(`maskIcon`),t.maskIcon],onClick:c.onMaskToggle},t.ptm(`maskIcon`)),null,16,[`class`,`onClick`]))]}):m(``,!0),t.toggleMask&&!s.unmasked?d(t.$slots,t.$slots.unmaskicon?`unmaskicon`:`showicon`,a({key:1,toggleCallback:c.onMaskToggle,class:[t.cx(`unmaskIcon`)]},t.ptm(`unmaskIcon`)),function(){return[(e(),g(r(t.unmaskIcon?`i`:`EyeIcon`),a({class:[t.cx(`unmaskIcon`),t.unmaskIcon],onClick:c.onMaskToggle},t.ptm(`unmaskIcon`)),null,16,[`class`,`onClick`]))]}):m(``,!0),c.isClearIconVisible?d(t.$slots,`clearicon`,a({key:2,class:t.cx(`clearIcon`),clearCallback:c.onClearClick},t.ptm(`clearIcon`)),function(){return[l(ne,a({class:[t.cx(`clearIcon`)],onClick:c.onClearClick},t.ptm(`clearIcon`)),null,16,[`class`,`onClick`])]}):m(``,!0),_(`span`,a({class:`p-hidden-accessible`,"aria-live":`polite`},t.ptm(`hiddenAccesible`),{"data-p-hidden-accessible":!0}),i(s.infoText),17),l(u,{appendTo:t.appendTo},{default:oe(function(){return[l(me,a({name:`p-anchored-overlay`,onEnter:c.onOverlayEnter,onLeave:c.onOverlayLeave,onAfterLeave:c.onOverlayAfterLeave},t.ptm(`transition`)),{default:oe(function(){return[s.overlayVisible?(e(),T(`div`,a({key:0,ref:c.overlayRef,id:t.overlayId||t.panelId||c.overlayUniqueId,class:[t.cx(`overlay`),t.panelClass,t.overlayClass],style:[t.overlayStyle,t.panelStyle],onClick:n[0]||=function(){return c.onOverlayClick&&c.onOverlayClick.apply(c,arguments)},"data-p":c.overlayDataP,role:`dialog`,"aria-live":`polite`},Ze(Ze(Ze({},t.panelProps),t.overlayProps),t.ptm(`overlay`))),[d(t.$slots,`header`),d(t.$slots,`content`,{},function(){return[_(`div`,a({class:t.cx(`content`)},t.ptm(`content`)),[_(`div`,a({class:t.cx(`meter`)},t.ptm(`meter`)),[_(`div`,a({class:t.cx(`meterLabel`),style:{width:s.meter?s.meter.width:``},"data-p":c.meterDataP},t.ptm(`meterLabel`)),null,16,rt)],16),_(`div`,a({class:t.cx(`meterText`)},t.ptm(`meterText`)),i(s.infoText),17)],16)]}),d(t.$slots,`footer`)],16,nt)):m(``,!0)]}),_:3},16,[`onEnter`,`onLeave`,`onAfterLeave`])]}),_:3},8,[`appendTo`])],16,tt)}Ye.render=it;var at={key:0,class:`flex items-center justify-center py-8`},ot={key:1,class:`space-y-6`},st={class:`space-y-3`},ct={class:`flex flex-col gap-1`},lt={class:`flex flex-col gap-1`},ut={class:`flex flex-col gap-1`},dt={class:`space-y-2`},ft={class:`text-sm font-mono flex-1`},pt={key:0,class:`flex flex-col gap-2 px-3 py-2 rounded border border-border bg-card`},mt={class:`flex items-center gap-2`},ht={class:`flex items-center gap-4 text-xs`},gt={class:`flex items-center gap-1.5 cursor-pointer`},_t={class:`flex items-center gap-1.5 cursor-pointer`},vt={key:0,class:`text-muted-foreground ml-auto`},yt={class:`space-y-3`},bt={class:`flex items-center justify-between gap-3`},xt={class:`font-medium`},St={key:0,class:`text-xs`},Ct={key:1,class:`text-xs`},wt={class:`mt-1 text-xs leading-relaxed`},Tt={key:0,class:`space-y-3 pl-6 border-l-2 border-border`},Et={class:`flex flex-col gap-1`},Dt={class:`flex flex-col gap-1`},Ot={class:`flex flex-col gap-1`},kt={class:`space-y-3`},At={class:`flex flex-col gap-1`},jt={key:0,class:`space-y-3 pl-6 border-l-2 border-border`},Mt={class:`flex flex-col gap-1`},Nt={class:`flex flex-col gap-1`},Pt={class:`flex flex-col gap-1`},Ft={class:`flex items-center gap-2`},It={class:`flex items-center gap-2`},Lt={key:1,class:`space-y-3 pl-6 border-l-2 border-border`},Rt={class:`flex flex-col gap-1`},zt={class:`flex flex-col gap-1`},Bt={class:`flex flex-col gap-1`},Vt={class:`flex items-center gap-2`},Ht={class:`flex items-center gap-2`},Ut={key:2,class:`space-y-3 pl-6 border-l-2 border-border`},Wt={class:`flex flex-col gap-1`},Gt={class:`flex flex-col gap-1`},Kt={class:`flex flex-col gap-1`},qt={class:`flex items-center gap-2`},Jt={class:`flex items-center gap-2`},Yt={key:3,class:`space-y-3 pl-6 border-l-2 border-border`},Xt={class:`flex flex-col gap-1`},Zt={class:`flex flex-col gap-1`},Qt={class:`flex flex-col gap-1`},$t={class:`flex flex-col gap-1`},en={class:`flex items-center gap-2`},tn={class:`flex items-center gap-2`},nn={class:`space-y-3`},rn={class:`flex items-center gap-2`},an={key:0,class:`space-y-3 pl-6 border-l-2 border-border`},on={class:`flex flex-col gap-1`},sn={class:`flex flex-col gap-1`},cn={class:`flex flex-col gap-1`},ln={class:`space-y-3`},un={class:`flex items-center gap-2`},dn={class:`space-y-3 pl-6 border-l-2 border-border`},fn={class:`flex flex-col gap-1`},pn={class:`flex flex-col gap-1`},mn={class:`flex flex-col gap-1`},hn={class:`flex items-center gap-2`},gn={key:0,class:`text-xs text-green-600`},_n={class:`rounded border border-border`},vn={key:0,class:`space-y-3 border-t border-border p-3`},yn={class:`flex flex-col gap-1`},bn={class:`flex flex-col gap-1`},xn={class:`flex items-center justify-between gap-2`},Sn={key:0,class:`text-xs text-muted-foreground`},Cn={key:0,class:`text-xs text-red-500 mt-1`},wn={class:`space-y-3`},Tn={class:`flex flex-col gap-1`},En={key:0,class:`text-xs text-red-500 mt-1`},Dn={class:`flex flex-col gap-1`},On={key:0,class:`text-xs text-red-500 mt-1`},kn={class:`flex justify-end gap-2`},An=`You are a professional data extraction assistant. Your task is to extract structured data from text and return a JSON object based on the data structure definition provided below.
243
+
244
+ {schema}
245
+
246
+ Extraction requirements:
247
+ 1. Extract data strictly according to the field names and types defined in the structure
248
+ 2. If a field's information is missing from the text, set that field to null
249
+ 3. Do not add fields that are not in the structure definition
250
+ 4. Maintain data accuracy and completeness`,jn=`Please extract data from the following text:
251
+ {text}`,Mn=ce({__name:`AISettings`,props:x({schemas:{}},{visible:{type:Boolean,default:!1},visibleModifiers:{}}),emits:[`update:visible`],setup(n){let r=n,a=c(n,`visible`),o=S(!1),ne=S(!1),u=S(`https://dashscope.aliyuncs.com/compatible-mode/v1`),d=S(``),f=S(300),p=S([]),h=S(``),y=S(``),b=S(`unpdf`),x=S(`mineru`),ae=S(`-p
252
+ {input}
253
+ -o
254
+ {outputDir}`),se=S(600),ce=S(!0),le=S(!0),D=S(`markitdown`),ue=S(`{input}
255
+ -o
256
+ {outputDir}/{basename}.md`),de=S(`{outputDir}/{basename}.md`),me=S(600),k=S(!0),xe=S(!0),j=S(`marker_single`),N=S(`{input}
257
+ --output_dir
258
+ {outputDir}`),Se=S(`{outputDir}/{basename}/{basename}.md`),Ce=S(600),we=S(!0),Te=S(!0),P=S(``),F=S(``),Ee=S(``),De=S(600),Oe=S(!0),I=S(!0),L=S(`auto`),ke=S(`en-US, zh-Hans`),Ae=S(0),je=S(!1),R=S(!1),Me=S(``),Ne=S(``),Pe=S(``),z=S(!1),V=S(``),H=S({}),U=S(``),W=S(``),G=S(``),K=S(``),Fe=S(!1),q=S([]),J=S([]),Ie=S(!1),Y=S(!1),X=S(``),Z=S({vision:!1,structuredOutput:!1}),Le=S(`manual`);function Re(){Le.value=`manual`,Z.value={vision:!1,structuredOutput:!1},X.value&&ge(X.value).then(e=>{e&&(Z.value={...e},Le.value=`registry`)})}function ze(){X.value&&(p.value.push({name:X.value,capabilities:{...Z.value}}),Ve())}function Be(){Ve()}function Ve(){X.value=``,Z.value={vision:!1,structuredOutput:!1},Le.value=`manual`,Y.value=!1}function He(e){p.value.splice(e,1)}let Ue=C(()=>h.value.includes(`{schema}`)?``:`System prompt must contain the {schema} placeholder`),We=C(()=>y.value.includes(`{text}`)?``:`User prompt must contain the {text} placeholder`),Ge=C(()=>r.schemas.map(e=>e.replace(`.json`,``))),Q=C(()=>{let e=K.value.trim();if(!e)return``;try{let t=JSON.parse(e);if(!t||typeof t!=`object`||Array.isArray(t))return`Field map must be a JSON object`;for(let[e,n]of Object.entries(t))if(typeof n!=`string`)return`Field map value for "${e}" must be a string`;return``}catch{return`Field map must be valid JSON`}}),Ke=C(()=>{try{return Object.keys($e()??{}).length}catch{return 0}}),qe=C(()=>q.value.length===0?``:J.value.length===0?`Connected · ${q.value.length} properties loaded`:`Connected · ${Ke.value}/${J.value.length} fields mapped`),Je=C(()=>p.value.some(e=>e.capabilities.vision)),$=C(()=>L.value===`off`?`OCR disabled`:L.value===`local`?`Require local OCR`:`Auto`),Xe=C(()=>Je.value?`Image files will use your configured vision model first.`:L.value===`off`?`No vision model is configured, and local OCR fallback is disabled.`:L.value===`local`?`No vision model is configured. Image text will require local OCR on macOS or Windows.`:`No vision model is configured. On macOS or Windows, local OCR will be tried automatically for text-heavy images.`),Ze=C(()=>Je.value?`border-green-200 bg-green-50 text-green-800`:L.value===`off`?`border-yellow-200 bg-yellow-50 text-yellow-800`:`border-blue-200 bg-blue-50 text-blue-800`),Qe=C(()=>!Ue.value&&!We.value&&!Q.value&&!o.value&&p.value.length>0&&(!z.value||!!V.value.trim())&&(b.value!==`mineru`||!!x.value.trim())&&(b.value!==`markitdown`||!!D.value.trim())&&(b.value!==`marker`||!!j.value.trim())&&(b.value!==`external`||!!P.value.trim()));function $e(){if(!K.value.trim())return;let e=JSON.parse(K.value),t=Object.fromEntries(Object.entries(e).map(([e,t])=>[e,typeof t==`string`?t.trim():``]).filter(([e,t])=>!!e&&!!t));return Object.keys(t).length>0?t:void 0}function et(e){if(!e?.properties||typeof e.properties!=`object`)return[];let t=[];function n(e,r=``){for(let[ee,i]of Object.entries(e)){let e=r?`${r}.${ee}`:ee;if(i?.type===`object`&&i?.properties&&typeof i.properties==`object`){n(i.properties,e);continue}i?.type===`array`&&i?.items?.type===`object`||t.push(e)}}return n(e.properties),t}function tt(e){let t={};for(let n of J.value)t[n]=e?.[n]??``;for(let[n,r]of Object.entries(e??{}))n in t||(t[n]=r);return Object.keys(t).length>0?JSON.stringify(t,null,2):``}function nt(e=U.value){if(!e||Q.value)return;let t=W.value.trim(),n=G.value.trim(),r=$e();if(!t){let t={...H.value};delete t[e],H.value=t;return}H.value={...H.value,[e]:{databaseId:t,titleProperty:n||void 0,fieldMap:r}}}function rt(){let e=U.value?H.value[U.value]:void 0;W.value=e?.databaseId??``,G.value=e?.titleProperty??``,K.value=tt(e?.fieldMap),q.value=[]}ie(Ge,e=>{!U.value&&e.length>0&&(U.value=e[0])},{immediate:!0}),ie(U,(e,t)=>{t&&nt(t),it()});async function it(){let e=U.value;if(J.value=[],!e){rt();return}try{J.value=et(await he(`${e}.json`))}catch{J.value=[]}rt()}let Mn=[{label:`Built-in text extraction (unpdf)`,value:`unpdf`},{label:`MinerU (mineru)`,value:`mineru`},{label:`MarkItDown (markitdown)`,value:`markitdown`},{label:`Marker (marker_single)`,value:`marker`},{label:`Custom External Command`,value:`external`}],Nn=[{label:`Auto on macOS or Windows when no vision model exists`,value:`auto`},{label:`Off`,value:`off`},{label:`Require local OCR`,value:`local`}];async function Pn(){o.value=!0;try{let e=await ve();u.value=e.provider.baseURL,d.value=e.provider.apiKey,f.value=e.provider.timeout??300,p.value=e.provider.models??[],h.value=e.prompt.systemTemplate,y.value=e.prompt.userTemplate,b.value=e.pdf?.converter??`unpdf`,x.value=e.pdf?.mineru?.command??`mineru`,ae.value=(e.pdf?.mineru?.args??[`-p`,`{input}`,`-o`,`{outputDir}`]).join(`
259
+ `),se.value=e.pdf?.mineru?.timeout??600,ce.value=e.pdf?.mineru?.fallbackToUnpdf??!0,le.value=e.pdf?.mineru?.keepOutput??!0,D.value=e.pdf?.markitdown?.command??`markitdown`,ue.value=(e.pdf?.markitdown?.args??[`{input}`,`-o`,`{outputDir}/{basename}.md`]).join(`
260
+ `),de.value=e.pdf?.markitdown?.outputFile??`{outputDir}/{basename}.md`,me.value=e.pdf?.markitdown?.timeout??600,k.value=e.pdf?.markitdown?.fallbackToUnpdf??!0,xe.value=e.pdf?.markitdown?.keepOutput??!0,j.value=e.pdf?.marker?.command??`marker_single`,N.value=(e.pdf?.marker?.args??[`{input}`,`--output_dir`,`{outputDir}`]).join(`
261
+ `),Se.value=e.pdf?.marker?.outputFile??`{outputDir}/{basename}/{basename}.md`,Ce.value=e.pdf?.marker?.timeout??600,we.value=e.pdf?.marker?.fallbackToUnpdf??!0,Te.value=e.pdf?.marker?.keepOutput??!0,P.value=e.pdf?.external?.command??``,F.value=(e.pdf?.external?.args??[]).join(`
262
+ `),Ee.value=e.pdf?.external?.outputFile??``,De.value=e.pdf?.external?.timeout??600,Oe.value=e.pdf?.external?.fallbackToUnpdf??!0,I.value=e.pdf?.external?.keepOutput??!0,L.value=e.image?.ocrFallback??`auto`,ke.value=e.image?.ocrLanguages??`en-US, zh-Hans`,Ae.value=e.image?.ocrMinConfidence??0,R.value=!!e.langfuse,Me.value=e.langfuse?.publicKey??``,Ne.value=e.langfuse?.secretKey??``,Pe.value=e.langfuse?.host??``,z.value=!!e.notion?.enabled,V.value=e.notion?.token??``,H.value=e.notion?.schemas??{},await it()}catch{d.value=``,p.value=[],h.value=An,y.value=jn}finally{o.value=!1}}async function Fn(){if(Qe.value){ne.value=!0;try{nt(),await _e({provider:{baseURL:u.value,apiKey:d.value,timeout:f.value,models:p.value},prompt:{systemTemplate:h.value,userTemplate:y.value},extraction:{outputDir:`.aiex/extracted`},image:{ocrFallback:L.value,ocrLanguages:ke.value.trim()||void 0,ocrMinConfidence:Ae.value},pdf:{converter:b.value,mineru:{command:x.value,args:ae.value.split(`
263
+ `).map(e=>e.trim()).filter(Boolean),timeout:se.value,fallbackToUnpdf:ce.value,keepOutput:le.value||void 0},markitdown:{command:D.value,args:ue.value.split(`
264
+ `).map(e=>e.trim()).filter(Boolean),outputFile:de.value.trim()||void 0,timeout:me.value,fallbackToUnpdf:k.value,keepOutput:xe.value||void 0},marker:{command:j.value,args:N.value.split(`
265
+ `).map(e=>e.trim()).filter(Boolean),outputFile:Se.value.trim()||void 0,timeout:Ce.value,fallbackToUnpdf:we.value,keepOutput:Te.value||void 0},external:{command:P.value,args:F.value.split(`
266
+ `).map(e=>e.trim()).filter(Boolean),outputFile:Ee.value.trim()||void 0,timeout:De.value,fallbackToUnpdf:Oe.value,keepOutput:I.value||void 0}},langfuse:R.value?{publicKey:Me.value,secretKey:Ne.value,host:Pe.value||void 0}:void 0,notion:{enabled:z.value,token:V.value,schemas:H.value}}),a.value=!1}catch(e){O.error(e.message||`Failed to save`)}finally{ne.value=!1}}}async function In(){if(!U.value){O.error(`Select a schema first`);return}if(!V.value.trim()){O.error(`Enter a Notion integration token`);return}if(!W.value.trim()){O.error(`Enter a Notion database or data source URL/ID`);return}if(Q.value){O.error(Q.value);return}Fe.value=!0;try{let e=await ye({token:V.value,databaseId:W.value,schemaName:U.value});(e.dataSourceId||e.databaseId)&&(W.value=e.dataSourceId??e.databaseId??``),!G.value&&e.titleProperty&&(G.value=e.titleProperty);let t=$e()??{},n={...e.suggestedFieldMap??{},...t};K.value=Object.keys(n).length>0?JSON.stringify(n,null,2):``,q.value=e.properties??[],nt(),O.success(`Connected to Notion (${q.value.length} properties)`)}catch(e){O.error(e instanceof Error?e.message:`Notion connection failed`)}finally{Fe.value=!1}}return ee(()=>{Pn()}),te(()=>{}),(n,r)=>(e(),g(v(fe),{visible:a.value,"onUpdate:visible":r[47]||=e=>a.value=e,modal:``,header:`AI Settings`,style:{width:`680px`},draggable:!1},{footer:oe(()=>[_(`div`,kn,[l(v(w),{label:`Cancel`,severity:`secondary`,text:``,onClick:r[46]||=e=>a.value=!1}),l(v(w),{label:`Save`,icon:`pi pi-check`,loading:ne.value,disabled:!Qe.value,onClick:Fn},null,8,[`loading`,`disabled`])])]),default:oe(()=>[o.value?(e(),T(`div`,at,[...r[48]||=[_(`i`,{class:`pi pi-spin pi-spinner text-xl`},null,-1)]])):(e(),T(`div`,ot,[_(`section`,null,[r[52]||=_(`h3`,{class:`text-sm font-semibold mb-3 text-foreground`},` Provider `,-1),_(`div`,st,[_(`div`,ct,[r[49]||=_(`label`,{class:`text-xs text-muted-foreground`},`Base URL`,-1),l(v(A),{modelValue:u.value,"onUpdate:modelValue":r[0]||=e=>u.value=e,size:`small`,placeholder:`https://dashscope.aliyuncs.com/compatible-mode/v1`},null,8,[`modelValue`])]),_(`div`,lt,[r[50]||=_(`label`,{class:`text-xs text-muted-foreground`},`API Key`,-1),l(v(Ye),{modelValue:d.value,"onUpdate:modelValue":r[1]||=e=>d.value=e,feedback:!1,"toggle-mask":``,size:`small`,placeholder:`sk-xxx`,"input-class":`w-full`},null,8,[`modelValue`])]),_(`div`,ut,[r[51]||=_(`label`,{class:`text-xs text-muted-foreground`},`Timeout (seconds)`,-1),l(v(A),{value:String(f.value),type:`number`,size:`small`,placeholder:`300`,min:1,onInput:r[2]||=e=>f.value=Number(e.target.value)||300},null,8,[`value`])])])]),_(`section`,null,[r[54]||=_(`h3`,{class:`text-sm font-semibold mb-3 text-foreground`},` Models `,-1),_(`div`,dt,[(e(!0),T(re,null,t(p.value,(t,n)=>(e(),T(`div`,{key:n,class:`flex items-center gap-2 px-3 py-2 rounded border border-border bg-card`},[_(`code`,ft,i(t.name),1),_(`span`,{class:s([`inline-flex items-center gap-1 text-xs px-1.5 py-0.5 rounded`,t.capabilities.structuredOutput?`bg-green-500/10 text-green-600`:`bg-yellow-500/10 text-yellow-600`])},[_(`i`,{class:s([t.capabilities.structuredOutput?`pi pi-check-circle`:`pi pi-exclamation-triangle`,`text-[10px]`])},null,2),E(` `+i(t.capabilities.structuredOutput?`Structured Output`:`Text-only Output`),1)],2),_(`span`,{class:s([`inline-flex items-center gap-1 text-xs px-1.5 py-0.5 rounded`,t.capabilities.vision?`bg-green-500/10 text-green-600`:`bg-red-500/10 text-red-600`])},[_(`i`,{class:s([t.capabilities.vision?`pi pi-check-circle`:`pi pi-times-circle`,`text-[10px]`])},null,2),E(` `+i(t.capabilities.vision?`Vision Supported`:`Vision Unsupported`),1)],2),l(v(w),{icon:`pi pi-times`,severity:`danger`,text:``,size:`small`,onClick:e=>He(n)},null,8,[`onClick`])]))),128)),Y.value?(e(),T(`div`,pt,[_(`div`,mt,[l(v(A),{modelValue:X.value,"onUpdate:modelValue":r[3]||=e=>X.value=e,size:`small`,placeholder:`Model name (e.g. gpt-4o)`,class:`flex-1 font-mono`,onInput:Re,onKeyup:pe(ze,[`enter`])},null,8,[`modelValue`]),l(v(w),{icon:`pi pi-check`,severity:`success`,text:``,size:`small`,disabled:!X.value,onClick:ze},null,8,[`disabled`]),l(v(w),{icon:`pi pi-times`,severity:`secondary`,text:``,size:`small`,onClick:Be})]),_(`div`,ht,[_(`label`,gt,[l(v(B),{modelValue:Z.value.structuredOutput,"onUpdate:modelValue":r[4]||=e=>Z.value.structuredOutput=e,binary:!0,"input-id":`add-so`},null,8,[`modelValue`]),_(`span`,{class:s(Z.value.structuredOutput?`text-green-600`:`text-muted-foreground`)},` Structured Output `,2)]),_(`label`,_t,[l(v(B),{modelValue:Z.value.vision,"onUpdate:modelValue":r[5]||=e=>Z.value.vision=e,binary:!0,"input-id":`add-vision`},null,8,[`modelValue`]),_(`span`,{class:s(Z.value.vision?`text-green-600`:`text-muted-foreground`)},` Vision `,2)]),Le.value===`registry`?(e(),T(`span`,vt,[...r[53]||=[_(`i`,{class:`pi pi-database mr-0.5`},null,-1),E(`Registry `,-1)]])):m(``,!0)])])):(e(),g(v(w),{key:1,label:`Add Model`,icon:`pi pi-plus`,severity:`secondary`,text:``,size:`small`,onClick:r[6]||=e=>Y.value=!0}))])]),_(`section`,null,[r[59]||=_(`h3`,{class:`text-sm font-semibold mb-3 text-foreground`},` Image Input `,-1),_(`div`,yt,[_(`div`,{class:s([`rounded border p-3 text-sm`,Ze.value])},[_(`div`,bt,[_(`span`,xt,i($.value),1),Je.value?(e(),T(`span`,St,`Vision model configured`)):(e(),T(`span`,Ct,`No vision model`))]),_(`p`,wt,i(Xe.value),1)],2),_(`button`,{type:`button`,class:`text-xs text-muted-foreground hover:text-foreground transition-colors`,onClick:r[7]||=e=>je.value=!je.value},i(je.value?`Hide advanced image settings`:`Advanced image settings`),1),je.value?(e(),T(`div`,Tt,[_(`div`,Et,[r[55]||=_(`label`,{class:`text-xs text-muted-foreground`},`OCR fallback`,-1),l(v(be),{modelValue:L.value,"onUpdate:modelValue":r[8]||=e=>L.value=e,options:Nn,"option-label":`label`,"option-value":`value`,size:`small`},null,8,[`modelValue`])]),_(`div`,Dt,[r[56]||=_(`label`,{class:`text-xs text-muted-foreground`},`Languages`,-1),l(v(A),{modelValue:ke.value,"onUpdate:modelValue":r[9]||=e=>ke.value=e,size:`small`,placeholder:`en-US, zh-Hans`,disabled:L.value===`off`},null,8,[`modelValue`,`disabled`])]),_(`div`,Ot,[r[57]||=_(`label`,{class:`text-xs text-muted-foreground`},`Minimum confidence`,-1),l(v(A),{value:String(Ae.value),type:`number`,size:`small`,placeholder:`0`,min:0,max:1,step:.05,disabled:L.value===`off`,onInput:r[10]||=e=>Ae.value=Math.min(1,Math.max(0,Number(e.target.value)||0))},null,8,[`value`,`disabled`])]),r[58]||=_(`div`,{class:`text-xs text-muted-foreground p-2 rounded border border-border`},` Image extraction always prefers a vision model. OCR fallback is only used when no vision model is available. `,-1)])):m(``,!0)])]),_(`section`,null,[r[86]||=_(`h3`,{class:`text-sm font-semibold mb-3 text-foreground`},` PDF Conversion `,-1),_(`div`,kt,[_(`div`,At,[r[60]||=_(`label`,{class:`text-xs text-muted-foreground`},`Converter`,-1),l(v(be),{modelValue:b.value,"onUpdate:modelValue":r[11]||=e=>b.value=e,options:Mn,"option-label":`label`,"option-value":`value`,size:`small`},null,8,[`modelValue`])]),b.value===`mineru`?(e(),T(`div`,jt,[_(`div`,Mt,[r[61]||=_(`label`,{class:`text-xs text-muted-foreground`},`Command`,-1),l(v(A),{modelValue:x.value,"onUpdate:modelValue":r[12]||=e=>x.value=e,size:`small`,placeholder:`mineru`},null,8,[`modelValue`])]),_(`div`,Nt,[r[62]||=_(`label`,{class:`text-xs text-muted-foreground`},`Arguments`,-1),l(v(M),{modelValue:ae.value,"onUpdate:modelValue":r[13]||=e=>ae.value=e,rows:`4`,"auto-resize":``,class:`text-xs font-mono`},null,8,[`modelValue`])]),_(`div`,Pt,[r[63]||=_(`label`,{class:`text-xs text-muted-foreground`},`Timeout (seconds)`,-1),l(v(A),{value:String(se.value),type:`number`,size:`small`,placeholder:`600`,min:1,onInput:r[14]||=e=>se.value=Number(e.target.value)||600},null,8,[`value`])]),_(`div`,Ft,[l(v(B),{modelValue:ce.value,"onUpdate:modelValue":r[15]||=e=>ce.value=e,binary:!0,"input-id":`mineru-fallback`},null,8,[`modelValue`]),r[64]||=_(`label`,{for:`mineru-fallback`,class:`text-sm cursor-pointer`},`Fallback to built-in converter`,-1)]),_(`div`,It,[l(v(B),{modelValue:le.value,"onUpdate:modelValue":r[16]||=e=>le.value=e,binary:!0,"input-id":`mineru-keep-output`},null,8,[`modelValue`]),r[65]||=_(`label`,{for:`mineru-keep-output`,class:`text-sm cursor-pointer`},`Keep converted files on disk`,-1)]),r[66]||=_(`div`,{class:`text-xs text-muted-foreground p-2 rounded border border-border`},[E(` Placeholders: `),_(`code`,{class:`bg-secondary px-1 rounded`},`{input}`),E(`, `),_(`code`,{class:`bg-secondary px-1 rounded`},`{outputDir}`),E(`, `),_(`code`,{class:`bg-secondary px-1 rounded`},`{basename}`)],-1)])):m(``,!0),b.value===`markitdown`?(e(),T(`div`,Lt,[_(`div`,Rt,[r[67]||=_(`label`,{class:`text-xs text-muted-foreground`},`Command`,-1),l(v(A),{modelValue:D.value,"onUpdate:modelValue":r[17]||=e=>D.value=e,size:`small`,placeholder:`markitdown`},null,8,[`modelValue`])]),_(`div`,zt,[r[68]||=_(`label`,{class:`text-xs text-muted-foreground`},`Arguments`,-1),l(v(M),{modelValue:ue.value,"onUpdate:modelValue":r[18]||=e=>ue.value=e,rows:`4`,"auto-resize":``,class:`text-xs font-mono`},null,8,[`modelValue`])]),_(`div`,Bt,[r[69]||=_(`label`,{class:`text-xs text-muted-foreground`},`Timeout (seconds)`,-1),l(v(A),{value:String(me.value),type:`number`,size:`small`,placeholder:`600`,min:1,onInput:r[19]||=e=>me.value=Number(e.target.value)||600},null,8,[`value`])]),_(`div`,Vt,[l(v(B),{modelValue:k.value,"onUpdate:modelValue":r[20]||=e=>k.value=e,binary:!0,"input-id":`markitdown-fallback`},null,8,[`modelValue`]),r[70]||=_(`label`,{for:`markitdown-fallback`,class:`text-sm cursor-pointer`},`Fallback to built-in converter`,-1)]),_(`div`,Ht,[l(v(B),{modelValue:xe.value,"onUpdate:modelValue":r[21]||=e=>xe.value=e,binary:!0,"input-id":`markitdown-keep-output`},null,8,[`modelValue`]),r[71]||=_(`label`,{for:`markitdown-keep-output`,class:`text-sm cursor-pointer`},`Keep converted files on disk`,-1)]),r[72]||=_(`div`,{class:`text-xs text-muted-foreground p-2 rounded border border-border`},[E(` Placeholders: `),_(`code`,{class:`bg-secondary px-1 rounded`},`{input}`),E(`, `),_(`code`,{class:`bg-secondary px-1 rounded`},`{outputDir}`),E(`, `),_(`code`,{class:`bg-secondary px-1 rounded`},`{basename}`)],-1)])):m(``,!0),b.value===`marker`?(e(),T(`div`,Ut,[_(`div`,Wt,[r[73]||=_(`label`,{class:`text-xs text-muted-foreground`},`Command`,-1),l(v(A),{modelValue:j.value,"onUpdate:modelValue":r[22]||=e=>j.value=e,size:`small`,placeholder:`marker_single`},null,8,[`modelValue`])]),_(`div`,Gt,[r[74]||=_(`label`,{class:`text-xs text-muted-foreground`},`Arguments`,-1),l(v(M),{modelValue:N.value,"onUpdate:modelValue":r[23]||=e=>N.value=e,rows:`4`,"auto-resize":``,class:`text-xs font-mono`},null,8,[`modelValue`])]),_(`div`,Kt,[r[75]||=_(`label`,{class:`text-xs text-muted-foreground`},`Timeout (seconds)`,-1),l(v(A),{value:String(Ce.value),type:`number`,size:`small`,placeholder:`600`,min:1,onInput:r[24]||=e=>Ce.value=Number(e.target.value)||600},null,8,[`value`])]),_(`div`,qt,[l(v(B),{modelValue:we.value,"onUpdate:modelValue":r[25]||=e=>we.value=e,binary:!0,"input-id":`marker-fallback`},null,8,[`modelValue`]),r[76]||=_(`label`,{for:`marker-fallback`,class:`text-sm cursor-pointer`},`Fallback to built-in converter`,-1)]),_(`div`,Jt,[l(v(B),{modelValue:Te.value,"onUpdate:modelValue":r[26]||=e=>Te.value=e,binary:!0,"input-id":`marker-keep-output`},null,8,[`modelValue`]),r[77]||=_(`label`,{for:`marker-keep-output`,class:`text-sm cursor-pointer`},`Keep converted files on disk`,-1)]),r[78]||=_(`div`,{class:`text-xs text-muted-foreground p-2 rounded border border-border`},[E(` Placeholders: `),_(`code`,{class:`bg-secondary px-1 rounded`},`{input}`),E(`, `),_(`code`,{class:`bg-secondary px-1 rounded`},`{outputDir}`),E(`, `),_(`code`,{class:`bg-secondary px-1 rounded`},`{basename}`)],-1)])):m(``,!0),b.value===`external`?(e(),T(`div`,Yt,[_(`div`,Xt,[r[79]||=_(`label`,{class:`text-xs text-muted-foreground`},`Command`,-1),l(v(A),{modelValue:P.value,"onUpdate:modelValue":r[27]||=e=>P.value=e,size:`small`,placeholder:`pdf2markdown`},null,8,[`modelValue`])]),_(`div`,Zt,[r[80]||=_(`label`,{class:`text-xs text-muted-foreground`},`Arguments`,-1),l(v(M),{modelValue:F.value,"onUpdate:modelValue":r[28]||=e=>F.value=e,rows:`4`,"auto-resize":``,class:`text-xs font-mono`,placeholder:`-i
267
+ {input}
268
+ -o
269
+ {outputDir}/{basename}.md`},null,8,[`modelValue`])]),_(`div`,Qt,[r[81]||=_(`label`,{class:`text-xs text-muted-foreground`},`Output File (optional)`,-1),l(v(A),{modelValue:Ee.value,"onUpdate:modelValue":r[29]||=e=>Ee.value=e,size:`small`,class:`text-xs font-mono`,placeholder:`{outputDir}/{basename}.md`},null,8,[`modelValue`])]),_(`div`,$t,[r[82]||=_(`label`,{class:`text-xs text-muted-foreground`},`Timeout (seconds)`,-1),l(v(A),{value:String(De.value),type:`number`,size:`small`,placeholder:`600`,min:1,onInput:r[30]||=e=>De.value=Number(e.target.value)||600},null,8,[`value`])]),_(`div`,en,[l(v(B),{modelValue:Oe.value,"onUpdate:modelValue":r[31]||=e=>Oe.value=e,binary:!0,"input-id":`external-fallback`},null,8,[`modelValue`]),r[83]||=_(`label`,{for:`external-fallback`,class:`text-sm cursor-pointer`},`Fallback to built-in converter`,-1)]),_(`div`,tn,[l(v(B),{modelValue:I.value,"onUpdate:modelValue":r[32]||=e=>I.value=e,binary:!0,"input-id":`external-keep-output`},null,8,[`modelValue`]),r[84]||=_(`label`,{for:`external-keep-output`,class:`text-sm cursor-pointer`},`Keep converted files on disk`,-1)]),r[85]||=_(`div`,{class:`text-xs text-muted-foreground p-2 rounded border border-border`},[E(` Placeholders: `),_(`code`,{class:`bg-secondary px-1 rounded`},`{input}`),E(`, `),_(`code`,{class:`bg-secondary px-1 rounded`},`{outputDir}`),E(`, `),_(`code`,{class:`bg-secondary px-1 rounded`},`{basename}`),E(`. If Output File is blank, the first generated .md file will be selected automatically. `)],-1)])):m(``,!0)])]),_(`section`,null,[r[91]||=_(`h3`,{class:`text-sm font-semibold mb-3 text-foreground`},` Langfuse Tracing `,-1),_(`div`,nn,[_(`div`,rn,[l(v(B),{modelValue:R.value,"onUpdate:modelValue":r[33]||=e=>R.value=e,binary:!0,"input-id":`lf-enabled`},null,8,[`modelValue`]),r[87]||=_(`label`,{for:`lf-enabled`,class:`text-sm cursor-pointer`},`Enabled`,-1)]),R.value?(e(),T(`div`,an,[_(`div`,on,[r[88]||=_(`label`,{class:`text-xs text-muted-foreground`},`Secret Key`,-1),l(v(Ye),{modelValue:Ne.value,"onUpdate:modelValue":r[34]||=e=>Ne.value=e,feedback:!1,"toggle-mask":``,size:`small`,placeholder:`sk-lf-...`,"input-class":`w-full`},null,8,[`modelValue`])]),_(`div`,sn,[r[89]||=_(`label`,{class:`text-xs text-muted-foreground`},`Public Key`,-1),l(v(A),{modelValue:Me.value,"onUpdate:modelValue":r[35]||=e=>Me.value=e,size:`small`,placeholder:`pk-lf-...`},null,8,[`modelValue`])]),_(`div`,cn,[r[90]||=_(`label`,{class:`text-xs text-muted-foreground`},`Host (optional)`,-1),l(v(A),{modelValue:Pe.value,"onUpdate:modelValue":r[36]||=e=>Pe.value=e,size:`small`,placeholder:`https://us.cloud.langfuse.com`},null,8,[`modelValue`])])])):m(``,!0)])]),_(`section`,null,[r[100]||=_(`h3`,{class:`text-sm font-semibold mb-3 text-foreground`},` Notion Export `,-1),_(`div`,ln,[_(`div`,un,[l(v(B),{modelValue:z.value,"onUpdate:modelValue":r[37]||=e=>z.value=e,binary:!0,"input-id":`notion-enabled`},null,8,[`modelValue`]),r[92]||=_(`label`,{for:`notion-enabled`,class:`text-sm cursor-pointer`},`Enabled`,-1)]),_(`div`,dn,[_(`div`,fn,[r[93]||=_(`label`,{class:`text-xs text-muted-foreground`},`Integration Token`,-1),l(v(Ye),{modelValue:V.value,"onUpdate:modelValue":r[38]||=e=>V.value=e,feedback:!1,"toggle-mask":``,size:`small`,placeholder:`secret_...`,"input-class":`w-full`},null,8,[`modelValue`])]),_(`div`,pn,[r[94]||=_(`label`,{class:`text-xs text-muted-foreground`},`Schema Binding`,-1),l(v(be),{modelValue:U.value,"onUpdate:modelValue":r[39]||=e=>U.value=e,options:Ge.value,size:`small`,placeholder:`Select a schema`,disabled:Ge.value.length===0},null,8,[`modelValue`,`options`,`disabled`])]),_(`div`,mn,[r[95]||=_(`label`,{class:`text-xs text-muted-foreground`},`Database/Data Source URL or ID`,-1),l(v(A),{modelValue:W.value,"onUpdate:modelValue":r[40]||=e=>W.value=e,size:`small`,placeholder:`https://www.notion.so/... or xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`},null,8,[`modelValue`])]),_(`div`,hn,[l(v(w),{label:`Connect & Map`,icon:`pi pi-bolt`,severity:`secondary`,size:`small`,loading:Fe.value,disabled:!U.value||!V.value.trim()||!W.value.trim()||!!Q.value,onClick:In},null,8,[`loading`,`disabled`]),qe.value?(e(),T(`span`,gn,i(qe.value),1)):m(``,!0)]),_(`div`,_n,[_(`button`,{type:`button`,class:`w-full flex items-center justify-between gap-2 px-3 py-2 text-left text-xs text-muted-foreground hover:bg-secondary`,onClick:r[41]||=e=>Ie.value=!Ie.value},[r[96]||=_(`span`,null,`Advanced mapping`,-1),_(`i`,{class:s([Ie.value?`pi pi-chevron-up`:`pi pi-chevron-down`,`text-[10px]`])},null,2)]),Ie.value?(e(),T(`div`,vn,[_(`div`,yn,[r[97]||=_(`label`,{class:`text-xs text-muted-foreground`},`Title Property (optional)`,-1),l(v(A),{modelValue:G.value,"onUpdate:modelValue":r[42]||=e=>G.value=e,size:`small`,placeholder:`Name`},null,8,[`modelValue`])]),_(`div`,bn,[_(`div`,xn,[r[98]||=_(`label`,{class:`text-xs text-muted-foreground`},`Field Map JSON`,-1),J.value.length>0?(e(),T(`span`,Sn,i(Ke.value)+` / `+i(J.value.length)+` mapped `,1)):m(``,!0)]),l(v(M),{modelValue:K.value,"onUpdate:modelValue":r[43]||=e=>K.value=e,rows:`5`,"auto-resize":``,class:`text-xs font-mono`,placeholder:`{
270
+ "invoiceNo": "Invoice No",
271
+ "issuedAt": "Issued At"
272
+ }`},null,8,[`modelValue`]),Q.value?(e(),T(`p`,Cn,i(Q.value),1)):m(``,!0)]),r[99]||=_(`div`,{class:`text-xs text-muted-foreground p-2 rounded border border-border`},[E(` Selecting a schema fills the left-side keys. Nested objects use dot paths such as `),_(`code`,{class:`bg-secondary px-1 rounded`},`student.name`),E(`. Object arrays are skipped; model them as separate Notion data sources later if needed. `)],-1)])):m(``,!0)])])])]),_(`section`,null,[r[104]||=_(`h3`,{class:`text-sm font-semibold mb-3 text-foreground`},` Prompt Templates `,-1),_(`div`,wn,[_(`div`,Tn,[r[101]||=_(`label`,{class:`text-xs text-muted-foreground`},`System Prompt`,-1),l(v(M),{modelValue:h.value,"onUpdate:modelValue":r[44]||=e=>h.value=e,rows:`6`,"auto-resize":``,class:`text-xs font-mono`},null,8,[`modelValue`]),Ue.value?(e(),T(`p`,En,i(Ue.value),1)):m(``,!0)]),_(`div`,Dn,[r[102]||=_(`label`,{class:`text-xs text-muted-foreground`},`User Prompt`,-1),l(v(M),{modelValue:y.value,"onUpdate:modelValue":r[45]||=e=>y.value=e,rows:`6`,"auto-resize":``,class:`text-xs font-mono`},null,8,[`modelValue`]),We.value?(e(),T(`p`,On,i(We.value),1)):m(``,!0)]),r[103]||=_(`div`,{class:`text-xs text-muted-foreground p-2 rounded border border-border`},[E(` Placeholders: `),_(`code`,{class:`bg-secondary px-1 rounded`},`{schema}`),E(` JSON Schema structure description, `),_(`code`,{class:`bg-secondary px-1 rounded`},`{text}`),E(` text to extract from `)],-1)])])]))]),_:1},8,[`visible`]))}});export{Mn as default};