@remoteoss/json-schema-form 1.0.0-dev.20250415145553 → 1.0.0-dev.20250512141911

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/index.d.ts CHANGED
@@ -1,38 +1,14 @@
1
+ import { RulesLogic } from 'json-logic-js';
1
2
  import { JSONSchema } from 'json-schema-typed/draft-2020-12';
2
3
 
3
4
  /**
4
- * WIP type for UI field output that allows for all `x-jsf-presentation` properties to be splatted
5
- * TODO/QUESTION: what are the required fields for a field? what are the things we want to deprecate, if any?
5
+ * Defines the type of a `Field` in the form.
6
6
  */
7
- interface Field {
8
- name: string;
9
- label?: string;
10
- description?: string;
11
- fields?: Field[];
12
- type: string;
13
- inputType: string;
14
- required: boolean;
15
- jsonType: string;
16
- isVisible: boolean;
17
- accept?: string;
18
- errorMessage?: Record<string, string>;
19
- computedAttributes?: Record<string, unknown>;
20
- minDate?: string;
21
- maxDate?: string;
22
- maxLength?: number;
23
- maxFileSize?: number;
24
- format?: string;
25
- anyOf?: unknown[];
26
- options?: unknown[];
27
- const?: unknown;
28
- checkboxValue?: unknown;
29
- [key: string]: unknown;
30
- }
31
-
7
+ type JsfSchemaType = Exclude<JSONSchema, boolean>['type'];
32
8
  /**
33
9
  * Defines the type of a value in the form that will be validated against the schema.
34
10
  */
35
- type SchemaValue = string | number | ObjectValue | null | undefined | Array<SchemaValue>;
11
+ type SchemaValue = string | number | ObjectValue | null | undefined | Array<SchemaValue> | boolean;
36
12
  /**
37
13
  * A nested object value.
38
14
  */
@@ -40,7 +16,7 @@ interface ObjectValue {
40
16
  [key: string]: SchemaValue;
41
17
  }
42
18
  type JsfPresentation = {
43
- inputType?: string;
19
+ inputType?: FieldType;
44
20
  description?: string;
45
21
  accept?: string;
46
22
  maxFileSize?: number;
@@ -49,12 +25,26 @@ type JsfPresentation = {
49
25
  } & {
50
26
  [key: string]: unknown;
51
27
  };
28
+ interface JsonLogicRules {
29
+ validations?: Record<string, {
30
+ errorMessage?: string;
31
+ rule: RulesLogic;
32
+ }>;
33
+ computedValues?: Record<string, {
34
+ rule: RulesLogic;
35
+ }>;
36
+ }
37
+ interface JsonLogicRootSchema extends Pick<NonBooleanJsfSchema, 'if' | 'then' | 'else' | 'allOf' | 'anyOf' | 'oneOf' | 'not'> {
38
+ }
39
+ interface JsonLogicSchema extends JsonLogicRules, JsonLogicRootSchema {
40
+ }
52
41
  /**
53
42
  * JSON Schema Form extending JSON Schema with additional JSON Schema Form properties.
54
43
  */
55
44
  type JsfSchema = JSONSchema & {
56
45
  'properties'?: Record<string, JsfSchema>;
57
46
  'items'?: JsfSchema;
47
+ 'enum'?: unknown[];
58
48
  'anyOf'?: JsfSchema[];
59
49
  'allOf'?: JsfSchema[];
60
50
  'oneOf'?: JsfSchema[];
@@ -62,14 +52,13 @@ type JsfSchema = JSONSchema & {
62
52
  'if'?: JsfSchema;
63
53
  'then'?: JsfSchema;
64
54
  'else'?: JsfSchema;
65
- 'x-jsf-logic'?: {
66
- validations: Record<string, object>;
67
- computedValues: Record<string, object>;
68
- };
69
55
  'required'?: string[];
70
56
  'x-jsf-order'?: string[];
71
57
  'x-jsf-presentation'?: JsfPresentation;
72
58
  'x-jsf-errorMessage'?: Record<string, string>;
59
+ 'x-jsf-logic'?: JsonLogicSchema;
60
+ 'x-jsf-logic-validations'?: string[];
61
+ 'x-jsf-logic-computedAttrs'?: Partial<Record<keyof NonBooleanJsfSchema, string | JsfSchema['x-jsf-errorMessage']>>;
73
62
  };
74
63
  /**
75
64
  * JSON Schema Form type without booleans.
@@ -85,6 +74,36 @@ type JsfObjectSchema = NonBooleanJsfSchema & {
85
74
  type: 'object';
86
75
  };
87
76
 
77
+ /**
78
+ * WIP type for UI field output that allows for all `x-jsf-presentation` properties to be splatted
79
+ * TODO/QUESTION: what are the required fields for a field? what are the things we want to deprecate, if any?
80
+ */
81
+ interface Field {
82
+ name: string;
83
+ label?: string;
84
+ description?: string;
85
+ fields?: Field[];
86
+ type: FieldType;
87
+ inputType: FieldType;
88
+ required: boolean;
89
+ jsonType: JsfSchemaType;
90
+ isVisible: boolean;
91
+ accept?: string;
92
+ errorMessage?: Record<string, string>;
93
+ computedAttributes?: Record<string, unknown>;
94
+ minDate?: string;
95
+ maxDate?: string;
96
+ maxLength?: number;
97
+ maxFileSize?: number;
98
+ format?: string;
99
+ anyOf?: unknown[];
100
+ options?: unknown[];
101
+ const?: unknown;
102
+ checkboxValue?: unknown;
103
+ [key: string]: unknown;
104
+ }
105
+ type FieldType = 'text' | 'number' | 'select' | 'file' | 'radio' | 'group-array' | 'email' | 'date' | 'checkbox' | 'fieldset' | 'money' | 'country' | 'textarea';
106
+
88
107
  interface ValidationOptions {
89
108
  /**
90
109
  * A null value will be treated as undefined.
@@ -113,9 +132,54 @@ interface ValidationResult {
113
132
  formErrors?: FormErrors;
114
133
  }
115
134
  interface CreateHeadlessFormOptions {
135
+ /**
136
+ * The initial values to use for the form
137
+ */
116
138
  initialValues?: SchemaValue;
139
+ /**
140
+ * The validation options to use for the form
141
+ */
117
142
  validationOptions?: ValidationOptions;
143
+ /**
144
+ * When enabled, ['x-jsf-presentation'].inputType is required for all properties.
145
+ * @default false
146
+ */
147
+ strictInputType?: boolean;
118
148
  }
119
149
  declare function createHeadlessForm(schema: JsfObjectSchema, options?: CreateHeadlessFormOptions): FormResult;
120
150
 
121
- export { type CreateHeadlessFormOptions, type ValidationOptions, createHeadlessForm };
151
+ type FieldOutput = Partial<JsfSchema> | Record<string, unknown>;
152
+ interface ModifyConfig {
153
+ fields?: Record<string, FieldOutput | ((attrs: JsfSchema) => FieldOutput)>;
154
+ allFields?: (name: string, attrs: JsfSchema) => FieldOutput;
155
+ create?: Record<string, FieldOutput>;
156
+ pick?: string[];
157
+ orderRoot?: string[] | ((originalOrder: string[]) => string[]);
158
+ muteLogging?: boolean;
159
+ }
160
+ type WarningType = 'FIELD_TO_CHANGE_NOT_FOUND' | 'ORDER_MISSING_FIELDS' | 'FIELD_TO_CREATE_EXISTS' | 'PICK_MISSED_FIELD';
161
+ interface Warning {
162
+ type: WarningType;
163
+ message: string;
164
+ meta?: Record<string, any>;
165
+ }
166
+ /**
167
+ * Modifies the schema
168
+ * Use modify() when you need to customize the generated fields. This function creates a new version of JSON schema based on a provided configuration. Then you pass the new schema to createHeadlessForm()
169
+ *
170
+ * @example
171
+ * const modifiedSchema = modify(schema, {
172
+ * fields: {
173
+ * name: { type: 'string', title: 'Name' },
174
+ * },
175
+ * })
176
+ * @param {JsfSchema} originalSchema - The original schema
177
+ * @param {ModifyConfig} config - The config
178
+ * @returns {ModifyResult} The new schema and the warnings that occurred during the modifications
179
+ */
180
+ declare function modifySchema(originalSchema: JsfSchema, config: ModifyConfig): {
181
+ schema: JsfSchema;
182
+ warnings: (Warning | null)[];
183
+ };
184
+
185
+ export { type CreateHeadlessFormOptions, type ValidationOptions, createHeadlessForm, modifySchema as modify };
package/dist/index.mjs CHANGED
@@ -1,2 +1,3 @@
1
- var Je=Object.create;var Z=Object.defineProperty;var Pe=Object.getOwnPropertyDescriptor;var je=Object.getOwnPropertyNames;var Ce=Object.getPrototypeOf,Me=Object.prototype.hasOwnProperty;var O=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Fe=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of je(e))!Me.call(t,a)&&a!==n&&Z(t,a,{get:()=>e[a],enumerable:!(r=Pe(e,a))||r.enumerable});return t};var _e=(t,e,n)=>(n=t!=null?Je(Ce(t)):{},Fe(e||!t||!t.__esModule?Z(n,"default",{value:t,enumerable:!0}):n,t));var A=O((ot,Y)=>{"use strict";Y.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var B=O(S=>{"use strict";var f=A(),U=()=>[{type:f.RANGE,from:48,to:57}],X=()=>[{type:f.CHAR,value:95},{type:f.RANGE,from:97,to:122},{type:f.RANGE,from:65,to:90}].concat(U()),ee=()=>[{type:f.CHAR,value:9},{type:f.CHAR,value:10},{type:f.CHAR,value:11},{type:f.CHAR,value:12},{type:f.CHAR,value:13},{type:f.CHAR,value:32},{type:f.CHAR,value:160},{type:f.CHAR,value:5760},{type:f.RANGE,from:8192,to:8202},{type:f.CHAR,value:8232},{type:f.CHAR,value:8233},{type:f.CHAR,value:8239},{type:f.CHAR,value:8287},{type:f.CHAR,value:12288},{type:f.CHAR,value:65279}],$e=()=>[{type:f.CHAR,value:10},{type:f.CHAR,value:13},{type:f.CHAR,value:8232},{type:f.CHAR,value:8233}];S.words=()=>({type:f.SET,set:X(),not:!1});S.notWords=()=>({type:f.SET,set:X(),not:!0});S.ints=()=>({type:f.SET,set:U(),not:!1});S.notInts=()=>({type:f.SET,set:U(),not:!0});S.whitespace=()=>({type:f.SET,set:ee(),not:!1});S.notWhitespace=()=>({type:f.SET,set:ee(),not:!0});S.anyChar=()=>({type:f.SET,set:$e(),not:!0})});var re=O(N=>{"use strict";var te=A(),x=B(),De="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",Ue={0:0,t:9,n:10,v:11,f:12,r:13};N.strToChars=function(t){var e=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return t=t.replace(e,function(n,r,a,o,i,l,s,u){if(a)return n;var m=r?8:o?parseInt(o,16):i?parseInt(i,16):l?parseInt(l,8):s?De.indexOf(s):Ue[u],g=String.fromCharCode(m);return/[[\]{}^$.|?*+()]/.test(g)&&(g="\\"+g),g}),t};N.tokenizeClass=(t,e)=>{for(var n=[],r=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g,a,o;(a=r.exec(t))!=null;)if(a[1])n.push(x.words());else if(a[2])n.push(x.ints());else if(a[3])n.push(x.whitespace());else if(a[4])n.push(x.notWords());else if(a[5])n.push(x.notInts());else if(a[6])n.push(x.notWhitespace());else if(a[7])n.push({type:te.RANGE,from:(a[8]||a[9]).charCodeAt(0),to:a[10].charCodeAt(0)});else if(o=a[12])n.push({type:te.CHAR,value:o.charCodeAt(0)});else return[n,r.lastIndex];N.error(e,"Unterminated character class")};N.error=(t,e)=>{throw new SyntaxError("Invalid regular expression: /"+t+"/: "+e)}});var ne=O(w=>{"use strict";var M=A();w.wordBoundary=()=>({type:M.POSITION,value:"b"});w.nonWordBoundary=()=>({type:M.POSITION,value:"B"});w.begin=()=>({type:M.POSITION,value:"^"});w.end=()=>({type:M.POSITION,value:"$"})});var ie=O((ft,H)=>{"use strict";var T=re(),h=A(),V=B(),F=ne();H.exports=t=>{var e=0,n,r,a={type:h.ROOT,stack:[]},o=a,i=a.stack,l=[],s=we=>{T.error(t,`Nothing to repeat at column ${we-1}`)},u=T.strToChars(t);for(n=u.length;e<n;)switch(r=u[e++],r){case"\\":switch(r=u[e++],r){case"b":i.push(F.wordBoundary());break;case"B":i.push(F.nonWordBoundary());break;case"w":i.push(V.words());break;case"W":i.push(V.notWords());break;case"d":i.push(V.ints());break;case"D":i.push(V.notInts());break;case"s":i.push(V.whitespace());break;case"S":i.push(V.notWhitespace());break;default:/\d/.test(r)?i.push({type:h.REFERENCE,value:parseInt(r,10)}):i.push({type:h.CHAR,value:r.charCodeAt(0)})}break;case"^":i.push(F.begin());break;case"$":i.push(F.end());break;case"[":var m;u[e]==="^"?(m=!0,e++):m=!1;var g=T.tokenizeClass(u.slice(e),t);e+=g[1],i.push({type:h.SET,set:g[0],not:m});break;case".":i.push(V.anyChar());break;case"(":var E={type:h.GROUP,stack:[],remember:!0};r=u[e],r==="?"&&(r=u[e+1],e+=2,r==="="?E.followedBy=!0:r==="!"?E.notFollowedBy=!0:r!==":"&&T.error(t,`Invalid group, character '${r}' after '?' at column ${e-1}`),E.remember=!1),i.push(E),l.push(o),o=E,i=E.stack;break;case")":l.length===0&&T.error(t,`Unmatched ) at column ${e-1}`),o=l.pop(),i=o.options?o.options[o.options.length-1]:o.stack;break;case"|":o.options||(o.options=[o.stack],delete o.stack);var Q=[];o.options.push(Q),i=Q;break;case"{":var R=/^(\d+)(,(\d+)?)?\}/.exec(u.slice(e)),D,K;R!==null?(i.length===0&&s(e),D=parseInt(R[1],10),K=R[2]?R[3]?parseInt(R[3],10):1/0:D,e+=R[0].length,i.push({type:h.REPETITION,min:D,max:K,value:i.pop()})):i.push({type:h.CHAR,value:123});break;case"?":i.length===0&&s(e),i.push({type:h.REPETITION,min:0,max:1,value:i.pop()});break;case"+":i.length===0&&s(e),i.push({type:h.REPETITION,min:1,max:1/0,value:i.pop()});break;case"*":i.length===0&&s(e),i.push({type:h.REPETITION,min:0,max:1/0,value:i.pop()});break;default:i.push({type:h.CHAR,value:r.charCodeAt(0)})}return l.length!==0&&T.error(t,"Unterminated group"),a};H.exports.types=h});var ae=O((ut,oe)=>{"use strict";var I=class t{constructor(e,n){this.low=e,this.high=n,this.length=1+n-e}overlaps(e){return!(this.high<e.low||this.low>e.high)}touches(e){return!(this.high+1<e.low||this.low-1>e.high)}add(e){return new t(Math.min(this.low,e.low),Math.max(this.high,e.high))}subtract(e){return e.low<=this.low&&e.high>=this.high?[]:e.low>this.low&&e.high<this.high?[new t(this.low,e.low-1),new t(e.high+1,this.high)]:e.low<=this.low?[new t(e.high+1,this.high)]:[new t(this.low,e.low-1)]}toString(){return this.low==this.high?this.low.toString():this.low+"-"+this.high}},L=class t{constructor(e,n){this.ranges=[],this.length=0,e!=null&&this.add(e,n)}_update_length(){this.length=this.ranges.reduce((e,n)=>e+n.length,0)}add(e,n){var r=a=>{for(var o=0;o<this.ranges.length&&!a.touches(this.ranges[o]);)o++;for(var i=this.ranges.slice(0,o);o<this.ranges.length&&a.touches(this.ranges[o]);)a=a.add(this.ranges[o]),o++;i.push(a),this.ranges=i.concat(this.ranges.slice(o)),this._update_length()};return e instanceof t?e.ranges.forEach(r):(n==null&&(n=e),r(new I(e,n))),this}subtract(e,n){var r=a=>{for(var o=0;o<this.ranges.length&&!a.overlaps(this.ranges[o]);)o++;for(var i=this.ranges.slice(0,o);o<this.ranges.length&&a.overlaps(this.ranges[o]);)i=i.concat(this.ranges[o].subtract(a)),o++;this.ranges=i.concat(this.ranges.slice(o)),this._update_length()};return e instanceof t?e.ranges.forEach(r):(n==null&&(n=e),r(new I(e,n))),this}intersect(e,n){var r=[],a=o=>{for(var i=0;i<this.ranges.length&&!o.overlaps(this.ranges[i]);)i++;for(;i<this.ranges.length&&o.overlaps(this.ranges[i]);){var l=Math.max(this.ranges[i].low,o.low),s=Math.min(this.ranges[i].high,o.high);r.push(new I(l,s)),i++}};return e instanceof t?e.ranges.forEach(a):(n==null&&(n=e),a(new I(e,n))),this.ranges=r,this._update_length(),this}index(e){for(var n=0;n<this.ranges.length&&this.ranges[n].length<=e;)e-=this.ranges[n].length,n++;return this.ranges[n].low+e}toString(){return"[ "+this.ranges.join(", ")+" ]"}clone(){return new t(this)}numbers(){return this.ranges.reduce((e,n)=>{for(var r=n.low;r<=n.high;)e.push(r),r++;return e},[])}subranges(){return this.ranges.map(e=>({low:e.low,high:e.high,length:1+e.high-e.low}))}};oe.exports=L});var le=O((dt,se)=>{"use strict";var _=ie(),J=ae(),b=_.types;se.exports=class P{constructor(e,n){if(this._setDefaults(e),e instanceof RegExp)this.ignoreCase=e.ignoreCase,this.multiline=e.multiline,e=e.source;else if(typeof e=="string")this.ignoreCase=n&&n.indexOf("i")!==-1,this.multiline=n&&n.indexOf("m")!==-1;else throw new Error("Expected a regexp or string");this.tokens=_(e)}_setDefaults(e){this.max=e.max!=null?e.max:P.prototype.max!=null?P.prototype.max:100,this.defaultRange=e.defaultRange?e.defaultRange:this.defaultRange.clone(),e.randInt&&(this.randInt=e.randInt)}gen(){return this._gen(this.tokens,[])}_gen(e,n){var r,a,o,i,l;switch(e.type){case b.ROOT:case b.GROUP:if(e.followedBy||e.notFollowedBy)return"";for(e.remember&&e.groupNumber===void 0&&(e.groupNumber=n.push(null)-1),r=e.options?this._randSelect(e.options):e.stack,a="",i=0,l=r.length;i<l;i++)a+=this._gen(r[i],n);return e.remember&&(n[e.groupNumber]=a),a;case b.POSITION:return"";case b.SET:var s=this._expand(e);return s.length?String.fromCharCode(this._randSelect(s)):"";case b.REPETITION:for(o=this.randInt(e.min,e.max===1/0?e.min+this.max:e.max),a="",i=0;i<o;i++)a+=this._gen(e.value,n);return a;case b.REFERENCE:return n[e.value-1]||"";case b.CHAR:var u=this.ignoreCase&&this._randBool()?this._toOtherCase(e.value):e.value;return String.fromCharCode(u)}}_toOtherCase(e){return e+(97<=e&&e<=122?-32:65<=e&&e<=90?32:0)}_randBool(){return!this.randInt(0,1)}_randSelect(e){return e instanceof J?e.index(this.randInt(0,e.length-1)):e[this.randInt(0,e.length-1)]}_expand(e){if(e.type===_.types.CHAR)return new J(e.value);if(e.type===_.types.RANGE)return new J(e.from,e.to);{let n=new J;for(let r=0;r<e.set.length;r++){let a=this._expand(e.set[r]);if(n.add(a),this.ignoreCase)for(let o=0;o<a.length;o++){let i=a.index(o),l=this._toOtherCase(i);i!==l&&n.add(l)}}return e.not?this.defaultRange.clone().subtract(n):this.defaultRange.clone().intersect(n)}}randInt(e,n){return e+Math.floor(Math.random()*(1+n-e))}get defaultRange(){return this._range=this._range||new J(32,126)}set defaultRange(e){this._range=e}static randexp(e,n){var r;return typeof e=="string"&&(e=new RegExp(e,n)),e._randexp===void 0?(r=new P(e,n),e._randexp=r):(r=e._randexp,r._setDefaults(e)),r.gen()}static sugar(){RegExp.prototype.gen=function(){return P.randexp(this)}}}});var ce=_e(le(),1);var fe="yyyy-MM-dd";function ue(t,e){let n=new Date(t).getTime(),r=new Date(e).getTime();return n<r?"LESSER":n>r?"GREATER":"EQUAL"}function Be(t,e){let n=ue(t,e);return n==="GREATER"||n==="EQUAL"}function He(t,e){let n=ue(t,e);return n==="LESSER"||n==="EQUAL"}function de(t,e,n,r=[]){let a=typeof t=="string",o=t==="",i=t===void 0||t===null&&n.treatNullAsUndefined,l=o||i,s=[];if(!a||l||e["x-jsf-presentation"]===void 0)return s;let{minDate:u,maxDate:m}=e["x-jsf-presentation"];return u&&!Be(t,u)&&s.push({path:r,validation:"minDate"}),m&&!He(t,m)&&s.push({path:r,validation:"maxDate"}),s}function pe(t,e,n){switch(n){case"type":return Le(t.type);case"required":return t["x-jsf-presentation"]?.inputType==="checkbox"?"Please acknowledge this field":"Required field";case"valid":return"Always fails";case"const":return`The only accepted value is ${JSON.stringify(t.const)}.`;case"enum":return`The option "${k(e)}" is not valid.`;case"anyOf":return`The option "${k(e)}" is not valid.`;case"oneOf":return`The option "${k(e)}" is not valid.`;case"not":return"The value must not satisfy the provided schema";case"minLength":return`Please insert at least ${t.minLength} characters`;case"maxLength":return`Please insert up to ${t.maxLength} characters`;case"pattern":return`Must have a valid format. E.g. ${(0,ce.randexp)(t.pattern||"")}`;case"format":if(t.format==="email")return"Please enter a valid email address";if(t.format==="date"){let r=new Date().toISOString().split("T")[0];return`Must be a valid date in ${fe.toLowerCase()} format. e.g. ${r}`}return`Must be a valid ${t.format} format`;case"multipleOf":return`Must be a multiple of ${t.multipleOf}`;case"maximum":return`Must be smaller or equal to ${t.maximum}`;case"exclusiveMaximum":return`Must be smaller than ${t.exclusiveMaximum}`;case"minimum":return`Must be greater or equal to ${t.minimum}`;case"exclusiveMinimum":return`Must be greater than ${t.exclusiveMinimum}`;case"minDate":return`The date must be ${t["x-jsf-presentation"]?.minDate} or after.`;case"maxDate":return`The date must be ${t["x-jsf-presentation"]?.maxDate} or before.`}}function Le(t){if(Array.isArray(t))return`The value must be a ${t.map(n=>n==="integer"?"number":n).join(" or ")}`;switch(t){case"number":case"integer":return"The value must be a number";case"boolean":return"The value must be a boolean";case"null":return"The value must be null";case"string":return"The value must be a string";case"object":return"The value must be an object";case"array":return"The value must be an array";default:return t?`The value must be ${t}`:"Invalid value"}}function k(t){return typeof t=="string"?t:JSON.stringify(t)}function ke(t){let{fields:e,order:n}=t,r={};return n.forEach((o,i)=>{r[o]=i}),e.sort((o,i)=>{let l=r[o.name]??1/0,s=r[i.name]??1/0;return l!==s?l-s:e.indexOf(o)-e.indexOf(i)})}function me(t){let{schema:e,fields:n}=t;if(typeof e=="boolean")throw new Error("Schema must be an object");return e["x-jsf-order"]!==void 0?ke({fields:n,order:e["x-jsf-order"]}):n}function qe(t){return Array.isArray(t.type)?"select":t.type!==void 0?t.type:"text"}function q(t){return t.filter(e=>e!==null&&typeof e=="object"&&e.const!==null).map(e=>{let n=e.title,r=e.const,o=e["x-jsf-presentation"]?.meta,i={label:n||"",value:r};o&&(i.meta=o);let{title:l,const:s,"x-jsf-presentation":u,...m}=e;return{...i,...m}})}function We(t){return t.oneOf?q(t.oneOf||[]):t.items?.anyOf?q(t.items.anyOf):t.anyOf?q(t.anyOf):null}var Ge=["title","type","x-jsf-errorMessage","x-jsf-presentation","oneOf","anyOf","items"];function $(t,e,n=!1){if(typeof t=="boolean")return null;if(t.type==="object"){let s={...t,type:"object"};return j(s,e,n)}if(t.type==="array")throw new TypeError("Array type is not yet supported");let r=t["x-jsf-presentation"]||{},a=t["x-jsf-errorMessage"],o=r.inputType||"text",i={...Object.entries(t).filter(([s])=>!Ge.includes(s)).reduce((s,[u,m])=>({...s,[u]:m}),{}),type:o,name:e,inputType:o,jsonType:qe(t),required:n,isVisible:!0,...a&&{errorMessage:a}};t.const&&(i.const=t.const,o==="checkbox"&&(i.checkboxValue=t.const)),t.title&&(i.label=t.title),Object.keys(r).length>0&&Object.entries(r).forEach(([s,u])=>{s!=="inputType"&&(i[s]=u)});let l=We(t);return l&&(i.options=l),i}function j(t,e,n){let r=[];for(let i in t.properties){let l=t.required?.includes(i)||!1,s=$(t.properties[i],i,l);s&&r.push(s)}let a=me({fields:r,schema:t}),o={...t["x-jsf-presentation"],type:t["x-jsf-presentation"]?.inputType||"fieldset",inputType:t["x-jsf-presentation"]?.inputType||"fieldset",jsonType:"object",name:e,required:n,fields:a,isVisible:!0};return t.title!==void 0&&(o.label=t.title),t.description!==void 0&&(o.description=t.description),t["x-jsf-presentation"]?.accept&&(o.accept=t["x-jsf-presentation"]?.accept),o}function he(t,e,n,r=[]){if(!e.allOf)return[];for(let a=0;a<e.allOf.length;a++){let o=e.allOf[a],i=p(t,o,n,[...r,"allOf",a]);if(i.length>0)return i}return[]}function ye(t,e,n,r=[]){if(!e.anyOf)return[];for(let a of e.anyOf)if(p(t,a,n,r).length===0)return[];return[{path:r,validation:"anyOf"}]}function ge(t,e,n,r=[]){if(!e.oneOf)return[];let a=0;for(let o=0;o<e.oneOf.length&&!(p(t,e.oneOf[o],n,r).length===0&&(a++,a>1));o++);return a===0?[{path:r,validation:"oneOf"}]:a>1?[{path:r,validation:"oneOf"}]:[]}function Ee(t,e,n,r=[]){return e.not===void 0?[]:typeof e.not=="boolean"?e.not?[{path:r,validation:"not"}]:[]:p(t,e.not,n,r).length===0?[{path:r,validation:"not"}]:[]}function Se(t,e,n,r=[]){if(e.if===void 0)return[];let a=p(t,e.if,n,r).length===0;return a&&e.then!==void 0?p(t,e.then,n,[...r,"then"]):!a&&e.else!==void 0?p(t,e.else,n,[...r,"else"]):[]}function y(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function v(t,e){if(typeof t!=typeof e)return!1;if(t===e)return!0;if(t===null||e===null)return!1;if(Array.isArray(t)&&Array.isArray(e))return t.length!==e.length?!1:t.every((n,r)=>v(n,e[r]));if(y(t)&&y(e)){let n=Object.keys(t).sort(),r=Object.keys(e).sort();return n.length!==r.length||!v(n,r)?!1:n.every(a=>v(t[a],e[a]))}return!1}function Oe(t,e,n=[]){return e.const===void 0?[]:v(e.const,t)?[]:[{path:n,validation:"const"}]}function Ve(t,e,n=[]){return e.enum===void 0?[]:e.enum.some(r=>v(r,t))?[]:[{path:n,validation:"enum"}]}function be(t,e,n=[]){let r=[],a=C(e);return typeof t!="number"?[]:a!==void 0&&!["number","integer"].includes(a)?[]:(e.multipleOf!==void 0&&t%e.multipleOf!==0&&r.push({path:n,validation:"multipleOf"}),e.maximum!==void 0&&t>e.maximum&&r.push({path:n,validation:"maximum"}),e.exclusiveMaximum!==void 0&&t>=e.exclusiveMaximum&&r.push({path:n,validation:"exclusiveMaximum"}),e.minimum!==void 0&&t<e.minimum&&r.push({path:n,validation:"minimum"}),e.exclusiveMinimum!==void 0&&t<=e.exclusiveMinimum&&r.push({path:n,validation:"exclusiveMinimum"}),r)}function ve(t,e,n,r=[]){if(typeof e=="object"&&e.properties&&y(t)){let a=[];for(let[o,i]of Object.entries(e.properties))a.push(...p(t[o],i,n,[...r,o]));return a}return[]}var Re;(function(t){t["7bit"]="7bit",t["8bit"]="8bit",t.Base64="base64",t.Binary="binary",t.IETFToken="ietf-token",t.QuotedPrintable="quoted-printable",t.XToken="x-token"})(Re||(Re={}));var d;(function(t){t.Date="date",t.DateTime="date-time",t.Duration="duration",t.Email="email",t.Hostname="hostname",t.IDNEmail="idn-email",t.IDNHostname="idn-hostname",t.IPv4="ipv4",t.IPv6="ipv6",t.IRI="iri",t.IRIReference="iri-reference",t.JSONPointer="json-pointer",t.JSONPointerURIFragment="json-pointer-uri-fragment",t.RegEx="regex",t.RelativeJSONPointer="relative-json-pointer",t.Time="time",t.URI="uri",t.URIReference="uri-reference",t.URITemplate="uri-template",t.UUID="uuid"})(d||(d={}));var xe;(function(t){t.Array="array",t.Boolean="boolean",t.Integer="integer",t.Null="null",t.Number="number",t.Object="object",t.String="string"})(xe||(xe={}));var c={DATE_TIME:/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/,DATE:/^\d{4}-\d{2}-\d{2}$/,TIME:/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/,DURATION:/^P(?!$)(?:\d+Y)?(?:\d+M)?(?:\d+D)?(?:T(?=\d)(?:\d+H)?(?:\d+M)?(?:\d+S)?)?$/,EMAIL:/^[\w.!#$%&'*+/=?^`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,IDN_EMAIL:/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/,HOSTNAME:/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/i,IDN_HOSTNAME:/^[^\s._-].*[^\s._-]$/,IPV6_PART:/^[0-9a-f]{1,4}$/i,PROTOCOL:/^[a-z]+:/,URI_REFERENCE:/^\S*$/,UUID:/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,JSON_POINTER:/^(?:\/(?:[^~/]|~0|~1)*)*$/,JSON_POINTER_URI_FRAGMENT:/^#(?:\/(?:[\w\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,RELATIVE_JSON_POINTER:/^(?:0|[1-9]\d*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,URI_TEMPLATE:/^(?:[!#$&'()*+,/:;=?@\w\-.~]|%[0-9a-f]{2}|\{[+#./;?&=,!@|]?(?:\w|%[0-9a-f]{2})+(?::[1-9]\d{0,3}|\*)?(?:,(?:\w|%[0-9a-f]{2})+(?::[1-9]\d{0,3}|\*)?)*\})*$/i},ze={[d.DateTime]:t=>c.DATE_TIME.test(t),[d.Date]:t=>c.DATE.test(t),[d.Time]:t=>c.TIME.test(t),[d.Duration]:t=>c.DURATION.test(t),[d.Email]:t=>t.length<=254&&c.EMAIL.test(t),[d.IDNEmail]:t=>t.length<=254&&c.IDN_EMAIL.test(t),[d.Hostname]:t=>t.length>255?!1:t.split(".").every(n=>c.HOSTNAME.test(n)),[d.IDNHostname]:t=>t.length>255?!1:t.split(".").every(n=>n.length<=63&&c.IDN_HOSTNAME.test(n)),[d.IPv4]:t=>{let e=t.split(".");return e.length!==4?!1:e.every(n=>{let r=Number.parseInt(n,10);return r>=0&&r<=255&&n===r.toString()})},[d.IPv6]:t=>{let e=t.split(":");if(e.length>8)return!1;let n=!1;return e.every(r=>r===""?n?!1:(n=!0,!0):c.IPV6_PART.test(r))},[d.URI]:t=>{try{let e=new URL(t);return e.protocol!==""&&c.PROTOCOL.test(e.protocol)}catch{return!1}},[d.URIReference]:t=>{try{return t.startsWith("//")?c.URI_REFERENCE.test(t.slice(2)):(new URL(t,"http://example.com"),!0)}catch{return!1}},[d.IRI]:t=>{try{let e=new URL(t);return e.protocol!==""&&c.PROTOCOL.test(e.protocol)}catch{return!1}},[d.IRIReference]:t=>{try{return t.startsWith("//")?c.URI_REFERENCE.test(t.slice(2)):(new URL(t,"http://example.com"),!0)}catch{return!1}},[d.RegEx]:t=>{try{return new RegExp(t,"u"),!0}catch{return!1}},[d.UUID]:t=>c.UUID.test(t),[d.JSONPointer]:t=>c.JSON_POINTER.test(t),[d.JSONPointerURIFragment]:t=>c.JSON_POINTER_URI_FRAGMENT.test(t),[d.RelativeJSONPointer]:t=>c.RELATIVE_JSON_POINTER.test(t),[d.URITemplate]:t=>c.URI_TEMPLATE.test(t)};function Te(t,e,n=[]){let r=[];if(typeof t!="string")return r;let a=ze[e];return a&&!a(t)&&r.push({path:n,validation:"format"}),r}function Ie(t,e,n=[]){let r=[],a=C(e);if(typeof t!="string")return[];if(a!==void 0&&a!=="string")return[];let o=[...new Intl.Segmenter().segment(t)].length;if(e.minLength!==void 0&&o<e.minLength&&r.push({path:n,validation:"minLength"}),e.maxLength!==void 0&&o>e.maxLength&&r.push({path:n,validation:"maxLength"}),e.pattern!==void 0&&(new RegExp(e.pattern).test(t)||r.push({path:n,validation:"pattern"})),e.format!==void 0){let i=Te(t,e.format,n);r.push(...i)}return r}function C(t){if(typeof t=="boolean")return"boolean";if(t.type!==void 0)return t.type}function Qe(t,e,n=[]){let r=C(e);if(r===void 0)return[];if(r==="null"&&t===null)return[];let a=t===null?"null":typeof t;if(Array.isArray(r)){if(t===null&&r.includes("null"))return[];for(let o of r){if(a==="number"&&o==="integer"&&Number.isInteger(t))return[];if(a===o||o==="null"&&t===null)return[]}}return a==="number"&&r==="integer"&&Number.isInteger(t)?[]:a===r?[]:[{path:n,validation:"type"}]}function p(t,e,n={},r=[]){let a=t===void 0||t===null&&n.treatNullAsUndefined,o=[];if(a)return[];if(typeof e=="boolean")return!e&&typeof t<"u"?[{path:r,validation:"valid"}]:[];let i=Qe(t,e,r);if(i.length>0)return i;if(e.required&&y(t)){let l=e.required.filter(s=>{let u=t[s];return u===void 0||u===null&&n.treatNullAsUndefined});for(let s of l)o.push({path:[...r,s],validation:"required"})}return[...o,...Oe(t,e,r),...Ve(t,e,r),...ve(t,e,n,r),...Ie(t,e,r),...be(t,e,r),...Ee(t,e,n,r),...he(t,e,n,r),...ye(t,e,n,r),...ge(t,e,n,r),...Se(t,e,n,r),...de(t,e,n,r)]}function z(t,e,n,r={}){if(y(e)){W(t,e,n,r);for(let a in n.properties){let o=n.properties[a],i=t.find(l=>l.name===a);i?.fields&&W(i.fields,e[a],o,r)}}}function Ae(t,e,n,r={}){let o=p(t,n.if,r).length===0,i=!1;return o&&n.if?.required&&(i=n.if.required.some(s=>{if(!e.properties||!e.properties[s])return!1;let u=e.properties[s],m=t[s];return p(m,u,r).some(E=>E.validation==="type")})),{rule:n,matches:o&&!i}}function W(t,e,n,r={}){if(!y(e))return;let a=[];n.if&&a.push(Ae(e,n,n,r)),(n.allOf??[]).filter(o=>typeof o.if<"u").forEach(o=>{let i=Ae(e,n,o,r);a.push(i)});for(let{rule:o,matches:i}of a)i&&o.then?G(t,e,o.then,r):!i&&o.else&&G(t,e,o.else,r)}function G(t,e,n,r={}){if(n.properties)for(let a in n.properties){let o=n.properties[a],i=t.find(l=>l.name===a);if(i){o===!1?i.isVisible=!1:i?.fields&&G(i.fields,e,o);let l=$(o,a,!0);for(let s in l)["type"].includes(s)||(i[s]=l[s])}}W(t,e,n,r)}function Ke(t){let e=[];for(let n=0;n<t.length;n++){let r=t[n];if(["allOf","anyOf","oneOf"].includes(r)){n+1<t.length&&typeof t[n+1]=="number"&&n++;continue}r==="then"||r==="else"||e.push(r)}return e}function Ze(t){return t.length===0?null:t.reduce((e,n)=>{let{path:r}=n;if(r.length===0)return e[""]=n.message,e;let a=Ke(r),o=e;if(a.slice(0,-1).forEach(i=>{(!(i in o)||typeof o[i]=="string")&&(o[i]={}),o=o[i]}),a.length>0){let i=a[a.length-1];o[i]=n.message}else e[""]=n.message;return e},{})}function Ye(t,e,n){let r=t,a=e;for(let o of n)if(typeof r=="object"&&r!==null)if(r.properties&&r.properties[o])r=r.properties[o],y(a)&&(a=a[o]);else if(r.items&&typeof r.items!="boolean")r=r.items,Array.isArray(a)&&(a=a[Number(o)]);else{if(o==="allOf"&&r.allOf)continue;if(o==="anyOf"&&r.anyOf)continue;if(o==="oneOf"&&r.oneOf)continue;if((o==="then"||o==="else")&&r[o]){r=r[o];continue}else if(r.allOf||r.anyOf||r.oneOf){let i=Number(o);r.allOf&&i>=0&&i<r.allOf.length?r=r.allOf[i]:r.anyOf&&i>=0&&i<r.anyOf.length?r=r.anyOf[i]:r.oneOf&&i>=0&&i<r.oneOf.length&&(r=r.oneOf[i])}}return{schema:r,value:a}}function Xe(t,e,n){return n.map(r=>{let{schema:a,value:o}=Ye(e,t,r.path);return{...r,message:pe(a,o,r.validation)}})}function et(t,e){return typeof e!="object"||!e||!t.length?t:t.map(n=>{if(!n.path.length)return n;let r=typeof e=="object"?e:null,a=null;for(let o of n.path){if(!r||typeof r!="object")break;if(r.properties&&r.properties[o]){let i=r.properties[o];if(typeof i!="boolean")r=i,a=r;else break}else if(r.items&&typeof r.items!="boolean")r=r.items,a=r;else break}return a&&a["x-jsf-errorMessage"]&&a["x-jsf-errorMessage"][n.validation]?{...n,message:a["x-jsf-errorMessage"][n.validation]}:n})}function tt(t,e,n={}){let r={},a=p(t,e,n),o=Xe(t,e,a),i=et(o,e),l=Ze(i);return l&&(r.formErrors=l),r}function rt(t){let{schema:e}=t;return j(e,"root",!0).fields||[]}function nt(t,e={}){let n=e.initialValues||{},r=rt({schema:t});return z(r,n,t),{fields:r,isError:!1,error:null,handleValidation:i=>{let l=tt(i,t,e.validationOptions);return Ne(r,t),z(r,i,t,e.validationOptions),l}}}function Ne(t,e){t.length=0;let n=j(e,"root",!0).fields||[];t.push(...n);for(let r of t)r.fields&&e.properties?.[r.name]?.type==="object"&&Ne(r.fields,e.properties[r.name])}export{nt as createHeadlessForm};
1
+ var Ua=Object.create;var pr=Object.defineProperty;var Ha=Object.getOwnPropertyDescriptor;var za=Object.getOwnPropertyNames;var Ga=Object.getPrototypeOf,Wa=Object.prototype.hasOwnProperty;var u=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var ka=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of za(r))!Wa.call(e,i)&&i!==t&&pr(e,i,{get:()=>r[i],enumerable:!(n=Ha(r,i))||n.enumerable});return e};var _=(e,r,t)=>(t=e!=null?Ua(Ga(e)):{},ka(r||!e||!e.__esModule?pr(t,"default",{value:e,enumerable:!0}):t,e));var G=u((tm,dr)=>{"use strict";dr.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var Ae=u(q=>{"use strict";var h=G(),Ve=()=>[{type:h.RANGE,from:48,to:57}],hr=()=>[{type:h.CHAR,value:95},{type:h.RANGE,from:97,to:122},{type:h.RANGE,from:65,to:90}].concat(Ve()),mr=()=>[{type:h.CHAR,value:9},{type:h.CHAR,value:10},{type:h.CHAR,value:11},{type:h.CHAR,value:12},{type:h.CHAR,value:13},{type:h.CHAR,value:32},{type:h.CHAR,value:160},{type:h.CHAR,value:5760},{type:h.RANGE,from:8192,to:8202},{type:h.CHAR,value:8232},{type:h.CHAR,value:8233},{type:h.CHAR,value:8239},{type:h.CHAR,value:8287},{type:h.CHAR,value:12288},{type:h.CHAR,value:65279}],Ka=()=>[{type:h.CHAR,value:10},{type:h.CHAR,value:13},{type:h.CHAR,value:8232},{type:h.CHAR,value:8233}];q.words=()=>({type:h.SET,set:hr(),not:!1});q.notWords=()=>({type:h.SET,set:hr(),not:!0});q.ints=()=>({type:h.SET,set:Ve(),not:!1});q.notInts=()=>({type:h.SET,set:Ve(),not:!0});q.whitespace=()=>({type:h.SET,set:mr(),not:!1});q.notWhitespace=()=>({type:h.SET,set:mr(),not:!0});q.anyChar=()=>({type:h.SET,set:Ka(),not:!0})});var yr=u(W=>{"use strict";var gr=G(),N=Ae(),Xa="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",Ya={0:0,t:9,n:10,v:11,f:12,r:13};W.strToChars=function(e){var r=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return e=e.replace(r,function(t,n,i,o,a,s,l,f){if(i)return t;var c=n?8:o?parseInt(o,16):a?parseInt(a,16):s?parseInt(s,8):l?Xa.indexOf(l):Ya[f],p=String.fromCharCode(c);return/[[\]{}^$.|?*+()]/.test(p)&&(p="\\"+p),p}),e};W.tokenizeClass=(e,r)=>{for(var t=[],n=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g,i,o;(i=n.exec(e))!=null;)if(i[1])t.push(N.words());else if(i[2])t.push(N.ints());else if(i[3])t.push(N.whitespace());else if(i[4])t.push(N.notWords());else if(i[5])t.push(N.notInts());else if(i[6])t.push(N.notWhitespace());else if(i[7])t.push({type:gr.RANGE,from:(i[8]||i[9]).charCodeAt(0),to:i[10].charCodeAt(0)});else if(o=i[12])t.push({type:gr.CHAR,value:o.charCodeAt(0)});else return[t,n.lastIndex];W.error(r,"Unterminated character class")};W.error=(e,r)=>{throw new SyntaxError("Invalid regular expression: /"+e+"/: "+r)}});var xr=u(k=>{"use strict";var ce=G();k.wordBoundary=()=>({type:ce.POSITION,value:"b"});k.nonWordBoundary=()=>({type:ce.POSITION,value:"B"});k.begin=()=>({type:ce.POSITION,value:"^"});k.end=()=>({type:ce.POSITION,value:"$"})});var br=u((am,Ce)=>{"use strict";var J=yr(),v=G(),V=Ae(),pe=xr();Ce.exports=e=>{var r=0,t,n,i={type:v.ROOT,stack:[]},o=i,a=i.stack,s=[],l=$a=>{J.error(e,`Nothing to repeat at column ${$a-1}`)},f=J.strToChars(e);for(t=f.length;r<t;)switch(n=f[r++],n){case"\\":switch(n=f[r++],n){case"b":a.push(pe.wordBoundary());break;case"B":a.push(pe.nonWordBoundary());break;case"w":a.push(V.words());break;case"W":a.push(V.notWords());break;case"d":a.push(V.ints());break;case"D":a.push(V.notInts());break;case"s":a.push(V.whitespace());break;case"S":a.push(V.notWhitespace());break;default:/\d/.test(n)?a.push({type:v.REFERENCE,value:parseInt(n,10)}):a.push({type:v.CHAR,value:n.charCodeAt(0)})}break;case"^":a.push(pe.begin());break;case"$":a.push(pe.end());break;case"[":var c;f[r]==="^"?(c=!0,r++):c=!1;var p=J.tokenizeClass(f.slice(r),e);r+=p[1],a.push({type:v.SET,set:p[0],not:c});break;case".":a.push(V.anyChar());break;case"(":var d={type:v.GROUP,stack:[],remember:!0};n=f[r],n==="?"&&(n=f[r+1],r+=2,n==="="?d.followedBy=!0:n==="!"?d.notFollowedBy=!0:n!==":"&&J.error(e,`Invalid group, character '${n}' after '?' at column ${r-1}`),d.remember=!1),a.push(d),s.push(o),o=d,a=d.stack;break;case")":s.length===0&&J.error(e,`Unmatched ) at column ${r-1}`),o=s.pop(),a=o.options?o.options[o.options.length-1]:o.stack;break;case"|":o.options||(o.options=[o.stack],delete o.stack);var g=[];o.options.push(g),a=g;break;case"{":var b=/^(\d+)(,(\d+)?)?\}/.exec(f.slice(r)),w,cr;b!==null?(a.length===0&&l(r),w=parseInt(b[1],10),cr=b[2]?b[3]?parseInt(b[3],10):1/0:w,r+=b[0].length,a.push({type:v.REPETITION,min:w,max:cr,value:a.pop()})):a.push({type:v.CHAR,value:123});break;case"?":a.length===0&&l(r),a.push({type:v.REPETITION,min:0,max:1,value:a.pop()});break;case"+":a.length===0&&l(r),a.push({type:v.REPETITION,min:1,max:1/0,value:a.pop()});break;case"*":a.length===0&&l(r),a.push({type:v.REPETITION,min:0,max:1/0,value:a.pop()});break;default:a.push({type:v.CHAR,value:n.charCodeAt(0)})}return s.length!==0&&J.error(e,"Unterminated group"),i};Ce.exports.types=v});var vr=u((sm,Sr)=>{"use strict";var P=class e{constructor(r,t){this.low=r,this.high=t,this.length=1+t-r}overlaps(r){return!(this.high<r.low||this.low>r.high)}touches(r){return!(this.high+1<r.low||this.low-1>r.high)}add(r){return new e(Math.min(this.low,r.low),Math.max(this.high,r.high))}subtract(r){return r.low<=this.low&&r.high>=this.high?[]:r.low>this.low&&r.high<this.high?[new e(this.low,r.low-1),new e(r.high+1,this.high)]:r.low<=this.low?[new e(r.high+1,this.high)]:[new e(this.low,r.low-1)]}toString(){return this.low==this.high?this.low.toString():this.low+"-"+this.high}},Re=class e{constructor(r,t){this.ranges=[],this.length=0,r!=null&&this.add(r,t)}_update_length(){this.length=this.ranges.reduce((r,t)=>r+t.length,0)}add(r,t){var n=i=>{for(var o=0;o<this.ranges.length&&!i.touches(this.ranges[o]);)o++;for(var a=this.ranges.slice(0,o);o<this.ranges.length&&i.touches(this.ranges[o]);)i=i.add(this.ranges[o]),o++;a.push(i),this.ranges=a.concat(this.ranges.slice(o)),this._update_length()};return r instanceof e?r.ranges.forEach(n):(t==null&&(t=r),n(new P(r,t))),this}subtract(r,t){var n=i=>{for(var o=0;o<this.ranges.length&&!i.overlaps(this.ranges[o]);)o++;for(var a=this.ranges.slice(0,o);o<this.ranges.length&&i.overlaps(this.ranges[o]);)a=a.concat(this.ranges[o].subtract(i)),o++;this.ranges=a.concat(this.ranges.slice(o)),this._update_length()};return r instanceof e?r.ranges.forEach(n):(t==null&&(t=r),n(new P(r,t))),this}intersect(r,t){var n=[],i=o=>{for(var a=0;a<this.ranges.length&&!o.overlaps(this.ranges[a]);)a++;for(;a<this.ranges.length&&o.overlaps(this.ranges[a]);){var s=Math.max(this.ranges[a].low,o.low),l=Math.min(this.ranges[a].high,o.high);n.push(new P(s,l)),a++}};return r instanceof e?r.ranges.forEach(i):(t==null&&(t=r),i(new P(r,t))),this.ranges=n,this._update_length(),this}index(r){for(var t=0;t<this.ranges.length&&this.ranges[t].length<=r;)r-=this.ranges[t].length,t++;return this.ranges[t].low+r}toString(){return"[ "+this.ranges.join(", ")+" ]"}clone(){return new e(this)}numbers(){return this.ranges.reduce((r,t)=>{for(var n=t.low;n<=t.high;)r.push(n),n++;return r},[])}subranges(){return this.ranges.map(r=>({low:r.low,high:r.high,length:1+r.high-r.low}))}};Sr.exports=Re});var Or=u((um,Er)=>{"use strict";var de=br(),K=vr(),A=de.types;Er.exports=class X{constructor(r,t){if(this._setDefaults(r),r instanceof RegExp)this.ignoreCase=r.ignoreCase,this.multiline=r.multiline,r=r.source;else if(typeof r=="string")this.ignoreCase=t&&t.indexOf("i")!==-1,this.multiline=t&&t.indexOf("m")!==-1;else throw new Error("Expected a regexp or string");this.tokens=de(r)}_setDefaults(r){this.max=r.max!=null?r.max:X.prototype.max!=null?X.prototype.max:100,this.defaultRange=r.defaultRange?r.defaultRange:this.defaultRange.clone(),r.randInt&&(this.randInt=r.randInt)}gen(){return this._gen(this.tokens,[])}_gen(r,t){var n,i,o,a,s;switch(r.type){case A.ROOT:case A.GROUP:if(r.followedBy||r.notFollowedBy)return"";for(r.remember&&r.groupNumber===void 0&&(r.groupNumber=t.push(null)-1),n=r.options?this._randSelect(r.options):r.stack,i="",a=0,s=n.length;a<s;a++)i+=this._gen(n[a],t);return r.remember&&(t[r.groupNumber]=i),i;case A.POSITION:return"";case A.SET:var l=this._expand(r);return l.length?String.fromCharCode(this._randSelect(l)):"";case A.REPETITION:for(o=this.randInt(r.min,r.max===1/0?r.min+this.max:r.max),i="",a=0;a<o;a++)i+=this._gen(r.value,t);return i;case A.REFERENCE:return t[r.value-1]||"";case A.CHAR:var f=this.ignoreCase&&this._randBool()?this._toOtherCase(r.value):r.value;return String.fromCharCode(f)}}_toOtherCase(r){return r+(97<=r&&r<=122?-32:65<=r&&r<=90?32:0)}_randBool(){return!this.randInt(0,1)}_randSelect(r){return r instanceof K?r.index(this.randInt(0,r.length-1)):r[this.randInt(0,r.length-1)]}_expand(r){if(r.type===de.types.CHAR)return new K(r.value);if(r.type===de.types.RANGE)return new K(r.from,r.to);{let t=new K;for(let n=0;n<r.set.length;n++){let i=this._expand(r.set[n]);if(t.add(i),this.ignoreCase)for(let o=0;o<i.length;o++){let a=i.index(o),s=this._toOtherCase(a);a!==s&&t.add(s)}}return r.not?this.defaultRange.clone().subtract(t):this.defaultRange.clone().intersect(t)}}randInt(r,t){return r+Math.floor(Math.random()*(1+t-r))}get defaultRange(){return this._range=this._range||new K(32,126)}set defaultRange(r){this._range=r}static randexp(r,t){var n;return typeof r=="string"&&(r=new RegExp(r,t)),r._randexp===void 0?(n=new X(r,t),r._randexp=n):(n=r._randexp,n._setDefaults(r)),n.gen()}static sugar(){RegExp.prototype.gen=function(){return X.randexp(this)}}}});var Le=u((bg,Yr)=>{"use strict";var qs=typeof global=="object"&&global&&global.Object===Object&&global;Yr.exports=qs});var C=u((Sg,Zr)=>{"use strict";var Is=Le(),ws=typeof self=="object"&&self&&self.Object===Object&&self,_s=Is||ws||Function("return this")();Zr.exports=_s});var Q=u((vg,Qr)=>{"use strict";var Vs=C(),As=Vs.Symbol;Qr.exports=As});var nt=u((Eg,tt)=>{"use strict";var et=Q(),rt=Object.prototype,Cs=rt.hasOwnProperty,Rs=rt.toString,ee=et?et.toStringTag:void 0;function js(e){var r=Cs.call(e,ee),t=e[ee];try{e[ee]=void 0;var n=!0}catch{}var i=Rs.call(e);return n&&(r?e[ee]=t:delete e[ee]),i}tt.exports=js});var ot=u((Og,it)=>{"use strict";var Ns=Object.prototype,Js=Ns.toString;function Ps(e){return Js.call(e)}it.exports=Ps});var F=u((Tg,ut)=>{"use strict";var at=Q(),Fs=nt(),Ms=ot(),Ls="[object Null]",Ds="[object Undefined]",st=at?at.toStringTag:void 0;function Bs(e){return e==null?e===void 0?Ds:Ls:st&&st in Object(e)?Fs(e):Ms(e)}ut.exports=Bs});var T=u((qg,lt)=>{"use strict";function $s(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}lt.exports=$s});var ge=u((Ig,ft)=>{"use strict";var Us=F(),Hs=T(),zs="[object AsyncFunction]",Gs="[object Function]",Ws="[object GeneratorFunction]",ks="[object Proxy]";function Ks(e){if(!Hs(e))return!1;var r=Us(e);return r==Gs||r==Ws||r==zs||r==ks}ft.exports=Ks});var pt=u((wg,ct)=>{"use strict";var Xs=C(),Ys=Xs["__core-js_shared__"];ct.exports=Ys});var mt=u((_g,ht)=>{"use strict";var De=pt(),dt=function(){var e=/[^.]+$/.exec(De&&De.keys&&De.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Zs(e){return!!dt&&dt in e}ht.exports=Zs});var yt=u((Vg,gt)=>{"use strict";var Qs=Function.prototype,eu=Qs.toString;function ru(e){if(e!=null){try{return eu.call(e)}catch{}try{return e+""}catch{}}return""}gt.exports=ru});var bt=u((Ag,xt)=>{"use strict";var tu=ge(),nu=mt(),iu=T(),ou=yt(),au=/[\\^$.*+?()[\]{}|]/g,su=/^\[object .+?Constructor\]$/,uu=Function.prototype,lu=Object.prototype,fu=uu.toString,cu=lu.hasOwnProperty,pu=RegExp("^"+fu.call(cu).replace(au,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function du(e){if(!iu(e)||nu(e))return!1;var r=tu(e)?pu:su;return r.test(ou(e))}xt.exports=du});var vt=u((Cg,St)=>{"use strict";function hu(e,r){return e?.[r]}St.exports=hu});var ye=u((Rg,Et)=>{"use strict";var mu=bt(),gu=vt();function yu(e,r){var t=gu(e,r);return mu(t)?t:void 0}Et.exports=yu});var re=u((jg,Ot)=>{"use strict";var xu=ye(),bu=xu(Object,"create");Ot.exports=bu});var It=u((Ng,qt)=>{"use strict";var Tt=re();function Su(){this.__data__=Tt?Tt(null):{},this.size=0}qt.exports=Su});var _t=u((Jg,wt)=>{"use strict";function vu(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}wt.exports=vu});var At=u((Pg,Vt)=>{"use strict";var Eu=re(),Ou="__lodash_hash_undefined__",Tu=Object.prototype,qu=Tu.hasOwnProperty;function Iu(e){var r=this.__data__;if(Eu){var t=r[e];return t===Ou?void 0:t}return qu.call(r,e)?r[e]:void 0}Vt.exports=Iu});var Rt=u((Fg,Ct)=>{"use strict";var wu=re(),_u=Object.prototype,Vu=_u.hasOwnProperty;function Au(e){var r=this.__data__;return wu?r[e]!==void 0:Vu.call(r,e)}Ct.exports=Au});var Nt=u((Mg,jt)=>{"use strict";var Cu=re(),Ru="__lodash_hash_undefined__";function ju(e,r){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=Cu&&r===void 0?Ru:r,this}jt.exports=ju});var Pt=u((Lg,Jt)=>{"use strict";var Nu=It(),Ju=_t(),Pu=At(),Fu=Rt(),Mu=Nt();function M(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}M.prototype.clear=Nu;M.prototype.delete=Ju;M.prototype.get=Pu;M.prototype.has=Fu;M.prototype.set=Mu;Jt.exports=M});var Mt=u((Dg,Ft)=>{"use strict";function Lu(){this.__data__=[],this.size=0}Ft.exports=Lu});var te=u((Bg,Lt)=>{"use strict";function Du(e,r){return e===r||e!==e&&r!==r}Lt.exports=Du});var ne=u(($g,Dt)=>{"use strict";var Bu=te();function $u(e,r){for(var t=e.length;t--;)if(Bu(e[t][0],r))return t;return-1}Dt.exports=$u});var $t=u((Ug,Bt)=>{"use strict";var Uu=ne(),Hu=Array.prototype,zu=Hu.splice;function Gu(e){var r=this.__data__,t=Uu(r,e);if(t<0)return!1;var n=r.length-1;return t==n?r.pop():zu.call(r,t,1),--this.size,!0}Bt.exports=Gu});var Ht=u((Hg,Ut)=>{"use strict";var Wu=ne();function ku(e){var r=this.__data__,t=Wu(r,e);return t<0?void 0:r[t][1]}Ut.exports=ku});var Gt=u((zg,zt)=>{"use strict";var Ku=ne();function Xu(e){return Ku(this.__data__,e)>-1}zt.exports=Xu});var kt=u((Gg,Wt)=>{"use strict";var Yu=ne();function Zu(e,r){var t=this.__data__,n=Yu(t,e);return n<0?(++this.size,t.push([e,r])):t[n][1]=r,this}Wt.exports=Zu});var ie=u((Wg,Kt)=>{"use strict";var Qu=Mt(),el=$t(),rl=Ht(),tl=Gt(),nl=kt();function L(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}L.prototype.clear=Qu;L.prototype.delete=el;L.prototype.get=rl;L.prototype.has=tl;L.prototype.set=nl;Kt.exports=L});var Be=u((kg,Xt)=>{"use strict";var il=ye(),ol=C(),al=il(ol,"Map");Xt.exports=al});var Qt=u((Kg,Zt)=>{"use strict";var Yt=Pt(),sl=ie(),ul=Be();function ll(){this.size=0,this.__data__={hash:new Yt,map:new(ul||sl),string:new Yt}}Zt.exports=ll});var rn=u((Xg,en)=>{"use strict";function fl(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}en.exports=fl});var oe=u((Yg,tn)=>{"use strict";var cl=rn();function pl(e,r){var t=e.__data__;return cl(r)?t[typeof r=="string"?"string":"hash"]:t.map}tn.exports=pl});var on=u((Zg,nn)=>{"use strict";var dl=oe();function hl(e){var r=dl(this,e).delete(e);return this.size-=r?1:0,r}nn.exports=hl});var sn=u((Qg,an)=>{"use strict";var ml=oe();function gl(e){return ml(this,e).get(e)}an.exports=gl});var ln=u((ey,un)=>{"use strict";var yl=oe();function xl(e){return yl(this,e).has(e)}un.exports=xl});var cn=u((ry,fn)=>{"use strict";var bl=oe();function Sl(e,r){var t=bl(this,e),n=t.size;return t.set(e,r),this.size+=t.size==n?0:1,this}fn.exports=Sl});var xe=u((ty,pn)=>{"use strict";var vl=Qt(),El=on(),Ol=sn(),Tl=ln(),ql=cn();function D(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}D.prototype.clear=vl;D.prototype.delete=El;D.prototype.get=Ol;D.prototype.has=Tl;D.prototype.set=ql;pn.exports=D});var hn=u((ny,dn)=>{"use strict";var Il="__lodash_hash_undefined__";function wl(e){return this.__data__.set(e,Il),this}dn.exports=wl});var gn=u((iy,mn)=>{"use strict";function _l(e){return this.__data__.has(e)}mn.exports=_l});var $e=u((oy,yn)=>{"use strict";var Vl=xe(),Al=hn(),Cl=gn();function be(e){var r=-1,t=e==null?0:e.length;for(this.__data__=new Vl;++r<t;)this.add(e[r])}be.prototype.add=be.prototype.push=Al;be.prototype.has=Cl;yn.exports=be});var bn=u((ay,xn)=>{"use strict";function Rl(e,r,t,n){for(var i=e.length,o=t+(n?1:-1);n?o--:++o<i;)if(r(e[o],o,e))return o;return-1}xn.exports=Rl});var vn=u((sy,Sn)=>{"use strict";function jl(e){return e!==e}Sn.exports=jl});var On=u((uy,En)=>{"use strict";function Nl(e,r,t){for(var n=t-1,i=e.length;++n<i;)if(e[n]===r)return n;return-1}En.exports=Nl});var qn=u((ly,Tn)=>{"use strict";var Jl=bn(),Pl=vn(),Fl=On();function Ml(e,r,t){return r===r?Fl(e,r,t):Jl(e,Pl,t)}Tn.exports=Ml});var Ue=u((fy,In)=>{"use strict";var Ll=qn();function Dl(e,r){var t=e==null?0:e.length;return!!t&&Ll(e,r,0)>-1}In.exports=Dl});var He=u((cy,wn)=>{"use strict";function Bl(e,r,t){for(var n=-1,i=e==null?0:e.length;++n<i;)if(t(r,e[n]))return!0;return!1}wn.exports=Bl});var ae=u((py,_n)=>{"use strict";function $l(e,r){for(var t=-1,n=e==null?0:e.length,i=Array(n);++t<n;)i[t]=r(e[t],t,e);return i}_n.exports=$l});var Se=u((dy,Vn)=>{"use strict";function Ul(e){return function(r){return e(r)}}Vn.exports=Ul});var ze=u((hy,An)=>{"use strict";function Hl(e,r){return e.has(r)}An.exports=Hl});var Rn=u((my,Cn)=>{"use strict";var zl=$e(),Gl=Ue(),Wl=He(),kl=ae(),Kl=Se(),Xl=ze(),Yl=200;function Zl(e,r,t,n){var i=-1,o=Gl,a=!0,s=e.length,l=[],f=r.length;if(!s)return l;t&&(r=kl(r,Kl(t))),n?(o=Wl,a=!1):r.length>=Yl&&(o=Xl,a=!1,r=new zl(r));e:for(;++i<s;){var c=e[i],p=t==null?c:t(c);if(c=n||c!==0?c:0,a&&p===p){for(var d=f;d--;)if(r[d]===p)continue e;l.push(c)}else o(r,p,n)||l.push(c)}return l}Cn.exports=Zl});var Nn=u((gy,jn)=>{"use strict";function Ql(e,r){for(var t=-1,n=r.length,i=e.length;++t<n;)e[i+t]=r[t];return e}jn.exports=Ql});var R=u((yy,Jn)=>{"use strict";function ef(e){return e!=null&&typeof e=="object"}Jn.exports=ef});var Fn=u((xy,Pn)=>{"use strict";var rf=F(),tf=R(),nf="[object Arguments]";function of(e){return tf(e)&&rf(e)==nf}Pn.exports=of});var ve=u((by,Dn)=>{"use strict";var Mn=Fn(),af=R(),Ln=Object.prototype,sf=Ln.hasOwnProperty,uf=Ln.propertyIsEnumerable,lf=Mn(function(){return arguments}())?Mn:function(e){return af(e)&&sf.call(e,"callee")&&!uf.call(e,"callee")};Dn.exports=lf});var j=u((Sy,Bn)=>{"use strict";var ff=Array.isArray;Bn.exports=ff});var zn=u((vy,Hn)=>{"use strict";var $n=Q(),cf=ve(),pf=j(),Un=$n?$n.isConcatSpreadable:void 0;function df(e){return pf(e)||cf(e)||!!(Un&&e&&e[Un])}Hn.exports=df});var kn=u((Ey,Wn)=>{"use strict";var hf=Nn(),mf=zn();function Gn(e,r,t,n,i){var o=-1,a=e.length;for(t||(t=mf),i||(i=[]);++o<a;){var s=e[o];r>0&&t(s)?r>1?Gn(s,r-1,t,n,i):hf(i,s):n||(i[i.length]=s)}return i}Wn.exports=Gn});var Ge=u((Oy,Kn)=>{"use strict";function gf(e){return e}Kn.exports=gf});var Yn=u((Ty,Xn)=>{"use strict";function yf(e,r,t){switch(t.length){case 0:return e.call(r);case 1:return e.call(r,t[0]);case 2:return e.call(r,t[0],t[1]);case 3:return e.call(r,t[0],t[1],t[2])}return e.apply(r,t)}Xn.exports=yf});var ei=u((qy,Qn)=>{"use strict";var xf=Yn(),Zn=Math.max;function bf(e,r,t){return r=Zn(r===void 0?e.length-1:r,0),function(){for(var n=arguments,i=-1,o=Zn(n.length-r,0),a=Array(o);++i<o;)a[i]=n[r+i];i=-1;for(var s=Array(r+1);++i<r;)s[i]=n[i];return s[r]=t(a),xf(e,this,s)}}Qn.exports=bf});var ti=u((Iy,ri)=>{"use strict";function Sf(e){return function(){return e}}ri.exports=Sf});var We=u((wy,ni)=>{"use strict";var vf=ye(),Ef=function(){try{var e=vf(Object,"defineProperty");return e({},"",{}),e}catch{}}();ni.exports=Ef});var ai=u((_y,oi)=>{"use strict";var Of=ti(),ii=We(),Tf=Ge(),qf=ii?function(e,r){return ii(e,"toString",{configurable:!0,enumerable:!1,value:Of(r),writable:!0})}:Tf;oi.exports=qf});var ui=u((Vy,si)=>{"use strict";var If=800,wf=16,_f=Date.now;function Vf(e){var r=0,t=0;return function(){var n=_f(),i=wf-(n-t);if(t=n,i>0){if(++r>=If)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}si.exports=Vf});var fi=u((Ay,li)=>{"use strict";var Af=ai(),Cf=ui(),Rf=Cf(Af);li.exports=Rf});var Ee=u((Cy,ci)=>{"use strict";var jf=Ge(),Nf=ei(),Jf=fi();function Pf(e,r){return Jf(Nf(e,r,jf),e+"")}ci.exports=Pf});var ke=u((Ry,pi)=>{"use strict";var Ff=9007199254740991;function Mf(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ff}pi.exports=Mf});var Oe=u((jy,di)=>{"use strict";var Lf=ge(),Df=ke();function Bf(e){return e!=null&&Df(e.length)&&!Lf(e)}di.exports=Bf});var Te=u((Ny,hi)=>{"use strict";var $f=Oe(),Uf=R();function Hf(e){return Uf(e)&&$f(e)}hi.exports=Hf});var yi=u((Jy,gi)=>{"use strict";var zf=Rn(),Gf=kn(),Wf=Ee(),mi=Te(),kf=Wf(function(e,r){return mi(e)?zf(e,Gf(r,1,mi,!0)):[]});gi.exports=kf});var qe=u((Py,xi)=>{"use strict";var Kf=F(),Xf=R(),Yf="[object Symbol]";function Zf(e){return typeof e=="symbol"||Xf(e)&&Kf(e)==Yf}xi.exports=Zf});var Si=u((Fy,bi)=>{"use strict";var Qf=j(),ec=qe(),rc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,tc=/^\w*$/;function nc(e,r){if(Qf(e))return!1;var t=typeof e;return t=="number"||t=="symbol"||t=="boolean"||e==null||ec(e)?!0:tc.test(e)||!rc.test(e)||r!=null&&e in Object(r)}bi.exports=nc});var Oi=u((My,Ei)=>{"use strict";var vi=xe(),ic="Expected a function";function Ke(e,r){if(typeof e!="function"||r!=null&&typeof r!="function")throw new TypeError(ic);var t=function(){var n=arguments,i=r?r.apply(this,n):n[0],o=t.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return t.cache=o.set(i,a)||o,a};return t.cache=new(Ke.Cache||vi),t}Ke.Cache=vi;Ei.exports=Ke});var qi=u((Ly,Ti)=>{"use strict";var oc=Oi(),ac=500;function sc(e){var r=oc(e,function(n){return t.size===ac&&t.clear(),n}),t=r.cache;return r}Ti.exports=sc});var wi=u((Dy,Ii)=>{"use strict";var uc=qi(),lc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fc=/\\(\\)?/g,cc=uc(function(e){var r=[];return e.charCodeAt(0)===46&&r.push(""),e.replace(lc,function(t,n,i,o){r.push(i?o.replace(fc,"$1"):n||t)}),r});Ii.exports=cc});var ji=u((By,Ri)=>{"use strict";var _i=Q(),pc=ae(),dc=j(),hc=qe(),mc=1/0,Vi=_i?_i.prototype:void 0,Ai=Vi?Vi.toString:void 0;function Ci(e){if(typeof e=="string")return e;if(dc(e))return pc(e,Ci)+"";if(hc(e))return Ai?Ai.call(e):"";var r=e+"";return r=="0"&&1/e==-mc?"-0":r}Ri.exports=Ci});var Ji=u(($y,Ni)=>{"use strict";var gc=ji();function yc(e){return e==null?"":gc(e)}Ni.exports=yc});var Xe=u((Uy,Pi)=>{"use strict";var xc=j(),bc=Si(),Sc=wi(),vc=Ji();function Ec(e,r){return xc(e)?e:bc(e,r)?[e]:Sc(vc(e))}Pi.exports=Ec});var Ye=u((Hy,Fi)=>{"use strict";var Oc=qe(),Tc=1/0;function qc(e){if(typeof e=="string"||Oc(e))return e;var r=e+"";return r=="0"&&1/e==-Tc?"-0":r}Fi.exports=qc});var Li=u((zy,Mi)=>{"use strict";var Ic=Xe(),wc=Ye();function _c(e,r){r=Ic(r,e);for(var t=0,n=r.length;e!=null&&t<n;)e=e[wc(r[t++])];return t&&t==n?e:void 0}Mi.exports=_c});var Bi=u((Gy,Di)=>{"use strict";var Vc=Li();function Ac(e,r,t){var n=e==null?void 0:Vc(e,r);return n===void 0?t:n}Di.exports=Ac});var Hi=u((Wy,Ui)=>{"use strict";var Cc=$e(),Rc=Ue(),jc=He(),Nc=ae(),Jc=Se(),$i=ze(),Pc=Math.min;function Fc(e,r,t){for(var n=t?jc:Rc,i=e[0].length,o=e.length,a=o,s=Array(o),l=1/0,f=[];a--;){var c=e[a];a&&r&&(c=Nc(c,Jc(r))),l=Pc(c.length,l),s[a]=!t&&(r||i>=120&&c.length>=120)?new Cc(a&&c):void 0}c=e[0];var p=-1,d=s[0];e:for(;++p<i&&f.length<l;){var g=c[p],b=r?r(g):g;if(g=t||g!==0?g:0,!(d?$i(d,b):n(f,b,t))){for(a=o;--a;){var w=s[a];if(!(w?$i(w,b):n(e[a],b,t)))continue e}d&&d.push(b),f.push(g)}}return f}Ui.exports=Fc});var Gi=u((ky,zi)=>{"use strict";var Mc=Te();function Lc(e){return Mc(e)?e:[]}zi.exports=Lc});var ki=u((Ky,Wi)=>{"use strict";var Dc=ae(),Bc=Hi(),$c=Ee(),Uc=Gi(),Hc=$c(function(e){var r=Dc(e,Uc);return r.length&&r[0]===e[0]?Bc(r):[]});Wi.exports=Hc});var Xi=u((Xy,Ki)=>{"use strict";var zc=ie();function Gc(){this.__data__=new zc,this.size=0}Ki.exports=Gc});var Zi=u((Yy,Yi)=>{"use strict";function Wc(e){var r=this.__data__,t=r.delete(e);return this.size=r.size,t}Yi.exports=Wc});var eo=u((Zy,Qi)=>{"use strict";function kc(e){return this.__data__.get(e)}Qi.exports=kc});var to=u((Qy,ro)=>{"use strict";function Kc(e){return this.__data__.has(e)}ro.exports=Kc});var io=u((ex,no)=>{"use strict";var Xc=ie(),Yc=Be(),Zc=xe(),Qc=200;function ep(e,r){var t=this.__data__;if(t instanceof Xc){var n=t.__data__;if(!Yc||n.length<Qc-1)return n.push([e,r]),this.size=++t.size,this;t=this.__data__=new Zc(n)}return t.set(e,r),this.size=t.size,this}no.exports=ep});var ao=u((rx,oo)=>{"use strict";var rp=ie(),tp=Xi(),np=Zi(),ip=eo(),op=to(),ap=io();function B(e){var r=this.__data__=new rp(e);this.size=r.size}B.prototype.clear=tp;B.prototype.delete=np;B.prototype.get=ip;B.prototype.has=op;B.prototype.set=ap;oo.exports=B});var Ie=u((tx,uo)=>{"use strict";var so=We();function sp(e,r,t){r=="__proto__"&&so?so(e,r,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[r]=t}uo.exports=sp});var Ze=u((nx,lo)=>{"use strict";var up=Ie(),lp=te();function fp(e,r,t){(t!==void 0&&!lp(e[r],t)||t===void 0&&!(r in e))&&up(e,r,t)}lo.exports=fp});var co=u((ix,fo)=>{"use strict";function cp(e){return function(r,t,n){for(var i=-1,o=Object(r),a=n(r),s=a.length;s--;){var l=a[e?s:++i];if(t(o[l],l,o)===!1)break}return r}}fo.exports=cp});var ho=u((ox,po)=>{"use strict";var pp=co(),dp=pp();po.exports=dp});var bo=u((se,$)=>{"use strict";var hp=C(),xo=typeof se=="object"&&se&&!se.nodeType&&se,mo=xo&&typeof $=="object"&&$&&!$.nodeType&&$,mp=mo&&mo.exports===xo,go=mp?hp.Buffer:void 0,yo=go?go.allocUnsafe:void 0;function gp(e,r){if(r)return e.slice();var t=e.length,n=yo?yo(t):new e.constructor(t);return e.copy(n),n}$.exports=gp});var vo=u((ax,So)=>{"use strict";var yp=C(),xp=yp.Uint8Array;So.exports=xp});var To=u((sx,Oo)=>{"use strict";var Eo=vo();function bp(e){var r=new e.constructor(e.byteLength);return new Eo(r).set(new Eo(e)),r}Oo.exports=bp});var Io=u((ux,qo)=>{"use strict";var Sp=To();function vp(e,r){var t=r?Sp(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}qo.exports=vp});var _o=u((lx,wo)=>{"use strict";function Ep(e,r){var t=-1,n=e.length;for(r||(r=Array(n));++t<n;)r[t]=e[t];return r}wo.exports=Ep});var Co=u((fx,Ao)=>{"use strict";var Op=T(),Vo=Object.create,Tp=function(){function e(){}return function(r){if(!Op(r))return{};if(Vo)return Vo(r);e.prototype=r;var t=new e;return e.prototype=void 0,t}}();Ao.exports=Tp});var jo=u((cx,Ro)=>{"use strict";function qp(e,r){return function(t){return e(r(t))}}Ro.exports=qp});var Qe=u((px,No)=>{"use strict";var Ip=jo(),wp=Ip(Object.getPrototypeOf,Object);No.exports=wp});var er=u((dx,Jo)=>{"use strict";var _p=Object.prototype;function Vp(e){var r=e&&e.constructor,t=typeof r=="function"&&r.prototype||_p;return e===t}Jo.exports=Vp});var Fo=u((hx,Po)=>{"use strict";var Ap=Co(),Cp=Qe(),Rp=er();function jp(e){return typeof e.constructor=="function"&&!Rp(e)?Ap(Cp(e)):{}}Po.exports=jp});var Lo=u((mx,Mo)=>{"use strict";function Np(){return!1}Mo.exports=Np});var rr=u((ue,U)=>{"use strict";var Jp=C(),Pp=Lo(),$o=typeof ue=="object"&&ue&&!ue.nodeType&&ue,Do=$o&&typeof U=="object"&&U&&!U.nodeType&&U,Fp=Do&&Do.exports===$o,Bo=Fp?Jp.Buffer:void 0,Mp=Bo?Bo.isBuffer:void 0,Lp=Mp||Pp;U.exports=Lp});var zo=u((gx,Ho)=>{"use strict";var Dp=F(),Bp=Qe(),$p=R(),Up="[object Object]",Hp=Function.prototype,zp=Object.prototype,Uo=Hp.toString,Gp=zp.hasOwnProperty,Wp=Uo.call(Object);function kp(e){if(!$p(e)||Dp(e)!=Up)return!1;var r=Bp(e);if(r===null)return!0;var t=Gp.call(r,"constructor")&&r.constructor;return typeof t=="function"&&t instanceof t&&Uo.call(t)==Wp}Ho.exports=kp});var Wo=u((yx,Go)=>{"use strict";var Kp=F(),Xp=ke(),Yp=R(),Zp="[object Arguments]",Qp="[object Array]",ed="[object Boolean]",rd="[object Date]",td="[object Error]",nd="[object Function]",id="[object Map]",od="[object Number]",ad="[object Object]",sd="[object RegExp]",ud="[object Set]",ld="[object String]",fd="[object WeakMap]",cd="[object ArrayBuffer]",pd="[object DataView]",dd="[object Float32Array]",hd="[object Float64Array]",md="[object Int8Array]",gd="[object Int16Array]",yd="[object Int32Array]",xd="[object Uint8Array]",bd="[object Uint8ClampedArray]",Sd="[object Uint16Array]",vd="[object Uint32Array]",m={};m[dd]=m[hd]=m[md]=m[gd]=m[yd]=m[xd]=m[bd]=m[Sd]=m[vd]=!0;m[Zp]=m[Qp]=m[cd]=m[ed]=m[pd]=m[rd]=m[td]=m[nd]=m[id]=m[od]=m[ad]=m[sd]=m[ud]=m[ld]=m[fd]=!1;function Ed(e){return Yp(e)&&Xp(e.length)&&!!m[Kp(e)]}Go.exports=Ed});var Ko=u((le,H)=>{"use strict";var Od=Le(),ko=typeof le=="object"&&le&&!le.nodeType&&le,fe=ko&&typeof H=="object"&&H&&!H.nodeType&&H,Td=fe&&fe.exports===ko,tr=Td&&Od.process,qd=function(){try{var e=fe&&fe.require&&fe.require("util").types;return e||tr&&tr.binding&&tr.binding("util")}catch{}}();H.exports=qd});var nr=u((xx,Zo)=>{"use strict";var Id=Wo(),wd=Se(),Xo=Ko(),Yo=Xo&&Xo.isTypedArray,_d=Yo?wd(Yo):Id;Zo.exports=_d});var ir=u((bx,Qo)=>{"use strict";function Vd(e,r){if(!(r==="constructor"&&typeof e[r]=="function")&&r!="__proto__")return e[r]}Qo.exports=Vd});var or=u((Sx,ea)=>{"use strict";var Ad=Ie(),Cd=te(),Rd=Object.prototype,jd=Rd.hasOwnProperty;function Nd(e,r,t){var n=e[r];(!(jd.call(e,r)&&Cd(n,t))||t===void 0&&!(r in e))&&Ad(e,r,t)}ea.exports=Nd});var ta=u((vx,ra)=>{"use strict";var Jd=or(),Pd=Ie();function Fd(e,r,t,n){var i=!t;t||(t={});for(var o=-1,a=r.length;++o<a;){var s=r[o],l=n?n(t[s],e[s],s,t,e):void 0;l===void 0&&(l=e[s]),i?Pd(t,s,l):Jd(t,s,l)}return t}ra.exports=Fd});var ia=u((Ex,na)=>{"use strict";function Md(e,r){for(var t=-1,n=Array(e);++t<e;)n[t]=r(t);return n}na.exports=Md});var we=u((Ox,oa)=>{"use strict";var Ld=9007199254740991,Dd=/^(?:0|[1-9]\d*)$/;function Bd(e,r){var t=typeof e;return r=r??Ld,!!r&&(t=="number"||t!="symbol"&&Dd.test(e))&&e>-1&&e%1==0&&e<r}oa.exports=Bd});var sa=u((Tx,aa)=>{"use strict";var $d=ia(),Ud=ve(),Hd=j(),zd=rr(),Gd=we(),Wd=nr(),kd=Object.prototype,Kd=kd.hasOwnProperty;function Xd(e,r){var t=Hd(e),n=!t&&Ud(e),i=!t&&!n&&zd(e),o=!t&&!n&&!i&&Wd(e),a=t||n||i||o,s=a?$d(e.length,String):[],l=s.length;for(var f in e)(r||Kd.call(e,f))&&!(a&&(f=="length"||i&&(f=="offset"||f=="parent")||o&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||Gd(f,l)))&&s.push(f);return s}aa.exports=Xd});var la=u((qx,ua)=>{"use strict";function Yd(e){var r=[];if(e!=null)for(var t in Object(e))r.push(t);return r}ua.exports=Yd});var ca=u((Ix,fa)=>{"use strict";var Zd=T(),Qd=er(),eh=la(),rh=Object.prototype,th=rh.hasOwnProperty;function nh(e){if(!Zd(e))return eh(e);var r=Qd(e),t=[];for(var n in e)n=="constructor"&&(r||!th.call(e,n))||t.push(n);return t}fa.exports=nh});var ar=u((wx,pa)=>{"use strict";var ih=sa(),oh=ca(),ah=Oe();function sh(e){return ah(e)?ih(e,!0):oh(e)}pa.exports=sh});var ha=u((_x,da)=>{"use strict";var uh=ta(),lh=ar();function fh(e){return uh(e,lh(e))}da.exports=fh});var Sa=u((Vx,ba)=>{"use strict";var ma=Ze(),ch=bo(),ph=Io(),dh=_o(),hh=Fo(),ga=ve(),ya=j(),mh=Te(),gh=rr(),yh=ge(),xh=T(),bh=zo(),Sh=nr(),xa=ir(),vh=ha();function Eh(e,r,t,n,i,o,a){var s=xa(e,t),l=xa(r,t),f=a.get(l);if(f){ma(e,t,f);return}var c=o?o(s,l,t+"",e,r,a):void 0,p=c===void 0;if(p){var d=ya(l),g=!d&&gh(l),b=!d&&!g&&Sh(l);c=l,d||g||b?ya(s)?c=s:mh(s)?c=dh(s):g?(p=!1,c=ch(l,!0)):b?(p=!1,c=ph(l,!0)):c=[]:bh(l)||ga(l)?(c=s,ga(s)?c=vh(s):(!xh(s)||yh(s))&&(c=hh(l))):p=!1}p&&(a.set(l,c),i(c,l,n,o,a),a.delete(l)),ma(e,t,c)}ba.exports=Eh});var sr=u((Ax,Ea)=>{"use strict";var Oh=ao(),Th=Ze(),qh=ho(),Ih=Sa(),wh=T(),_h=ar(),Vh=ir();function va(e,r,t,n,i){e!==r&&qh(r,function(o,a){if(i||(i=new Oh),wh(o))Ih(e,r,a,t,va,n,i);else{var s=n?n(Vh(e,a),o,a+"",e,r,i):void 0;s===void 0&&(s=o),Th(e,a,s)}},_h)}Ea.exports=va});var Ta=u((Cx,Oa)=>{"use strict";var Ah=te(),Ch=Oe(),Rh=we(),jh=T();function Nh(e,r,t){if(!jh(t))return!1;var n=typeof r;return(n=="number"?Ch(t)&&Rh(r,t.length):n=="string"&&r in t)?Ah(t[r],e):!1}Oa.exports=Nh});var ur=u((Rx,qa)=>{"use strict";var Jh=Ee(),Ph=Ta();function Fh(e){return Jh(function(r,t){var n=-1,i=t.length,o=i>1?t[i-1]:void 0,a=i>2?t[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&Ph(t[0],t[1],a)&&(o=i<3?void 0:o,i=1),r=Object(r);++n<i;){var s=t[n];s&&e(r,s,n,o)}return r})}qa.exports=Fh});var wa=u((jx,Ia)=>{"use strict";var Mh=sr(),Lh=ur(),Dh=Lh(function(e,r,t){Mh(e,r,t)});Ia.exports=Dh});var Va=u((Nx,_a)=>{"use strict";var Bh=sr(),$h=ur(),Uh=$h(function(e,r,t,n){Bh(e,r,t,n)});_a.exports=Uh});var Ra=u((Jx,Ca)=>{"use strict";var Hh=or(),zh=Xe(),Gh=we(),Aa=T(),Wh=Ye();function kh(e,r,t,n){if(!Aa(e))return e;r=zh(r,e);for(var i=-1,o=r.length,a=o-1,s=e;s!=null&&++i<o;){var l=Wh(r[i]),f=t;if(l==="__proto__"||l==="constructor"||l==="prototype")return e;if(i!=a){var c=s[l];f=n?n(c,l,s):void 0,f===void 0&&(f=Aa(c)?c:Gh(r[i+1])?[]:{})}Hh(s,l,f),s=s[l]}return e}Ca.exports=kh});var Na=u((Px,ja)=>{"use strict";var Kh=Ra();function Xh(e,r,t){return e==null?e:Kh(e,r,t)}ja.exports=Xh});var _r=_(Or(),1);function Tr(e){if(e===0)return 0;let r=e/1024;return Number.parseFloat(r.toFixed(2))}var qr="yyyy-MM-dd";function Ir(e,r){let t=new Date(e).getTime(),n=new Date(r).getTime();return t<n?"LESSER":t>n?"GREATER":"EQUAL"}function Za(e,r){let t=Ir(e,r);return t==="GREATER"||t==="EQUAL"}function Qa(e,r){let t=Ir(e,r);return t==="LESSER"||t==="EQUAL"}function wr(e,r,t,n=[]){let i=typeof e=="string",o=e==="",a=e===void 0||e===null&&t.treatNullAsUndefined,s=o||a,l=[];if(!i||s||r["x-jsf-presentation"]===void 0)return l;let{minDate:f,maxDate:c}=r["x-jsf-presentation"];return f&&!Za(e,f)&&l.push({path:n,validation:"minDate",schema:r,value:e}),c&&!Qa(e,c)&&l.push({path:n,validation:"maxDate",schema:r,value:e}),l}function Vr(e,r,t,n){let i=e["x-jsf-presentation"];switch(t){case"type":return es(e.type);case"required":return e["x-jsf-presentation"]?.inputType==="checkbox"?"Please acknowledge this field":"Required field";case"valid":return"Always fails";case"const":return`The only accepted value is ${JSON.stringify(e.const)}.`;case"enum":return`The option "${je(r)}" is not valid.`;case"anyOf":return`The option "${je(r)}" is not valid.`;case"oneOf":return`The option "${je(r)}" is not valid.`;case"not":return"The value must not satisfy the provided schema";case"minLength":return`Please insert at least ${e.minLength} characters`;case"maxLength":return`Please insert up to ${e.maxLength} characters`;case"pattern":return`Must have a valid format. E.g. ${(0,_r.randexp)(e.pattern||"")}`;case"format":if(e.format==="email")return"Please enter a valid email address";if(e.format==="date"){let o=new Date().toISOString().split("T")[0];return`Must be a valid date in ${qr.toLowerCase()} format. e.g. ${o}`}return`Must be a valid ${e.format} format`;case"multipleOf":return`Must be a multiple of ${e.multipleOf}`;case"maximum":return`Must be smaller or equal to ${e.maximum}`;case"exclusiveMaximum":return`Must be smaller than ${e.exclusiveMaximum}`;case"minimum":return`Must be greater or equal to ${e.minimum}`;case"exclusiveMinimum":return`Must be greater than ${e.exclusiveMinimum}`;case"minDate":return`The date must be ${i?.minDate} or after.`;case"maxDate":return`The date must be ${i?.maxDate} or before.`;case"fileStructure":return"Not a valid file.";case"maxFileSize":{let o=i?.maxFileSize,a=typeof o=="number"?Tr(o):void 0;return`File size too large.${a?` The limit is ${a} MB.`:""}`}case"accept":{let o=i?.accept;return`Unsupported file format.${o?` The acceptable formats are ${o}.`:""}`}case"minItems":throw new Error("Array support is not implemented yet");case"maxItems":throw new Error("Array support is not implemented yet");case"uniqueItems":throw new Error("Array support is not implemented yet");case"contains":throw new Error("Array support is not implemented yet");case"minContains":throw new Error("Array support is not implemented yet");case"maxContains":throw new Error("Array support is not implemented yet");case"json-logic":return n||"The value is not valid"}}function es(e){if(Array.isArray(e))return`The value must be a ${e.map(t=>t==="integer"?"number":t).join(" or ")}`;switch(e){case"number":case"integer":return"The value must be a number";case"boolean":return"The value must be a boolean";case"null":return"The value must be null";case"string":return"The value must be a string";case"object":return"The value must be an object";case"array":return"The value must be an array";default:return e?`The value must be ${e}`:"Invalid value"}}function je(e){return typeof e=="string"?e:JSON.stringify(e)}function rs(e){let{fields:r,order:t}=e,n={};return t.forEach((o,a)=>{n[o]=a}),r.sort((o,a)=>{let s=n[o.name]??1/0,l=n[a.name]??1/0;return s!==l?s-l:r.indexOf(o)-r.indexOf(a)})}function Ar(e){let{schema:r,fields:t}=e;if(typeof r=="boolean")throw new Error("Schema must be an object");return r["x-jsf-order"]!==void 0?rs({fields:t,order:r["x-jsf-order"]}):t}function ts(e,r,t){r.checkboxValue=t.const,t.type==="boolean"&&(r.checkboxValue=!0)}function ns(e,r){if(!e)return"text";switch(e){case"string":{let{oneOf:t,format:n}=r;return n==="email"?"email":n==="date"?"date":n==="data-url"?"file":t?"radio":"text"}case"number":case"integer":return"number";case"object":return"fieldset";case"array":{let{items:t}=r;return t?.properties?"group-array":"select"}case"boolean":return"checkbox";default:return"text"}}function is(e,r){let t=e["x-jsf-presentation"];if(t?.inputType)return t.inputType;if(r)throw new Error(`Strict error: Missing inputType to field "${e.title}".
2
+ You can fix the json schema or skip this error by calling createHeadlessForm(schema, { strictInputType: false })`);if(!e.type){if(e.items?.properties)return"group-array";if(e.properties)return"select"}return ns(e.type||"string",e)}function he(e){return e.filter(r=>r!==null&&typeof r=="object"&&r.const!==null).map(r=>{let t=r.title,n=r.const,o=r["x-jsf-presentation"]?.meta,a={label:t||"",value:n};o&&(a.meta=o);let{title:s,const:l,"x-jsf-presentation":f,...c}=r;return{...a,...c}})}function os(e){if(e.oneOf)return he(e.oneOf||[]);if(e.items?.anyOf)return he(e.items.anyOf);if(e.anyOf)return he(e.anyOf);if(e.enum){let r=e.enum?.map(t=>({title:typeof t=="string"?t:JSON.stringify(t),const:t}))||[];return he(r)}return null}var as=["title","type","x-jsf-errorMessage","x-jsf-presentation","oneOf","anyOf","items"];function me(e,r,t=!1,n=!1){if(typeof e=="boolean")return null;if(e.type==="object"){let f={...e,type:"object"};return Y(f,r,t)}if(e.type==="array")throw new TypeError("Array type is not yet supported");let i=e["x-jsf-presentation"]||{},o=e["x-jsf-errorMessage"],a=is(e,n),s={...Object.entries(e).filter(([f])=>!as.includes(f)).reduce((f,[c,p])=>({...f,[c]:p}),{}),type:a,name:r,inputType:a,jsonType:e.type,required:t,isVisible:!0,...o&&{errorMessage:o}};a==="checkbox"&&ts(a,s,e),e.title&&(s.label=e.title),Object.keys(i).length>0&&Object.entries(i).forEach(([f,c])=>{f!=="inputType"&&(s[f]=c)});let l=os(e);return l&&(s.options=l),s}function Y(e,r,t,n){let i=[];for(let s in e.properties){let l=e.required?.includes(s)||!1,f=me(e.properties[s],s,l,n);f&&i.push(f)}let o=Ar({fields:i,schema:e}),a={...e["x-jsf-presentation"],type:e["x-jsf-presentation"]?.inputType||"fieldset",inputType:e["x-jsf-presentation"]?.inputType||"fieldset",jsonType:"object",name:r,required:t,fields:o,isVisible:!0};return e.title!==void 0&&(a.label=e.title),e.description!==void 0&&(a.description=e.description),e["x-jsf-presentation"]?.accept&&(a.accept=e["x-jsf-presentation"]?.accept),a}function E(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function O(e,r){if(typeof e!=typeof r)return!1;if(e===r)return!0;if(e===null||r===null)return!1;if(Array.isArray(e)&&Array.isArray(r))return e.length!==r.length?!1:e.every((t,n)=>O(t,r[n]));if(E(e)&&E(r)){let t=Object.keys(e).sort(),n=Object.keys(r).sort();return t.length!==n.length||!O(t,n)?!1:t.every(i=>O(e[i],r[i]))}return!1}function Cr(e){if(typeof structuredClone=="function")try{return structuredClone(e)}catch(r){console.warn("structuredClone failed, falling back to JSON method:",r)}try{return JSON.parse(JSON.stringify(e))}catch{throw new Error("Deep clone failed: Object may contain circular references or non-serializable values")}}function Rr(e,r,t,n,i){return Array.isArray(e)?[...ss(r,e,i),...cs(r,e,i),...fs(e,r,t,n,i),...ls(r,e,t,n,i),...us(r,e,t,n,i)]:[]}function ss(e,r,t){let n=[],i=r.length;return e.maxItems!==void 0&&i>e.maxItems&&n.push({path:t,validation:"maxItems",schema:e,value:r}),e.minItems!==void 0&&i<e.minItems&&n.push({path:t,validation:"minItems",schema:e,value:r}),n}function us(e,r,t,n,i){if(e.items===void 0)return[];let o=[],a=Array.isArray(e.prefixItems)?e.prefixItems.length:0;for(let[s,l]of r.slice(a).entries())o.push(...y(l,e.items,t,[...i,"items",s+a],n));return o}function ls(e,r,t,n,i){if(!Array.isArray(e.prefixItems))return[];let o=[];for(let[a,s]of r.entries())a<e.prefixItems.length&&o.push(...y(s,e.prefixItems[a],t,[...i,"prefixItems",a],n));return o}function fs(e,r,t,n,i){if(!("contains"in r))return[];let o=[],a=e.filter(s=>y(s,r.contains,t,[...i,"contains"],n).length===0).length;return r.minContains===void 0&&r.maxContains===void 0?a<1&&o.push({path:i,validation:"contains",schema:r,value:e}):(r.minContains!==void 0&&a<r.minContains&&o.push({path:i,validation:"minContains",schema:r,value:e}),r.maxContains!==void 0&&a>r.maxContains&&o.push({path:i,validation:"maxContains",schema:r,value:e})),o}function cs(e,r,t){if(e.uniqueItems!==!0)return[];let n=new Map;for(let i=0;i<r.length;i++){for(let o of n.values())if(O(r[i],o))return[{path:t,validation:"uniqueItems",schema:e,value:r[i]}];n.set(i,r[i])}return[]}function jr(e,r,t,n,i=[]){if(!r.allOf)return[];for(let o=0;o<r.allOf.length;o++){let a=r.allOf[o],s=y(e,a,t,[...i,"allOf",o],n);if(s.length>0)return s}return[]}function Nr(e,r,t,n,i=[]){if(!r.anyOf)return[];for(let o of r.anyOf)if(y(e,o,t,i,n).length===0)return[];return[{path:i,validation:"anyOf",schema:r,value:e}]}function Jr(e,r,t,n,i=[]){if(!r.oneOf)return[];let o=0;for(let a=0;a<r.oneOf.length&&!(y(e,r.oneOf[a],t,i,n).length===0&&(o++,o>1));a++);return o===0?[{path:i,validation:"oneOf",schema:r,value:e}]:o>1?[{path:i,validation:"oneOf",schema:r,value:e}]:[]}function Pr(e,r,t,n,i=[]){return r.not===void 0?[]:typeof r.not=="boolean"?r.not?[{path:i,validation:"not",schema:r,value:e}]:[]:y(e,r.not,t,i,n).length===0?[{path:i,validation:"not",schema:r,value:e}]:[]}function Fr(e,r,t,n,i=[]){if(r.if===void 0)return[];let o=y(e,r.if,t,i,n).length===0;return o&&r.then!==void 0?y(e,r.then,t,[...i,"then"],n):!o&&r.else!==void 0?y(e,r.else,t,[...i,"else"],n):[]}function Mr(e,r,t=[]){return r.const===void 0?[]:O(r.const,e)?[]:[{path:t,validation:"const",schema:r,value:e}]}function Lr(e,r,t=[]){return r.enum===void 0?[]:r.enum.some(n=>O(n,e))?[]:[{path:t,validation:"enum",schema:r,value:e}]}function Dr(e,r,t=[]){let n=r["x-jsf-presentation"],i=n?.inputType==="file",o=typeof n?.maxFileSize=="number"||typeof n?.accept=="string";if(!(i||o))return[];if(!Array.isArray(e))return[];if(e.length===0)return[];if(!e.every(f=>E(f)&&typeof f.name=="string"&&typeof f.size=="number"))return[{path:t,validation:"fileStructure",schema:r,value:e}];let l=e;if(typeof n?.maxFileSize=="number"){let f=n.maxFileSize*1024;if(l.some(p=>p.size>f))return[{path:t,validation:"maxFileSize",schema:r,value:e}]}if(typeof n?.accept=="string"&&n.accept.trim()!==""){let f=n.accept.toLowerCase().split(",").map(c=>c.trim()).filter(c=>c).map(c=>c.startsWith(".")?c:`.${c}`);if(f.length>0&&!l.some(p=>{let d=p.name.toLowerCase(),g=d.includes(".")?`.${d.split(".").pop()}`:"";return g!==""&&f.includes(g)}))return[{path:t,validation:"accept",schema:r,value:e}]}return[]}import Ne from"json-logic-js";function ps(e){return/\{\{.*?\}\}/.test(e)}function Je(e={}){return Object.entries(e).reduce((r,[t,n])=>({...r,[t]:n??Number.NaN}),{})}function Br(e,r,t=[]){let n=e["x-jsf-logic-validations"];return!n||n.length===0?[]:n.map(i=>{let o=r?.schema?.validations?.[i],a=r?.value;if(!o)throw new Error(`[json-schema-form] json-logic error: "${e.title}" required validation "${i}" doesn't exist.`);return Ne.apply(o.rule,Je(a))===!1?[{path:t,validation:"json-logic",customErrorMessage:o.errorMessage,schema:e,value:a}]:[]}).flat()}function $r(e,r,t={},n,i=[]){let o=r["x-jsf-logic-computedAttrs"];if(!o||Object.keys(o).length===0)return[];let a=Cr(r);return delete a["x-jsf-logic-computedAttrs"],Object.entries(o).forEach(([s,l])=>{if(s==="x-jsf-errorMessage"){let f=hs(l,n);f&&(a["x-jsf-errorMessage"]=f)}else{let f=l,c=n?.schema?.computedValues?.[f]?.rule,p=n?.value;if(!c)throw new Error(`[json-schema-form] json-logic error: Computed value "${f}" has missing rule.`);let d=Ne.apply(c,Je(p));if(d===null)return;a[s]=d}}),y(e,a,t,i,n)}function ds(e,r){return r?.schema?.computedValues?e.replace(/\{\{(.*?)\}\}/g,(t,n)=>{let i=n.trim(),o=r.schema.computedValues?.[i]?.rule;if(!o)throw new Error(`[json-schema-form] json-logic error: Computed value "${i}" doesn't exist`);return Ne.apply(o,Je(r.value))?.toString()??`{{${i}}}`}):(console.warn("No computed values found in the JSON Logic context"),e)}function hs(e,r){if(!e)return;let t={};return Object.entries(e).forEach(([n,i])=>{let o=i;ps(i)&&(o=ds(i,r)),t[n]=o}),t}function Ur(e,r,t=[]){let n=[],i=Z(r);return typeof e!="number"?[]:i!==void 0&&!["number","integer"].includes(i)?[]:(r.multipleOf!==void 0&&e%r.multipleOf!==0&&n.push({path:t,validation:"multipleOf",schema:r,value:e}),r.maximum!==void 0&&e>r.maximum&&n.push({path:t,validation:"maximum",schema:r,value:e}),r.exclusiveMaximum!==void 0&&e>=r.exclusiveMaximum&&n.push({path:t,validation:"exclusiveMaximum",schema:r,value:e}),r.minimum!==void 0&&e<r.minimum&&n.push({path:t,validation:"minimum",schema:r,value:e}),r.exclusiveMinimum!==void 0&&e<=r.exclusiveMinimum&&n.push({path:t,validation:"exclusiveMinimum",schema:r,value:e}),n)}function Hr(e,r,t,n,i=[]){if(typeof r=="object"&&r.properties&&E(e)){let o=[];for(let[a,s]of Object.entries(r.properties))o.push(...y(e[a],s,t,[...i,a],n));return o}return[]}var zr;(function(e){e["7bit"]="7bit",e["8bit"]="8bit",e.Base64="base64",e.Binary="binary",e.IETFToken="ietf-token",e.QuotedPrintable="quoted-printable",e.XToken="x-token"})(zr||(zr={}));var x;(function(e){e.Date="date",e.DateTime="date-time",e.Duration="duration",e.Email="email",e.Hostname="hostname",e.IDNEmail="idn-email",e.IDNHostname="idn-hostname",e.IPv4="ipv4",e.IPv6="ipv6",e.IRI="iri",e.IRIReference="iri-reference",e.JSONPointer="json-pointer",e.JSONPointerURIFragment="json-pointer-uri-fragment",e.RegEx="regex",e.RelativeJSONPointer="relative-json-pointer",e.Time="time",e.URI="uri",e.URIReference="uri-reference",e.URITemplate="uri-template",e.UUID="uuid"})(x||(x={}));var Gr;(function(e){e.Array="array",e.Boolean="boolean",e.Integer="integer",e.Null="null",e.Number="number",e.Object="object",e.String="string"})(Gr||(Gr={}));var S={DATE_TIME:/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/,DATE:/^\d{4}-\d{2}-\d{2}$/,TIME:/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/,DURATION:/^P(?!$)(?:\d+Y)?(?:\d+M)?(?:\d+D)?(?:T(?=\d)(?:\d+H)?(?:\d+M)?(?:\d+S)?)?$/,EMAIL:/^[\w.!#$%&'*+/=?^`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,IDN_EMAIL:/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/,HOSTNAME:/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/i,IDN_HOSTNAME:/^[^\s._-].*[^\s._-]$/,IPV6_PART:/^[0-9a-f]{1,4}$/i,PROTOCOL:/^[a-z]+:/,URI_REFERENCE:/^\S*$/,UUID:/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,JSON_POINTER:/^(?:\/(?:[^~/]|~0|~1)*)*$/,JSON_POINTER_URI_FRAGMENT:/^#(?:\/(?:[\w\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,RELATIVE_JSON_POINTER:/^(?:0|[1-9]\d*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,URI_TEMPLATE:/^(?:[!#$&'()*+,/:;=?@\w\-.~]|%[0-9a-f]{2}|\{[+#./;?&=,!@|]?(?:\w|%[0-9a-f]{2})+(?::[1-9]\d{0,3}|\*)?(?:,(?:\w|%[0-9a-f]{2})+(?::[1-9]\d{0,3}|\*)?)*\})*$/i},ms={[x.DateTime]:e=>S.DATE_TIME.test(e),[x.Date]:e=>S.DATE.test(e),[x.Time]:e=>S.TIME.test(e),[x.Duration]:e=>S.DURATION.test(e),[x.Email]:e=>e.length<=254&&S.EMAIL.test(e),[x.IDNEmail]:e=>e.length<=254&&S.IDN_EMAIL.test(e),[x.Hostname]:e=>e.length>255?!1:e.split(".").every(t=>S.HOSTNAME.test(t)),[x.IDNHostname]:e=>e.length>255?!1:e.split(".").every(t=>t.length<=63&&S.IDN_HOSTNAME.test(t)),[x.IPv4]:e=>{let r=e.split(".");return r.length!==4?!1:r.every(t=>{let n=Number.parseInt(t,10);return n>=0&&n<=255&&t===n.toString()})},[x.IPv6]:e=>{let r=e.split(":");if(r.length>8)return!1;let t=!1;return r.every(n=>n===""?t?!1:(t=!0,!0):S.IPV6_PART.test(n))},[x.URI]:e=>{try{let r=new URL(e);return r.protocol!==""&&S.PROTOCOL.test(r.protocol)}catch{return!1}},[x.URIReference]:e=>{try{return e.startsWith("//")?S.URI_REFERENCE.test(e.slice(2)):(new URL(e,"http://example.com"),!0)}catch{return!1}},[x.IRI]:e=>{try{let r=new URL(e);return r.protocol!==""&&S.PROTOCOL.test(r.protocol)}catch{return!1}},[x.IRIReference]:e=>{try{return e.startsWith("//")?S.URI_REFERENCE.test(e.slice(2)):(new URL(e,"http://example.com"),!0)}catch{return!1}},[x.RegEx]:e=>{try{return new RegExp(e,"u"),!0}catch{return!1}},[x.UUID]:e=>S.UUID.test(e),[x.JSONPointer]:e=>S.JSON_POINTER.test(e),[x.JSONPointerURIFragment]:e=>S.JSON_POINTER_URI_FRAGMENT.test(e),[x.RelativeJSONPointer]:e=>S.RELATIVE_JSON_POINTER.test(e),[x.URITemplate]:e=>S.URI_TEMPLATE.test(e)};function Wr(e,r,t=[]){let n=[];if(typeof e!="string")return n;let i=ms[r.format];return i&&!i(e)&&n.push({path:t,validation:"format",schema:r,value:e}),n}function kr(e,r,t=[]){let n=[],i=Z(r);if(typeof e!="string")return[];if(i!==void 0&&i!=="string")return[];let o=[...new Intl.Segmenter().segment(e)].length;if(r.minLength!==void 0&&o<r.minLength&&n.push({path:t,validation:"minLength",schema:r,value:e}),r.maxLength!==void 0&&o>r.maxLength&&n.push({path:t,validation:"maxLength",schema:r,value:e}),r.pattern!==void 0&&(new RegExp(r.pattern).test(e)||n.push({path:t,validation:"pattern",schema:r,value:e})),r.format!==void 0){let a=Wr(e,r,t);n.push(...a)}return n}function Z(e){if(typeof e=="boolean")return"boolean";if(e.type!==void 0)return e.type}function gs(e,r,t=[]){let n=Z(r);if(n===void 0)return[];if(n==="null"&&e===null)return[];let i=e===null?"null":Array.isArray(e)?"array":typeof e;if(Array.isArray(n)){if(e===null&&n.includes("null"))return[];for(let o of n){if(o==="array"&&Array.isArray(e))return[];if(i==="number"&&o==="integer"&&Number.isInteger(e))return[];if(i===o||o==="null"&&e===null)return[]}}else{if(n==="array"&&Array.isArray(e))return[];if(i==="number"&&n==="integer"&&Number.isInteger(e))return[];if(i===n)return[]}return[{path:t,validation:"type",schema:r,value:e}]}function ys(e,r,t={},n=[],i){return r?y(e,r,t,n,i):[]}function y(e,r,t={},n=[],i){let o=i,a;if(!i&&r["x-jsf-logic"]){let{validations:d,computedValues:g,...b}=r["x-jsf-logic"];o={schema:{validations:d,computedValues:g},value:e},a=b}let s=e===void 0||e===null&&t.treatNullAsUndefined,l=[];if(s)return[];if(typeof r=="boolean")return r?[]:[{path:n,validation:"valid",schema:r,value:e}];let c=r["x-jsf-presentation"]?.inputType==="file",p=[];if(!c&&(p=gs(e,r,n),p.length>0))return p;if(r.required&&E(e)){let d=r.required.filter(g=>{let b=e[g];return b===void 0||b===null&&t.treatNullAsUndefined});for(let g of d)l.push({path:[...n,g],validation:"required",schema:r?.properties?.[g]||r,value:e})}return[...l,...Mr(e,r,n),...Lr(e,r,n),...Hr(e,r,t,o,n),...Rr(e,r,t,o,n),...kr(e,r,n),...Ur(e,r,n),...Dr(e,r,n),...Pr(e,r,t,o,n),...jr(e,r,t,o,n),...Nr(e,r,t,o,n),...Jr(e,r,t,o,n),...Fr(e,r,t,o,n),...wr(e,r,t,n),...ys(e,a,t,n,o),...$r(e,r,t,o,n),...Br(r,o,n)]}function Me(e,r,t,n={}){if(E(r)){Pe(e,r,t,n);for(let i in t.properties){let o=t.properties[i],a=e.find(s=>s.name===i);a?.fields&&Pe(a.fields,r[i],o,n)}}}function Kr(e,r,t,n={}){let o=y(e,t.if,n).length===0,a=!1;return o&&t.if?.required&&(a=t.if.required.some(l=>{if(!r.properties||!r.properties[l])return!1;let f=r.properties[l],c=e[l];return y(c,f,n).some(d=>d.validation==="type")})),{rule:t,matches:o&&!a}}function Pe(e,r,t,n={}){if(!E(r))return;let i=[];t.if&&i.push(Kr(r,t,t,n)),(t.allOf??[]).filter(o=>typeof o.if<"u").forEach(o=>{let a=Kr(r,t,o,n);i.push(a)});for(let{rule:o,matches:a}of i)a&&o.then?Fe(e,r,o.then,n):!a&&o.else&&Fe(e,r,o.else,n)}function Fe(e,r,t,n={}){if(t.properties)for(let i in t.properties){let o=t.properties[i],a=e.find(s=>s.name===i);if(a){o===!1?a.isVisible=!1:a?.fields&&Fe(a.fields,r,o);let s=me(o,i,!0);for(let l in s)["type"].includes(l)||(a[l]=s[l])}}Pe(e,r,t,n)}function xs(e){let r=[];for(let t=0;t<e.length;t++){let n=e[t];if(["allOf","anyOf","oneOf"].includes(n)){t+1<e.length&&typeof e[t+1]=="number"&&t++;continue}n==="then"||n==="else"||r.push(n)}return r}function bs(e){return e.length===0?null:e.reduce((r,t)=>{let{path:n}=t;if(n.length===0)return r[""]=t.message,r;let i=xs(n),o=r;if(i.slice(0,-1).forEach(a=>{(!(a in o)||typeof o[a]=="string")&&(o[a]={}),o=o[a]}),i.length>0){let a=i[i.length-1];o[a]=t.message}else r[""]=t.message;return r},{})}function Ss(e){return e.map(r=>{let{schema:t,value:n,validation:i,customErrorMessage:o}=r;return{...r,message:Vr(t,n,i,o)}})}function vs(e,r){return typeof r!="object"||!r||!e.length?e:e.map(t=>{let n=t.schema,i=n["x-jsf-errorMessage"]?.[t.validation];return n&&i?{...t,message:i}:t})}function Es(e,r,t={}){let n={},i=y(e,r,t),o=Ss(i),a=vs(o,r),s=bs(a);return s&&(n.formErrors=s),n}function Os(e){let{schema:r,strictInputType:t}=e;return Y(r,"root",!0,t).fields||[]}function Ts(e,r={}){let t=r.initialValues||{},n=r.strictInputType||!1,i=Os({schema:e,strictInputType:n});return Me(i,t,e),{fields:i,isError:!1,error:null,handleValidation:s=>{let l=Es(s,e,r.validationOptions);return Xr(i,e),Me(i,s,e,r.validationOptions),l}}}function Xr(e,r){e.length=0;let t=Y(r,"root",!0).fields||[];e.push(...t);for(let n of e)n.fields&&r.properties?.[n.name]?.type==="object"&&Xr(n.fields,r.properties[n.name])}var Ja=_(yi(),1),I=_(Bi(),1),z=_(ki(),1),Pa=_(wa(),1),fr=_(Va(),1),_e=_(Na(),1);function Fa(e){return e.replace(".",".properties.")}function Ma(e,r){return Array.isArray(r)?r:void 0}function Yh(e,r){let{if:t,then:n,else:i}=e;return(0,z.default)(t?.required||[],r).length>0||((0,z.default)(n?.required||[],r)||(0,z.default)(Object.keys(n?.properties||{}),r)).length>0||((0,z.default)(i?.required||[],r)||(0,z.default)(Object.keys(i?.properties||{}),r)).length>0}function La(e,r){if(!r)return{warnings:null};let t=[];return Object.entries(r).forEach(([i,o])=>{let a=Fa(i);if(!(0,I.default)(e.properties,a)){t.push({type:"FIELD_TO_CHANGE_NOT_FOUND",message:`Changing field "${i}" was ignored because it does not exist.`});return}let s=(0,I.default)(e.properties,a);if(!s)return{warnings:null};let l=typeof o=="function"?o(s):o,{properties:f,...c}=l;if((0,fr.default)((0,I.default)(e.properties,a),{...s,...c},Ma),l.properties){let p=La((0,I.default)(e.properties,a),l.properties);p.warnings&&t.push(...p.warnings)}}),{warnings:t.flat()}}function Da(e,r,t){if(!r||typeof e!="object"||e===null)return{warnings:null};let n=t?.parent;return typeof e=="object"&&e.properties&&Object.entries(e.properties).forEach(([i,o])=>{let a=n?`${n}.${i}`:i;(0,fr.default)((0,I.default)(e.properties,i),{...o,...r(a,o)},Ma),o.properties&&Da(o,r,{parent:i})}),{warnings:null}}function Zh(e,r){if(!r)return{warnings:null};let t=[],n=e["x-jsf-order"]||[],i=typeof r=="function"?r(n):r,o=(0,Ja.default)(n,i);return o.length>0&&t.push({type:"ORDER_MISSING_FIELDS",message:`Some fields got forgotten in the new order. They were automatically appended: ${o.join(", ")}`}),e["x-jsf-order"]=[...i,...o],{warnings:t}}function Ba(e,r){if(!r)return{warnings:null};let t=[];return Object.entries(r).forEach(([i,o])=>{let a=Fa(i);if(!o)return{warnings:null};if(o.properties){let f=(0,I.default)(e.properties,a);if(!f)return{warnings:null};let c=Ba(f,o.properties);c.warnings&&t.push(...c.warnings)}if((0,I.default)(e.properties,a)){t.push({type:"FIELD_TO_CREATE_EXISTS",message:`Creating field "${i}" was ignored because it already exists.`});return}let l=(0,_e.default)({},a,o);(0,Pa.default)(e.properties,l)}),{warnings:t.flat()}}function Qh(e,r){if(!r)return{schema:e,warnings:null};let t={properties:{}};Object.entries(e).forEach(([o,a])=>{switch(o){case"properties":r.forEach(s=>{(0,_e.default)(t.properties,s,a[s])});break;case"x-jsf-order":case"required":t[o]=a.filter(s=>r.includes(s));break;case"allOf":{let s=e[o]?.filter(l=>Yh(l,r));t[o]=s;break}case"x-jsf-logic":t[o]=a;break}});let n={};t.allOf?.length&&t.allOf.forEach(o=>{let{if:a,then:s,else:l}=o,f=e.allOf?.indexOf(o);n={...n,...lr(a,{fields:r,path:`allOf[${f}].if`}),...lr(s,{fields:r,path:`allOf[${f}].then`}),...lr(l,{fields:r,path:`allOf[${f}].else`})}});let i=[];return Object.keys(n).length>0&&(Object.entries(n).forEach(([o])=>{(0,_e.default)(t.properties,o,e.properties?.[o])}),i.push({type:"PICK_MISSED_FIELD",message:`The picked fields are in conditionals that refeer other fields. They added automatically: ${Object.keys(n).map(o=>`"${o}"`).join(", ")}. Check "meta" for more details.`,meta:n})),{schema:t,warnings:i}}function lr(e,{fields:r,path:t}){if(!e)return null;let n={};return e.required?.forEach(i=>{r.includes(i)||(n[i]={path:t})}),Object.entries(e.properties||[]).forEach(([i])=>{r.includes(i)||(n[i]={path:t})}),n}function em(e,r){let t=JSON.parse(JSON.stringify(e)),n=La(t,r.fields),i=Da(t,r.allFields),o=Ba(t,r.create),a=Qh(t,r.pick),s=a.schema,l=Zh(s,r.orderRoot);r.muteLogging||console.warn("json-schema-form modify(): We highly recommend you to handle/report the returned `warnings` as they highlight possible bugs in your modifications. To mute this log, pass `muteLogging: true` to the config.");let f=[n.warnings,i.warnings,o.warnings,a.warnings,l.warnings].flat().filter(Boolean);return{schema:s,warnings:f}}export{Ts as createHeadlessForm,em as modify};
2
3
  //# sourceMappingURL=index.mjs.map