@golemui/gui-react 0.13.1 → 0.13.2
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/CHANGELOG.md +10 -0
- package/{DateInput-CqFHtc9F.js → DateInput-Vg-781Bt.js} +1 -1
- package/{DatePicker-BmW3TO0X.js → DatePicker-DIkcgt7S.js} +1 -1
- package/{RangeDateInput-DrVR4T_z.js → RangeDateInput-BoAxI9M9.js} +1 -1
- package/{RangeDatePicker-Cq_Tt6NE.js → RangeDatePicker-Xt0affe_.js} +1 -1
- package/{date-input-Dux0mFJw.js → date-input-DTzk68PR.js} +7 -7
- package/index.d.ts +4 -3
- package/index.js +420 -419
- package/index.umd.cjs +29 -29
- package/package.json +6 -6
- package/{range-date-input-8WtB1urD.js → range-date-input-CFAlkuja.js} +3 -3
package/index.umd.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(function(Ue,xt){typeof exports=="object"&&typeof module<"u"?xt(exports,require("@golemui/gui-shared"),require("react/jsx-runtime"),require("@golemui/core"),require("@golemui/react"),require("react")):typeof define=="function"&&define.amd?define(["exports","@golemui/gui-shared","react/jsx-runtime","@golemui/core","@golemui/react","react"],xt):(Ue=typeof globalThis<"u"?globalThis:Ue||self,xt(Ue["gui-react"]={},Ue.guiShared,Ue.jsxRuntime,Ue.core,Ue.react$1,Ue.react))})(this,(function(Ue,xt,y,vt,x,g){"use strict";const Zi={button:async()=>(await Promise.resolve().then(()=>Cd)).Button,calendar:async()=>(await Promise.resolve().then(()=>qd)).Calendar,currency:async()=>(await Promise.resolve().then(()=>Wd)).Currency,dateInput:async()=>(await Promise.resolve().then(()=>Jd)).DateInput,datePicker:async()=>(await Promise.resolve().then(()=>Qd)).DatePicker,dropdown:async()=>(await Promise.resolve().then(()=>hu)).Dropdown,list:async()=>(await Promise.resolve().then(()=>mu)).List,password:async()=>(await Promise.resolve().then(()=>bu)).Password,textinput:async()=>(await Promise.resolve().then(()=>_u)).TextInput,textarea:async()=>(await Promise.resolve().then(()=>Ou)).TextArea,markdown:async()=>(await Promise.resolve().then(()=>Mu)).Markdown,checkbox:async()=>(await Promise.resolve().then(()=>Fu)).Checkbox,toggle:async()=>(await Promise.resolve().then(()=>Zu)).Toggle,number:async()=>(await Promise.resolve().then(()=>Hu)).NumberInput,select:async()=>(await Promise.resolve().then(()=>Qu)).Select,radiogroup:async()=>(await Promise.resolve().then(()=>nc)).RadioGroup,rangeCalendar:async()=>(await Promise.resolve().then(()=>oc)).RangeCalendar,rangeDateInput:async()=>(await Promise.resolve().then(()=>cc)).RangeDateInput,rangeDatePicker:async()=>(await Promise.resolve().then(()=>pc)).RangeDatePicker,repeater:async()=>(await Promise.resolve().then(()=>gc)).Repeater,flex:async()=>(await Promise.resolve().then(()=>Dc)).Flex,grid:async()=>(await Promise.resolve().then(()=>wc)).Grid,tabs:async()=>(await Promise.resolve().then(()=>kc)).Tabs,accordion:async()=>(await Promise.resolve().then(()=>Sc)).Accordion,alert:async()=>(await Promise.resolve().then(()=>Oc)).Alert,markdownText:async()=>(await Promise.resolve().then(()=>Ic)).MarkdownText,renderer:async()=>(await Promise.resolve().then(()=>Tc)).Renderer},Gt={ACTIONS:"ACTIONS",LAYOUTS:"LAYOUTS",DISPLAYS:"DISPLAYS"};function $s(e){return function(t,i=()=>!0){return{kind:"leaf",selectorType:e,matcher:i,config:t}}}const Yt=new Map;function qi(e,t){if(Yt.has(e))throw new Error(`Item type "${e}" is already registered.`);Yt.set(e,t)}function Mt(e){const t=Yt.get(e);if(!t)throw new Error(`No handler registered for item type "${e}". Did you forget to import the registration module?`);return t}function Vi(e){return Yt.has(e)}function Z(e){const t=o=>{if(!e.sensibleDefaults)return{};let l={...e.sensibleDefaults.base};for(const d of o){const c=d.config;for(const h of e.sensibleDefaults.fields){const p=h;c[p]!=null&&(l={...l,[p]:c[p]})}}return l},i=(o,l)=>e.sensibleDefaults?e.sensibleDefaults.apply(o,l):o,n=o=>{switch(e.entryShape){case"bare":return{baseDef:o};case"keyed":{const l=o;return{baseDef:l.def,path:l.key}}case"compound":{const l=o;return{baseDef:l.def,children:l.children}}}},s={rollUpSensibleDefaults:t,applySensibleDefaults:i,mapToWidget:e.mapToWidget,parseEntry:n,...e.afterMerge?{afterMerge:e.afterMerge}:{},...e.buildCustomWidget?{buildCustomWidget:e.buildCustomWidget}:{},...e.getChildren?{getChildren:e.getChildren}:{}};qi(e.itemType,s);const r=$s(e.itemType);return{gsl:r,gslByUid:(o,l)=>r(l,(d=>d.uid===o))}}function Ss(e){return e?e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,t=>t.toUpperCase()):""}function we(e,t){return e.label!=null||t.suppressAutomaticLabels||!e.path?e:{...e,label:Ss(e.path)}}function st(e,t){return e.placeholder!=null||t.suppressAutomaticPlaceholders||!e.path?e:{...e,placeholder:e.path}}const As=(e,t)=>({type:"ITEMS",itemType:Gt.DISPLAYS,items:[{render:e}],tags:[]});class Os{deepMerge(t,i){if(i==null)return t;if(t==null||typeof t!="object"||typeof i!="object"||Array.isArray(t)||Array.isArray(i))return i;const n={...t};for(const s in i)Object.prototype.hasOwnProperty.call(i,s)&&(typeof i[s]=="object"&&!Array.isArray(i[s])&&i[s]!==null&&typeof t[s]=="object"&&!Array.isArray(t[s])&&t[s]!==null?n[s]=this.deepMerge(t[s],i[s]):n[s]=i[s]);return n}}const Es=new Os;function Is(e,t){return{items:[e],type:"ITEMS",itemType:Gt.ACTIONS,tags:t??[]}}const Cs=e=>Is({uid:"#submit",label:"Submit"}),Ui={INPUTS:new Set(["INPUTS","TEXTAREA","PASSWORD","SELECT","DROPDOWN","RADIOGROUP","CHECKBOX","CALENDAR","DATE_INPUT","DATE_PICKER","RANGE_CALENDAR","RANGE_DATE_INPUT","RANGE_DATE_PICKER","CURRENCY","MARKDOWN","LIST","CUSTOM_INPUT","REPEATER"]),ACTIONS:new Set(["ACTIONS","CUSTOM_ACTION"]),DISPLAYS:new Set(["DISPLAYS","ALERTS","CUSTOM_DISPLAY"]),LAYOUTS:new Set(["LAYOUTS","TABS","ACCORDION","CUSTOM_LAYOUT"])};function Ts(e,t){const i=Ui[e];return i?i.has(t):e===t}class Ps{resolve(t,i){const n=[];for(const r of i)r.kind==="aggregated"?this.collectFromAggregated(r,t,n):this.collectFromLeaf(r,t,n);const s=this.rollUpSensibleDefaults(n);return{leafSelectors:n,sensibleDefaults:s}}collectFromAggregated(t,i,n){if(t.matcher(i))for(const s of t.children)this.collectFromLeaf(s,i,n)}collectFromLeaf(t,i,n){Ts(t.selectorType,i.itemType??"")&&t.matcher(i)&&n.push(t)}rollUpSensibleDefaults(t){const i=new Map,n=(r,a)=>{const o=i.get(r)??[];o.push(a),i.set(r,o)};for(const r of t){const a=Ui[r.selectorType];if(a)for(const o of a)n(o,r);else n(r.selectorType,r)}const s={};for(const[r,a]of i)Vi(r)&&(s[r]=Mt(r).rollUpSensibleDefaults(a));return s}}const xs=new Ps;class Ms{constructor(t){this.objectUtils=t}merge(t,i,n){let s={},r=null;typeof t=="function"&&(r=t);const a=this.collectDecorators(n);for(const d of a){if(r!=null){r=this.composeRuntimeFunctions(r,d);continue}if(typeof d=="function"){const c=d({...s,...typeof t=="function"?{}:t});if(typeof c=="function"){r=this.createPromotedFunction(s,t,c,i,n);continue}s=this.objectUtils.deepMerge(s,c)}else s=this.objectUtils.deepMerge(s,d)}if(r!=null)return{kind:"dynamic",fn:this.wrapWithSensibleDefaults(r,s,i,n)};const o=this.objectUtils.deepMerge(t,s);return{kind:"static",def:this.applySensibleDefaults({...o},i,n)}}collectDecorators(t){const i=[];for(const n of t.leafSelectors){const s=n.config;s.override!=null&&i.push(s.override)}return i}applySensibleDefaults(t,i,n){if(!Vi(i))return t;const s=n.sensibleDefaults[i]??{};return Mt(i).applySensibleDefaults(t,s)}createPromotedFunction(t,i,n,s,r){return a=>{const o=n(a);let l=this.objectUtils.deepMerge(t,o);return l=this.objectUtils.deepMerge(l,i),this.applySensibleDefaults(l,s,r)}}wrapWithSensibleDefaults(t,i,n,s){return r=>{let a=t(r);return Object.keys(i).length>0&&(a=this.objectUtils.deepMerge(i,a)),this.applySensibleDefaults(a,n,s)}}composeRuntimeFunctions(t,i){return typeof i=="function"?n=>{const s=t(n),r=i(s);return typeof r=="function"?r(n):this.objectUtils.deepMerge(r,s)}:n=>{const s=t(n);return this.objectUtils.deepMerge(s,i)}}}const Ls=new Ms(Es);class Ns{mapToWidget(t,i){if(t.kind==="dynamic"){const n=t.fn;return(s=>{const r=n(s);return this.mapStaticDef(r,i)})}return this.mapStaticDef(t.def,i)}mapStaticDef(t,i){const n=Mt(i).mapToWidget(t);return this.applyBaseWidgetFields(n,t)}applyBaseWidgetFields(t,i){return i.size!=null&&(t.size=i.size),i.defaultValue!=null&&t.kind==="input"&&(t.defaultValue=i.defaultValue),i.on!=null&&(t.on=i.on),i.include!=null&&(t.include=i.include),i.exclude!=null&&(t.exclude=i.exclude),t}}const zs=new Ns;class Fs{normalizeSelectors(t){const i=Array.isArray(t)?t:[t],n=[],s=[];for(const r of i)r.kind==="leaf"?s.push(r):n.push(r);return s.length>0&&n.unshift({kind:"aggregated",matcher:()=>!0,children:s}),n}extractFormConfig(){return{suppressAutomaticStack:!1,suppressAutomaticSubmit:!1,onSubmit:t=>console.log("Form submitted:",t)}}}const Rs=new Fs,Hi={onLoad:"load",onChange:"change",onFilter:"filter",onBlur:"blur"},Bs=Object.keys(Hi);class js{extractOnClickFromMergeResult(t,i,n,s){if(t.kind==="dynamic"){const o=t.fn;return{kind:"dynamic",fn:d=>{const c=o(d);return this.wireOnClick(c,i,n,s)}}}const r=t.def;return{kind:"static",def:this.wireOnClick(r,i,n,s)}}countSubmitButtons(t){let i=0;for(const n of t){if(n.type!=="ITEMS")continue;const s=Mt(n.itemType);for(const r of n.items){const a=s.getChildren?.(r);if(a&&(i+=this.countSubmitButtons(a)),n.itemType===Gt.ACTIONS){if(typeof r=="function")continue;const o=r;(o.uid==="#submit"||o.onClick==="submit")&&i++}}}return i}wireOnClick(t,i,n,s){const r=t.uid==="#submit"||t.onClick==="submit",a=r?"#submit":s.next(),o=r?"submit":a,l=t.onClick,c=(typeof l=="function"?l:void 0)??(r?n.onSubmit:void 0);if(c){i.set(o,m=>c(m.data));const{onClick:h,...p}=t;return{...p,uid:a,on:{click:o}}}if(r){const{onClick:h,...p}=t;return{...p,uid:a,on:{click:"submit"}}}if(typeof l=="string"){const{onClick:h,...p}=t;return{...p,uid:a,on:{click:l}}}return{...t,uid:a}}wireInputLayoutEvents(t,i,n){if(t.kind==="dynamic"){const r=t.fn;return{kind:"dynamic",fn:o=>{const l=r(o);return this.wireEventProperties(l,i,n)}}}return{kind:"static",def:this.wireEventProperties(t.def,i,n)}}wireEventProperties(t,i,n){const s={...t.on||{}};let r=!1;const a={...t};for(const o of Bs){const l=t[o];if(l==null)continue;const d=Hi[o];if(typeof l=="function"){const c=n.next();i.set(c,l),s[d]=c,r=!0}else typeof l=="string"&&(s[d]=l,r=!0);delete a[o]}return r&&(a.on=s),a}}const Kt=new js,Zs={input:new Set(["disabled","readonly","label","validator","size"]),action:new Set(["disabled","label","size"]),layout:new Set(["size"]),display:new Set([])},Wi={onChange:"change",onLoad:"load",onFilter:"filter",onClick:"click"};class qs{extractFromMergeResult(t,i){const n={};for(const o of i){const l=o.targetState,d=o.config,c=d.override&&typeof d.override!="function"?d.override:d;n[l]={...n[l]||{},...c}}if(t.kind==="dynamic"){const o=t.fn;return{cleanedResult:{kind:"dynamic",fn:d=>{const c=o(d),{states:h,...p}=c;return p}},stateData:{stateOverrides:n}}}const{states:s,...r}=t.def,a={};for(const[o,l]of Object.entries(n))a[o]={...l};if(s)for(const[o,l]of Object.entries(s))a[o]={...a[o]||{},...l};return{cleanedResult:{kind:"static",def:r},stateData:{stateOverrides:a}}}applyToWidget(t,i,n,s){const{stateOverrides:r}=i;if(Object.keys(r).length===0)return t;const a={...t},o=t.kind,l=Zs[o]||new Set;t.props&&(a.props={...t.props}),t.on&&(a.on={...t.on});for(const[d,c]of Object.entries(r))for(const[h,p]of Object.entries(c))h==="visible"?this.applyVisibility(a,d,p):Wi[h]?this.applyStateEvent(a,d,h,p,n,s):l.has(h)?a[`${h}.${d}`]=p:(a.props||(a.props={}),a.props[`${h}.${d}`]=p);return a}hasStateData(t){return Object.keys(t.stateOverrides).length>0}applyVisibility(t,i,n){if(n){const s=t.include?.in||[];t.include={...t.include||{},in:[...s,i]}}else{const s=t.exclude?.from||[];t.exclude={...t.exclude||{},from:[...s,i]}}}applyStateEvent(t,i,n,s,r,a){const o=Wi[n];if(t.on||(t.on={}),typeof s=="function"){const l=a.next();r.set(l,s),t.on[`${o}.${i}`]=l}else typeof s=="string"&&(t.on[`${o}.${i}`]=s)}}const Vs=new qs;function Us(){let e=0;return{next:()=>`event_${e++}`}}class Hs{constructor(t,i,n,s,r){this.resolver=t,this.merger=i,this.mapper=n,this.eventWiring=s,this.stateExpansion=r}walkAndMap(t,i,n){const s=new Map,r=Us(),a={value:0},o=new Set;return{widgets:this.walkItems(t,i,s,n,r,a,o),eventRegistry:s}}walkItems(t,i,n,s,r,a,o){return t.flatMap(l=>{if(l.type!=="ITEMS")throw new Error("Unexpected gui shortcut type");return l.items.map(d=>this.processItem(d,l.itemType,l.tags,i,n,s,r,a,o))})}processItem(t,i,n,s,r,a,o,l,d){const c=i,h=Mt(i),p=h.parseEntry(t),m=this.buildBaseDef(p),f=this.buildDecoratorForMatching(m,c,n),w=this.resolver.resolve(f,s),S=w.leafSelectors.filter(k=>k.targetState!=null),T={leafSelectors:w.leafSelectors.filter(k=>k.targetState==null),sensibleDefaults:w.sensibleDefaults};let C=this.merger.merge(m,c,T);h.afterMerge&&(C=h.afterMerge(C,{eventRegistry:r,formConfig:a,eventIdGenerator:o})),C=this.eventWiring.wireInputLayoutEvents(C,r,o);const{cleanedResult:I,stateData:A}=this.stateExpansion.extractFromMergeResult(C,S);let D;if(h.buildCustomWidget){const k=this.buildCustomWidgetContext(p.children,s,r,a,o,l,d);D=this.buildCustomWidget(h,I,k)}else D=this.mapper.mapToWidget(I,c);if(typeof D!="function"){const k=D;k.uid||(k.path&&!d.has(k.path)?(k.uid=k.path,d.add(k.path)):k.uid=`dx_${l.value++}`)}if(this.stateExpansion.hasStateData(A))if(typeof D=="function"){const k=D;D=(P=>{const O=k(P);return this.stateExpansion.applyToWidget(O,A,r,o)})}else D=this.stateExpansion.applyToWidget(D,A,r,o);return D}buildCustomWidgetContext(t,i,n,s,r,a,o){return{children:t,mapStaticDef:(l,d)=>this.mapper.mapStaticDef(l,d),walkChildren:l=>this.walkItems(l,i,n,s,r,a,o)}}buildCustomWidget(t,i,n){return t.buildCustomWidget(i,n)}buildBaseDef(t){const i=t.baseDef;return typeof i=="function"?n=>{const r=i(n??{});return t.path!=null?{...r,path:t.path}:r}:t.path!=null?{...i,path:t.path}:i}buildDecoratorForMatching(t,i,n){if(typeof t=="function")return{itemType:i,tags:[...n]};const s=[...n,..."tags"in t&&t.tags?t.tags:[]],r="uid"in t?t.uid:void 0,a="type"in t?t.type:void 0;return{itemType:i,tags:s,uid:r,type:a}}}function ye(e){const{uid:t,path:i,label:n,disabled:s,readonly:r,defaultValue:a,tags:o,type:l,size:d,onLoad:c,onChange:h,onFilter:p,on:m,states:f,include:w,exclude:S,validator:T,...C}=e;return C}function Pe(e,t){return typeof e=="function"?e:{type:t,...e??{}}}function Ws(e){switch(e.type){case"text":return Ys(e);case"number":return Ks(e);case"boolean":return Gs(e);default:throw new Error(`Unsupported field type "${e.type}"`)}}function Gs(e){const t=ye(e);return{uid:e.uid??"",kind:"input",type:"toggle",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:Pe(e.validator,"boolean")}:{},props:t}}function Ys(e){const t=ye(e);return{uid:e.uid??"",kind:"input",type:"textinput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},props:{placeholder:t.placeholder??"",...t},validator:Pe(e.validator,"string")}}function Ks(e){const t=ye(e);return{uid:e.uid??"",kind:"input",type:"number",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},props:{placeholder:t.placeholder??"",...t},validator:Pe(e.validator,"number")}}Z({itemType:"INPUTS",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>{let i=we(e,t);return i=st(i,t),i}},mapToWidget:Ws});function Js(e){const{uid:t,label:i,disabled:n,on:s,onClick:r,data:a,type:o,tags:l,size:d,include:c,exclude:h,states:p,...m}=e;return{uid:t??"",kind:"action",type:"button",disabled:n,label:i,...s!=null?{on:s}:{},props:m}}Z({itemType:"ACTIONS",entryShape:"bare",mapToWidget:Js,afterMerge:(e,t)=>Kt.extractOnClickFromMergeResult(e,t.eventRegistry,t.formConfig,t.eventIdGenerator)});function Xs(e){const{uid:t,widgetName:i,tags:n,size:s,onChange:r,include:a,exclude:o,...l}=e,{on:d,...c}=l;return{uid:t??"",kind:"layout",type:i??"flex",props:{direction:c.direction??"column",...c},children:[]}}function Qs(e,t){const i=t.walkChildren(t.children??[]);if(e.kind==="static")return{...t.mapStaticDef(e.def,"LAYOUTS"),children:i};const n=e.fn;return(s=>{const r=n(s);return{...t.mapStaticDef(r,"LAYOUTS"),children:i}})}function ea(e){return e.children}Z({itemType:"LAYOUTS",entryShape:"compound",mapToWidget:Xs,buildCustomWidget:Qs,getChildren:ea});function ta(e){return{uid:"",kind:"display",type:"renderer",props:{render:e.render}}}function ia(e,t){if(e.kind==="static"){const n=e.def;return(s=>({uid:"",kind:"display",type:"renderer",...n.include!=null?{include:n.include}:{},...n.exclude!=null?{exclude:n.exclude}:{},props:{render:n.render(s??{})}}))}const i=e.fn;return(n=>{const s=i(n);return{uid:"",kind:"display",type:"renderer",...s.include!=null?{include:s.include}:{},...s.exclude!=null?{exclude:s.exclude}:{},props:{render:s.render(n??{})}}})}Z({itemType:"DISPLAYS",entryShape:"bare",mapToWidget:ta,buildCustomWidget:ia}),Z({itemType:"CALENDAR",entryShape:"bare",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>we(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"calendar",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:Pe(e.validator,"string")}:{},props:ye(e)})}),Z({itemType:"TEXTAREA",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>st(we(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"textarea",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:Pe(e.validator,"string")}:{},props:ye(e)})}),Z({itemType:"PASSWORD",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>st(we(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"password",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:Pe(e.validator,"string")}:{},props:ye(e)})}),Z({itemType:"CHECKBOX",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>we(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"checkbox",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:Pe(e.validator,"boolean")}:{},props:ye(e)})}),Z({itemType:"DATE_INPUT",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>we(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"dateInput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:Pe(e.validator,"string")}:{},props:ye(e)})}),Z({itemType:"CURRENCY",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>st(we(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"currency",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:Pe(e.validator,"number")}:{},props:ye(e)})}),Z({itemType:"RANGE_CALENDAR",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>we(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeCalendar",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:Pe(e.validator,"array")}:{},props:ye(e)})}),Z({itemType:"SELECT",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>st(we(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"select",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:e.validator}:{},props:ye(e)})}),Z({itemType:"RADIOGROUP",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>we(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"radiogroup",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:e.validator}:{},props:ye(e)})});function na(e){return{uid:e.uid??"",kind:"layout",type:"tabs",props:{tabs:e.tabs,renderMode:e.renderMode??"all",...e.defaultOpen!=null?{defaultOpen:e.defaultOpen}:{}},children:[]}}function sa(e,t){const i=t.walkChildren(t.children??[]);if(e.kind==="static")return{...t.mapStaticDef(e.def,"TABS"),children:i};const n=e.fn;return(s=>{const r=n(s);return{...t.mapStaticDef(r,"TABS"),children:i}})}function aa(e){return e.children}Z({itemType:"TABS",entryShape:"compound",mapToWidget:na,buildCustomWidget:sa,getChildren:aa}),Z({itemType:"LIST",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>we(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"list",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:e.validator}:{},props:ye(e)})}),Z({itemType:"ALERTS",entryShape:"bare",mapToWidget:e=>({uid:e.uid??"",kind:"display",type:"alert",props:{text:e.text,...e.level!=null?{level:e.level}:{}}})}),Z({itemType:"DATE_PICKER",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>st(we(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"datePicker",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:Pe(e.validator,"string")}:{},props:ye(e)})}),Z({itemType:"DROPDOWN",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>st(we(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"dropdown",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:e.validator}:{},props:ye(e)})});function ra(e){return{uid:e.uid??"",kind:"layout",type:"accordion",props:{sections:e.sections,renderMode:e.renderMode??"all",...e.singleOpen!=null?{singleOpen:e.singleOpen}:{},...e.defaultOpen!=null?{defaultOpen:e.defaultOpen}:{}},children:[]}}function oa(e,t){const i=t.walkChildren(t.children??[]);if(e.kind==="static")return{...t.mapStaticDef(e.def,"ACCORDION"),children:i};const n=e.fn;return(s=>{const r=n(s);return{...t.mapStaticDef(r,"ACCORDION"),children:i}})}function la(e){return e.children}Z({itemType:"ACCORDION",entryShape:"compound",mapToWidget:ra,buildCustomWidget:oa,getChildren:la});function da(e){const t={};return e.addLabel!=null&&(t.addLabel=e.addLabel),e.removeLabel!=null&&(t.removeLabel=e.removeLabel),e.limit!=null&&(t.limit=e.limit),e.title!=null&&(t.title=e.title),e.addButtonIcon!=null&&(t.addButtonIcon=e.addButtonIcon),e.removeButtonIcon!=null&&(t.removeButtonIcon=e.removeButtonIcon),t}function ua(e){return{uid:e.uid??"",kind:"input",type:"repeater",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:Pe(e.validator,"array")}:{},props:{...da(e),template:{kind:"layout",type:"flex",children:[],props:{direction:"column"}}}}}function fi(e,t){for(const i of e){if(typeof i=="function")continue;const n=i;typeof n.path=="string"&&n.path&&(n.path=t+n.path),"children"in n&&Array.isArray(n.children)&&fi(n.children,t);const s=n.props;s?.template?.children&&Array.isArray(s.template.children)&&fi(s.template.children,t)}}function ca(e,t){const i=t.walkChildren(t.children??[]),n=e.kind==="static"?e.def.path??"":e.fn({})?.path??"";n&&fi(i,n+".items.");const s={kind:"layout",type:"flex",uid:"",children:i,props:{direction:"column"}};if(e.kind==="static"){const a=t.mapStaticDef(e.def,"REPEATER");return{...a,props:{...a.props,template:s}}}const r=e.fn;return(a=>{const o=r(a),l=t.mapStaticDef(o,"REPEATER");return{...l,props:{...l.props,template:s}}})}function ha(e){return{baseDef:e.def,path:e.key,children:e.children}}function pa(e){return e.children}qi("REPEATER",{parseEntry:ha,rollUpSensibleDefaults:()=>({}),applySensibleDefaults:e=>e,mapToWidget:ua,buildCustomWidget:ca,getChildren:pa}),Z({itemType:"MARKDOWN",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>st(we(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"markdown",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:Pe(e.validator,"string")}:{},props:ye(e)})}),Z({itemType:"RANGE_DATE_INPUT",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>we(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeDateInput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:Pe(e.validator,"array")}:{},props:ye(e)})}),Z({itemType:"RANGE_DATE_PICKER",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>st(we(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeDatePicker",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:Pe(e.validator,"array")}:{},props:ye(e)})}),Z({itemType:"CUSTOM_DISPLAY",entryShape:"bare",mapToWidget:e=>({uid:e.uid??"",kind:"display",type:e.customType,props:e.props??{}})}),Z({itemType:"CUSTOM_INPUT",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>we(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:e.customType,path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.defaultValue!=null?{defaultValue:e.defaultValue}:{},...e.validator!=null?{validator:e.validator}:{},props:e.props??{}})}),Z({itemType:"CUSTOM_ACTION",entryShape:"bare",mapToWidget:e=>{const{uid:t,label:i,disabled:n,on:s,onClick:r,data:a,customType:o,tags:l,size:d,include:c,exclude:h,states:p,props:m,...f}=e;return{uid:t??"",kind:"action",type:e.customType,label:i,disabled:n,...s!=null?{on:s}:{},props:{...m,...f}}},afterMerge:(e,t)=>Kt.extractOnClickFromMergeResult(e,t.eventRegistry,t.formConfig,t.eventIdGenerator)});function ma(e){return{uid:e.uid??"",kind:"layout",type:e.customType,props:e.props??{},children:[]}}function ya(e,t){const i=t.walkChildren(t.children??[]);if(e.kind==="static")return{...t.mapStaticDef(e.def,"CUSTOM_LAYOUT"),children:i};const n=e.fn;return(s=>{const r=n(s);return{...t.mapStaticDef(r,"CUSTOM_LAYOUT"),children:i}})}function fa(e){return e.children}Z({itemType:"CUSTOM_LAYOUT",entryShape:"compound",mapToWidget:ma,buildCustomWidget:ya,getChildren:fa});class ga{constructor(t,i,n){this.selectorNormalizer=t,this.eventWiring=i,this.walker=n}processDxFacade(t,i=[],n){const{defs:s,gslSelectors:r,formConfig:a}=this.prepareForm(t,i,n),{widgets:o,eventRegistry:l}=this.walker.walkAndMap(s,r,a),d=o[0];return this.buildResult({form:d},l,a)}prepareForm(t,i,n){const r=(Array.isArray(t)?[...t]:[t]).map(d=>typeof d=="function"?As(d):d),a=this.selectorNormalizer.normalizeSelectors(i),o={...this.selectorNormalizer.extractFormConfig(),...n},l=this.eventWiring.countSubmitButtons(r);if(l>1)throw new Error(`Only one submit button is allowed per form, but ${l} were found. A button is a submit button if it has uid: '#submit' or onClick: 'submit'.`);if(!o.suppressAutomaticSubmit&&l===0&&r.push(Cs()),!o.suppressAutomaticStack){const d={def:{uid:"#root",direction:"column",widgetName:"flex"},children:r};return{defs:[{type:"ITEMS",itemType:Gt.LAYOUTS,items:[d],tags:[]}],gslSelectors:a,formConfig:o}}return{defs:r,gslSelectors:a,formConfig:o}}convertStateNames(t){const i={};for(const[n,s]of Object.entries(t))i[n.replace(/\$/g,":")]=s;return i}buildResult(t,i,n){n.states&&Object.keys(n.states).length>0&&(t={...t,states:this.convertStateNames(n.states)});const s={form:t};return i.size>0&&(s.events=r=>{const a=i.get(r.name);if(a){const o=d=>{if(d&&typeof d=="object"&&"path"in d&&!("type"in d)){const{path:c,...h}=d;for(const[p,m]of Object.entries(h))r.callback({type:"OVERRIDE_WIDGET_PROP",payload:{path:c,prop:p,value:m}})}else r.callback(d)},l={...r,callback:o,update:o};a(l)}}),n.dependencies&&(s.dependencies=n.dependencies),n.widgetLoaders&&(s.widgetLoaders=n.widgetLoaders),n.validateOn&&(s.validateOn=n.validateOn),n.itemRenderers&&(s.itemRenderers=n.itemRenderers),s}}const ba=new Hs(xs,Ls,zs,Kt,Vs),Da=new ga(Rs,Kt,ba);function va(e){return typeof e=="function"?!0:Array.isArray(e)?e.length===0||e.every(Gi):Gi(e)}function Gi(e){if(typeof e=="function")return!0;if(e===null||typeof e!="object")return!1;const t=e;return t.type==="ITEMS"&&typeof t.itemType=="string"}const Yi=Object.freeze({}),wa=Object.freeze({}),Ki=new WeakMap;function gi(e,t){return e==null?t:typeof e=="object"?e:{}}function _a(e,t,i){if(!va(e))return{formDef:e};const n=gi(e,Yi),s=gi(t,Yi),r=gi(i,wa);let a=Ki.get(n);a||(a=new WeakMap,Ki.set(n,a));let o=a.get(s);o||(o=new WeakMap,a.set(s,o));const l=o.get(r);if(l)return l;const d=Da.processDxFacade(e,t,i),c={formDef:d.form,formEvent:d.events,dependencies:d.dependencies,widgetLoaders:d.widgetLoaders,validateOn:d.validateOn,itemRenderers:d.itemRenderers};return o.set(r,c),c}function ka(e,t){if(e!=null&&typeof e=="object"&&"__rid"in e)return e.__rid;const i=t();return Object.defineProperty(e,"__rid",{value:i,enumerable:!1,configurable:!1}),i}function b(e,t,i){function n(o,l){if(o._zod||Object.defineProperty(o,"_zod",{value:{def:l,constr:a,traits:new Set},enumerable:!1}),o._zod.traits.has(e))return;o._zod.traits.add(e),t(o,l);const d=a.prototype,c=Object.keys(d);for(let h=0;h<c.length;h++){const p=c[h];p in o||(o[p]=d[p].bind(o))}}const s=i?.Parent??Object;class r extends s{}Object.defineProperty(r,"name",{value:e});function a(o){var l;const d=i?.Parent?new r:this;n(d,o),(l=d._zod).deferred??(l.deferred=[]);for(const c of d._zod.deferred)c();return d}return Object.defineProperty(a,"init",{value:n}),Object.defineProperty(a,Symbol.hasInstance,{value:o=>i?.Parent&&o instanceof i.Parent?!0:o?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}class wt extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Ji extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const $a={};function ut(e){return $a}function bi(e,t){return typeof t=="bigint"?t.toString():t}function Di(e){return e==null}function vi(e){const t=e.startsWith("^")?1:0,i=e.endsWith("$")?e.length-1:e.length;return e.slice(t,i)}const Xi=Symbol("evaluating");function R(e,t,i){let n;Object.defineProperty(e,t,{get(){if(n!==Xi)return n===void 0&&(n=Xi,n=i()),n},set(s){Object.defineProperty(e,t,{value:s})},configurable:!0})}function Sa(...e){const t={};for(const i of e){const n=Object.getOwnPropertyDescriptors(i);Object.assign(t,n)}return Object.defineProperties({},t)}function Aa(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Qi="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function en(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function wi(e){if(en(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const i=t.prototype;return!(en(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function tn(e){return wi(e)?{...e}:Array.isArray(e)?[...e]:e}function _i(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function nn(e,t,i){const n=new e._zod.constr(t??e._zod.def);return(!t||i?.parent)&&(n._zod.parent=e),n}function L(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}const Oa={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function _t(e,t=0){if(e.aborted===!0)return!0;for(let i=t;i<e.issues.length;i++)if(e.issues[i]?.continue!==!0)return!0;return!1}function Ea(e,t){return t.map(i=>{var n;return(n=i).path??(n.path=[]),i.path.unshift(e),i})}function Jt(e){return typeof e=="string"?e:e?.message}function ct(e,t,i){const n={...e,path:e.path??[]};if(!e.message){const s=Jt(e.inst?._zod.def?.error?.(e))??Jt(t?.error?.(e))??Jt(i.customError?.(e))??Jt(i.localeError?.(e))??"Invalid input";n.message=s}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function ki(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Lt(...e){const[t,i,n]=e;return typeof t=="string"?{message:t,code:"custom",input:i,inst:n}:{...t}}const sn=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,bi,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},an=b("$ZodError",sn),Xt=b("$ZodError",sn,{Parent:Error});function Ia(e,t=i=>i.message){const i={},n=[];for(const s of e.issues)s.path.length>0?(i[s.path[0]]=i[s.path[0]]||[],i[s.path[0]].push(t(s))):n.push(t(s));return{formErrors:n,fieldErrors:i}}function Ca(e,t=i=>i.message){const i={_errors:[]},n=s=>{for(const r of s.issues)if(r.code==="invalid_union"&&r.errors.length)r.errors.map(a=>n({issues:a}));else if(r.code==="invalid_key")n({issues:r.issues});else if(r.code==="invalid_element")n({issues:r.issues});else if(r.path.length===0)i._errors.push(t(r));else{let a=i,o=0;for(;o<r.path.length;){const l=r.path[o];o===r.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(t(r))):a[l]=a[l]||{_errors:[]},a=a[l],o++}}};return n(e),i}const Qt=e=>(t,i,n,s)=>{const r=n?Object.assign(n,{async:!1}):{async:!1},a=t._zod.run({value:i,issues:[]},r);if(a instanceof Promise)throw new wt;if(a.issues.length){const o=new(s?.Err??e)(a.issues.map(l=>ct(l,r,ut())));throw Qi(o,s?.callee),o}return a.value},Ta=Qt(Xt),ei=e=>async(t,i,n,s)=>{const r=n?Object.assign(n,{async:!0}):{async:!0};let a=t._zod.run({value:i,issues:[]},r);if(a instanceof Promise&&(a=await a),a.issues.length){const o=new(s?.Err??e)(a.issues.map(l=>ct(l,r,ut())));throw Qi(o,s?.callee),o}return a.value},Pa=ei(Xt),ti=e=>(t,i,n)=>{const s=n?{...n,async:!1}:{async:!1},r=t._zod.run({value:i,issues:[]},s);if(r instanceof Promise)throw new wt;return r.issues.length?{success:!1,error:new(e??an)(r.issues.map(a=>ct(a,s,ut())))}:{success:!0,data:r.value}},rn=ti(Xt),ii=e=>async(t,i,n)=>{const s=n?Object.assign(n,{async:!0}):{async:!0};let r=t._zod.run({value:i,issues:[]},s);return r instanceof Promise&&(r=await r),r.issues.length?{success:!1,error:new e(r.issues.map(a=>ct(a,s,ut())))}:{success:!0,data:r.value}},on=ii(Xt),xa=e=>(t,i,n)=>{const s=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Qt(e)(t,i,s)},Ma=e=>(t,i,n)=>Qt(e)(t,i,n),La=e=>async(t,i,n)=>{const s=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return ei(e)(t,i,s)},Na=e=>async(t,i,n)=>ei(e)(t,i,n),za=e=>(t,i,n)=>{const s=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return ti(e)(t,i,s)},Fa=e=>(t,i,n)=>ti(e)(t,i,n),Ra=e=>async(t,i,n)=>{const s=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return ii(e)(t,i,s)},Ba=e=>async(t,i,n)=>ii(e)(t,i,n),ja=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ln=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Za=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,qa=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Va=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Ua=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,dn="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Ha=new RegExp(`^${dn}$`);function un(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Wa(e){return new RegExp(`^${un(e)}$`)}function Ga(e){const t=un({precision:e.precision}),i=["Z"];e.local&&i.push(""),e.offset&&i.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${i.join("|")})`;return new RegExp(`^${dn}T(?:${n})$`)}const Ya=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Ka=/^-?\d+$/,Ja=/^-?\d+(?:\.\d+)?$/,Xa=/^(?:true|false)$/i,Qa=/^[^A-Z]*$/,er=/^[^a-z]*$/,qe=b("$ZodCheck",(e,t)=>{var i;e._zod??(e._zod={}),e._zod.def=t,(i=e._zod).onattach??(i.onattach=[])}),cn={number:"number",bigint:"bigint",object:"date"},tr=b("$ZodCheckLessThan",(e,t)=>{qe.init(e,t);const i=cn[typeof t.value];e._zod.onattach.push(n=>{const s=n._zod.bag,r=(t.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<r&&(t.inclusive?s.maximum=t.value:s.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:i,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ir=b("$ZodCheckGreaterThan",(e,t)=>{qe.init(e,t);const i=cn[typeof t.value];e._zod.onattach.push(n=>{const s=n._zod.bag,r=(t.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>r&&(t.inclusive?s.minimum=t.value:s.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:i,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),nr=b("$ZodCheckNumberFormat",(e,t)=>{qe.init(e,t),t.format=t.format||"float64";const i=t.format?.includes("int"),n=i?"int":"number",[s,r]=Oa[t.format];e._zod.onattach.push(a=>{const o=a._zod.bag;o.format=t.format,o.minimum=s,o.maximum=r,i&&(o.pattern=Ka)}),e._zod.check=a=>{const o=a.value;if(i){if(!Number.isInteger(o)){a.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:o,inst:e});return}if(!Number.isSafeInteger(o)){o>0?a.issues.push({input:o,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):a.issues.push({input:o,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}o<s&&a.issues.push({origin:"number",input:o,code:"too_small",minimum:s,inclusive:!0,inst:e,continue:!t.abort}),o>r&&a.issues.push({origin:"number",input:o,code:"too_big",maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),sr=b("$ZodCheckMaxLength",(e,t)=>{var i;qe.init(e,t),(i=e._zod.def).when??(i.when=n=>{const s=n.value;return!Di(s)&&s.length!==void 0}),e._zod.onattach.push(n=>{const s=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<s&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const s=n.value;if(s.length<=t.maximum)return;const a=ki(s);n.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),ar=b("$ZodCheckMinLength",(e,t)=>{var i;qe.init(e,t),(i=e._zod.def).when??(i.when=n=>{const s=n.value;return!Di(s)&&s.length!==void 0}),e._zod.onattach.push(n=>{const s=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>s&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const s=n.value;if(s.length>=t.minimum)return;const a=ki(s);n.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),rr=b("$ZodCheckLengthEquals",(e,t)=>{var i;qe.init(e,t),(i=e._zod.def).when??(i.when=n=>{const s=n.value;return!Di(s)&&s.length!==void 0}),e._zod.onattach.push(n=>{const s=n._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=n=>{const s=n.value,r=s.length;if(r===t.length)return;const a=ki(s),o=r>t.length;n.issues.push({origin:a,...o?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),ni=b("$ZodCheckStringFormat",(e,t)=>{var i,n;qe.init(e,t),e._zod.onattach.push(s=>{const r=s._zod.bag;r.format=t.format,t.pattern&&(r.patterns??(r.patterns=new Set),r.patterns.add(t.pattern))}),t.pattern?(i=e._zod).check??(i.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),or=b("$ZodCheckRegex",(e,t)=>{ni.init(e,t),e._zod.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:"regex",input:i.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),lr=b("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Qa),ni.init(e,t)}),dr=b("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=er),ni.init(e,t)}),ur=b("$ZodCheckIncludes",(e,t)=>{qe.init(e,t);const i=_i(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${i}`:i);t.pattern=n,e._zod.onattach.push(s=>{const r=s._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=s=>{s.value.includes(t.includes,t.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:s.value,inst:e,continue:!t.abort})}}),cr=b("$ZodCheckStartsWith",(e,t)=>{qe.init(e,t);const i=new RegExp(`^${_i(t.prefix)}.*`);t.pattern??(t.pattern=i),e._zod.onattach.push(n=>{const s=n._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(i)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),hr=b("$ZodCheckEndsWith",(e,t)=>{qe.init(e,t);const i=new RegExp(`.*${_i(t.suffix)}$`);t.pattern??(t.pattern=i),e._zod.onattach.push(n=>{const s=n._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(i)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),pr=b("$ZodCheckOverwrite",(e,t)=>{qe.init(e,t),e._zod.check=i=>{i.value=t.tx(i.value)}}),mr={major:4,minor:3,patch:6},de=b("$ZodType",(e,t)=>{var i;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=mr;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const s of n)for(const r of s._zod.onattach)r(e);if(n.length===0)(i=e._zod).deferred??(i.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const s=(a,o,l)=>{let d=_t(a),c;for(const h of o){if(h._zod.def.when){if(!h._zod.def.when(a))continue}else if(d)continue;const p=a.issues.length,m=h._zod.check(a);if(m instanceof Promise&&l?.async===!1)throw new wt;if(c||m instanceof Promise)c=(c??Promise.resolve()).then(async()=>{await m,a.issues.length!==p&&(d||(d=_t(a,p)))});else{if(a.issues.length===p)continue;d||(d=_t(a,p))}}return c?c.then(()=>a):a},r=(a,o,l)=>{if(_t(a))return a.aborted=!0,a;const d=s(o,n,l);if(d instanceof Promise){if(l.async===!1)throw new wt;return d.then(c=>e._zod.parse(c,l))}return e._zod.parse(d,l)};e._zod.run=(a,o)=>{if(o.skipChecks)return e._zod.parse(a,o);if(o.direction==="backward"){const d=e._zod.parse({value:a.value,issues:[]},{...o,skipChecks:!0});return d instanceof Promise?d.then(c=>r(c,a,o)):r(d,a,o)}const l=e._zod.parse(a,o);if(l instanceof Promise){if(o.async===!1)throw new wt;return l.then(d=>s(d,n,o))}return s(l,n,o)}}R(e,"~standard",()=>({validate:s=>{try{const r=rn(e,s);return r.success?{value:r.data}:{issues:r.error?.issues}}catch{return on(e,s).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),$i=b("$ZodString",(e,t)=>{de.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Ya(e._zod.bag),e._zod.parse=(i,n)=>{if(t.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:e}),i}}),He=b("$ZodStringFormat",(e,t)=>{ni.init(e,t),$i.init(e,t)}),yr=b("$ZodUUID",(e,t)=>{if(t.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=ln(n))}else t.pattern??(t.pattern=ln());He.init(e,t)}),fr=b("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Za),He.init(e,t)}),gr=b("$ZodURL",(e,t)=>{He.init(e,t),e._zod.check=i=>{try{const n=i.value.trim(),s=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:i.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:i.value,inst:e,continue:!t.abort})),t.normalize?i.value=s.href:i.value=n;return}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!t.abort})}}}),br=b("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Ga(t)),He.init(e,t)}),Dr=b("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Ha),He.init(e,t)}),vr=b("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Wa(t)),He.init(e,t)}),wr=b("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=ja),He.init(e,t)}),_r=b("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=qa),He.init(e,t),e._zod.bag.format="ipv4"}),kr=b("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Va),He.init(e,t),e._zod.bag.format="ipv6",e._zod.check=i=>{try{new URL(`http://[${i.value}]`)}catch{i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:e,continue:!t.abort})}}}),$r=b("$ZodCustomStringFormat",(e,t)=>{He.init(e,t),e._zod.check=i=>{t.fn(i.value)||i.issues.push({code:"invalid_format",format:t.format,input:i.value,inst:e,continue:!t.abort})}}),hn=b("$ZodNumber",(e,t)=>{de.init(e,t),e._zod.pattern=e._zod.bag.pattern??Ja,e._zod.parse=(i,n)=>{if(t.coerce)try{i.value=Number(i.value)}catch{}const s=i.value;if(typeof s=="number"&&!Number.isNaN(s)&&Number.isFinite(s))return i;const r=typeof s=="number"?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return i.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...r?{received:r}:{}}),i}}),Sr=b("$ZodNumberFormat",(e,t)=>{nr.init(e,t),hn.init(e,t)}),Ar=b("$ZodBoolean",(e,t)=>{de.init(e,t),e._zod.pattern=Xa,e._zod.parse=(i,n)=>{if(t.coerce)try{i.value=!!i.value}catch{}const s=i.value;return typeof s=="boolean"||i.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),i}}),Or=b("$ZodAny",(e,t)=>{de.init(e,t),e._zod.parse=i=>i});function pn(e,t,i){e.issues.length&&t.issues.push(...Ea(i,e.issues)),t.value[i]=e.value}const mn=b("$ZodArray",(e,t)=>{de.init(e,t),e._zod.parse=(i,n)=>{const s=i.value;if(!Array.isArray(s))return i.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),i;i.value=Array(s.length);const r=[];for(let a=0;a<s.length;a++){const o=s[a],l=t.element._zod.run({value:o,issues:[]},n);l instanceof Promise?r.push(l.then(d=>pn(d,i,a))):pn(l,i,a)}return r.length?Promise.all(r).then(()=>i):i}});function yn(e,t,i,n){for(const r of e)if(r.issues.length===0)return t.value=r.value,t;const s=e.filter(r=>!_t(r));return s.length===1?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:i,errors:e.map(r=>r.issues.map(a=>ct(a,n,ut())))}),t)}const Er=b("$ZodUnion",(e,t)=>{de.init(e,t),R(e._zod,"optin",()=>t.options.some(s=>s._zod.optin==="optional")?"optional":void 0),R(e._zod,"optout",()=>t.options.some(s=>s._zod.optout==="optional")?"optional":void 0),R(e._zod,"values",()=>{if(t.options.every(s=>s._zod.values))return new Set(t.options.flatMap(s=>Array.from(s._zod.values)))}),R(e._zod,"pattern",()=>{if(t.options.every(s=>s._zod.pattern)){const s=t.options.map(r=>r._zod.pattern);return new RegExp(`^(${s.map(r=>vi(r.source)).join("|")})$`)}});const i=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(s,r)=>{if(i)return n(s,r);let a=!1;const o=[];for(const l of t.options){const d=l._zod.run({value:s.value,issues:[]},r);if(d instanceof Promise)o.push(d),a=!0;else{if(d.issues.length===0)return d;o.push(d)}}return a?Promise.all(o).then(l=>yn(l,s,e,r)):yn(o,s,e,r)}}),Ir=b("$ZodIntersection",(e,t)=>{de.init(e,t),e._zod.parse=(i,n)=>{const s=i.value,r=t.left._zod.run({value:s,issues:[]},n),a=t.right._zod.run({value:s,issues:[]},n);return r instanceof Promise||a instanceof Promise?Promise.all([r,a]).then(([l,d])=>fn(i,l,d)):fn(i,r,a)}});function Si(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(wi(e)&&wi(t)){const i=Object.keys(t),n=Object.keys(e).filter(r=>i.indexOf(r)!==-1),s={...e,...t};for(const r of n){const a=Si(e[r],t[r]);if(!a.valid)return{valid:!1,mergeErrorPath:[r,...a.mergeErrorPath]};s[r]=a.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const i=[];for(let n=0;n<e.length;n++){const s=e[n],r=t[n],a=Si(s,r);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};i.push(a.data)}return{valid:!0,data:i}}return{valid:!1,mergeErrorPath:[]}}function fn(e,t,i){const n=new Map;let s;for(const o of t.issues)if(o.code==="unrecognized_keys"){s??(s=o);for(const l of o.keys)n.has(l)||n.set(l,{}),n.get(l).l=!0}else e.issues.push(o);for(const o of i.issues)if(o.code==="unrecognized_keys")for(const l of o.keys)n.has(l)||n.set(l,{}),n.get(l).r=!0;else e.issues.push(o);const r=[...n].filter(([,o])=>o.l&&o.r).map(([o])=>o);if(r.length&&s&&e.issues.push({...s,keys:r}),_t(e))return e;const a=Si(t.value,i.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}const Cr=b("$ZodTransform",(e,t)=>{de.init(e,t),e._zod.parse=(i,n)=>{if(n.direction==="backward")throw new Ji(e.constructor.name);const s=t.transform(i.value,i);if(n.async)return(s instanceof Promise?s:Promise.resolve(s)).then(a=>(i.value=a,i));if(s instanceof Promise)throw new wt;return i.value=s,i}});function gn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const Ai=b("$ZodOptional",(e,t)=>{de.init(e,t),e._zod.optin="optional",e._zod.optout="optional",R(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),R(e._zod,"pattern",()=>{const i=t.innerType._zod.pattern;return i?new RegExp(`^(${vi(i.source)})?$`):void 0}),e._zod.parse=(i,n)=>{if(t.innerType._zod.optin==="optional"){const s=t.innerType._zod.run(i,n);return s instanceof Promise?s.then(r=>gn(r,i.value)):gn(s,i.value)}return i.value===void 0?i:t.innerType._zod.run(i,n)}}),Tr=b("$ZodExactOptional",(e,t)=>{Ai.init(e,t),R(e._zod,"values",()=>t.innerType._zod.values),R(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(i,n)=>t.innerType._zod.run(i,n)}),Pr=b("$ZodNullable",(e,t)=>{de.init(e,t),R(e._zod,"optin",()=>t.innerType._zod.optin),R(e._zod,"optout",()=>t.innerType._zod.optout),R(e._zod,"pattern",()=>{const i=t.innerType._zod.pattern;return i?new RegExp(`^(${vi(i.source)}|null)$`):void 0}),R(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(i,n)=>i.value===null?i:t.innerType._zod.run(i,n)}),xr=b("$ZodDefault",(e,t)=>{de.init(e,t),e._zod.optin="optional",R(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(i,n)=>{if(n.direction==="backward")return t.innerType._zod.run(i,n);if(i.value===void 0)return i.value=t.defaultValue,i;const s=t.innerType._zod.run(i,n);return s instanceof Promise?s.then(r=>bn(r,t)):bn(s,t)}});function bn(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Mr=b("$ZodPrefault",(e,t)=>{de.init(e,t),e._zod.optin="optional",R(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(i,n)=>(n.direction==="backward"||i.value===void 0&&(i.value=t.defaultValue),t.innerType._zod.run(i,n))}),Lr=b("$ZodNonOptional",(e,t)=>{de.init(e,t),R(e._zod,"values",()=>{const i=t.innerType._zod.values;return i?new Set([...i].filter(n=>n!==void 0)):void 0}),e._zod.parse=(i,n)=>{const s=t.innerType._zod.run(i,n);return s instanceof Promise?s.then(r=>Dn(r,e)):Dn(s,e)}});function Dn(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Nr=b("$ZodCatch",(e,t)=>{de.init(e,t),R(e._zod,"optin",()=>t.innerType._zod.optin),R(e._zod,"optout",()=>t.innerType._zod.optout),R(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(i,n)=>{if(n.direction==="backward")return t.innerType._zod.run(i,n);const s=t.innerType._zod.run(i,n);return s instanceof Promise?s.then(r=>(i.value=r.value,r.issues.length&&(i.value=t.catchValue({...i,error:{issues:r.issues.map(a=>ct(a,n,ut()))},input:i.value}),i.issues=[]),i)):(i.value=s.value,s.issues.length&&(i.value=t.catchValue({...i,error:{issues:s.issues.map(r=>ct(r,n,ut()))},input:i.value}),i.issues=[]),i)}}),zr=b("$ZodPipe",(e,t)=>{de.init(e,t),R(e._zod,"values",()=>t.in._zod.values),R(e._zod,"optin",()=>t.in._zod.optin),R(e._zod,"optout",()=>t.out._zod.optout),R(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(i,n)=>{if(n.direction==="backward"){const r=t.out._zod.run(i,n);return r instanceof Promise?r.then(a=>si(a,t.in,n)):si(r,t.in,n)}const s=t.in._zod.run(i,n);return s instanceof Promise?s.then(r=>si(r,t.out,n)):si(s,t.out,n)}});function si(e,t,i){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},i)}const Fr=b("$ZodReadonly",(e,t)=>{de.init(e,t),R(e._zod,"propValues",()=>t.innerType._zod.propValues),R(e._zod,"values",()=>t.innerType._zod.values),R(e._zod,"optin",()=>t.innerType?._zod?.optin),R(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(i,n)=>{if(n.direction==="backward")return t.innerType._zod.run(i,n);const s=t.innerType._zod.run(i,n);return s instanceof Promise?s.then(vn):vn(s)}});function vn(e){return e.value=Object.freeze(e.value),e}const wn=b("$ZodCustom",(e,t)=>{qe.init(e,t),de.init(e,t),e._zod.parse=(i,n)=>i,e._zod.check=i=>{const n=i.value,s=t.fn(n);if(s instanceof Promise)return s.then(r=>_n(r,i,n,e));_n(s,i,n,e)}});function _n(e,t,i,n){if(!e){const s={code:"custom",input:i,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(s.params=n._zod.def.params),t.issues.push(Lt(s))}}var kn;class Rr{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...i){const n=i[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const i=this._map.get(t);return i&&typeof i=="object"&&"id"in i&&this._idmap.delete(i.id),this._map.delete(t),this}get(t){const i=t._zod.parent;if(i){const n={...this.get(i)??{}};delete n.id;const s={...n,...this._map.get(t)};return Object.keys(s).length?s:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Br(){return new Rr}(kn=globalThis).__zod_globalRegistry??(kn.__zod_globalRegistry=Br());const Nt=globalThis.__zod_globalRegistry;function jr(e,t){return new e({type:"string",...L(t)})}function Zr(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...L(t)})}function qr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...L(t)})}function Vr(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...L(t)})}function Ur(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...L(t)})}function Hr(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...L(t)})}function Wr(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...L(t)})}function Gr(e,t){return new e({type:"string",format:"date",check:"string_format",...L(t)})}function Yr(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...L(t)})}function Kr(e,t){return new e({type:"string",format:"duration",check:"string_format",...L(t)})}function Jr(e,t){return new e({type:"number",checks:[],...L(t)})}function Xr(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...L(t)})}function Qr(e,t){return new e({type:"boolean",...L(t)})}function eo(e){return new e({type:"any"})}function to(e,t){return new tr({check:"less_than",...L(t),value:e,inclusive:!0})}function io(e,t){return new ir({check:"greater_than",...L(t),value:e,inclusive:!0})}function ai(e,t){return new sr({check:"max_length",...L(t),maximum:e})}function kt(e,t){return new ar({check:"min_length",...L(t),minimum:e})}function $n(e,t){return new rr({check:"length_equals",...L(t),length:e})}function Sn(e,t){return new or({check:"string_format",format:"regex",...L(t),pattern:e})}function no(e){return new lr({check:"string_format",format:"lowercase",...L(e)})}function so(e){return new dr({check:"string_format",format:"uppercase",...L(e)})}function ao(e,t){return new ur({check:"string_format",format:"includes",...L(t),includes:e})}function ro(e,t){return new cr({check:"string_format",format:"starts_with",...L(t),prefix:e})}function oo(e,t){return new hr({check:"string_format",format:"ends_with",...L(t),suffix:e})}function $t(e){return new pr({check:"overwrite",tx:e})}function lo(e){return $t(t=>t.normalize(e))}function uo(){return $t(e=>e.trim())}function co(){return $t(e=>e.toLowerCase())}function ho(){return $t(e=>e.toUpperCase())}function po(){return $t(e=>Aa(e))}function mo(e,t,i){return new e({type:"array",element:t,...L(i)})}function An(e,t,i){return new e({type:"custom",check:"custom",fn:t,...L(i)})}function On(e){const t=yo(i=>(i.addIssue=n=>{if(typeof n=="string")i.issues.push(Lt(n,i.value,t._zod.def));else{const s=n;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=i.value),s.inst??(s.inst=t),s.continue??(s.continue=!t._zod.def.abort),i.issues.push(Lt(s))}},e(i.value,i)));return t}function yo(e,t){const i=new qe({check:"custom",...L(t)});return i._zod.check=e,i}function fo(e,t,i,n={}){const s=L(n),r={...L(n),check:"string_format",type:"string",format:t,fn:typeof i=="function"?i:o=>i.test(o),...s};return i instanceof RegExp&&(r.pattern=i),new e(r)}function En(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Nt,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function xe(e,t,i={path:[],schemaPath:[]}){var n;const s=e._zod.def,r=t.seen.get(e);if(r)return r.count++,i.schemaPath.includes(e)&&(r.cycle=i.path),r.schema;const a={schema:{},count:1,cycle:void 0,path:i.path};t.seen.set(e,a);const o=e._zod.toJSONSchema?.();if(o)a.schema=o;else{const c={...i,schemaPath:[...i.schemaPath,e],path:i.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,c);else{const p=a.schema,m=t.processors[s.type];if(!m)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);m(e,t,p,c)}const h=e._zod.parent;h&&(a.ref||(a.ref=h),xe(h,t,c),t.seen.get(h).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Object.assign(a.schema,l),t.io==="input"&&Me(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&a.schema._prefault&&((n=a.schema).default??(n.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function In(e,t){const i=e.seen.get(t);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=new Map;for(const a of e.seen.entries()){const o=e.metadataRegistry.get(a[0])?.id;if(o){const l=n.get(o);if(l&&l!==a[0])throw new Error(`Duplicate schema id "${o}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(o,a[0])}}const s=a=>{const o=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const h=e.external.registry.get(a[0])?.id,p=e.external.uri??(f=>f);if(h)return{ref:p(h)};const m=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=m,{defId:m,ref:`${p("__shared")}#/${o}/${m}`}}if(a[1]===i)return{ref:"#"};const d=`#/${o}/`,c=a[1].schema.id??`__schema${e.counter++}`;return{defId:c,ref:d+c}},r=a=>{if(a[1].schema.$ref)return;const o=a[1],{ref:l,defId:d}=s(a);o.def={...o.schema},d&&(o.defId=d);const c=o.schema;for(const h in c)delete c[h];c.$ref=l};if(e.cycles==="throw")for(const a of e.seen.entries()){const o=a[1];if(o.cycle)throw new Error(`Cycle detected: #/${o.cycle?.join("/")}/<root>
|
|
1
|
+
(function(Ue,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("react/jsx-runtime"),require("@golemui/core"),require("@golemui/gui-shared"),require("@golemui/react"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@golemui/core","@golemui/gui-shared","@golemui/react","react"],y):(Ue=typeof globalThis<"u"?globalThis:Ue||self,y(Ue["gui-react"]={},Ue.jsxRuntime,Ue.core,Ue.guiShared,Ue.react$1,Ue.react))})(this,(function(Ue,y,vt,ks,x,g){"use strict";const Wt={ACTIONS:"ACTIONS",LAYOUTS:"LAYOUTS",DISPLAYS:"DISPLAYS"};function $s(e){return function(t,i=()=>!0){return{kind:"leaf",selectorType:e,matcher:i,config:t}}}const Gt=new Map;function ji(e,t){if(Gt.has(e))throw new Error(`Item type "${e}" is already registered.`);Gt.set(e,t)}function xt(e){const t=Gt.get(e);if(!t)throw new Error(`No handler registered for item type "${e}". Did you forget to import the registration module?`);return t}function Zi(e){return Gt.has(e)}function Z(e){const t=o=>{if(!e.sensibleDefaults)return{};let l={...e.sensibleDefaults.base};for(const d of o){const c=d.config;for(const h of e.sensibleDefaults.fields){const p=h;c[p]!=null&&(l={...l,[p]:c[p]})}}return l},i=(o,l)=>e.sensibleDefaults?e.sensibleDefaults.apply(o,l):o,n=o=>{switch(e.entryShape){case"bare":return{baseDef:o};case"keyed":{const l=o;return{baseDef:l.def,path:l.key}}case"compound":{const l=o;return{baseDef:l.def,children:l.children}}}},s={rollUpSensibleDefaults:t,applySensibleDefaults:i,mapToWidget:e.mapToWidget,parseEntry:n,...e.afterMerge?{afterMerge:e.afterMerge}:{},...e.buildCustomWidget?{buildCustomWidget:e.buildCustomWidget}:{},...e.getChildren?{getChildren:e.getChildren}:{}};ji(e.itemType,s);const r=$s(e.itemType);return{gsl:r,gslByUid:(o,l)=>r(l,(d=>d.uid===o))}}function Ss(e){return e?e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,t=>t.toUpperCase()):""}function we(e,t){return e.label!=null||t.suppressAutomaticLabels||!e.path?e:{...e,label:Ss(e.path)}}function st(e,t){return e.placeholder!=null||t.suppressAutomaticPlaceholders||!e.path?e:{...e,placeholder:e.path}}const As=(e,t)=>({type:"ITEMS",itemType:Wt.DISPLAYS,items:[{render:e}],tags:[]});class Os{deepMerge(t,i){if(i==null)return t;if(t==null||typeof t!="object"||typeof i!="object"||Array.isArray(t)||Array.isArray(i))return i;const n={...t};for(const s in i)Object.prototype.hasOwnProperty.call(i,s)&&(typeof i[s]=="object"&&!Array.isArray(i[s])&&i[s]!==null&&typeof t[s]=="object"&&!Array.isArray(t[s])&&t[s]!==null?n[s]=this.deepMerge(t[s],i[s]):n[s]=i[s]);return n}}const Es=new Os;function Is(e,t){return{items:[e],type:"ITEMS",itemType:Wt.ACTIONS,tags:t??[]}}const Cs=e=>Is({uid:"#submit",label:"Submit"}),qi={INPUTS:new Set(["INPUTS","TEXTAREA","PASSWORD","SELECT","DROPDOWN","RADIOGROUP","CHECKBOX","CALENDAR","DATE_INPUT","DATE_PICKER","RANGE_CALENDAR","RANGE_DATE_INPUT","RANGE_DATE_PICKER","CURRENCY","MARKDOWN","LIST","CUSTOM_INPUT","REPEATER"]),ACTIONS:new Set(["ACTIONS","CUSTOM_ACTION"]),DISPLAYS:new Set(["DISPLAYS","ALERTS","CUSTOM_DISPLAY"]),LAYOUTS:new Set(["LAYOUTS","TABS","ACCORDION","CUSTOM_LAYOUT"])};function Ts(e,t){const i=qi[e];return i?i.has(t):e===t}class Ps{resolve(t,i){const n=[];for(const r of i)r.kind==="aggregated"?this.collectFromAggregated(r,t,n):this.collectFromLeaf(r,t,n);const s=this.rollUpSensibleDefaults(n);return{leafSelectors:n,sensibleDefaults:s}}collectFromAggregated(t,i,n){if(t.matcher(i))for(const s of t.children)this.collectFromLeaf(s,i,n)}collectFromLeaf(t,i,n){Ts(t.selectorType,i.itemType??"")&&t.matcher(i)&&n.push(t)}rollUpSensibleDefaults(t){const i=new Map,n=(r,a)=>{const o=i.get(r)??[];o.push(a),i.set(r,o)};for(const r of t){const a=qi[r.selectorType];if(a)for(const o of a)n(o,r);else n(r.selectorType,r)}const s={};for(const[r,a]of i)Zi(r)&&(s[r]=xt(r).rollUpSensibleDefaults(a));return s}}const xs=new Ps;class Ms{constructor(t){this.objectUtils=t}merge(t,i,n){let s={},r=null;typeof t=="function"&&(r=t);const a=this.collectDecorators(n);for(const d of a){if(r!=null){r=this.composeRuntimeFunctions(r,d);continue}if(typeof d=="function"){const c=d({...s,...typeof t=="function"?{}:t});if(typeof c=="function"){r=this.createPromotedFunction(s,t,c,i,n);continue}s=this.objectUtils.deepMerge(s,c)}else s=this.objectUtils.deepMerge(s,d)}if(r!=null)return{kind:"dynamic",fn:this.wrapWithSensibleDefaults(r,s,i,n)};const o=this.objectUtils.deepMerge(t,s);return{kind:"static",def:this.applySensibleDefaults({...o},i,n)}}collectDecorators(t){const i=[];for(const n of t.leafSelectors){const s=n.config;s.override!=null&&i.push(s.override)}return i}applySensibleDefaults(t,i,n){if(!Zi(i))return t;const s=n.sensibleDefaults[i]??{};return xt(i).applySensibleDefaults(t,s)}createPromotedFunction(t,i,n,s,r){return a=>{const o=n(a);let l=this.objectUtils.deepMerge(t,o);return l=this.objectUtils.deepMerge(l,i),this.applySensibleDefaults(l,s,r)}}wrapWithSensibleDefaults(t,i,n,s){return r=>{let a=t(r);return Object.keys(i).length>0&&(a=this.objectUtils.deepMerge(i,a)),this.applySensibleDefaults(a,n,s)}}composeRuntimeFunctions(t,i){return typeof i=="function"?n=>{const s=t(n),r=i(s);return typeof r=="function"?r(n):this.objectUtils.deepMerge(r,s)}:n=>{const s=t(n);return this.objectUtils.deepMerge(s,i)}}}const Ls=new Ms(Es);class Ns{mapToWidget(t,i){if(t.kind==="dynamic"){const n=t.fn;return(s=>{const r=n(s);return this.mapStaticDef(r,i)})}return this.mapStaticDef(t.def,i)}mapStaticDef(t,i){const n=xt(i).mapToWidget(t);return this.applyBaseWidgetFields(n,t)}applyBaseWidgetFields(t,i){return i.size!=null&&(t.size=i.size),i.defaultValue!=null&&t.kind==="input"&&(t.defaultValue=i.defaultValue),i.on!=null&&(t.on=i.on),i.include!=null&&(t.include=i.include),i.exclude!=null&&(t.exclude=i.exclude),t}}const zs=new Ns;class Fs{normalizeSelectors(t){const i=Array.isArray(t)?t:[t],n=[],s=[];for(const r of i)r.kind==="leaf"?s.push(r):n.push(r);return s.length>0&&n.unshift({kind:"aggregated",matcher:()=>!0,children:s}),n}extractFormConfig(){return{suppressAutomaticStack:!1,suppressAutomaticSubmit:!1,onSubmit:t=>console.log("Form submitted:",t)}}}const Rs=new Fs,Vi={onLoad:"load",onChange:"change",onFilter:"filter",onBlur:"blur"},Bs=Object.keys(Vi);class js{extractOnClickFromMergeResult(t,i,n,s){if(t.kind==="dynamic"){const o=t.fn;return{kind:"dynamic",fn:d=>{const c=o(d);return this.wireOnClick(c,i,n,s)}}}const r=t.def;return{kind:"static",def:this.wireOnClick(r,i,n,s)}}countSubmitButtons(t){let i=0;for(const n of t){if(n.type!=="ITEMS")continue;const s=xt(n.itemType);for(const r of n.items){const a=s.getChildren?.(r);if(a&&(i+=this.countSubmitButtons(a)),n.itemType===Wt.ACTIONS){if(typeof r=="function")continue;const o=r;(o.uid==="#submit"||o.onClick==="submit")&&i++}}}return i}wireOnClick(t,i,n,s){const r=t.uid==="#submit"||t.onClick==="submit",a=r?"#submit":s.next(),o=r?"submit":a,l=t.onClick,c=(typeof l=="function"?l:void 0)??(r?n.onSubmit:void 0);if(c){i.set(o,m=>c(m.data));const{onClick:h,...p}=t;return{...p,uid:a,on:{click:o}}}if(r){const{onClick:h,...p}=t;return{...p,uid:a,on:{click:"submit"}}}if(typeof l=="string"){const{onClick:h,...p}=t;return{...p,uid:a,on:{click:l}}}return{...t,uid:a}}wireInputLayoutEvents(t,i,n){if(t.kind==="dynamic"){const r=t.fn;return{kind:"dynamic",fn:o=>{const l=r(o);return this.wireEventProperties(l,i,n)}}}return{kind:"static",def:this.wireEventProperties(t.def,i,n)}}wireEventProperties(t,i,n){const s={...t.on||{}};let r=!1;const a={...t};for(const o of Bs){const l=t[o];if(l==null)continue;const d=Vi[o];if(typeof l=="function"){const c=n.next();i.set(c,l),s[d]=c,r=!0}else typeof l=="string"&&(s[d]=l,r=!0);delete a[o]}return r&&(a.on=s),a}}const Yt=new js,Zs={input:new Set(["disabled","readonly","label","validator","size"]),action:new Set(["disabled","label","size"]),layout:new Set(["size"]),display:new Set([])},Ui={onChange:"change",onLoad:"load",onFilter:"filter",onClick:"click"};class qs{extractFromMergeResult(t,i){const n={};for(const o of i){const l=o.targetState,d=o.config,c=d.override&&typeof d.override!="function"?d.override:d;n[l]={...n[l]||{},...c}}if(t.kind==="dynamic"){const o=t.fn;return{cleanedResult:{kind:"dynamic",fn:d=>{const c=o(d),{states:h,...p}=c;return p}},stateData:{stateOverrides:n}}}const{states:s,...r}=t.def,a={};for(const[o,l]of Object.entries(n))a[o]={...l};if(s)for(const[o,l]of Object.entries(s))a[o]={...a[o]||{},...l};return{cleanedResult:{kind:"static",def:r},stateData:{stateOverrides:a}}}applyToWidget(t,i,n,s){const{stateOverrides:r}=i;if(Object.keys(r).length===0)return t;const a={...t},o=t.kind,l=Zs[o]||new Set;t.props&&(a.props={...t.props}),t.on&&(a.on={...t.on});for(const[d,c]of Object.entries(r))for(const[h,p]of Object.entries(c))h==="visible"?this.applyVisibility(a,d,p):Ui[h]?this.applyStateEvent(a,d,h,p,n,s):l.has(h)?a[`${h}.${d}`]=p:(a.props||(a.props={}),a.props[`${h}.${d}`]=p);return a}hasStateData(t){return Object.keys(t.stateOverrides).length>0}applyVisibility(t,i,n){if(n){const s=t.include?.in||[];t.include={...t.include||{},in:[...s,i]}}else{const s=t.exclude?.from||[];t.exclude={...t.exclude||{},from:[...s,i]}}}applyStateEvent(t,i,n,s,r,a){const o=Ui[n];if(t.on||(t.on={}),typeof s=="function"){const l=a.next();r.set(l,s),t.on[`${o}.${i}`]=l}else typeof s=="string"&&(t.on[`${o}.${i}`]=s)}}const Vs=new qs;function Us(){let e=0;return{next:()=>`event_${e++}`}}class Hs{constructor(t,i,n,s,r){this.resolver=t,this.merger=i,this.mapper=n,this.eventWiring=s,this.stateExpansion=r}walkAndMap(t,i,n){const s=new Map,r=Us(),a={value:0},o=new Set;return{widgets:this.walkItems(t,i,s,n,r,a,o),eventRegistry:s}}walkItems(t,i,n,s,r,a,o){return t.flatMap(l=>{if(l.type!=="ITEMS")throw new Error("Unexpected gui shortcut type");return l.items.map(d=>this.processItem(d,l.itemType,l.tags,i,n,s,r,a,o))})}processItem(t,i,n,s,r,a,o,l,d){const c=i,h=xt(i),p=h.parseEntry(t),m=this.buildBaseDef(p),f=this.buildDecoratorForMatching(m,c,n),w=this.resolver.resolve(f,s),S=w.leafSelectors.filter(k=>k.targetState!=null),T={leafSelectors:w.leafSelectors.filter(k=>k.targetState==null),sensibleDefaults:w.sensibleDefaults};let C=this.merger.merge(m,c,T);h.afterMerge&&(C=h.afterMerge(C,{eventRegistry:r,formConfig:a,eventIdGenerator:o})),C=this.eventWiring.wireInputLayoutEvents(C,r,o);const{cleanedResult:I,stateData:A}=this.stateExpansion.extractFromMergeResult(C,S);let D;if(h.buildCustomWidget){const k=this.buildCustomWidgetContext(p.children,s,r,a,o,l,d);D=this.buildCustomWidget(h,I,k)}else D=this.mapper.mapToWidget(I,c);if(typeof D!="function"){const k=D;k.uid||(k.path&&!d.has(k.path)?(k.uid=k.path,d.add(k.path)):k.uid=`dx_${l.value++}`)}if(this.stateExpansion.hasStateData(A))if(typeof D=="function"){const k=D;D=(P=>{const O=k(P);return this.stateExpansion.applyToWidget(O,A,r,o)})}else D=this.stateExpansion.applyToWidget(D,A,r,o);return D}buildCustomWidgetContext(t,i,n,s,r,a,o){return{children:t,mapStaticDef:(l,d)=>this.mapper.mapStaticDef(l,d),walkChildren:l=>this.walkItems(l,i,n,s,r,a,o)}}buildCustomWidget(t,i,n){return t.buildCustomWidget(i,n)}buildBaseDef(t){const i=t.baseDef;return typeof i=="function"?n=>{const r=i(n??{});return t.path!=null?{...r,path:t.path}:r}:t.path!=null?{...i,path:t.path}:i}buildDecoratorForMatching(t,i,n){if(typeof t=="function")return{itemType:i,tags:[...n]};const s=[...n,..."tags"in t&&t.tags?t.tags:[]],r="uid"in t?t.uid:void 0,a="type"in t?t.type:void 0;return{itemType:i,tags:s,uid:r,type:a}}}function ye(e){const{uid:t,path:i,label:n,disabled:s,readonly:r,defaultValue:a,tags:o,type:l,size:d,onLoad:c,onChange:h,onFilter:p,on:m,states:f,include:w,exclude:S,validator:T,...C}=e;return C}function Pe(e,t){return typeof e=="function"?e:{type:t,...e??{}}}function Ws(e){switch(e.type){case"text":return Ys(e);case"number":return Ks(e);case"boolean":return Gs(e);default:throw new Error(`Unsupported field type "${e.type}"`)}}function Gs(e){const t=ye(e);return{uid:e.uid??"",kind:"input",type:"toggle",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:Pe(e.validator,"boolean")}:{},props:t}}function Ys(e){const t=ye(e);return{uid:e.uid??"",kind:"input",type:"textinput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},props:{placeholder:t.placeholder??"",...t},validator:Pe(e.validator,"string")}}function Ks(e){const t=ye(e);return{uid:e.uid??"",kind:"input",type:"number",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},props:{placeholder:t.placeholder??"",...t},validator:Pe(e.validator,"number")}}Z({itemType:"INPUTS",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>{let i=we(e,t);return i=st(i,t),i}},mapToWidget:Ws});function Js(e){const{uid:t,label:i,disabled:n,on:s,onClick:r,data:a,type:o,tags:l,size:d,include:c,exclude:h,states:p,...m}=e;return{uid:t??"",kind:"action",type:"button",disabled:n,label:i,...s!=null?{on:s}:{},props:m}}Z({itemType:"ACTIONS",entryShape:"bare",mapToWidget:Js,afterMerge:(e,t)=>Yt.extractOnClickFromMergeResult(e,t.eventRegistry,t.formConfig,t.eventIdGenerator)});function Xs(e){const{uid:t,widgetName:i,tags:n,size:s,onChange:r,include:a,exclude:o,...l}=e,{on:d,...c}=l;return{uid:t??"",kind:"layout",type:i??"flex",props:{direction:c.direction??"column",...c},children:[]}}function Qs(e,t){const i=t.walkChildren(t.children??[]);if(e.kind==="static")return{...t.mapStaticDef(e.def,"LAYOUTS"),children:i};const n=e.fn;return(s=>{const r=n(s);return{...t.mapStaticDef(r,"LAYOUTS"),children:i}})}function ea(e){return e.children}Z({itemType:"LAYOUTS",entryShape:"compound",mapToWidget:Xs,buildCustomWidget:Qs,getChildren:ea});function ta(e){return{uid:"",kind:"display",type:"renderer",props:{render:e.render}}}function ia(e,t){if(e.kind==="static"){const n=e.def;return(s=>({uid:"",kind:"display",type:"renderer",...n.include!=null?{include:n.include}:{},...n.exclude!=null?{exclude:n.exclude}:{},props:{render:n.render(s??{})}}))}const i=e.fn;return(n=>{const s=i(n);return{uid:"",kind:"display",type:"renderer",...s.include!=null?{include:s.include}:{},...s.exclude!=null?{exclude:s.exclude}:{},props:{render:s.render(n??{})}}})}Z({itemType:"DISPLAYS",entryShape:"bare",mapToWidget:ta,buildCustomWidget:ia}),Z({itemType:"CALENDAR",entryShape:"bare",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>we(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"calendar",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:Pe(e.validator,"string")}:{},props:ye(e)})}),Z({itemType:"TEXTAREA",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>st(we(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"textarea",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:Pe(e.validator,"string")}:{},props:ye(e)})}),Z({itemType:"PASSWORD",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>st(we(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"password",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:Pe(e.validator,"string")}:{},props:ye(e)})}),Z({itemType:"CHECKBOX",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>we(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"checkbox",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:Pe(e.validator,"boolean")}:{},props:ye(e)})}),Z({itemType:"DATE_INPUT",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>we(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"dateInput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:Pe(e.validator,"string")}:{},props:ye(e)})}),Z({itemType:"CURRENCY",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>st(we(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"currency",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:Pe(e.validator,"number")}:{},props:ye(e)})}),Z({itemType:"RANGE_CALENDAR",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>we(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeCalendar",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:Pe(e.validator,"array")}:{},props:ye(e)})}),Z({itemType:"SELECT",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>st(we(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"select",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:e.validator}:{},props:ye(e)})}),Z({itemType:"RADIOGROUP",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>we(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"radiogroup",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:e.validator}:{},props:ye(e)})});function na(e){return{uid:e.uid??"",kind:"layout",type:"tabs",props:{tabs:e.tabs,renderMode:e.renderMode??"all",...e.defaultOpen!=null?{defaultOpen:e.defaultOpen}:{}},children:[]}}function sa(e,t){const i=t.walkChildren(t.children??[]);if(e.kind==="static")return{...t.mapStaticDef(e.def,"TABS"),children:i};const n=e.fn;return(s=>{const r=n(s);return{...t.mapStaticDef(r,"TABS"),children:i}})}function aa(e){return e.children}Z({itemType:"TABS",entryShape:"compound",mapToWidget:na,buildCustomWidget:sa,getChildren:aa}),Z({itemType:"LIST",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>we(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"list",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:e.validator}:{},props:ye(e)})}),Z({itemType:"ALERTS",entryShape:"bare",mapToWidget:e=>({uid:e.uid??"",kind:"display",type:"alert",props:{text:e.text,...e.level!=null?{level:e.level}:{}}})}),Z({itemType:"DATE_PICKER",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>st(we(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"datePicker",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:Pe(e.validator,"string")}:{},props:ye(e)})}),Z({itemType:"DROPDOWN",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>st(we(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"dropdown",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:e.validator}:{},props:ye(e)})});function ra(e){return{uid:e.uid??"",kind:"layout",type:"accordion",props:{sections:e.sections,renderMode:e.renderMode??"all",...e.singleOpen!=null?{singleOpen:e.singleOpen}:{},...e.defaultOpen!=null?{defaultOpen:e.defaultOpen}:{}},children:[]}}function oa(e,t){const i=t.walkChildren(t.children??[]);if(e.kind==="static")return{...t.mapStaticDef(e.def,"ACCORDION"),children:i};const n=e.fn;return(s=>{const r=n(s);return{...t.mapStaticDef(r,"ACCORDION"),children:i}})}function la(e){return e.children}Z({itemType:"ACCORDION",entryShape:"compound",mapToWidget:ra,buildCustomWidget:oa,getChildren:la});function da(e){const t={};return e.addLabel!=null&&(t.addLabel=e.addLabel),e.removeLabel!=null&&(t.removeLabel=e.removeLabel),e.limit!=null&&(t.limit=e.limit),e.title!=null&&(t.title=e.title),e.addButtonIcon!=null&&(t.addButtonIcon=e.addButtonIcon),e.removeButtonIcon!=null&&(t.removeButtonIcon=e.removeButtonIcon),t}function ua(e){return{uid:e.uid??"",kind:"input",type:"repeater",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:Pe(e.validator,"array")}:{},props:{...da(e),template:{kind:"layout",type:"flex",children:[],props:{direction:"column"}}}}}function yi(e,t){for(const i of e){if(typeof i=="function")continue;const n=i;typeof n.path=="string"&&n.path&&(n.path=t+n.path),"children"in n&&Array.isArray(n.children)&&yi(n.children,t);const s=n.props;s?.template?.children&&Array.isArray(s.template.children)&&yi(s.template.children,t)}}function ca(e,t){const i=t.walkChildren(t.children??[]),n=e.kind==="static"?e.def.path??"":e.fn({})?.path??"";n&&yi(i,n+".items.");const s={kind:"layout",type:"flex",uid:"",children:i,props:{direction:"column"}};if(e.kind==="static"){const a=t.mapStaticDef(e.def,"REPEATER");return{...a,props:{...a.props,template:s}}}const r=e.fn;return(a=>{const o=r(a),l=t.mapStaticDef(o,"REPEATER");return{...l,props:{...l.props,template:s}}})}function ha(e){return{baseDef:e.def,path:e.key,children:e.children}}function pa(e){return e.children}ji("REPEATER",{parseEntry:ha,rollUpSensibleDefaults:()=>({}),applySensibleDefaults:e=>e,mapToWidget:ua,buildCustomWidget:ca,getChildren:pa}),Z({itemType:"MARKDOWN",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>st(we(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"markdown",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:Pe(e.validator,"string")}:{},props:ye(e)})}),Z({itemType:"RANGE_DATE_INPUT",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>we(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeDateInput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:Pe(e.validator,"array")}:{},props:ye(e)})}),Z({itemType:"RANGE_DATE_PICKER",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>st(we(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeDatePicker",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:Pe(e.validator,"array")}:{},props:ye(e)})}),Z({itemType:"CUSTOM_DISPLAY",entryShape:"bare",mapToWidget:e=>({uid:e.uid??"",kind:"display",type:e.customType,props:e.props??{}})}),Z({itemType:"CUSTOM_INPUT",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>we(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:e.customType,path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.defaultValue!=null?{defaultValue:e.defaultValue}:{},...e.validator!=null?{validator:e.validator}:{},props:e.props??{}})}),Z({itemType:"CUSTOM_ACTION",entryShape:"bare",mapToWidget:e=>{const{uid:t,label:i,disabled:n,on:s,onClick:r,data:a,customType:o,tags:l,size:d,include:c,exclude:h,states:p,props:m,...f}=e;return{uid:t??"",kind:"action",type:e.customType,label:i,disabled:n,...s!=null?{on:s}:{},props:{...m,...f}}},afterMerge:(e,t)=>Yt.extractOnClickFromMergeResult(e,t.eventRegistry,t.formConfig,t.eventIdGenerator)});function ma(e){return{uid:e.uid??"",kind:"layout",type:e.customType,props:e.props??{},children:[]}}function ya(e,t){const i=t.walkChildren(t.children??[]);if(e.kind==="static")return{...t.mapStaticDef(e.def,"CUSTOM_LAYOUT"),children:i};const n=e.fn;return(s=>{const r=n(s);return{...t.mapStaticDef(r,"CUSTOM_LAYOUT"),children:i}})}function fa(e){return e.children}Z({itemType:"CUSTOM_LAYOUT",entryShape:"compound",mapToWidget:ma,buildCustomWidget:ya,getChildren:fa});class ga{constructor(t,i,n){this.selectorNormalizer=t,this.eventWiring=i,this.walker=n}processDxFacade(t,i=[],n){const{defs:s,gslSelectors:r,formConfig:a}=this.prepareForm(t,i,n),{widgets:o,eventRegistry:l}=this.walker.walkAndMap(s,r,a),d=o[0];return this.buildResult({form:d},l,a)}prepareForm(t,i,n){const r=(Array.isArray(t)?[...t]:[t]).map(d=>typeof d=="function"?As(d):d),a=this.selectorNormalizer.normalizeSelectors(i),o={...this.selectorNormalizer.extractFormConfig(),...n},l=this.eventWiring.countSubmitButtons(r);if(l>1)throw new Error(`Only one submit button is allowed per form, but ${l} were found. A button is a submit button if it has uid: '#submit' or onClick: 'submit'.`);if(!o.suppressAutomaticSubmit&&l===0&&r.push(Cs()),!o.suppressAutomaticStack){const d={def:{uid:"#root",direction:"column",widgetName:"flex"},children:r};return{defs:[{type:"ITEMS",itemType:Wt.LAYOUTS,items:[d],tags:[]}],gslSelectors:a,formConfig:o}}return{defs:r,gslSelectors:a,formConfig:o}}convertStateNames(t){const i={};for(const[n,s]of Object.entries(t))i[n.replace(/\$/g,":")]=s;return i}buildResult(t,i,n){n.states&&Object.keys(n.states).length>0&&(t={...t,states:this.convertStateNames(n.states)});const s={form:t};return i.size>0&&(s.events=r=>{const a=i.get(r.name);if(a){const o=d=>{if(d&&typeof d=="object"&&"path"in d&&!("type"in d)){const{path:c,...h}=d;for(const[p,m]of Object.entries(h))r.callback({type:"OVERRIDE_WIDGET_PROP",payload:{path:c,prop:p,value:m}})}else r.callback(d)},l={...r,callback:o,update:o};a(l)}}),n.dependencies&&(s.dependencies=n.dependencies),n.widgetLoaders&&(s.widgetLoaders=n.widgetLoaders),n.validateOn&&(s.validateOn=n.validateOn),n.itemRenderers&&(s.itemRenderers=n.itemRenderers),s}}const ba=new Hs(xs,Ls,zs,Yt,Vs),Da=new ga(Rs,Yt,ba);function va(e){return typeof e=="function"?!0:Array.isArray(e)?e.length===0||e.every(Hi):Hi(e)}function Hi(e){if(typeof e=="function")return!0;if(e===null||typeof e!="object")return!1;const t=e;return t.type==="ITEMS"&&typeof t.itemType=="string"}const Wi=Object.freeze({}),wa=Object.freeze({}),Gi=new WeakMap;function fi(e,t){return e==null?t:typeof e=="object"?e:{}}function _a(e,t,i){if(!va(e))return{formDef:e};const n=fi(e,Wi),s=fi(t,Wi),r=fi(i,wa);let a=Gi.get(n);a||(a=new WeakMap,Gi.set(n,a));let o=a.get(s);o||(o=new WeakMap,a.set(s,o));const l=o.get(r);if(l)return l;const d=Da.processDxFacade(e,t,i),c={formDef:d.form,formEvent:d.events,dependencies:d.dependencies,widgetLoaders:d.widgetLoaders,validateOn:d.validateOn,itemRenderers:d.itemRenderers};return o.set(r,c),c}function ka(e,t){if(e!=null&&typeof e=="object"&&"__rid"in e)return e.__rid;const i=t();return Object.defineProperty(e,"__rid",{value:i,enumerable:!1,configurable:!1}),i}function b(e,t,i){function n(o,l){if(o._zod||Object.defineProperty(o,"_zod",{value:{def:l,constr:a,traits:new Set},enumerable:!1}),o._zod.traits.has(e))return;o._zod.traits.add(e),t(o,l);const d=a.prototype,c=Object.keys(d);for(let h=0;h<c.length;h++){const p=c[h];p in o||(o[p]=d[p].bind(o))}}const s=i?.Parent??Object;class r extends s{}Object.defineProperty(r,"name",{value:e});function a(o){var l;const d=i?.Parent?new r:this;n(d,o),(l=d._zod).deferred??(l.deferred=[]);for(const c of d._zod.deferred)c();return d}return Object.defineProperty(a,"init",{value:n}),Object.defineProperty(a,Symbol.hasInstance,{value:o=>i?.Parent&&o instanceof i.Parent?!0:o?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}class wt extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Yi extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const $a={};function ut(e){return $a}function gi(e,t){return typeof t=="bigint"?t.toString():t}function bi(e){return e==null}function Di(e){const t=e.startsWith("^")?1:0,i=e.endsWith("$")?e.length-1:e.length;return e.slice(t,i)}const Ki=Symbol("evaluating");function R(e,t,i){let n;Object.defineProperty(e,t,{get(){if(n!==Ki)return n===void 0&&(n=Ki,n=i()),n},set(s){Object.defineProperty(e,t,{value:s})},configurable:!0})}function Sa(...e){const t={};for(const i of e){const n=Object.getOwnPropertyDescriptors(i);Object.assign(t,n)}return Object.defineProperties({},t)}function Aa(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Ji="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Xi(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function vi(e){if(Xi(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const i=t.prototype;return!(Xi(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function Qi(e){return vi(e)?{...e}:Array.isArray(e)?[...e]:e}function wi(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function en(e,t,i){const n=new e._zod.constr(t??e._zod.def);return(!t||i?.parent)&&(n._zod.parent=e),n}function L(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}const Oa={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function _t(e,t=0){if(e.aborted===!0)return!0;for(let i=t;i<e.issues.length;i++)if(e.issues[i]?.continue!==!0)return!0;return!1}function Ea(e,t){return t.map(i=>{var n;return(n=i).path??(n.path=[]),i.path.unshift(e),i})}function Kt(e){return typeof e=="string"?e:e?.message}function ct(e,t,i){const n={...e,path:e.path??[]};if(!e.message){const s=Kt(e.inst?._zod.def?.error?.(e))??Kt(t?.error?.(e))??Kt(i.customError?.(e))??Kt(i.localeError?.(e))??"Invalid input";n.message=s}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function _i(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Mt(...e){const[t,i,n]=e;return typeof t=="string"?{message:t,code:"custom",input:i,inst:n}:{...t}}const tn=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,gi,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},nn=b("$ZodError",tn),Jt=b("$ZodError",tn,{Parent:Error});function Ia(e,t=i=>i.message){const i={},n=[];for(const s of e.issues)s.path.length>0?(i[s.path[0]]=i[s.path[0]]||[],i[s.path[0]].push(t(s))):n.push(t(s));return{formErrors:n,fieldErrors:i}}function Ca(e,t=i=>i.message){const i={_errors:[]},n=s=>{for(const r of s.issues)if(r.code==="invalid_union"&&r.errors.length)r.errors.map(a=>n({issues:a}));else if(r.code==="invalid_key")n({issues:r.issues});else if(r.code==="invalid_element")n({issues:r.issues});else if(r.path.length===0)i._errors.push(t(r));else{let a=i,o=0;for(;o<r.path.length;){const l=r.path[o];o===r.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(t(r))):a[l]=a[l]||{_errors:[]},a=a[l],o++}}};return n(e),i}const Xt=e=>(t,i,n,s)=>{const r=n?Object.assign(n,{async:!1}):{async:!1},a=t._zod.run({value:i,issues:[]},r);if(a instanceof Promise)throw new wt;if(a.issues.length){const o=new(s?.Err??e)(a.issues.map(l=>ct(l,r,ut())));throw Ji(o,s?.callee),o}return a.value},Ta=Xt(Jt),Qt=e=>async(t,i,n,s)=>{const r=n?Object.assign(n,{async:!0}):{async:!0};let a=t._zod.run({value:i,issues:[]},r);if(a instanceof Promise&&(a=await a),a.issues.length){const o=new(s?.Err??e)(a.issues.map(l=>ct(l,r,ut())));throw Ji(o,s?.callee),o}return a.value},Pa=Qt(Jt),ei=e=>(t,i,n)=>{const s=n?{...n,async:!1}:{async:!1},r=t._zod.run({value:i,issues:[]},s);if(r instanceof Promise)throw new wt;return r.issues.length?{success:!1,error:new(e??nn)(r.issues.map(a=>ct(a,s,ut())))}:{success:!0,data:r.value}},sn=ei(Jt),ti=e=>async(t,i,n)=>{const s=n?Object.assign(n,{async:!0}):{async:!0};let r=t._zod.run({value:i,issues:[]},s);return r instanceof Promise&&(r=await r),r.issues.length?{success:!1,error:new e(r.issues.map(a=>ct(a,s,ut())))}:{success:!0,data:r.value}},an=ti(Jt),xa=e=>(t,i,n)=>{const s=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Xt(e)(t,i,s)},Ma=e=>(t,i,n)=>Xt(e)(t,i,n),La=e=>async(t,i,n)=>{const s=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Qt(e)(t,i,s)},Na=e=>async(t,i,n)=>Qt(e)(t,i,n),za=e=>(t,i,n)=>{const s=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return ei(e)(t,i,s)},Fa=e=>(t,i,n)=>ei(e)(t,i,n),Ra=e=>async(t,i,n)=>{const s=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return ti(e)(t,i,s)},Ba=e=>async(t,i,n)=>ti(e)(t,i,n),ja=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,rn=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Za=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,qa=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Va=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Ua=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,on="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Ha=new RegExp(`^${on}$`);function ln(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Wa(e){return new RegExp(`^${ln(e)}$`)}function Ga(e){const t=ln({precision:e.precision}),i=["Z"];e.local&&i.push(""),e.offset&&i.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${i.join("|")})`;return new RegExp(`^${on}T(?:${n})$`)}const Ya=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Ka=/^-?\d+$/,Ja=/^-?\d+(?:\.\d+)?$/,Xa=/^(?:true|false)$/i,Qa=/^[^A-Z]*$/,er=/^[^a-z]*$/,qe=b("$ZodCheck",(e,t)=>{var i;e._zod??(e._zod={}),e._zod.def=t,(i=e._zod).onattach??(i.onattach=[])}),dn={number:"number",bigint:"bigint",object:"date"},tr=b("$ZodCheckLessThan",(e,t)=>{qe.init(e,t);const i=dn[typeof t.value];e._zod.onattach.push(n=>{const s=n._zod.bag,r=(t.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<r&&(t.inclusive?s.maximum=t.value:s.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:i,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ir=b("$ZodCheckGreaterThan",(e,t)=>{qe.init(e,t);const i=dn[typeof t.value];e._zod.onattach.push(n=>{const s=n._zod.bag,r=(t.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>r&&(t.inclusive?s.minimum=t.value:s.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:i,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),nr=b("$ZodCheckNumberFormat",(e,t)=>{qe.init(e,t),t.format=t.format||"float64";const i=t.format?.includes("int"),n=i?"int":"number",[s,r]=Oa[t.format];e._zod.onattach.push(a=>{const o=a._zod.bag;o.format=t.format,o.minimum=s,o.maximum=r,i&&(o.pattern=Ka)}),e._zod.check=a=>{const o=a.value;if(i){if(!Number.isInteger(o)){a.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:o,inst:e});return}if(!Number.isSafeInteger(o)){o>0?a.issues.push({input:o,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):a.issues.push({input:o,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}o<s&&a.issues.push({origin:"number",input:o,code:"too_small",minimum:s,inclusive:!0,inst:e,continue:!t.abort}),o>r&&a.issues.push({origin:"number",input:o,code:"too_big",maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),sr=b("$ZodCheckMaxLength",(e,t)=>{var i;qe.init(e,t),(i=e._zod.def).when??(i.when=n=>{const s=n.value;return!bi(s)&&s.length!==void 0}),e._zod.onattach.push(n=>{const s=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<s&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const s=n.value;if(s.length<=t.maximum)return;const a=_i(s);n.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),ar=b("$ZodCheckMinLength",(e,t)=>{var i;qe.init(e,t),(i=e._zod.def).when??(i.when=n=>{const s=n.value;return!bi(s)&&s.length!==void 0}),e._zod.onattach.push(n=>{const s=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>s&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const s=n.value;if(s.length>=t.minimum)return;const a=_i(s);n.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),rr=b("$ZodCheckLengthEquals",(e,t)=>{var i;qe.init(e,t),(i=e._zod.def).when??(i.when=n=>{const s=n.value;return!bi(s)&&s.length!==void 0}),e._zod.onattach.push(n=>{const s=n._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=n=>{const s=n.value,r=s.length;if(r===t.length)return;const a=_i(s),o=r>t.length;n.issues.push({origin:a,...o?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),ii=b("$ZodCheckStringFormat",(e,t)=>{var i,n;qe.init(e,t),e._zod.onattach.push(s=>{const r=s._zod.bag;r.format=t.format,t.pattern&&(r.patterns??(r.patterns=new Set),r.patterns.add(t.pattern))}),t.pattern?(i=e._zod).check??(i.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),or=b("$ZodCheckRegex",(e,t)=>{ii.init(e,t),e._zod.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:"regex",input:i.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),lr=b("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Qa),ii.init(e,t)}),dr=b("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=er),ii.init(e,t)}),ur=b("$ZodCheckIncludes",(e,t)=>{qe.init(e,t);const i=wi(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${i}`:i);t.pattern=n,e._zod.onattach.push(s=>{const r=s._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=s=>{s.value.includes(t.includes,t.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:s.value,inst:e,continue:!t.abort})}}),cr=b("$ZodCheckStartsWith",(e,t)=>{qe.init(e,t);const i=new RegExp(`^${wi(t.prefix)}.*`);t.pattern??(t.pattern=i),e._zod.onattach.push(n=>{const s=n._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(i)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),hr=b("$ZodCheckEndsWith",(e,t)=>{qe.init(e,t);const i=new RegExp(`.*${wi(t.suffix)}$`);t.pattern??(t.pattern=i),e._zod.onattach.push(n=>{const s=n._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(i)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),pr=b("$ZodCheckOverwrite",(e,t)=>{qe.init(e,t),e._zod.check=i=>{i.value=t.tx(i.value)}}),mr={major:4,minor:3,patch:6},de=b("$ZodType",(e,t)=>{var i;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=mr;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const s of n)for(const r of s._zod.onattach)r(e);if(n.length===0)(i=e._zod).deferred??(i.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const s=(a,o,l)=>{let d=_t(a),c;for(const h of o){if(h._zod.def.when){if(!h._zod.def.when(a))continue}else if(d)continue;const p=a.issues.length,m=h._zod.check(a);if(m instanceof Promise&&l?.async===!1)throw new wt;if(c||m instanceof Promise)c=(c??Promise.resolve()).then(async()=>{await m,a.issues.length!==p&&(d||(d=_t(a,p)))});else{if(a.issues.length===p)continue;d||(d=_t(a,p))}}return c?c.then(()=>a):a},r=(a,o,l)=>{if(_t(a))return a.aborted=!0,a;const d=s(o,n,l);if(d instanceof Promise){if(l.async===!1)throw new wt;return d.then(c=>e._zod.parse(c,l))}return e._zod.parse(d,l)};e._zod.run=(a,o)=>{if(o.skipChecks)return e._zod.parse(a,o);if(o.direction==="backward"){const d=e._zod.parse({value:a.value,issues:[]},{...o,skipChecks:!0});return d instanceof Promise?d.then(c=>r(c,a,o)):r(d,a,o)}const l=e._zod.parse(a,o);if(l instanceof Promise){if(o.async===!1)throw new wt;return l.then(d=>s(d,n,o))}return s(l,n,o)}}R(e,"~standard",()=>({validate:s=>{try{const r=sn(e,s);return r.success?{value:r.data}:{issues:r.error?.issues}}catch{return an(e,s).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),ki=b("$ZodString",(e,t)=>{de.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Ya(e._zod.bag),e._zod.parse=(i,n)=>{if(t.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:e}),i}}),He=b("$ZodStringFormat",(e,t)=>{ii.init(e,t),ki.init(e,t)}),yr=b("$ZodUUID",(e,t)=>{if(t.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=rn(n))}else t.pattern??(t.pattern=rn());He.init(e,t)}),fr=b("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Za),He.init(e,t)}),gr=b("$ZodURL",(e,t)=>{He.init(e,t),e._zod.check=i=>{try{const n=i.value.trim(),s=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:i.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:i.value,inst:e,continue:!t.abort})),t.normalize?i.value=s.href:i.value=n;return}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!t.abort})}}}),br=b("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Ga(t)),He.init(e,t)}),Dr=b("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Ha),He.init(e,t)}),vr=b("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Wa(t)),He.init(e,t)}),wr=b("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=ja),He.init(e,t)}),_r=b("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=qa),He.init(e,t),e._zod.bag.format="ipv4"}),kr=b("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Va),He.init(e,t),e._zod.bag.format="ipv6",e._zod.check=i=>{try{new URL(`http://[${i.value}]`)}catch{i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:e,continue:!t.abort})}}}),$r=b("$ZodCustomStringFormat",(e,t)=>{He.init(e,t),e._zod.check=i=>{t.fn(i.value)||i.issues.push({code:"invalid_format",format:t.format,input:i.value,inst:e,continue:!t.abort})}}),un=b("$ZodNumber",(e,t)=>{de.init(e,t),e._zod.pattern=e._zod.bag.pattern??Ja,e._zod.parse=(i,n)=>{if(t.coerce)try{i.value=Number(i.value)}catch{}const s=i.value;if(typeof s=="number"&&!Number.isNaN(s)&&Number.isFinite(s))return i;const r=typeof s=="number"?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return i.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...r?{received:r}:{}}),i}}),Sr=b("$ZodNumberFormat",(e,t)=>{nr.init(e,t),un.init(e,t)}),Ar=b("$ZodBoolean",(e,t)=>{de.init(e,t),e._zod.pattern=Xa,e._zod.parse=(i,n)=>{if(t.coerce)try{i.value=!!i.value}catch{}const s=i.value;return typeof s=="boolean"||i.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),i}}),Or=b("$ZodAny",(e,t)=>{de.init(e,t),e._zod.parse=i=>i});function cn(e,t,i){e.issues.length&&t.issues.push(...Ea(i,e.issues)),t.value[i]=e.value}const hn=b("$ZodArray",(e,t)=>{de.init(e,t),e._zod.parse=(i,n)=>{const s=i.value;if(!Array.isArray(s))return i.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),i;i.value=Array(s.length);const r=[];for(let a=0;a<s.length;a++){const o=s[a],l=t.element._zod.run({value:o,issues:[]},n);l instanceof Promise?r.push(l.then(d=>cn(d,i,a))):cn(l,i,a)}return r.length?Promise.all(r).then(()=>i):i}});function pn(e,t,i,n){for(const r of e)if(r.issues.length===0)return t.value=r.value,t;const s=e.filter(r=>!_t(r));return s.length===1?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:i,errors:e.map(r=>r.issues.map(a=>ct(a,n,ut())))}),t)}const Er=b("$ZodUnion",(e,t)=>{de.init(e,t),R(e._zod,"optin",()=>t.options.some(s=>s._zod.optin==="optional")?"optional":void 0),R(e._zod,"optout",()=>t.options.some(s=>s._zod.optout==="optional")?"optional":void 0),R(e._zod,"values",()=>{if(t.options.every(s=>s._zod.values))return new Set(t.options.flatMap(s=>Array.from(s._zod.values)))}),R(e._zod,"pattern",()=>{if(t.options.every(s=>s._zod.pattern)){const s=t.options.map(r=>r._zod.pattern);return new RegExp(`^(${s.map(r=>Di(r.source)).join("|")})$`)}});const i=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(s,r)=>{if(i)return n(s,r);let a=!1;const o=[];for(const l of t.options){const d=l._zod.run({value:s.value,issues:[]},r);if(d instanceof Promise)o.push(d),a=!0;else{if(d.issues.length===0)return d;o.push(d)}}return a?Promise.all(o).then(l=>pn(l,s,e,r)):pn(o,s,e,r)}}),Ir=b("$ZodIntersection",(e,t)=>{de.init(e,t),e._zod.parse=(i,n)=>{const s=i.value,r=t.left._zod.run({value:s,issues:[]},n),a=t.right._zod.run({value:s,issues:[]},n);return r instanceof Promise||a instanceof Promise?Promise.all([r,a]).then(([l,d])=>mn(i,l,d)):mn(i,r,a)}});function $i(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(vi(e)&&vi(t)){const i=Object.keys(t),n=Object.keys(e).filter(r=>i.indexOf(r)!==-1),s={...e,...t};for(const r of n){const a=$i(e[r],t[r]);if(!a.valid)return{valid:!1,mergeErrorPath:[r,...a.mergeErrorPath]};s[r]=a.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const i=[];for(let n=0;n<e.length;n++){const s=e[n],r=t[n],a=$i(s,r);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};i.push(a.data)}return{valid:!0,data:i}}return{valid:!1,mergeErrorPath:[]}}function mn(e,t,i){const n=new Map;let s;for(const o of t.issues)if(o.code==="unrecognized_keys"){s??(s=o);for(const l of o.keys)n.has(l)||n.set(l,{}),n.get(l).l=!0}else e.issues.push(o);for(const o of i.issues)if(o.code==="unrecognized_keys")for(const l of o.keys)n.has(l)||n.set(l,{}),n.get(l).r=!0;else e.issues.push(o);const r=[...n].filter(([,o])=>o.l&&o.r).map(([o])=>o);if(r.length&&s&&e.issues.push({...s,keys:r}),_t(e))return e;const a=$i(t.value,i.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}const Cr=b("$ZodTransform",(e,t)=>{de.init(e,t),e._zod.parse=(i,n)=>{if(n.direction==="backward")throw new Yi(e.constructor.name);const s=t.transform(i.value,i);if(n.async)return(s instanceof Promise?s:Promise.resolve(s)).then(a=>(i.value=a,i));if(s instanceof Promise)throw new wt;return i.value=s,i}});function yn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const Si=b("$ZodOptional",(e,t)=>{de.init(e,t),e._zod.optin="optional",e._zod.optout="optional",R(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),R(e._zod,"pattern",()=>{const i=t.innerType._zod.pattern;return i?new RegExp(`^(${Di(i.source)})?$`):void 0}),e._zod.parse=(i,n)=>{if(t.innerType._zod.optin==="optional"){const s=t.innerType._zod.run(i,n);return s instanceof Promise?s.then(r=>yn(r,i.value)):yn(s,i.value)}return i.value===void 0?i:t.innerType._zod.run(i,n)}}),Tr=b("$ZodExactOptional",(e,t)=>{Si.init(e,t),R(e._zod,"values",()=>t.innerType._zod.values),R(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(i,n)=>t.innerType._zod.run(i,n)}),Pr=b("$ZodNullable",(e,t)=>{de.init(e,t),R(e._zod,"optin",()=>t.innerType._zod.optin),R(e._zod,"optout",()=>t.innerType._zod.optout),R(e._zod,"pattern",()=>{const i=t.innerType._zod.pattern;return i?new RegExp(`^(${Di(i.source)}|null)$`):void 0}),R(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(i,n)=>i.value===null?i:t.innerType._zod.run(i,n)}),xr=b("$ZodDefault",(e,t)=>{de.init(e,t),e._zod.optin="optional",R(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(i,n)=>{if(n.direction==="backward")return t.innerType._zod.run(i,n);if(i.value===void 0)return i.value=t.defaultValue,i;const s=t.innerType._zod.run(i,n);return s instanceof Promise?s.then(r=>fn(r,t)):fn(s,t)}});function fn(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Mr=b("$ZodPrefault",(e,t)=>{de.init(e,t),e._zod.optin="optional",R(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(i,n)=>(n.direction==="backward"||i.value===void 0&&(i.value=t.defaultValue),t.innerType._zod.run(i,n))}),Lr=b("$ZodNonOptional",(e,t)=>{de.init(e,t),R(e._zod,"values",()=>{const i=t.innerType._zod.values;return i?new Set([...i].filter(n=>n!==void 0)):void 0}),e._zod.parse=(i,n)=>{const s=t.innerType._zod.run(i,n);return s instanceof Promise?s.then(r=>gn(r,e)):gn(s,e)}});function gn(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Nr=b("$ZodCatch",(e,t)=>{de.init(e,t),R(e._zod,"optin",()=>t.innerType._zod.optin),R(e._zod,"optout",()=>t.innerType._zod.optout),R(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(i,n)=>{if(n.direction==="backward")return t.innerType._zod.run(i,n);const s=t.innerType._zod.run(i,n);return s instanceof Promise?s.then(r=>(i.value=r.value,r.issues.length&&(i.value=t.catchValue({...i,error:{issues:r.issues.map(a=>ct(a,n,ut()))},input:i.value}),i.issues=[]),i)):(i.value=s.value,s.issues.length&&(i.value=t.catchValue({...i,error:{issues:s.issues.map(r=>ct(r,n,ut()))},input:i.value}),i.issues=[]),i)}}),zr=b("$ZodPipe",(e,t)=>{de.init(e,t),R(e._zod,"values",()=>t.in._zod.values),R(e._zod,"optin",()=>t.in._zod.optin),R(e._zod,"optout",()=>t.out._zod.optout),R(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(i,n)=>{if(n.direction==="backward"){const r=t.out._zod.run(i,n);return r instanceof Promise?r.then(a=>ni(a,t.in,n)):ni(r,t.in,n)}const s=t.in._zod.run(i,n);return s instanceof Promise?s.then(r=>ni(r,t.out,n)):ni(s,t.out,n)}});function ni(e,t,i){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},i)}const Fr=b("$ZodReadonly",(e,t)=>{de.init(e,t),R(e._zod,"propValues",()=>t.innerType._zod.propValues),R(e._zod,"values",()=>t.innerType._zod.values),R(e._zod,"optin",()=>t.innerType?._zod?.optin),R(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(i,n)=>{if(n.direction==="backward")return t.innerType._zod.run(i,n);const s=t.innerType._zod.run(i,n);return s instanceof Promise?s.then(bn):bn(s)}});function bn(e){return e.value=Object.freeze(e.value),e}const Dn=b("$ZodCustom",(e,t)=>{qe.init(e,t),de.init(e,t),e._zod.parse=(i,n)=>i,e._zod.check=i=>{const n=i.value,s=t.fn(n);if(s instanceof Promise)return s.then(r=>vn(r,i,n,e));vn(s,i,n,e)}});function vn(e,t,i,n){if(!e){const s={code:"custom",input:i,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(s.params=n._zod.def.params),t.issues.push(Mt(s))}}var wn;class Rr{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...i){const n=i[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const i=this._map.get(t);return i&&typeof i=="object"&&"id"in i&&this._idmap.delete(i.id),this._map.delete(t),this}get(t){const i=t._zod.parent;if(i){const n={...this.get(i)??{}};delete n.id;const s={...n,...this._map.get(t)};return Object.keys(s).length?s:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Br(){return new Rr}(wn=globalThis).__zod_globalRegistry??(wn.__zod_globalRegistry=Br());const Lt=globalThis.__zod_globalRegistry;function jr(e,t){return new e({type:"string",...L(t)})}function Zr(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...L(t)})}function qr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...L(t)})}function Vr(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...L(t)})}function Ur(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...L(t)})}function Hr(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...L(t)})}function Wr(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...L(t)})}function Gr(e,t){return new e({type:"string",format:"date",check:"string_format",...L(t)})}function Yr(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...L(t)})}function Kr(e,t){return new e({type:"string",format:"duration",check:"string_format",...L(t)})}function Jr(e,t){return new e({type:"number",checks:[],...L(t)})}function Xr(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...L(t)})}function Qr(e,t){return new e({type:"boolean",...L(t)})}function eo(e){return new e({type:"any"})}function to(e,t){return new tr({check:"less_than",...L(t),value:e,inclusive:!0})}function io(e,t){return new ir({check:"greater_than",...L(t),value:e,inclusive:!0})}function si(e,t){return new sr({check:"max_length",...L(t),maximum:e})}function kt(e,t){return new ar({check:"min_length",...L(t),minimum:e})}function _n(e,t){return new rr({check:"length_equals",...L(t),length:e})}function kn(e,t){return new or({check:"string_format",format:"regex",...L(t),pattern:e})}function no(e){return new lr({check:"string_format",format:"lowercase",...L(e)})}function so(e){return new dr({check:"string_format",format:"uppercase",...L(e)})}function ao(e,t){return new ur({check:"string_format",format:"includes",...L(t),includes:e})}function ro(e,t){return new cr({check:"string_format",format:"starts_with",...L(t),prefix:e})}function oo(e,t){return new hr({check:"string_format",format:"ends_with",...L(t),suffix:e})}function $t(e){return new pr({check:"overwrite",tx:e})}function lo(e){return $t(t=>t.normalize(e))}function uo(){return $t(e=>e.trim())}function co(){return $t(e=>e.toLowerCase())}function ho(){return $t(e=>e.toUpperCase())}function po(){return $t(e=>Aa(e))}function mo(e,t,i){return new e({type:"array",element:t,...L(i)})}function $n(e,t,i){return new e({type:"custom",check:"custom",fn:t,...L(i)})}function Sn(e){const t=yo(i=>(i.addIssue=n=>{if(typeof n=="string")i.issues.push(Mt(n,i.value,t._zod.def));else{const s=n;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=i.value),s.inst??(s.inst=t),s.continue??(s.continue=!t._zod.def.abort),i.issues.push(Mt(s))}},e(i.value,i)));return t}function yo(e,t){const i=new qe({check:"custom",...L(t)});return i._zod.check=e,i}function fo(e,t,i,n={}){const s=L(n),r={...L(n),check:"string_format",type:"string",format:t,fn:typeof i=="function"?i:o=>i.test(o),...s};return i instanceof RegExp&&(r.pattern=i),new e(r)}function An(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Lt,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function xe(e,t,i={path:[],schemaPath:[]}){var n;const s=e._zod.def,r=t.seen.get(e);if(r)return r.count++,i.schemaPath.includes(e)&&(r.cycle=i.path),r.schema;const a={schema:{},count:1,cycle:void 0,path:i.path};t.seen.set(e,a);const o=e._zod.toJSONSchema?.();if(o)a.schema=o;else{const c={...i,schemaPath:[...i.schemaPath,e],path:i.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,c);else{const p=a.schema,m=t.processors[s.type];if(!m)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);m(e,t,p,c)}const h=e._zod.parent;h&&(a.ref||(a.ref=h),xe(h,t,c),t.seen.get(h).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Object.assign(a.schema,l),t.io==="input"&&Me(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&a.schema._prefault&&((n=a.schema).default??(n.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function On(e,t){const i=e.seen.get(t);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=new Map;for(const a of e.seen.entries()){const o=e.metadataRegistry.get(a[0])?.id;if(o){const l=n.get(o);if(l&&l!==a[0])throw new Error(`Duplicate schema id "${o}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(o,a[0])}}const s=a=>{const o=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const h=e.external.registry.get(a[0])?.id,p=e.external.uri??(f=>f);if(h)return{ref:p(h)};const m=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=m,{defId:m,ref:`${p("__shared")}#/${o}/${m}`}}if(a[1]===i)return{ref:"#"};const d=`#/${o}/`,c=a[1].schema.id??`__schema${e.counter++}`;return{defId:c,ref:d+c}},r=a=>{if(a[1].schema.$ref)return;const o=a[1],{ref:l,defId:d}=s(a);o.def={...o.schema},d&&(o.defId=d);const c=o.schema;for(const h in c)delete c[h];c.$ref=l};if(e.cycles==="throw")for(const a of e.seen.entries()){const o=a[1];if(o.cycle)throw new Error(`Cycle detected: #/${o.cycle?.join("/")}/<root>
|
|
2
2
|
|
|
3
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const a of e.seen.entries()){const o=a[1];if(t===a[0]){r(a);continue}if(e.external){const d=e.external.registry.get(a[0])?.id;if(t!==a[0]&&d){r(a);continue}}if(e.metadataRegistry.get(a[0])?.id){r(a);continue}if(o.cycle){r(a);continue}if(o.count>1&&e.reused==="ref"){r(a);continue}}}function Cn(e,t){const i=e.seen.get(t);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=a=>{const o=e.seen.get(a);if(o.ref===null)return;const l=o.def??o.schema,d={...l},c=o.ref;if(o.ref=null,c){n(c);const p=e.seen.get(c),m=p.schema;if(m.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(m)):Object.assign(l,m),Object.assign(l,d),a._zod.parent===c)for(const w in l)w==="$ref"||w==="allOf"||w in d||delete l[w];if(m.$ref&&p.def)for(const w in l)w==="$ref"||w==="allOf"||w in p.def&&JSON.stringify(l[w])===JSON.stringify(p.def[w])&&delete l[w]}const h=a._zod.parent;if(h&&h!==c){n(h);const p=e.seen.get(h);if(p?.schema.$ref&&(l.$ref=p.schema.$ref,p.def))for(const m in l)m==="$ref"||m==="allOf"||m in p.def&&JSON.stringify(l[m])===JSON.stringify(p.def[m])&&delete l[m]}e.override({zodSchema:a,jsonSchema:l,path:o.path??[]})};for(const a of[...e.seen.entries()].reverse())n(a[0]);const s={};if(e.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?s.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?s.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const a=e.external.registry.get(t)?.id;if(!a)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(a)}Object.assign(s,i.def??i.schema);const r=e.external?.defs??{};for(const a of e.seen.entries()){const o=a[1];o.def&&o.defId&&(r[o.defId]=o.def)}e.external||Object.keys(r).length>0&&(e.target==="draft-2020-12"?s.$defs=r:s.definitions=r);try{const a=JSON.parse(JSON.stringify(s));return Object.defineProperty(a,"~standard",{value:{...t["~standard"],jsonSchema:{input:ri(t,"input",e.processors),output:ri(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function Me(e,t){const i=t??{seen:new Set};if(i.seen.has(e))return!1;i.seen.add(e);const n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return Me(n.element,i);if(n.type==="set")return Me(n.valueType,i);if(n.type==="lazy")return Me(n.getter(),i);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return Me(n.innerType,i);if(n.type==="intersection")return Me(n.left,i)||Me(n.right,i);if(n.type==="record"||n.type==="map")return Me(n.keyType,i)||Me(n.valueType,i);if(n.type==="pipe")return Me(n.in,i)||Me(n.out,i);if(n.type==="object"){for(const s in n.shape)if(Me(n.shape[s],i))return!0;return!1}if(n.type==="union"){for(const s of n.options)if(Me(s,i))return!0;return!1}if(n.type==="tuple"){for(const s of n.items)if(Me(s,i))return!0;return!!(n.rest&&Me(n.rest,i))}return!1}const go=(e,t={})=>i=>{const n=En({...i,processors:t});return xe(e,n),In(n,e),Cn(n,e)},ri=(e,t,i={})=>n=>{const{libraryOptions:s,target:r}=n??{},a=En({...s??{},target:r,io:t,processors:i});return xe(e,a),In(a,e),Cn(a,e)},bo={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Do=(e,t,i,n)=>{const s=i;s.type="string";const{minimum:r,maximum:a,format:o,patterns:l,contentEncoding:d}=e._zod.bag;if(typeof r=="number"&&(s.minLength=r),typeof a=="number"&&(s.maxLength=a),o&&(s.format=bo[o]??o,s.format===""&&delete s.format,o==="time"&&delete s.format),d&&(s.contentEncoding=d),l&&l.size>0){const c=[...l];c.length===1?s.pattern=c[0].source:c.length>1&&(s.allOf=[...c.map(h=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:h.source}))])}},vo=(e,t,i,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},wo=(e,t,i,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},_o=(e,t,i,n)=>{const s=i,r=e._zod.def,{minimum:a,maximum:o}=e._zod.bag;typeof a=="number"&&(s.minItems=a),typeof o=="number"&&(s.maxItems=o),s.type="array",s.items=xe(r.element,t,{...n,path:[...n.path,"items"]})},ko=(e,t,i,n)=>{const s=e._zod.def,r=s.inclusive===!1,a=s.options.map((o,l)=>xe(o,t,{...n,path:[...n.path,r?"oneOf":"anyOf",l]}));r?i.oneOf=a:i.anyOf=a},$o=(e,t,i,n)=>{const s=e._zod.def,r=xe(s.left,t,{...n,path:[...n.path,"allOf",0]}),a=xe(s.right,t,{...n,path:[...n.path,"allOf",1]}),o=d=>"allOf"in d&&Object.keys(d).length===1,l=[...o(r)?r.allOf:[r],...o(a)?a.allOf:[a]];i.allOf=l},So=(e,t,i,n)=>{const s=e._zod.def,r=xe(s.innerType,t,n),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=s.innerType,i.nullable=!0):i.anyOf=[r,{type:"null"}]},Ao=(e,t,i,n)=>{const s=e._zod.def;xe(s.innerType,t,n);const r=t.seen.get(e);r.ref=s.innerType},Oo=(e,t,i,n)=>{const s=e._zod.def;xe(s.innerType,t,n);const r=t.seen.get(e);r.ref=s.innerType,i.default=JSON.parse(JSON.stringify(s.defaultValue))},Eo=(e,t,i,n)=>{const s=e._zod.def;xe(s.innerType,t,n);const r=t.seen.get(e);r.ref=s.innerType,t.io==="input"&&(i._prefault=JSON.parse(JSON.stringify(s.defaultValue)))},Io=(e,t,i,n)=>{const s=e._zod.def;xe(s.innerType,t,n);const r=t.seen.get(e);r.ref=s.innerType;let a;try{a=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}i.default=a},Co=(e,t,i,n)=>{const s=e._zod.def,r=t.io==="input"?s.in._zod.def.type==="transform"?s.out:s.in:s.out;xe(r,t,n);const a=t.seen.get(e);a.ref=r},To=(e,t,i,n)=>{const s=e._zod.def;xe(s.innerType,t,n);const r=t.seen.get(e);r.ref=s.innerType,i.readOnly=!0},Tn=(e,t,i,n)=>{const s=e._zod.def;xe(s.innerType,t,n);const r=t.seen.get(e);r.ref=s.innerType},Po=b("ZodISODateTime",(e,t)=>{br.init(e,t),oi.init(e,t)});function xo(e){return Wr(Po,e)}const Mo=b("ZodISODate",(e,t)=>{Dr.init(e,t),oi.init(e,t)});function Lo(e){return Gr(Mo,e)}const No=b("ZodISOTime",(e,t)=>{vr.init(e,t),oi.init(e,t)});function zo(e){return Yr(No,e)}const Fo=b("ZodISODuration",(e,t)=>{wr.init(e,t),oi.init(e,t)});function Ro(e){return Kr(Fo,e)}const We=b("ZodError",(e,t)=>{an.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:i=>Ca(e,i)},flatten:{value:i=>Ia(e,i)},addIssue:{value:i=>{e.issues.push(i),e.message=JSON.stringify(e.issues,bi,2)}},addIssues:{value:i=>{e.issues.push(...i),e.message=JSON.stringify(e.issues,bi,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),Bo=Qt(We),jo=ei(We),Zo=ti(We),qo=ii(We),Vo=xa(We),Uo=Ma(We),Ho=La(We),Wo=Na(We),Go=za(We),Yo=Fa(We),Ko=Ra(We),Jo=Ba(We),Le=b("ZodType",(e,t)=>(de.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:ri(e,"input"),output:ri(e,"output")}}),e.toJSONSchema=go(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...i)=>e.clone(Sa(t,{checks:[...t.checks??[],...i.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0}),e.with=e.check,e.clone=(i,n)=>nn(e,i,n),e.brand=()=>e,e.register=((i,n)=>(i.add(e,n),e)),e.parse=(i,n)=>Bo(e,i,n,{callee:e.parse}),e.safeParse=(i,n)=>Zo(e,i,n),e.parseAsync=async(i,n)=>jo(e,i,n,{callee:e.parseAsync}),e.safeParseAsync=async(i,n)=>qo(e,i,n),e.spa=e.safeParseAsync,e.encode=(i,n)=>Vo(e,i,n),e.decode=(i,n)=>Uo(e,i,n),e.encodeAsync=async(i,n)=>Ho(e,i,n),e.decodeAsync=async(i,n)=>Wo(e,i,n),e.safeEncode=(i,n)=>Go(e,i,n),e.safeDecode=(i,n)=>Yo(e,i,n),e.safeEncodeAsync=async(i,n)=>Ko(e,i,n),e.safeDecodeAsync=async(i,n)=>Jo(e,i,n),e.refine=(i,n)=>e.check(kl(i,n)),e.superRefine=i=>e.check($l(i)),e.overwrite=i=>e.check($t(i)),e.optional=()=>Pn(e),e.exactOptional=()=>dl(e),e.nullable=()=>xn(e),e.nullish=()=>Pn(xn(e)),e.nonoptional=i=>fl(e,i),e.array=()=>el(e),e.or=i=>il([e,i]),e.and=i=>sl(e,i),e.transform=i=>Mn(e,rl(i)),e.default=i=>hl(e,i),e.prefault=i=>ml(e,i),e.catch=i=>bl(e,i),e.pipe=i=>Mn(e,i),e.readonly=()=>wl(e),e.describe=i=>{const n=e.clone();return Nt.add(n,{description:i}),n},Object.defineProperty(e,"description",{get(){return Nt.get(e)?.description},configurable:!0}),e.meta=(...i)=>{if(i.length===0)return Nt.get(e);const n=e.clone();return Nt.add(n,i[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=i=>i(e),e)),Xo=b("_ZodString",(e,t)=>{$i.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,s,r)=>Do(e,n,s);const i=e._zod.bag;e.format=i.format??null,e.minLength=i.minimum??null,e.maxLength=i.maximum??null,e.regex=(...n)=>e.check(Sn(...n)),e.includes=(...n)=>e.check(ao(...n)),e.startsWith=(...n)=>e.check(ro(...n)),e.endsWith=(...n)=>e.check(oo(...n)),e.min=(...n)=>e.check(kt(...n)),e.max=(...n)=>e.check(ai(...n)),e.length=(...n)=>e.check($n(...n)),e.nonempty=(...n)=>e.check(kt(1,...n)),e.lowercase=n=>e.check(no(n)),e.uppercase=n=>e.check(so(n)),e.trim=()=>e.check(uo()),e.normalize=(...n)=>e.check(lo(...n)),e.toLowerCase=()=>e.check(co()),e.toUpperCase=()=>e.check(ho()),e.slugify=()=>e.check(po())}),oi=b("ZodStringFormat",(e,t)=>{He.init(e,t),Xo.init(e,t)}),Qo=b("ZodArray",(e,t)=>{mn.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(i,n,s)=>_o(e,i,n,s),e.element=t.element,e.min=(i,n)=>e.check(kt(i,n)),e.nonempty=i=>e.check(kt(1,i)),e.max=(i,n)=>e.check(ai(i,n)),e.length=(i,n)=>e.check($n(i,n)),e.unwrap=()=>e.element});function el(e,t){return mo(Qo,e,t)}const tl=b("ZodUnion",(e,t)=>{Er.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(i,n,s)=>ko(e,i,n,s),e.options=t.options});function il(e,t){return new tl({type:"union",options:e,...L(t)})}const nl=b("ZodIntersection",(e,t)=>{Ir.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(i,n,s)=>$o(e,i,n,s)});function sl(e,t){return new nl({type:"intersection",left:e,right:t})}const al=b("ZodTransform",(e,t)=>{Cr.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(i,n,s)=>wo(e,i),e._zod.parse=(i,n)=>{if(n.direction==="backward")throw new Ji(e.constructor.name);i.addIssue=r=>{if(typeof r=="string")i.issues.push(Lt(r,i.value,t));else{const a=r;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=i.value),a.inst??(a.inst=e),i.issues.push(Lt(a))}};const s=t.transform(i.value,i);return s instanceof Promise?s.then(r=>(i.value=r,i)):(i.value=s,i)}});function rl(e){return new al({type:"transform",transform:e})}const ol=b("ZodOptional",(e,t)=>{Ai.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(i,n,s)=>Tn(e,i,n,s),e.unwrap=()=>e._zod.def.innerType});function Pn(e){return new ol({type:"optional",innerType:e})}const ll=b("ZodExactOptional",(e,t)=>{Tr.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(i,n,s)=>Tn(e,i,n,s),e.unwrap=()=>e._zod.def.innerType});function dl(e){return new ll({type:"optional",innerType:e})}const ul=b("ZodNullable",(e,t)=>{Pr.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(i,n,s)=>So(e,i,n,s),e.unwrap=()=>e._zod.def.innerType});function xn(e){return new ul({type:"nullable",innerType:e})}const cl=b("ZodDefault",(e,t)=>{xr.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(i,n,s)=>Oo(e,i,n,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function hl(e,t){return new cl({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():tn(t)}})}const pl=b("ZodPrefault",(e,t)=>{Mr.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(i,n,s)=>Eo(e,i,n,s),e.unwrap=()=>e._zod.def.innerType});function ml(e,t){return new pl({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():tn(t)}})}const yl=b("ZodNonOptional",(e,t)=>{Lr.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(i,n,s)=>Ao(e,i,n,s),e.unwrap=()=>e._zod.def.innerType});function fl(e,t){return new yl({type:"nonoptional",innerType:e,...L(t)})}const gl=b("ZodCatch",(e,t)=>{Nr.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(i,n,s)=>Io(e,i,n,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function bl(e,t){return new gl({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Dl=b("ZodPipe",(e,t)=>{zr.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(i,n,s)=>Co(e,i,n,s),e.in=t.in,e.out=t.out});function Mn(e,t){return new Dl({type:"pipe",in:e,out:t})}const vl=b("ZodReadonly",(e,t)=>{Fr.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(i,n,s)=>To(e,i,n,s),e.unwrap=()=>e._zod.def.innerType});function wl(e){return new vl({type:"readonly",innerType:e})}const _l=b("ZodCustom",(e,t)=>{wn.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(i,n,s)=>vo(e,i)});function kl(e,t={}){return An(_l,e,t)}function $l(e){return On(e)}const ht=b("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");de.init(e,t),e.def=t,e.type=t.type,e.parse=(i,n)=>Ta(e,i,n,{callee:e.parse}),e.safeParse=(i,n)=>rn(e,i,n),e.parseAsync=async(i,n)=>Pa(e,i,n,{callee:e.parseAsync}),e.safeParseAsync=async(i,n)=>on(e,i,n),e.check=(...i)=>e.clone({...t,checks:[...t.checks??[],...i.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]},{parent:!0}),e.with=e.check,e.clone=(i,n)=>nn(e,i,n),e.brand=()=>e,e.register=((i,n)=>(i.add(e,n),e)),e.apply=i=>i(e)}),Ln=b("ZodMiniString",(e,t)=>{$i.init(e,t),ht.init(e,t)});function Nn(e){return jr(Ln,e)}const St=b("ZodMiniStringFormat",(e,t)=>{He.init(e,t),Ln.init(e,t)}),Sl=b("ZodMiniEmail",(e,t)=>{fr.init(e,t),St.init(e,t)});function Al(e){return Zr(Sl,e)}const Ol=b("ZodMiniUUID",(e,t)=>{yr.init(e,t),St.init(e,t)});function El(e){return qr(Ol,e)}const Il=b("ZodMiniURL",(e,t)=>{gr.init(e,t),St.init(e,t)});function Cl(e){return Vr(Il,e)}const Tl=b("ZodMiniIPv4",(e,t)=>{_r.init(e,t),St.init(e,t)});function Pl(e){return Ur(Tl,e)}const xl=b("ZodMiniIPv6",(e,t)=>{kr.init(e,t),St.init(e,t)});function Ml(e){return Hr(xl,e)}const Ll=b("ZodMiniCustomStringFormat",(e,t)=>{$r.init(e,t),St.init(e,t)});function Nl(e){return fo(Ll,"hostname",Ua,e)}const zn=b("ZodMiniNumber",(e,t)=>{hn.init(e,t),ht.init(e,t)});function Fn(e){return Jr(zn,e)}const zl=b("ZodMiniNumberFormat",(e,t)=>{Sr.init(e,t),zn.init(e,t)});function Fl(e){return Xr(zl,e)}const Rl=b("ZodMiniBoolean",(e,t)=>{Ar.init(e,t),ht.init(e,t)});function Rn(e){return Qr(Rl,e)}const Bl=b("ZodMiniAny",(e,t)=>{Or.init(e,t),ht.init(e,t)});function Oi(){return eo(Bl)}const jl=b("ZodMiniArray",(e,t)=>{mn.init(e,t),ht.init(e,t)});function Bn(e,t){return new jl({type:"array",element:e,...L(t)})}const Zl=b("ZodMiniOptional",(e,t)=>{Ai.init(e,t),ht.init(e,t)});function ql(e){return new Zl({type:"optional",innerType:e})}const Vl=b("ZodMiniCustom",(e,t)=>{wn.init(e,t),ht.init(e,t)});function _e(e,t={}){return An(Vl,e,t)}function jn(e){return On(e)}const Ei={email:{schema:Al()},hostname:{schema:Nl()},ipv4:{schema:Pl()},ipv6:{schema:Ml()},url:{schema:Cl()},uuid:{schema:El()},date:{schema:Lo()},time:{schema:zo()},"date-time":{schema:xo()},duration:{schema:Ro()}},Ul=Object.keys(Ei),Hl=e=>(t,i)=>{switch(t.type){case"string":return Wl(t,i);case"integer":case"number":return Yl(t,i);case"boolean":return Kl(t,i);case"array":return Jl(t,i);case"custom":{if(!e)throw new Error('Validator type "custom" requires a customValidators object, but it was not supplied.');return Xl(t,e)}}};function Q(e,t){if(e!==void 0)return typeof e=="string"?e:t?.translate(e.key,e.params,e.default)??e.default}function Wl(e,t){return zt(e,i=>{const n=Q(i.messages?.invalid,t);let s=n?Nn(n):Nn();if(i.required===!0){const r=Q(i.messages?.required,t)??"This field is required";s=s.check(_e(a=>a.length>0,{error:r}))}if(typeof i.minLength=="number"){const r=Q(i.messages?.minLength,t),a=i.minLength;s=s.check(r?_e(o=>o.length>=a,{error:r}):kt(a))}if(typeof i.maxLength=="number"){const r=Q(i.messages?.maxLength,t),a=i.maxLength;s=s.check(r?_e(o=>o.length<=a,{error:r}):ai(a))}if(typeof i.pattern=="string"){const r=Q(i.messages?.pattern,t),a=new RegExp(i.pattern);s=s.check(r?_e(o=>a.test(o),{error:r}):Sn(a))}if(i.enum){const r=i.enum,a=Q(i.messages?.enum,t);s=s.check(_e(o=>r.includes(o),a?{error:a}:void 0))}if(i.const!==void 0){const r=Q(i.messages?.const,t);s=s.check(_e(a=>a===i.const,r?{error:r}:void 0))}if(i.format!==void 0)if(Ul.includes(i.format)){const r=Q(i.messages?.format,t);s=s.check(r?jn((a,o)=>{const l=vt.standardValidate(Ei[i.format].schema,a);vt.isStandardValidateSuccess(l)||o.addIssue({code:"custom",path:[],message:r})}):Ei[i.format].schema)}else console.error(`The string validation format "${i.format}" is not supported`);return s})}const Gl=(e,t)=>{if(t===0)return!1;const i=e/t;return Math.abs(i-Math.round(i))<1e-10};function Yl(e,t){return zt(e,i=>{const n=Q(i.messages?.invalid,t);let s=n?Fn(n):Fn();if(i.type==="integer"&&(s=s.check(Fl())),i.minimum!==void 0){const r=Q(i.messages?.minimum,t),a=i.minimum;s=s.check(r?_e(o=>o>=a,{error:r}):io(a))}if(i.maximum!==void 0){const r=Q(i.messages?.maximum,t),a=i.maximum;s=s.check(r?_e(o=>o<=a,{error:r}):to(a))}if(i.exclusiveMinimum!==void 0){const r=Q(i.messages?.exclusiveMinimum,t),a=i.exclusiveMinimum;s=s.check(_e(o=>o>a,r?{error:r}:void 0))}if(i.exclusiveMaximum!==void 0){const r=Q(i.messages?.exclusiveMaximum,t),a=i.exclusiveMaximum;s=s.check(_e(o=>o<a,r?{error:r}:void 0))}if(i.multipleOf!==void 0){const r=Q(i.messages?.multipleOf,t),a=i.multipleOf;s=s.check(_e(o=>Gl(o,a),r?{error:r}:void 0))}if(i.enum){const r=i.enum,a=Q(i.messages?.enum,t);s=s.check(_e(o=>r.includes(o),a?{error:a}:void 0))}if(i.const!==void 0){const r=Q(i.messages?.const,t);s=s.check(_e(a=>a===i.const,r?{error:r}:void 0))}return s})}function Kl(e,t){return zt(e,i=>{const n=Q(i.messages?.invalid,t);let s=n?Rn(n):Rn();if(i.const!==void 0){const r=Q(i.messages?.const,t);s=s.check(_e(a=>a===i.const,r?{error:r}:void 0))}return s})}function Jl(e,t){return zt(e,i=>{const n=Q(i.messages?.invalid,t);let s=n?Bn(Oi(),n):Bn(Oi());if(i.required===!0){const r=Q(i.messages?.required,t)??"This field is required";s=s.check(_e(a=>a.length>0,{error:r}))}if(typeof i.minItems=="number"){const r=Q(i.messages?.minItems,t),a=i.minItems;s=s.check(r?_e(o=>o.length>=a,{error:r}):kt(a))}if(typeof i.maxItems=="number"){const r=Q(i.messages?.maxItems,t),a=i.maxItems;s=s.check(r?_e(o=>o.length<=a,{error:r}):ai(a))}return s})}function Xl(e,t){return zt(e,i=>{let n=Oi();return vt.filterTap(Object.keys(i),s=>s!=="type"&&s!=="required",s=>{const r=i[s],a=t[s],o=a(r);n=n.check(jn((l,d)=>{const c=vt.standardValidate(o,l);if(!vt.isStandardValidateSuccess(c)){const h=c.issues[0];d.addIssue({code:"custom",path:[],message:h?.message||`Validation failed for ${s}`})}}))}),n})}function zt(e,t){const i=t(e);return e.required?i:ql(i)}function Ql({config:e,formHealth:t=void 0,formEvent:i=void 0,autocomplete:n,ref:s}){const r=g.useMemo(()=>_a(e.formDef,e.formSelectors,e.formConfig),[e]),a={formDef:r.formDef,widgetLoaders:{...Zi,...r.widgetLoaders,...e.customWidgetLoaders??{}},dependencies:{...r.dependencies??{},...e.dependencies??{}},validateOn:e.validateOn??r.validateOn??"eager",itemRenderers:{...r.itemRenderers??{},...e.itemRenderers??{}},localization:e.localization,middlewares:e.middlewares??[],data:e.data,meta:e.meta,formName:e.formName},o=Hl({...e.customValidators??{}}),l=r.formEvent&&i?d=>{r.formEvent?.(d),i(d)}:i??r.formEvent;return y.jsx(x.FormComponent,{ref:s,config:a,validators:o,autocomplete:n,formHealth:t,formEvent:l})}const li=globalThis,Ii=li.ShadowRoot&&(li.ShadyCSS===void 0||li.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Zn=Symbol(),qn=new WeakMap;let ed=class{constructor(t,i,n){if(this._$cssResult$=!0,n!==Zn)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=i}get styleSheet(){let t=this.o;const i=this.t;if(Ii&&t===void 0){const n=i!==void 0&&i.length===1;n&&(t=qn.get(i)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&qn.set(i,t))}return t}toString(){return this.cssText}};const td=e=>new ed(typeof e=="string"?e:e+"",void 0,Zn),id=(e,t)=>{if(Ii)e.adoptedStyleSheets=t.map(i=>i instanceof CSSStyleSheet?i:i.styleSheet);else for(const i of t){const n=document.createElement("style"),s=li.litNonce;s!==void 0&&n.setAttribute("nonce",s),n.textContent=i.cssText,e.appendChild(n)}},Vn=Ii?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let i="";for(const n of t.cssRules)i+=n.cssText;return td(i)})(e):e;const{is:nd,defineProperty:sd,getOwnPropertyDescriptor:ad,getOwnPropertyNames:rd,getOwnPropertySymbols:od,getPrototypeOf:ld}=Object,di=globalThis,Un=di.trustedTypes,dd=Un?Un.emptyScript:"",ud=di.reactiveElementPolyfillSupport,Ft=(e,t)=>e,ui={toAttribute(e,t){switch(t){case Boolean:e=e?dd:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let i=e;switch(t){case Boolean:i=e!==null;break;case Number:i=e===null?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch{i=null}}return i}},Ci=(e,t)=>!nd(e,t),Hn={attribute:!0,type:String,converter:ui,reflect:!1,useDefault:!1,hasChanged:Ci};Symbol.metadata??=Symbol("metadata"),di.litPropertyMetadata??=new WeakMap;let At=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,i=Hn){if(i.state&&(i.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((i=Object.create(i)).wrapped=!0),this.elementProperties.set(t,i),!i.noAccessor){const n=Symbol(),s=this.getPropertyDescriptor(t,n,i);s!==void 0&&sd(this.prototype,t,s)}}static getPropertyDescriptor(t,i,n){const{get:s,set:r}=ad(this.prototype,t)??{get(){return this[i]},set(a){this[i]=a}};return{get:s,set(a){const o=s?.call(this);r?.call(this,a),this.requestUpdate(t,o,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Hn}static _$Ei(){if(this.hasOwnProperty(Ft("elementProperties")))return;const t=ld(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Ft("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ft("properties"))){const i=this.properties,n=[...rd(i),...od(i)];for(const s of n)this.createProperty(s,i[s])}const t=this[Symbol.metadata];if(t!==null){const i=litPropertyMetadata.get(t);if(i!==void 0)for(const[n,s]of i)this.elementProperties.set(n,s)}this._$Eh=new Map;for(const[i,n]of this.elementProperties){const s=this._$Eu(i,n);s!==void 0&&this._$Eh.set(s,i)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const i=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const s of n)i.unshift(Vn(s))}else t!==void 0&&i.push(Vn(t));return i}static _$Eu(t,i){const n=i.attribute;return n===!1?void 0:typeof n=="string"?n:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,i=this.constructor.elementProperties;for(const n of i.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return id(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,i,n){this._$AK(t,n)}_$ET(t,i){const n=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,n);if(s!==void 0&&n.reflect===!0){const r=(n.converter?.toAttribute!==void 0?n.converter:ui).toAttribute(i,n.type);this._$Em=t,r==null?this.removeAttribute(s):this.setAttribute(s,r),this._$Em=null}}_$AK(t,i){const n=this.constructor,s=n._$Eh.get(t);if(s!==void 0&&this._$Em!==s){const r=n.getPropertyOptions(s),a=typeof r.converter=="function"?{fromAttribute:r.converter}:r.converter?.fromAttribute!==void 0?r.converter:ui;this._$Em=s;const o=a.fromAttribute(i,r.type);this[s]=o??this._$Ej?.get(s)??o,this._$Em=null}}requestUpdate(t,i,n,s=!1,r){if(t!==void 0){const a=this.constructor;if(s===!1&&(r=this[t]),n??=a.getPropertyOptions(t),!((n.hasChanged??Ci)(r,i)||n.useDefault&&n.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(a._$Eu(t,n))))return;this.C(t,i,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,i,{useDefault:n,reflect:s,wrapped:r},a){n&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,a??i??this[t]),r!==!0||a!==void 0)||(this._$AL.has(t)||(this.hasUpdated||n||(i=void 0),this._$AL.set(t,i)),s===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(i){Promise.reject(i)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[s,r]of this._$Ep)this[s]=r;this._$Ep=void 0}const n=this.constructor.elementProperties;if(n.size>0)for(const[s,r]of n){const{wrapped:a}=r,o=this[s];a!==!0||this._$AL.has(s)||o===void 0||this.C(s,void 0,r,o)}}let t=!1;const i=this._$AL;try{t=this.shouldUpdate(i),t?(this.willUpdate(i),this._$EO?.forEach(n=>n.hostUpdate?.()),this.update(i)):this._$EM()}catch(n){throw t=!1,this._$EM(),n}t&&this._$AE(i)}willUpdate(t){}_$AE(t){this._$EO?.forEach(i=>i.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(i=>this._$ET(i,this[i])),this._$EM()}updated(t){}firstUpdated(t){}};At.elementStyles=[],At.shadowRootOptions={mode:"open"},At[Ft("elementProperties")]=new Map,At[Ft("finalized")]=new Map,ud?.({ReactiveElement:At}),(di.reactiveElementVersions??=[]).push("2.1.2");const Ti=globalThis,Wn=e=>e,ci=Ti.trustedTypes,Gn=ci?ci.createPolicy("lit-html",{createHTML:e=>e}):void 0,Yn="$lit$",ot=`lit$${Math.random().toFixed(9).slice(2)}$`,Kn="?"+ot,cd=`<${Kn}>`,pt=document,Rt=()=>pt.createComment(""),Bt=e=>e===null||typeof e!="object"&&typeof e!="function",Pi=Array.isArray,hd=e=>Pi(e)||typeof e?.[Symbol.iterator]=="function",xi=`[
|
|
4
|
-
\f\r]`,
|
|
5
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Qn=/'/g,es=/"/g,ts=/^(?:script|style|textarea|title)$/i,pd=e=>(t,...i)=>({_$litType$:e,strings:t,values:i}),v=pd(1),ze=Symbol.for("lit-noChange"),_=Symbol.for("lit-nothing"),is=new WeakMap,yt=pt.createTreeWalker(pt,129);function ns(e,t){if(!Pi(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Gn!==void 0?Gn.createHTML(t):t}const md=(e,t)=>{const i=e.length-1,n=[];let s,r=t===2?"<svg>":t===3?"<math>":"",a=jt;for(let o=0;o<i;o++){const l=e[o];let d,c,h=-1,p=0;for(;p<l.length&&(a.lastIndex=p,c=a.exec(l),c!==null);)p=a.lastIndex,a===jt?c[1]==="!--"?a=Jn:c[1]!==void 0?a=Xn:c[2]!==void 0?(ts.test(c[2])&&(s=RegExp("</"+c[2],"g")),a=mt):c[3]!==void 0&&(a=mt):a===mt?c[0]===">"?(a=s??jt,h=-1):c[1]===void 0?h=-2:(h=a.lastIndex-c[2].length,d=c[1],a=c[3]===void 0?mt:c[3]==='"'?es:Qn):a===es||a===Qn?a=mt:a===Jn||a===Xn?a=jt:(a=mt,s=void 0);const m=a===mt&&e[o+1].startsWith("/>")?" ":"";r+=a===jt?l+cd:h>=0?(n.push(d),l.slice(0,h)+Yn+l.slice(h)+ot+m):l+ot+(h===-2?o:m)}return[ns(e,r+(e[i]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),n]};class Zt{constructor({strings:t,_$litType$:i},n){let s;this.parts=[];let r=0,a=0;const o=t.length-1,l=this.parts,[d,c]=md(t,i);if(this.el=Zt.createElement(d,n),yt.currentNode=this.el.content,i===2||i===3){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(s=yt.nextNode())!==null&&l.length<o;){if(s.nodeType===1){if(s.hasAttributes())for(const h of s.getAttributeNames())if(h.endsWith(Yn)){const p=c[a++],m=s.getAttribute(h).split(ot),f=/([.?@])?(.*)/.exec(p);l.push({type:1,index:r,name:f[2],strings:m,ctor:f[1]==="."?fd:f[1]==="?"?gd:f[1]==="@"?bd:hi}),s.removeAttribute(h)}else h.startsWith(ot)&&(l.push({type:6,index:r}),s.removeAttribute(h));if(ts.test(s.tagName)){const h=s.textContent.split(ot),p=h.length-1;if(p>0){s.textContent=ci?ci.emptyScript:"";for(let m=0;m<p;m++)s.append(h[m],Rt()),yt.nextNode(),l.push({type:2,index:++r});s.append(h[p],Rt())}}}else if(s.nodeType===8)if(s.data===Kn)l.push({type:2,index:r});else{let h=-1;for(;(h=s.data.indexOf(ot,h+1))!==-1;)l.push({type:7,index:r}),h+=ot.length-1}r++}}static createElement(t,i){const n=pt.createElement("template");return n.innerHTML=t,n}}function Ot(e,t,i=e,n){if(t===ze)return t;let s=n!==void 0?i._$Co?.[n]:i._$Cl;const r=Bt(t)?void 0:t._$litDirective$;return s?.constructor!==r&&(s?._$AO?.(!1),r===void 0?s=void 0:(s=new r(e),s._$AT(e,i,n)),n!==void 0?(i._$Co??=[])[n]=s:i._$Cl=s),s!==void 0&&(t=Ot(e,s._$AS(e,t.values),s,n)),t}class yd{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:n}=this._$AD,s=(t?.creationScope??pt).importNode(i,!0);yt.currentNode=s;let r=yt.nextNode(),a=0,o=0,l=n[0];for(;l!==void 0;){if(a===l.index){let d;l.type===2?d=new Et(r,r.nextSibling,this,t):l.type===1?d=new l.ctor(r,l.name,l.strings,this,t):l.type===6&&(d=new Dd(r,this,t)),this._$AV.push(d),l=n[++o]}a!==l?.index&&(r=yt.nextNode(),a++)}return yt.currentNode=pt,s}p(t){let i=0;for(const n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,i),i+=n.strings.length-2):n._$AI(t[i])),i++}}class Et{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,n,s){this.type=2,this._$AH=_,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=n,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return i!==void 0&&t?.nodeType===11&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=Ot(this,t,i),Bt(t)?t===_||t==null||t===""?(this._$AH!==_&&this._$AR(),this._$AH=_):t!==this._$AH&&t!==ze&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):hd(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==_&&Bt(this._$AH)?this._$AA.nextSibling.data=t:this.T(pt.createTextNode(t)),this._$AH=t}$(t){const{values:i,_$litType$:n}=t,s=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=Zt.createElement(ns(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===s)this._$AH.p(i);else{const r=new yd(s,this),a=r.u(this.options);r.p(i),this.T(a),this._$AH=r}}_$AC(t){let i=is.get(t.strings);return i===void 0&&is.set(t.strings,i=new Zt(t)),i}k(t){Pi(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let n,s=0;for(const r of t)s===i.length?i.push(n=new Et(this.O(Rt()),this.O(Rt()),this,this.options)):n=i[s],n._$AI(r),s++;s<i.length&&(this._$AR(n&&n._$AB.nextSibling,s),i.length=s)}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);t!==this._$AB;){const n=Wn(t).nextSibling;Wn(t).remove(),t=n}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}}class hi{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,n,s,r){this.type=1,this._$AH=_,this._$AN=void 0,this.element=t,this.name=i,this._$AM=s,this.options=r,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=_}_$AI(t,i=this,n,s){const r=this.strings;let a=!1;if(r===void 0)t=Ot(this,t,i,0),a=!Bt(t)||t!==this._$AH&&t!==ze,a&&(this._$AH=t);else{const o=t;let l,d;for(t=r[0],l=0;l<r.length-1;l++)d=Ot(this,o[n+l],i,l),d===ze&&(d=this._$AH[l]),a||=!Bt(d)||d!==this._$AH[l],d===_?t=_:t!==_&&(t+=(d??"")+r[l+1]),this._$AH[l]=d}a&&!s&&this.j(t)}j(t){t===_?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class fd extends hi{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===_?void 0:t}}class gd extends hi{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==_)}}class bd extends hi{constructor(t,i,n,s,r){super(t,i,n,s,r),this.type=5}_$AI(t,i=this){if((t=Ot(this,t,i,0)??_)===ze)return;const n=this._$AH,s=t===_&&n!==_||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,r=t!==_&&(n===_||s);s&&this.element.removeEventListener(this.name,this,n),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Dd{constructor(t,i,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){Ot(this,t)}}const vd={I:Et},wd=Ti.litHtmlPolyfillSupport;wd?.(Zt,Et),(Ti.litHtmlVersions??=[]).push("3.3.2");const _d=(e,t,i)=>{const n=i?.renderBefore??t;let s=n._$litPart$;if(s===void 0){const r=i?.renderBefore??null;n._$litPart$=s=new Et(t.insertBefore(Rt(),r),r,void 0,i??{})}return s._$AI(e),s};const Mi=globalThis;let ee=class extends At{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=_d(i,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return ze}};ee._$litElement$=!0,ee.finalized=!0,Mi.litElementHydrateSupport?.({LitElement:ee});const kd=Mi.litElementPolyfillSupport;kd?.({LitElement:ee}),(Mi.litElementVersions??=[]).push("4.2.2");const ue=e=>(t,i)=>{i!==void 0?i.addInitializer(()=>{customElements.define(e,t)}):customElements.define(e,t)};const $d={attribute:!0,type:String,converter:ui,reflect:!1,hasChanged:Ci},Sd=(e=$d,t,i)=>{const{kind:n,metadata:s}=i;let r=globalThis.litPropertyMetadata.get(s);if(r===void 0&&globalThis.litPropertyMetadata.set(s,r=new Map),n==="setter"&&((e=Object.create(e)).wrapped=!0),r.set(i.name,e),n==="accessor"){const{name:a}=i;return{set(o){const l=t.get.call(this);t.set.call(this,o),this.requestUpdate(a,l,e,!0,o)},init(o){return o!==void 0&&this.C(a,void 0,e,o),o}}}if(n==="setter"){const{name:a}=i;return function(o){const l=this[a];t.call(this,o),this.requestUpdate(a,l,e,!0,o)}}throw Error("Unsupported decorator location: "+n)};function u(e){return(t,i)=>typeof i=="object"?Sd(e,t,i):((n,s,r)=>{const a=s.hasOwnProperty(r);return s.constructor.createProperty(r,n),a?Object.getOwnPropertyDescriptor(s,r):void 0})(e,t,i)}function Y(e){return u({...e,state:!0,attribute:!1})}const Ad=(e,t,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(e,t,i),i);function ss(e,t){return(i,n,s)=>{const r=a=>a.renderRoot?.querySelector(e)??null;return Ad(i,n,{get(){return r(this)}})}}const tt={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4},qt=e=>(...t)=>({_$litDirective$:e,values:t});let Vt=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,i,n){this._$Ct=t,this._$AM=i,this._$Ci=n}_$AS(t,i){return this.update(t,i)}update(t,i){return this.render(...i)}};const fe=qt(class extends Vt{constructor(e){if(super(e),e.type!==tt.ATTRIBUTE||e.name!=="class"||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){if(this.st===void 0){this.st=new Set,e.strings!==void 0&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter(n=>n!=="")));for(const n in t)t[n]&&!this.nt?.has(n)&&this.st.add(n);return this.render(t)}const i=e.element.classList;for(const n of this.st)n in t||(i.remove(n),this.st.delete(n));for(const n in t){const s=!!t[n];s===this.st.has(n)||this.nt?.has(n)||(s?(i.add(n),this.st.add(n)):(i.remove(n),this.st.delete(n)))}return ze}});var Od=Object.defineProperty,Ed=Object.getOwnPropertyDescriptor,ft=(e,t,i,n)=>{for(var s=n>1?void 0:n?Ed(t,i):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(s=(n?a(t,i,s):a(s))||s);return n&&s&&Od(t,i,s),s};let at=class extends ee{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.disabled=!1,this.icon=void 0,this.variant="filled",this.iconPosition="left"}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}render(){const e=this.icon,t=this.iconPosition||"left",i={"gui-button-with-icon":!!e,[`gui-button-icon-${t}`]:!0,"gui-button--outlined":this.variant==="outlined","gui-button--link":this.variant==="link"},n=e?v`<span class="gui-widget-icon gui-button-icon ${e}" data-icon=${e}></span>`:_;return v`
|
|
3
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const a of e.seen.entries()){const o=a[1];if(t===a[0]){r(a);continue}if(e.external){const d=e.external.registry.get(a[0])?.id;if(t!==a[0]&&d){r(a);continue}}if(e.metadataRegistry.get(a[0])?.id){r(a);continue}if(o.cycle){r(a);continue}if(o.count>1&&e.reused==="ref"){r(a);continue}}}function En(e,t){const i=e.seen.get(t);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=a=>{const o=e.seen.get(a);if(o.ref===null)return;const l=o.def??o.schema,d={...l},c=o.ref;if(o.ref=null,c){n(c);const p=e.seen.get(c),m=p.schema;if(m.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(m)):Object.assign(l,m),Object.assign(l,d),a._zod.parent===c)for(const w in l)w==="$ref"||w==="allOf"||w in d||delete l[w];if(m.$ref&&p.def)for(const w in l)w==="$ref"||w==="allOf"||w in p.def&&JSON.stringify(l[w])===JSON.stringify(p.def[w])&&delete l[w]}const h=a._zod.parent;if(h&&h!==c){n(h);const p=e.seen.get(h);if(p?.schema.$ref&&(l.$ref=p.schema.$ref,p.def))for(const m in l)m==="$ref"||m==="allOf"||m in p.def&&JSON.stringify(l[m])===JSON.stringify(p.def[m])&&delete l[m]}e.override({zodSchema:a,jsonSchema:l,path:o.path??[]})};for(const a of[...e.seen.entries()].reverse())n(a[0]);const s={};if(e.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?s.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?s.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const a=e.external.registry.get(t)?.id;if(!a)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(a)}Object.assign(s,i.def??i.schema);const r=e.external?.defs??{};for(const a of e.seen.entries()){const o=a[1];o.def&&o.defId&&(r[o.defId]=o.def)}e.external||Object.keys(r).length>0&&(e.target==="draft-2020-12"?s.$defs=r:s.definitions=r);try{const a=JSON.parse(JSON.stringify(s));return Object.defineProperty(a,"~standard",{value:{...t["~standard"],jsonSchema:{input:ai(t,"input",e.processors),output:ai(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function Me(e,t){const i=t??{seen:new Set};if(i.seen.has(e))return!1;i.seen.add(e);const n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return Me(n.element,i);if(n.type==="set")return Me(n.valueType,i);if(n.type==="lazy")return Me(n.getter(),i);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return Me(n.innerType,i);if(n.type==="intersection")return Me(n.left,i)||Me(n.right,i);if(n.type==="record"||n.type==="map")return Me(n.keyType,i)||Me(n.valueType,i);if(n.type==="pipe")return Me(n.in,i)||Me(n.out,i);if(n.type==="object"){for(const s in n.shape)if(Me(n.shape[s],i))return!0;return!1}if(n.type==="union"){for(const s of n.options)if(Me(s,i))return!0;return!1}if(n.type==="tuple"){for(const s of n.items)if(Me(s,i))return!0;return!!(n.rest&&Me(n.rest,i))}return!1}const go=(e,t={})=>i=>{const n=An({...i,processors:t});return xe(e,n),On(n,e),En(n,e)},ai=(e,t,i={})=>n=>{const{libraryOptions:s,target:r}=n??{},a=An({...s??{},target:r,io:t,processors:i});return xe(e,a),On(a,e),En(a,e)},bo={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Do=(e,t,i,n)=>{const s=i;s.type="string";const{minimum:r,maximum:a,format:o,patterns:l,contentEncoding:d}=e._zod.bag;if(typeof r=="number"&&(s.minLength=r),typeof a=="number"&&(s.maxLength=a),o&&(s.format=bo[o]??o,s.format===""&&delete s.format,o==="time"&&delete s.format),d&&(s.contentEncoding=d),l&&l.size>0){const c=[...l];c.length===1?s.pattern=c[0].source:c.length>1&&(s.allOf=[...c.map(h=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:h.source}))])}},vo=(e,t,i,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},wo=(e,t,i,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},_o=(e,t,i,n)=>{const s=i,r=e._zod.def,{minimum:a,maximum:o}=e._zod.bag;typeof a=="number"&&(s.minItems=a),typeof o=="number"&&(s.maxItems=o),s.type="array",s.items=xe(r.element,t,{...n,path:[...n.path,"items"]})},ko=(e,t,i,n)=>{const s=e._zod.def,r=s.inclusive===!1,a=s.options.map((o,l)=>xe(o,t,{...n,path:[...n.path,r?"oneOf":"anyOf",l]}));r?i.oneOf=a:i.anyOf=a},$o=(e,t,i,n)=>{const s=e._zod.def,r=xe(s.left,t,{...n,path:[...n.path,"allOf",0]}),a=xe(s.right,t,{...n,path:[...n.path,"allOf",1]}),o=d=>"allOf"in d&&Object.keys(d).length===1,l=[...o(r)?r.allOf:[r],...o(a)?a.allOf:[a]];i.allOf=l},So=(e,t,i,n)=>{const s=e._zod.def,r=xe(s.innerType,t,n),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=s.innerType,i.nullable=!0):i.anyOf=[r,{type:"null"}]},Ao=(e,t,i,n)=>{const s=e._zod.def;xe(s.innerType,t,n);const r=t.seen.get(e);r.ref=s.innerType},Oo=(e,t,i,n)=>{const s=e._zod.def;xe(s.innerType,t,n);const r=t.seen.get(e);r.ref=s.innerType,i.default=JSON.parse(JSON.stringify(s.defaultValue))},Eo=(e,t,i,n)=>{const s=e._zod.def;xe(s.innerType,t,n);const r=t.seen.get(e);r.ref=s.innerType,t.io==="input"&&(i._prefault=JSON.parse(JSON.stringify(s.defaultValue)))},Io=(e,t,i,n)=>{const s=e._zod.def;xe(s.innerType,t,n);const r=t.seen.get(e);r.ref=s.innerType;let a;try{a=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}i.default=a},Co=(e,t,i,n)=>{const s=e._zod.def,r=t.io==="input"?s.in._zod.def.type==="transform"?s.out:s.in:s.out;xe(r,t,n);const a=t.seen.get(e);a.ref=r},To=(e,t,i,n)=>{const s=e._zod.def;xe(s.innerType,t,n);const r=t.seen.get(e);r.ref=s.innerType,i.readOnly=!0},In=(e,t,i,n)=>{const s=e._zod.def;xe(s.innerType,t,n);const r=t.seen.get(e);r.ref=s.innerType},Po=b("ZodISODateTime",(e,t)=>{br.init(e,t),ri.init(e,t)});function xo(e){return Wr(Po,e)}const Mo=b("ZodISODate",(e,t)=>{Dr.init(e,t),ri.init(e,t)});function Lo(e){return Gr(Mo,e)}const No=b("ZodISOTime",(e,t)=>{vr.init(e,t),ri.init(e,t)});function zo(e){return Yr(No,e)}const Fo=b("ZodISODuration",(e,t)=>{wr.init(e,t),ri.init(e,t)});function Ro(e){return Kr(Fo,e)}const We=b("ZodError",(e,t)=>{nn.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:i=>Ca(e,i)},flatten:{value:i=>Ia(e,i)},addIssue:{value:i=>{e.issues.push(i),e.message=JSON.stringify(e.issues,gi,2)}},addIssues:{value:i=>{e.issues.push(...i),e.message=JSON.stringify(e.issues,gi,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),Bo=Xt(We),jo=Qt(We),Zo=ei(We),qo=ti(We),Vo=xa(We),Uo=Ma(We),Ho=La(We),Wo=Na(We),Go=za(We),Yo=Fa(We),Ko=Ra(We),Jo=Ba(We),Le=b("ZodType",(e,t)=>(de.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:ai(e,"input"),output:ai(e,"output")}}),e.toJSONSchema=go(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...i)=>e.clone(Sa(t,{checks:[...t.checks??[],...i.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0}),e.with=e.check,e.clone=(i,n)=>en(e,i,n),e.brand=()=>e,e.register=((i,n)=>(i.add(e,n),e)),e.parse=(i,n)=>Bo(e,i,n,{callee:e.parse}),e.safeParse=(i,n)=>Zo(e,i,n),e.parseAsync=async(i,n)=>jo(e,i,n,{callee:e.parseAsync}),e.safeParseAsync=async(i,n)=>qo(e,i,n),e.spa=e.safeParseAsync,e.encode=(i,n)=>Vo(e,i,n),e.decode=(i,n)=>Uo(e,i,n),e.encodeAsync=async(i,n)=>Ho(e,i,n),e.decodeAsync=async(i,n)=>Wo(e,i,n),e.safeEncode=(i,n)=>Go(e,i,n),e.safeDecode=(i,n)=>Yo(e,i,n),e.safeEncodeAsync=async(i,n)=>Ko(e,i,n),e.safeDecodeAsync=async(i,n)=>Jo(e,i,n),e.refine=(i,n)=>e.check(kl(i,n)),e.superRefine=i=>e.check($l(i)),e.overwrite=i=>e.check($t(i)),e.optional=()=>Cn(e),e.exactOptional=()=>dl(e),e.nullable=()=>Tn(e),e.nullish=()=>Cn(Tn(e)),e.nonoptional=i=>fl(e,i),e.array=()=>el(e),e.or=i=>il([e,i]),e.and=i=>sl(e,i),e.transform=i=>Pn(e,rl(i)),e.default=i=>hl(e,i),e.prefault=i=>ml(e,i),e.catch=i=>bl(e,i),e.pipe=i=>Pn(e,i),e.readonly=()=>wl(e),e.describe=i=>{const n=e.clone();return Lt.add(n,{description:i}),n},Object.defineProperty(e,"description",{get(){return Lt.get(e)?.description},configurable:!0}),e.meta=(...i)=>{if(i.length===0)return Lt.get(e);const n=e.clone();return Lt.add(n,i[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=i=>i(e),e)),Xo=b("_ZodString",(e,t)=>{ki.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(n,s,r)=>Do(e,n,s);const i=e._zod.bag;e.format=i.format??null,e.minLength=i.minimum??null,e.maxLength=i.maximum??null,e.regex=(...n)=>e.check(kn(...n)),e.includes=(...n)=>e.check(ao(...n)),e.startsWith=(...n)=>e.check(ro(...n)),e.endsWith=(...n)=>e.check(oo(...n)),e.min=(...n)=>e.check(kt(...n)),e.max=(...n)=>e.check(si(...n)),e.length=(...n)=>e.check(_n(...n)),e.nonempty=(...n)=>e.check(kt(1,...n)),e.lowercase=n=>e.check(no(n)),e.uppercase=n=>e.check(so(n)),e.trim=()=>e.check(uo()),e.normalize=(...n)=>e.check(lo(...n)),e.toLowerCase=()=>e.check(co()),e.toUpperCase=()=>e.check(ho()),e.slugify=()=>e.check(po())}),ri=b("ZodStringFormat",(e,t)=>{He.init(e,t),Xo.init(e,t)}),Qo=b("ZodArray",(e,t)=>{hn.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(i,n,s)=>_o(e,i,n,s),e.element=t.element,e.min=(i,n)=>e.check(kt(i,n)),e.nonempty=i=>e.check(kt(1,i)),e.max=(i,n)=>e.check(si(i,n)),e.length=(i,n)=>e.check(_n(i,n)),e.unwrap=()=>e.element});function el(e,t){return mo(Qo,e,t)}const tl=b("ZodUnion",(e,t)=>{Er.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(i,n,s)=>ko(e,i,n,s),e.options=t.options});function il(e,t){return new tl({type:"union",options:e,...L(t)})}const nl=b("ZodIntersection",(e,t)=>{Ir.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(i,n,s)=>$o(e,i,n,s)});function sl(e,t){return new nl({type:"intersection",left:e,right:t})}const al=b("ZodTransform",(e,t)=>{Cr.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(i,n,s)=>wo(e,i),e._zod.parse=(i,n)=>{if(n.direction==="backward")throw new Yi(e.constructor.name);i.addIssue=r=>{if(typeof r=="string")i.issues.push(Mt(r,i.value,t));else{const a=r;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=i.value),a.inst??(a.inst=e),i.issues.push(Mt(a))}};const s=t.transform(i.value,i);return s instanceof Promise?s.then(r=>(i.value=r,i)):(i.value=s,i)}});function rl(e){return new al({type:"transform",transform:e})}const ol=b("ZodOptional",(e,t)=>{Si.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(i,n,s)=>In(e,i,n,s),e.unwrap=()=>e._zod.def.innerType});function Cn(e){return new ol({type:"optional",innerType:e})}const ll=b("ZodExactOptional",(e,t)=>{Tr.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(i,n,s)=>In(e,i,n,s),e.unwrap=()=>e._zod.def.innerType});function dl(e){return new ll({type:"optional",innerType:e})}const ul=b("ZodNullable",(e,t)=>{Pr.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(i,n,s)=>So(e,i,n,s),e.unwrap=()=>e._zod.def.innerType});function Tn(e){return new ul({type:"nullable",innerType:e})}const cl=b("ZodDefault",(e,t)=>{xr.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(i,n,s)=>Oo(e,i,n,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function hl(e,t){return new cl({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Qi(t)}})}const pl=b("ZodPrefault",(e,t)=>{Mr.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(i,n,s)=>Eo(e,i,n,s),e.unwrap=()=>e._zod.def.innerType});function ml(e,t){return new pl({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Qi(t)}})}const yl=b("ZodNonOptional",(e,t)=>{Lr.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(i,n,s)=>Ao(e,i,n,s),e.unwrap=()=>e._zod.def.innerType});function fl(e,t){return new yl({type:"nonoptional",innerType:e,...L(t)})}const gl=b("ZodCatch",(e,t)=>{Nr.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(i,n,s)=>Io(e,i,n,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function bl(e,t){return new gl({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Dl=b("ZodPipe",(e,t)=>{zr.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(i,n,s)=>Co(e,i,n,s),e.in=t.in,e.out=t.out});function Pn(e,t){return new Dl({type:"pipe",in:e,out:t})}const vl=b("ZodReadonly",(e,t)=>{Fr.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(i,n,s)=>To(e,i,n,s),e.unwrap=()=>e._zod.def.innerType});function wl(e){return new vl({type:"readonly",innerType:e})}const _l=b("ZodCustom",(e,t)=>{Dn.init(e,t),Le.init(e,t),e._zod.processJSONSchema=(i,n,s)=>vo(e,i)});function kl(e,t={}){return $n(_l,e,t)}function $l(e){return Sn(e)}const ht=b("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");de.init(e,t),e.def=t,e.type=t.type,e.parse=(i,n)=>Ta(e,i,n,{callee:e.parse}),e.safeParse=(i,n)=>sn(e,i,n),e.parseAsync=async(i,n)=>Pa(e,i,n,{callee:e.parseAsync}),e.safeParseAsync=async(i,n)=>an(e,i,n),e.check=(...i)=>e.clone({...t,checks:[...t.checks??[],...i.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]},{parent:!0}),e.with=e.check,e.clone=(i,n)=>en(e,i,n),e.brand=()=>e,e.register=((i,n)=>(i.add(e,n),e)),e.apply=i=>i(e)}),xn=b("ZodMiniString",(e,t)=>{ki.init(e,t),ht.init(e,t)});function Mn(e){return jr(xn,e)}const St=b("ZodMiniStringFormat",(e,t)=>{He.init(e,t),xn.init(e,t)}),Sl=b("ZodMiniEmail",(e,t)=>{fr.init(e,t),St.init(e,t)});function Al(e){return Zr(Sl,e)}const Ol=b("ZodMiniUUID",(e,t)=>{yr.init(e,t),St.init(e,t)});function El(e){return qr(Ol,e)}const Il=b("ZodMiniURL",(e,t)=>{gr.init(e,t),St.init(e,t)});function Cl(e){return Vr(Il,e)}const Tl=b("ZodMiniIPv4",(e,t)=>{_r.init(e,t),St.init(e,t)});function Pl(e){return Ur(Tl,e)}const xl=b("ZodMiniIPv6",(e,t)=>{kr.init(e,t),St.init(e,t)});function Ml(e){return Hr(xl,e)}const Ll=b("ZodMiniCustomStringFormat",(e,t)=>{$r.init(e,t),St.init(e,t)});function Nl(e){return fo(Ll,"hostname",Ua,e)}const Ln=b("ZodMiniNumber",(e,t)=>{un.init(e,t),ht.init(e,t)});function Nn(e){return Jr(Ln,e)}const zl=b("ZodMiniNumberFormat",(e,t)=>{Sr.init(e,t),Ln.init(e,t)});function Fl(e){return Xr(zl,e)}const Rl=b("ZodMiniBoolean",(e,t)=>{Ar.init(e,t),ht.init(e,t)});function zn(e){return Qr(Rl,e)}const Bl=b("ZodMiniAny",(e,t)=>{Or.init(e,t),ht.init(e,t)});function Ai(){return eo(Bl)}const jl=b("ZodMiniArray",(e,t)=>{hn.init(e,t),ht.init(e,t)});function Fn(e,t){return new jl({type:"array",element:e,...L(t)})}const Zl=b("ZodMiniOptional",(e,t)=>{Si.init(e,t),ht.init(e,t)});function ql(e){return new Zl({type:"optional",innerType:e})}const Vl=b("ZodMiniCustom",(e,t)=>{Dn.init(e,t),ht.init(e,t)});function _e(e,t={}){return $n(Vl,e,t)}function Rn(e){return Sn(e)}const Oi={email:{schema:Al()},hostname:{schema:Nl()},ipv4:{schema:Pl()},ipv6:{schema:Ml()},url:{schema:Cl()},uuid:{schema:El()},date:{schema:Lo()},time:{schema:zo()},"date-time":{schema:xo()},duration:{schema:Ro()}},Ul=Object.keys(Oi),Hl=e=>(t,i)=>{switch(t.type){case"string":return Wl(t,i);case"integer":case"number":return Yl(t,i);case"boolean":return Kl(t,i);case"array":return Jl(t,i);case"custom":{if(!e)throw new Error('Validator type "custom" requires a customValidators object, but it was not supplied.');return Xl(t,e)}}};function Q(e,t){if(e!==void 0)return typeof e=="string"?e:t?.translate(e.key,e.params,e.default)??e.default}function Wl(e,t){return Nt(e,i=>{const n=Q(i.messages?.invalid,t);let s=n?Mn(n):Mn();if(i.required===!0){const r=Q(i.messages?.required,t)??"This field is required";s=s.check(_e(a=>a.length>0,{error:r}))}if(typeof i.minLength=="number"){const r=Q(i.messages?.minLength,t),a=i.minLength;s=s.check(r?_e(o=>o.length>=a,{error:r}):kt(a))}if(typeof i.maxLength=="number"){const r=Q(i.messages?.maxLength,t),a=i.maxLength;s=s.check(r?_e(o=>o.length<=a,{error:r}):si(a))}if(typeof i.pattern=="string"){const r=Q(i.messages?.pattern,t),a=new RegExp(i.pattern);s=s.check(r?_e(o=>a.test(o),{error:r}):kn(a))}if(i.enum){const r=i.enum,a=Q(i.messages?.enum,t);s=s.check(_e(o=>r.includes(o),a?{error:a}:void 0))}if(i.const!==void 0){const r=Q(i.messages?.const,t);s=s.check(_e(a=>a===i.const,r?{error:r}:void 0))}if(i.format!==void 0)if(Ul.includes(i.format)){const r=Q(i.messages?.format,t);s=s.check(r?Rn((a,o)=>{const l=vt.standardValidate(Oi[i.format].schema,a);vt.isStandardValidateSuccess(l)||o.addIssue({code:"custom",path:[],message:r})}):Oi[i.format].schema)}else console.error(`The string validation format "${i.format}" is not supported`);return s})}const Gl=(e,t)=>{if(t===0)return!1;const i=e/t;return Math.abs(i-Math.round(i))<1e-10};function Yl(e,t){return Nt(e,i=>{const n=Q(i.messages?.invalid,t);let s=n?Nn(n):Nn();if(i.type==="integer"&&(s=s.check(Fl())),i.minimum!==void 0){const r=Q(i.messages?.minimum,t),a=i.minimum;s=s.check(r?_e(o=>o>=a,{error:r}):io(a))}if(i.maximum!==void 0){const r=Q(i.messages?.maximum,t),a=i.maximum;s=s.check(r?_e(o=>o<=a,{error:r}):to(a))}if(i.exclusiveMinimum!==void 0){const r=Q(i.messages?.exclusiveMinimum,t),a=i.exclusiveMinimum;s=s.check(_e(o=>o>a,r?{error:r}:void 0))}if(i.exclusiveMaximum!==void 0){const r=Q(i.messages?.exclusiveMaximum,t),a=i.exclusiveMaximum;s=s.check(_e(o=>o<a,r?{error:r}:void 0))}if(i.multipleOf!==void 0){const r=Q(i.messages?.multipleOf,t),a=i.multipleOf;s=s.check(_e(o=>Gl(o,a),r?{error:r}:void 0))}if(i.enum){const r=i.enum,a=Q(i.messages?.enum,t);s=s.check(_e(o=>r.includes(o),a?{error:a}:void 0))}if(i.const!==void 0){const r=Q(i.messages?.const,t);s=s.check(_e(a=>a===i.const,r?{error:r}:void 0))}return s})}function Kl(e,t){return Nt(e,i=>{const n=Q(i.messages?.invalid,t);let s=n?zn(n):zn();if(i.const!==void 0){const r=Q(i.messages?.const,t);s=s.check(_e(a=>a===i.const,r?{error:r}:void 0))}return s})}function Jl(e,t){return Nt(e,i=>{const n=Q(i.messages?.invalid,t);let s=n?Fn(Ai(),n):Fn(Ai());if(i.required===!0){const r=Q(i.messages?.required,t)??"This field is required";s=s.check(_e(a=>a.length>0,{error:r}))}if(typeof i.minItems=="number"){const r=Q(i.messages?.minItems,t),a=i.minItems;s=s.check(r?_e(o=>o.length>=a,{error:r}):kt(a))}if(typeof i.maxItems=="number"){const r=Q(i.messages?.maxItems,t),a=i.maxItems;s=s.check(r?_e(o=>o.length<=a,{error:r}):si(a))}return s})}function Xl(e,t){return Nt(e,i=>{let n=Ai();return vt.filterTap(Object.keys(i),s=>s!=="type"&&s!=="required",s=>{const r=i[s],a=t[s],o=a(r);n=n.check(Rn((l,d)=>{const c=vt.standardValidate(o,l);if(!vt.isStandardValidateSuccess(c)){const h=c.issues[0];d.addIssue({code:"custom",path:[],message:h?.message||`Validation failed for ${s}`})}}))}),n})}function Nt(e,t){const i=t(e);return e.required?i:ql(i)}const Bn={button:async()=>(await Promise.resolve().then(()=>Cd)).Button,calendar:async()=>(await Promise.resolve().then(()=>qd)).Calendar,currency:async()=>(await Promise.resolve().then(()=>Wd)).Currency,dateInput:async()=>(await Promise.resolve().then(()=>Jd)).DateInput,datePicker:async()=>(await Promise.resolve().then(()=>Qd)).DatePicker,dropdown:async()=>(await Promise.resolve().then(()=>hu)).Dropdown,list:async()=>(await Promise.resolve().then(()=>mu)).List,password:async()=>(await Promise.resolve().then(()=>bu)).Password,textinput:async()=>(await Promise.resolve().then(()=>_u)).TextInput,textarea:async()=>(await Promise.resolve().then(()=>Ou)).TextArea,markdown:async()=>(await Promise.resolve().then(()=>Mu)).Markdown,checkbox:async()=>(await Promise.resolve().then(()=>Fu)).Checkbox,toggle:async()=>(await Promise.resolve().then(()=>Zu)).Toggle,number:async()=>(await Promise.resolve().then(()=>Hu)).NumberInput,select:async()=>(await Promise.resolve().then(()=>Qu)).Select,radiogroup:async()=>(await Promise.resolve().then(()=>nc)).RadioGroup,rangeCalendar:async()=>(await Promise.resolve().then(()=>oc)).RangeCalendar,rangeDateInput:async()=>(await Promise.resolve().then(()=>cc)).RangeDateInput,rangeDatePicker:async()=>(await Promise.resolve().then(()=>pc)).RangeDatePicker,repeater:async()=>(await Promise.resolve().then(()=>gc)).Repeater,flex:async()=>(await Promise.resolve().then(()=>Dc)).Flex,grid:async()=>(await Promise.resolve().then(()=>wc)).Grid,tabs:async()=>(await Promise.resolve().then(()=>kc)).Tabs,accordion:async()=>(await Promise.resolve().then(()=>Sc)).Accordion,alert:async()=>(await Promise.resolve().then(()=>Oc)).Alert,markdownText:async()=>(await Promise.resolve().then(()=>Ic)).MarkdownText,renderer:async()=>(await Promise.resolve().then(()=>Tc)).Renderer};function Ql({config:e,formHealth:t=void 0,formEvent:i=void 0,autocomplete:n,ref:s}){const r=g.useMemo(()=>_a(e.formDef,e.formSelectors,e.formConfig),[e]),a={formDef:r.formDef,widgetLoaders:{...Bn,...r.widgetLoaders,...e.customWidgetLoaders??{}},dependencies:{...r.dependencies??{},...e.dependencies??{}},validateOn:e.validateOn??r.validateOn??"eager",itemRenderers:{...r.itemRenderers??{},...e.itemRenderers??{}},localization:e.localization,middlewares:e.middlewares??[],data:e.data,meta:e.meta,formName:e.formName},o=Hl({...e.customValidators??{}}),l=r.formEvent&&i?d=>{r.formEvent?.(d),i(d)}:i??r.formEvent;return y.jsx(x.FormComponent,{ref:s,config:a,validators:o,autocomplete:n,formHealth:t,formEvent:l})}const oi=globalThis,Ei=oi.ShadowRoot&&(oi.ShadyCSS===void 0||oi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,jn=Symbol(),Zn=new WeakMap;let ed=class{constructor(t,i,n){if(this._$cssResult$=!0,n!==jn)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=i}get styleSheet(){let t=this.o;const i=this.t;if(Ei&&t===void 0){const n=i!==void 0&&i.length===1;n&&(t=Zn.get(i)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&Zn.set(i,t))}return t}toString(){return this.cssText}};const td=e=>new ed(typeof e=="string"?e:e+"",void 0,jn),id=(e,t)=>{if(Ei)e.adoptedStyleSheets=t.map(i=>i instanceof CSSStyleSheet?i:i.styleSheet);else for(const i of t){const n=document.createElement("style"),s=oi.litNonce;s!==void 0&&n.setAttribute("nonce",s),n.textContent=i.cssText,e.appendChild(n)}},qn=Ei?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let i="";for(const n of t.cssRules)i+=n.cssText;return td(i)})(e):e;const{is:nd,defineProperty:sd,getOwnPropertyDescriptor:ad,getOwnPropertyNames:rd,getOwnPropertySymbols:od,getPrototypeOf:ld}=Object,li=globalThis,Vn=li.trustedTypes,dd=Vn?Vn.emptyScript:"",ud=li.reactiveElementPolyfillSupport,zt=(e,t)=>e,di={toAttribute(e,t){switch(t){case Boolean:e=e?dd:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let i=e;switch(t){case Boolean:i=e!==null;break;case Number:i=e===null?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch{i=null}}return i}},Ii=(e,t)=>!nd(e,t),Un={attribute:!0,type:String,converter:di,reflect:!1,useDefault:!1,hasChanged:Ii};Symbol.metadata??=Symbol("metadata"),li.litPropertyMetadata??=new WeakMap;let At=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,i=Un){if(i.state&&(i.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((i=Object.create(i)).wrapped=!0),this.elementProperties.set(t,i),!i.noAccessor){const n=Symbol(),s=this.getPropertyDescriptor(t,n,i);s!==void 0&&sd(this.prototype,t,s)}}static getPropertyDescriptor(t,i,n){const{get:s,set:r}=ad(this.prototype,t)??{get(){return this[i]},set(a){this[i]=a}};return{get:s,set(a){const o=s?.call(this);r?.call(this,a),this.requestUpdate(t,o,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Un}static _$Ei(){if(this.hasOwnProperty(zt("elementProperties")))return;const t=ld(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(zt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(zt("properties"))){const i=this.properties,n=[...rd(i),...od(i)];for(const s of n)this.createProperty(s,i[s])}const t=this[Symbol.metadata];if(t!==null){const i=litPropertyMetadata.get(t);if(i!==void 0)for(const[n,s]of i)this.elementProperties.set(n,s)}this._$Eh=new Map;for(const[i,n]of this.elementProperties){const s=this._$Eu(i,n);s!==void 0&&this._$Eh.set(s,i)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const i=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const s of n)i.unshift(qn(s))}else t!==void 0&&i.push(qn(t));return i}static _$Eu(t,i){const n=i.attribute;return n===!1?void 0:typeof n=="string"?n:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,i=this.constructor.elementProperties;for(const n of i.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return id(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,i,n){this._$AK(t,n)}_$ET(t,i){const n=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,n);if(s!==void 0&&n.reflect===!0){const r=(n.converter?.toAttribute!==void 0?n.converter:di).toAttribute(i,n.type);this._$Em=t,r==null?this.removeAttribute(s):this.setAttribute(s,r),this._$Em=null}}_$AK(t,i){const n=this.constructor,s=n._$Eh.get(t);if(s!==void 0&&this._$Em!==s){const r=n.getPropertyOptions(s),a=typeof r.converter=="function"?{fromAttribute:r.converter}:r.converter?.fromAttribute!==void 0?r.converter:di;this._$Em=s;const o=a.fromAttribute(i,r.type);this[s]=o??this._$Ej?.get(s)??o,this._$Em=null}}requestUpdate(t,i,n,s=!1,r){if(t!==void 0){const a=this.constructor;if(s===!1&&(r=this[t]),n??=a.getPropertyOptions(t),!((n.hasChanged??Ii)(r,i)||n.useDefault&&n.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(a._$Eu(t,n))))return;this.C(t,i,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,i,{useDefault:n,reflect:s,wrapped:r},a){n&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,a??i??this[t]),r!==!0||a!==void 0)||(this._$AL.has(t)||(this.hasUpdated||n||(i=void 0),this._$AL.set(t,i)),s===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(i){Promise.reject(i)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[s,r]of this._$Ep)this[s]=r;this._$Ep=void 0}const n=this.constructor.elementProperties;if(n.size>0)for(const[s,r]of n){const{wrapped:a}=r,o=this[s];a!==!0||this._$AL.has(s)||o===void 0||this.C(s,void 0,r,o)}}let t=!1;const i=this._$AL;try{t=this.shouldUpdate(i),t?(this.willUpdate(i),this._$EO?.forEach(n=>n.hostUpdate?.()),this.update(i)):this._$EM()}catch(n){throw t=!1,this._$EM(),n}t&&this._$AE(i)}willUpdate(t){}_$AE(t){this._$EO?.forEach(i=>i.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(i=>this._$ET(i,this[i])),this._$EM()}updated(t){}firstUpdated(t){}};At.elementStyles=[],At.shadowRootOptions={mode:"open"},At[zt("elementProperties")]=new Map,At[zt("finalized")]=new Map,ud?.({ReactiveElement:At}),(li.reactiveElementVersions??=[]).push("2.1.2");const Ci=globalThis,Hn=e=>e,ui=Ci.trustedTypes,Wn=ui?ui.createPolicy("lit-html",{createHTML:e=>e}):void 0,Gn="$lit$",ot=`lit$${Math.random().toFixed(9).slice(2)}$`,Yn="?"+ot,cd=`<${Yn}>`,pt=document,Ft=()=>pt.createComment(""),Rt=e=>e===null||typeof e!="object"&&typeof e!="function",Ti=Array.isArray,hd=e=>Ti(e)||typeof e?.[Symbol.iterator]=="function",Pi=`[
|
|
4
|
+
\f\r]`,Bt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Kn=/-->/g,Jn=/>/g,mt=RegExp(`>|${Pi}(?:([^\\s"'>=/]+)(${Pi}*=${Pi}*(?:[^
|
|
5
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Xn=/'/g,Qn=/"/g,es=/^(?:script|style|textarea|title)$/i,pd=e=>(t,...i)=>({_$litType$:e,strings:t,values:i}),v=pd(1),ze=Symbol.for("lit-noChange"),_=Symbol.for("lit-nothing"),ts=new WeakMap,yt=pt.createTreeWalker(pt,129);function is(e,t){if(!Ti(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Wn!==void 0?Wn.createHTML(t):t}const md=(e,t)=>{const i=e.length-1,n=[];let s,r=t===2?"<svg>":t===3?"<math>":"",a=Bt;for(let o=0;o<i;o++){const l=e[o];let d,c,h=-1,p=0;for(;p<l.length&&(a.lastIndex=p,c=a.exec(l),c!==null);)p=a.lastIndex,a===Bt?c[1]==="!--"?a=Kn:c[1]!==void 0?a=Jn:c[2]!==void 0?(es.test(c[2])&&(s=RegExp("</"+c[2],"g")),a=mt):c[3]!==void 0&&(a=mt):a===mt?c[0]===">"?(a=s??Bt,h=-1):c[1]===void 0?h=-2:(h=a.lastIndex-c[2].length,d=c[1],a=c[3]===void 0?mt:c[3]==='"'?Qn:Xn):a===Qn||a===Xn?a=mt:a===Kn||a===Jn?a=Bt:(a=mt,s=void 0);const m=a===mt&&e[o+1].startsWith("/>")?" ":"";r+=a===Bt?l+cd:h>=0?(n.push(d),l.slice(0,h)+Gn+l.slice(h)+ot+m):l+ot+(h===-2?o:m)}return[is(e,r+(e[i]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),n]};class jt{constructor({strings:t,_$litType$:i},n){let s;this.parts=[];let r=0,a=0;const o=t.length-1,l=this.parts,[d,c]=md(t,i);if(this.el=jt.createElement(d,n),yt.currentNode=this.el.content,i===2||i===3){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(s=yt.nextNode())!==null&&l.length<o;){if(s.nodeType===1){if(s.hasAttributes())for(const h of s.getAttributeNames())if(h.endsWith(Gn)){const p=c[a++],m=s.getAttribute(h).split(ot),f=/([.?@])?(.*)/.exec(p);l.push({type:1,index:r,name:f[2],strings:m,ctor:f[1]==="."?fd:f[1]==="?"?gd:f[1]==="@"?bd:ci}),s.removeAttribute(h)}else h.startsWith(ot)&&(l.push({type:6,index:r}),s.removeAttribute(h));if(es.test(s.tagName)){const h=s.textContent.split(ot),p=h.length-1;if(p>0){s.textContent=ui?ui.emptyScript:"";for(let m=0;m<p;m++)s.append(h[m],Ft()),yt.nextNode(),l.push({type:2,index:++r});s.append(h[p],Ft())}}}else if(s.nodeType===8)if(s.data===Yn)l.push({type:2,index:r});else{let h=-1;for(;(h=s.data.indexOf(ot,h+1))!==-1;)l.push({type:7,index:r}),h+=ot.length-1}r++}}static createElement(t,i){const n=pt.createElement("template");return n.innerHTML=t,n}}function Ot(e,t,i=e,n){if(t===ze)return t;let s=n!==void 0?i._$Co?.[n]:i._$Cl;const r=Rt(t)?void 0:t._$litDirective$;return s?.constructor!==r&&(s?._$AO?.(!1),r===void 0?s=void 0:(s=new r(e),s._$AT(e,i,n)),n!==void 0?(i._$Co??=[])[n]=s:i._$Cl=s),s!==void 0&&(t=Ot(e,s._$AS(e,t.values),s,n)),t}class yd{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:n}=this._$AD,s=(t?.creationScope??pt).importNode(i,!0);yt.currentNode=s;let r=yt.nextNode(),a=0,o=0,l=n[0];for(;l!==void 0;){if(a===l.index){let d;l.type===2?d=new Et(r,r.nextSibling,this,t):l.type===1?d=new l.ctor(r,l.name,l.strings,this,t):l.type===6&&(d=new Dd(r,this,t)),this._$AV.push(d),l=n[++o]}a!==l?.index&&(r=yt.nextNode(),a++)}return yt.currentNode=pt,s}p(t){let i=0;for(const n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,i),i+=n.strings.length-2):n._$AI(t[i])),i++}}class Et{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,n,s){this.type=2,this._$AH=_,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=n,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return i!==void 0&&t?.nodeType===11&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=Ot(this,t,i),Rt(t)?t===_||t==null||t===""?(this._$AH!==_&&this._$AR(),this._$AH=_):t!==this._$AH&&t!==ze&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):hd(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==_&&Rt(this._$AH)?this._$AA.nextSibling.data=t:this.T(pt.createTextNode(t)),this._$AH=t}$(t){const{values:i,_$litType$:n}=t,s=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=jt.createElement(is(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===s)this._$AH.p(i);else{const r=new yd(s,this),a=r.u(this.options);r.p(i),this.T(a),this._$AH=r}}_$AC(t){let i=ts.get(t.strings);return i===void 0&&ts.set(t.strings,i=new jt(t)),i}k(t){Ti(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let n,s=0;for(const r of t)s===i.length?i.push(n=new Et(this.O(Ft()),this.O(Ft()),this,this.options)):n=i[s],n._$AI(r),s++;s<i.length&&(this._$AR(n&&n._$AB.nextSibling,s),i.length=s)}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);t!==this._$AB;){const n=Hn(t).nextSibling;Hn(t).remove(),t=n}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}}class ci{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,n,s,r){this.type=1,this._$AH=_,this._$AN=void 0,this.element=t,this.name=i,this._$AM=s,this.options=r,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=_}_$AI(t,i=this,n,s){const r=this.strings;let a=!1;if(r===void 0)t=Ot(this,t,i,0),a=!Rt(t)||t!==this._$AH&&t!==ze,a&&(this._$AH=t);else{const o=t;let l,d;for(t=r[0],l=0;l<r.length-1;l++)d=Ot(this,o[n+l],i,l),d===ze&&(d=this._$AH[l]),a||=!Rt(d)||d!==this._$AH[l],d===_?t=_:t!==_&&(t+=(d??"")+r[l+1]),this._$AH[l]=d}a&&!s&&this.j(t)}j(t){t===_?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class fd extends ci{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===_?void 0:t}}class gd extends ci{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==_)}}class bd extends ci{constructor(t,i,n,s,r){super(t,i,n,s,r),this.type=5}_$AI(t,i=this){if((t=Ot(this,t,i,0)??_)===ze)return;const n=this._$AH,s=t===_&&n!==_||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,r=t!==_&&(n===_||s);s&&this.element.removeEventListener(this.name,this,n),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Dd{constructor(t,i,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){Ot(this,t)}}const vd={I:Et},wd=Ci.litHtmlPolyfillSupport;wd?.(jt,Et),(Ci.litHtmlVersions??=[]).push("3.3.2");const _d=(e,t,i)=>{const n=i?.renderBefore??t;let s=n._$litPart$;if(s===void 0){const r=i?.renderBefore??null;n._$litPart$=s=new Et(t.insertBefore(Ft(),r),r,void 0,i??{})}return s._$AI(e),s};const xi=globalThis;let ee=class extends At{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=_d(i,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return ze}};ee._$litElement$=!0,ee.finalized=!0,xi.litElementHydrateSupport?.({LitElement:ee});const kd=xi.litElementPolyfillSupport;kd?.({LitElement:ee}),(xi.litElementVersions??=[]).push("4.2.2");const ue=e=>(t,i)=>{i!==void 0?i.addInitializer(()=>{customElements.define(e,t)}):customElements.define(e,t)};const $d={attribute:!0,type:String,converter:di,reflect:!1,hasChanged:Ii},Sd=(e=$d,t,i)=>{const{kind:n,metadata:s}=i;let r=globalThis.litPropertyMetadata.get(s);if(r===void 0&&globalThis.litPropertyMetadata.set(s,r=new Map),n==="setter"&&((e=Object.create(e)).wrapped=!0),r.set(i.name,e),n==="accessor"){const{name:a}=i;return{set(o){const l=t.get.call(this);t.set.call(this,o),this.requestUpdate(a,l,e,!0,o)},init(o){return o!==void 0&&this.C(a,void 0,e,o),o}}}if(n==="setter"){const{name:a}=i;return function(o){const l=this[a];t.call(this,o),this.requestUpdate(a,l,e,!0,o)}}throw Error("Unsupported decorator location: "+n)};function u(e){return(t,i)=>typeof i=="object"?Sd(e,t,i):((n,s,r)=>{const a=s.hasOwnProperty(r);return s.constructor.createProperty(r,n),a?Object.getOwnPropertyDescriptor(s,r):void 0})(e,t,i)}function Y(e){return u({...e,state:!0,attribute:!1})}const Ad=(e,t,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(e,t,i),i);function ns(e,t){return(i,n,s)=>{const r=a=>a.renderRoot?.querySelector(e)??null;return Ad(i,n,{get(){return r(this)}})}}const tt={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4},Zt=e=>(...t)=>({_$litDirective$:e,values:t});let qt=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,i,n){this._$Ct=t,this._$AM=i,this._$Ci=n}_$AS(t,i){return this.update(t,i)}update(t,i){return this.render(...i)}};const fe=Zt(class extends qt{constructor(e){if(super(e),e.type!==tt.ATTRIBUTE||e.name!=="class"||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){if(this.st===void 0){this.st=new Set,e.strings!==void 0&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter(n=>n!=="")));for(const n in t)t[n]&&!this.nt?.has(n)&&this.st.add(n);return this.render(t)}const i=e.element.classList;for(const n of this.st)n in t||(i.remove(n),this.st.delete(n));for(const n in t){const s=!!t[n];s===this.st.has(n)||this.nt?.has(n)||(s?(i.add(n),this.st.add(n)):(i.remove(n),this.st.delete(n)))}return ze}});var Od=Object.defineProperty,Ed=Object.getOwnPropertyDescriptor,ft=(e,t,i,n)=>{for(var s=n>1?void 0:n?Ed(t,i):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(s=(n?a(t,i,s):a(s))||s);return n&&s&&Od(t,i,s),s};let at=class extends ee{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.disabled=!1,this.icon=void 0,this.variant="filled",this.iconPosition="left"}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}render(){const e=this.icon,t=this.iconPosition||"left",i={"gui-button-with-icon":!!e,[`gui-button-icon-${t}`]:!0,"gui-button--outlined":this.variant==="outlined","gui-button--link":this.variant==="link"},n=e?v`<span class="gui-widget-icon gui-button-icon ${e}" data-icon=${e}></span>`:_;return v`
|
|
6
6
|
<div class="gui-widget">
|
|
7
7
|
<button
|
|
8
8
|
type="button"
|
|
@@ -17,22 +17,22 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17
17
|
${t==="right"?n:_}
|
|
18
18
|
</button>
|
|
19
19
|
</div>
|
|
20
|
-
`}};ft([u({type:String})],at.prototype,"uid",2),ft([u({type:String})],at.prototype,"label",2),ft([u({type:Boolean})],at.prototype,"disabled",2),ft([u({type:String})],at.prototype,"icon",2),ft([u({type:String})],at.prototype,"variant",2),ft([u({type:String})],at.prototype,"iconPosition",2),at=ft([ue("gui-button")],at),typeof customElements<"u"&&!customElements.get("gui-button")&&customElements.define("gui-button",at);function Id(e){const t=e.widget,{uid:i,templateData:n,onClick:s}=x.useActionWidget(t);return y.jsx("div",{className:"gui-button gui-field",style:{flex:n.size},children:y.jsx("gui-button",{uid:i,label:n.label,disabled:n.disabled,variant:n.variant,icon:n.icon,iconPosition:n.iconPosition,onClick:s})})}const Cd=Object.freeze(Object.defineProperty({__proto__:null,Button:Id},Symbol.toStringTag,{value:"Module"})),Td={aa:{firstDay:7,weekend:[6,7],minimalDays:1},"aa-DJ":{firstDay:6,weekend:[6,7],minimalDays:1},"aa-ER":{firstDay:1,weekend:[6,7],minimalDays:1},ab:{firstDay:1,weekend:[6,7],minimalDays:1},af:{firstDay:7,weekend:[6,7],minimalDays:1},"af-NA":{firstDay:1,weekend:[6,7],minimalDays:1},agq:{firstDay:1,weekend:[6,7],minimalDays:1},ak:{firstDay:1,weekend:[6,7],minimalDays:1},am:{firstDay:7,weekend:[6,7],minimalDays:1},an:{firstDay:1,weekend:[6,7],minimalDays:4},ann:{firstDay:1,weekend:[6,7],minimalDays:1},apc:{firstDay:6,weekend:[5,6],minimalDays:1},ar:{firstDay:6,weekend:[5,6],minimalDays:1},"ar-AE":{firstDay:6,weekend:[6,7],minimalDays:1},"ar-BH":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-DJ":{firstDay:6,weekend:[6,7],minimalDays:1},"ar-DZ":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-EG":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-EH":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-ER":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-IL":{firstDay:7,weekend:[5,6],minimalDays:1},"ar-IQ":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-JO":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-KM":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-KW":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-LB":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-LY":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-MA":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-MR":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-OM":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-PS":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-QA":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-SA":{firstDay:7,weekend:[5,6],minimalDays:1},"ar-SD":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-SO":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-SS":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-SY":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-TD":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-TN":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-YE":{firstDay:7,weekend:[5,6],minimalDays:1},arn:{firstDay:1,weekend:[6,7],minimalDays:1},as:{firstDay:7,weekend:[7],minimalDays:1},asa:{firstDay:1,weekend:[6,7],minimalDays:1},ast:{firstDay:1,weekend:[6,7],minimalDays:4},az:{firstDay:1,weekend:[6,7],minimalDays:1},"az-Arab":{firstDay:6,weekend:[5],minimalDays:1},"az-Arab-IQ":{firstDay:6,weekend:[5,6],minimalDays:1},"az-Arab-TR":{firstDay:1,weekend:[6,7],minimalDays:1},"az-Cyrl":{firstDay:1,weekend:[6,7],minimalDays:1},"az-Latn":{firstDay:1,weekend:[6,7],minimalDays:1},ba:{firstDay:1,weekend:[6,7],minimalDays:4},bal:{firstDay:7,weekend:[6,7],minimalDays:1},"bal-Arab":{firstDay:7,weekend:[6,7],minimalDays:1},"bal-Latn":{firstDay:7,weekend:[6,7],minimalDays:1},bas:{firstDay:1,weekend:[6,7],minimalDays:1},be:{firstDay:1,weekend:[6,7],minimalDays:1},"be-tarask":{firstDay:1,weekend:[6,7],minimalDays:1},bem:{firstDay:1,weekend:[6,7],minimalDays:1},bew:{firstDay:7,weekend:[6,7],minimalDays:1},bez:{firstDay:1,weekend:[6,7],minimalDays:1},bg:{firstDay:1,weekend:[6,7],minimalDays:4},bgc:{firstDay:7,weekend:[7],minimalDays:1},bgn:{firstDay:7,weekend:[6,7],minimalDays:1},"bgn-AE":{firstDay:6,weekend:[6,7],minimalDays:1},"bgn-AF":{firstDay:6,weekend:[4,5],minimalDays:1},"bgn-IR":{firstDay:6,weekend:[5],minimalDays:1},"bgn-OM":{firstDay:6,weekend:[5,6],minimalDays:1},bho:{firstDay:7,weekend:[7],minimalDays:1},blo:{firstDay:1,weekend:[6,7],minimalDays:1},blt:{firstDay:1,weekend:[6,7],minimalDays:1},bm:{firstDay:1,weekend:[6,7],minimalDays:1},"bm-Nkoo":{firstDay:1,weekend:[6,7],minimalDays:1},bn:{firstDay:7,weekend:[6,7],minimalDays:1},"bn-IN":{firstDay:7,weekend:[7],minimalDays:1},bo:{firstDay:1,weekend:[6,7],minimalDays:1},"bo-IN":{firstDay:7,weekend:[7],minimalDays:1},br:{firstDay:1,weekend:[6,7],minimalDays:4},brx:{firstDay:7,weekend:[7],minimalDays:1},bs:{firstDay:1,weekend:[6,7],minimalDays:1},"bs-Cyrl":{firstDay:1,weekend:[6,7],minimalDays:1},"bs-Latn":{firstDay:1,weekend:[6,7],minimalDays:1},bss:{firstDay:1,weekend:[6,7],minimalDays:1},byn:{firstDay:1,weekend:[6,7],minimalDays:1},ca:{firstDay:1,weekend:[6,7],minimalDays:4},"ca-AD":{firstDay:1,weekend:[6,7],minimalDays:4},"ca-ES-valencia":{firstDay:1,weekend:[6,7],minimalDays:4},"ca-FR":{firstDay:1,weekend:[6,7],minimalDays:4},"ca-IT":{firstDay:1,weekend:[6,7],minimalDays:4},cad:{firstDay:7,weekend:[6,7],minimalDays:1},cch:{firstDay:1,weekend:[6,7],minimalDays:1},ccp:{firstDay:7,weekend:[6,7],minimalDays:1},"ccp-IN":{firstDay:7,weekend:[7],minimalDays:1},ce:{firstDay:1,weekend:[6,7],minimalDays:4},ceb:{firstDay:7,weekend:[6,7],minimalDays:1},cgg:{firstDay:1,weekend:[7],minimalDays:1},cho:{firstDay:7,weekend:[6,7],minimalDays:1},chr:{firstDay:7,weekend:[6,7],minimalDays:1},cic:{firstDay:7,weekend:[6,7],minimalDays:1},ckb:{firstDay:6,weekend:[5,6],minimalDays:1},"ckb-IR":{firstDay:6,weekend:[5],minimalDays:1},co:{firstDay:1,weekend:[6,7],minimalDays:4},cs:{firstDay:1,weekend:[6,7],minimalDays:4},csw:{firstDay:7,weekend:[6,7],minimalDays:1},cu:{firstDay:1,weekend:[6,7],minimalDays:4},cv:{firstDay:1,weekend:[6,7],minimalDays:4},cy:{firstDay:1,weekend:[6,7],minimalDays:4},da:{firstDay:1,weekend:[6,7],minimalDays:4},"da-GL":{firstDay:1,weekend:[6,7],minimalDays:1},dav:{firstDay:7,weekend:[6,7],minimalDays:1},de:{firstDay:1,weekend:[6,7],minimalDays:4},"de-AT":{firstDay:1,weekend:[6,7],minimalDays:4},"de-BE":{firstDay:1,weekend:[6,7],minimalDays:4},"de-CH":{firstDay:1,weekend:[6,7],minimalDays:4},"de-IT":{firstDay:1,weekend:[6,7],minimalDays:4},"de-LI":{firstDay:1,weekend:[6,7],minimalDays:4},"de-LU":{firstDay:1,weekend:[6,7],minimalDays:4},dje:{firstDay:1,weekend:[6,7],minimalDays:1},doi:{firstDay:7,weekend:[7],minimalDays:1},dsb:{firstDay:1,weekend:[6,7],minimalDays:4},dua:{firstDay:1,weekend:[6,7],minimalDays:1},dv:{firstDay:5,weekend:[6,7],minimalDays:1},dyo:{firstDay:1,weekend:[6,7],minimalDays:1},dz:{firstDay:7,weekend:[6,7],minimalDays:1},ebu:{firstDay:7,weekend:[6,7],minimalDays:1},ee:{firstDay:1,weekend:[6,7],minimalDays:1},"ee-TG":{firstDay:1,weekend:[6,7],minimalDays:1},el:{firstDay:1,weekend:[6,7],minimalDays:4},"el-CY":{firstDay:1,weekend:[6,7],minimalDays:1},"el-polyton":{firstDay:1,weekend:[6,7],minimalDays:4},en:{firstDay:7,weekend:[6,7],minimalDays:1},"en-001":{firstDay:1,weekend:[6,7],minimalDays:1},"en-150":{firstDay:1,weekend:[6,7],minimalDays:1},"en-AE":{firstDay:6,weekend:[6,7],minimalDays:1},"en-AG":{firstDay:7,weekend:[6,7],minimalDays:1},"en-AI":{firstDay:1,weekend:[6,7],minimalDays:1},"en-AS":{firstDay:7,weekend:[6,7],minimalDays:1},"en-AT":{firstDay:1,weekend:[6,7],minimalDays:4},"en-AU":{firstDay:1,weekend:[6,7],minimalDays:1},"en-BB":{firstDay:1,weekend:[6,7],minimalDays:1},"en-BE":{firstDay:1,weekend:[6,7],minimalDays:4},"en-BI":{firstDay:1,weekend:[6,7],minimalDays:1},"en-BM":{firstDay:1,weekend:[6,7],minimalDays:1},"en-BS":{firstDay:7,weekend:[6,7],minimalDays:1},"en-BW":{firstDay:7,weekend:[6,7],minimalDays:1},"en-BZ":{firstDay:7,weekend:[6,7],minimalDays:1},"en-CA":{firstDay:7,weekend:[6,7],minimalDays:1},"en-CC":{firstDay:1,weekend:[6,7],minimalDays:1},"en-CH":{firstDay:1,weekend:[6,7],minimalDays:4},"en-CK":{firstDay:1,weekend:[6,7],minimalDays:1},"en-CM":{firstDay:1,weekend:[6,7],minimalDays:1},"en-CX":{firstDay:1,weekend:[6,7],minimalDays:1},"en-CY":{firstDay:1,weekend:[6,7],minimalDays:1},"en-DE":{firstDay:1,weekend:[6,7],minimalDays:4},"en-DG":{firstDay:1,weekend:[6,7],minimalDays:1},"en-DK":{firstDay:1,weekend:[6,7],minimalDays:4},"en-DM":{firstDay:7,weekend:[6,7],minimalDays:1},"en-Dsrt":{firstDay:7,weekend:[6,7],minimalDays:1},"en-ER":{firstDay:1,weekend:[6,7],minimalDays:1},"en-FI":{firstDay:1,weekend:[6,7],minimalDays:4},"en-FJ":{firstDay:1,weekend:[6,7],minimalDays:4},"en-FK":{firstDay:1,weekend:[6,7],minimalDays:1},"en-FM":{firstDay:1,weekend:[6,7],minimalDays:1},"en-GB":{firstDay:1,weekend:[6,7],minimalDays:4},"en-GD":{firstDay:1,weekend:[6,7],minimalDays:1},"en-GG":{firstDay:1,weekend:[6,7],minimalDays:4},"en-GH":{firstDay:1,weekend:[6,7],minimalDays:1},"en-GI":{firstDay:1,weekend:[6,7],minimalDays:4},"en-GM":{firstDay:1,weekend:[6,7],minimalDays:1},"en-GU":{firstDay:7,weekend:[6,7],minimalDays:1},"en-GY":{firstDay:1,weekend:[6,7],minimalDays:1},"en-HK":{firstDay:7,weekend:[6,7],minimalDays:1},"en-ID":{firstDay:7,weekend:[6,7],minimalDays:1},"en-IE":{firstDay:1,weekend:[6,7],minimalDays:4},"en-IL":{firstDay:7,weekend:[5,6],minimalDays:1},"en-IM":{firstDay:1,weekend:[6,7],minimalDays:4},"en-IN":{firstDay:7,weekend:[7],minimalDays:1},"en-IO":{firstDay:1,weekend:[6,7],minimalDays:1},"en-JE":{firstDay:1,weekend:[6,7],minimalDays:4},"en-JM":{firstDay:7,weekend:[6,7],minimalDays:1},"en-KE":{firstDay:7,weekend:[6,7],minimalDays:1},"en-KI":{firstDay:1,weekend:[6,7],minimalDays:1},"en-KN":{firstDay:1,weekend:[6,7],minimalDays:1},"en-KY":{firstDay:1,weekend:[6,7],minimalDays:1},"en-LC":{firstDay:1,weekend:[6,7],minimalDays:1},"en-LR":{firstDay:1,weekend:[6,7],minimalDays:1},"en-LS":{firstDay:1,weekend:[6,7],minimalDays:1},"en-MG":{firstDay:1,weekend:[6,7],minimalDays:1},"en-MH":{firstDay:7,weekend:[6,7],minimalDays:1},"en-MO":{firstDay:7,weekend:[6,7],minimalDays:1},"en-MP":{firstDay:1,weekend:[6,7],minimalDays:1},"en-MS":{firstDay:1,weekend:[6,7],minimalDays:1},"en-MT":{firstDay:7,weekend:[6,7],minimalDays:1},"en-MU":{firstDay:1,weekend:[6,7],minimalDays:1},"en-MV":{firstDay:5,weekend:[6,7],minimalDays:1},"en-MW":{firstDay:1,weekend:[6,7],minimalDays:1},"en-MY":{firstDay:1,weekend:[6,7],minimalDays:1},"en-NA":{firstDay:1,weekend:[6,7],minimalDays:1},"en-NF":{firstDay:1,weekend:[6,7],minimalDays:1},"en-NG":{firstDay:1,weekend:[6,7],minimalDays:1},"en-NL":{firstDay:1,weekend:[6,7],minimalDays:4},"en-NR":{firstDay:1,weekend:[6,7],minimalDays:1},"en-NU":{firstDay:1,weekend:[6,7],minimalDays:1},"en-NZ":{firstDay:1,weekend:[6,7],minimalDays:1},"en-PG":{firstDay:1,weekend:[6,7],minimalDays:1},"en-PH":{firstDay:7,weekend:[6,7],minimalDays:1},"en-PK":{firstDay:7,weekend:[6,7],minimalDays:1},"en-PN":{firstDay:1,weekend:[6,7],minimalDays:1},"en-PR":{firstDay:7,weekend:[6,7],minimalDays:1},"en-PW":{firstDay:1,weekend:[6,7],minimalDays:1},"en-RW":{firstDay:1,weekend:[6,7],minimalDays:1},"en-SB":{firstDay:1,weekend:[6,7],minimalDays:1},"en-SC":{firstDay:1,weekend:[6,7],minimalDays:1},"en-SD":{firstDay:6,weekend:[5,6],minimalDays:1},"en-SE":{firstDay:1,weekend:[6,7],minimalDays:4},"en-SG":{firstDay:7,weekend:[6,7],minimalDays:1},"en-SH":{firstDay:1,weekend:[6,7],minimalDays:1},"en-SI":{firstDay:1,weekend:[6,7],minimalDays:1},"en-SL":{firstDay:1,weekend:[6,7],minimalDays:1},"en-SS":{firstDay:1,weekend:[6,7],minimalDays:1},"en-SX":{firstDay:1,weekend:[6,7],minimalDays:1},"en-SZ":{firstDay:1,weekend:[6,7],minimalDays:1},"en-Shaw":{firstDay:1,weekend:[6,7],minimalDays:4},"en-TC":{firstDay:1,weekend:[6,7],minimalDays:1},"en-TK":{firstDay:1,weekend:[6,7],minimalDays:1},"en-TO":{firstDay:1,weekend:[6,7],minimalDays:1},"en-TT":{firstDay:7,weekend:[6,7],minimalDays:1},"en-TV":{firstDay:1,weekend:[6,7],minimalDays:1},"en-TZ":{firstDay:1,weekend:[6,7],minimalDays:1},"en-UG":{firstDay:1,weekend:[7],minimalDays:1},"en-UM":{firstDay:7,weekend:[6,7],minimalDays:1},"en-VC":{firstDay:1,weekend:[6,7],minimalDays:1},"en-VG":{firstDay:1,weekend:[6,7],minimalDays:1},"en-VI":{firstDay:7,weekend:[6,7],minimalDays:1},"en-VU":{firstDay:1,weekend:[6,7],minimalDays:1},"en-WS":{firstDay:7,weekend:[6,7],minimalDays:1},"en-ZA":{firstDay:7,weekend:[6,7],minimalDays:1},"en-ZM":{firstDay:1,weekend:[6,7],minimalDays:1},"en-ZW":{firstDay:7,weekend:[6,7],minimalDays:1},eo:{firstDay:1,weekend:[6,7],minimalDays:1},es:{firstDay:1,weekend:[6,7],minimalDays:4},"es-419":{firstDay:1,weekend:[6,7],minimalDays:1},"es-AR":{firstDay:1,weekend:[6,7],minimalDays:1},"es-BO":{firstDay:1,weekend:[6,7],minimalDays:1},"es-BR":{firstDay:7,weekend:[6,7],minimalDays:1},"es-BZ":{firstDay:7,weekend:[6,7],minimalDays:1},"es-CL":{firstDay:1,weekend:[6,7],minimalDays:1},"es-CO":{firstDay:7,weekend:[6,7],minimalDays:1},"es-CR":{firstDay:1,weekend:[6,7],minimalDays:1},"es-CU":{firstDay:1,weekend:[6,7],minimalDays:1},"es-DO":{firstDay:7,weekend:[6,7],minimalDays:1},"es-EA":{firstDay:1,weekend:[6,7],minimalDays:1},"es-EC":{firstDay:1,weekend:[6,7],minimalDays:1},"es-GQ":{firstDay:1,weekend:[6,7],minimalDays:1},"es-GT":{firstDay:7,weekend:[6,7],minimalDays:1},"es-HN":{firstDay:7,weekend:[6,7],minimalDays:1},"es-IC":{firstDay:1,weekend:[6,7],minimalDays:1},"es-MX":{firstDay:7,weekend:[6,7],minimalDays:1},"es-NI":{firstDay:7,weekend:[6,7],minimalDays:1},"es-PA":{firstDay:7,weekend:[6,7],minimalDays:1},"es-PE":{firstDay:7,weekend:[6,7],minimalDays:1},"es-PH":{firstDay:7,weekend:[6,7],minimalDays:1},"es-PR":{firstDay:7,weekend:[6,7],minimalDays:1},"es-PY":{firstDay:7,weekend:[6,7],minimalDays:1},"es-SV":{firstDay:7,weekend:[6,7],minimalDays:1},"es-US":{firstDay:7,weekend:[6,7],minimalDays:1},"es-UY":{firstDay:1,weekend:[6,7],minimalDays:1},"es-VE":{firstDay:7,weekend:[6,7],minimalDays:1},et:{firstDay:1,weekend:[6,7],minimalDays:4},eu:{firstDay:1,weekend:[6,7],minimalDays:4},ewo:{firstDay:1,weekend:[6,7],minimalDays:1},fa:{firstDay:6,weekend:[5],minimalDays:1},"fa-AF":{firstDay:6,weekend:[4,5],minimalDays:1},ff:{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-BF":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-CM":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-GH":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-GM":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-GW":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-LR":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-MR":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-NE":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-NG":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-SL":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-SN":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-BF":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-CM":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-GH":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-GM":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-GN":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-GW":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-LR":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-MR":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-NE":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-NG":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-SL":{firstDay:1,weekend:[6,7],minimalDays:1},fi:{firstDay:1,weekend:[6,7],minimalDays:4},fil:{firstDay:7,weekend:[6,7],minimalDays:1},fo:{firstDay:1,weekend:[6,7],minimalDays:4},"fo-DK":{firstDay:1,weekend:[6,7],minimalDays:4},fr:{firstDay:1,weekend:[6,7],minimalDays:4},"fr-BE":{firstDay:1,weekend:[6,7],minimalDays:4},"fr-BF":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-BI":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-BJ":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-BL":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-CA":{firstDay:7,weekend:[6,7],minimalDays:1},"fr-CD":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-CF":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-CG":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-CH":{firstDay:1,weekend:[6,7],minimalDays:4},"fr-CI":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-CM":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-DJ":{firstDay:6,weekend:[6,7],minimalDays:1},"fr-DZ":{firstDay:6,weekend:[5,6],minimalDays:1},"fr-GA":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-GF":{firstDay:1,weekend:[6,7],minimalDays:4},"fr-GN":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-GP":{firstDay:1,weekend:[6,7],minimalDays:4},"fr-GQ":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-HT":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-KM":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-LU":{firstDay:1,weekend:[6,7],minimalDays:4},"fr-MA":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-MC":{firstDay:1,weekend:[6,7],minimalDays:4},"fr-MF":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-MG":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-ML":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-MQ":{firstDay:1,weekend:[6,7],minimalDays:4},"fr-MR":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-MU":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-NC":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-NE":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-PF":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-PM":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-RE":{firstDay:1,weekend:[6,7],minimalDays:4},"fr-RW":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-SC":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-SN":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-SY":{firstDay:6,weekend:[5,6],minimalDays:1},"fr-TD":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-TG":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-TN":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-VU":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-WF":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-YT":{firstDay:1,weekend:[6,7],minimalDays:1},frr:{firstDay:1,weekend:[6,7],minimalDays:4},fur:{firstDay:1,weekend:[6,7],minimalDays:4},fy:{firstDay:1,weekend:[6,7],minimalDays:4},ga:{firstDay:1,weekend:[6,7],minimalDays:4},"ga-GB":{firstDay:1,weekend:[6,7],minimalDays:4},gaa:{firstDay:1,weekend:[6,7],minimalDays:1},gd:{firstDay:1,weekend:[6,7],minimalDays:4},gez:{firstDay:7,weekend:[6,7],minimalDays:1},"gez-ER":{firstDay:1,weekend:[6,7],minimalDays:1},gl:{firstDay:1,weekend:[6,7],minimalDays:4},gn:{firstDay:7,weekend:[6,7],minimalDays:1},gsw:{firstDay:1,weekend:[6,7],minimalDays:4},"gsw-FR":{firstDay:1,weekend:[6,7],minimalDays:4},"gsw-LI":{firstDay:1,weekend:[6,7],minimalDays:4},gu:{firstDay:7,weekend:[7],minimalDays:1},guz:{firstDay:7,weekend:[6,7],minimalDays:1},gv:{firstDay:1,weekend:[6,7],minimalDays:4},ha:{firstDay:1,weekend:[6,7],minimalDays:1},"ha-Arab":{firstDay:1,weekend:[6,7],minimalDays:1},"ha-Arab-SD":{firstDay:6,weekend:[5,6],minimalDays:1},"ha-GH":{firstDay:1,weekend:[6,7],minimalDays:1},"ha-NE":{firstDay:1,weekend:[6,7],minimalDays:1},haw:{firstDay:7,weekend:[6,7],minimalDays:1},he:{firstDay:7,weekend:[5,6],minimalDays:1},hi:{firstDay:7,weekend:[7],minimalDays:1},"hi-Latn":{firstDay:7,weekend:[7],minimalDays:1},hnj:{firstDay:7,weekend:[6,7],minimalDays:1},"hnj-Hmnp":{firstDay:7,weekend:[6,7],minimalDays:1},hr:{firstDay:1,weekend:[6,7],minimalDays:1},"hr-BA":{firstDay:1,weekend:[6,7],minimalDays:1},hsb:{firstDay:1,weekend:[6,7],minimalDays:4},hu:{firstDay:1,weekend:[6,7],minimalDays:4},hy:{firstDay:1,weekend:[6,7],minimalDays:1},ia:{firstDay:1,weekend:[6,7],minimalDays:1},id:{firstDay:7,weekend:[6,7],minimalDays:1},ie:{firstDay:1,weekend:[6,7],minimalDays:4},ig:{firstDay:1,weekend:[6,7],minimalDays:1},ii:{firstDay:1,weekend:[6,7],minimalDays:1},io:{firstDay:1,weekend:[6,7],minimalDays:1},is:{firstDay:1,weekend:[6,7],minimalDays:4},it:{firstDay:1,weekend:[6,7],minimalDays:4},"it-CH":{firstDay:1,weekend:[6,7],minimalDays:4},"it-SM":{firstDay:1,weekend:[6,7],minimalDays:4},"it-VA":{firstDay:1,weekend:[6,7],minimalDays:4},iu:{firstDay:7,weekend:[6,7],minimalDays:1},"iu-Latn":{firstDay:7,weekend:[6,7],minimalDays:1},ja:{firstDay:7,weekend:[6,7],minimalDays:1},jbo:{firstDay:1,weekend:[6,7],minimalDays:1},jgo:{firstDay:1,weekend:[6,7],minimalDays:1},jmc:{firstDay:1,weekend:[6,7],minimalDays:1},jv:{firstDay:7,weekend:[6,7],minimalDays:1},ka:{firstDay:1,weekend:[6,7],minimalDays:1},kab:{firstDay:6,weekend:[5,6],minimalDays:1},kaj:{firstDay:1,weekend:[6,7],minimalDays:1},kam:{firstDay:7,weekend:[6,7],minimalDays:1},kcg:{firstDay:1,weekend:[6,7],minimalDays:1},kde:{firstDay:1,weekend:[6,7],minimalDays:1},kea:{firstDay:1,weekend:[6,7],minimalDays:1},ken:{firstDay:1,weekend:[6,7],minimalDays:1},kgp:{firstDay:7,weekend:[6,7],minimalDays:1},khq:{firstDay:1,weekend:[6,7],minimalDays:1},ki:{firstDay:7,weekend:[6,7],minimalDays:1},kk:{firstDay:1,weekend:[6,7],minimalDays:1},kkj:{firstDay:1,weekend:[6,7],minimalDays:1},kl:{firstDay:1,weekend:[6,7],minimalDays:1},kln:{firstDay:7,weekend:[6,7],minimalDays:1},km:{firstDay:7,weekend:[6,7],minimalDays:1},kn:{firstDay:7,weekend:[7],minimalDays:1},ko:{firstDay:7,weekend:[6,7],minimalDays:1},"ko-CN":{firstDay:1,weekend:[6,7],minimalDays:1},"ko-KP":{firstDay:1,weekend:[6,7],minimalDays:1},kok:{firstDay:7,weekend:[7],minimalDays:1},kpe:{firstDay:1,weekend:[6,7],minimalDays:1},"kpe-GN":{firstDay:1,weekend:[6,7],minimalDays:1},ks:{firstDay:7,weekend:[7],minimalDays:1},"ks-Arab":{firstDay:7,weekend:[7],minimalDays:1},"ks-Deva":{firstDay:7,weekend:[7],minimalDays:1},ksb:{firstDay:1,weekend:[6,7],minimalDays:1},ksf:{firstDay:1,weekend:[6,7],minimalDays:1},ksh:{firstDay:1,weekend:[6,7],minimalDays:4},ku:{firstDay:1,weekend:[6,7],minimalDays:1},kw:{firstDay:1,weekend:[6,7],minimalDays:4},kxv:{firstDay:7,weekend:[7],minimalDays:1},"kxv-Deva":{firstDay:7,weekend:[7],minimalDays:1},"kxv-Latn":{firstDay:7,weekend:[7],minimalDays:1},"kxv-Orya":{firstDay:7,weekend:[7],minimalDays:1},"kxv-Telu":{firstDay:7,weekend:[7],minimalDays:1},ky:{firstDay:1,weekend:[6,7],minimalDays:1},la:{firstDay:1,weekend:[6,7],minimalDays:4},lag:{firstDay:1,weekend:[6,7],minimalDays:1},lb:{firstDay:1,weekend:[6,7],minimalDays:4},lg:{firstDay:1,weekend:[7],minimalDays:1},lij:{firstDay:1,weekend:[6,7],minimalDays:4},lkt:{firstDay:7,weekend:[6,7],minimalDays:1},lmo:{firstDay:1,weekend:[6,7],minimalDays:4},ln:{firstDay:1,weekend:[6,7],minimalDays:1},"ln-AO":{firstDay:1,weekend:[6,7],minimalDays:1},"ln-CF":{firstDay:1,weekend:[6,7],minimalDays:1},"ln-CG":{firstDay:1,weekend:[6,7],minimalDays:1},lo:{firstDay:7,weekend:[6,7],minimalDays:1},lrc:{firstDay:6,weekend:[5],minimalDays:1},"lrc-IQ":{firstDay:6,weekend:[5,6],minimalDays:1},lt:{firstDay:1,weekend:[6,7],minimalDays:4},lu:{firstDay:1,weekend:[6,7],minimalDays:1},luo:{firstDay:7,weekend:[6,7],minimalDays:1},luy:{firstDay:7,weekend:[6,7],minimalDays:1},lv:{firstDay:1,weekend:[6,7],minimalDays:1},mai:{firstDay:7,weekend:[7],minimalDays:1},mas:{firstDay:7,weekend:[6,7],minimalDays:1},"mas-TZ":{firstDay:1,weekend:[6,7],minimalDays:1},mdf:{firstDay:1,weekend:[6,7],minimalDays:4},mer:{firstDay:7,weekend:[6,7],minimalDays:1},mfe:{firstDay:1,weekend:[6,7],minimalDays:1},mg:{firstDay:1,weekend:[6,7],minimalDays:1},mgh:{firstDay:7,weekend:[6,7],minimalDays:1},mgo:{firstDay:1,weekend:[6,7],minimalDays:1},mi:{firstDay:1,weekend:[6,7],minimalDays:1},mic:{firstDay:7,weekend:[6,7],minimalDays:1},mk:{firstDay:1,weekend:[6,7],minimalDays:1},ml:{firstDay:7,weekend:[7],minimalDays:1},mn:{firstDay:1,weekend:[6,7],minimalDays:1},"mn-Mong":{firstDay:1,weekend:[6,7],minimalDays:1},"mn-Mong-MN":{firstDay:1,weekend:[6,7],minimalDays:1},mni:{firstDay:7,weekend:[7],minimalDays:1},"mni-Beng":{firstDay:7,weekend:[7],minimalDays:1},"mni-Mtei":{firstDay:7,weekend:[7],minimalDays:1},moh:{firstDay:7,weekend:[6,7],minimalDays:1},mr:{firstDay:7,weekend:[7],minimalDays:1},ms:{firstDay:1,weekend:[6,7],minimalDays:1},"ms-Arab":{firstDay:1,weekend:[6,7],minimalDays:1},"ms-Arab-BN":{firstDay:1,weekend:[6,7],minimalDays:1},"ms-BN":{firstDay:1,weekend:[6,7],minimalDays:1},"ms-ID":{firstDay:7,weekend:[6,7],minimalDays:1},"ms-SG":{firstDay:7,weekend:[6,7],minimalDays:1},mt:{firstDay:7,weekend:[6,7],minimalDays:1},mua:{firstDay:1,weekend:[6,7],minimalDays:1},mus:{firstDay:7,weekend:[6,7],minimalDays:1},my:{firstDay:7,weekend:[6,7],minimalDays:1},myv:{firstDay:1,weekend:[6,7],minimalDays:4},mzn:{firstDay:6,weekend:[5],minimalDays:1},naq:{firstDay:1,weekend:[6,7],minimalDays:1},nb:{firstDay:1,weekend:[6,7],minimalDays:4},"nb-SJ":{firstDay:1,weekend:[6,7],minimalDays:4},nd:{firstDay:7,weekend:[6,7],minimalDays:1},nds:{firstDay:1,weekend:[6,7],minimalDays:4},"nds-NL":{firstDay:1,weekend:[6,7],minimalDays:4},ne:{firstDay:7,weekend:[6,7],minimalDays:1},"ne-IN":{firstDay:7,weekend:[7],minimalDays:1},nl:{firstDay:1,weekend:[6,7],minimalDays:4},"nl-AW":{firstDay:1,weekend:[6,7],minimalDays:1},"nl-BE":{firstDay:1,weekend:[6,7],minimalDays:4},"nl-BQ":{firstDay:1,weekend:[6,7],minimalDays:1},"nl-CW":{firstDay:1,weekend:[6,7],minimalDays:1},"nl-SR":{firstDay:1,weekend:[6,7],minimalDays:1},"nl-SX":{firstDay:1,weekend:[6,7],minimalDays:1},nmg:{firstDay:1,weekend:[6,7],minimalDays:1},nn:{firstDay:1,weekend:[6,7],minimalDays:4},nnh:{firstDay:1,weekend:[6,7],minimalDays:1},no:{firstDay:1,weekend:[6,7],minimalDays:4},nqo:{firstDay:1,weekend:[6,7],minimalDays:1},nr:{firstDay:7,weekend:[6,7],minimalDays:1},nso:{firstDay:7,weekend:[6,7],minimalDays:1},nus:{firstDay:1,weekend:[6,7],minimalDays:1},nv:{firstDay:7,weekend:[6,7],minimalDays:1},ny:{firstDay:1,weekend:[6,7],minimalDays:1},nyn:{firstDay:1,weekend:[7],minimalDays:1},oc:{firstDay:1,weekend:[6,7],minimalDays:4},"oc-ES":{firstDay:1,weekend:[6,7],minimalDays:4},om:{firstDay:7,weekend:[6,7],minimalDays:1},"om-KE":{firstDay:7,weekend:[6,7],minimalDays:1},or:{firstDay:7,weekend:[7],minimalDays:1},os:{firstDay:1,weekend:[6,7],minimalDays:1},"os-RU":{firstDay:1,weekend:[6,7],minimalDays:4},osa:{firstDay:7,weekend:[6,7],minimalDays:1},pa:{firstDay:7,weekend:[7],minimalDays:1},"pa-Arab":{firstDay:7,weekend:[6,7],minimalDays:1},"pa-Guru":{firstDay:7,weekend:[7],minimalDays:1},pap:{firstDay:1,weekend:[6,7],minimalDays:1},"pap-AW":{firstDay:1,weekend:[6,7],minimalDays:1},pcm:{firstDay:1,weekend:[6,7],minimalDays:1},pis:{firstDay:1,weekend:[6,7],minimalDays:1},pl:{firstDay:1,weekend:[6,7],minimalDays:4},prg:{firstDay:1,weekend:[6,7],minimalDays:4},ps:{firstDay:6,weekend:[4,5],minimalDays:1},"ps-PK":{firstDay:7,weekend:[6,7],minimalDays:1},pt:{firstDay:7,weekend:[6,7],minimalDays:1},"pt-AO":{firstDay:1,weekend:[6,7],minimalDays:1},"pt-CH":{firstDay:1,weekend:[6,7],minimalDays:4},"pt-CV":{firstDay:1,weekend:[6,7],minimalDays:1},"pt-GQ":{firstDay:1,weekend:[6,7],minimalDays:1},"pt-GW":{firstDay:1,weekend:[6,7],minimalDays:1},"pt-LU":{firstDay:1,weekend:[6,7],minimalDays:4},"pt-MO":{firstDay:7,weekend:[6,7],minimalDays:1},"pt-MZ":{firstDay:7,weekend:[6,7],minimalDays:1},"pt-PT":{firstDay:7,weekend:[6,7],minimalDays:4},"pt-ST":{firstDay:1,weekend:[6,7],minimalDays:1},"pt-TL":{firstDay:1,weekend:[6,7],minimalDays:1},qu:{firstDay:7,weekend:[6,7],minimalDays:1},"qu-BO":{firstDay:1,weekend:[6,7],minimalDays:1},"qu-EC":{firstDay:1,weekend:[6,7],minimalDays:1},quc:{firstDay:7,weekend:[6,7],minimalDays:1},raj:{firstDay:7,weekend:[7],minimalDays:1},rhg:{firstDay:7,weekend:[6,7],minimalDays:1},"rhg-Rohg":{firstDay:7,weekend:[6,7],minimalDays:1},"rhg-Rohg-BD":{firstDay:7,weekend:[6,7],minimalDays:1},rif:{firstDay:1,weekend:[6,7],minimalDays:1},rm:{firstDay:1,weekend:[6,7],minimalDays:4},rn:{firstDay:1,weekend:[6,7],minimalDays:1},ro:{firstDay:1,weekend:[6,7],minimalDays:1},"ro-MD":{firstDay:1,weekend:[6,7],minimalDays:1},rof:{firstDay:1,weekend:[6,7],minimalDays:1},ru:{firstDay:1,weekend:[6,7],minimalDays:4},"ru-BY":{firstDay:1,weekend:[6,7],minimalDays:1},"ru-KG":{firstDay:1,weekend:[6,7],minimalDays:1},"ru-KZ":{firstDay:1,weekend:[6,7],minimalDays:1},"ru-MD":{firstDay:1,weekend:[6,7],minimalDays:1},"ru-UA":{firstDay:1,weekend:[6,7],minimalDays:1},rw:{firstDay:1,weekend:[6,7],minimalDays:1},rwk:{firstDay:1,weekend:[6,7],minimalDays:1},sa:{firstDay:7,weekend:[7],minimalDays:1},sah:{firstDay:1,weekend:[6,7],minimalDays:4},saq:{firstDay:7,weekend:[6,7],minimalDays:1},sat:{firstDay:7,weekend:[7],minimalDays:1},"sat-Deva":{firstDay:7,weekend:[7],minimalDays:1},"sat-Olck":{firstDay:7,weekend:[7],minimalDays:1},sbp:{firstDay:1,weekend:[6,7],minimalDays:1},sc:{firstDay:1,weekend:[6,7],minimalDays:4},scn:{firstDay:1,weekend:[6,7],minimalDays:4},sd:{firstDay:7,weekend:[6,7],minimalDays:1},"sd-Arab":{firstDay:7,weekend:[6,7],minimalDays:1},"sd-Deva":{firstDay:7,weekend:[7],minimalDays:1},sdh:{firstDay:6,weekend:[5],minimalDays:1},"sdh-IQ":{firstDay:6,weekend:[5,6],minimalDays:1},se:{firstDay:1,weekend:[6,7],minimalDays:4},"se-FI":{firstDay:1,weekend:[6,7],minimalDays:4},"se-SE":{firstDay:1,weekend:[6,7],minimalDays:4},seh:{firstDay:7,weekend:[6,7],minimalDays:1},ses:{firstDay:1,weekend:[6,7],minimalDays:1},sg:{firstDay:1,weekend:[6,7],minimalDays:1},shi:{firstDay:1,weekend:[6,7],minimalDays:1},"shi-Latn":{firstDay:1,weekend:[6,7],minimalDays:1},"shi-Tfng":{firstDay:1,weekend:[6,7],minimalDays:1},shn:{firstDay:7,weekend:[6,7],minimalDays:1},"shn-TH":{firstDay:7,weekend:[6,7],minimalDays:1},si:{firstDay:1,weekend:[6,7],minimalDays:1},sid:{firstDay:7,weekend:[6,7],minimalDays:1},sk:{firstDay:1,weekend:[6,7],minimalDays:4},skr:{firstDay:7,weekend:[6,7],minimalDays:1},sl:{firstDay:1,weekend:[6,7],minimalDays:1},sma:{firstDay:1,weekend:[6,7],minimalDays:4},"sma-NO":{firstDay:1,weekend:[6,7],minimalDays:4},smj:{firstDay:1,weekend:[6,7],minimalDays:4},"smj-NO":{firstDay:1,weekend:[6,7],minimalDays:4},smn:{firstDay:1,weekend:[6,7],minimalDays:4},sms:{firstDay:1,weekend:[6,7],minimalDays:4},sn:{firstDay:7,weekend:[6,7],minimalDays:1},so:{firstDay:1,weekend:[6,7],minimalDays:1},"so-DJ":{firstDay:6,weekend:[6,7],minimalDays:1},"so-ET":{firstDay:7,weekend:[6,7],minimalDays:1},"so-KE":{firstDay:7,weekend:[6,7],minimalDays:1},sq:{firstDay:1,weekend:[6,7],minimalDays:1},"sq-MK":{firstDay:1,weekend:[6,7],minimalDays:1},"sq-XK":{firstDay:1,weekend:[6,7],minimalDays:1},sr:{firstDay:1,weekend:[6,7],minimalDays:1},"sr-Cyrl":{firstDay:1,weekend:[6,7],minimalDays:1},"sr-Cyrl-BA":{firstDay:1,weekend:[6,7],minimalDays:1},"sr-Cyrl-ME":{firstDay:1,weekend:[6,7],minimalDays:1},"sr-Cyrl-XK":{firstDay:1,weekend:[6,7],minimalDays:1},"sr-Latn":{firstDay:1,weekend:[6,7],minimalDays:1},"sr-Latn-BA":{firstDay:1,weekend:[6,7],minimalDays:1},"sr-Latn-ME":{firstDay:1,weekend:[6,7],minimalDays:1},"sr-Latn-XK":{firstDay:1,weekend:[6,7],minimalDays:1},ss:{firstDay:7,weekend:[6,7],minimalDays:1},"ss-SZ":{firstDay:1,weekend:[6,7],minimalDays:1},ssy:{firstDay:1,weekend:[6,7],minimalDays:1},st:{firstDay:7,weekend:[6,7],minimalDays:1},"st-LS":{firstDay:1,weekend:[6,7],minimalDays:1},su:{firstDay:7,weekend:[6,7],minimalDays:1},"su-Latn":{firstDay:7,weekend:[6,7],minimalDays:1},sv:{firstDay:1,weekend:[6,7],minimalDays:4},"sv-AX":{firstDay:1,weekend:[6,7],minimalDays:4},"sv-FI":{firstDay:1,weekend:[6,7],minimalDays:4},sw:{firstDay:1,weekend:[6,7],minimalDays:1},"sw-CD":{firstDay:1,weekend:[6,7],minimalDays:1},"sw-KE":{firstDay:7,weekend:[6,7],minimalDays:1},"sw-UG":{firstDay:1,weekend:[7],minimalDays:1},syr:{firstDay:6,weekend:[5,6],minimalDays:1},"syr-SY":{firstDay:6,weekend:[5,6],minimalDays:1},szl:{firstDay:1,weekend:[6,7],minimalDays:4},ta:{firstDay:7,weekend:[7],minimalDays:1},"ta-LK":{firstDay:1,weekend:[6,7],minimalDays:1},"ta-MY":{firstDay:1,weekend:[6,7],minimalDays:1},"ta-SG":{firstDay:7,weekend:[6,7],minimalDays:1},te:{firstDay:7,weekend:[7],minimalDays:1},teo:{firstDay:1,weekend:[7],minimalDays:1},"teo-KE":{firstDay:7,weekend:[6,7],minimalDays:1},tg:{firstDay:1,weekend:[6,7],minimalDays:1},th:{firstDay:7,weekend:[6,7],minimalDays:1},ti:{firstDay:7,weekend:[6,7],minimalDays:1},"ti-ER":{firstDay:1,weekend:[6,7],minimalDays:1},tig:{firstDay:1,weekend:[6,7],minimalDays:1},tk:{firstDay:1,weekend:[6,7],minimalDays:1},tn:{firstDay:7,weekend:[6,7],minimalDays:1},"tn-BW":{firstDay:7,weekend:[6,7],minimalDays:1},to:{firstDay:1,weekend:[6,7],minimalDays:1},tok:{firstDay:1,weekend:[6,7],minimalDays:1},tpi:{firstDay:1,weekend:[6,7],minimalDays:1},tr:{firstDay:1,weekend:[6,7],minimalDays:1},"tr-CY":{firstDay:1,weekend:[6,7],minimalDays:1},trv:{firstDay:7,weekend:[6,7],minimalDays:1},trw:{firstDay:7,weekend:[6,7],minimalDays:1},ts:{firstDay:7,weekend:[6,7],minimalDays:1},tt:{firstDay:1,weekend:[6,7],minimalDays:4},twq:{firstDay:1,weekend:[6,7],minimalDays:1},tyv:{firstDay:1,weekend:[6,7],minimalDays:4},tzm:{firstDay:1,weekend:[6,7],minimalDays:1},ug:{firstDay:1,weekend:[6,7],minimalDays:1},uk:{firstDay:1,weekend:[6,7],minimalDays:1},und:{firstDay:7,weekend:[6,7],minimalDays:1},ur:{firstDay:7,weekend:[6,7],minimalDays:1},"ur-IN":{firstDay:7,weekend:[7],minimalDays:1},uz:{firstDay:1,weekend:[6,7],minimalDays:1},"uz-Arab":{firstDay:6,weekend:[4,5],minimalDays:1},"uz-Cyrl":{firstDay:1,weekend:[6,7],minimalDays:1},"uz-Latn":{firstDay:1,weekend:[6,7],minimalDays:1},vai:{firstDay:1,weekend:[6,7],minimalDays:1},"vai-Latn":{firstDay:1,weekend:[6,7],minimalDays:1},"vai-Vaii":{firstDay:1,weekend:[6,7],minimalDays:1},ve:{firstDay:7,weekend:[6,7],minimalDays:1},vec:{firstDay:1,weekend:[6,7],minimalDays:4},vi:{firstDay:1,weekend:[6,7],minimalDays:1},vmw:{firstDay:7,weekend:[6,7],minimalDays:1},vo:{firstDay:1,weekend:[6,7],minimalDays:1},vun:{firstDay:1,weekend:[6,7],minimalDays:1},wa:{firstDay:1,weekend:[6,7],minimalDays:4},wae:{firstDay:1,weekend:[6,7],minimalDays:4},wal:{firstDay:7,weekend:[6,7],minimalDays:1},wbp:{firstDay:1,weekend:[6,7],minimalDays:1},wo:{firstDay:1,weekend:[6,7],minimalDays:1},xh:{firstDay:7,weekend:[6,7],minimalDays:1},xnr:{firstDay:7,weekend:[7],minimalDays:1},xog:{firstDay:1,weekend:[7],minimalDays:1},yav:{firstDay:1,weekend:[6,7],minimalDays:1},yi:{firstDay:1,weekend:[6,7],minimalDays:1},yo:{firstDay:1,weekend:[6,7],minimalDays:1},"yo-BJ":{firstDay:1,weekend:[6,7],minimalDays:1},yrl:{firstDay:7,weekend:[6,7],minimalDays:1},"yrl-CO":{firstDay:7,weekend:[6,7],minimalDays:1},"yrl-VE":{firstDay:7,weekend:[6,7],minimalDays:1},yue:{firstDay:7,weekend:[6,7],minimalDays:1},"yue-Hans":{firstDay:1,weekend:[6,7],minimalDays:1},"yue-Hant":{firstDay:7,weekend:[6,7],minimalDays:1},za:{firstDay:1,weekend:[6,7],minimalDays:1},zgh:{firstDay:1,weekend:[6,7],minimalDays:1},zh:{firstDay:1,weekend:[6,7],minimalDays:1},"zh-Hans":{firstDay:1,weekend:[6,7],minimalDays:1},"zh-Hans-HK":{firstDay:7,weekend:[6,7],minimalDays:1},"zh-Hans-MO":{firstDay:7,weekend:[6,7],minimalDays:1},"zh-Hans-SG":{firstDay:7,weekend:[6,7],minimalDays:1},"zh-Hant":{firstDay:7,weekend:[6,7],minimalDays:1},"zh-Hant-HK":{firstDay:7,weekend:[6,7],minimalDays:1},"zh-Hant-MO":{firstDay:7,weekend:[6,7],minimalDays:1},zu:{firstDay:7,weekend:[6,7],minimalDays:1}};function rt(e){const t=e.getFullYear(),i=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return`${t}-${i}-${n}`}function as(e){return Ut(e,new Date)}function Ut(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function Pd(e){const t=[0,1,2,3,4,5,6],i=e%7;return[...t.slice(i),...t.slice(0,i)]}function rs(e){const t=Td[e??"en"]||{firstDay:0};return Pd(t.firstDay)}function xd(e){const t=new Intl.DateTimeFormat(e,{weekday:"narrow"}),i=new Date(2025,10,30);return rs(e).map(n=>{const s=new Date(i);return s.setDate(i.getDate()+n),t.format(s)})}function gt(e,t,i){for(let n=0;n<i;n++){const s=new Date(t.getFullYear(),t.getMonth()+n,1);if(e.getMonth()===s.getMonth()&&e.getFullYear()===s.getFullYear())return!0}return!1}function Md(e,t,i="long"){return new Intl.DateTimeFormat(e,{month:i,year:"numeric"}).formatToParts(t).filter(s=>s.type==="month"||s.type==="year")}function os(e,t){const i=e||"en-US",r=new Intl.DateTimeFormat(i,{day:"numeric"}).formatToParts(t).find(a=>a.type==="day");return r?r.value:t.getDate().toString()}function Li(e,t){const i=rt(e),n=rt(t);return i===n?{start:i}:{start:i,end:n}}function ls(e){return e.length?e.map(n=>({start:new Date(n.start).getTime(),end:new Date(n.end??n.start).getTime()})).sort((n,s)=>n.start-s.start).reduce((n,s)=>{const r=n[n.length-1];if(r){const a=new Date(r.end);if(a.setDate(a.getDate()+1),s.start<=a.getTime())return r.end=Math.max(r.end,s.end),n}return[...n,s]},[]).map(n=>Li(new Date(n.start),new Date(n.end))):[]}class Fe{constructor(t,i){t.addController(this),this.getTargets=i.getTargets,this.getState=i.getState}hostConnected(){}hostUpdated(){const t=this.getTargets();if(!t)return;let i=[];t instanceof NodeList?i=Array.from(t):Array.isArray(t)?i=t:i=[t];const{uid:n,templateData:s}=this.getState(),{touched:r,errors:a,readonly:o,disabled:l,hint:d}=s,c=r&&a&&a.length>0;vt.filterTap(i,h=>!!h,h=>{const p=(m,f)=>{f?h.setAttribute(m,f):h.removeAttribute(m)};p("aria-describedby",d?`${n}_hint`:null),p("aria-invalid",c?"true":null),p("aria-errormessage",c?`${n}_errors`:null),p("aria-readonly",l||o?"true":null)})}}const{I:Ld}=vd,ds=e=>e,Nd=e=>e.strings===void 0,us=()=>document.createComment(""),Ht=(e,t,i)=>{const n=e._$AA.parentNode,s=t===void 0?e._$AB:t._$AA;if(i===void 0){const r=n.insertBefore(us(),s),a=n.insertBefore(us(),s);i=new Ld(r,a,e,e.options)}else{const r=i._$AB.nextSibling,a=i._$AM,o=a!==e;if(o){let l;i._$AQ?.(e),i._$AM=e,i._$AP!==void 0&&(l=e._$AU)!==a._$AU&&i._$AP(l)}if(r!==s||o){let l=i._$AA;for(;l!==r;){const d=ds(l).nextSibling;ds(n).insertBefore(l,s),l=d}}}return i},bt=(e,t,i=e)=>(e._$AI(t,i),e),zd={},cs=(e,t=zd)=>e._$AH=t,Fd=e=>e._$AH,Ni=e=>{e._$AR(),e._$AA.remove()};const hs=(e,t,i)=>{const n=new Map;for(let s=t;s<=i;s++)n.set(e[s],s);return n},it=qt(class extends Vt{constructor(e){if(super(e),e.type!==tt.CHILD)throw Error("repeat() can only be used in text expressions")}dt(e,t,i){let n;i===void 0?i=t:t!==void 0&&(n=t);const s=[],r=[];let a=0;for(const o of e)s[a]=n?n(o,a):a,r[a]=i(o,a),a++;return{values:r,keys:s}}render(e,t,i){return this.dt(e,t,i).values}update(e,[t,i,n]){const s=Fd(e),{values:r,keys:a}=this.dt(t,i,n);if(!Array.isArray(s))return this.ut=a,r;const o=this.ut??=[],l=[];let d,c,h=0,p=s.length-1,m=0,f=r.length-1;for(;h<=p&&m<=f;)if(s[h]===null)h++;else if(s[p]===null)p--;else if(o[h]===a[m])l[m]=bt(s[h],r[m]),h++,m++;else if(o[p]===a[f])l[f]=bt(s[p],r[f]),p--,f--;else if(o[h]===a[f])l[f]=bt(s[h],r[f]),Ht(e,l[f+1],s[h]),h++,f--;else if(o[p]===a[m])l[m]=bt(s[p],r[m]),Ht(e,s[h],s[p]),p--,m++;else if(d===void 0&&(d=hs(a,m,f),c=hs(o,h,p)),d.has(o[h]))if(d.has(o[p])){const w=c.get(a[m]),S=w!==void 0?s[w]:null;if(S===null){const T=Ht(e,s[h]);bt(T,r[m]),l[m]=T}else l[m]=bt(S,r[m]),Ht(e,s[h],S),s[w]=null;m++}else Ni(s[p]),p--;else Ni(s[h]),h++;for(;m<=f;){const w=Ht(e,l[f+1]);bt(w,r[m]),l[m++]=w}for(;h<=p;){const w=s[h++];w!==null&&Ni(w)}return this.ut=a,cs(e,l),ze}}),Ge=(e,t,i=!1,n=void 0,s=!0)=>s?t.label?v`<label
|
|
20
|
+
`}};ft([u({type:String})],at.prototype,"uid",2),ft([u({type:String})],at.prototype,"label",2),ft([u({type:Boolean})],at.prototype,"disabled",2),ft([u({type:String})],at.prototype,"icon",2),ft([u({type:String})],at.prototype,"variant",2),ft([u({type:String})],at.prototype,"iconPosition",2),at=ft([ue("gui-button")],at),typeof customElements<"u"&&!customElements.get("gui-button")&&customElements.define("gui-button",at);function Id(e){const t=e.widget,{uid:i,templateData:n,onClick:s}=x.useActionWidget(t);return y.jsx("div",{className:"gui-button gui-field",style:{flex:n.size},children:y.jsx("gui-button",{uid:i,label:n.label,disabled:n.disabled,variant:n.variant,icon:n.icon,iconPosition:n.iconPosition,onClick:s})})}const Cd=Object.freeze(Object.defineProperty({__proto__:null,Button:Id},Symbol.toStringTag,{value:"Module"})),Td={aa:{firstDay:7,weekend:[6,7],minimalDays:1},"aa-DJ":{firstDay:6,weekend:[6,7],minimalDays:1},"aa-ER":{firstDay:1,weekend:[6,7],minimalDays:1},ab:{firstDay:1,weekend:[6,7],minimalDays:1},af:{firstDay:7,weekend:[6,7],minimalDays:1},"af-NA":{firstDay:1,weekend:[6,7],minimalDays:1},agq:{firstDay:1,weekend:[6,7],minimalDays:1},ak:{firstDay:1,weekend:[6,7],minimalDays:1},am:{firstDay:7,weekend:[6,7],minimalDays:1},an:{firstDay:1,weekend:[6,7],minimalDays:4},ann:{firstDay:1,weekend:[6,7],minimalDays:1},apc:{firstDay:6,weekend:[5,6],minimalDays:1},ar:{firstDay:6,weekend:[5,6],minimalDays:1},"ar-AE":{firstDay:6,weekend:[6,7],minimalDays:1},"ar-BH":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-DJ":{firstDay:6,weekend:[6,7],minimalDays:1},"ar-DZ":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-EG":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-EH":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-ER":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-IL":{firstDay:7,weekend:[5,6],minimalDays:1},"ar-IQ":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-JO":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-KM":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-KW":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-LB":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-LY":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-MA":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-MR":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-OM":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-PS":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-QA":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-SA":{firstDay:7,weekend:[5,6],minimalDays:1},"ar-SD":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-SO":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-SS":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-SY":{firstDay:6,weekend:[5,6],minimalDays:1},"ar-TD":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-TN":{firstDay:1,weekend:[6,7],minimalDays:1},"ar-YE":{firstDay:7,weekend:[5,6],minimalDays:1},arn:{firstDay:1,weekend:[6,7],minimalDays:1},as:{firstDay:7,weekend:[7],minimalDays:1},asa:{firstDay:1,weekend:[6,7],minimalDays:1},ast:{firstDay:1,weekend:[6,7],minimalDays:4},az:{firstDay:1,weekend:[6,7],minimalDays:1},"az-Arab":{firstDay:6,weekend:[5],minimalDays:1},"az-Arab-IQ":{firstDay:6,weekend:[5,6],minimalDays:1},"az-Arab-TR":{firstDay:1,weekend:[6,7],minimalDays:1},"az-Cyrl":{firstDay:1,weekend:[6,7],minimalDays:1},"az-Latn":{firstDay:1,weekend:[6,7],minimalDays:1},ba:{firstDay:1,weekend:[6,7],minimalDays:4},bal:{firstDay:7,weekend:[6,7],minimalDays:1},"bal-Arab":{firstDay:7,weekend:[6,7],minimalDays:1},"bal-Latn":{firstDay:7,weekend:[6,7],minimalDays:1},bas:{firstDay:1,weekend:[6,7],minimalDays:1},be:{firstDay:1,weekend:[6,7],minimalDays:1},"be-tarask":{firstDay:1,weekend:[6,7],minimalDays:1},bem:{firstDay:1,weekend:[6,7],minimalDays:1},bew:{firstDay:7,weekend:[6,7],minimalDays:1},bez:{firstDay:1,weekend:[6,7],minimalDays:1},bg:{firstDay:1,weekend:[6,7],minimalDays:4},bgc:{firstDay:7,weekend:[7],minimalDays:1},bgn:{firstDay:7,weekend:[6,7],minimalDays:1},"bgn-AE":{firstDay:6,weekend:[6,7],minimalDays:1},"bgn-AF":{firstDay:6,weekend:[4,5],minimalDays:1},"bgn-IR":{firstDay:6,weekend:[5],minimalDays:1},"bgn-OM":{firstDay:6,weekend:[5,6],minimalDays:1},bho:{firstDay:7,weekend:[7],minimalDays:1},blo:{firstDay:1,weekend:[6,7],minimalDays:1},blt:{firstDay:1,weekend:[6,7],minimalDays:1},bm:{firstDay:1,weekend:[6,7],minimalDays:1},"bm-Nkoo":{firstDay:1,weekend:[6,7],minimalDays:1},bn:{firstDay:7,weekend:[6,7],minimalDays:1},"bn-IN":{firstDay:7,weekend:[7],minimalDays:1},bo:{firstDay:1,weekend:[6,7],minimalDays:1},"bo-IN":{firstDay:7,weekend:[7],minimalDays:1},br:{firstDay:1,weekend:[6,7],minimalDays:4},brx:{firstDay:7,weekend:[7],minimalDays:1},bs:{firstDay:1,weekend:[6,7],minimalDays:1},"bs-Cyrl":{firstDay:1,weekend:[6,7],minimalDays:1},"bs-Latn":{firstDay:1,weekend:[6,7],minimalDays:1},bss:{firstDay:1,weekend:[6,7],minimalDays:1},byn:{firstDay:1,weekend:[6,7],minimalDays:1},ca:{firstDay:1,weekend:[6,7],minimalDays:4},"ca-AD":{firstDay:1,weekend:[6,7],minimalDays:4},"ca-ES-valencia":{firstDay:1,weekend:[6,7],minimalDays:4},"ca-FR":{firstDay:1,weekend:[6,7],minimalDays:4},"ca-IT":{firstDay:1,weekend:[6,7],minimalDays:4},cad:{firstDay:7,weekend:[6,7],minimalDays:1},cch:{firstDay:1,weekend:[6,7],minimalDays:1},ccp:{firstDay:7,weekend:[6,7],minimalDays:1},"ccp-IN":{firstDay:7,weekend:[7],minimalDays:1},ce:{firstDay:1,weekend:[6,7],minimalDays:4},ceb:{firstDay:7,weekend:[6,7],minimalDays:1},cgg:{firstDay:1,weekend:[7],minimalDays:1},cho:{firstDay:7,weekend:[6,7],minimalDays:1},chr:{firstDay:7,weekend:[6,7],minimalDays:1},cic:{firstDay:7,weekend:[6,7],minimalDays:1},ckb:{firstDay:6,weekend:[5,6],minimalDays:1},"ckb-IR":{firstDay:6,weekend:[5],minimalDays:1},co:{firstDay:1,weekend:[6,7],minimalDays:4},cs:{firstDay:1,weekend:[6,7],minimalDays:4},csw:{firstDay:7,weekend:[6,7],minimalDays:1},cu:{firstDay:1,weekend:[6,7],minimalDays:4},cv:{firstDay:1,weekend:[6,7],minimalDays:4},cy:{firstDay:1,weekend:[6,7],minimalDays:4},da:{firstDay:1,weekend:[6,7],minimalDays:4},"da-GL":{firstDay:1,weekend:[6,7],minimalDays:1},dav:{firstDay:7,weekend:[6,7],minimalDays:1},de:{firstDay:1,weekend:[6,7],minimalDays:4},"de-AT":{firstDay:1,weekend:[6,7],minimalDays:4},"de-BE":{firstDay:1,weekend:[6,7],minimalDays:4},"de-CH":{firstDay:1,weekend:[6,7],minimalDays:4},"de-IT":{firstDay:1,weekend:[6,7],minimalDays:4},"de-LI":{firstDay:1,weekend:[6,7],minimalDays:4},"de-LU":{firstDay:1,weekend:[6,7],minimalDays:4},dje:{firstDay:1,weekend:[6,7],minimalDays:1},doi:{firstDay:7,weekend:[7],minimalDays:1},dsb:{firstDay:1,weekend:[6,7],minimalDays:4},dua:{firstDay:1,weekend:[6,7],minimalDays:1},dv:{firstDay:5,weekend:[6,7],minimalDays:1},dyo:{firstDay:1,weekend:[6,7],minimalDays:1},dz:{firstDay:7,weekend:[6,7],minimalDays:1},ebu:{firstDay:7,weekend:[6,7],minimalDays:1},ee:{firstDay:1,weekend:[6,7],minimalDays:1},"ee-TG":{firstDay:1,weekend:[6,7],minimalDays:1},el:{firstDay:1,weekend:[6,7],minimalDays:4},"el-CY":{firstDay:1,weekend:[6,7],minimalDays:1},"el-polyton":{firstDay:1,weekend:[6,7],minimalDays:4},en:{firstDay:7,weekend:[6,7],minimalDays:1},"en-001":{firstDay:1,weekend:[6,7],minimalDays:1},"en-150":{firstDay:1,weekend:[6,7],minimalDays:1},"en-AE":{firstDay:6,weekend:[6,7],minimalDays:1},"en-AG":{firstDay:7,weekend:[6,7],minimalDays:1},"en-AI":{firstDay:1,weekend:[6,7],minimalDays:1},"en-AS":{firstDay:7,weekend:[6,7],minimalDays:1},"en-AT":{firstDay:1,weekend:[6,7],minimalDays:4},"en-AU":{firstDay:1,weekend:[6,7],minimalDays:1},"en-BB":{firstDay:1,weekend:[6,7],minimalDays:1},"en-BE":{firstDay:1,weekend:[6,7],minimalDays:4},"en-BI":{firstDay:1,weekend:[6,7],minimalDays:1},"en-BM":{firstDay:1,weekend:[6,7],minimalDays:1},"en-BS":{firstDay:7,weekend:[6,7],minimalDays:1},"en-BW":{firstDay:7,weekend:[6,7],minimalDays:1},"en-BZ":{firstDay:7,weekend:[6,7],minimalDays:1},"en-CA":{firstDay:7,weekend:[6,7],minimalDays:1},"en-CC":{firstDay:1,weekend:[6,7],minimalDays:1},"en-CH":{firstDay:1,weekend:[6,7],minimalDays:4},"en-CK":{firstDay:1,weekend:[6,7],minimalDays:1},"en-CM":{firstDay:1,weekend:[6,7],minimalDays:1},"en-CX":{firstDay:1,weekend:[6,7],minimalDays:1},"en-CY":{firstDay:1,weekend:[6,7],minimalDays:1},"en-DE":{firstDay:1,weekend:[6,7],minimalDays:4},"en-DG":{firstDay:1,weekend:[6,7],minimalDays:1},"en-DK":{firstDay:1,weekend:[6,7],minimalDays:4},"en-DM":{firstDay:7,weekend:[6,7],minimalDays:1},"en-Dsrt":{firstDay:7,weekend:[6,7],minimalDays:1},"en-ER":{firstDay:1,weekend:[6,7],minimalDays:1},"en-FI":{firstDay:1,weekend:[6,7],minimalDays:4},"en-FJ":{firstDay:1,weekend:[6,7],minimalDays:4},"en-FK":{firstDay:1,weekend:[6,7],minimalDays:1},"en-FM":{firstDay:1,weekend:[6,7],minimalDays:1},"en-GB":{firstDay:1,weekend:[6,7],minimalDays:4},"en-GD":{firstDay:1,weekend:[6,7],minimalDays:1},"en-GG":{firstDay:1,weekend:[6,7],minimalDays:4},"en-GH":{firstDay:1,weekend:[6,7],minimalDays:1},"en-GI":{firstDay:1,weekend:[6,7],minimalDays:4},"en-GM":{firstDay:1,weekend:[6,7],minimalDays:1},"en-GU":{firstDay:7,weekend:[6,7],minimalDays:1},"en-GY":{firstDay:1,weekend:[6,7],minimalDays:1},"en-HK":{firstDay:7,weekend:[6,7],minimalDays:1},"en-ID":{firstDay:7,weekend:[6,7],minimalDays:1},"en-IE":{firstDay:1,weekend:[6,7],minimalDays:4},"en-IL":{firstDay:7,weekend:[5,6],minimalDays:1},"en-IM":{firstDay:1,weekend:[6,7],minimalDays:4},"en-IN":{firstDay:7,weekend:[7],minimalDays:1},"en-IO":{firstDay:1,weekend:[6,7],minimalDays:1},"en-JE":{firstDay:1,weekend:[6,7],minimalDays:4},"en-JM":{firstDay:7,weekend:[6,7],minimalDays:1},"en-KE":{firstDay:7,weekend:[6,7],minimalDays:1},"en-KI":{firstDay:1,weekend:[6,7],minimalDays:1},"en-KN":{firstDay:1,weekend:[6,7],minimalDays:1},"en-KY":{firstDay:1,weekend:[6,7],minimalDays:1},"en-LC":{firstDay:1,weekend:[6,7],minimalDays:1},"en-LR":{firstDay:1,weekend:[6,7],minimalDays:1},"en-LS":{firstDay:1,weekend:[6,7],minimalDays:1},"en-MG":{firstDay:1,weekend:[6,7],minimalDays:1},"en-MH":{firstDay:7,weekend:[6,7],minimalDays:1},"en-MO":{firstDay:7,weekend:[6,7],minimalDays:1},"en-MP":{firstDay:1,weekend:[6,7],minimalDays:1},"en-MS":{firstDay:1,weekend:[6,7],minimalDays:1},"en-MT":{firstDay:7,weekend:[6,7],minimalDays:1},"en-MU":{firstDay:1,weekend:[6,7],minimalDays:1},"en-MV":{firstDay:5,weekend:[6,7],minimalDays:1},"en-MW":{firstDay:1,weekend:[6,7],minimalDays:1},"en-MY":{firstDay:1,weekend:[6,7],minimalDays:1},"en-NA":{firstDay:1,weekend:[6,7],minimalDays:1},"en-NF":{firstDay:1,weekend:[6,7],minimalDays:1},"en-NG":{firstDay:1,weekend:[6,7],minimalDays:1},"en-NL":{firstDay:1,weekend:[6,7],minimalDays:4},"en-NR":{firstDay:1,weekend:[6,7],minimalDays:1},"en-NU":{firstDay:1,weekend:[6,7],minimalDays:1},"en-NZ":{firstDay:1,weekend:[6,7],minimalDays:1},"en-PG":{firstDay:1,weekend:[6,7],minimalDays:1},"en-PH":{firstDay:7,weekend:[6,7],minimalDays:1},"en-PK":{firstDay:7,weekend:[6,7],minimalDays:1},"en-PN":{firstDay:1,weekend:[6,7],minimalDays:1},"en-PR":{firstDay:7,weekend:[6,7],minimalDays:1},"en-PW":{firstDay:1,weekend:[6,7],minimalDays:1},"en-RW":{firstDay:1,weekend:[6,7],minimalDays:1},"en-SB":{firstDay:1,weekend:[6,7],minimalDays:1},"en-SC":{firstDay:1,weekend:[6,7],minimalDays:1},"en-SD":{firstDay:6,weekend:[5,6],minimalDays:1},"en-SE":{firstDay:1,weekend:[6,7],minimalDays:4},"en-SG":{firstDay:7,weekend:[6,7],minimalDays:1},"en-SH":{firstDay:1,weekend:[6,7],minimalDays:1},"en-SI":{firstDay:1,weekend:[6,7],minimalDays:1},"en-SL":{firstDay:1,weekend:[6,7],minimalDays:1},"en-SS":{firstDay:1,weekend:[6,7],minimalDays:1},"en-SX":{firstDay:1,weekend:[6,7],minimalDays:1},"en-SZ":{firstDay:1,weekend:[6,7],minimalDays:1},"en-Shaw":{firstDay:1,weekend:[6,7],minimalDays:4},"en-TC":{firstDay:1,weekend:[6,7],minimalDays:1},"en-TK":{firstDay:1,weekend:[6,7],minimalDays:1},"en-TO":{firstDay:1,weekend:[6,7],minimalDays:1},"en-TT":{firstDay:7,weekend:[6,7],minimalDays:1},"en-TV":{firstDay:1,weekend:[6,7],minimalDays:1},"en-TZ":{firstDay:1,weekend:[6,7],minimalDays:1},"en-UG":{firstDay:1,weekend:[7],minimalDays:1},"en-UM":{firstDay:7,weekend:[6,7],minimalDays:1},"en-VC":{firstDay:1,weekend:[6,7],minimalDays:1},"en-VG":{firstDay:1,weekend:[6,7],minimalDays:1},"en-VI":{firstDay:7,weekend:[6,7],minimalDays:1},"en-VU":{firstDay:1,weekend:[6,7],minimalDays:1},"en-WS":{firstDay:7,weekend:[6,7],minimalDays:1},"en-ZA":{firstDay:7,weekend:[6,7],minimalDays:1},"en-ZM":{firstDay:1,weekend:[6,7],minimalDays:1},"en-ZW":{firstDay:7,weekend:[6,7],minimalDays:1},eo:{firstDay:1,weekend:[6,7],minimalDays:1},es:{firstDay:1,weekend:[6,7],minimalDays:4},"es-419":{firstDay:1,weekend:[6,7],minimalDays:1},"es-AR":{firstDay:1,weekend:[6,7],minimalDays:1},"es-BO":{firstDay:1,weekend:[6,7],minimalDays:1},"es-BR":{firstDay:7,weekend:[6,7],minimalDays:1},"es-BZ":{firstDay:7,weekend:[6,7],minimalDays:1},"es-CL":{firstDay:1,weekend:[6,7],minimalDays:1},"es-CO":{firstDay:7,weekend:[6,7],minimalDays:1},"es-CR":{firstDay:1,weekend:[6,7],minimalDays:1},"es-CU":{firstDay:1,weekend:[6,7],minimalDays:1},"es-DO":{firstDay:7,weekend:[6,7],minimalDays:1},"es-EA":{firstDay:1,weekend:[6,7],minimalDays:1},"es-EC":{firstDay:1,weekend:[6,7],minimalDays:1},"es-GQ":{firstDay:1,weekend:[6,7],minimalDays:1},"es-GT":{firstDay:7,weekend:[6,7],minimalDays:1},"es-HN":{firstDay:7,weekend:[6,7],minimalDays:1},"es-IC":{firstDay:1,weekend:[6,7],minimalDays:1},"es-MX":{firstDay:7,weekend:[6,7],minimalDays:1},"es-NI":{firstDay:7,weekend:[6,7],minimalDays:1},"es-PA":{firstDay:7,weekend:[6,7],minimalDays:1},"es-PE":{firstDay:7,weekend:[6,7],minimalDays:1},"es-PH":{firstDay:7,weekend:[6,7],minimalDays:1},"es-PR":{firstDay:7,weekend:[6,7],minimalDays:1},"es-PY":{firstDay:7,weekend:[6,7],minimalDays:1},"es-SV":{firstDay:7,weekend:[6,7],minimalDays:1},"es-US":{firstDay:7,weekend:[6,7],minimalDays:1},"es-UY":{firstDay:1,weekend:[6,7],minimalDays:1},"es-VE":{firstDay:7,weekend:[6,7],minimalDays:1},et:{firstDay:1,weekend:[6,7],minimalDays:4},eu:{firstDay:1,weekend:[6,7],minimalDays:4},ewo:{firstDay:1,weekend:[6,7],minimalDays:1},fa:{firstDay:6,weekend:[5],minimalDays:1},"fa-AF":{firstDay:6,weekend:[4,5],minimalDays:1},ff:{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-BF":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-CM":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-GH":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-GM":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-GW":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-LR":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-MR":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-NE":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-NG":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-SL":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Adlm-SN":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-BF":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-CM":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-GH":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-GM":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-GN":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-GW":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-LR":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-MR":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-NE":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-NG":{firstDay:1,weekend:[6,7],minimalDays:1},"ff-Latn-SL":{firstDay:1,weekend:[6,7],minimalDays:1},fi:{firstDay:1,weekend:[6,7],minimalDays:4},fil:{firstDay:7,weekend:[6,7],minimalDays:1},fo:{firstDay:1,weekend:[6,7],minimalDays:4},"fo-DK":{firstDay:1,weekend:[6,7],minimalDays:4},fr:{firstDay:1,weekend:[6,7],minimalDays:4},"fr-BE":{firstDay:1,weekend:[6,7],minimalDays:4},"fr-BF":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-BI":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-BJ":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-BL":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-CA":{firstDay:7,weekend:[6,7],minimalDays:1},"fr-CD":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-CF":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-CG":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-CH":{firstDay:1,weekend:[6,7],minimalDays:4},"fr-CI":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-CM":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-DJ":{firstDay:6,weekend:[6,7],minimalDays:1},"fr-DZ":{firstDay:6,weekend:[5,6],minimalDays:1},"fr-GA":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-GF":{firstDay:1,weekend:[6,7],minimalDays:4},"fr-GN":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-GP":{firstDay:1,weekend:[6,7],minimalDays:4},"fr-GQ":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-HT":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-KM":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-LU":{firstDay:1,weekend:[6,7],minimalDays:4},"fr-MA":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-MC":{firstDay:1,weekend:[6,7],minimalDays:4},"fr-MF":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-MG":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-ML":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-MQ":{firstDay:1,weekend:[6,7],minimalDays:4},"fr-MR":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-MU":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-NC":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-NE":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-PF":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-PM":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-RE":{firstDay:1,weekend:[6,7],minimalDays:4},"fr-RW":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-SC":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-SN":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-SY":{firstDay:6,weekend:[5,6],minimalDays:1},"fr-TD":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-TG":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-TN":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-VU":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-WF":{firstDay:1,weekend:[6,7],minimalDays:1},"fr-YT":{firstDay:1,weekend:[6,7],minimalDays:1},frr:{firstDay:1,weekend:[6,7],minimalDays:4},fur:{firstDay:1,weekend:[6,7],minimalDays:4},fy:{firstDay:1,weekend:[6,7],minimalDays:4},ga:{firstDay:1,weekend:[6,7],minimalDays:4},"ga-GB":{firstDay:1,weekend:[6,7],minimalDays:4},gaa:{firstDay:1,weekend:[6,7],minimalDays:1},gd:{firstDay:1,weekend:[6,7],minimalDays:4},gez:{firstDay:7,weekend:[6,7],minimalDays:1},"gez-ER":{firstDay:1,weekend:[6,7],minimalDays:1},gl:{firstDay:1,weekend:[6,7],minimalDays:4},gn:{firstDay:7,weekend:[6,7],minimalDays:1},gsw:{firstDay:1,weekend:[6,7],minimalDays:4},"gsw-FR":{firstDay:1,weekend:[6,7],minimalDays:4},"gsw-LI":{firstDay:1,weekend:[6,7],minimalDays:4},gu:{firstDay:7,weekend:[7],minimalDays:1},guz:{firstDay:7,weekend:[6,7],minimalDays:1},gv:{firstDay:1,weekend:[6,7],minimalDays:4},ha:{firstDay:1,weekend:[6,7],minimalDays:1},"ha-Arab":{firstDay:1,weekend:[6,7],minimalDays:1},"ha-Arab-SD":{firstDay:6,weekend:[5,6],minimalDays:1},"ha-GH":{firstDay:1,weekend:[6,7],minimalDays:1},"ha-NE":{firstDay:1,weekend:[6,7],minimalDays:1},haw:{firstDay:7,weekend:[6,7],minimalDays:1},he:{firstDay:7,weekend:[5,6],minimalDays:1},hi:{firstDay:7,weekend:[7],minimalDays:1},"hi-Latn":{firstDay:7,weekend:[7],minimalDays:1},hnj:{firstDay:7,weekend:[6,7],minimalDays:1},"hnj-Hmnp":{firstDay:7,weekend:[6,7],minimalDays:1},hr:{firstDay:1,weekend:[6,7],minimalDays:1},"hr-BA":{firstDay:1,weekend:[6,7],minimalDays:1},hsb:{firstDay:1,weekend:[6,7],minimalDays:4},hu:{firstDay:1,weekend:[6,7],minimalDays:4},hy:{firstDay:1,weekend:[6,7],minimalDays:1},ia:{firstDay:1,weekend:[6,7],minimalDays:1},id:{firstDay:7,weekend:[6,7],minimalDays:1},ie:{firstDay:1,weekend:[6,7],minimalDays:4},ig:{firstDay:1,weekend:[6,7],minimalDays:1},ii:{firstDay:1,weekend:[6,7],minimalDays:1},io:{firstDay:1,weekend:[6,7],minimalDays:1},is:{firstDay:1,weekend:[6,7],minimalDays:4},it:{firstDay:1,weekend:[6,7],minimalDays:4},"it-CH":{firstDay:1,weekend:[6,7],minimalDays:4},"it-SM":{firstDay:1,weekend:[6,7],minimalDays:4},"it-VA":{firstDay:1,weekend:[6,7],minimalDays:4},iu:{firstDay:7,weekend:[6,7],minimalDays:1},"iu-Latn":{firstDay:7,weekend:[6,7],minimalDays:1},ja:{firstDay:7,weekend:[6,7],minimalDays:1},jbo:{firstDay:1,weekend:[6,7],minimalDays:1},jgo:{firstDay:1,weekend:[6,7],minimalDays:1},jmc:{firstDay:1,weekend:[6,7],minimalDays:1},jv:{firstDay:7,weekend:[6,7],minimalDays:1},ka:{firstDay:1,weekend:[6,7],minimalDays:1},kab:{firstDay:6,weekend:[5,6],minimalDays:1},kaj:{firstDay:1,weekend:[6,7],minimalDays:1},kam:{firstDay:7,weekend:[6,7],minimalDays:1},kcg:{firstDay:1,weekend:[6,7],minimalDays:1},kde:{firstDay:1,weekend:[6,7],minimalDays:1},kea:{firstDay:1,weekend:[6,7],minimalDays:1},ken:{firstDay:1,weekend:[6,7],minimalDays:1},kgp:{firstDay:7,weekend:[6,7],minimalDays:1},khq:{firstDay:1,weekend:[6,7],minimalDays:1},ki:{firstDay:7,weekend:[6,7],minimalDays:1},kk:{firstDay:1,weekend:[6,7],minimalDays:1},kkj:{firstDay:1,weekend:[6,7],minimalDays:1},kl:{firstDay:1,weekend:[6,7],minimalDays:1},kln:{firstDay:7,weekend:[6,7],minimalDays:1},km:{firstDay:7,weekend:[6,7],minimalDays:1},kn:{firstDay:7,weekend:[7],minimalDays:1},ko:{firstDay:7,weekend:[6,7],minimalDays:1},"ko-CN":{firstDay:1,weekend:[6,7],minimalDays:1},"ko-KP":{firstDay:1,weekend:[6,7],minimalDays:1},kok:{firstDay:7,weekend:[7],minimalDays:1},kpe:{firstDay:1,weekend:[6,7],minimalDays:1},"kpe-GN":{firstDay:1,weekend:[6,7],minimalDays:1},ks:{firstDay:7,weekend:[7],minimalDays:1},"ks-Arab":{firstDay:7,weekend:[7],minimalDays:1},"ks-Deva":{firstDay:7,weekend:[7],minimalDays:1},ksb:{firstDay:1,weekend:[6,7],minimalDays:1},ksf:{firstDay:1,weekend:[6,7],minimalDays:1},ksh:{firstDay:1,weekend:[6,7],minimalDays:4},ku:{firstDay:1,weekend:[6,7],minimalDays:1},kw:{firstDay:1,weekend:[6,7],minimalDays:4},kxv:{firstDay:7,weekend:[7],minimalDays:1},"kxv-Deva":{firstDay:7,weekend:[7],minimalDays:1},"kxv-Latn":{firstDay:7,weekend:[7],minimalDays:1},"kxv-Orya":{firstDay:7,weekend:[7],minimalDays:1},"kxv-Telu":{firstDay:7,weekend:[7],minimalDays:1},ky:{firstDay:1,weekend:[6,7],minimalDays:1},la:{firstDay:1,weekend:[6,7],minimalDays:4},lag:{firstDay:1,weekend:[6,7],minimalDays:1},lb:{firstDay:1,weekend:[6,7],minimalDays:4},lg:{firstDay:1,weekend:[7],minimalDays:1},lij:{firstDay:1,weekend:[6,7],minimalDays:4},lkt:{firstDay:7,weekend:[6,7],minimalDays:1},lmo:{firstDay:1,weekend:[6,7],minimalDays:4},ln:{firstDay:1,weekend:[6,7],minimalDays:1},"ln-AO":{firstDay:1,weekend:[6,7],minimalDays:1},"ln-CF":{firstDay:1,weekend:[6,7],minimalDays:1},"ln-CG":{firstDay:1,weekend:[6,7],minimalDays:1},lo:{firstDay:7,weekend:[6,7],minimalDays:1},lrc:{firstDay:6,weekend:[5],minimalDays:1},"lrc-IQ":{firstDay:6,weekend:[5,6],minimalDays:1},lt:{firstDay:1,weekend:[6,7],minimalDays:4},lu:{firstDay:1,weekend:[6,7],minimalDays:1},luo:{firstDay:7,weekend:[6,7],minimalDays:1},luy:{firstDay:7,weekend:[6,7],minimalDays:1},lv:{firstDay:1,weekend:[6,7],minimalDays:1},mai:{firstDay:7,weekend:[7],minimalDays:1},mas:{firstDay:7,weekend:[6,7],minimalDays:1},"mas-TZ":{firstDay:1,weekend:[6,7],minimalDays:1},mdf:{firstDay:1,weekend:[6,7],minimalDays:4},mer:{firstDay:7,weekend:[6,7],minimalDays:1},mfe:{firstDay:1,weekend:[6,7],minimalDays:1},mg:{firstDay:1,weekend:[6,7],minimalDays:1},mgh:{firstDay:7,weekend:[6,7],minimalDays:1},mgo:{firstDay:1,weekend:[6,7],minimalDays:1},mi:{firstDay:1,weekend:[6,7],minimalDays:1},mic:{firstDay:7,weekend:[6,7],minimalDays:1},mk:{firstDay:1,weekend:[6,7],minimalDays:1},ml:{firstDay:7,weekend:[7],minimalDays:1},mn:{firstDay:1,weekend:[6,7],minimalDays:1},"mn-Mong":{firstDay:1,weekend:[6,7],minimalDays:1},"mn-Mong-MN":{firstDay:1,weekend:[6,7],minimalDays:1},mni:{firstDay:7,weekend:[7],minimalDays:1},"mni-Beng":{firstDay:7,weekend:[7],minimalDays:1},"mni-Mtei":{firstDay:7,weekend:[7],minimalDays:1},moh:{firstDay:7,weekend:[6,7],minimalDays:1},mr:{firstDay:7,weekend:[7],minimalDays:1},ms:{firstDay:1,weekend:[6,7],minimalDays:1},"ms-Arab":{firstDay:1,weekend:[6,7],minimalDays:1},"ms-Arab-BN":{firstDay:1,weekend:[6,7],minimalDays:1},"ms-BN":{firstDay:1,weekend:[6,7],minimalDays:1},"ms-ID":{firstDay:7,weekend:[6,7],minimalDays:1},"ms-SG":{firstDay:7,weekend:[6,7],minimalDays:1},mt:{firstDay:7,weekend:[6,7],minimalDays:1},mua:{firstDay:1,weekend:[6,7],minimalDays:1},mus:{firstDay:7,weekend:[6,7],minimalDays:1},my:{firstDay:7,weekend:[6,7],minimalDays:1},myv:{firstDay:1,weekend:[6,7],minimalDays:4},mzn:{firstDay:6,weekend:[5],minimalDays:1},naq:{firstDay:1,weekend:[6,7],minimalDays:1},nb:{firstDay:1,weekend:[6,7],minimalDays:4},"nb-SJ":{firstDay:1,weekend:[6,7],minimalDays:4},nd:{firstDay:7,weekend:[6,7],minimalDays:1},nds:{firstDay:1,weekend:[6,7],minimalDays:4},"nds-NL":{firstDay:1,weekend:[6,7],minimalDays:4},ne:{firstDay:7,weekend:[6,7],minimalDays:1},"ne-IN":{firstDay:7,weekend:[7],minimalDays:1},nl:{firstDay:1,weekend:[6,7],minimalDays:4},"nl-AW":{firstDay:1,weekend:[6,7],minimalDays:1},"nl-BE":{firstDay:1,weekend:[6,7],minimalDays:4},"nl-BQ":{firstDay:1,weekend:[6,7],minimalDays:1},"nl-CW":{firstDay:1,weekend:[6,7],minimalDays:1},"nl-SR":{firstDay:1,weekend:[6,7],minimalDays:1},"nl-SX":{firstDay:1,weekend:[6,7],minimalDays:1},nmg:{firstDay:1,weekend:[6,7],minimalDays:1},nn:{firstDay:1,weekend:[6,7],minimalDays:4},nnh:{firstDay:1,weekend:[6,7],minimalDays:1},no:{firstDay:1,weekend:[6,7],minimalDays:4},nqo:{firstDay:1,weekend:[6,7],minimalDays:1},nr:{firstDay:7,weekend:[6,7],minimalDays:1},nso:{firstDay:7,weekend:[6,7],minimalDays:1},nus:{firstDay:1,weekend:[6,7],minimalDays:1},nv:{firstDay:7,weekend:[6,7],minimalDays:1},ny:{firstDay:1,weekend:[6,7],minimalDays:1},nyn:{firstDay:1,weekend:[7],minimalDays:1},oc:{firstDay:1,weekend:[6,7],minimalDays:4},"oc-ES":{firstDay:1,weekend:[6,7],minimalDays:4},om:{firstDay:7,weekend:[6,7],minimalDays:1},"om-KE":{firstDay:7,weekend:[6,7],minimalDays:1},or:{firstDay:7,weekend:[7],minimalDays:1},os:{firstDay:1,weekend:[6,7],minimalDays:1},"os-RU":{firstDay:1,weekend:[6,7],minimalDays:4},osa:{firstDay:7,weekend:[6,7],minimalDays:1},pa:{firstDay:7,weekend:[7],minimalDays:1},"pa-Arab":{firstDay:7,weekend:[6,7],minimalDays:1},"pa-Guru":{firstDay:7,weekend:[7],minimalDays:1},pap:{firstDay:1,weekend:[6,7],minimalDays:1},"pap-AW":{firstDay:1,weekend:[6,7],minimalDays:1},pcm:{firstDay:1,weekend:[6,7],minimalDays:1},pis:{firstDay:1,weekend:[6,7],minimalDays:1},pl:{firstDay:1,weekend:[6,7],minimalDays:4},prg:{firstDay:1,weekend:[6,7],minimalDays:4},ps:{firstDay:6,weekend:[4,5],minimalDays:1},"ps-PK":{firstDay:7,weekend:[6,7],minimalDays:1},pt:{firstDay:7,weekend:[6,7],minimalDays:1},"pt-AO":{firstDay:1,weekend:[6,7],minimalDays:1},"pt-CH":{firstDay:1,weekend:[6,7],minimalDays:4},"pt-CV":{firstDay:1,weekend:[6,7],minimalDays:1},"pt-GQ":{firstDay:1,weekend:[6,7],minimalDays:1},"pt-GW":{firstDay:1,weekend:[6,7],minimalDays:1},"pt-LU":{firstDay:1,weekend:[6,7],minimalDays:4},"pt-MO":{firstDay:7,weekend:[6,7],minimalDays:1},"pt-MZ":{firstDay:7,weekend:[6,7],minimalDays:1},"pt-PT":{firstDay:7,weekend:[6,7],minimalDays:4},"pt-ST":{firstDay:1,weekend:[6,7],minimalDays:1},"pt-TL":{firstDay:1,weekend:[6,7],minimalDays:1},qu:{firstDay:7,weekend:[6,7],minimalDays:1},"qu-BO":{firstDay:1,weekend:[6,7],minimalDays:1},"qu-EC":{firstDay:1,weekend:[6,7],minimalDays:1},quc:{firstDay:7,weekend:[6,7],minimalDays:1},raj:{firstDay:7,weekend:[7],minimalDays:1},rhg:{firstDay:7,weekend:[6,7],minimalDays:1},"rhg-Rohg":{firstDay:7,weekend:[6,7],minimalDays:1},"rhg-Rohg-BD":{firstDay:7,weekend:[6,7],minimalDays:1},rif:{firstDay:1,weekend:[6,7],minimalDays:1},rm:{firstDay:1,weekend:[6,7],minimalDays:4},rn:{firstDay:1,weekend:[6,7],minimalDays:1},ro:{firstDay:1,weekend:[6,7],minimalDays:1},"ro-MD":{firstDay:1,weekend:[6,7],minimalDays:1},rof:{firstDay:1,weekend:[6,7],minimalDays:1},ru:{firstDay:1,weekend:[6,7],minimalDays:4},"ru-BY":{firstDay:1,weekend:[6,7],minimalDays:1},"ru-KG":{firstDay:1,weekend:[6,7],minimalDays:1},"ru-KZ":{firstDay:1,weekend:[6,7],minimalDays:1},"ru-MD":{firstDay:1,weekend:[6,7],minimalDays:1},"ru-UA":{firstDay:1,weekend:[6,7],minimalDays:1},rw:{firstDay:1,weekend:[6,7],minimalDays:1},rwk:{firstDay:1,weekend:[6,7],minimalDays:1},sa:{firstDay:7,weekend:[7],minimalDays:1},sah:{firstDay:1,weekend:[6,7],minimalDays:4},saq:{firstDay:7,weekend:[6,7],minimalDays:1},sat:{firstDay:7,weekend:[7],minimalDays:1},"sat-Deva":{firstDay:7,weekend:[7],minimalDays:1},"sat-Olck":{firstDay:7,weekend:[7],minimalDays:1},sbp:{firstDay:1,weekend:[6,7],minimalDays:1},sc:{firstDay:1,weekend:[6,7],minimalDays:4},scn:{firstDay:1,weekend:[6,7],minimalDays:4},sd:{firstDay:7,weekend:[6,7],minimalDays:1},"sd-Arab":{firstDay:7,weekend:[6,7],minimalDays:1},"sd-Deva":{firstDay:7,weekend:[7],minimalDays:1},sdh:{firstDay:6,weekend:[5],minimalDays:1},"sdh-IQ":{firstDay:6,weekend:[5,6],minimalDays:1},se:{firstDay:1,weekend:[6,7],minimalDays:4},"se-FI":{firstDay:1,weekend:[6,7],minimalDays:4},"se-SE":{firstDay:1,weekend:[6,7],minimalDays:4},seh:{firstDay:7,weekend:[6,7],minimalDays:1},ses:{firstDay:1,weekend:[6,7],minimalDays:1},sg:{firstDay:1,weekend:[6,7],minimalDays:1},shi:{firstDay:1,weekend:[6,7],minimalDays:1},"shi-Latn":{firstDay:1,weekend:[6,7],minimalDays:1},"shi-Tfng":{firstDay:1,weekend:[6,7],minimalDays:1},shn:{firstDay:7,weekend:[6,7],minimalDays:1},"shn-TH":{firstDay:7,weekend:[6,7],minimalDays:1},si:{firstDay:1,weekend:[6,7],minimalDays:1},sid:{firstDay:7,weekend:[6,7],minimalDays:1},sk:{firstDay:1,weekend:[6,7],minimalDays:4},skr:{firstDay:7,weekend:[6,7],minimalDays:1},sl:{firstDay:1,weekend:[6,7],minimalDays:1},sma:{firstDay:1,weekend:[6,7],minimalDays:4},"sma-NO":{firstDay:1,weekend:[6,7],minimalDays:4},smj:{firstDay:1,weekend:[6,7],minimalDays:4},"smj-NO":{firstDay:1,weekend:[6,7],minimalDays:4},smn:{firstDay:1,weekend:[6,7],minimalDays:4},sms:{firstDay:1,weekend:[6,7],minimalDays:4},sn:{firstDay:7,weekend:[6,7],minimalDays:1},so:{firstDay:1,weekend:[6,7],minimalDays:1},"so-DJ":{firstDay:6,weekend:[6,7],minimalDays:1},"so-ET":{firstDay:7,weekend:[6,7],minimalDays:1},"so-KE":{firstDay:7,weekend:[6,7],minimalDays:1},sq:{firstDay:1,weekend:[6,7],minimalDays:1},"sq-MK":{firstDay:1,weekend:[6,7],minimalDays:1},"sq-XK":{firstDay:1,weekend:[6,7],minimalDays:1},sr:{firstDay:1,weekend:[6,7],minimalDays:1},"sr-Cyrl":{firstDay:1,weekend:[6,7],minimalDays:1},"sr-Cyrl-BA":{firstDay:1,weekend:[6,7],minimalDays:1},"sr-Cyrl-ME":{firstDay:1,weekend:[6,7],minimalDays:1},"sr-Cyrl-XK":{firstDay:1,weekend:[6,7],minimalDays:1},"sr-Latn":{firstDay:1,weekend:[6,7],minimalDays:1},"sr-Latn-BA":{firstDay:1,weekend:[6,7],minimalDays:1},"sr-Latn-ME":{firstDay:1,weekend:[6,7],minimalDays:1},"sr-Latn-XK":{firstDay:1,weekend:[6,7],minimalDays:1},ss:{firstDay:7,weekend:[6,7],minimalDays:1},"ss-SZ":{firstDay:1,weekend:[6,7],minimalDays:1},ssy:{firstDay:1,weekend:[6,7],minimalDays:1},st:{firstDay:7,weekend:[6,7],minimalDays:1},"st-LS":{firstDay:1,weekend:[6,7],minimalDays:1},su:{firstDay:7,weekend:[6,7],minimalDays:1},"su-Latn":{firstDay:7,weekend:[6,7],minimalDays:1},sv:{firstDay:1,weekend:[6,7],minimalDays:4},"sv-AX":{firstDay:1,weekend:[6,7],minimalDays:4},"sv-FI":{firstDay:1,weekend:[6,7],minimalDays:4},sw:{firstDay:1,weekend:[6,7],minimalDays:1},"sw-CD":{firstDay:1,weekend:[6,7],minimalDays:1},"sw-KE":{firstDay:7,weekend:[6,7],minimalDays:1},"sw-UG":{firstDay:1,weekend:[7],minimalDays:1},syr:{firstDay:6,weekend:[5,6],minimalDays:1},"syr-SY":{firstDay:6,weekend:[5,6],minimalDays:1},szl:{firstDay:1,weekend:[6,7],minimalDays:4},ta:{firstDay:7,weekend:[7],minimalDays:1},"ta-LK":{firstDay:1,weekend:[6,7],minimalDays:1},"ta-MY":{firstDay:1,weekend:[6,7],minimalDays:1},"ta-SG":{firstDay:7,weekend:[6,7],minimalDays:1},te:{firstDay:7,weekend:[7],minimalDays:1},teo:{firstDay:1,weekend:[7],minimalDays:1},"teo-KE":{firstDay:7,weekend:[6,7],minimalDays:1},tg:{firstDay:1,weekend:[6,7],minimalDays:1},th:{firstDay:7,weekend:[6,7],minimalDays:1},ti:{firstDay:7,weekend:[6,7],minimalDays:1},"ti-ER":{firstDay:1,weekend:[6,7],minimalDays:1},tig:{firstDay:1,weekend:[6,7],minimalDays:1},tk:{firstDay:1,weekend:[6,7],minimalDays:1},tn:{firstDay:7,weekend:[6,7],minimalDays:1},"tn-BW":{firstDay:7,weekend:[6,7],minimalDays:1},to:{firstDay:1,weekend:[6,7],minimalDays:1},tok:{firstDay:1,weekend:[6,7],minimalDays:1},tpi:{firstDay:1,weekend:[6,7],minimalDays:1},tr:{firstDay:1,weekend:[6,7],minimalDays:1},"tr-CY":{firstDay:1,weekend:[6,7],minimalDays:1},trv:{firstDay:7,weekend:[6,7],minimalDays:1},trw:{firstDay:7,weekend:[6,7],minimalDays:1},ts:{firstDay:7,weekend:[6,7],minimalDays:1},tt:{firstDay:1,weekend:[6,7],minimalDays:4},twq:{firstDay:1,weekend:[6,7],minimalDays:1},tyv:{firstDay:1,weekend:[6,7],minimalDays:4},tzm:{firstDay:1,weekend:[6,7],minimalDays:1},ug:{firstDay:1,weekend:[6,7],minimalDays:1},uk:{firstDay:1,weekend:[6,7],minimalDays:1},und:{firstDay:7,weekend:[6,7],minimalDays:1},ur:{firstDay:7,weekend:[6,7],minimalDays:1},"ur-IN":{firstDay:7,weekend:[7],minimalDays:1},uz:{firstDay:1,weekend:[6,7],minimalDays:1},"uz-Arab":{firstDay:6,weekend:[4,5],minimalDays:1},"uz-Cyrl":{firstDay:1,weekend:[6,7],minimalDays:1},"uz-Latn":{firstDay:1,weekend:[6,7],minimalDays:1},vai:{firstDay:1,weekend:[6,7],minimalDays:1},"vai-Latn":{firstDay:1,weekend:[6,7],minimalDays:1},"vai-Vaii":{firstDay:1,weekend:[6,7],minimalDays:1},ve:{firstDay:7,weekend:[6,7],minimalDays:1},vec:{firstDay:1,weekend:[6,7],minimalDays:4},vi:{firstDay:1,weekend:[6,7],minimalDays:1},vmw:{firstDay:7,weekend:[6,7],minimalDays:1},vo:{firstDay:1,weekend:[6,7],minimalDays:1},vun:{firstDay:1,weekend:[6,7],minimalDays:1},wa:{firstDay:1,weekend:[6,7],minimalDays:4},wae:{firstDay:1,weekend:[6,7],minimalDays:4},wal:{firstDay:7,weekend:[6,7],minimalDays:1},wbp:{firstDay:1,weekend:[6,7],minimalDays:1},wo:{firstDay:1,weekend:[6,7],minimalDays:1},xh:{firstDay:7,weekend:[6,7],minimalDays:1},xnr:{firstDay:7,weekend:[7],minimalDays:1},xog:{firstDay:1,weekend:[7],minimalDays:1},yav:{firstDay:1,weekend:[6,7],minimalDays:1},yi:{firstDay:1,weekend:[6,7],minimalDays:1},yo:{firstDay:1,weekend:[6,7],minimalDays:1},"yo-BJ":{firstDay:1,weekend:[6,7],minimalDays:1},yrl:{firstDay:7,weekend:[6,7],minimalDays:1},"yrl-CO":{firstDay:7,weekend:[6,7],minimalDays:1},"yrl-VE":{firstDay:7,weekend:[6,7],minimalDays:1},yue:{firstDay:7,weekend:[6,7],minimalDays:1},"yue-Hans":{firstDay:1,weekend:[6,7],minimalDays:1},"yue-Hant":{firstDay:7,weekend:[6,7],minimalDays:1},za:{firstDay:1,weekend:[6,7],minimalDays:1},zgh:{firstDay:1,weekend:[6,7],minimalDays:1},zh:{firstDay:1,weekend:[6,7],minimalDays:1},"zh-Hans":{firstDay:1,weekend:[6,7],minimalDays:1},"zh-Hans-HK":{firstDay:7,weekend:[6,7],minimalDays:1},"zh-Hans-MO":{firstDay:7,weekend:[6,7],minimalDays:1},"zh-Hans-SG":{firstDay:7,weekend:[6,7],minimalDays:1},"zh-Hant":{firstDay:7,weekend:[6,7],minimalDays:1},"zh-Hant-HK":{firstDay:7,weekend:[6,7],minimalDays:1},"zh-Hant-MO":{firstDay:7,weekend:[6,7],minimalDays:1},zu:{firstDay:7,weekend:[6,7],minimalDays:1}};function rt(e){const t=e.getFullYear(),i=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return`${t}-${i}-${n}`}function ss(e){return Vt(e,new Date)}function Vt(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function Pd(e){const t=[0,1,2,3,4,5,6],i=e%7;return[...t.slice(i),...t.slice(0,i)]}function as(e){const t=Td[e??"en"]||{firstDay:0};return Pd(t.firstDay)}function xd(e){const t=new Intl.DateTimeFormat(e,{weekday:"narrow"}),i=new Date(2025,10,30);return as(e).map(n=>{const s=new Date(i);return s.setDate(i.getDate()+n),t.format(s)})}function gt(e,t,i){for(let n=0;n<i;n++){const s=new Date(t.getFullYear(),t.getMonth()+n,1);if(e.getMonth()===s.getMonth()&&e.getFullYear()===s.getFullYear())return!0}return!1}function Md(e,t,i="long"){return new Intl.DateTimeFormat(e,{month:i,year:"numeric"}).formatToParts(t).filter(s=>s.type==="month"||s.type==="year")}function rs(e,t){const i=e||"en-US",r=new Intl.DateTimeFormat(i,{day:"numeric"}).formatToParts(t).find(a=>a.type==="day");return r?r.value:t.getDate().toString()}function Mi(e,t){const i=rt(e),n=rt(t);return i===n?{start:i}:{start:i,end:n}}function os(e){return e.length?e.map(n=>({start:new Date(n.start).getTime(),end:new Date(n.end??n.start).getTime()})).sort((n,s)=>n.start-s.start).reduce((n,s)=>{const r=n[n.length-1];if(r){const a=new Date(r.end);if(a.setDate(a.getDate()+1),s.start<=a.getTime())return r.end=Math.max(r.end,s.end),n}return[...n,s]},[]).map(n=>Mi(new Date(n.start),new Date(n.end))):[]}class Fe{constructor(t,i){t.addController(this),this.getTargets=i.getTargets,this.getState=i.getState}hostConnected(){}hostUpdated(){const t=this.getTargets();if(!t)return;let i=[];t instanceof NodeList?i=Array.from(t):Array.isArray(t)?i=t:i=[t];const{uid:n,templateData:s}=this.getState(),{touched:r,errors:a,readonly:o,disabled:l,hint:d}=s,c=r&&a&&a.length>0;vt.filterTap(i,h=>!!h,h=>{const p=(m,f)=>{f?h.setAttribute(m,f):h.removeAttribute(m)};p("aria-describedby",d?`${n}_hint`:null),p("aria-invalid",c?"true":null),p("aria-errormessage",c?`${n}_errors`:null),p("aria-readonly",l||o?"true":null)})}}const{I:Ld}=vd,ls=e=>e,Nd=e=>e.strings===void 0,ds=()=>document.createComment(""),Ut=(e,t,i)=>{const n=e._$AA.parentNode,s=t===void 0?e._$AB:t._$AA;if(i===void 0){const r=n.insertBefore(ds(),s),a=n.insertBefore(ds(),s);i=new Ld(r,a,e,e.options)}else{const r=i._$AB.nextSibling,a=i._$AM,o=a!==e;if(o){let l;i._$AQ?.(e),i._$AM=e,i._$AP!==void 0&&(l=e._$AU)!==a._$AU&&i._$AP(l)}if(r!==s||o){let l=i._$AA;for(;l!==r;){const d=ls(l).nextSibling;ls(n).insertBefore(l,s),l=d}}}return i},bt=(e,t,i=e)=>(e._$AI(t,i),e),zd={},us=(e,t=zd)=>e._$AH=t,Fd=e=>e._$AH,Li=e=>{e._$AR(),e._$AA.remove()};const cs=(e,t,i)=>{const n=new Map;for(let s=t;s<=i;s++)n.set(e[s],s);return n},it=Zt(class extends qt{constructor(e){if(super(e),e.type!==tt.CHILD)throw Error("repeat() can only be used in text expressions")}dt(e,t,i){let n;i===void 0?i=t:t!==void 0&&(n=t);const s=[],r=[];let a=0;for(const o of e)s[a]=n?n(o,a):a,r[a]=i(o,a),a++;return{values:r,keys:s}}render(e,t,i){return this.dt(e,t,i).values}update(e,[t,i,n]){const s=Fd(e),{values:r,keys:a}=this.dt(t,i,n);if(!Array.isArray(s))return this.ut=a,r;const o=this.ut??=[],l=[];let d,c,h=0,p=s.length-1,m=0,f=r.length-1;for(;h<=p&&m<=f;)if(s[h]===null)h++;else if(s[p]===null)p--;else if(o[h]===a[m])l[m]=bt(s[h],r[m]),h++,m++;else if(o[p]===a[f])l[f]=bt(s[p],r[f]),p--,f--;else if(o[h]===a[f])l[f]=bt(s[h],r[f]),Ut(e,l[f+1],s[h]),h++,f--;else if(o[p]===a[m])l[m]=bt(s[p],r[m]),Ut(e,s[h],s[p]),p--,m++;else if(d===void 0&&(d=cs(a,m,f),c=cs(o,h,p)),d.has(o[h]))if(d.has(o[p])){const w=c.get(a[m]),S=w!==void 0?s[w]:null;if(S===null){const T=Ut(e,s[h]);bt(T,r[m]),l[m]=T}else l[m]=bt(S,r[m]),Ut(e,s[h],S),s[w]=null;m++}else Li(s[p]),p--;else Li(s[h]),h++;for(;m<=f;){const w=Ut(e,l[f+1]);bt(w,r[m]),l[m++]=w}for(;h<=p;){const w=s[h++];w!==null&&Li(w)}return this.ut=a,us(e,l),ze}}),Ge=(e,t,i=!1,n=void 0,s=!0)=>s?t.label?v`<label
|
|
21
21
|
class="gui-label"
|
|
22
22
|
for=${e}
|
|
23
23
|
data-cy=${`${e}_label`}
|
|
24
24
|
id=${n?`${e}_${n}_label`:`${e}_label`}
|
|
25
25
|
>
|
|
26
|
-
${t.label+(t.required?" *":"")} ${
|
|
26
|
+
${t.label+(t.required?" *":"")} ${hs(e,t)}
|
|
27
27
|
${i?Ee(e,t):_}
|
|
28
28
|
</label>`:_:t.label?v`<span
|
|
29
29
|
class="gui-label"
|
|
30
30
|
data-cy=${`${e}_label`}
|
|
31
31
|
id=${n?`${e}_${n}_label`:`${e}_label`}
|
|
32
32
|
>
|
|
33
|
-
${t.label+(t.required?" *":"")} ${
|
|
33
|
+
${t.label+(t.required?" *":"")} ${hs(e,t)}
|
|
34
34
|
${i?Ee(e,t):_}
|
|
35
|
-
</span>`:_,
|
|
35
|
+
</span>`:_,hs=(e,t)=>t.hint?v`<div class="gui-widget-hint" id=${`${e}_hint`}>${t.hint}</div>`:v``,hi=(e,t)=>{const i={[`gui-${e}--icon`]:!1,[`gui-${e}--icon-right`]:!1};if(t.icon){i[`gui-${e}--icon`]=!0;const n={"gui-widget-icon":!0,[t.icon]:!0};return{widgetClasses:i,html:v`<span class=${fe(n)} data-icon=${t.icon}></span>`}}else return{widgetClasses:i,html:v``}},Ee=(e,t)=>{const i=t.touched&&t.errors&&t.errors.length>0;return v`${i?v`<ul class="gui-validator" id=${`${e}_errors`} data-cy=${`${e}_validator-errors`}>
|
|
36
36
|
${t.errors?.map(n=>v`<li class="gui-validator__error" role="alert" data-cy=${`${e}_validator-error`}>
|
|
37
37
|
${n}
|
|
38
38
|
</li>`)}
|
|
@@ -154,7 +154,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
154
154
|
</div>
|
|
155
155
|
`)}
|
|
156
156
|
</div>
|
|
157
|
-
`}chunkYears(t){const i=[];for(let n=0;n<t.length;n+=4)i.push(t.slice(n,n+4));return i}toggleYearSelector(){this._yearSelectorOpen=!this._yearSelectorOpen,this._yearSelectorOpen&&this.updateComplete.then(()=>{this.scrollToCurrentYear(),this.focusCurrentYearButton()})}selectYear(t){this.querySelector(".gui-calendar__year-selector")?.focus();const n=this._currentDate;this._currentDate=new Date(t,n.getMonth(),1),this._yearSelectorOpen=!1,this.updateComplete.then(()=>{this.querySelector('.gui-calendar__day-button[tabindex="0"]')?.focus()})}scrollToCurrentYear(){const t=this.querySelector(".gui-calendar__year-grid"),i=this.querySelector(".gui-calendar__year-button.current");if(t&&i){const n=t.getBoundingClientRect(),s=i.getBoundingClientRect(),r=t.scrollTop+(s.top-n.top)-n.height/2+s.height/2;t.scrollTop=Math.max(0,r)}}focusCurrentYearButton(){this.querySelector(".gui-calendar__year-button.current")?.focus()}handleYearKeydown(t){const i=t.target;if(!i.classList.contains("gui-calendar__year-button"))return;const n=Array.from(this.querySelectorAll(".gui-calendar__year-button")),s=n.indexOf(i),r=window.getComputedStyle(this).direction==="rtl";let a=0;switch(t.key){case"ArrowLeft":a=r?1:-1;break;case"ArrowRight":a=r?-1:1;break;case"ArrowUp":a=-4;break;case"ArrowDown":a=4;break;case"Enter":case" ":{t.preventDefault();const l=parseInt(i.dataset.year??"",10);isNaN(l)||this.selectYear(l);return}case"Escape":{t.preventDefault(),this.querySelector(".gui-calendar__year-selector")?.focus(),this._yearSelectorOpen=!1;return}default:return}t.preventDefault();const o=s+a;o>=0&&o<n.length&&n[o].focus()}get _effectiveMinYear(){return this.minDate?new Date(this.minDate).getFullYear():1900}get _effectiveMaxYear(){return this.maxDate?new Date(this.maxDate).getFullYear():2099}get _yearList(){const t=[];for(let i=this._effectiveMinYear;i<=this._effectiveMaxYear;i++)t.push(i);return t}async handleKeydown(t,i){if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t.key)&&t.key!==" "&&t.key!=="Enter")return;const s=Array.from(this.querySelectorAll(".gui-calendar__day-button:not(.other-month)")),r=s.indexOf(t.target),a=window.getComputedStyle(this).direction==="rtl";let o=0;switch(t.key){case"ArrowLeft":o=a?1:-1;break;case"ArrowRight":o=a?-1:1;break;case"ArrowUp":o=-7;break;case"ArrowDown":o=7;break;case" ":case"Enter":t.preventDefault(),this.selectDate(i,t);return}t.preventDefault();const l=this.findNextFocusableIndex(r,o,s);let d=!1;if(l<0)if(this.canGoPrev())this.prevMonth(),d=!0;else{s.find(h=>!this.isButtonDisabled(h))?.focus();return}else if(l>=s.length)if(this.canGoNext())this.nextMonth(),d=!0;else{[...s].reverse().find(p=>!this.isButtonDisabled(p))?.focus();return}if(d){await this.updateComplete;const c=Array.from(this.querySelectorAll(".gui-calendar__day-button:not(.other-month)")),h=Array.from(this.querySelectorAll(".gui-calendar__panel"));let p;if(l<0)p=h[0].querySelectorAll(".gui-calendar__day-button:not(.other-month)").length+l;else{const f=h[h.length-1].querySelectorAll(".gui-calendar__day-button:not(.other-month)").length;p=c.length-f+(l-s.length)}if(this.isButtonDisabled(c[p])){const m=this.findNextFocusableIndex(p,o,c);if(m<0||m>=c.length){const f=c.findIndex(w=>!this.isButtonDisabled(w));f>-1&&c[f].focus()}else c[m]?.focus()}else{const m=Math.max(0,Math.min(p,c.length-1));c[m]?.focus()}}else s[l]?.focus()}chunkDays(t){const i=[];for(let n=0;n<t.length;n+=7)i.push(t.slice(n,n+7));return i}onFocusOut(t){t.relatedTarget&&this.contains(t.relatedTarget)||(this._blurRafId!==void 0&&cancelAnimationFrame(this._blurRafId),this._blurRafId=requestAnimationFrame(()=>{this._blurRafId=void 0,this.contains(document.activeElement)||this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}))}disconnectedCallback(){super.disconnectedCallback(),this._blurRafId!==void 0&&cancelAnimationFrame(this._blurRafId)}isDisabled(t){const i=rt(t);if(this.minDate&&i<this.minDate||this.maxDate&&i>this.maxDate)return!0;if(this.disabledRanges&&this.disabledRanges.length>0)for(const n of this.disabledRanges){const s=n.start.split("T")[0],r=n.end?n.end.split("T")[0]:s;if(i>=s&&i<=r)return!0}return!1}prevMonth(){const t=this._currentDate;this._currentDate=new Date(t.getFullYear(),t.getMonth()-1,1)}nextMonth(){const t=this._currentDate;this._currentDate=new Date(t.getFullYear(),t.getMonth()+1,1)}generateDateGrid(t=0){const i=this._currentDate.getFullYear(),n=this._currentDate.getMonth()+t,s=new Date(i,n,1),r=s.getDay(),a=
|
|
157
|
+
`}chunkYears(t){const i=[];for(let n=0;n<t.length;n+=4)i.push(t.slice(n,n+4));return i}toggleYearSelector(){this._yearSelectorOpen=!this._yearSelectorOpen,this._yearSelectorOpen&&this.updateComplete.then(()=>{this.scrollToCurrentYear(),this.focusCurrentYearButton()})}selectYear(t){this.querySelector(".gui-calendar__year-selector")?.focus();const n=this._currentDate;this._currentDate=new Date(t,n.getMonth(),1),this._yearSelectorOpen=!1,this.updateComplete.then(()=>{this.querySelector('.gui-calendar__day-button[tabindex="0"]')?.focus()})}scrollToCurrentYear(){const t=this.querySelector(".gui-calendar__year-grid"),i=this.querySelector(".gui-calendar__year-button.current");if(t&&i){const n=t.getBoundingClientRect(),s=i.getBoundingClientRect(),r=t.scrollTop+(s.top-n.top)-n.height/2+s.height/2;t.scrollTop=Math.max(0,r)}}focusCurrentYearButton(){this.querySelector(".gui-calendar__year-button.current")?.focus()}handleYearKeydown(t){const i=t.target;if(!i.classList.contains("gui-calendar__year-button"))return;const n=Array.from(this.querySelectorAll(".gui-calendar__year-button")),s=n.indexOf(i),r=window.getComputedStyle(this).direction==="rtl";let a=0;switch(t.key){case"ArrowLeft":a=r?1:-1;break;case"ArrowRight":a=r?-1:1;break;case"ArrowUp":a=-4;break;case"ArrowDown":a=4;break;case"Enter":case" ":{t.preventDefault();const l=parseInt(i.dataset.year??"",10);isNaN(l)||this.selectYear(l);return}case"Escape":{t.preventDefault(),this.querySelector(".gui-calendar__year-selector")?.focus(),this._yearSelectorOpen=!1;return}default:return}t.preventDefault();const o=s+a;o>=0&&o<n.length&&n[o].focus()}get _effectiveMinYear(){return this.minDate?new Date(this.minDate).getFullYear():1900}get _effectiveMaxYear(){return this.maxDate?new Date(this.maxDate).getFullYear():2099}get _yearList(){const t=[];for(let i=this._effectiveMinYear;i<=this._effectiveMaxYear;i++)t.push(i);return t}async handleKeydown(t,i){if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t.key)&&t.key!==" "&&t.key!=="Enter")return;const s=Array.from(this.querySelectorAll(".gui-calendar__day-button:not(.other-month)")),r=s.indexOf(t.target),a=window.getComputedStyle(this).direction==="rtl";let o=0;switch(t.key){case"ArrowLeft":o=a?1:-1;break;case"ArrowRight":o=a?-1:1;break;case"ArrowUp":o=-7;break;case"ArrowDown":o=7;break;case" ":case"Enter":t.preventDefault(),this.selectDate(i,t);return}t.preventDefault();const l=this.findNextFocusableIndex(r,o,s);let d=!1;if(l<0)if(this.canGoPrev())this.prevMonth(),d=!0;else{s.find(h=>!this.isButtonDisabled(h))?.focus();return}else if(l>=s.length)if(this.canGoNext())this.nextMonth(),d=!0;else{[...s].reverse().find(p=>!this.isButtonDisabled(p))?.focus();return}if(d){await this.updateComplete;const c=Array.from(this.querySelectorAll(".gui-calendar__day-button:not(.other-month)")),h=Array.from(this.querySelectorAll(".gui-calendar__panel"));let p;if(l<0)p=h[0].querySelectorAll(".gui-calendar__day-button:not(.other-month)").length+l;else{const f=h[h.length-1].querySelectorAll(".gui-calendar__day-button:not(.other-month)").length;p=c.length-f+(l-s.length)}if(this.isButtonDisabled(c[p])){const m=this.findNextFocusableIndex(p,o,c);if(m<0||m>=c.length){const f=c.findIndex(w=>!this.isButtonDisabled(w));f>-1&&c[f].focus()}else c[m]?.focus()}else{const m=Math.max(0,Math.min(p,c.length-1));c[m]?.focus()}}else s[l]?.focus()}chunkDays(t){const i=[];for(let n=0;n<t.length;n+=7)i.push(t.slice(n,n+7));return i}onFocusOut(t){t.relatedTarget&&this.contains(t.relatedTarget)||(this._blurRafId!==void 0&&cancelAnimationFrame(this._blurRafId),this._blurRafId=requestAnimationFrame(()=>{this._blurRafId=void 0,this.contains(document.activeElement)||this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}))}disconnectedCallback(){super.disconnectedCallback(),this._blurRafId!==void 0&&cancelAnimationFrame(this._blurRafId)}isDisabled(t){const i=rt(t);if(this.minDate&&i<this.minDate||this.maxDate&&i>this.maxDate)return!0;if(this.disabledRanges&&this.disabledRanges.length>0)for(const n of this.disabledRanges){const s=n.start.split("T")[0],r=n.end?n.end.split("T")[0]:s;if(i>=s&&i<=r)return!0}return!1}prevMonth(){const t=this._currentDate;this._currentDate=new Date(t.getFullYear(),t.getMonth()-1,1)}nextMonth(){const t=this._currentDate;this._currentDate=new Date(t.getFullYear(),t.getMonth()+1,1)}generateDateGrid(t=0){const i=this._currentDate.getFullYear(),n=this._currentDate.getMonth()+t,s=new Date(i,n,1),r=s.getDay(),a=as(this.localeId)[0],o=(r-a+7)%7,l=new Date(s);l.setDate(s.getDate()-o);const d=[];for(let c=0;c<42;c++){const h=new Date(l);h.setDate(l.getDate()+c),d.push(h)}return d}findNextFocusableIndex(t,i,n){let s=t+i;for(;s>=0&&s<n.length;){const r=n[s];if(!this.isButtonDisabled(r))return s;s+=i}return s}isButtonDisabled(t){return t?t.hasAttribute("disabled"):!0}canGoPrev(){if(!this.minDate)return!0;const t=new Date(this._currentDate.getFullYear(),this._currentDate.getMonth(),0);return rt(t)>=this.minDate}canGoNext(){if(!this.maxDate)return!0;const t=(this.numberOfMonths??1)-1,i=new Date(this._currentDate.getFullYear(),this._currentDate.getMonth()+t+1,1);return rt(i)<=this.maxDate}}te([u({type:String})],V.prototype,"uid"),te([u({type:String})],V.prototype,"label"),te([u({type:String})],V.prototype,"hint"),te([u({type:String,attribute:"locale-id"})],V.prototype,"localeId"),te([u({type:Array})],V.prototype,"errors"),te([u({type:Boolean})],V.prototype,"touched"),te([u({type:Boolean})],V.prototype,"required"),te([u({type:Boolean})],V.prototype,"disabled"),te([u({type:Boolean,attribute:"readonly"})],V.prototype,"readOnly"),te([u({type:String,attribute:"prev-month-icon"})],V.prototype,"prevMonthIcon"),te([u({type:String,attribute:"next-month-icon"})],V.prototype,"nextMonthIcon"),te([u({type:String,attribute:"prev-month-aria-label"})],V.prototype,"prevMonthAriaLabel"),te([u({type:String,attribute:"next-month-aria-label"})],V.prototype,"nextMonthAriaLabel"),te([u({type:String})],V.prototype,"dayFormat"),te([u({type:String})],V.prototype,"weekdayFormat"),te([u({type:String})],V.prototype,"monthFormat"),te([u({type:String})],V.prototype,"minDate"),te([u({type:String})],V.prototype,"maxDate"),te([u({type:Array})],V.prototype,"disabledRanges"),te([u({type:Number})],V.prototype,"numberOfMonths"),te([Y()],V.prototype,"_currentDate"),te([Y()],V.prototype,"_yearSelectorOpen");var Bd=Object.defineProperty,jd=Object.getOwnPropertyDescriptor,ps=(e,t,i,n)=>{for(var s=n>1?void 0:n?jd(t,i):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(s=(n?a(t,i,s):a(s))||s);return n&&s&&Bd(t,i,s),s};let pi=class extends V{constructor(){super(...arguments),this.value=void 0}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}willUpdate(e){if(e.has("value")&&this.value){const t=new Date(this.value);!isNaN(t.getTime())&&!gt(t,this._currentDate,this.numberOfMonths??1)&&(this._currentDate=t)}}renderDay(e){const t={"gui-calendar__day-button":!0,today:e.isToday,selected:e.isSelected,disabled:e.isDisabled,"other-month":!e.isCurrentMonth};return v`
|
|
158
158
|
<button
|
|
159
159
|
type="button"
|
|
160
160
|
role="gridcell"
|
|
@@ -168,7 +168,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
168
168
|
>
|
|
169
169
|
${e.dayLabel}
|
|
170
170
|
</button>
|
|
171
|
-
`}getDaysInMonth(e){const t=new Date(this._currentDate);t.setDate(1),t.setMonth(t.getMonth()+e);const i=this.generateDateGrid(e),n=t.getMonth();let s=i.map(r=>{const a=r.getMonth()===n,o=this.isDisabled(r),l=!!this.value&&
|
|
171
|
+
`}getDaysInMonth(e){const t=new Date(this._currentDate);t.setDate(1),t.setMonth(t.getMonth()+e);const i=this.generateDateGrid(e),n=t.getMonth();let s=i.map(r=>{const a=r.getMonth()===n,o=this.isDisabled(r),l=!!this.value&&Vt(r,new Date(this.value)),d=ss(r),c=(l||d)&&a;return{date:r,dayLabel:rs(this.localeId,r),isCurrentMonth:a,isToday:d,isDisabled:o,isSelected:l,isFocusable:c}});for(let r=0;r<2;r++)s.slice(-7).every(o=>!o.isCurrentMonth)&&(s=s.slice(0,-7));if(e===0&&!s.some(r=>r.isFocusable)){const r=this.value?new Date(this.value):new Date;if(!gt(r,this._currentDate,this.numberOfMonths??1)){const a=s.find(o=>o.isCurrentMonth&&!o.isDisabled);a&&(a.isFocusable=!0)}}return s}selectDate(e){if(!e.isCurrentMonth||e.isDisabled||this.disabled||this.readOnly)return;const t=rt(e.date);this.value=t,this.dispatchEvent(new CustomEvent("change",{detail:{value:t},bubbles:!0,composed:!0}))}};ps([u({type:String})],pi.prototype,"value",2),pi=ps([ue("gui-calendar")],pi),typeof customElements<"u"&&!customElements.get("gui-calendar")&&customElements.define("gui-calendar",pi);function Zd(e){const t=e.widget,{uid:i,errors:n,value:s,isTouched:r,templateData:a,onBlur:o,onValueChanged:l}=x.useInputWidget(t),d=g.useCallback(H=>{const K=H,W=J=>l(J.detail.value),G=J=>{o()};return H&&(K.addEventListener("blur",G),K.addEventListener("change",W)),()=>{K.removeEventListener("blur",G),K.removeEventListener("change",W)}},[l,o]),c=a.label,h=a.hint,p=a.prevMonthIcon,m=a.nextMonthIcon,f=a.prevMonthAriaLabel,w=a.nextMonthAriaLabel,S=a.dayFormat,T=a.weekdayFormat,C=a.monthFormat,I=a.minDate,A=a.maxDate,D=a.disabledRanges,k=a.numberOfMonths,P=a.lang,O=a.disabled,E=a.readonly,B=a.validator?.required;return y.jsx("div",{className:"gui-calendar gui-field",style:{flex:a.size},children:y.jsx("gui-calendar",{ref:d,uid:i,label:c,hint:h,errors:n,touched:r,required:B,disabled:O,readOnly:E,value:s,prevMonthIcon:p,nextMonthIcon:m,prevMonthAriaLabel:f,nextMonthAriaLabel:w,dayFormat:S,weekdayFormat:T,monthFormat:C,minDate:I,maxDate:A,disabledRanges:D,numberOfMonths:k,localeId:P})})}const qd=Object.freeze(Object.defineProperty({__proto__:null,Calendar:Zd},Symbol.toStringTag,{value:"Module"}));var Vd=Object.defineProperty,Ud=Object.getOwnPropertyDescriptor,re=(e,t,i,n)=>{for(var s=n>1?void 0:n?Ud(t,i):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(s=(n?a(t,i,s):a(s))||s);return n&&s&&Vd(t,i,s),s};let ie=class extends ee{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId=void 0,this.errors=[],this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.currency=void 0,this.step=void 0,this.maximumFractionDigits=void 0,this.minimumFractionDigits=void 0,this.hint=void 0,this.icon=void 0,this.placeholder=void 0,this.autocomplete=void 0,this.ariaController=new Fe(this,{getTargets:()=>this.querySelectorAll(`input[id="${this.uid}"]`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}willUpdate(e){e.has("value")&&document.activeElement!==this.inputElement&&(this.displayValue=this.formatCurrency(this.value))}render(){super.render();const e={uid:this.uid,label:this.label,hint:this.hint,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,currency:this.currency,maximumFractionDigits:this.maximumFractionDigits,minimumFractionDigits:this.minimumFractionDigits,icon:this.icon,placeholder:this.placeholder,autocomplete:this.autocomplete};this.displayValue=this.formatCurrency(this.value);const t=hi("currency",e),i={"gui-currency--icon":!!this.icon};return v`
|
|
172
172
|
${Ge(this.uid,e)}
|
|
173
173
|
|
|
174
174
|
<div class="gui-widget">
|
|
@@ -198,7 +198,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
198
198
|
</div>
|
|
199
199
|
|
|
200
200
|
${Ee(this.uid,e)}
|
|
201
|
-
`}handleInput(e){if(e.stopPropagation(),!this.readOnly){const t=e.target;this.displayValue=this.formatCurrency(t.valueAsNumber),this.dispatchEvent(new CustomEvent("input",{detail:{value:t.valueAsNumber},bubbles:!0,composed:!0}))}}handleFocus(){this.displayValue=this.formatCurrency(this.value)}handleBlur(){this.displayValue=this.formatCurrency(this.value),this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}formatCurrency(e){if(e===""||e===void 0||e===null||isNaN(e))return"";try{return new Intl.NumberFormat(this.localeId??"en",{style:"currency",currency:this.currency??"USD",maximumFractionDigits:this.maximumFractionDigits??Math.max(this.minimumFractionDigits??2,2),minimumFractionDigits:this.minimumFractionDigits??2}).format(e)}catch(t){return console.warn("Invalid locale or currency",t),e.toString()}}get separators(){const e=new Intl.NumberFormat(this.localeId??"en").format(1111.1);return{group:e.replace(/1/g,"").replace(/\d/g,"")[0]||",",decimal:e.replace(/1/g,"").replace(/\d/g,"").slice(-1)||"."}}};re([u({type:String})],ie.prototype,"uid",2),re([u({type:String})],ie.prototype,"label",2),re([u({type:String,attribute:"locale-id"})],ie.prototype,"localeId",2),re([u({type:Array})],ie.prototype,"errors",2),re([u({type:Boolean})],ie.prototype,"touched",2),re([u({type:Boolean})],ie.prototype,"required",2),re([u({type:Boolean})],ie.prototype,"disabled",2),re([u({type:Boolean,attribute:"readonly"})],ie.prototype,"readOnly",2),re([u({type:String})],ie.prototype,"value",2),re([u({type:String})],ie.prototype,"currency",2),re([u({type:String})],ie.prototype,"step",2),re([u({type:String})],ie.prototype,"maximumFractionDigits",2),re([u({type:String})],ie.prototype,"minimumFractionDigits",2),re([u({type:String})],ie.prototype,"hint",2),re([u({type:String})],ie.prototype,"icon",2),re([u({type:String})],ie.prototype,"placeholder",2),re([u({type:String})],ie.prototype,"autocomplete",2),re([Y()],ie.prototype,"displayValue",2),re([
|
|
201
|
+
`}handleInput(e){if(e.stopPropagation(),!this.readOnly){const t=e.target;this.displayValue=this.formatCurrency(t.valueAsNumber),this.dispatchEvent(new CustomEvent("input",{detail:{value:t.valueAsNumber},bubbles:!0,composed:!0}))}}handleFocus(){this.displayValue=this.formatCurrency(this.value)}handleBlur(){this.displayValue=this.formatCurrency(this.value),this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}formatCurrency(e){if(e===""||e===void 0||e===null||isNaN(e))return"";try{return new Intl.NumberFormat(this.localeId??"en",{style:"currency",currency:this.currency??"USD",maximumFractionDigits:this.maximumFractionDigits??Math.max(this.minimumFractionDigits??2,2),minimumFractionDigits:this.minimumFractionDigits??2}).format(e)}catch(t){return console.warn("Invalid locale or currency",t),e.toString()}}get separators(){const e=new Intl.NumberFormat(this.localeId??"en").format(1111.1);return{group:e.replace(/1/g,"").replace(/\d/g,"")[0]||",",decimal:e.replace(/1/g,"").replace(/\d/g,"").slice(-1)||"."}}};re([u({type:String})],ie.prototype,"uid",2),re([u({type:String})],ie.prototype,"label",2),re([u({type:String,attribute:"locale-id"})],ie.prototype,"localeId",2),re([u({type:Array})],ie.prototype,"errors",2),re([u({type:Boolean})],ie.prototype,"touched",2),re([u({type:Boolean})],ie.prototype,"required",2),re([u({type:Boolean})],ie.prototype,"disabled",2),re([u({type:Boolean,attribute:"readonly"})],ie.prototype,"readOnly",2),re([u({type:String})],ie.prototype,"value",2),re([u({type:String})],ie.prototype,"currency",2),re([u({type:String})],ie.prototype,"step",2),re([u({type:String})],ie.prototype,"maximumFractionDigits",2),re([u({type:String})],ie.prototype,"minimumFractionDigits",2),re([u({type:String})],ie.prototype,"hint",2),re([u({type:String})],ie.prototype,"icon",2),re([u({type:String})],ie.prototype,"placeholder",2),re([u({type:String})],ie.prototype,"autocomplete",2),re([Y()],ie.prototype,"displayValue",2),re([ns("input")],ie.prototype,"inputElement",2),ie=re([ue("gui-currency")],ie),typeof customElements<"u"&&!customElements.get("gui-currency")&&customElements.define("gui-currency",ie);function Hd(e){const t=e.widget,{uid:i,errors:n,value:s,isTouched:r,templateData:a,onValueChanged:o,onBlur:l}=x.useInputWidget(t),d=g.useCallback(P=>o(P.nativeEvent.detail.value),[o]),c=a.label,h=a.hint,p=a.placeholder,m=a.currency,f=a.step,w=a.maximumFractionDigits,S=a.minimumFractionDigits,T=a.autocomplete,C=a.icon,I=a.disabled,A=a.readonly,D=a.validator?.required,k=a.lang;return y.jsx("div",{className:"gui-currency gui-field",style:{flex:a.size},children:y.jsx("gui-currency",{uid:i,label:c,hint:h,errors:n,touched:r,required:D,disabled:I,readOnly:A,value:s,currency:m,step:f,maximumFractionDigits:w,minimumFractionDigits:S,icon:C,autocomplete:T??void 0,placeholder:p??void 0,localeId:k,onInput:d,onBlur:l})})}const Wd=Object.freeze(Object.defineProperty({__proto__:null,Currency:Hd},Symbol.toStringTag,{value:"Module"}));const ms=Zt(class extends qt{constructor(e){if(super(e),e.type!==tt.PROPERTY&&e.type!==tt.ATTRIBUTE&&e.type!==tt.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Nd(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===ze||t===_)return t;const i=e.element,n=e.name;if(e.type===tt.PROPERTY){if(t===i[n])return ze}else if(e.type===tt.BOOLEAN_ATTRIBUTE){if(!!t===i.hasAttribute(n))return ze}else if(e.type===tt.ATTRIBUTE&&i.getAttribute(n)===t+"")return ze;return us(e),t}});var Gd=Object.defineProperty,Yd=Object.getOwnPropertyDescriptor,Ie=(e,t,i,n)=>{for(var s=n>1?void 0:n?Yd(t,i):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(s=(n?a(t,i,s):a(s))||s);return n&&s&&Gd(t,i,s),s};let ge=class extends ee{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId=void 0,this.errors=[],this.showErrors=!0,this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.icon="",this.hint=void 0,this._day="",this._month="",this._year="",this.MIN_DAY=1,this.MAX_DAY=31,this.MAX_VALID_DAY=(e,t)=>e===2?new Date(t,1,29).getDate()===29||!t?29:28:e===4||e===6||e===9||e===11?30:31,this.MIN_MONTH=1,this.MAX_MONTH=12,this.MIN_YEAR=1e3,this.MAX_YEAR=9999,this.ariaController=new Fe(this,{getTargets:()=>this.querySelectorAll(".gui-date-input"),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}willUpdate(e){e.has("value")&&this.parseValue(this.value??"")}render(){const e={uid:this.uid,label:this.label,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,icon:this.icon,hint:this.hint},t=new Intl.DateTimeFormat(this.localeId??"en",{year:"numeric",month:"numeric",day:"numeric"}).formatToParts(new Date),i={"gui-widget-icon":!0,[this.icon]:!0};return v`
|
|
202
202
|
${this.label?Ge(this.uid,e):_}
|
|
203
203
|
|
|
204
204
|
<div class="gui-widget">
|
|
@@ -223,7 +223,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
223
223
|
?disabled=${this.disabled}
|
|
224
224
|
?readonly=${this.readOnly}
|
|
225
225
|
autocomplete="off"
|
|
226
|
-
.value=${
|
|
226
|
+
.value=${ms(s)}
|
|
227
227
|
@keydown=${this.handleKeyDown}
|
|
228
228
|
@keyup=${r=>this.handleKeyUp(r,e)}
|
|
229
229
|
@focus=${this.handleFocus}
|
|
@@ -232,7 +232,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
232
232
|
/>
|
|
233
233
|
<div class="gui-date-input__visual-underline"></div>
|
|
234
234
|
</div>
|
|
235
|
-
`}parseValue(e){if(!e){this._day="",this._month="",this._year="";return}const t=new Date(e);isNaN(t.getTime())||(this._day=t.getDate().toString().padStart(2,"0"),this._month=(t.getMonth()+1).toString().padStart(2,"0"),this._year=t.getFullYear().toString())}handleKeyDown(e){["Backspace","Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Delete","Enter"].includes(e.key)||e.ctrlKey||e.metaKey||this.readOnly||/^[0-9]$/.test(e.key)||e.preventDefault()}handleFocus(e){this.dispatchEvent(new CustomEvent("focus",{detail:e}))}handleKeyUp(e,t){if(this.readOnly)return;const i=window.getComputedStyle(this).direction==="rtl",n=e.target,s=Array.from(this.querySelectorAll("input")),r=s.indexOf(n);switch(n.value.length===n.maxLength&&/^[0-9]$/.test(e.key)&&(r===s.length-1?s[0].focus():s[r+1].focus()),e.key){case"ArrowUp":{const a=isNaN(parseInt(n.value,10)+1)?1:parseInt(n.value,10)+1;t==="year"&&(this._year=a.toString().padStart(4,"0")),t==="month"&&(this._month=a.toString().padStart(2,"0")),t==="day"&&(this._day=a.toString().padStart(2,"0")),n.select(),this.validateAndEmit();break}case"ArrowDown":{const a=isNaN(parseInt(n.value,10)-1)?1:parseInt(n.value,10)-1;t==="year"&&(this._year=a.toString().padStart(4,"0")),t==="month"&&(this._month=a.toString().padStart(2,"0")),t==="day"&&(this._day=a.toString().padStart(2,"0")),n.select(),this.validateAndEmit();break}case"ArrowLeft":{const a=i?r+1:r-1;a>=0&&a<s.length&&(s[a].focus(),s[a].select());break}case"ArrowRight":{const a=i?r-1:r+1;a>=0&&a<s.length&&(s[a].focus(),s[a].select());break}}}handleChange(e,t){if(e.stopImmediatePropagation(),this.readOnly)return;const n=e.target.value.replace(/[^0-9]/g,"");switch(t){case"day":this._day=n;break;case"month":this._month=n;break;case"year":this._year=n;break}this.validateAndEmit()}handleBlur(e,t){const i=e.target,n=parseInt(i.value,10);if(!isNaN(n)&&n>0){const s=t==="year"?4:2;i.value=n.toString().padStart(s,"0")}else this.dispatchEvent(new CustomEvent("change",{detail:{value:null}}));this.dispatchEvent(new CustomEvent("blur"))}validateAndEmit(){let e=parseInt(this._year,10),t=parseInt(this._month,10),i=parseInt(this._day,10);e>this.MAX_YEAR&&(e=this.MAX_YEAR,this._year=e.toString().padStart(4,"0")),e<this.MIN_YEAR&&(e=this.MIN_YEAR,this._year=e.toString().padStart(4,"0")),t>this.MAX_MONTH&&(t=this.MAX_MONTH,this._month=t.toString().padStart(2,"0")),t<this.MIN_MONTH&&(t=this.MIN_MONTH,this._month=t.toString().padStart(2,"0")),i>this.MAX_DAY&&(i=this.MAX_DAY,this._day=i.toString().padStart(2,"0")),i<this.MIN_DAY&&(i=this.MIN_DAY,this._day=i.toString().padStart(2,"0"));const n=!isNaN(e)&&String(e).length===4,s=!isNaN(t)&&t>0;if(!isNaN(i)&&i>0&&s&&n){const a=this.MAX_VALID_DAY(t,e);if(i>a)this.dispatchEvent(new CustomEvent("inputError",{detail:{message:"Invalid date: day is greater than the maximum valid day for the month and year."},bubbles:!0}));else{const o=new Date(e,t-1,i);this.value=rt(o),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0}))}}this.requestUpdate()}};Ie([u({type:String})],ge.prototype,"uid",2),Ie([u({type:String})],ge.prototype,"label",2),Ie([u({type:String,attribute:"locale-id"})],ge.prototype,"localeId",2),Ie([u({type:Array})],ge.prototype,"errors",2),Ie([u({type:Boolean})],ge.prototype,"showErrors",2),Ie([u({type:Boolean})],ge.prototype,"touched",2),Ie([u({type:Boolean})],ge.prototype,"required",2),Ie([u({type:Boolean})],ge.prototype,"disabled",2),Ie([u({type:Boolean,attribute:"readonly"})],ge.prototype,"readOnly",2),Ie([u({type:String})],ge.prototype,"value",2),Ie([u({type:String})],ge.prototype,"icon",2),Ie([u({type:String})],ge.prototype,"hint",2),Ie([Y()],ge.prototype,"_day",2),Ie([Y()],ge.prototype,"_month",2),Ie([Y()],ge.prototype,"_year",2),ge=Ie([ue("gui-date")],ge),typeof customElements<"u"&&!customElements.get("gui-date")&&customElements.define("gui-date",ge);function Kd(e){const t=e.widget,{uid:i,errors:n,value:s,isTouched:r,templateData:a,onValueChanged:o,onBlur:l,injectValidationIssues:d}=x.useInputWidget(t),c=g.useCallback(C=>{const I=C,A=k=>{d(null),o(k.detail.value)},D=k=>{d([k.detail.message])};return C&&(I.addEventListener("change",A),I.addEventListener("blur",l),I.addEventListener("inputError",D)),()=>{I.removeEventListener("change",A),I.removeEventListener("blur",l),I.removeEventListener("inputError",D)}},[o,l,d]),h=a.label,p=a.hint,m=a.icon,f=a.disabled,w=a.readonly,S=a.validator?.required,T=a.lang;return y.jsx("div",{className:"gui-date gui-field",style:{flex:a.size},children:y.jsx("gui-date",{ref:c,uid:i,label:h,hint:p,errors:n,touched:r,required:S,disabled:f,readOnly:w,value:s,icon:m,localeId:T})})}const Jd=Object.freeze(Object.defineProperty({__proto__:null,DateInput:Kd},Symbol.toStringTag,{value:"Module"}));function fs({errors:e,uid:t}){return y.jsx("ul",{className:"gui-validator",id:`${t}_errors`,"data-cy":`${t}_validator-errors`,children:e.map((i,n)=>y.jsx("li",{className:"gui-validator__error",role:"alert","data-cy":`${t}_validator-error`,children:i},n))})}function Xd(e){const t=e.widget,{uid:i,errors:n,value:s,isTouched:r,templateData:a,onValueChanged:o,onBlur:l,injectValidationIssues:d}=x.useInputWidget(t),[c,h]=g.useState(!1),p=g.useRef(null),m=g.useRef(null),f=g.useRef(null),w=g.useCallback(X=>{const j=X,Oe=dt=>{d(null),o(dt.detail.value)},Te=dt=>{d([dt.detail.message])},De=()=>{h(!0)};return m.current=X,X&&(j.addEventListener("change",Oe),j.addEventListener("focus",De),j.addEventListener("blur",l),j.addEventListener("inputError",Te)),()=>{j.removeEventListener("change",Oe),j.removeEventListener("focus",De),j.removeEventListener("blur",l),j.removeEventListener("inputError",Te)}},[o,l,d]),S=g.useCallback(X=>{const j=X,Oe=De=>{d(null),o(De.detail.value)},Te=De=>{l(),h(!1)};return f.current=X,X&&(j.addEventListener("blur",Te),j.addEventListener("change",Oe)),()=>{j.addEventListener("blur",Te),j.addEventListener("change",Oe)}},[o,d,l]);g.useEffect(()=>{const X=j=>{if(!c)return;const Oe=j.composedPath(),Te=m.current&&Oe.includes(m.current),De=f.current&&Oe.includes(f.current);!Te&&!De&&h(!1)};return document.addEventListener("click",X),()=>{document.removeEventListener("click",X)}},[c]);const T=X=>{if(!c)return;const j=X.relatedTarget;j&&p.current?.contains(j)||h(!1)},C=X=>{const j=X.target,Oe=j.closest(".gui-date-input__part"),Te=j.closest("gui-calendar");Oe||Te?c||h(!0):h(De=>!De)},I=a.hint,A=a.icon,D=a.prevMonthIcon,k=a.nextMonthIcon,P=a.prevMonthAriaLabel,O=a.nextMonthAriaLabel,E=a.dayFormat,B=a.weekdayFormat,H=a.monthFormat,K=a.minDate,W=a.maxDate,G=a.disabledRanges,J=a.numberOfMonths,Ze=r&&n&&n.length>0,Tt=a.disabled,Pt=a.readonly,lt=a.validator?.required,Dt=a.lang;return y.jsxs("div",{ref:p,className:"gui-date-picker gui-field",style:{flex:a.size},onBlur:T,children:[a.label&&y.jsxs("label",{className:"gui-label",htmlFor:i,"data-cy":`${i}_label`,children:[a.label+(lt?" *":""),I&&y.jsx("div",{className:"gui-widget-hint",id:`${i}_hint`,children:I})]}),y.jsxs("div",{role:"button",tabIndex:-1,className:"gui-widget",onClick:C,onKeyUp:X=>{X.target===X.currentTarget&&(X.key==="Enter"||X.key===" ")&&h(j=>!j)},"aria-expanded":c,children:[y.jsx("gui-date",{ref:w,uid:i,hint:I,showErrors:!1,errors:n,touched:r,required:lt,disabled:Tt,readOnly:Pt,value:s,icon:A,localeId:Dt}),y.jsx("span",{className:"gui-date-picker__arrow",children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 256 256",children:y.jsx("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"})})}),c&&y.jsx("gui-calendar",{ref:S,uid:i,hint:I,touched:r,required:lt,disabled:Tt,readOnly:Pt,value:s,prevMonthIcon:D,nextMonthIcon:k,prevMonthAriaLabel:P,nextMonthAriaLabel:O,dayFormat:E,weekdayFormat:B,monthFormat:H,minDate:K,maxDate:W,disabledRanges:G,numberOfMonths:J,localeId:Dt})]}),Ze&&y.jsx(fs,{errors:n,uid:i})]})}const Qd=Object.freeze(Object.defineProperty({__proto__:null,DatePicker:Xd},Symbol.toStringTag,{value:"Module"}));function gs({template:e,selected:t,disabled:i,focused:n}){const s=["gui-list__item",i?"gui-list__item-disabled":"",t?"gui-list__item-selected":"",n?"gui-list__item-focused":""].filter(Boolean).join(" ");return y.jsx("div",{role:"option",className:s,"aria-selected":t,children:e})}var eu=Object.defineProperty,tu=Object.getOwnPropertyDescriptor,et=(e,t,i,n)=>{for(var s=n>1?void 0:n?tu(t,i):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(s=(n?a(t,i,s):a(s))||s);return n&&s&&eu(t,i,s),s};let Ve=class extends ee{constructor(){super(...arguments),this.targetElement=void 0,this.uid=void 0,this.label=void 0,this.hint=void 0,this.required=void 0,this.errors=[],this.disabled=!1,this.readOnly=!1,this.touched=!1,this.native=!0,this.ariaController=new Fe(this,{getTargets:()=>Array.isArray(this.targetElement)?[...this.targetElement]:[this.targetElement],getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched}})})}createRenderRoot(){return this}render(){return super.render(),v`${Ge(this.uid,{label:this.label,hint:this.hint,required:this.required,errors:this.errors,touched:this.touched},!1,void 0,this.native)}`}};et([u({type:Object})],Ve.prototype,"targetElement",2),et([u({type:String})],Ve.prototype,"uid",2),et([u({type:String})],Ve.prototype,"label",2),et([u({type:String})],Ve.prototype,"hint",2),et([u({type:Boolean})],Ve.prototype,"required",2),et([u({type:Array})],Ve.prototype,"errors",2),et([u({type:Boolean})],Ve.prototype,"disabled",2),et([u({type:Boolean,attribute:"readonly"})],Ve.prototype,"readOnly",2),et([u({type:Boolean})],Ve.prototype,"touched",2),et([u({type:Boolean})],Ve.prototype,"native",2),Ve=et([ue("gui-label")],Ve),typeof customElements<"u"&&!customElements.get("gui-label")&&customElements.define("gui-label",Ve);const iu=e=>e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"template")&&Object.prototype.hasOwnProperty.call(e,"value");function nu(e){const t=typeof e;return t==="string"||t==="number"}const su=(e,{valueField:t})=>{if(e===null||typeof e!="object")return!1;const i=e,n=t??"value";return!!Object.prototype.hasOwnProperty.call(i,n)};function au(e,{valueField:t}){if(e===null||typeof e!="object")throw new Error("Provided value is not an object");const i=e,n=t??"value",s=Object.prototype.hasOwnProperty.call(i,n)?n:void 0;if(!s)throw new Error("No valueField exists on the object");return r=>{if(r===null||typeof r!="object")throw new Error("Item is not an object");return{template:r,value:s?r[s]:""}}}const ru=(e,t)=>{if(Array.isArray(e)&&e.length>0&&!iu(e[0])){if(nu(e[0]))return e.map(i=>({template:i,value:i}));if(su(e[0],t)){const i=au(e[0],t);return e.map(i)}else throw new Error("Invalid list item shape")}return e};var ou=Object.defineProperty,lu=Object.getOwnPropertyDescriptor,be=(e,t,i,n)=>{for(var s=n>1?void 0:n?lu(t,i):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(s=(n?a(t,i,s):a(s))||s);return n&&s&&ou(t,i,s),s};let oe=class extends ee{constructor(){super(...arguments),this.uid=void 0,this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.valueField=void 0,this.label=void 0,this.hint=void 0,this.items=[],this.itemHeight=void 0,this.height=void 0,this._items=[],this._scrollTop=0,this._viewportHeight=0,this._focusedIndex=-1,this.buffer=5}willUpdate(e){super.willUpdate(e),e.has("items")&&this.updateItems(),(e.has("items")||e.has("_scrollTop")||e.has("height"))&&this.emitRangeChange()}firstUpdated(){this.measureViewport(),new ResizeObserver(()=>this.measureViewport()).observe(this.viewportElement)}render(){const e=this.height??300,t=this.itemHeight??40,i=(this.items?.length??0)*t,{offsetY:n}=this.calculateRange(),s=this._focusedIndex>=0?`${this.uid}-item-${this._focusedIndex}`:void 0;return v`
|
|
235
|
+
`}parseValue(e){if(!e){this._day="",this._month="",this._year="";return}const t=new Date(e);isNaN(t.getTime())||(this._day=t.getDate().toString().padStart(2,"0"),this._month=(t.getMonth()+1).toString().padStart(2,"0"),this._year=t.getFullYear().toString())}handleKeyDown(e){["Backspace","Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Delete","Enter"].includes(e.key)||e.ctrlKey||e.metaKey||this.readOnly||/^[0-9]$/.test(e.key)||e.preventDefault()}handleFocus(e){this.dispatchEvent(new CustomEvent("focus",{detail:e}))}handleKeyUp(e,t){if(this.readOnly)return;const i=window.getComputedStyle(this).direction==="rtl",n=e.target,s=Array.from(this.querySelectorAll("input")),r=s.indexOf(n);switch(n.value.length===n.maxLength&&/^[0-9]$/.test(e.key)&&(r===s.length-1?s[0].focus():s[r+1].focus()),e.key){case"ArrowUp":{const a=isNaN(parseInt(n.value,10)+1)?1:parseInt(n.value,10)+1;t==="year"&&(this._year=a.toString().padStart(4,"0")),t==="month"&&(this._month=a.toString().padStart(2,"0")),t==="day"&&(this._day=a.toString().padStart(2,"0")),n.select(),this.validateAndEmit();break}case"ArrowDown":{const a=isNaN(parseInt(n.value,10)-1)?1:parseInt(n.value,10)-1;t==="year"&&(this._year=a.toString().padStart(4,"0")),t==="month"&&(this._month=a.toString().padStart(2,"0")),t==="day"&&(this._day=a.toString().padStart(2,"0")),n.select(),this.validateAndEmit();break}case"ArrowLeft":{const a=i?r+1:r-1;a>=0&&a<s.length&&(s[a].focus(),s[a].select());break}case"ArrowRight":{const a=i?r-1:r+1;a>=0&&a<s.length&&(s[a].focus(),s[a].select());break}}}handleChange(e,t){if(e.stopImmediatePropagation(),this.readOnly)return;const n=e.target.value.replace(/[^0-9]/g,"");switch(t){case"day":this._day=n;break;case"month":this._month=n;break;case"year":this._year=n;break}this.validateAndEmit()}handleBlur(e,t){const i=e.target,n=parseInt(i.value,10);if(!isNaN(n)&&n>0){const s=t==="year"?4:2;i.value=n.toString().padStart(s,"0")}else this.dispatchEvent(new CustomEvent("change",{detail:{value:null}}));this.dispatchEvent(new CustomEvent("blur"))}validateAndEmit(){let e=parseInt(this._year,10),t=parseInt(this._month,10),i=parseInt(this._day,10);e>this.MAX_YEAR&&(e=this.MAX_YEAR,this._year=e.toString().padStart(4,"0")),e<this.MIN_YEAR&&(e=this.MIN_YEAR,this._year=e.toString().padStart(4,"0")),t>this.MAX_MONTH&&(t=this.MAX_MONTH,this._month=t.toString().padStart(2,"0")),t<this.MIN_MONTH&&(t=this.MIN_MONTH,this._month=t.toString().padStart(2,"0")),i>this.MAX_DAY&&(i=this.MAX_DAY,this._day=i.toString().padStart(2,"0")),i<this.MIN_DAY&&(i=this.MIN_DAY,this._day=i.toString().padStart(2,"0"));const n=!isNaN(e)&&String(e).length===4,s=!isNaN(t)&&t>0;if(!isNaN(i)&&i>0&&s&&n){const a=this.MAX_VALID_DAY(t,e);if(i>a)this.dispatchEvent(new CustomEvent("inputError",{detail:{message:"Invalid date: day is greater than the maximum valid day for the month and year."},bubbles:!0}));else{const o=new Date(e,t-1,i);this.value=rt(o),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0}))}}this.requestUpdate()}};Ie([u({type:String})],ge.prototype,"uid",2),Ie([u({type:String})],ge.prototype,"label",2),Ie([u({type:String,attribute:"locale-id"})],ge.prototype,"localeId",2),Ie([u({type:Array})],ge.prototype,"errors",2),Ie([u({type:Boolean})],ge.prototype,"showErrors",2),Ie([u({type:Boolean})],ge.prototype,"touched",2),Ie([u({type:Boolean})],ge.prototype,"required",2),Ie([u({type:Boolean})],ge.prototype,"disabled",2),Ie([u({type:Boolean,attribute:"readonly"})],ge.prototype,"readOnly",2),Ie([u({type:String})],ge.prototype,"value",2),Ie([u({type:String})],ge.prototype,"icon",2),Ie([u({type:String})],ge.prototype,"hint",2),Ie([Y()],ge.prototype,"_day",2),Ie([Y()],ge.prototype,"_month",2),Ie([Y()],ge.prototype,"_year",2),ge=Ie([ue("gui-date")],ge),typeof customElements<"u"&&!customElements.get("gui-date")&&customElements.define("gui-date",ge);function Kd(e){const t=e.widget,{uid:i,errors:n,value:s,isTouched:r,templateData:a,onValueChanged:o,onBlur:l,injectValidationIssues:d}=x.useInputWidget(t),c=g.useCallback(C=>{const I=C,A=k=>{d(null),o(k.detail.value)},D=k=>{d([k.detail.message])};return C&&(I.addEventListener("change",A),I.addEventListener("blur",l),I.addEventListener("inputError",D)),()=>{I.removeEventListener("change",A),I.removeEventListener("blur",l),I.removeEventListener("inputError",D)}},[o,l,d]),h=a.label,p=a.hint,m=a.icon,f=a.disabled,w=a.readonly,S=a.validator?.required,T=a.lang;return y.jsx("div",{className:"gui-date gui-field",style:{flex:a.size},children:y.jsx("gui-date",{ref:c,uid:i,label:h,hint:p,errors:n,touched:r,required:S,disabled:f,readOnly:w,value:s,icon:m,localeId:T})})}const Jd=Object.freeze(Object.defineProperty({__proto__:null,DateInput:Kd},Symbol.toStringTag,{value:"Module"}));function ys({errors:e,uid:t}){return y.jsx("ul",{className:"gui-validator",id:`${t}_errors`,"data-cy":`${t}_validator-errors`,children:e.map((i,n)=>y.jsx("li",{className:"gui-validator__error",role:"alert","data-cy":`${t}_validator-error`,children:i},n))})}function Xd(e){const t=e.widget,{uid:i,errors:n,value:s,isTouched:r,templateData:a,onValueChanged:o,onBlur:l,injectValidationIssues:d}=x.useInputWidget(t),[c,h]=g.useState(!1),p=g.useRef(null),m=g.useRef(null),f=g.useRef(null),w=g.useCallback(X=>{const j=X,Oe=dt=>{d(null),o(dt.detail.value)},Te=dt=>{d([dt.detail.message])},De=()=>{h(!0)};return m.current=X,X&&(j.addEventListener("change",Oe),j.addEventListener("focus",De),j.addEventListener("blur",l),j.addEventListener("inputError",Te)),()=>{j.removeEventListener("change",Oe),j.removeEventListener("focus",De),j.removeEventListener("blur",l),j.removeEventListener("inputError",Te)}},[o,l,d]),S=g.useCallback(X=>{const j=X,Oe=De=>{d(null),o(De.detail.value)},Te=De=>{l(),h(!1)};return f.current=X,X&&(j.addEventListener("blur",Te),j.addEventListener("change",Oe)),()=>{j.addEventListener("blur",Te),j.addEventListener("change",Oe)}},[o,d,l]);g.useEffect(()=>{const X=j=>{if(!c)return;const Oe=j.composedPath(),Te=m.current&&Oe.includes(m.current),De=f.current&&Oe.includes(f.current);!Te&&!De&&h(!1)};return document.addEventListener("click",X),()=>{document.removeEventListener("click",X)}},[c]);const T=X=>{if(!c)return;const j=X.relatedTarget;j&&p.current?.contains(j)||h(!1)},C=X=>{const j=X.target,Oe=j.closest(".gui-date-input__part"),Te=j.closest("gui-calendar");Oe||Te?c||h(!0):h(De=>!De)},I=a.hint,A=a.icon,D=a.prevMonthIcon,k=a.nextMonthIcon,P=a.prevMonthAriaLabel,O=a.nextMonthAriaLabel,E=a.dayFormat,B=a.weekdayFormat,H=a.monthFormat,K=a.minDate,W=a.maxDate,G=a.disabledRanges,J=a.numberOfMonths,Ze=r&&n&&n.length>0,Tt=a.disabled,Pt=a.readonly,lt=a.validator?.required,Dt=a.lang;return y.jsxs("div",{ref:p,className:"gui-date-picker gui-field",style:{flex:a.size},onBlur:T,children:[a.label&&y.jsxs("label",{className:"gui-label",htmlFor:i,"data-cy":`${i}_label`,children:[a.label+(lt?" *":""),I&&y.jsx("div",{className:"gui-widget-hint",id:`${i}_hint`,children:I})]}),y.jsxs("div",{role:"button",tabIndex:-1,className:"gui-widget",onClick:C,onKeyUp:X=>{X.target===X.currentTarget&&(X.key==="Enter"||X.key===" ")&&h(j=>!j)},"aria-expanded":c,children:[y.jsx("gui-date",{ref:w,uid:i,hint:I,showErrors:!1,errors:n,touched:r,required:lt,disabled:Tt,readOnly:Pt,value:s,icon:A,localeId:Dt}),y.jsx("span",{className:"gui-date-picker__arrow",children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 256 256",children:y.jsx("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"})})}),c&&y.jsx("gui-calendar",{ref:S,uid:i,hint:I,touched:r,required:lt,disabled:Tt,readOnly:Pt,value:s,prevMonthIcon:D,nextMonthIcon:k,prevMonthAriaLabel:P,nextMonthAriaLabel:O,dayFormat:E,weekdayFormat:B,monthFormat:H,minDate:K,maxDate:W,disabledRanges:G,numberOfMonths:J,localeId:Dt})]}),Ze&&y.jsx(ys,{errors:n,uid:i})]})}const Qd=Object.freeze(Object.defineProperty({__proto__:null,DatePicker:Xd},Symbol.toStringTag,{value:"Module"}));function fs({template:e,selected:t,disabled:i,focused:n}){const s=["gui-list__item",i?"gui-list__item-disabled":"",t?"gui-list__item-selected":"",n?"gui-list__item-focused":""].filter(Boolean).join(" ");return y.jsx("div",{role:"option",className:s,"aria-selected":t,children:e})}var eu=Object.defineProperty,tu=Object.getOwnPropertyDescriptor,et=(e,t,i,n)=>{for(var s=n>1?void 0:n?tu(t,i):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(s=(n?a(t,i,s):a(s))||s);return n&&s&&eu(t,i,s),s};let Ve=class extends ee{constructor(){super(...arguments),this.targetElement=void 0,this.uid=void 0,this.label=void 0,this.hint=void 0,this.required=void 0,this.errors=[],this.disabled=!1,this.readOnly=!1,this.touched=!1,this.native=!0,this.ariaController=new Fe(this,{getTargets:()=>Array.isArray(this.targetElement)?[...this.targetElement]:[this.targetElement],getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched}})})}createRenderRoot(){return this}render(){return super.render(),v`${Ge(this.uid,{label:this.label,hint:this.hint,required:this.required,errors:this.errors,touched:this.touched},!1,void 0,this.native)}`}};et([u({type:Object})],Ve.prototype,"targetElement",2),et([u({type:String})],Ve.prototype,"uid",2),et([u({type:String})],Ve.prototype,"label",2),et([u({type:String})],Ve.prototype,"hint",2),et([u({type:Boolean})],Ve.prototype,"required",2),et([u({type:Array})],Ve.prototype,"errors",2),et([u({type:Boolean})],Ve.prototype,"disabled",2),et([u({type:Boolean,attribute:"readonly"})],Ve.prototype,"readOnly",2),et([u({type:Boolean})],Ve.prototype,"touched",2),et([u({type:Boolean})],Ve.prototype,"native",2),Ve=et([ue("gui-label")],Ve),typeof customElements<"u"&&!customElements.get("gui-label")&&customElements.define("gui-label",Ve);const iu=e=>e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"template")&&Object.prototype.hasOwnProperty.call(e,"value");function nu(e){const t=typeof e;return t==="string"||t==="number"}const su=(e,{valueField:t})=>{if(e===null||typeof e!="object")return!1;const i=e,n=t??"value";return!!Object.prototype.hasOwnProperty.call(i,n)};function au(e,{valueField:t}){if(e===null||typeof e!="object")throw new Error("Provided value is not an object");const i=e,n=t??"value",s=Object.prototype.hasOwnProperty.call(i,n)?n:void 0;if(!s)throw new Error("No valueField exists on the object");return r=>{if(r===null||typeof r!="object")throw new Error("Item is not an object");return{template:r,value:s?r[s]:""}}}const ru=(e,t)=>{if(Array.isArray(e)&&e.length>0&&!iu(e[0])){if(nu(e[0]))return e.map(i=>({template:i,value:i}));if(su(e[0],t)){const i=au(e[0],t);return e.map(i)}else throw new Error("Invalid list item shape")}return e};var ou=Object.defineProperty,lu=Object.getOwnPropertyDescriptor,be=(e,t,i,n)=>{for(var s=n>1?void 0:n?lu(t,i):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(s=(n?a(t,i,s):a(s))||s);return n&&s&&ou(t,i,s),s};let oe=class extends ee{constructor(){super(...arguments),this.uid=void 0,this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.valueField=void 0,this.label=void 0,this.hint=void 0,this.items=[],this.itemHeight=void 0,this.height=void 0,this._items=[],this._scrollTop=0,this._viewportHeight=0,this._focusedIndex=-1,this.buffer=5}willUpdate(e){super.willUpdate(e),e.has("items")&&this.updateItems(),(e.has("items")||e.has("_scrollTop")||e.has("height"))&&this.emitRangeChange()}firstUpdated(){this.measureViewport(),new ResizeObserver(()=>this.measureViewport()).observe(this.viewportElement)}render(){const e=this.height??300,t=this.itemHeight??40,i=(this.items?.length??0)*t,{offsetY:n}=this.calculateRange(),s=this._focusedIndex>=0?`${this.uid}-item-${this._focusedIndex}`:void 0;return v`
|
|
236
236
|
<div
|
|
237
237
|
role="listbox"
|
|
238
238
|
id=${this.uid}
|
|
@@ -261,7 +261,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
261
261
|
<slot></slot>
|
|
262
262
|
</div>
|
|
263
263
|
</div>
|
|
264
|
-
`}focus(e){this.viewportElement?this.viewportElement.focus(e):super.focus(e)}focusItemAtIndex(e){this._focusedIndex=e}scrollToSelectedIndex(){const e=this.items.findIndex(t=>(this.valueField?t[this.valueField]:t)===this.value);this.scrollToIndex(e)}onKeyDown(e){if(this.disabled||this.readOnly)return;const t=this.itemHeight??40,i=Math.ceil(this._viewportHeight/t),n=this.items.length-1;let s=!1;switch(e.key){case"ArrowDown":this.setFocusedIndex(Math.min(this._focusedIndex+1,n)),s=!0;break;case"ArrowUp":this.setFocusedIndex(Math.max(this._focusedIndex-1,0)),s=!0;break;case"PageDown":this.setFocusedIndex(Math.min(this._focusedIndex+i,n)),s=!0;break;case"PageUp":this.setFocusedIndex(Math.max(this._focusedIndex-i,0)),s=!0;break;case"Home":this.setFocusedIndex(0),s=!0;break;case"End":this.setFocusedIndex(n),s=!0;break;case"Enter":case" ":{const r=this.items[this._focusedIndex],a=r!=null;this._focusedIndex>=0&&a&&this.selectItem(this.items[this._focusedIndex]),s=!0;break}}s&&e.preventDefault()}onFocus(){if(!this.value||!this.items.length)return;const e=this.items.findIndex(t=>(this.valueField?t[this.valueField]:t)===this.value);this._focusedIndex=e,this.scrollToIndex(e),this.dispatchEvent(new CustomEvent("gui-focus-change",{detail:{index:e},bubbles:!0,composed:!0}))}onFocusOut(e){e.relatedTarget&&this.contains(e.relatedTarget)||(this._focusedIndex=-1,this.dispatchEvent(new CustomEvent("gui-focus-change",{detail:{index:-1},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0})))}scrollToIndex(e){const t=this.itemHeight??40,i=this.height??300,n=e*t,s=n+t,r=this.viewportElement.scrollTop,a=r+i;n<r?this.viewportElement.scrollTop=n:s>a&&(this.viewportElement.scrollTop=s-i)}selectItem(e){this.dispatchEvent(new CustomEvent("change",{detail:{value:this.valueField?e[this.valueField]:e},bubbles:!0,composed:!0}))}setFocusedIndex(e){e<0||e>=this.items.length||(this._focusedIndex=e,this.scrollToIndex(e),this.dispatchEvent(new CustomEvent("gui-focus-change",{detail:{index:e},bubbles:!0,composed:!0})))}updateItems(){this._items=ru(this.items,{valueField:this.valueField}),this.dispatchEvent(new CustomEvent("gui-update-items",{detail:this._items,bubbles:!0,composed:!0}))}emitRangeChange(){const{startIndex:e,endIndex:t}=this.calculateRange();this.dispatchEvent(new CustomEvent("gui-range-change",{detail:{startIndex:e,endIndex:t},bubbles:!0,composed:!0}))}measureViewport(){this.viewportElement&&(this._viewportHeight=this.viewportElement.offsetHeight,this.emitRangeChange())}onScroll(e){const t=e.target;this._scrollTop=t.scrollTop}calculateRange(){const e=this.itemHeight??40,t=this.items?.length??0,i=Math.ceil(this._viewportHeight/e),n=Math.floor(this._scrollTop/e),s=Math.max(0,n-this.buffer),r=Math.min(t,n+i+this.buffer),a=s*e;return{startIndex:s,endIndex:r,offsetY:a}}};be([u({type:String})],oe.prototype,"uid",2),be([u({type:Boolean})],oe.prototype,"touched",2),be([u({type:Boolean})],oe.prototype,"required",2),be([u({type:Boolean})],oe.prototype,"disabled",2),be([u({type:Boolean,attribute:"readonly"})],oe.prototype,"readOnly",2),be([u({type:String})],oe.prototype,"value",2),be([u({type:String})],oe.prototype,"valueField",2),be([u({type:String})],oe.prototype,"label",2),be([u({type:String})],oe.prototype,"hint",2),be([u({type:Array})],oe.prototype,"items",2),be([u({type:Number})],oe.prototype,"itemHeight",2),be([u({type:Number})],oe.prototype,"height",2),be([Y()],oe.prototype,"_items",2),be([Y()],oe.prototype,"_scrollTop",2),be([Y()],oe.prototype,"_viewportHeight",2),be([Y()],oe.prototype,"_focusedIndex",2),be([ss(".gui-list__scroll-viewport")],oe.prototype,"viewportElement",2),oe=be([ue("gui-list")],oe),typeof customElements<"u"&&!customElements.get("gui-list")&&customElements.define("gui-list",oe);var du=Object.defineProperty,uu=Object.getOwnPropertyDescriptor,yi=(e,t,i,n)=>{for(var s=n>1?void 0:n?uu(t,i):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(s=(n?a(t,i,s):a(s))||s);return n&&s&&du(t,i,s),s};let It=class extends ee{constructor(){super(...arguments),this.uid=void 0,this.errors=[],this.touched=!1}createRenderRoot(){return this}render(){return super.render(),v`${Ee(this.uid,{touched:this.touched,errors:this.errors})}`}};yi([u({type:String})],It.prototype,"uid",2),yi([u({type:Array})],It.prototype,"errors",2),yi([u({type:Boolean})],It.prototype,"touched",2),It=yi([ue("gui-errors")],It),typeof customElements<"u"&&!customElements.get("gui-errors")&&customElements.define("gui-errors",It);function cu(e){const t=e.widget,{uid:i,errors:n,value:s,isTouched:r,templateData:a,onFilter:o,onValueChanged:l,onBlur:d}=x.useInputWidget(t),[c,h]=g.useState({start:0,end:10}),[p,m]=g.useState([]),[f,w]=g.useState([]),[S,T]=g.useState(-1),[C,I]=g.useState(!1),[A,D]=g.useState(!1),[k,P]=g.useState(void 0),O=g.useRef(null),E=g.useRef(null),B=g.useRef(null),H=g.useMemo(()=>p.slice(c.start,c.end),[p,c]),K=g.useCallback(()=>{d(),D(!1),I(!1)},[d]),W=g.useCallback($=>{if(l($),E.current){const z=(a.items||[]).find(q=>a.valueField?q[a.valueField]===$:q===$);if(z){const q=a.valueField?z[a.valueField]:z;E.current.value=String(q)}else $||(E.current.value="")}D(!1),I(!1)},[l,a]),G=g.useCallback(($,N)=>{a.readonly||(W($.value),o(""),T(N),P($),I(!1),D(!1),O.current&&O.current.focusItemAtIndex(N))},[W,o,a.readonly]);g.useEffect(()=>{const $=O.current;if(!$)return;const N=le=>{const{startIndex:ve,endIndex:Qe}=le.detail;h({start:ve,end:Qe})},z=le=>{const ve=le.detail;if(m(ve?[...ve]:[]),!k&&s!=null&&ve){const Qe=ve.find(_s=>_s.value===s);Qe&&P(Qe)}},q=le=>{const ve=le.detail.index;T(ve)},Xe=le=>{const ve=le.detail.value;W(ve),P(p.find(Qe=>Qe.value===ve)),I(!1),D(!1)};return $.addEventListener("gui-range-change",N),$.addEventListener("gui-update-items",z),$.addEventListener("gui-focus-change",q),$.addEventListener("change",Xe),()=>{$.removeEventListener("gui-range-change",N),$.removeEventListener("gui-update-items",z),$.removeEventListener("gui-focus-change",q),$.removeEventListener("change",Xe)}},[W,p,l]),g.useEffect(()=>{const $=N=>{if(!A)return;const z=N.target,q=E.current&&E.current.contains(z),Xe=O.current&&O.current.contains(z);!q&&!Xe&&K()};return document.addEventListener("click",$),()=>document.removeEventListener("click",$)},[K,A]),g.useEffect(()=>{const N=k?.template!==null&&typeof k?.template=="object"?a.labelField??"label":null,z=N?k?.template[N]:k?.template;E.current.value=z??""},[k,a.labelField]),g.useEffect(()=>{B.current&&E.current&&O.current&&(B.current.targetElement=[E.current,O.current])},[]);const J=async $=>{switch($.key){case"ArrowDown":$.preventDefault(),D(!0),setTimeout(()=>{O.current&&(O.current.focus(),O.current.scrollToSelectedIndex())},0);break;case"Enter":E.current?.value||W(null);break}},Ze=g.useCallback($=>{const N=!!t.on?.filter;if(o($),$&&!N){I(!0),D(!0);const z=a.searchFields??[a.labelField,a.valueField].filter(ve=>!!ve),q=z.length>0,le=(a.items||[]).filter(ve=>{const Qe=Object.keys(ve);if(!Qe.length)return ve.toString().toLowerCase().includes($.toLowerCase());const ks=(ji,Pc)=>ji||ve[Pc].toString().toLowerCase().includes($.toLowerCase());return q?Qe.filter(ji=>z.includes(ji)).reduce(ks,!1):Qe.reduce(ks,!1)});w(le)}else I(!1),w([...a.items||[]])},[t.on?.filter,o,a.items,a.labelField,a.searchFields,a.valueField]),Tt=x.useDebounceCallback(Ze,a.inputDebounce??500),Pt=$=>{const N=$.target.value;A||D(!0),Tt(N)},lt=g.useCallback(()=>{A||(D(!0),setTimeout(()=>{O.current&&O.current.scrollToSelectedIndex()},0))},[A]),Dt=$=>{const N=$.relatedTarget,z=E.current&&E.current.contains(N),q=O.current&&O.current.contains(N);z||q||K()},X=x.useItemRenderer(a.itemRenderer)||gs,j=a.label,Oe=a.validator?.required,Te=a.disabled,De=a.readonly,dt=!!t.on?.filter,ae=r&&n&&n.length>0;return y.jsxs("div",{className:"gui-dropdown gui-field",style:{flex:a.size},children:[y.jsx("gui-label",{ref:B,uid:i,label:j,hint:a.hint,errors:n,touched:r,required:Oe,native:!1}),y.jsxs("div",{className:"gui-widget","aria-expanded":A,children:[y.jsx("input",{ref:E,type:"text",id:i,"data-cy":`${i}_textinput`,defaultValue:s??"",required:Oe,disabled:Te,readOnly:De,placeholder:a.placeholder??"",autoComplete:a.autocomplete??void 0,onKeyDown:J,onInput:Pt,onFocus:lt,onBlur:Dt,"aria-labelledby":a.label?`${i}_label`:void 0,"aria-describedby":a.hint?`${i}_hint`:void 0}),y.jsx("span",{className:"gui-dropdown__arrow",children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 256 256",children:y.jsx("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"})})}),y.jsx("gui-list",{ref:O,id:`${i}-list`,uid:i,value:s??"",valueField:a.valueField,items:C&&!dt?f:a.items,itemHeight:a.itemHeight,height:a.height,required:Oe,touched:r,disabled:Te||De,readOnly:De,hidden:!A,onFocus:lt,onBlur:Dt,children:H.map(($,N)=>{const z=c.start+N,q=s===$.value,Xe=S===z,le=a.labelField??"label",Qe=$.template!==null&&typeof $.template=="object"&&le&&!a.itemRenderer?$.template[le]:$.template;return y.jsx("div",{role:"option",tabIndex:-1,className:"gui-list__item-wrapper",id:`${i}-item-${z}`,style:{height:`${a.itemHeight||40}px`},"aria-selected":q,onClick:()=>G($,z),children:y.jsx(X,{template:Qe,value:$.value,index:z,selected:q,disabled:Te||De,focused:Xe})},z)})})]}),ae&&y.jsx("gui-errors",{uid:i,errors:n,touched:r})]})}const hu=Object.freeze(Object.defineProperty({__proto__:null,Dropdown:cu},Symbol.toStringTag,{value:"Module"}));function pu(e){const t=e.widget,{uid:i,errors:n,value:s,isTouched:r,templateData:a,onValueChanged:o,onBlur:l}=x.useInputWidget(t),d=g.useCallback(E=>{S.current&&E.relatedTarget&&S.current.contains(E.relatedTarget)||l()},[l]),[c,h]=g.useState({start:0,end:10}),[p,m]=g.useState([]),[f,w]=g.useState(-1),S=g.useRef(null),T=g.useMemo(()=>(p.length>0?p:a.items||[]).slice(c.start,c.end),[p,a.items,c]);g.useEffect(()=>{const E=S.current;if(!E)return;const B=G=>{const{startIndex:J,endIndex:Ze}=G.detail;h({start:J,end:Ze})},H=G=>{const J=G.detail;m(J?[...J]:[])},K=G=>{const J=G.detail.index;w(J)},W=G=>{const J=G.detail.value;o(J)};return E.addEventListener("change",W),E.addEventListener("gui-update-items",H),E.addEventListener("gui-range-change",B),E.addEventListener("gui-focus-change",K),()=>{E.removeEventListener("change",W),E.removeEventListener("gui-update-items",H),E.removeEventListener("gui-range-change",B),E.removeEventListener("gui-focus-change",K)}},[o]);const C=g.useCallback((E,B)=>{a.disabled||(o(E.value),w(B),S.current&&S.current.focusItemAtIndex(B))},[o]),I=x.useItemRenderer(a.itemRenderer)||gs,A=a.label,D=a.validator?.required,k=a.disabled,P=a.readonly,O=r&&n&&n.length>0;return y.jsxs("div",{className:"gui-list gui-field",style:{flex:a.size},children:[y.jsx("gui-label",{targetElement:S.current||void 0,uid:i,label:A,hint:a.hint,errors:n,touched:r,required:D,native:!1}),y.jsx("div",{className:"gui-widget",children:y.jsx("gui-list",{ref:S,id:i,uid:i,value:s??"",valueField:a.valueField,items:a.items,itemHeight:a.itemHeight,height:a.height,required:D,touched:r,disabled:k,readOnly:P,onBlur:d,children:T.map((E,B)=>{const H=c.start+B,K=s===E.value,W=f===H,G=a.labelField??"label",Ze=E.template!==null&&typeof E.template=="object"&&G&&!a.itemRenderer?E.template[G]:E.template;return y.jsx("div",{role:"option",tabIndex:-1,id:`${i}-item-${H}`,className:"gui-list__item-wrapper",style:{height:`${a.itemHeight||40}px`},"aria-selected":K,"aria-disabled":k?"true":"false",onClick:()=>C(E,H),children:y.jsx(I,{template:Ze,value:E.value,index:B,selected:K,disabled:k,focused:W})},H)})})}),O&&y.jsx("gui-errors",{uid:i,errors:n,touched:r})]})}const mu=Object.freeze(Object.defineProperty({__proto__:null,List:pu},Symbol.toStringTag,{value:"Module"}));var yu=Object.defineProperty,fu=Object.getOwnPropertyDescriptor,ce=(e,t,i,n)=>{for(var s=n>1?void 0:n?fu(t,i):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(s=(n?a(t,i,s):a(s))||s);return n&&s&&yu(t,i,s),s};let se=class extends ee{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId="en",this.errors=[],this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.hint=void 0,this.icon=void 0,this.placeholder=void 0,this.autocomplete=void 0,this.showPasswordIcon=void 0,this.hidePasswordIcon=void 0,this.showPasswordLabel=void 0,this.hidePasswordLabel=void 0,this.showPassword=!1,this.ariaController=new Fe(this,{getTargets:()=>this.querySelectorAll(`input[id="${this.uid}"]`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}render(){super.render();const e={uid:this.uid,label:this.label,hint:this.hint,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,icon:this.icon,placeholder:this.placeholder,autocomplete:this.autocomplete,showPasswordIcon:this.showPasswordIcon,hidePasswordIcon:this.hidePasswordIcon,showPasswordLabel:this.showPasswordLabel,hidePasswordLabel:this.hidePasswordLabel},t=pi("password",e),i={"gui-password--icon":!!this.icon};return v`
|
|
264
|
+
`}focus(e){this.viewportElement?this.viewportElement.focus(e):super.focus(e)}focusItemAtIndex(e){this._focusedIndex=e}scrollToSelectedIndex(){const e=this.items.findIndex(t=>(this.valueField?t[this.valueField]:t)===this.value);this.scrollToIndex(e)}onKeyDown(e){if(this.disabled||this.readOnly)return;const t=this.itemHeight??40,i=Math.ceil(this._viewportHeight/t),n=this.items.length-1;let s=!1;switch(e.key){case"ArrowDown":this.setFocusedIndex(Math.min(this._focusedIndex+1,n)),s=!0;break;case"ArrowUp":this.setFocusedIndex(Math.max(this._focusedIndex-1,0)),s=!0;break;case"PageDown":this.setFocusedIndex(Math.min(this._focusedIndex+i,n)),s=!0;break;case"PageUp":this.setFocusedIndex(Math.max(this._focusedIndex-i,0)),s=!0;break;case"Home":this.setFocusedIndex(0),s=!0;break;case"End":this.setFocusedIndex(n),s=!0;break;case"Enter":case" ":{const r=this.items[this._focusedIndex],a=r!=null;this._focusedIndex>=0&&a&&this.selectItem(this.items[this._focusedIndex]),s=!0;break}}s&&e.preventDefault()}onFocus(){if(!this.value||!this.items.length)return;const e=this.items.findIndex(t=>(this.valueField?t[this.valueField]:t)===this.value);this._focusedIndex=e,this.scrollToIndex(e),this.dispatchEvent(new CustomEvent("gui-focus-change",{detail:{index:e},bubbles:!0,composed:!0}))}onFocusOut(e){e.relatedTarget&&this.contains(e.relatedTarget)||(this._focusedIndex=-1,this.dispatchEvent(new CustomEvent("gui-focus-change",{detail:{index:-1},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0})))}scrollToIndex(e){const t=this.itemHeight??40,i=this.height??300,n=e*t,s=n+t,r=this.viewportElement.scrollTop,a=r+i;n<r?this.viewportElement.scrollTop=n:s>a&&(this.viewportElement.scrollTop=s-i)}selectItem(e){this.dispatchEvent(new CustomEvent("change",{detail:{value:this.valueField?e[this.valueField]:e},bubbles:!0,composed:!0}))}setFocusedIndex(e){e<0||e>=this.items.length||(this._focusedIndex=e,this.scrollToIndex(e),this.dispatchEvent(new CustomEvent("gui-focus-change",{detail:{index:e},bubbles:!0,composed:!0})))}updateItems(){this._items=ru(this.items,{valueField:this.valueField}),this.dispatchEvent(new CustomEvent("gui-update-items",{detail:this._items,bubbles:!0,composed:!0}))}emitRangeChange(){const{startIndex:e,endIndex:t}=this.calculateRange();this.dispatchEvent(new CustomEvent("gui-range-change",{detail:{startIndex:e,endIndex:t},bubbles:!0,composed:!0}))}measureViewport(){this.viewportElement&&(this._viewportHeight=this.viewportElement.offsetHeight,this.emitRangeChange())}onScroll(e){const t=e.target;this._scrollTop=t.scrollTop}calculateRange(){const e=this.itemHeight??40,t=this.items?.length??0,i=Math.ceil(this._viewportHeight/e),n=Math.floor(this._scrollTop/e),s=Math.max(0,n-this.buffer),r=Math.min(t,n+i+this.buffer),a=s*e;return{startIndex:s,endIndex:r,offsetY:a}}};be([u({type:String})],oe.prototype,"uid",2),be([u({type:Boolean})],oe.prototype,"touched",2),be([u({type:Boolean})],oe.prototype,"required",2),be([u({type:Boolean})],oe.prototype,"disabled",2),be([u({type:Boolean,attribute:"readonly"})],oe.prototype,"readOnly",2),be([u({type:String})],oe.prototype,"value",2),be([u({type:String})],oe.prototype,"valueField",2),be([u({type:String})],oe.prototype,"label",2),be([u({type:String})],oe.prototype,"hint",2),be([u({type:Array})],oe.prototype,"items",2),be([u({type:Number})],oe.prototype,"itemHeight",2),be([u({type:Number})],oe.prototype,"height",2),be([Y()],oe.prototype,"_items",2),be([Y()],oe.prototype,"_scrollTop",2),be([Y()],oe.prototype,"_viewportHeight",2),be([Y()],oe.prototype,"_focusedIndex",2),be([ns(".gui-list__scroll-viewport")],oe.prototype,"viewportElement",2),oe=be([ue("gui-list")],oe),typeof customElements<"u"&&!customElements.get("gui-list")&&customElements.define("gui-list",oe);var du=Object.defineProperty,uu=Object.getOwnPropertyDescriptor,mi=(e,t,i,n)=>{for(var s=n>1?void 0:n?uu(t,i):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(s=(n?a(t,i,s):a(s))||s);return n&&s&&du(t,i,s),s};let It=class extends ee{constructor(){super(...arguments),this.uid=void 0,this.errors=[],this.touched=!1}createRenderRoot(){return this}render(){return super.render(),v`${Ee(this.uid,{touched:this.touched,errors:this.errors})}`}};mi([u({type:String})],It.prototype,"uid",2),mi([u({type:Array})],It.prototype,"errors",2),mi([u({type:Boolean})],It.prototype,"touched",2),It=mi([ue("gui-errors")],It),typeof customElements<"u"&&!customElements.get("gui-errors")&&customElements.define("gui-errors",It);function cu(e){const t=e.widget,{uid:i,errors:n,value:s,isTouched:r,templateData:a,onFilter:o,onValueChanged:l,onBlur:d}=x.useInputWidget(t),[c,h]=g.useState({start:0,end:10}),[p,m]=g.useState([]),[f,w]=g.useState([]),[S,T]=g.useState(-1),[C,I]=g.useState(!1),[A,D]=g.useState(!1),[k,P]=g.useState(void 0),O=g.useRef(null),E=g.useRef(null),B=g.useRef(null),H=g.useMemo(()=>p.slice(c.start,c.end),[p,c]),K=g.useCallback(()=>{d(),D(!1),I(!1)},[d]),W=g.useCallback($=>{if(l($),E.current){const z=(a.items||[]).find(q=>a.valueField?q[a.valueField]===$:q===$);if(z){const q=a.valueField?z[a.valueField]:z;E.current.value=String(q)}else $||(E.current.value="")}D(!1),I(!1)},[l,a]),G=g.useCallback(($,N)=>{a.readonly||(W($.value),o(""),T(N),P($),I(!1),D(!1),O.current&&O.current.focusItemAtIndex(N))},[W,o,a.readonly]);g.useEffect(()=>{const $=O.current;if(!$)return;const N=le=>{const{startIndex:ve,endIndex:Qe}=le.detail;h({start:ve,end:Qe})},z=le=>{const ve=le.detail;if(m(ve?[...ve]:[]),!k&&s!=null&&ve){const Qe=ve.find(ws=>ws.value===s);Qe&&P(Qe)}},q=le=>{const ve=le.detail.index;T(ve)},Xe=le=>{const ve=le.detail.value;W(ve),P(p.find(Qe=>Qe.value===ve)),I(!1),D(!1)};return $.addEventListener("gui-range-change",N),$.addEventListener("gui-update-items",z),$.addEventListener("gui-focus-change",q),$.addEventListener("change",Xe),()=>{$.removeEventListener("gui-range-change",N),$.removeEventListener("gui-update-items",z),$.removeEventListener("gui-focus-change",q),$.removeEventListener("change",Xe)}},[W,p,l]),g.useEffect(()=>{const $=N=>{if(!A)return;const z=N.target,q=E.current&&E.current.contains(z),Xe=O.current&&O.current.contains(z);!q&&!Xe&&K()};return document.addEventListener("click",$),()=>document.removeEventListener("click",$)},[K,A]),g.useEffect(()=>{const N=k?.template!==null&&typeof k?.template=="object"?a.labelField??"label":null,z=N?k?.template[N]:k?.template;E.current.value=z??""},[k,a.labelField]),g.useEffect(()=>{B.current&&E.current&&O.current&&(B.current.targetElement=[E.current,O.current])},[]);const J=async $=>{switch($.key){case"ArrowDown":$.preventDefault(),D(!0),setTimeout(()=>{O.current&&(O.current.focus(),O.current.scrollToSelectedIndex())},0);break;case"Enter":E.current?.value||W(null);break}},Ze=g.useCallback($=>{const N=!!t.on?.filter;if(o($),$&&!N){I(!0),D(!0);const z=a.searchFields??[a.labelField,a.valueField].filter(ve=>!!ve),q=z.length>0,le=(a.items||[]).filter(ve=>{const Qe=Object.keys(ve);if(!Qe.length)return ve.toString().toLowerCase().includes($.toLowerCase());const _s=(Bi,Pc)=>Bi||ve[Pc].toString().toLowerCase().includes($.toLowerCase());return q?Qe.filter(Bi=>z.includes(Bi)).reduce(_s,!1):Qe.reduce(_s,!1)});w(le)}else I(!1),w([...a.items||[]])},[t.on?.filter,o,a.items,a.labelField,a.searchFields,a.valueField]),Tt=x.useDebounceCallback(Ze,a.inputDebounce??500),Pt=$=>{const N=$.target.value;A||D(!0),Tt(N)},lt=g.useCallback(()=>{A||(D(!0),setTimeout(()=>{O.current&&O.current.scrollToSelectedIndex()},0))},[A]),Dt=$=>{const N=$.relatedTarget,z=E.current&&E.current.contains(N),q=O.current&&O.current.contains(N);z||q||K()},X=x.useItemRenderer(a.itemRenderer)||fs,j=a.label,Oe=a.validator?.required,Te=a.disabled,De=a.readonly,dt=!!t.on?.filter,ae=r&&n&&n.length>0;return y.jsxs("div",{className:"gui-dropdown gui-field",style:{flex:a.size},children:[y.jsx("gui-label",{ref:B,uid:i,label:j,hint:a.hint,errors:n,touched:r,required:Oe,native:!1}),y.jsxs("div",{className:"gui-widget","aria-expanded":A,children:[y.jsx("input",{ref:E,type:"text",id:i,"data-cy":`${i}_textinput`,defaultValue:s??"",required:Oe,disabled:Te,readOnly:De,placeholder:a.placeholder??"",autoComplete:a.autocomplete??void 0,onKeyDown:J,onInput:Pt,onFocus:lt,onBlur:Dt,"aria-labelledby":a.label?`${i}_label`:void 0,"aria-describedby":a.hint?`${i}_hint`:void 0}),y.jsx("span",{className:"gui-dropdown__arrow",children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 256 256",children:y.jsx("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"})})}),y.jsx("gui-list",{ref:O,id:`${i}-list`,uid:i,value:s??"",valueField:a.valueField,items:C&&!dt?f:a.items,itemHeight:a.itemHeight,height:a.height,required:Oe,touched:r,disabled:Te||De,readOnly:De,hidden:!A,onFocus:lt,onBlur:Dt,children:H.map(($,N)=>{const z=c.start+N,q=s===$.value,Xe=S===z,le=a.labelField??"label",Qe=$.template!==null&&typeof $.template=="object"&&le&&!a.itemRenderer?$.template[le]:$.template;return y.jsx("div",{role:"option",tabIndex:-1,className:"gui-list__item-wrapper",id:`${i}-item-${z}`,style:{height:`${a.itemHeight||40}px`},"aria-selected":q,onClick:()=>G($,z),children:y.jsx(X,{template:Qe,value:$.value,index:z,selected:q,disabled:Te||De,focused:Xe})},z)})})]}),ae&&y.jsx("gui-errors",{uid:i,errors:n,touched:r})]})}const hu=Object.freeze(Object.defineProperty({__proto__:null,Dropdown:cu},Symbol.toStringTag,{value:"Module"}));function pu(e){const t=e.widget,{uid:i,errors:n,value:s,isTouched:r,templateData:a,onValueChanged:o,onBlur:l}=x.useInputWidget(t),d=g.useCallback(E=>{S.current&&E.relatedTarget&&S.current.contains(E.relatedTarget)||l()},[l]),[c,h]=g.useState({start:0,end:10}),[p,m]=g.useState([]),[f,w]=g.useState(-1),S=g.useRef(null),T=g.useMemo(()=>(p.length>0?p:a.items||[]).slice(c.start,c.end),[p,a.items,c]);g.useEffect(()=>{const E=S.current;if(!E)return;const B=G=>{const{startIndex:J,endIndex:Ze}=G.detail;h({start:J,end:Ze})},H=G=>{const J=G.detail;m(J?[...J]:[])},K=G=>{const J=G.detail.index;w(J)},W=G=>{const J=G.detail.value;o(J)};return E.addEventListener("change",W),E.addEventListener("gui-update-items",H),E.addEventListener("gui-range-change",B),E.addEventListener("gui-focus-change",K),()=>{E.removeEventListener("change",W),E.removeEventListener("gui-update-items",H),E.removeEventListener("gui-range-change",B),E.removeEventListener("gui-focus-change",K)}},[o]);const C=g.useCallback((E,B)=>{a.disabled||(o(E.value),w(B),S.current&&S.current.focusItemAtIndex(B))},[o]),I=x.useItemRenderer(a.itemRenderer)||fs,A=a.label,D=a.validator?.required,k=a.disabled,P=a.readonly,O=r&&n&&n.length>0;return y.jsxs("div",{className:"gui-list gui-field",style:{flex:a.size},children:[y.jsx("gui-label",{targetElement:S.current||void 0,uid:i,label:A,hint:a.hint,errors:n,touched:r,required:D,native:!1}),y.jsx("div",{className:"gui-widget",children:y.jsx("gui-list",{ref:S,id:i,uid:i,value:s??"",valueField:a.valueField,items:a.items,itemHeight:a.itemHeight,height:a.height,required:D,touched:r,disabled:k,readOnly:P,onBlur:d,children:T.map((E,B)=>{const H=c.start+B,K=s===E.value,W=f===H,G=a.labelField??"label",Ze=E.template!==null&&typeof E.template=="object"&&G&&!a.itemRenderer?E.template[G]:E.template;return y.jsx("div",{role:"option",tabIndex:-1,id:`${i}-item-${H}`,className:"gui-list__item-wrapper",style:{height:`${a.itemHeight||40}px`},"aria-selected":K,"aria-disabled":k?"true":"false",onClick:()=>C(E,H),children:y.jsx(I,{template:Ze,value:E.value,index:B,selected:K,disabled:k,focused:W})},H)})})}),O&&y.jsx("gui-errors",{uid:i,errors:n,touched:r})]})}const mu=Object.freeze(Object.defineProperty({__proto__:null,List:pu},Symbol.toStringTag,{value:"Module"}));var yu=Object.defineProperty,fu=Object.getOwnPropertyDescriptor,ce=(e,t,i,n)=>{for(var s=n>1?void 0:n?fu(t,i):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(s=(n?a(t,i,s):a(s))||s);return n&&s&&yu(t,i,s),s};let se=class extends ee{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId="en",this.errors=[],this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.hint=void 0,this.icon=void 0,this.placeholder=void 0,this.autocomplete=void 0,this.showPasswordIcon=void 0,this.hidePasswordIcon=void 0,this.showPasswordLabel=void 0,this.hidePasswordLabel=void 0,this.showPassword=!1,this.ariaController=new Fe(this,{getTargets:()=>this.querySelectorAll(`input[id="${this.uid}"]`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}render(){super.render();const e={uid:this.uid,label:this.label,hint:this.hint,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,icon:this.icon,placeholder:this.placeholder,autocomplete:this.autocomplete,showPasswordIcon:this.showPasswordIcon,hidePasswordIcon:this.hidePasswordIcon,showPasswordLabel:this.showPasswordLabel,hidePasswordLabel:this.hidePasswordLabel},t=hi("password",e),i={"gui-password--icon":!!this.icon};return v`
|
|
265
265
|
${Ge(this.uid,e)}
|
|
266
266
|
|
|
267
267
|
<div class="gui-widget">
|
|
@@ -294,7 +294,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
294
294
|
</div>
|
|
295
295
|
|
|
296
296
|
${Ee(this.uid,e)}
|
|
297
|
-
`}valueChanged(e){if(e.stopPropagation(),!this.readOnly){const t=e.target;this.dispatchEvent(new CustomEvent("input",{detail:{value:t.value},bubbles:!0,composed:!0}))}}onBlur(){this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}};ce([u({type:String})],se.prototype,"uid",2),ce([u({type:String})],se.prototype,"label",2),ce([u({type:String,attribute:"locale-id"})],se.prototype,"localeId",2),ce([u({type:Array})],se.prototype,"errors",2),ce([u({type:Boolean})],se.prototype,"touched",2),ce([u({type:Boolean})],se.prototype,"required",2),ce([u({type:Boolean})],se.prototype,"disabled",2),ce([u({type:Boolean,attribute:"readonly"})],se.prototype,"readOnly",2),ce([u({type:String})],se.prototype,"value",2),ce([u({type:String})],se.prototype,"hint",2),ce([u({type:String})],se.prototype,"icon",2),ce([u({type:String})],se.prototype,"placeholder",2),ce([u({type:String})],se.prototype,"autocomplete",2),ce([u({type:String})],se.prototype,"showPasswordIcon",2),ce([u({type:String})],se.prototype,"hidePasswordIcon",2),ce([u({type:String})],se.prototype,"showPasswordLabel",2),ce([u({type:String})],se.prototype,"hidePasswordLabel",2),ce([Y()],se.prototype,"showPassword",2),se=ce([ue("gui-password")],se),typeof customElements<"u"&&!customElements.get("gui-password")&&customElements.define("gui-password",se);function gu(e){const t=e.widget,{uid:i,errors:n,value:s,isTouched:r,templateData:a,onValueChanged:o,onBlur:l}=x.useInputWidget(t),d=g.useCallback(k=>o(k.nativeEvent.detail.value),[o]),c=a.label,h=a.hint,p=a.placeholder,m=a.autocomplete,f=a.showPasswordIcon,w=a.hidePasswordIcon,S=a.showPasswordLabel,T=a.hidePasswordLabel,C=a.icon,I=a.disabled,A=a.readonly,D=a.validator?.required;return y.jsx("div",{className:"gui-password gui-field",style:{flex:a.size},children:y.jsx("gui-password",{uid:i,label:c,hint:h,errors:n,touched:r,required:D,disabled:I,readOnly:A,value:s,icon:C,placeholder:p??void 0,autocomplete:m??void 0,showPasswordIcon:f,hidePasswordIcon:w,showPasswordLabel:S,hidePasswordLabel:T,onInput:d,onBlur:l})})}const bu=Object.freeze(Object.defineProperty({__proto__:null,Password:gu},Symbol.toStringTag,{value:"Module"}));var Du=Object.defineProperty,vu=Object.getOwnPropertyDescriptor,Re=(e,t,i,n)=>{for(var s=n>1?void 0:n?vu(t,i):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(s=(n?a(t,i,s):a(s))||s);return n&&s&&Du(t,i,s),s};let Ce=class extends ee{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId="en",this.errors=[],this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.hint=void 0,this.icon=void 0,this.placeholder=void 0,this.autocomplete=void 0,this.ariaController=new Fe(this,{getTargets:()=>this.querySelectorAll(`input[id="${this.uid}"]`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}render(){super.render();const e={uid:this.uid,label:this.label,hint:this.hint,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,icon:this.icon,placeholder:this.placeholder,autocomplete:this.autocomplete},t=
|
|
297
|
+
`}valueChanged(e){if(e.stopPropagation(),!this.readOnly){const t=e.target;this.dispatchEvent(new CustomEvent("input",{detail:{value:t.value},bubbles:!0,composed:!0}))}}onBlur(){this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}};ce([u({type:String})],se.prototype,"uid",2),ce([u({type:String})],se.prototype,"label",2),ce([u({type:String,attribute:"locale-id"})],se.prototype,"localeId",2),ce([u({type:Array})],se.prototype,"errors",2),ce([u({type:Boolean})],se.prototype,"touched",2),ce([u({type:Boolean})],se.prototype,"required",2),ce([u({type:Boolean})],se.prototype,"disabled",2),ce([u({type:Boolean,attribute:"readonly"})],se.prototype,"readOnly",2),ce([u({type:String})],se.prototype,"value",2),ce([u({type:String})],se.prototype,"hint",2),ce([u({type:String})],se.prototype,"icon",2),ce([u({type:String})],se.prototype,"placeholder",2),ce([u({type:String})],se.prototype,"autocomplete",2),ce([u({type:String})],se.prototype,"showPasswordIcon",2),ce([u({type:String})],se.prototype,"hidePasswordIcon",2),ce([u({type:String})],se.prototype,"showPasswordLabel",2),ce([u({type:String})],se.prototype,"hidePasswordLabel",2),ce([Y()],se.prototype,"showPassword",2),se=ce([ue("gui-password")],se),typeof customElements<"u"&&!customElements.get("gui-password")&&customElements.define("gui-password",se);function gu(e){const t=e.widget,{uid:i,errors:n,value:s,isTouched:r,templateData:a,onValueChanged:o,onBlur:l}=x.useInputWidget(t),d=g.useCallback(k=>o(k.nativeEvent.detail.value),[o]),c=a.label,h=a.hint,p=a.placeholder,m=a.autocomplete,f=a.showPasswordIcon,w=a.hidePasswordIcon,S=a.showPasswordLabel,T=a.hidePasswordLabel,C=a.icon,I=a.disabled,A=a.readonly,D=a.validator?.required;return y.jsx("div",{className:"gui-password gui-field",style:{flex:a.size},children:y.jsx("gui-password",{uid:i,label:c,hint:h,errors:n,touched:r,required:D,disabled:I,readOnly:A,value:s,icon:C,placeholder:p??void 0,autocomplete:m??void 0,showPasswordIcon:f,hidePasswordIcon:w,showPasswordLabel:S,hidePasswordLabel:T,onInput:d,onBlur:l})})}const bu=Object.freeze(Object.defineProperty({__proto__:null,Password:gu},Symbol.toStringTag,{value:"Module"}));var Du=Object.defineProperty,vu=Object.getOwnPropertyDescriptor,Re=(e,t,i,n)=>{for(var s=n>1?void 0:n?vu(t,i):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(s=(n?a(t,i,s):a(s))||s);return n&&s&&Du(t,i,s),s};let Ce=class extends ee{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId="en",this.errors=[],this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.hint=void 0,this.icon=void 0,this.placeholder=void 0,this.autocomplete=void 0,this.ariaController=new Fe(this,{getTargets:()=>this.querySelectorAll(`input[id="${this.uid}"]`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}render(){super.render();const e={uid:this.uid,label:this.label,hint:this.hint,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,icon:this.icon,placeholder:this.placeholder,autocomplete:this.autocomplete},t=hi("textinput",e),i={"gui-textinput--icon":!!this.icon};return v`
|
|
298
298
|
${Ge(this.uid,e)}
|
|
299
299
|
|
|
300
300
|
<div class="gui-widget">
|
|
@@ -316,7 +316,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
316
316
|
</div>
|
|
317
317
|
|
|
318
318
|
${Ee(this.uid,e)}
|
|
319
|
-
`}valueChanged(e){if(e.stopPropagation(),!this.readOnly){const t=e.target;this.dispatchEvent(new CustomEvent("input",{detail:{value:t.value},bubbles:!0,composed:!0}))}}onBlur(){this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}};Re([u({type:String})],Ce.prototype,"uid",2),Re([u({type:String})],Ce.prototype,"label",2),Re([u({type:String,attribute:"locale-id"})],Ce.prototype,"localeId",2),Re([u({type:Array})],Ce.prototype,"errors",2),Re([u({type:Boolean})],Ce.prototype,"touched",2),Re([u({type:Boolean})],Ce.prototype,"required",2),Re([u({type:Boolean})],Ce.prototype,"disabled",2),Re([u({type:Boolean,attribute:"readonly"})],Ce.prototype,"readOnly",2),Re([u({type:String})],Ce.prototype,"value",2),Re([u({type:String})],Ce.prototype,"hint",2),Re([u({type:String})],Ce.prototype,"icon",2),Re([u({type:String})],Ce.prototype,"placeholder",2),Re([u({type:String})],Ce.prototype,"autocomplete",2),Ce=Re([ue("gui-textinput")],Ce),typeof customElements<"u"&&!customElements.get("gui-textinput")&&customElements.define("gui-textinput",Ce);function wu(e){const t=e.widget,{uid:i,errors:n,value:s,isTouched:r,templateData:a,onValueChanged:o,onBlur:l}=x.useInputWidget(t),d=g.useCallback(C=>o(C.nativeEvent.detail.value),[o]),c=a.label,h=a.hint,p=a.placeholder,m=a.autocomplete,f=a.icon,w=a.disabled,S=a.readonly,T=a.validator?.required;return y.jsx("div",{className:"gui-textinput gui-field",style:{flex:a.size},children:y.jsx("gui-textinput",{uid:i,label:c,hint:h,errors:n,touched:r,required:T,disabled:w,readOnly:S,value:s,icon:f,placeholder:p??void 0,autocomplete:m??void 0,onInput:d,onBlur:l})})}const _u=Object.freeze(Object.defineProperty({__proto__:null,TextInput:wu},Symbol.toStringTag,{value:"Module"}));const
|
|
319
|
+
`}valueChanged(e){if(e.stopPropagation(),!this.readOnly){const t=e.target;this.dispatchEvent(new CustomEvent("input",{detail:{value:t.value},bubbles:!0,composed:!0}))}}onBlur(){this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}};Re([u({type:String})],Ce.prototype,"uid",2),Re([u({type:String})],Ce.prototype,"label",2),Re([u({type:String,attribute:"locale-id"})],Ce.prototype,"localeId",2),Re([u({type:Array})],Ce.prototype,"errors",2),Re([u({type:Boolean})],Ce.prototype,"touched",2),Re([u({type:Boolean})],Ce.prototype,"required",2),Re([u({type:Boolean})],Ce.prototype,"disabled",2),Re([u({type:Boolean,attribute:"readonly"})],Ce.prototype,"readOnly",2),Re([u({type:String})],Ce.prototype,"value",2),Re([u({type:String})],Ce.prototype,"hint",2),Re([u({type:String})],Ce.prototype,"icon",2),Re([u({type:String})],Ce.prototype,"placeholder",2),Re([u({type:String})],Ce.prototype,"autocomplete",2),Ce=Re([ue("gui-textinput")],Ce),typeof customElements<"u"&&!customElements.get("gui-textinput")&&customElements.define("gui-textinput",Ce);function wu(e){const t=e.widget,{uid:i,errors:n,value:s,isTouched:r,templateData:a,onValueChanged:o,onBlur:l}=x.useInputWidget(t),d=g.useCallback(C=>o(C.nativeEvent.detail.value),[o]),c=a.label,h=a.hint,p=a.placeholder,m=a.autocomplete,f=a.icon,w=a.disabled,S=a.readonly,T=a.validator?.required;return y.jsx("div",{className:"gui-textinput gui-field",style:{flex:a.size},children:y.jsx("gui-textinput",{uid:i,label:c,hint:h,errors:n,touched:r,required:T,disabled:w,readOnly:S,value:s,icon:f,placeholder:p??void 0,autocomplete:m??void 0,onInput:d,onBlur:l})})}const _u=Object.freeze(Object.defineProperty({__proto__:null,TextInput:wu},Symbol.toStringTag,{value:"Module"}));const gs="important",ku=" !"+gs,Ni=Zt(class extends qt{constructor(e){if(super(e),e.type!==tt.ATTRIBUTE||e.name!=="style"||e.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce((t,i)=>{const n=e[i];return n==null?t:t+`${i=i.includes("-")?i:i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${n};`},"")}update(e,[t]){const{style:i}=e.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const n of this.ft)t[n]==null&&(this.ft.delete(n),n.includes("-")?i.removeProperty(n):i[n]=null);for(const n in t){const s=t[n];if(s!=null){this.ft.add(n);const r=typeof s=="string"&&s.endsWith(ku);n.includes("-")||r?i.setProperty(n,r?s.slice(0,-11):s,r?gs:""):i[n]=s}}return ze}});var $u=Object.defineProperty,Su=Object.getOwnPropertyDescriptor,ke=(e,t,i,n)=>{for(var s=n>1?void 0:n?Su(t,i):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(s=(n?a(t,i,s):a(s))||s);return n&&s&&$u(t,i,s),s};let he=class extends ee{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId="en",this.errors=[],this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.hint=void 0,this.placeholder=void 0,this.autocomplete=void 0,this.minimumHeight=void 0,this.autoGrow=!1,this.maxLength=void 0,this.ariaController=new Fe(this,{getTargets:()=>this.querySelectorAll(`textarea[id="${this.uid}"]`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}render(){super.render();const e={uid:this.uid,label:this.label,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,hint:this.hint,placeholder:this.placeholder,autocomplete:this.autocomplete,counterMode:this.counterMode??"remaining",minimumHeight:this.minimumHeight??120,autoGrow:this.autoGrow??!1,maxLength:this.maxLength};let t=v``;if(e.counterMode&&e.maxLength){const s={"gui-textarea--counter":!0,"gui-textarea--counter__error":(e.value?.length??0)>e.maxLength},r=e.counterMode==="current"?v`<span>${e.value?.length??0}</span>`:v`<span>${e.maxLength-(e.value?.length??0)}</span>`;t=v`<div class=${fe(s)}>
|
|
320
320
|
${r}
|
|
321
321
|
<span> / ${e.maxLength}</span>
|
|
322
322
|
</div>`}const i={height:`${e.minimumHeight}px`,"min-height":`${e.minimumHeight}px`},n=this.querySelector(`textarea[id="${this.uid}"]`);if(this.autoGrow&&n){const s=window.getComputedStyle(n),r=parseFloat(s.paddingTop),a=parseFloat(s.paddingBottom),o=r+a;n.style.height="auto",i.height=`${Math.max(this.minimumHeight??120,n.scrollHeight-o)}px`}return v`
|
|
@@ -326,7 +326,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
326
326
|
<textarea
|
|
327
327
|
id=${this.uid}
|
|
328
328
|
data-cy=${`${this.uid}_textarea`}
|
|
329
|
-
style=${
|
|
329
|
+
style=${Ni(i)}
|
|
330
330
|
?required=${e.required}
|
|
331
331
|
?disabled=${e.disabled}
|
|
332
332
|
?readonly=${e.readonly}
|
|
@@ -341,7 +341,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
341
341
|
<div>${Ee(this.uid,e)}</div>
|
|
342
342
|
${t}
|
|
343
343
|
</div>
|
|
344
|
-
`}valueChanged(e){if(e.stopPropagation(),!this.readOnly){const t=e.target;this.dispatchEvent(new CustomEvent("input",{detail:{value:t.value},bubbles:!0,composed:!0}))}}onBlur(){this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}};ke([u({type:String})],he.prototype,"uid",2),ke([u({type:String})],he.prototype,"label",2),ke([u({type:String,attribute:"locale-id"})],he.prototype,"localeId",2),ke([u({type:Array})],he.prototype,"errors",2),ke([u({type:Boolean})],he.prototype,"touched",2),ke([u({type:Boolean})],he.prototype,"required",2),ke([u({type:Boolean})],he.prototype,"disabled",2),ke([u({type:Boolean,attribute:"readonly"})],he.prototype,"readOnly",2),ke([u({type:String})],he.prototype,"value",2),ke([u({type:String})],he.prototype,"hint",2),ke([u({type:String})],he.prototype,"placeholder",2),ke([u({type:String})],he.prototype,"autocomplete",2),ke([u({type:String,attribute:"countermode"})],he.prototype,"counterMode",2),ke([u({type:Number,attribute:"minimumheight"})],he.prototype,"minimumHeight",2),ke([u({type:Boolean,attribute:"autogrow"})],he.prototype,"autoGrow",2),ke([u({type:Number,attribute:"maxlength"})],he.prototype,"maxLength",2),he=ke([ue("gui-textarea")],he),typeof customElements<"u"&&!customElements.get("gui-textarea")&&customElements.define("gui-textarea",he);function Au(e){const t=e.widget,{uid:i,errors:n,value:s,isTouched:r,templateData:a,onValueChanged:o,onBlur:l}=x.useInputWidget(t),d=g.useCallback(D=>o(D.nativeEvent.detail.value),[o]),c=a.label,h=a.hint,p=a.placeholder,m=a.validator?.maxLength,f=a.counterMode,w=a.autocomplete,S=a.autoGrow,T=a.minimumHeight,C=a.disabled,I=a.readonly,A=a.validator?.required;return y.jsx("div",{className:"gui-textarea gui-field",style:{flex:a.size},children:y.jsx("gui-textarea",{uid:i,label:c,errors:n,touched:r,required:A,disabled:C,readOnly:I,value:s,hint:h,placeholder:p,autocomplete:w??void 0,counterMode:f,minimumHeight:T,autoGrow:S,maxLength:m,onInput:d,onBlur:l})})}const Ou=Object.freeze(Object.defineProperty({__proto__:null,TextArea:Au},Symbol.toStringTag,{value:"Module"}));const
|
|
344
|
+
`}valueChanged(e){if(e.stopPropagation(),!this.readOnly){const t=e.target;this.dispatchEvent(new CustomEvent("input",{detail:{value:t.value},bubbles:!0,composed:!0}))}}onBlur(){this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}};ke([u({type:String})],he.prototype,"uid",2),ke([u({type:String})],he.prototype,"label",2),ke([u({type:String,attribute:"locale-id"})],he.prototype,"localeId",2),ke([u({type:Array})],he.prototype,"errors",2),ke([u({type:Boolean})],he.prototype,"touched",2),ke([u({type:Boolean})],he.prototype,"required",2),ke([u({type:Boolean})],he.prototype,"disabled",2),ke([u({type:Boolean,attribute:"readonly"})],he.prototype,"readOnly",2),ke([u({type:String})],he.prototype,"value",2),ke([u({type:String})],he.prototype,"hint",2),ke([u({type:String})],he.prototype,"placeholder",2),ke([u({type:String})],he.prototype,"autocomplete",2),ke([u({type:String,attribute:"countermode"})],he.prototype,"counterMode",2),ke([u({type:Number,attribute:"minimumheight"})],he.prototype,"minimumHeight",2),ke([u({type:Boolean,attribute:"autogrow"})],he.prototype,"autoGrow",2),ke([u({type:Number,attribute:"maxlength"})],he.prototype,"maxLength",2),he=ke([ue("gui-textarea")],he),typeof customElements<"u"&&!customElements.get("gui-textarea")&&customElements.define("gui-textarea",he);function Au(e){const t=e.widget,{uid:i,errors:n,value:s,isTouched:r,templateData:a,onValueChanged:o,onBlur:l}=x.useInputWidget(t),d=g.useCallback(D=>o(D.nativeEvent.detail.value),[o]),c=a.label,h=a.hint,p=a.placeholder,m=a.validator?.maxLength,f=a.counterMode,w=a.autocomplete,S=a.autoGrow,T=a.minimumHeight,C=a.disabled,I=a.readonly,A=a.validator?.required;return y.jsx("div",{className:"gui-textarea gui-field",style:{flex:a.size},children:y.jsx("gui-textarea",{uid:i,label:c,errors:n,touched:r,required:A,disabled:C,readOnly:I,value:s,hint:h,placeholder:p,autocomplete:w??void 0,counterMode:f,minimumHeight:T,autoGrow:S,maxLength:m,onInput:d,onBlur:l})})}const Ou=Object.freeze(Object.defineProperty({__proto__:null,TextArea:Au},Symbol.toStringTag,{value:"Module"}));const zi=e=>e??_;class Fi extends qt{constructor(t){if(super(t),this.it=_,t.type!==tt.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===_||t==null)return this._t=void 0,this.it=t;if(t===ze)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const i=[t];return i.raw=i,this._t={_$litType$:this.constructor.resultType,strings:i,values:[]}}}Fi.directiveName="unsafeHTML",Fi.resultType=1;const Eu=Zt(Fi);var Iu=Object.defineProperty,Cu=Object.getOwnPropertyDescriptor,Ri=(e,t,i,n)=>{for(var s=n>1?void 0:n?Cu(t,i):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(s=(n?a(t,i,s):a(s))||s);return n&&s&&Iu(t,i,s),s};let Ht=class extends ee{constructor(){super(...arguments),this.md=void 0,this.dependencies=void 0}createRenderRoot(){return this}render(){return v`${Eu(this.dependencies?.markdown?.parse(this.md??""))}`}};Ri([u({type:String})],Ht.prototype,"md",2),Ri([u({type:Object})],Ht.prototype,"dependencies",2),Ht=Ri([ue("gui-markdown-text")],Ht),typeof customElements<"u"&&!customElements.get("gui-markdown-text")&&customElements.define("gui-markdown-text",Ht);var Tu=Object.defineProperty,Pu=Object.getOwnPropertyDescriptor,F=(e,t,i,n)=>{for(var s=n>1?void 0:n?Pu(t,i):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(s=(n?a(t,i,s):a(s))||s);return n&&s&&Tu(t,i,s),s};let M=class extends ee{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId="en",this.errors=[],this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.hint=void 0,this.tools=void 0,this.placeholder=void 0,this.autocomplete=void 0,this.minimumHeight=void 0,this.autoGrow=!1,this.defaultOpenPreview=void 0,this.maxLength=void 0,this.headingTitle=void 0,this.boldTitle=void 0,this.italicTitle=void 0,this.strikethroughTitle=void 0,this.quoteTitle=void 0,this.linkTitle=void 0,this.orderedListTitle=void 0,this.unorderedListTitle=void 0,this.splitViewTitle=void 0,this.dependencies=void 0,this.splitViewActive=!1,this.activeFormats={},this.splitViewInitialized=!1,this.ariaController=new Fe(this,{getTargets:()=>this.querySelectorAll(`textarea[id="${this.uid}"]`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}updated(){this.recalculateAutoGrow()}willUpdate(e){!this.splitViewInitialized&&e.has("defaultOpenPreview")&&(this.splitViewActive=!!this.defaultOpenPreview,this.splitViewInitialized=!0)}render(){super.render();const e={uid:this.uid,label:this.label,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,hint:this.hint,placeholder:this.placeholder,counterMode:this.counterMode??"remaining",minimumHeight:this.minimumHeight??120,autoGrow:this.autoGrow??!1,defaultOpenPreview:this.defaultOpenPreview??!1,maxLength:this.maxLength,dependencies:this.dependencies},t={"gui-markdown--icon":!1};let i=v``;if(e.counterMode&&e.maxLength){const s={"gui-markdown--counter":!0,"gui-markdown--counter__error":(e.value?.length??0)>e.maxLength},r=e.counterMode==="current"?v`<span>${e.value?.length??0}</span>`:v`<span>${e.maxLength-(e.value?.length??0)}</span>`;i=v`<div class=${fe(s)}>
|
|
345
345
|
${r}
|
|
346
346
|
<span> / ${e.maxLength}</span>
|
|
347
347
|
</div>`}const n={"min-height":`${e.minimumHeight}px`};return v`
|
|
@@ -376,13 +376,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
376
376
|
</ul>
|
|
377
377
|
</nav>
|
|
378
378
|
<textarea
|
|
379
|
-
id=${
|
|
379
|
+
id=${zi(this.uid)}
|
|
380
380
|
class=${fe(t)}
|
|
381
|
-
style=${
|
|
381
|
+
style=${Ni(n)}
|
|
382
382
|
?required=${e.required}
|
|
383
383
|
?disabled=${e.disabled}
|
|
384
384
|
?readonly=${e.readonly}
|
|
385
|
-
placeholder=${
|
|
385
|
+
placeholder=${zi(e.placeholder)}
|
|
386
386
|
autocomplete=${this.autocomplete||_}
|
|
387
387
|
.value=${this.value||""}
|
|
388
388
|
@input=${this.valueChanged}
|
|
@@ -393,7 +393,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
393
393
|
|
|
394
394
|
${this.splitViewActive?v`
|
|
395
395
|
<section
|
|
396
|
-
data-cy=${
|
|
396
|
+
data-cy=${zi(this.uid?`${this.uid}_markdown`:_)}
|
|
397
397
|
class="gui-markdown__preview"
|
|
398
398
|
>
|
|
399
399
|
<gui-markdown-text
|
|
@@ -613,7 +613,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
613
613
|
inputmode="decimal"
|
|
614
614
|
id=${this.uid}
|
|
615
615
|
data-cy=${`${this.uid}_number`}
|
|
616
|
-
style=${
|
|
616
|
+
style=${Ni(t)}
|
|
617
617
|
value=${this.value}
|
|
618
618
|
?required=${this.required}
|
|
619
619
|
?disabled=${this.disabled}
|
|
@@ -638,7 +638,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
638
638
|
</div>
|
|
639
639
|
|
|
640
640
|
${Ee(this.uid,i)}
|
|
641
|
-
`}keyDown(e){switch(e.stopPropagation(),e.key){case"ArrowUp":e.preventDefault(),this.plus();break;case"ArrowDown":e.preventDefault(),this.minus();break}}minus(){if(!this.readOnly){const e=this.querySelector(`input[id="${this.uid}"]`),t=typeof this.step=="number"?this.step:1;let i=Number(e.valueAsNumber)||Number(e.valueAsNumber)===0?e.valueAsNumber-t:1;i=Number(this.maximum)?Math.min(i,this.maximum):i,i=Number(this.minimum)?Math.max(i,this.minimum):i,e.valueAsNumber=i,this.value=i,this.dispatchEvent(new CustomEvent("input",{detail:{value:this.value},bubbles:!0,composed:!0}))}}plus(){if(!this.readOnly){const e=this.querySelector(`input[id="${this.uid}"]`),t=typeof this.step=="number"?this.step:1;let i=Number(e.valueAsNumber)||Number(e.valueAsNumber)===0?e.valueAsNumber+t:1;i=Number(this.maximum)?Math.min(i,this.maximum):i,i=Number(this.minimum)?Math.max(i,this.minimum):i,e.valueAsNumber=i,this.value=i,this.dispatchEvent(new CustomEvent("input",{detail:{value:this.value},bubbles:!0,composed:!0}))}}valueChanged(e){if(e.stopPropagation(),!this.readOnly){const t=e.target;this.dispatchEvent(new CustomEvent("input",{detail:{value:t.valueAsNumber},bubbles:!0,composed:!0}))}}onBlur(){this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}};$e([u({type:String})],pe.prototype,"uid",2),$e([u({type:String})],pe.prototype,"label",2),$e([u({type:String})],pe.prototype,"hint",2),$e([u({type:String,attribute:"locale-id"})],pe.prototype,"localeId",2),$e([u({type:Array})],pe.prototype,"errors",2),$e([u({type:Boolean})],pe.prototype,"touched",2),$e([u({type:Boolean})],pe.prototype,"required",2),$e([u({type:Boolean})],pe.prototype,"disabled",2),$e([u({type:Boolean,attribute:"readonly"})],pe.prototype,"readOnly",2),$e([u({type:Number})],pe.prototype,"value",2),$e([u({type:Number})],pe.prototype,"step",2),$e([u({type:String})],pe.prototype,"placeholder",2),$e([u({type:String})],pe.prototype,"autocomplete",2),$e([u({type:Number})],pe.prototype,"minimum",2),$e([u({type:Number})],pe.prototype,"maximum",2),$e([u({type:Number})],pe.prototype,"autoGrow",2),pe=$e([ue("gui-number")],pe),typeof customElements<"u"&&!customElements.get("gui-number")&&customElements.define("gui-number",pe);function Uu(e){const t=e.widget,{uid:i,errors:n,value:s,isTouched:r,templateData:a,onValueChanged:o,onBlur:l}=x.useInputWidget(t),d=g.useCallback(D=>o(D.nativeEvent.detail.value),[o]),c=a.label,h=a.hint,p=a.placeholder,m=a.step,f=a.minimum,w=a.maximum,S=a.autocomplete,T=a.autoGrow,C=a.disabled,I=a.readonly,A=a.validator?.required;return y.jsx("div",{className:"gui-number gui-field",style:{flex:a.size},children:y.jsx("gui-number",{uid:i,label:c,hint:h,errors:n,touched:r,required:A,disabled:C,readOnly:I,value:s,step:m,minimum:f,maximum:w,autoGrow:T,autocomplete:S??void 0,placeholder:p??void 0,onInput:d,onBlur:l})})}const Hu=Object.freeze(Object.defineProperty({__proto__:null,NumberInput:Uu},Symbol.toStringTag,{value:"Module"}));function Wu(e){const t=typeof e;return t==="string"||t==="number"}function
|
|
641
|
+
`}keyDown(e){switch(e.stopPropagation(),e.key){case"ArrowUp":e.preventDefault(),this.plus();break;case"ArrowDown":e.preventDefault(),this.minus();break}}minus(){if(!this.readOnly){const e=this.querySelector(`input[id="${this.uid}"]`),t=typeof this.step=="number"?this.step:1;let i=Number(e.valueAsNumber)||Number(e.valueAsNumber)===0?e.valueAsNumber-t:1;i=Number(this.maximum)?Math.min(i,this.maximum):i,i=Number(this.minimum)?Math.max(i,this.minimum):i,e.valueAsNumber=i,this.value=i,this.dispatchEvent(new CustomEvent("input",{detail:{value:this.value},bubbles:!0,composed:!0}))}}plus(){if(!this.readOnly){const e=this.querySelector(`input[id="${this.uid}"]`),t=typeof this.step=="number"?this.step:1;let i=Number(e.valueAsNumber)||Number(e.valueAsNumber)===0?e.valueAsNumber+t:1;i=Number(this.maximum)?Math.min(i,this.maximum):i,i=Number(this.minimum)?Math.max(i,this.minimum):i,e.valueAsNumber=i,this.value=i,this.dispatchEvent(new CustomEvent("input",{detail:{value:this.value},bubbles:!0,composed:!0}))}}valueChanged(e){if(e.stopPropagation(),!this.readOnly){const t=e.target;this.dispatchEvent(new CustomEvent("input",{detail:{value:t.valueAsNumber},bubbles:!0,composed:!0}))}}onBlur(){this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}};$e([u({type:String})],pe.prototype,"uid",2),$e([u({type:String})],pe.prototype,"label",2),$e([u({type:String})],pe.prototype,"hint",2),$e([u({type:String,attribute:"locale-id"})],pe.prototype,"localeId",2),$e([u({type:Array})],pe.prototype,"errors",2),$e([u({type:Boolean})],pe.prototype,"touched",2),$e([u({type:Boolean})],pe.prototype,"required",2),$e([u({type:Boolean})],pe.prototype,"disabled",2),$e([u({type:Boolean,attribute:"readonly"})],pe.prototype,"readOnly",2),$e([u({type:Number})],pe.prototype,"value",2),$e([u({type:Number})],pe.prototype,"step",2),$e([u({type:String})],pe.prototype,"placeholder",2),$e([u({type:String})],pe.prototype,"autocomplete",2),$e([u({type:Number})],pe.prototype,"minimum",2),$e([u({type:Number})],pe.prototype,"maximum",2),$e([u({type:Number})],pe.prototype,"autoGrow",2),pe=$e([ue("gui-number")],pe),typeof customElements<"u"&&!customElements.get("gui-number")&&customElements.define("gui-number",pe);function Uu(e){const t=e.widget,{uid:i,errors:n,value:s,isTouched:r,templateData:a,onValueChanged:o,onBlur:l}=x.useInputWidget(t),d=g.useCallback(D=>o(D.nativeEvent.detail.value),[o]),c=a.label,h=a.hint,p=a.placeholder,m=a.step,f=a.minimum,w=a.maximum,S=a.autocomplete,T=a.autoGrow,C=a.disabled,I=a.readonly,A=a.validator?.required;return y.jsx("div",{className:"gui-number gui-field",style:{flex:a.size},children:y.jsx("gui-number",{uid:i,label:c,hint:h,errors:n,touched:r,required:A,disabled:C,readOnly:I,value:s,step:m,minimum:f,maximum:w,autoGrow:T,autocomplete:S??void 0,placeholder:p??void 0,onInput:d,onBlur:l})})}const Hu=Object.freeze(Object.defineProperty({__proto__:null,NumberInput:Uu},Symbol.toStringTag,{value:"Module"}));function Wu(e){const t=typeof e;return t==="string"||t==="number"}function bs(e,t){return t.find(i=>i.value.toString()===e)?.value}const Ds=(e,t)=>{if(Array.isArray(e)&&e.length>0&&!ks.isOption(e[0])){if(Wu(e[0]))return e.map(i=>({label:i.toString(),value:i}));if(Gu(e[0],t)){const i=Yu(e[0],t);return e.map(i)}else throw new Error("Invalid option shape")}return e},Gu=(e,{labelField:t,valueField:i})=>{if(e===null||typeof e!="object")return!1;const n=e,s=t?Object.prototype.hasOwnProperty.call(n,t):!1,r=i?Object.prototype.hasOwnProperty.call(n,i):!1;return t&&!s?!1:!(i&&!r)};function Yu(e,{labelField:t,valueField:i}){if(e===null||typeof e!="object")throw new Error("Provided value is not an object");const n=e,s=t&&Object.prototype.hasOwnProperty.call(n,t)?t:void 0,r=i&&Object.prototype.hasOwnProperty.call(n,i)?i:void 0;if(!s&&!r)throw new Error("Neither labelField nor valueField exists on the object");return a=>{if(a===null||typeof a!="object")throw new Error("Item is not an object");const o=a;return{label:s?o[s]:"",value:r?o[r]:""}}}var Ku=Object.defineProperty,Ju=Object.getOwnPropertyDescriptor,Se=(e,t,i,n)=>{for(var s=n>1?void 0:n?Ju(t,i):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(s=(n?a(t,i,s):a(s))||s);return n&&s&&Ku(t,i,s),s};let me=class extends ee{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId="en",this.errors=[],this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.hint=void 0,this.icon=void 0,this.autocomplete=void 0,this.options=[],this.placeholder=void 0,this.labelField=void 0,this.valueField=void 0,this.optionsLoading=!1,this.hasMatchingValue=!1,this.ariaController=new Fe(this,{getTargets:()=>this.querySelectorAll(`select[id="${this.uid}"]`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,readonly:this.readOnly,disabled:this.disabled,touched:this.touched}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}render(){super.render();const e={uid:this.uid,label:this.label,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,hint:this.hint,icon:this.icon,autocomplete:this.autocomplete,options:this.options,placeholder:this.placeholder,labelField:this.labelField,valueField:this.valueField},t=hi("select",e);this.options=Ds(this.options,{labelField:this.labelField,valueField:this.valueField}),this.hasMatchingValue=this.options?.length?this.options.find(({value:n})=>n===this.value)!==void 0:!1;const i=this.optionsLoading?v`<span>Loading...</span>`:v`
|
|
642
642
|
<option value="" disabled selected=${this.hasMatchingValue?_:""}>
|
|
643
643
|
${this.placeholder??"Select an option"}
|
|
644
644
|
</option>
|
|
@@ -675,7 +675,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
675
675
|
</div>
|
|
676
676
|
|
|
677
677
|
${Ee(this.uid,e)}
|
|
678
|
-
`}updated(e){e.has("value")&&!this.hasMatchingValue&&this.value&&this.dispatchEvent(new CustomEvent("inputError",{detail:{message:`Invalid selection: '${this.value}' is not a valid option.`},bubbles:!0}))}valueChanged(e){if(e.stopPropagation(),!this.readOnly){const t=e.target;this.dispatchEvent(new CustomEvent("change",{detail:{value:
|
|
678
|
+
`}updated(e){e.has("value")&&!this.hasMatchingValue&&this.value&&this.dispatchEvent(new CustomEvent("inputError",{detail:{message:`Invalid selection: '${this.value}' is not a valid option.`},bubbles:!0}))}valueChanged(e){if(e.stopPropagation(),!this.readOnly){const t=e.target;this.dispatchEvent(new CustomEvent("change",{detail:{value:bs(t.value,this.options)},bubbles:!0,composed:!0}))}}onBlur(){this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}};Se([u({type:String})],me.prototype,"uid",2),Se([u({type:String})],me.prototype,"label",2),Se([u({type:String,attribute:"locale-id"})],me.prototype,"localeId",2),Se([u({type:Array})],me.prototype,"errors",2),Se([u({type:Boolean})],me.prototype,"touched",2),Se([u({type:Boolean})],me.prototype,"required",2),Se([u({type:Boolean})],me.prototype,"disabled",2),Se([u({type:Boolean,attribute:"readonly"})],me.prototype,"readOnly",2),Se([u({type:String})],me.prototype,"value",2),Se([u({type:String})],me.prototype,"hint",2),Se([u({type:String})],me.prototype,"icon",2),Se([u({type:String})],me.prototype,"autocomplete",2),Se([u({type:String})],me.prototype,"options",2),Se([u({type:String})],me.prototype,"placeholder",2),Se([u({type:String})],me.prototype,"labelField",2),Se([u({type:String})],me.prototype,"valueField",2),me=Se([ue("gui-select")],me),typeof customElements<"u"&&!customElements.get("gui-select")&&customElements.define("gui-select",me);function Xu(e){const t=e.widget,{uid:i,errors:n,value:s,isTouched:r,templateData:a,onValueChanged:o,onBlur:l,injectValidationIssues:d}=x.useInputWidget(t),c=g.useCallback(P=>o(P.nativeEvent.detail.value),[o]),h=g.useCallback(P=>{const O=P,E=B=>{d([B.detail.message])};return P&&O.addEventListener("inputError",E),()=>{O.removeEventListener("inputError",E)}},[d]),p=a.options,m=a.label,f=a.hint,w=a.placeholder,S=a.autocomplete,T=a.icon,C=a.valueField,I=a.labelField,A=a.disabled,D=a.readonly,k=a.validator?.required;return y.jsx("div",{className:"gui-select gui-field",style:{flex:a.size},children:y.jsx("gui-select",{ref:h,uid:i,label:m,errors:n,touched:r,required:k,disabled:A,readOnly:D,value:s,hint:f,placeholder:w,autocomplete:S??void 0,icon:T,options:p,labelField:I,valueField:C,onChange:c,onBlur:l})})}const Qu=Object.freeze(Object.defineProperty({__proto__:null,Select:Xu},Symbol.toStringTag,{value:"Module"}));var ec=Object.defineProperty,tc=Object.getOwnPropertyDescriptor,Ne=(e,t,i,n)=>{for(var s=n>1?void 0:n?tc(t,i):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(s=(n?a(t,i,s):a(s))||s);return n&&s&&ec(t,i,s),s};let Ae=class extends ee{constructor(){super(...arguments),this.uid=void 0,this.label=void 0,this.localeId="en",this.errors=[],this.touched=!1,this.required=!1,this.disabled=!1,this.readOnly=!1,this.value=void 0,this.hint=void 0,this.options=[],this.labelField=void 0,this.valueField=void 0,this.direction="column",this.optionsLoading=!1,this.hasMatchingValue=!1,this.ariaController=new Fe(this,{getTargets:()=>this.querySelectorAll(`input[name="${this.uid}"]`),getState:()=>({uid:this.uid,templateData:{hint:this.hint,errors:this.errors,touched:this.touched,readonly:!1,disabled:!1}})})}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}render(){super.render();const e={uid:this.uid,label:this.label,errors:this.errors,touched:this.touched,required:this.required,disabled:this.disabled,readonly:this.readOnly,value:this.value,hint:this.hint,options:this.options,labelField:this.labelField,valueField:this.valueField,direction:this.direction};this.options=Ds(this.options,{labelField:this.labelField,valueField:this.valueField});const t=this.value;this.hasMatchingValue=this.options?.length?this.options.find(({value:n})=>n===t)!==void 0:!1;const i=this.optionsLoading?v`<span>Loading...</span>`:v`
|
|
679
679
|
${it(this.options||[],n=>n?.value,(n,s)=>{const r=this.hasMatchingValue&&n.value===e.value,a=!this.hasMatchingValue&&s===0,o=r||a;return v`<label for=${`${this.uid}_${s}`}>
|
|
680
680
|
<input
|
|
681
681
|
type="radio"
|
|
@@ -706,7 +706,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
706
706
|
</div>
|
|
707
707
|
|
|
708
708
|
${Ee(this.uid,e)}
|
|
709
|
-
`}valueChanged(e){if(e.stopPropagation(),!this.readOnly){const t=e.target;this.dispatchEvent(new CustomEvent("change",{detail:{value:
|
|
709
|
+
`}valueChanged(e){if(e.stopPropagation(),!this.readOnly){const t=e.target;this.dispatchEvent(new CustomEvent("change",{detail:{value:bs(t.value,this.options)},bubbles:!0,composed:!0}))}}onBlur(){this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}};Ne([u({type:String})],Ae.prototype,"uid",2),Ne([u({type:String})],Ae.prototype,"label",2),Ne([u({type:String,attribute:"locale-id"})],Ae.prototype,"localeId",2),Ne([u({type:Array})],Ae.prototype,"errors",2),Ne([u({type:Boolean})],Ae.prototype,"touched",2),Ne([u({type:Boolean})],Ae.prototype,"required",2),Ne([u({type:Boolean})],Ae.prototype,"disabled",2),Ne([u({type:Boolean,attribute:"readonly"})],Ae.prototype,"readOnly",2),Ne([u({type:String})],Ae.prototype,"value",2),Ne([u({type:String})],Ae.prototype,"hint",2),Ne([u({type:String})],Ae.prototype,"options",2),Ne([u({type:String})],Ae.prototype,"labelField",2),Ne([u({type:String})],Ae.prototype,"valueField",2),Ne([u({type:String})],Ae.prototype,"direction",2),Ae=Ne([ue("gui-radiogroup")],Ae),typeof customElements<"u"&&!customElements.get("gui-radiogroup")&&customElements.define("gui-radiogroup",Ae);function ic(e){const t=e.widget,{uid:i,errors:n,value:s,isTouched:r,templateData:a,onValueChanged:o,onBlur:l}=x.useInputWidget(t),d=g.useCallback(I=>o(I.nativeEvent.detail.value),[o]),c=a.label,h=a.hint,p=a.options,m=a.labelField,f=a.valueField,w=a.direction,S=a.disabled,T=a.readonly,C=a.validator?.required;return y.jsx("div",{className:"gui-radiogroup gui-field",style:{flex:a.size},children:y.jsx("gui-radiogroup",{uid:i,label:c,errors:n,touched:r,required:C,disabled:S,readOnly:T,value:s,hint:h,options:p,labelField:m,valueField:f,direction:w,onChange:d,onBlur:l})})}const nc=Object.freeze(Object.defineProperty({__proto__:null,RadioGroup:ic},Symbol.toStringTag,{value:"Module"}));function Ct(e,t,i){if(!e)throw new TypeError("The element provided to the IntersectionObserver must exist");const n=new IntersectionObserver(s=>{s.forEach(r=>{t(r.isIntersecting)})},i);return n.observe(e),n}var sc=Object.defineProperty,ac=Object.getOwnPropertyDescriptor,nt=(e,t,i,n)=>{for(var s=n>1?void 0:n?ac(t,i):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(s=(n?a(t,i,s):a(s))||s);return n&&s&&sc(t,i,s),s};let Je=class extends V{constructor(){super(...arguments),this.value=[],this.focusDate=void 0,this.hidePills=!1,this.removePillAriaLabel=void 0,this._anchorDate=null,this._nextDate=null,this._isSelecting=!1,this._isStartVisible=!0,this._isEndVisible=!0,this._skipValueNavigation=!1}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("gui-field")}willUpdate(e){if(e.has("value")&&!e.has("focusDate")){if(this._skipValueNavigation)this._skipValueNavigation=!1;else if(this.value){const t=Array.isArray(this.value)?this.value:[{start:this.value}];if(t.length>0&&t[0].start){const i=new Date(t[0].start);!isNaN(i.getTime())&&!gt(i,this._currentDate,this.numberOfMonths??1)&&(this._currentDate=i)}}}if(e.has("focusDate")&&this.focusDate){const t=new Date(this.focusDate);isNaN(t.getTime())||(gt(t,this._currentDate,this.numberOfMonths??1)||(this._currentDate=t),this.focusDate=void 0)}}renderDay(e){const t={"gui-calendar__day-button":!0,today:e.isToday,"other-month":!e.isCurrentMonth,"range-start":e.isRangeStart&&!e.isOneDayRange,"range-end":e.isRangeEnd&&!e.isOneDayRange,selected:e.isOneDayRange,"in-range":e.isInRange,"is-anchor":e.isAnchor,"is-selecting":e.isSelecting,disabled:e.isDisabled};return v`
|
|
710
710
|
<button
|
|
711
711
|
type="button"
|
|
712
712
|
role="gridcell"
|
|
@@ -722,7 +722,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
722
722
|
>
|
|
723
723
|
${e.dayLabel}
|
|
724
724
|
</button>
|
|
725
|
-
`}getDaysInMonth(e){const t=new Date(this._currentDate);t.setDate(1),t.setMonth(t.getMonth()+e);const i=this.generateDateGrid(e),n=t.getMonth();let s=i.map(r=>{const a=r.getMonth()===n,o=this.isDisabled(r),l=
|
|
725
|
+
`}getDaysInMonth(e){const t=new Date(this._currentDate);t.setDate(1),t.setMonth(t.getMonth()+e);const i=this.generateDateGrid(e),n=t.getMonth();let s=i.map(r=>{const a=r.getMonth()===n,o=this.isDisabled(r),l=ss(r),{isRangeStart:d,isRangeEnd:c,isInRange:h,isSelecting:p}=this.checkDateStatus(r),m=l||d,f=this._anchorDate?Vt(r,this._anchorDate):!1;return{date:r,dayLabel:rs(this.localeId,r),isCurrentMonth:a,isToday:l,isRangeStart:d,isRangeEnd:c,isInRange:h,isDisabled:o,isOneDayRange:d&&c,isAnchor:f,isFocusable:m,isSelecting:p&&a}});for(let r=0;r<2;r++)s.slice(-7).every(o=>!o.isCurrentMonth)&&(s=s.slice(0,-7));if(e===0&&!s.some(r=>r.isFocusable)){const r=this.numberOfMonths??1,a=gt(new Date,this._currentDate,r),o=this.value?.some(l=>gt(new Date(l.start),this._currentDate,r))??!1;if(!a&&!o){const l=s.find(d=>d.isCurrentMonth&&!d.isDisabled);l&&(l.isFocusable=!0)}}return s}checkDateStatus(e){let t=!1,i=!1,n=!1,s=!1;if(this._isSelecting&&this._nextDate&&this._anchorDate){const r=this._nextDate.date,a=new Date(this._anchorDate);r.getTime()>a.getTime()?s=e.getTime()>=a.getTime()&&e.getTime()<=r.getTime():s=e.getTime()>=r.getTime()&&e.getTime()<=a.getTime()}if(this.value&&Array.isArray(this.value))for(const r of this.value){const a=new Date(r.start);if(Vt(e,a)&&(t=!0,i=!r.end),r.end){const o=new Date(r.end);Vt(e,o)&&(i=!0);const l=e.getTime(),d=a.getTime(),c=o.getTime();l>d&&l<c&&(n=!0)}}return{isRangeStart:t,isRangeEnd:i,isInRange:n,isSelecting:s}}selectDate(e,t=null){if(!e.isCurrentMonth||this.disabled||this.readOnly)return;const i=e.date;if(!this._anchorDate){this._isSelecting=!0,this._anchorDate=i;return}let n=this._anchorDate,s=i;i<n&&(n=i,s=this._anchorDate);const r=this.calculateValidRanges(n,s),a=[...this.value||[],...r];this._skipValueNavigation=!0,this.value=os(a),this._isSelecting=!1,this._nextDate=null,this._anchorDate=null,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))}calculateValidRanges(e,t){const i=[],n=new Date(e),s=new Date(t);n.setHours(0,0,0,0),s.setHours(0,0,0,0);let r=null;for(;n<=s;){if(!this.isDisabled(n))r||(r=new Date(n));else if(r){const o=new Date(n);o.setDate(n.getDate()-1),i.push(Mi(r,o)),r=null}n.setDate(n.getDate()+1)}return r&&i.push(Mi(r,t)),i}onMouseOver(e){this._isSelecting&&(this._nextDate=e)}updated(){this.hidePills||this.setupObservers()}disconnectedCallback(){super.disconnectedCallback(),this.disconnectObservers()}renderAboveCalendar(){if(this.hidePills)return _;const e=this.getSortedPills();return e.length===0?_:v`
|
|
726
726
|
<div
|
|
727
727
|
class=${fe({"gui-range-calendar__pills-wrapper":!0,"gui-range-calendar--start-shadow":!this._isStartVisible,"gui-range-calendar--end-shadow":!this._isEndVisible})}
|
|
728
728
|
>
|
|
@@ -867,7 +867,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
867
867
|
?disabled=${this.disabled}
|
|
868
868
|
?readonly=${this.readOnly}
|
|
869
869
|
autocomplete="off"
|
|
870
|
-
.value=${
|
|
870
|
+
.value=${ms(r)}
|
|
871
871
|
@keydown=${this.handleKeyDown}
|
|
872
872
|
@keyup=${a=>this.handleKeyUp(a,e,t)}
|
|
873
873
|
@focus=${this.handleFocus}
|
|
@@ -876,4 +876,4 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
876
876
|
/>
|
|
877
877
|
<div class="gui-range-date-input__visual-underline"></div>
|
|
878
878
|
</div>
|
|
879
|
-
`}formatDateForDisplay(e){const t=new Date(e);return isNaN(t.getTime())?e:new Intl.DateTimeFormat(this.localeId??"en",{year:"numeric",month:"2-digit",day:"2-digit"}).format(t)}getSortedPills(){return!this.value||!Array.isArray(this.value)?[]:[...this.value].sort((e,t)=>new Date(e.start).getTime()-new Date(t.start).getTime())}togglePillsList(){this._showPillsList=!this._showPillsList,this._showPillsList?requestAnimationFrame(()=>{document.addEventListener("pointerdown",this.handleOutsideInteraction),document.addEventListener("focusin",this.handleOutsideInteraction),this.querySelector(".gui-range-date-input__pills-dropdown .gui-range-date-input__pill")?.focus()}):this.removeOutsideListeners()}removeOutsideListeners(){document.removeEventListener("pointerdown",this.handleOutsideInteraction),document.removeEventListener("focusin",this.handleOutsideInteraction)}removePill(e){if(this.disabled||this.readOnly)return;const t=this.getSortedPills();t.splice(e,1),this.value=[...t],this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0})),this._showPillsList&&t.length===0&&(this._showPillsList=!1,this.removeOutsideListeners()),requestAnimationFrame(()=>{const i=this._showPillsList?".gui-range-date-input__pills-dropdown .gui-range-date-input__pill":".gui-range-date-input__pills .gui-range-date-input__pill",n=this.querySelectorAll(i);if(n.length>0){const s=Math.min(e,n.length-1);n[s].focus()}else this.querySelector(".gui-range-date-input__field input")?.focus()})}handlePillFocus(e){e.target.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})}handlePillKeydown(e,t){if(e.key==="Delete"||e.key==="Backspace"){e.preventDefault(),e.stopPropagation(),this.removePill(t);return}if(e.key==="Enter"||e.key===" "){e.preventDefault();const r=this.getSortedPills();r[t]&&this.onPillClick(r[t]);return}const i=this._showPillsList,n=i?"ArrowUp":"ArrowLeft",s=i?"ArrowDown":"ArrowRight";if(e.key===n||e.key===s){e.preventDefault();const r=i?".gui-range-date-input__pills-dropdown .gui-range-date-input__pill":".gui-range-date-input__pills .gui-range-date-input__pill",a=this.querySelectorAll(r),o=e.key===n?t-1:t+1;o>=0&&o<a.length&&a[o].focus()}}onPillClick(e){this.dispatchEvent(new CustomEvent("pillClick",{detail:{range:e},bubbles:!0,composed:!0}))}handleKeyDown(e){["Backspace","Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Delete","Enter"].includes(e.key)||e.ctrlKey||e.metaKey||this.readOnly||/^[0-9]$/.test(e.key)||e.preventDefault()}handleFocus(e){this.dispatchEvent(new CustomEvent("focus",{detail:e}))}handleKeyUp(e,t,i){if(this.readOnly)return;const n=window.getComputedStyle(this).direction==="rtl",s=e.target,r=this.getGroupInputs(t),a=r.indexOf(s);if(s.value.length===s.maxLength&&/^[0-9]$/.test(e.key))if(a===r.length-1){if(t==="start"){const o=this.getGroupInputs("end");o.length>0&&o[0].focus()}}else r[a+1].focus();switch(e.key){case"Enter":{if(this.tryCreatePill(),this.value&&this.value.length>0){const o=this.value[this.value.length-1];this.onPillClick(o)}break}case"ArrowUp":{const o=isNaN(parseInt(s.value,10)+1)?1:parseInt(s.value,10)+1;this.setDatePartValue(t,i,o),s.select(),this.tryCreatePill();break}case"ArrowDown":{const o=isNaN(parseInt(s.value,10)-1)?1:parseInt(s.value,10)-1;this.setDatePartValue(t,i,o),s.select(),this.tryCreatePill();break}case"ArrowLeft":{const o=n?a+1:a-1;if(o>=0&&o<r.length)r[o].focus(),r[o].select();else{const l=n?"end":"start";if(t!==l){const d=this.getGroupInputs(l);if(d.length>0){const c=d[d.length-1];c.focus(),c.select()}}}break}case"ArrowRight":{const o=n?a-1:a+1;if(o>=0&&o<r.length)r[o].focus(),r[o].select();else{const l=n?"start":"end";if(t!==l){const d=this.getGroupInputs(l);d.length>0&&(d[0].focus(),d[0].select())}}break}}}handleChange(e,t,i){if(e.stopImmediatePropagation(),this.readOnly)return;const s=e.target.value.replace(/[^0-9]/g,"");this.updateDatePart(t,i,s),this.tryCreatePill()}handleBlur(e,t,i){const n=e.target,s=parseInt(n.value,10);if(!isNaN(s)&&s>0){const r=i==="year"?4:2;n.value=s.toString().padStart(r,"0")}this.dispatchEvent(new CustomEvent("blur"))}getGroupInputs(e){return Array.from(this.querySelectorAll(`input[data-group="${e}"]`))}setDatePartValue(e,t,i){const n=e==="start"?this._startDate:this._endDate,s=t==="year"?4:2;t==="day"&&(n.day=i.toString().padStart(s,"0")),t==="month"&&(n.month=i.toString().padStart(s,"0")),t==="year"&&(n.year=i.toString().padStart(s,"0")),e==="start"?this._startDate={...n}:this._endDate={...n}}updateDatePart(e,t,i){e==="start"?this._startDate={...this._startDate,[t]:i}:this._endDate={...this._endDate,[t]:i}}validateDateParts(e){let t=parseInt(e.year,10),i=parseInt(e.month,10),n=parseInt(e.day,10);if(isNaN(t)||isNaN(i)||isNaN(n)||String(t).length<4)return null;t=Math.max(this.MIN_YEAR,Math.min(this.MAX_YEAR,t)),i=Math.max(this.MIN_MONTH,Math.min(this.MAX_MONTH,i)),n=Math.max(this.MIN_DAY,Math.min(this.MAX_DAY,n));const s=this.MAX_VALID_DAY(i,t);return n>s?(this.dispatchEvent(new CustomEvent("inputError",{detail:{message:"Invalid date: day is greater than the maximum valid day for the month and year."},bubbles:!0})),null):new Date(t,i-1,n)}setupObservers(){const e=this.querySelector(".gui-sentinel__start"),t=this.querySelector(".gui-sentinel__end");e&&!this.startObserver&&(this.startObserver=Ct(e,i=>this._isStartVisible=i)),t&&!this.endObserver&&(this.endObserver=Ct(t,i=>this._isEndVisible=i)),!e&&this.startObserver&&(this.startObserver.disconnect(),this.startObserver=void 0,this._isStartVisible=!0),!t&&this.endObserver&&(this.endObserver.disconnect(),this.endObserver=void 0,this._isEndVisible=!0)}disconnectObservers(){this.startObserver?.disconnect(),this.endObserver?.disconnect(),this.startObserver=void 0,this.endObserver=void 0}tryCreatePill(){const e=this.validateDateParts(this._startDate),t=this.validateDateParts(this._endDate);if(!e||!t)return;let i=e,n=t;t.getTime()<e.getTime()&&(i=t,n=e);const s=rt(i),r=rt(n),a=s===r?{start:s}:{start:s,end:r},o=this.value?[...this.value]:[];o.push(a),this.value=ls(o),this._startDate={day:"",month:"",year:""},this._endDate={day:"",month:"",year:""},this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0})),requestAnimationFrame(()=>{const l=this.getGroupInputs("start");l.length>0&&l[0].focus()}),this.requestUpdate()}};ne([u({type:String})],U.prototype,"uid",2),ne([u({type:String})],U.prototype,"label",2),ne([u({type:String,attribute:"locale-id"})],U.prototype,"localeId",2),ne([u({type:Array})],U.prototype,"errors",2),ne([u({type:Boolean})],U.prototype,"showErrors",2),ne([u({type:Boolean})],U.prototype,"touched",2),ne([u({type:Boolean})],U.prototype,"required",2),ne([u({type:Boolean})],U.prototype,"disabled",2),ne([u({type:Boolean,attribute:"readonly"})],U.prototype,"readOnly",2),ne([u({type:Array})],U.prototype,"value",2),ne([u({type:String})],U.prototype,"hint",2),ne([u({type:String})],U.prototype,"icon",2),ne([u({type:String})],U.prototype,"removePillAriaLabel",2),ne([u({type:String})],U.prototype,"startDateAriaLabel",2),ne([u({type:String})],U.prototype,"endDateAriaLabel",2),ne([u({type:String})],U.prototype,"separator",2),ne([Y()],U.prototype,"_startDate",2),ne([Y()],U.prototype,"_endDate",2),ne([Y()],U.prototype,"_isStartVisible",2),ne([Y()],U.prototype,"_isEndVisible",2),ne([Y()],U.prototype,"_showPillsList",2),U=ne([ue("gui-range-date")],U),typeof customElements<"u"&&!customElements.get("gui-range-date")&&customElements.define("gui-range-date",U);function uc(e){const t=e.widget,{uid:i,errors:n,value:s,isTouched:r,templateData:a,onBlur:o,onValueChanged:l,injectValidationIssues:d}=x.useInputWidget(t),c=g.useCallback(k=>{const P=k,O=H=>{d(null),l(H.detail.value)},E=()=>{o()},B=H=>{d([H.detail.message])};return k&&(P.addEventListener("blur",E),P.addEventListener("change",O),P.addEventListener("inputError",B)),()=>{P.removeEventListener("blur",E),P.removeEventListener("change",O),P.removeEventListener("inputError",B)}},[l,o,d]),h=a.label,p=a.hint,m=a.icon,f=a.lang,w=a.separator,S=a.removePillAriaLabel,T=a.startDateAriaLabel,C=a.endDateAriaLabel,I=a.disabled,A=a.readonly,D=a.validator?.required;return y.jsx("div",{className:"gui-range-date-input gui-field",style:{flex:a.size},children:y.jsx("gui-range-date",{ref:c,uid:i,label:h,hint:p,errors:n,touched:r,required:D,disabled:I,readOnly:A,value:s,icon:m,localeId:f,separator:w,removePillAriaLabel:S,startDateAriaLabel:T,endDateAriaLabel:C})})}const cc=Object.freeze(Object.defineProperty({__proto__:null,RangeDateInput:uc},Symbol.toStringTag,{value:"Module"}));function hc(e){const t=e.widget,{uid:i,errors:n,value:s,isTouched:r,templateData:a,onValueChanged:o,onBlur:l,injectValidationIssues:d}=x.useInputWidget(t),[c,h]=g.useState(!1),[p,m]=g.useState(void 0),f=g.useRef(null),w=g.useRef(null),S=g.useRef(null),T=g.useCallback(ae=>{const $=ae,N=le=>{d(null),o(le.detail.value)},z=le=>{d([le.detail.message])},q=()=>{h(!0)},Xe=le=>{m(le.detail.range.start),h(!0)};return w.current=ae,ae&&($.addEventListener("change",N),$.addEventListener("focus",q),$.addEventListener("blur",l),$.addEventListener("inputError",z),$.addEventListener("pillClick",Xe)),()=>{$.removeEventListener("change",N),$.removeEventListener("focus",q),$.removeEventListener("blur",l),$.removeEventListener("inputError",z),$.removeEventListener("pillClick",Xe)}},[o,l,d]),C=g.useCallback(ae=>{const $=ae,N=q=>{d(null),o(q.detail.value)},z=q=>{l(),h(!1)};return S.current=ae,ae&&($.addEventListener("blur",z),$.addEventListener("change",N)),()=>{$.addEventListener("blur",z),$.addEventListener("change",N)}},[o,d,l]);g.useEffect(()=>{const ae=$=>{if(!c)return;const N=$.composedPath(),z=w.current&&N.includes(w.current),q=S.current&&N.includes(S.current);!z&&!q&&h(!1)};return document.addEventListener("click",ae),()=>{document.removeEventListener("click",ae)}},[c]);const I=ae=>{if(!c)return;const $=ae.relatedTarget;$&&f.current?.contains($)||h(!1)},A=ae=>{const $=ae.target,N=$.closest(".gui-range-date-input__part"),z=$.closest("gui-range-calendar"),q=$.closest(".gui-range-date-input__pill"),Xe=$.closest(".gui-range-date-input__pill--count");N||z||q?c||h(!0):Xe?c&&h(!1):h(le=>!le)},D=a.hint,k=a.icon,P=a.separator,O=a.removePillAriaLabel,E=a.startDateAriaLabel,B=a.endDateAriaLabel,H=a.prevMonthIcon,K=a.nextMonthIcon,W=a.prevMonthAriaLabel,G=a.nextMonthAriaLabel,J=a.dayFormat,Ze=a.weekdayFormat,Tt=a.monthFormat,Pt=a.minDate,lt=a.maxDate,Dt=a.disabledRanges,X=a.numberOfMonths,j=r&&n&&n.length>0,Oe=a.disabled,Te=a.readonly,De=a.validator?.required,dt=a.lang;return y.jsxs("div",{ref:f,className:"gui-range-date-picker gui-field",style:{flex:a.size},onBlur:I,children:[a.label&&y.jsxs("label",{className:"gui-label",htmlFor:i,"data-cy":`${i}_label`,children:[a.label+(De?" *":""),D&&y.jsx("div",{className:"gui-widget-hint",id:`${i}_hint`,children:D})]}),y.jsxs("div",{role:"button",tabIndex:-1,className:"gui-widget",onClick:A,onKeyUp:ae=>{ae.target===ae.currentTarget&&(ae.key==="Enter"||ae.key===" ")&&h($=>!$)},"aria-expanded":c,children:[y.jsx("gui-range-date",{ref:T,uid:i,hint:D,showErrors:!1,errors:n,touched:r,required:De,disabled:Oe,readOnly:Te,value:s,icon:k,localeId:dt,separator:P,removePillAriaLabel:O,startDateAriaLabel:E,endDateAriaLabel:B}),y.jsx("span",{className:"gui-range-date-picker__arrow",children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 256 256",children:y.jsx("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"})})}),c&&y.jsx("gui-range-calendar",{ref:C,uid:i,hint:D,touched:r,required:De,disabled:Oe,readOnly:Te,value:s,focusDate:p,prevMonthIcon:H,nextMonthIcon:K,prevMonthAriaLabel:W,nextMonthAriaLabel:G,dayFormat:J,weekdayFormat:Ze,monthFormat:Tt,minDate:Pt,maxDate:lt,disabledRanges:Dt,numberOfMonths:X,localeId:dt,hidePills:!0})]}),j&&y.jsx(fs,{errors:n,uid:i})]})}const pc=Object.freeze(Object.defineProperty({__proto__:null,RangeDatePicker:hc},Symbol.toStringTag,{value:"Module"}));let mc=0;const yc=()=>mc++;function fc(e){const t=e.widget,{uid:i,value:n,onValueChanged:s,templateData:r,errors:a,isTouched:o,onBlur:l}=x.useInputWidget(t),d=g.useRef(null),c=g.useCallback(A=>{const D=[...A??[],{}];s(D)},[s]),h=g.useCallback((A,D)=>{const k=(A??[]).filter((P,O)=>D!==O);"structuredClone"in window?s(structuredClone(k)):s(JSON.parse(JSON.stringify(k)))},[s]),[p,m]=g.useState(!1),f=g.useCallback(A=>{A.stopPropagation(),m(!0)},[]),w=g.useCallback(A=>{A.stopPropagation(),l(),m(!1)},[]),S=x.useRepeaterIndexes(),T=g.useCallback(()=>n?.map((A,D)=>{const k=ka(A,yc);return y.jsx(x.RepeaterIndexesContext.Provider,{value:[...S,D],children:y.jsxs("div",{className:"gui-repeater__card",children:[y.jsxs("div",{className:"gui-repeater__card-header",children:[r.title&&y.jsx("span",{className:"gui-repeater__card-title",children:`${r.title} ${D+1}`}),y.jsxs("button",{type:"button",tabIndex:0,className:"gui-button gui-button--sm gui-repeater__remove-btn",onClick:()=>h(n,D),children:[r.removeButtonIcon&&y.jsx("span",{className:`gui-widget-icon gui-button-icon ${r.removeButtonIcon}`,"data-icon":r.removeButtonIcon}),r.removeLabel??"Remove"]})]}),y.jsx(x.WidgetRenderer,{widget:r.template},`${i}-${k}`)]})},`${i}-${k}`)}),[r,n,i,h,S]),C=r.validator?.required,I=o&&a&&a.length>0;return y.jsxs("div",{className:"gui-repeater gui-field",style:{flex:r.size},children:[y.jsxs("div",{ref:d,id:i,className:`gui-repeater__main-card gui-repeater__card${p?" gui-repeater__card--focused":""}`,onFocus:f,onBlur:w,children:[y.jsx("gui-label",{targetElement:d.current||void 0,uid:i,label:r.label,errors:a,touched:o,required:C,native:!1}),T(),y.jsxs("button",{type:"button",tabIndex:0,className:"gui-button gui-repeater__add-btn",onClick:()=>c(n||[]),disabled:r.limit?r.limit===(n?.length??0):!1,children:[r.addButtonIcon&&y.jsx("span",{className:`gui-widget-icon gui-button-icon ${r.addButtonIcon}`,"data-icon":r.addButtonIcon}),r.addLabel??"Add"]})]}),I&&y.jsx("gui-errors",{uid:i,errors:a,touched:o})]})}const gc=Object.freeze(Object.defineProperty({__proto__:null,Repeater:fc},Symbol.toStringTag,{value:"Module"}));function bc(e){const t=e.widget,{uid:i,children:n,templateData:s}=x.useLayoutWidget(t),r=g.useCallback(()=>n?n.map(d=>y.jsx(x.WidgetRenderer,{widget:d},d.uid)):null,[n]),a=`gui-flex__widget--${s.direction??"column"}`,o=`gui-flex__widget--justify-${s.justify??"stretch"}`,l=`gui-flex__widget--align-${s.align??"start"}`;return y.jsx("div",{className:"gui-flex gui-field",style:{flex:s.size},children:y.jsx("div",{className:`gui-flex__widget ${a} ${o} ${l}`,style:s.gap?{gap:`${s.gap}px`}:{},id:i,children:r()})})}const Dc=Object.freeze(Object.defineProperty({__proto__:null,Flex:bc},Symbol.toStringTag,{value:"Module"}));function vc(e){const t=e.widget,{uid:i,children:n,templateData:s}=x.useLayoutWidget(t),r=s.direction!=="column",a=g.useCallback(()=>n.map(h=>{const p=h;return y.jsx("div",{className:"gui-grid__cell",style:{gridColumn:`span ${p.size||1}`},children:y.jsx(x.WidgetRenderer,{widget:p})},p.uid)}),[n]),o=r?"gui-grid__widget--row":"gui-grid__widget--column",l=`gui-grid__widget--align-${s.align??"stretch"}`,d=s.justify?`gui-grid__widget--justify-${s.justify}`:"",c={};return s.columnGap!==void 0&&(c.columnGap=`${s.columnGap}px`),s.rowGap!==void 0&&(c.rowGap=`${s.rowGap}px`),y.jsx("div",{className:"gui-grid gui-field",style:{flex:s.size},children:y.jsx("div",{className:`gui-grid__widget ${o} ${r&&(s.autoFit??!0)?"gui-grid__widget--row--auto-fit":""} ${l} ${d}`,style:c,id:i,children:a()})})}const wc=Object.freeze(Object.defineProperty({__proto__:null,Grid:vc},Symbol.toStringTag,{value:"Module"}));function _c(e){const t=g.useRef(null),i=e.widget,{uid:n,children:s,templateData:r,onChange:a}=x.useLayoutWidget(i),o=g.useRef([]),l=g.useRef(null),d=g.useRef(null),[c,h]=g.useState(!1),[p,m]=g.useState(!1),[f,w]=g.useState(r.defaultOpen);g.useEffect(()=>{const A=l.current,D=d.current,k=Ct(A,O=>h(O)),P=Ct(D,O=>m(O));return()=>{k.disconnect(),P.disconnect()}},[]),g.useEffect(()=>{f===void 0&&r.tabs?.length>0&&w(r.tabs[0].uid)},[r.tabs,f]),g.useEffect(()=>{r.defaultOpen&&w(r.defaultOpen)},[r.defaultOpen]),g.useEffect(()=>{const D=(r.tabs||[]).findIndex(k=>k.uid===f);D>-1&&o.current[D].scrollIntoView({block:"nearest",inline:"nearest"})},[f,r.tabs]);const S=g.useCallback(A=>{w(A),a(A)},[a]),T=g.useCallback(A=>{const D=r.tabs.findIndex(O=>O.uid===f),k=o.current,P=t.current?window.getComputedStyle(t.current).direction==="rtl":!1;switch(A.key){case"ArrowLeft":{const O=D+(P?1:-1);O>=0&&O<r.tabs.length&&(S(r.tabs[O].uid),k[O]?.focus());break}case"ArrowRight":{const O=D+(P?-1:1);O>=0&&O<r.tabs.length&&(S(r.tabs[O].uid),k[O]?.focus());break}case"Home":S(r.tabs[0].uid),k[0]?.focus();break;case"End":S(r.tabs[r.tabs.length-1].uid),k[r.tabs.length-1]?.focus();break;default:return}},[f,r.tabs,S]),C=g.useCallback(()=>(r.tabs||[]).map((D,k)=>y.jsx("li",{role:"presentation",children:y.jsx("button",{ref:P=>{o.current[k]=P},type:"button",role:"tab",tabIndex:D.uid===f?0:-1,"data-cy":`tab_${i.uid}_${k}`,id:`tab_${i.uid}_${k}`,"aria-controls":`tabpanel_${i.uid}_${k}`,"aria-selected":D.uid===f?"true":"false",className:`${D.uid===f?"active":""}`,onClick:()=>S(D.uid),onKeyDown:P=>T(P),onFocus:P=>{P.target.scrollIntoView({block:"nearest",inline:"nearest"})},children:D.label})},`tab_${i.uid}_${D.uid}`)),[r,f,i,o,S,T]),I=g.useCallback(()=>{const A=s.findIndex(D=>D.uid===f);return s.filter(D=>D.uid===f||r.renderMode!=="activeOnly").map(D=>y.jsx("section",{role:"tabpanel","data-cy":`tabpanel_${i.uid}_${A}`,id:`tabpanel_${i.uid}_${A}`,hidden:D.uid!==f&&r.renderMode!=="activeOnly","aria-labelledby":`tab_${i.uid}_${A}`,children:y.jsx(x.WidgetRenderer,{widget:D},D.uid)},`tabpanel_${i.uid}_${D.uid}`))},[s,f,i]);return y.jsxs("div",{className:"gui-tabs gui-field",style:{flex:r.size},children:[y.jsx("nav",{className:x.cn({"gui-widget":!0,"gui-widget--horizontal":!0,"gui-tabs--start-shadow":!c,"gui-tabs--end-shadow":!p}),id:n,children:y.jsxs("ul",{role:"tablist",children:[y.jsx("li",{role:"presentation",ref:l,className:"gui-sentinel gui-sentinel__start"}),C(),y.jsx("li",{role:"presentation",ref:d,className:"gui-sentinel gui-sentinel__end"})]})}),I()]})}const kc=Object.freeze(Object.defineProperty({__proto__:null,Tabs:_c},Symbol.toStringTag,{value:"Module"})),ws={};function $c(e){const t=e.widget,{uid:i,children:n,templateData:s,onChange:r}=x.useLayoutWidget(t),[a,o]=g.useState(ws);g.useEffect(()=>{a===ws&&s.defaultOpen&&o(s.defaultOpen||{})},[a,s]);const l=g.useCallback(h=>{const p={...a};s.singleOpen&&Object.keys(p).filter(m=>m!==h).forEach(m=>{p[m]=m===h?!p[m]:!1}),p[h]=!p[h],o(p),r(p)},[a,s.singleOpen,r]),d=g.useCallback(h=>{const p=n.find(f=>f.uid===h),m=a[h];return(m||s.renderMode!=="activeOnly")&&p?y.jsx("section",{className:"gui-widget",role:"region",id:`accordion_section_${h}`,hidden:!m&&s.renderMode!=="activeOnly","aria-labelledby":`accordion_button_${h}`,children:y.jsx(x.WidgetRenderer,{widget:p})}):null},[n,a,s.renderMode]),c=g.useCallback(()=>(s.sections||[]).map((p,m)=>y.jsxs("div",{className:"gui-accordion__section",children:[y.jsxs("button",{type:"button",tabIndex:0,id:`accordion_button_${p.uid}`,"aria-controls":`accordion_section_${p.uid}`,"aria-expanded":a[p.uid]?"true":"false",className:a[p.uid]?"active":"",onClick:()=>l(p.uid),children:[p.label,y.jsx("span",{className:"gui-accordion__arrow",children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 256 256",children:y.jsx("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"})})})]}),d(p.uid)]},`${"accordion_section_"+p.uid}`)),[s.sections,a,d,l]);return y.jsx("div",{className:"gui-accordion gui-field",style:{flex:s.size},children:y.jsx("div",{className:"gui-widget",id:i,children:c()})})}const Sc=Object.freeze(Object.defineProperty({__proto__:null,Accordion:$c},Symbol.toStringTag,{value:"Module"}));function Ac(e){const t=e.widget,{uid:i,templateData:n}=x.useDisplayWdiget(t);return y.jsx("div",{className:"gui-alert gui-field",style:{flex:n.size},children:y.jsx("div",{className:"gui-widget",id:i,children:y.jsx("div",{role:"alert",className:`gui-alert-notification gui-alert-notification--${n.level||"default"}`,children:n.text})})})}const Oc=Object.freeze(Object.defineProperty({__proto__:null,Alert:Ac},Symbol.toStringTag,{value:"Module"}));function Ec(e){const t=e.widget,{uid:i,templateData:n}=x.useDisplayWdiget(t);return y.jsx("div",{className:"gui-markdown-text gui-field",style:{flex:n.size},children:y.jsx("div",{className:"gui-widget",id:i,children:y.jsx("gui-markdown-text",{md:n.md,dependencies:n.deps})})})}const Ic=Object.freeze(Object.defineProperty({__proto__:null,MarkdownText:Ec},Symbol.toStringTag,{value:"Module"}));function Cc(e){const t=e.widget,{uid:i,templateData:n}=x.useDisplayWdiget(t),s=n?.render;return y.jsx("div",{className:"gui-renderer gui-field",style:{flex:n.size},children:y.jsx("div",{className:"gui-widget",id:i,children:s})})}const Tc=Object.freeze(Object.defineProperty({__proto__:null,Renderer:Cc},Symbol.toStringTag,{value:"Module"}));Ue.GuiForm=Ql,Ue.widgetLoaders=Zi,Object.defineProperty(Ue,Symbol.toStringTag,{value:"Module"})}));
|
|
879
|
+
`}formatDateForDisplay(e){const t=new Date(e);return isNaN(t.getTime())?e:new Intl.DateTimeFormat(this.localeId??"en",{year:"numeric",month:"2-digit",day:"2-digit"}).format(t)}getSortedPills(){return!this.value||!Array.isArray(this.value)?[]:[...this.value].sort((e,t)=>new Date(e.start).getTime()-new Date(t.start).getTime())}togglePillsList(){this._showPillsList=!this._showPillsList,this._showPillsList?requestAnimationFrame(()=>{document.addEventListener("pointerdown",this.handleOutsideInteraction),document.addEventListener("focusin",this.handleOutsideInteraction),this.querySelector(".gui-range-date-input__pills-dropdown .gui-range-date-input__pill")?.focus()}):this.removeOutsideListeners()}removeOutsideListeners(){document.removeEventListener("pointerdown",this.handleOutsideInteraction),document.removeEventListener("focusin",this.handleOutsideInteraction)}removePill(e){if(this.disabled||this.readOnly)return;const t=this.getSortedPills();t.splice(e,1),this.value=[...t],this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0})),this._showPillsList&&t.length===0&&(this._showPillsList=!1,this.removeOutsideListeners()),requestAnimationFrame(()=>{const i=this._showPillsList?".gui-range-date-input__pills-dropdown .gui-range-date-input__pill":".gui-range-date-input__pills .gui-range-date-input__pill",n=this.querySelectorAll(i);if(n.length>0){const s=Math.min(e,n.length-1);n[s].focus()}else this.querySelector(".gui-range-date-input__field input")?.focus()})}handlePillFocus(e){e.target.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})}handlePillKeydown(e,t){if(e.key==="Delete"||e.key==="Backspace"){e.preventDefault(),e.stopPropagation(),this.removePill(t);return}if(e.key==="Enter"||e.key===" "){e.preventDefault();const r=this.getSortedPills();r[t]&&this.onPillClick(r[t]);return}const i=this._showPillsList,n=i?"ArrowUp":"ArrowLeft",s=i?"ArrowDown":"ArrowRight";if(e.key===n||e.key===s){e.preventDefault();const r=i?".gui-range-date-input__pills-dropdown .gui-range-date-input__pill":".gui-range-date-input__pills .gui-range-date-input__pill",a=this.querySelectorAll(r),o=e.key===n?t-1:t+1;o>=0&&o<a.length&&a[o].focus()}}onPillClick(e){this.dispatchEvent(new CustomEvent("pillClick",{detail:{range:e},bubbles:!0,composed:!0}))}handleKeyDown(e){["Backspace","Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Delete","Enter"].includes(e.key)||e.ctrlKey||e.metaKey||this.readOnly||/^[0-9]$/.test(e.key)||e.preventDefault()}handleFocus(e){this.dispatchEvent(new CustomEvent("focus",{detail:e}))}handleKeyUp(e,t,i){if(this.readOnly)return;const n=window.getComputedStyle(this).direction==="rtl",s=e.target,r=this.getGroupInputs(t),a=r.indexOf(s);if(s.value.length===s.maxLength&&/^[0-9]$/.test(e.key))if(a===r.length-1){if(t==="start"){const o=this.getGroupInputs("end");o.length>0&&o[0].focus()}}else r[a+1].focus();switch(e.key){case"Enter":{if(this.tryCreatePill(),this.value&&this.value.length>0){const o=this.value[this.value.length-1];this.onPillClick(o)}break}case"ArrowUp":{const o=isNaN(parseInt(s.value,10)+1)?1:parseInt(s.value,10)+1;this.setDatePartValue(t,i,o),s.select(),this.tryCreatePill();break}case"ArrowDown":{const o=isNaN(parseInt(s.value,10)-1)?1:parseInt(s.value,10)-1;this.setDatePartValue(t,i,o),s.select(),this.tryCreatePill();break}case"ArrowLeft":{const o=n?a+1:a-1;if(o>=0&&o<r.length)r[o].focus(),r[o].select();else{const l=n?"end":"start";if(t!==l){const d=this.getGroupInputs(l);if(d.length>0){const c=d[d.length-1];c.focus(),c.select()}}}break}case"ArrowRight":{const o=n?a-1:a+1;if(o>=0&&o<r.length)r[o].focus(),r[o].select();else{const l=n?"start":"end";if(t!==l){const d=this.getGroupInputs(l);d.length>0&&(d[0].focus(),d[0].select())}}break}}}handleChange(e,t,i){if(e.stopImmediatePropagation(),this.readOnly)return;const s=e.target.value.replace(/[^0-9]/g,"");this.updateDatePart(t,i,s),this.tryCreatePill()}handleBlur(e,t,i){const n=e.target,s=parseInt(n.value,10);if(!isNaN(s)&&s>0){const r=i==="year"?4:2;n.value=s.toString().padStart(r,"0")}this.dispatchEvent(new CustomEvent("blur"))}getGroupInputs(e){return Array.from(this.querySelectorAll(`input[data-group="${e}"]`))}setDatePartValue(e,t,i){const n=e==="start"?this._startDate:this._endDate,s=t==="year"?4:2;t==="day"&&(n.day=i.toString().padStart(s,"0")),t==="month"&&(n.month=i.toString().padStart(s,"0")),t==="year"&&(n.year=i.toString().padStart(s,"0")),e==="start"?this._startDate={...n}:this._endDate={...n}}updateDatePart(e,t,i){e==="start"?this._startDate={...this._startDate,[t]:i}:this._endDate={...this._endDate,[t]:i}}validateDateParts(e){let t=parseInt(e.year,10),i=parseInt(e.month,10),n=parseInt(e.day,10);if(isNaN(t)||isNaN(i)||isNaN(n)||String(t).length<4)return null;t=Math.max(this.MIN_YEAR,Math.min(this.MAX_YEAR,t)),i=Math.max(this.MIN_MONTH,Math.min(this.MAX_MONTH,i)),n=Math.max(this.MIN_DAY,Math.min(this.MAX_DAY,n));const s=this.MAX_VALID_DAY(i,t);return n>s?(this.dispatchEvent(new CustomEvent("inputError",{detail:{message:"Invalid date: day is greater than the maximum valid day for the month and year."},bubbles:!0})),null):new Date(t,i-1,n)}setupObservers(){const e=this.querySelector(".gui-sentinel__start"),t=this.querySelector(".gui-sentinel__end");e&&!this.startObserver&&(this.startObserver=Ct(e,i=>this._isStartVisible=i)),t&&!this.endObserver&&(this.endObserver=Ct(t,i=>this._isEndVisible=i)),!e&&this.startObserver&&(this.startObserver.disconnect(),this.startObserver=void 0,this._isStartVisible=!0),!t&&this.endObserver&&(this.endObserver.disconnect(),this.endObserver=void 0,this._isEndVisible=!0)}disconnectObservers(){this.startObserver?.disconnect(),this.endObserver?.disconnect(),this.startObserver=void 0,this.endObserver=void 0}tryCreatePill(){const e=this.validateDateParts(this._startDate),t=this.validateDateParts(this._endDate);if(!e||!t)return;let i=e,n=t;t.getTime()<e.getTime()&&(i=t,n=e);const s=rt(i),r=rt(n),a=s===r?{start:s}:{start:s,end:r},o=this.value?[...this.value]:[];o.push(a),this.value=os(o),this._startDate={day:"",month:"",year:""},this._endDate={day:"",month:"",year:""},this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0})),requestAnimationFrame(()=>{const l=this.getGroupInputs("start");l.length>0&&l[0].focus()}),this.requestUpdate()}};ne([u({type:String})],U.prototype,"uid",2),ne([u({type:String})],U.prototype,"label",2),ne([u({type:String,attribute:"locale-id"})],U.prototype,"localeId",2),ne([u({type:Array})],U.prototype,"errors",2),ne([u({type:Boolean})],U.prototype,"showErrors",2),ne([u({type:Boolean})],U.prototype,"touched",2),ne([u({type:Boolean})],U.prototype,"required",2),ne([u({type:Boolean})],U.prototype,"disabled",2),ne([u({type:Boolean,attribute:"readonly"})],U.prototype,"readOnly",2),ne([u({type:Array})],U.prototype,"value",2),ne([u({type:String})],U.prototype,"hint",2),ne([u({type:String})],U.prototype,"icon",2),ne([u({type:String})],U.prototype,"removePillAriaLabel",2),ne([u({type:String})],U.prototype,"startDateAriaLabel",2),ne([u({type:String})],U.prototype,"endDateAriaLabel",2),ne([u({type:String})],U.prototype,"separator",2),ne([Y()],U.prototype,"_startDate",2),ne([Y()],U.prototype,"_endDate",2),ne([Y()],U.prototype,"_isStartVisible",2),ne([Y()],U.prototype,"_isEndVisible",2),ne([Y()],U.prototype,"_showPillsList",2),U=ne([ue("gui-range-date")],U),typeof customElements<"u"&&!customElements.get("gui-range-date")&&customElements.define("gui-range-date",U);function uc(e){const t=e.widget,{uid:i,errors:n,value:s,isTouched:r,templateData:a,onBlur:o,onValueChanged:l,injectValidationIssues:d}=x.useInputWidget(t),c=g.useCallback(k=>{const P=k,O=H=>{d(null),l(H.detail.value)},E=()=>{o()},B=H=>{d([H.detail.message])};return k&&(P.addEventListener("blur",E),P.addEventListener("change",O),P.addEventListener("inputError",B)),()=>{P.removeEventListener("blur",E),P.removeEventListener("change",O),P.removeEventListener("inputError",B)}},[l,o,d]),h=a.label,p=a.hint,m=a.icon,f=a.lang,w=a.separator,S=a.removePillAriaLabel,T=a.startDateAriaLabel,C=a.endDateAriaLabel,I=a.disabled,A=a.readonly,D=a.validator?.required;return y.jsx("div",{className:"gui-range-date-input gui-field",style:{flex:a.size},children:y.jsx("gui-range-date",{ref:c,uid:i,label:h,hint:p,errors:n,touched:r,required:D,disabled:I,readOnly:A,value:s,icon:m,localeId:f,separator:w,removePillAriaLabel:S,startDateAriaLabel:T,endDateAriaLabel:C})})}const cc=Object.freeze(Object.defineProperty({__proto__:null,RangeDateInput:uc},Symbol.toStringTag,{value:"Module"}));function hc(e){const t=e.widget,{uid:i,errors:n,value:s,isTouched:r,templateData:a,onValueChanged:o,onBlur:l,injectValidationIssues:d}=x.useInputWidget(t),[c,h]=g.useState(!1),[p,m]=g.useState(void 0),f=g.useRef(null),w=g.useRef(null),S=g.useRef(null),T=g.useCallback(ae=>{const $=ae,N=le=>{d(null),o(le.detail.value)},z=le=>{d([le.detail.message])},q=()=>{h(!0)},Xe=le=>{m(le.detail.range.start),h(!0)};return w.current=ae,ae&&($.addEventListener("change",N),$.addEventListener("focus",q),$.addEventListener("blur",l),$.addEventListener("inputError",z),$.addEventListener("pillClick",Xe)),()=>{$.removeEventListener("change",N),$.removeEventListener("focus",q),$.removeEventListener("blur",l),$.removeEventListener("inputError",z),$.removeEventListener("pillClick",Xe)}},[o,l,d]),C=g.useCallback(ae=>{const $=ae,N=q=>{d(null),o(q.detail.value)},z=q=>{l(),h(!1)};return S.current=ae,ae&&($.addEventListener("blur",z),$.addEventListener("change",N)),()=>{$.addEventListener("blur",z),$.addEventListener("change",N)}},[o,d,l]);g.useEffect(()=>{const ae=$=>{if(!c)return;const N=$.composedPath(),z=w.current&&N.includes(w.current),q=S.current&&N.includes(S.current);!z&&!q&&h(!1)};return document.addEventListener("click",ae),()=>{document.removeEventListener("click",ae)}},[c]);const I=ae=>{if(!c)return;const $=ae.relatedTarget;$&&f.current?.contains($)||h(!1)},A=ae=>{const $=ae.target,N=$.closest(".gui-range-date-input__part"),z=$.closest("gui-range-calendar"),q=$.closest(".gui-range-date-input__pill"),Xe=$.closest(".gui-range-date-input__pill--count");N||z||q?c||h(!0):Xe?c&&h(!1):h(le=>!le)},D=a.hint,k=a.icon,P=a.separator,O=a.removePillAriaLabel,E=a.startDateAriaLabel,B=a.endDateAriaLabel,H=a.prevMonthIcon,K=a.nextMonthIcon,W=a.prevMonthAriaLabel,G=a.nextMonthAriaLabel,J=a.dayFormat,Ze=a.weekdayFormat,Tt=a.monthFormat,Pt=a.minDate,lt=a.maxDate,Dt=a.disabledRanges,X=a.numberOfMonths,j=r&&n&&n.length>0,Oe=a.disabled,Te=a.readonly,De=a.validator?.required,dt=a.lang;return y.jsxs("div",{ref:f,className:"gui-range-date-picker gui-field",style:{flex:a.size},onBlur:I,children:[a.label&&y.jsxs("label",{className:"gui-label",htmlFor:i,"data-cy":`${i}_label`,children:[a.label+(De?" *":""),D&&y.jsx("div",{className:"gui-widget-hint",id:`${i}_hint`,children:D})]}),y.jsxs("div",{role:"button",tabIndex:-1,className:"gui-widget",onClick:A,onKeyUp:ae=>{ae.target===ae.currentTarget&&(ae.key==="Enter"||ae.key===" ")&&h($=>!$)},"aria-expanded":c,children:[y.jsx("gui-range-date",{ref:T,uid:i,hint:D,showErrors:!1,errors:n,touched:r,required:De,disabled:Oe,readOnly:Te,value:s,icon:k,localeId:dt,separator:P,removePillAriaLabel:O,startDateAriaLabel:E,endDateAriaLabel:B}),y.jsx("span",{className:"gui-range-date-picker__arrow",children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 256 256",children:y.jsx("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"})})}),c&&y.jsx("gui-range-calendar",{ref:C,uid:i,hint:D,touched:r,required:De,disabled:Oe,readOnly:Te,value:s,focusDate:p,prevMonthIcon:H,nextMonthIcon:K,prevMonthAriaLabel:W,nextMonthAriaLabel:G,dayFormat:J,weekdayFormat:Ze,monthFormat:Tt,minDate:Pt,maxDate:lt,disabledRanges:Dt,numberOfMonths:X,localeId:dt,hidePills:!0})]}),j&&y.jsx(ys,{errors:n,uid:i})]})}const pc=Object.freeze(Object.defineProperty({__proto__:null,RangeDatePicker:hc},Symbol.toStringTag,{value:"Module"}));let mc=0;const yc=()=>mc++;function fc(e){const t=e.widget,{uid:i,value:n,onValueChanged:s,templateData:r,errors:a,isTouched:o,onBlur:l}=x.useInputWidget(t),d=g.useRef(null),c=g.useCallback(A=>{const D=[...A??[],{}];s(D)},[s]),h=g.useCallback((A,D)=>{const k=(A??[]).filter((P,O)=>D!==O);"structuredClone"in window?s(structuredClone(k)):s(JSON.parse(JSON.stringify(k)))},[s]),[p,m]=g.useState(!1),f=g.useCallback(A=>{A.stopPropagation(),m(!0)},[]),w=g.useCallback(A=>{A.stopPropagation(),l(),m(!1)},[]),S=x.useRepeaterIndexes(),T=g.useCallback(()=>n?.map((A,D)=>{const k=ka(A,yc);return y.jsx(x.RepeaterIndexesContext.Provider,{value:[...S,D],children:y.jsxs("div",{className:"gui-repeater__card",children:[y.jsxs("div",{className:"gui-repeater__card-header",children:[r.title&&y.jsx("span",{className:"gui-repeater__card-title",children:`${r.title} ${D+1}`}),y.jsxs("button",{type:"button",tabIndex:0,className:"gui-button gui-button--sm gui-repeater__remove-btn",onClick:()=>h(n,D),children:[r.removeButtonIcon&&y.jsx("span",{className:`gui-widget-icon gui-button-icon ${r.removeButtonIcon}`,"data-icon":r.removeButtonIcon}),r.removeLabel??"Remove"]})]}),y.jsx(x.WidgetRenderer,{widget:r.template},`${i}-${k}`)]})},`${i}-${k}`)}),[r,n,i,h,S]),C=r.validator?.required,I=o&&a&&a.length>0;return y.jsxs("div",{className:"gui-repeater gui-field",style:{flex:r.size},children:[y.jsxs("div",{ref:d,id:i,className:`gui-repeater__main-card gui-repeater__card${p?" gui-repeater__card--focused":""}`,onFocus:f,onBlur:w,children:[y.jsx("gui-label",{targetElement:d.current||void 0,uid:i,label:r.label,errors:a,touched:o,required:C,native:!1}),T(),y.jsxs("button",{type:"button",tabIndex:0,className:"gui-button gui-repeater__add-btn",onClick:()=>c(n||[]),disabled:r.limit?r.limit===(n?.length??0):!1,children:[r.addButtonIcon&&y.jsx("span",{className:`gui-widget-icon gui-button-icon ${r.addButtonIcon}`,"data-icon":r.addButtonIcon}),r.addLabel??"Add"]})]}),I&&y.jsx("gui-errors",{uid:i,errors:a,touched:o})]})}const gc=Object.freeze(Object.defineProperty({__proto__:null,Repeater:fc},Symbol.toStringTag,{value:"Module"}));function bc(e){const t=e.widget,{uid:i,children:n,templateData:s}=x.useLayoutWidget(t),r=g.useCallback(()=>n?n.map(d=>y.jsx(x.WidgetRenderer,{widget:d},d.uid)):null,[n]),a=`gui-flex__widget--${s.direction??"column"}`,o=`gui-flex__widget--justify-${s.justify??"stretch"}`,l=`gui-flex__widget--align-${s.align??"start"}`;return y.jsx("div",{className:"gui-flex gui-field",style:{flex:s.size},children:y.jsx("div",{className:`gui-flex__widget ${a} ${o} ${l}`,style:s.gap?{gap:`${s.gap}px`}:{},id:i,children:r()})})}const Dc=Object.freeze(Object.defineProperty({__proto__:null,Flex:bc},Symbol.toStringTag,{value:"Module"}));function vc(e){const t=e.widget,{uid:i,children:n,templateData:s}=x.useLayoutWidget(t),r=s.direction!=="column",a=g.useCallback(()=>n.map(h=>{const p=h;return y.jsx("div",{className:"gui-grid__cell",style:{gridColumn:`span ${p.size||1}`},children:y.jsx(x.WidgetRenderer,{widget:p})},p.uid)}),[n]),o=r?"gui-grid__widget--row":"gui-grid__widget--column",l=`gui-grid__widget--align-${s.align??"stretch"}`,d=s.justify?`gui-grid__widget--justify-${s.justify}`:"",c={};return s.columnGap!==void 0&&(c.columnGap=`${s.columnGap}px`),s.rowGap!==void 0&&(c.rowGap=`${s.rowGap}px`),y.jsx("div",{className:"gui-grid gui-field",style:{flex:s.size},children:y.jsx("div",{className:`gui-grid__widget ${o} ${r&&(s.autoFit??!0)?"gui-grid__widget--row--auto-fit":""} ${l} ${d}`,style:c,id:i,children:a()})})}const wc=Object.freeze(Object.defineProperty({__proto__:null,Grid:vc},Symbol.toStringTag,{value:"Module"}));function _c(e){const t=g.useRef(null),i=e.widget,{uid:n,children:s,templateData:r,onChange:a}=x.useLayoutWidget(i),o=g.useRef([]),l=g.useRef(null),d=g.useRef(null),[c,h]=g.useState(!1),[p,m]=g.useState(!1),[f,w]=g.useState(r.defaultOpen);g.useEffect(()=>{const A=l.current,D=d.current,k=Ct(A,O=>h(O)),P=Ct(D,O=>m(O));return()=>{k.disconnect(),P.disconnect()}},[]),g.useEffect(()=>{f===void 0&&r.tabs?.length>0&&w(r.tabs[0].uid)},[r.tabs,f]),g.useEffect(()=>{r.defaultOpen&&w(r.defaultOpen)},[r.defaultOpen]),g.useEffect(()=>{const D=(r.tabs||[]).findIndex(k=>k.uid===f);D>-1&&o.current[D].scrollIntoView({block:"nearest",inline:"nearest"})},[f,r.tabs]);const S=g.useCallback(A=>{w(A),a(A)},[a]),T=g.useCallback(A=>{const D=r.tabs.findIndex(O=>O.uid===f),k=o.current,P=t.current?window.getComputedStyle(t.current).direction==="rtl":!1;switch(A.key){case"ArrowLeft":{const O=D+(P?1:-1);O>=0&&O<r.tabs.length&&(S(r.tabs[O].uid),k[O]?.focus());break}case"ArrowRight":{const O=D+(P?-1:1);O>=0&&O<r.tabs.length&&(S(r.tabs[O].uid),k[O]?.focus());break}case"Home":S(r.tabs[0].uid),k[0]?.focus();break;case"End":S(r.tabs[r.tabs.length-1].uid),k[r.tabs.length-1]?.focus();break;default:return}},[f,r.tabs,S]),C=g.useCallback(()=>(r.tabs||[]).map((D,k)=>y.jsx("li",{role:"presentation",children:y.jsx("button",{ref:P=>{o.current[k]=P},type:"button",role:"tab",tabIndex:D.uid===f?0:-1,"data-cy":`tab_${i.uid}_${k}`,id:`tab_${i.uid}_${k}`,"aria-controls":`tabpanel_${i.uid}_${k}`,"aria-selected":D.uid===f?"true":"false",className:`${D.uid===f?"active":""}`,onClick:()=>S(D.uid),onKeyDown:P=>T(P),onFocus:P=>{P.target.scrollIntoView({block:"nearest",inline:"nearest"})},children:D.label})},`tab_${i.uid}_${D.uid}`)),[r,f,i,o,S,T]),I=g.useCallback(()=>{const A=s.findIndex(D=>D.uid===f);return s.filter(D=>D.uid===f||r.renderMode!=="activeOnly").map(D=>y.jsx("section",{role:"tabpanel","data-cy":`tabpanel_${i.uid}_${A}`,id:`tabpanel_${i.uid}_${A}`,hidden:D.uid!==f&&r.renderMode!=="activeOnly","aria-labelledby":`tab_${i.uid}_${A}`,children:y.jsx(x.WidgetRenderer,{widget:D},D.uid)},`tabpanel_${i.uid}_${D.uid}`))},[s,f,i]);return y.jsxs("div",{className:"gui-tabs gui-field",style:{flex:r.size},children:[y.jsx("nav",{className:x.cn({"gui-widget":!0,"gui-widget--horizontal":!0,"gui-tabs--start-shadow":!c,"gui-tabs--end-shadow":!p}),id:n,children:y.jsxs("ul",{role:"tablist",children:[y.jsx("li",{role:"presentation",ref:l,className:"gui-sentinel gui-sentinel__start"}),C(),y.jsx("li",{role:"presentation",ref:d,className:"gui-sentinel gui-sentinel__end"})]})}),I()]})}const kc=Object.freeze(Object.defineProperty({__proto__:null,Tabs:_c},Symbol.toStringTag,{value:"Module"})),vs={};function $c(e){const t=e.widget,{uid:i,children:n,templateData:s,onChange:r}=x.useLayoutWidget(t),[a,o]=g.useState(vs);g.useEffect(()=>{a===vs&&s.defaultOpen&&o(s.defaultOpen||{})},[a,s]);const l=g.useCallback(h=>{const p={...a};s.singleOpen&&Object.keys(p).filter(m=>m!==h).forEach(m=>{p[m]=m===h?!p[m]:!1}),p[h]=!p[h],o(p),r(p)},[a,s.singleOpen,r]),d=g.useCallback(h=>{const p=n.find(f=>f.uid===h),m=a[h];return(m||s.renderMode!=="activeOnly")&&p?y.jsx("section",{className:"gui-widget",role:"region",id:`accordion_section_${h}`,hidden:!m&&s.renderMode!=="activeOnly","aria-labelledby":`accordion_button_${h}`,children:y.jsx(x.WidgetRenderer,{widget:p})}):null},[n,a,s.renderMode]),c=g.useCallback(()=>(s.sections||[]).map((p,m)=>y.jsxs("div",{className:"gui-accordion__section",children:[y.jsxs("button",{type:"button",tabIndex:0,id:`accordion_button_${p.uid}`,"aria-controls":`accordion_section_${p.uid}`,"aria-expanded":a[p.uid]?"true":"false",className:a[p.uid]?"active":"",onClick:()=>l(p.uid),children:[p.label,y.jsx("span",{className:"gui-accordion__arrow",children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 256 256",children:y.jsx("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"})})})]}),d(p.uid)]},`${"accordion_section_"+p.uid}`)),[s.sections,a,d,l]);return y.jsx("div",{className:"gui-accordion gui-field",style:{flex:s.size},children:y.jsx("div",{className:"gui-widget",id:i,children:c()})})}const Sc=Object.freeze(Object.defineProperty({__proto__:null,Accordion:$c},Symbol.toStringTag,{value:"Module"}));function Ac(e){const t=e.widget,{uid:i,templateData:n}=x.useDisplayWdiget(t);return y.jsx("div",{className:"gui-alert gui-field",style:{flex:n.size},children:y.jsx("div",{className:"gui-widget",id:i,children:y.jsx("div",{role:"alert",className:`gui-alert-notification gui-alert-notification--${n.level||"default"}`,children:n.text})})})}const Oc=Object.freeze(Object.defineProperty({__proto__:null,Alert:Ac},Symbol.toStringTag,{value:"Module"}));function Ec(e){const t=e.widget,{uid:i,templateData:n}=x.useDisplayWdiget(t);return y.jsx("div",{className:"gui-markdown-text gui-field",style:{flex:n.size},children:y.jsx("div",{className:"gui-widget",id:i,children:y.jsx("gui-markdown-text",{md:n.md,dependencies:n.deps})})})}const Ic=Object.freeze(Object.defineProperty({__proto__:null,MarkdownText:Ec},Symbol.toStringTag,{value:"Module"}));function Cc(e){const t=e.widget,{uid:i,templateData:n}=x.useDisplayWdiget(t),s=n?.render;return y.jsx("div",{className:"gui-renderer gui-field",style:{flex:n.size},children:y.jsx("div",{className:"gui-widget",id:i,children:s})})}const Tc=Object.freeze(Object.defineProperty({__proto__:null,Renderer:Cc},Symbol.toStringTag,{value:"Module"}));Ue.GuiForm=Ql,Ue.widgetLoaders=Bn,Object.defineProperty(Ue,Symbol.toStringTag,{value:"Module"})}));
|