@akad/design-system 0.1.0-beta.6 → 0.1.0-beta.8
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/css/aon-theme.css +1 -1
- package/css/bees-theme.css +1 -1
- package/css/bmc-theme.css +1 -1
- package/css/default-theme.css +1 -1
- package/css/linker-theme.css +1 -1
- package/css/oggi-theme.css +1 -1
- package/css/streetgo-theme.css +1 -1
- package/package.json +10 -10
- package/react/components/atoms/Button/Button.config.d.ts +1 -0
- package/react/components/atoms/Checkbox/Checkbox.config.d.ts +6 -1
- package/react/components/atoms/Checkbox/Checkbox.d.ts +2 -1
- package/react/components/atoms/Icon/Icon.config.d.ts +5 -0
- package/react/components/atoms/Select/Select.config.d.ts +10 -0
- package/react/components/atoms/Select/Select.d.ts +2 -6
- package/react/components/molecules/EditableSelect/EditableSelect.config.d.ts +26 -14
- package/react/components/molecules/EditableSelect/EditableSelect.d.ts +7 -23
- package/react/components/molecules/EditableSelect/EditableSelect.stories.d.ts +4 -0
- package/react/react-lib.js +2205 -2177
- package/react/react-lib.umd.cjs +8 -8
package/react/react-lib.umd.cjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
(function(Z,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],w):(Z=typeof globalThis<"u"?globalThis:Z||self,w(Z["react-lib"]={},Z.jsxRuntime,Z.React))})(this,function(Z,w,F){"use strict";var
|
|
1
|
+
(function(Z,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],w):(Z=typeof globalThis<"u"?globalThis:Z||self,w(Z["react-lib"]={},Z.jsxRuntime,Z.React))})(this,function(Z,w,F){"use strict";var Sl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ps(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Fs={exports:{}},Gr={exports:{}},ge={};/** @license React v16.13.1
|
|
2
2
|
* react-is.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
5
5
|
*
|
|
6
6
|
* This source code is licensed under the MIT license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/var
|
|
8
|
+
*/var ba;function El(){if(ba)return ge;ba=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,s=t?Symbol.for("react.fragment"):60107,n=t?Symbol.for("react.strict_mode"):60108,a=t?Symbol.for("react.profiler"):60114,i=t?Symbol.for("react.provider"):60109,o=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,d=t?Symbol.for("react.forward_ref"):60112,p=t?Symbol.for("react.suspense"):60113,T=t?Symbol.for("react.suspense_list"):60120,E=t?Symbol.for("react.memo"):60115,k=t?Symbol.for("react.lazy"):60116,S=t?Symbol.for("react.block"):60121,_=t?Symbol.for("react.fundamental"):60117,g=t?Symbol.for("react.responder"):60118,D=t?Symbol.for("react.scope"):60119;function N(b){if(typeof b=="object"&&b!==null){var R=b.$$typeof;switch(R){case e:switch(b=b.type,b){case u:case c:case s:case a:case n:case p:return b;default:switch(b=b&&b.$$typeof,b){case o:case d:case k:case E:case i:return b;default:return R}}case r:return R}}}function I(b){return N(b)===c}return ge.AsyncMode=u,ge.ConcurrentMode=c,ge.ContextConsumer=o,ge.ContextProvider=i,ge.Element=e,ge.ForwardRef=d,ge.Fragment=s,ge.Lazy=k,ge.Memo=E,ge.Portal=r,ge.Profiler=a,ge.StrictMode=n,ge.Suspense=p,ge.isAsyncMode=function(b){return I(b)||N(b)===u},ge.isConcurrentMode=I,ge.isContextConsumer=function(b){return N(b)===o},ge.isContextProvider=function(b){return N(b)===i},ge.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},ge.isForwardRef=function(b){return N(b)===d},ge.isFragment=function(b){return N(b)===s},ge.isLazy=function(b){return N(b)===k},ge.isMemo=function(b){return N(b)===E},ge.isPortal=function(b){return N(b)===r},ge.isProfiler=function(b){return N(b)===a},ge.isStrictMode=function(b){return N(b)===n},ge.isSuspense=function(b){return N(b)===p},ge.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===s||b===c||b===a||b===n||b===p||b===T||typeof b=="object"&&b!==null&&(b.$$typeof===k||b.$$typeof===E||b.$$typeof===i||b.$$typeof===o||b.$$typeof===d||b.$$typeof===_||b.$$typeof===g||b.$$typeof===D||b.$$typeof===S)},ge.typeOf=N,ge}var ye={};/** @license React v16.13.1
|
|
9
9
|
* react-is.development.js
|
|
10
10
|
*
|
|
11
11
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
12
12
|
*
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
|
-
*/var
|
|
15
|
+
*/var $a;function kl(){return $a||($a=1,process.env.NODE_ENV!=="production"&&function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,s=t?Symbol.for("react.fragment"):60107,n=t?Symbol.for("react.strict_mode"):60108,a=t?Symbol.for("react.profiler"):60114,i=t?Symbol.for("react.provider"):60109,o=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,d=t?Symbol.for("react.forward_ref"):60112,p=t?Symbol.for("react.suspense"):60113,T=t?Symbol.for("react.suspense_list"):60120,E=t?Symbol.for("react.memo"):60115,k=t?Symbol.for("react.lazy"):60116,S=t?Symbol.for("react.block"):60121,_=t?Symbol.for("react.fundamental"):60117,g=t?Symbol.for("react.responder"):60118,D=t?Symbol.for("react.scope"):60119;function N(q){return typeof q=="string"||typeof q=="function"||q===s||q===c||q===a||q===n||q===p||q===T||typeof q=="object"&&q!==null&&(q.$$typeof===k||q.$$typeof===E||q.$$typeof===i||q.$$typeof===o||q.$$typeof===d||q.$$typeof===_||q.$$typeof===g||q.$$typeof===D||q.$$typeof===S)}function I(q){if(typeof q=="object"&&q!==null){var pe=q.$$typeof;switch(pe){case e:var tt=q.type;switch(tt){case u:case c:case s:case a:case n:case p:return tt;default:var ht=tt&&tt.$$typeof;switch(ht){case o:case d:case k:case E:case i:return ht;default:return pe}}case r:return pe}}}var b=u,R=c,L=o,ee=i,U=e,oe=d,H=s,G=k,ne=E,W=r,he=a,me=n,_e=p,Ie=!1;function Fe(q){return Ie||(Ie=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),A(q)||I(q)===u}function A(q){return I(q)===c}function y(q){return I(q)===o}function M(q){return I(q)===i}function O(q){return typeof q=="object"&&q!==null&&q.$$typeof===e}function l(q){return I(q)===d}function f(q){return I(q)===s}function v(q){return I(q)===k}function P(q){return I(q)===E}function V(q){return I(q)===r}function B(q){return I(q)===a}function z(q){return I(q)===n}function te(q){return I(q)===p}ye.AsyncMode=b,ye.ConcurrentMode=R,ye.ContextConsumer=L,ye.ContextProvider=ee,ye.Element=U,ye.ForwardRef=oe,ye.Fragment=H,ye.Lazy=G,ye.Memo=ne,ye.Portal=W,ye.Profiler=he,ye.StrictMode=me,ye.Suspense=_e,ye.isAsyncMode=Fe,ye.isConcurrentMode=A,ye.isContextConsumer=y,ye.isContextProvider=M,ye.isElement=O,ye.isForwardRef=l,ye.isFragment=f,ye.isLazy=v,ye.isMemo=P,ye.isPortal=V,ye.isProfiler=B,ye.isStrictMode=z,ye.isSuspense=te,ye.isValidElementType=N,ye.typeOf=I}()),ye}var Sa;function Ea(){return Sa||(Sa=1,process.env.NODE_ENV==="production"?Gr.exports=El():Gr.exports=kl()),Gr.exports}/*
|
|
16
16
|
object-assign
|
|
17
17
|
(c) Sindre Sorhus
|
|
18
18
|
@license MIT
|
|
19
|
-
*/var
|
|
20
|
-
Valid keys: `+JSON.stringify(Object.keys(A),null," "));var q=te(P,z,l,f,v+"."+z,r);if(q)return q}return null}return _(y)}function W(A){switch(typeof A){case"number":case"string":case"undefined":return!0;case"boolean":return!A;case"object":if(Array.isArray(A))return A.every(W);if(A===null||o(A))return!0;var y=p(A);if(y){var M=y.call(A),O;if(y!==A.entries){for(;!(O=M.next()).done;)if(!W(O.value))return!1}else for(;!(O=M.next()).done;){var l=O.value;if(l&&!W(l[1]))return!1}}else return!1;return!0;default:return!1}}function he(A,y){return A==="symbol"?!0:y?y["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&y instanceof Symbol:!1}function me(A){var y=typeof A;return Array.isArray(A)?"array":A instanceof RegExp?"object":he(y,A)?"symbol":y}function ve(A){if(typeof A>"u"||A===null)return""+A;var y=me(A);if(y==="object"){if(A instanceof Date)return"date";if(A instanceof RegExp)return"regexp"}return y}function De(A){var y=ve(A);switch(y){case"array":case"object":return"an "+y;case"boolean":case"date":case"regexp":return"a "+y;default:return y}}function Pe(A){return!A.constructor||!A.constructor.name?T:A.constructor.name}return S.checkPropTypes=n,S.resetWarningCache=n.resetWarningCache,S.PropTypes=S,S},Bs}var Ls,Ia;function Tl(){if(Ia)return Ls;Ia=1;var t=js();function e(){}function r(){}return r.resetWarningCache=e,Ls=function(){function s(i,o,u,c,d,p){if(p!==t){var T=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw T.name="Invariant Violation",T}}s.isRequired=s;function n(){return s}var a={array:s,bigint:s,bool:s,func:s,number:s,object:s,string:s,symbol:s,any:s,arrayOf:n,element:s,elementType:s,instanceOf:n,node:s,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:r,resetWarningCache:e};return a.PropTypes=a,a},Ls}if(process.env.NODE_ENV!=="production"){var Ol=ka(),Al=!0;Ps.exports=Cl()(Ol.isElement,Al)}else Ps.exports=Tl()();var Dl=Ps.exports;const h=Ns(Dl),Na={Primary:"primary",Secondary:"secondary",Info:"info",Success:"success",Danger:"danger",Warning:"warning",Neutral:"neutral"},Pa={Solid:"solid",Outline:"outline",Text:"text"},Fa={Large:"lg",Medium:"md",Small:"sm"},Ma={Right:"right",Left:"left"},_e={name:"Button",class:"ds-button",props:{color:{type:String,default:Na.Primary,options:Object.values(Na)},variant:{type:String,default:Pa.Solid,options:Object.values(Pa)},size:{type:String,default:Fa.Medium,options:Object.values(Fa)},elevation:{type:Number,options:[1,2,3,4]},disabled:{type:Boolean,default:!1},icon:{type:String,default:""},iconFill:{type:Boolean,default:!0},iconPosition:{type:String,default:Ma.Right,options:Object.values(Ma)},id:{type:String,default:""},testId:{type:String},fullSize:{type:Boolean,default:!1}}},ja={Primary:"primary",PrimaryLightest:"primary-lightest",PrimaryLighter:"primary-lighter",PrimaryLight:"primary-light",PrimaryDark:"primary-dark",PrimaryDarker:"primary-darker",Neutral90:"neutral-90",Neutral80:"neutral-80",Neutral60:"neutral-60",Neutral40:"neutral-40",Neutral20:"neutral-20",Neutral10:"neutral-10",Neutral05:"neutral-05",Neutral00:"neutral-00",Secondary:"secondary",SecondaryLightest:"secondary-lightest",SecondaryLighter:"secondary-lighter",SecondaryLight:"secondary-light",SecondaryDark:"secondary-dark",SecondaryDarker:"secondary-darker",Success:"success",SuccessLighter:"success-lighter",SuccessLight:"success-light",SuccessDark:"success-dark",Warning:"warning",WarningLighter:"warning-lighter",WarningLight:"warning-light",WarningDark:"warning-dark",Danger:"danger",DangerLighter:"danger-lighter",DangerLight:"danger-light",DangerDark:"danger-dark",Info:"info",InfoLighter:"info-lighter",InfoLight:"info-light",InfoDark:"info-dark"},xa={Outlined:"outlined",Rounded:"rounded",Sharp:"sharp"},Va={XXS:"xxs",XS:"xs",SM:"sm",MD:"md",LG:"lg",XL:"xl",XXL:"xxl",XXXL:"xxxl",Huge:"huge"},Ba={Bold:"bold",Semibold:"semibold",Medium:"medium",Regular:"regular",Light:"light",Extralight:"extralight"},Je={name:"Icon",class:"ds-icon",props:{color:{type:String,default:ja.Neutral90,options:Object.values(ja)},image:{type:String,default:"settings"},variation:{type:String,default:xa.Outlined,options:Object.values(xa)},size:{type:String,default:Va.MD,options:Object.values(Va)},fontVariationSettings:{type:Object,default:{fill:0,grad:0,weight:500,opticalSize:48}},fill:{type:Boolean,default:!1},weight:{type:String,default:Ba.Semibold,options:Object.values(Ba)},onClick:{type:Function,default:()=>({})}}};var La=(t=>(t[t.bold=700]="bold",t[t.semibold=600]="semibold",t[t.medium=500]="medium",t[t.regular=400]="regular",t[t.light=300]="light",t[t.extralight=200]="extralight",t))(La||{});const Se=({image:t=Je.props.image.default,color:e=Je.props.color.default,className:r,size:s=Je.props.size.default,fill:n=Je.props.fill.default,weight:a=Je.props.weight.default,testId:i="ds-icon-test",onClick:o=Je.props.onClick.default})=>{const u="material-symbols-rounded",c=e&&Je.props.color.options.find(p=>p===e)&&`${Je.class}__color--${e}`,d=F.useMemo(()=>({fontVariationSettings:`'FILL' ${n?1:0}, 'GRAD' 0,'wght' ${La[a]}, 'opsz' 48`}),[a,n]);return w.jsx("i",{className:[`${Je.class}--${s}`,Je.class,u,c,r&&r].filter(p=>p).join(" "),"data-testid":i,onClick:o,style:d,translate:"no",children:t})};Se.propTypes={color:h.oneOf(Je.props.color.options),image:h.string,fontVariationSettings:h.object,size:h.oneOf(Je.props.size.options),fill:h.bool,weight:h.oneOf(Je.props.weight.options),onClick:h.func},Se.displayName="DsIcon";const Sr=({children:t,className:e,onClick:r,size:s=_e.props.size.default,disabled:n=_e.props.disabled.default,icon:a=_e.props.icon.default,id:i=_e.props.id.default,testId:o=i||"ds-button-test",elevation:u,variant:c=_e.props.variant.default,color:d=_e.props.color.default,iconFill:p=_e.props.iconFill.default,iconPosition:T=_e.props.iconPosition.default,fullSize:S=_e.props.fullSize.default})=>{const E=s&&_e.props.size.options.find(L=>L===s)?`${_e.class}--${s}`:`${_e.class}__${_e.props.size.default}`,k=n&&`${_e.class}--disabled`,_=`${_e.class}__${d}--${c}`,g=u&&`${_e.class}--elevation-${u}`,I=a&&`${_e.class}--with-icon`,N=S?`${_e.class}--full-size`:"",D=T==="right"?`${_e.class}__icon`:`${_e.class}__icon--left`,b=T==="right"?`${_e.class}__text`:`${_e.class}__text--reversed`;return w.jsx("button",{className:[_e.class,N,k,I,E,_,g,I,e&&e].filter(L=>L).join(" "),"data-testid":o,disabled:n,id:i,onClick:n?()=>{}:r,children:w.jsxs("span",{className:["ds-button__text",b].join(" "),children:[t,a&&w.jsx(Se,{className:["ds-button__icon",D].join(" "),fill:p,image:a,size:s})]})})};Sr.propTypes={color:h.oneOf(_e.props.color.options),variant:h.oneOf(_e.props.variant.options),size:h.oneOf(_e.props.size.options),disabled:h.bool,icon:h.string,iconFill:h.bool,iconPosition:h.oneOf(_e.props.iconPosition.options),testId:h.string,id:h.string,fullSize:h.bool},Sr.displayName="DsButton";const Il={name:"Caption",class:"ds-caption"},Rs=({children:t,className:e,testId:r="ds-caption-test"})=>w.jsx("p",{className:[Il.class,e&&e].filter(s=>s).join(" "),"data-testid":r,children:t});Rs.propTypes={children:h.node.isRequired,className:h.string,testId:h.string},Rs.displayName="DsCaption";const Wr={None:"",PrimaryDarker:"primary-darker",PrimaryDark:"primary-dark",Primary:"primary",PrimaryLight:"primary-light",PrimaryLighter:"primary-lighter",PrimaryLightest:"primary-lightest",SecondaryDarker:"secondary-darker",SecondaryDark:"secondary-dark",Secondary:"secondary",SecondaryLight:"secondary-light",SecondaryLighter:"secondary-lighter",SecondaryLightest:"secondary-lightest",Neutral90:"neutral-90",Neutral80:"neutral-80",Neutral60:"neutral-60",Neutral40:"neutral-40",Neutral20:"neutral-20",Neutral10:"neutral-10",Neutral05:"neutral-05",Neutral00:"neutral-00",SuccessDark:"success-dark",Success:"success",SuccessLight:"success-light",SuccessLighter:"success-lighter",WarningDark:"warning-dark",Warning:"warning",WarningLight:"warning-light",WarningLighter:"warning-lighter",DangerDark:"danger-dark",Danger:"danger",DangerLight:"danger-light",DangerLighter:"danger-lighter",InfoDark:"info-dark",Info:"info",InfoLight:"info-light",InfoLighter:"info-lighter"},ot={name:"Card",class:"ds-card",props:{backgroundColor:{type:String,default:Wr.None,options:Object.values(Wr)},borderColor:{type:String,default:Wr.None,options:Object.values(Wr)},elevation:{type:Number,default:0,options:[0,1,2,3,4]},id:{type:String,default:""},testId:{type:String,default:"ds-card"}}},zs=({id:t,testId:e=ot.props.testId.default,children:r,className:s,elevation:n=ot.props.elevation.default,backgroundColor:a=ot.props.backgroundColor.default,borderColor:i=ot.props.borderColor.default})=>{const o=n&&`${ot.class}--elevation-${n}`,u=i&&`${ot.class}--border-${i}`,c=a&&`${ot.class}--${a}`;return w.jsx("div",{className:[ot.class,s,o,u,c].filter(d=>d).join(" "),"data-testid":e,id:t,children:r})};zs.propTypes={id:h.string,testId:h.string,backgroundColor:h.oneOf(ot.props.backgroundColor.options),borderColor:h.oneOf(ot.props.borderColor.options),elevation:h.oneOf(ot.props.elevation.options)},zs.displayName="DsCard";const Ze={name:"Checkbox",class:"ds-checkbox",props:{name:{type:String,required:!0},testId:{type:String,default:""},label:{type:String,default:""},description:{type:String,default:""},checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},onChangeHandler:{type:Function,default:()=>({})}}},qs=F.forwardRef(({id:t,className:e,name:r,testId:s=r||"ds-checkbox-test",label:n=Ze.props.label.default,description:a=Ze.props.description.default,checked:i=Ze.props.checked.default,disabled:o=Ze.props.checked.default,onChangeHandler:u},c)=>{const d=i||!1,[p,T]=F.useState(d),S={image:p?"check_box":"check_box_outline_blank",class:p?`${Ze.class}__icon--checked`:`${Ze.class}__icon--unchecked`},E=o&&`${Ze.class}--disabled`,k=_=>{o||(T(g=>!g),u&&u(_))};return w.jsxs("label",{className:[Ze.class,E,e&&e].join(" "),htmlFor:t||r,children:[w.jsx("input",{checked:p,className:`${Ze.class}__input`,"data-testid":s,id:t||r,name:r,onChange:k,ref:c,type:"checkbox"}),w.jsx(Se,{className:`${Ze.class}__icon ${S.class}`,"data-testid":`${s}-icon`,fill:!0,image:S.image,size:"xxl"}),(a||n)&&w.jsxs("div",{className:`${Ze.class}__label`,children:[n&&w.jsx("label",{className:`${Ze.class}__label-title`,htmlFor:t||r,children:n}),a&&w.jsx("label",{className:`${Ze.class}__label-description`,htmlFor:t||r,children:a})]})]})});qs.propTypes={label:h.oneOfType([h.string,h.node]),name:h.string.isRequired,className:h.string,testId:h.string,description:h.oneOfType([h.string,h.node]),checked:h.bool,disabled:h.bool},qs.displayName="DsCheckbox";const Ra={Heading1:"heading-1",Heading2:"heading-2",Heading3:"heading-3",Heading4:"heading-4",Heading5:"heading-5",Heading6:"heading-6"},Er={name:"Heading",class:"ds-heading",props:{type:{type:String,default:Ra.Heading1,options:Object.values(Ra)}}},Us=({children:t,testId:e="ds-heading-test",type:r=Er.props.type.default,className:s})=>{const n={"heading-1":"h1","heading-2":"h2","heading-3":"h3","heading-4":"h4","heading-5":"h5","heading-6":"h6"},a=Er.props.type.options.find(u=>u===r)&&`${Er.class}--${r}`,o=n[r];return w.jsx(o,{className:[Er.class,a,s&&s].filter(u=>u).join(" "),"data-testid":e,children:t})};Us.propTypes={className:h.string,testId:h.string,type:h.oneOf(Er.props.type.options)},Us.displayName="DsHeading";const za={None:"",Dashed:"dashed",Dotted:"dotted"},qa={None:"",Small:"small",Large:"large"},zt={name:"HR",class:"ds-hr",props:{borderStyle:{type:String,default:za.None,options:Object.values(za)},size:{type:String,default:qa.None,options:Object.values(qa)}}};function Ua(t,e,r){const s=r.props[t];return s.options&&s.options.some(n=>n===e)?`${r.class}--${e}`:""}const Hs=({size:t=zt.props.size.default,borderStyle:e=zt.props.borderStyle.default})=>{const r=Ua("size",t,zt),s=Ua("borderStyle",e,zt);return w.jsx("hr",{className:`${zt.class} ${r} ${s}`.trim()})};Hs.propTypes={size:h.oneOf(zt.props.size.options),borderStyle:h.oneOf(zt.props.borderStyle.options)},Hs.displayName="DsHR";function Mt(t){return typeof t=="string"||t instanceof String}function Ha(t){var e;return typeof t=="object"&&t!=null&&(t==null||(e=t.constructor)==null?void 0:e.name)==="Object"}function Ka(t,e){return Array.isArray(e)?Ka(t,(r,s)=>e.includes(s)):Object.entries(t).reduce((r,s)=>{let[n,a]=s;return e(a,n)&&(r[n]=a),r},{})}const X={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Nl(t){switch(t){case X.LEFT:return X.FORCE_LEFT;case X.RIGHT:return X.FORCE_RIGHT;default:return t}}function Ks(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Yr(t,e){if(e===t)return!0;const r=Array.isArray(e),s=Array.isArray(t);let n;if(r&&s){if(e.length!=t.length)return!1;for(n=0;n<e.length;n++)if(!Yr(e[n],t[n]))return!1;return!0}if(r!=s)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){const a=e instanceof Date,i=t instanceof Date;if(a&&i)return e.getTime()==t.getTime();if(a!=i)return!1;const o=e instanceof RegExp,u=t instanceof RegExp;if(o&&u)return e.toString()==t.toString();if(o!=u)return!1;const c=Object.keys(e);for(n=0;n<c.length;n++)if(!Object.prototype.hasOwnProperty.call(t,c[n]))return!1;for(n=0;n<c.length;n++)if(!Yr(t[c[n]],e[c[n]]))return!1;return!0}else if(e&&t&&typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();return!1}class Pl{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?X.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?X.RIGHT:X.LEFT}}function re(t,e){return new re.InputMask(t,e)}function Ga(t){if(t==null)throw new Error("mask property should be defined");return t instanceof RegExp?re.MaskedRegExp:Mt(t)?re.MaskedPattern:t===Date?re.MaskedDate:t===Number?re.MaskedNumber:Array.isArray(t)||t===Array?re.MaskedDynamic:re.Masked&&t.prototype instanceof re.Masked?t:re.Masked&&t instanceof re.Masked?t.constructor:t instanceof Function?re.MaskedFunction:(console.warn("Mask not found for mask",t),re.Masked)}function kr(t){if(!t)throw new Error("Options in not defined");if(re.Masked){if(t.prototype instanceof re.Masked)return{mask:t};const{mask:e=void 0,...r}=t instanceof re.Masked?{mask:t}:Ha(t)&&t.mask instanceof re.Masked?t:{};if(e){const s=e.mask;return{...Ka(e,(n,a)=>!a.startsWith("_")),mask:e.constructor,_mask:s,...r}}}return Ha(t)?{...t}:{mask:t}}function wt(t){if(re.Masked&&t instanceof re.Masked)return t;const e=kr(t),r=Ga(e.mask);if(!r)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===r&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new r(e)}re.createMask=wt;class Gs{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,r){if(!(e==null||r==null||e===this.selectionStart&&r===this.selectionEnd))try{this._unsafeSelect(e,r)}catch{}}get isActive(){return!1}}re.MaskElement=Gs;const Wa=90,Fl=89;class Xr extends Gs{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,r,s;return(e=(r=(s=this.input).getRootNode)==null?void 0:r.call(s))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){if(this._handlers.redo&&(e.keyCode===Wa&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===Fl&&e.ctrlKey))return e.preventDefault(),this._handlers.redo(e);if(this._handlers.undo&&e.keyCode===Wa&&(e.metaKey||e.ctrlKey))return e.preventDefault(),this._handlers.undo(e);e.isComposing||this._handlers.selectionChange(e)}_onBeforeinput(e){if(e.inputType==="historyUndo"&&this._handlers.undo)return e.preventDefault(),this._handlers.undo(e);if(e.inputType==="historyRedo"&&this._handlers.redo)return e.preventDefault(),this._handlers.redo(e)}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}re.HTMLMaskElement=Xr;class Ml extends Xr{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,r){this.input.setSelectionRange(e,r)}get value(){return this.input.value}set value(e){this.input.value=e}}re.HTMLMaskElement=Xr;class Ya extends Xr{get _unsafeSelectionStart(){const e=this.rootElement,r=e.getSelection&&e.getSelection(),s=r&&r.anchorOffset,n=r&&r.focusOffset;return n==null||s==null||s<n?s:n}get _unsafeSelectionEnd(){const e=this.rootElement,r=e.getSelection&&e.getSelection(),s=r&&r.anchorOffset,n=r&&r.focusOffset;return n==null||s==null||s>n?s:n}_unsafeSelect(e,r){if(!this.rootElement.createRange)return;const s=this.rootElement.createRange();s.setStart(this.input.firstChild||this.input,e),s.setEnd(this.input.lastChild||this.input,r);const n=this.rootElement,a=n.getSelection&&n.getSelection();a&&(a.removeAllRanges(),a.addRange(s))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}re.HTMLContenteditableMaskElement=Ya;class Jr{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>Jr.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}Jr.MAX_LENGTH=100;class jl{constructor(e,r){this.el=e instanceof Gs?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new Ya(e):new Ml(e),this.masked=wt(r),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new Jr,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this._onChange()}maskEquals(e){var r;return e==null||((r=this.masked)==null?void 0:r.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof re.Masked)&&this.masked.constructor===Ga(e)){this.masked.updateOptions({mask:e});return}const r=e instanceof re.Masked?e:wt({mask:e});r.unmaskedValue=this.masked.unmaskedValue,this.masked=r}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,r){const s=this._listeners[e];s&&s.forEach(n=>n(r))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const r=this.masked.unmaskedValue,s=this.masked.value,n=this.masked.rawInputValue,a=this.displayValue,i=this.unmaskedValue!==r||this.value!==s||this._rawInputValue!==n;this._unmaskedValue=r,this._value=s,this._rawInputValue=n,this.el.value!==a&&(this.el.value=a),e==="auto"?this.alignCursor():e!=null&&(this.cursorPos=e),i&&this._fireChangeEvents(),!this._historyChanging&&(i||this.history.isEmpty)&&this.history.push({unmaskedValue:r,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:r,...s}=e,n=!this.maskEquals(r),a=this.masked.optionsIsChanged(s);n&&(this.mask=r),a&&this.masked.updateOptions(s),(n||a)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,X.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,r){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(r),this}off(e,r){if(!this._listeners[e])return this;if(!r)return delete this._listeners[e],this;const s=this._listeners[e].indexOf(r);return s>=0&&this._listeners[e].splice(s,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const r=new Pl({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),s=this.masked.rawInputValue,n=this.masked.splice(r.startChangePos,r.removed.length,r.inserted,r.removeDirection,{input:!0,raw:!0}).offset,a=s===this.masked.rawInputValue?r.removeDirection:X.NONE;let i=this.masked.nearestInputPos(r.startChangePos+n,a);a!==X.NONE&&(i=this.masked.nearestInputPos(i,X.NONE)),this.updateControl(i),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}re.InputMask=jl;class oe{static normalize(e){return Array.isArray(e)?e:[e,new oe]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}re.ChangeDetails=oe;class mt{constructor(e,r,s){e===void 0&&(e=""),r===void 0&&(r=0),this.value=e,this.from=r,this.stop=s}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const r=this.value[0];return this.value=this.value.slice(1),r}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class ze{constructor(e){this._value="",this._update({...ze.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,r){r===void 0&&(r={input:!0}),this.reset(),this.append(e,r,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,r){return e}totalInputPositions(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),Math.min(this.displayValue.length,r-e)}extractInput(e,r,s){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),this.displayValue.slice(e,r)}extractTail(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),new mt(this.extractInput(e,r),e)}appendTail(e){return Mt(e)&&(e=new mt(String(e))),e.appendTo(this)}_appendCharRaw(e,r){return e?(this._value+=e,new oe({inserted:e,rawInserted:e})):new oe}_appendChar(e,r,s){r===void 0&&(r={});const n=this.state;let a;if([e,a]=this.doPrepareChar(e,r),e&&(a=a.aggregate(this._appendCharRaw(e,r)),!a.rawInserted&&this.autofix==="pad")){const i=this.state;this.state=n;let o=this.pad(r);const u=this._appendCharRaw(e,r);o=o.aggregate(u),u.rawInserted||o.equals(a)?a=o:this.state=i}if(a.inserted){let i,o=this.doValidate(r)!==!1;if(o&&s!=null){const u=this.state;if(this.overwrite===!0){i=s.state;for(let d=0;d<a.rawInserted.length;++d)s.unshift(this.displayValue.length-a.tailShift)}let c=this.appendTail(s);if(o=c.rawInserted.length===s.toString().length,!(o&&c.inserted)&&this.overwrite==="shift"){this.state=u,i=s.state;for(let d=0;d<a.rawInserted.length;++d)s.shift();c=this.appendTail(s),o=c.rawInserted.length===s.toString().length}o&&c.inserted&&(this.state=u)}o||(a=new oe,this.state=n,s&&i&&(s.state=i))}return a}_appendPlaceholder(){return new oe}_appendEager(){return new oe}append(e,r,s){if(!Mt(e))throw new Error("value should be string");const n=Mt(s)?new mt(String(s)):s;r!=null&&r.tail&&(r._beforeTailState=this.state);let a;[e,a]=this.doPrepare(e,r);for(let i=0;i<e.length;++i){const o=this._appendChar(e[i],r,n);if(!o.rawInserted&&!this.doSkipInvalid(e[i],r,n))break;a.aggregate(o)}return(this.eager===!0||this.eager==="append")&&r!=null&&r.input&&e&&a.aggregate(this._appendEager()),n!=null&&(a.tailShift+=this.appendTail(n).tailShift),a}remove(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(r),new oe}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const r=this.rawInputValue,s=this.value,n=e();return this.rawInputValue=r,this.value&&this.value!==s&&s.indexOf(this.value)===0&&(this.append(s.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,n}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const r=this.state,s=e(this);return this.state=r,delete this._isolated,s}doSkipInvalid(e,r,s){return!!this.skipInvalid}doPrepare(e,r){return r===void 0&&(r={}),oe.normalize(this.prepare?this.prepare(e,this,r):e)}doPrepareChar(e,r){return r===void 0&&(r={}),oe.normalize(this.prepareChar?this.prepareChar(e,this,r):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,r,s,n,a){s===void 0&&(s=""),n===void 0&&(n=X.NONE),a===void 0&&(a={input:!0});const i=e+r,o=this.extractTail(i),u=this.eager===!0||this.eager==="remove";let c;u&&(n=Nl(n),c=this.extractInput(0,i,{raw:!0}));let d=e;const p=new oe;if(n!==X.NONE&&(d=this.nearestInputPos(e,r>1&&e!==0&&!u?X.NONE:n),p.tailShift=d-e),p.aggregate(this.remove(d)),u&&n!==X.NONE&&c===this.rawInputValue)if(n===X.FORCE_LEFT){let T;for(;c===this.rawInputValue&&(T=this.displayValue.length);)p.aggregate(new oe({tailShift:-1})).aggregate(this.remove(T-1))}else n===X.FORCE_RIGHT&&o.unshift();return p.aggregate(this.append(s,a,o))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!Yr(this,e)}typedValueEquals(e){const r=this.typedValue;return e===r||ze.EMPTY_VALUES.includes(e)&&ze.EMPTY_VALUES.includes(r)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new oe}}ze.DEFAULTS={skipInvalid:!0},ze.EMPTY_VALUES=[void 0,null,""],re.Masked=ze;class qt{constructor(e,r){e===void 0&&(e=[]),r===void 0&&(r=0),this.chunks=e,this.from=r}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=Mt(e)?new mt(String(e)):e;const r=this.chunks[this.chunks.length-1],s=r&&(r.stop===e.stop||e.stop==null)&&e.from===r.from+r.toString().length;if(e instanceof mt)s?r.extend(e.toString()):this.chunks.push(e);else if(e instanceof qt){if(e.stop==null){let n;for(;e.chunks.length&&e.chunks[0].stop==null;)n=e.chunks.shift(),n.from+=e.from,this.extend(n)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof re.MaskedPattern))return new mt(this.toString()).appendTo(e);const r=new oe;for(let s=0;s<this.chunks.length;++s){const n=this.chunks[s],a=e._mapPosToBlock(e.displayValue.length),i=n.stop;let o;if(i!=null&&(!a||a.index<=i)&&((n instanceof qt||e._stops.indexOf(i)>=0)&&r.aggregate(e._appendPlaceholder(i)),o=n instanceof qt&&e._blocks[i]),o){const u=o.appendTail(n);r.aggregate(u);const c=n.toString().slice(u.rawInserted.length);c&&r.aggregate(e.append(c,{tail:!0}))}else r.aggregate(e.append(n.toString(),{tail:!0}))}return r}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:r,...s}=e;Object.assign(this,s),this.chunks=r.map(n=>{const a="chunks"in n?new qt:new mt;return a.state=n,a})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const r=e!=null?e-this.from:e;let s=0;for(;s<this.chunks.length;){const n=this.chunks[s],a=n.unshift(r);if(n.toString()){if(!a)break;++s}else this.chunks.splice(s,1);if(a)return a}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const r=this.chunks[e],s=r.shift();if(r.toString()){if(!s)break;--e}else this.chunks.splice(e,1);if(s)return s}return""}}class xl{constructor(e,r){this.masked=e,this._log=[];const{offset:s,index:n}=e._mapPosToBlock(r)||(r<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=s,this.index=n,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((r=this.block)==null?void 0:r.displayValue.length)||0){var r;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,X.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,X.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,X.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,X.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,X.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,X.NONE),!0})}}class Xa{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,r){return e===void 0&&(e=0),r===void 0&&(r=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(r),this._value||(this._isRawInput=!1),new oe}nearestInputPos(e,r){r===void 0&&(r=X.NONE);const s=0,n=this._value.length;switch(r){case X.LEFT:case X.FORCE_LEFT:return s;case X.NONE:case X.RIGHT:case X.FORCE_RIGHT:default:return n}}totalInputPositions(e,r){return e===void 0&&(e=0),r===void 0&&(r=this._value.length),this._isRawInput?r-e:0}extractInput(e,r,s){return e===void 0&&(e=0),r===void 0&&(r=this._value.length),s===void 0&&(s={}),s.raw&&this._isRawInput&&this._value.slice(e,r)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,r){if(r===void 0&&(r={}),this.isFilled)return new oe;const s=this.eager===!0||this.eager==="append",a=this.char===e&&(this.isUnmasking||r.input||r.raw)&&(!r.raw||!s)&&!r.tail,i=new oe({inserted:this.char,rawInserted:a?this.char:""});return this._value=this.char,this._isRawInput=a&&(r.raw||r.input),i}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new oe;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new mt("")}appendTail(e){return Mt(e)&&(e=new mt(String(e))),e.appendTo(this)}append(e,r,s){const n=this._appendChar(e[0],r);return s!=null&&(n.tailShift+=this.appendTail(s).tailShift),n}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}pad(e){return this._appendPlaceholder()}}class Zr{constructor(e){const{parent:r,isOptional:s,placeholderChar:n,displayChar:a,lazy:i,eager:o,...u}=e;this.masked=wt(u),Object.assign(this,{parent:r,isOptional:s,placeholderChar:n,displayChar:a,lazy:i,eager:o})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.value.length),e===0&&r>=1?(this.isFilled=!1,this.masked.remove(e,r)):new oe}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,r){if(r===void 0&&(r={}),this.isFilled)return new oe;const s=this.masked.state;let n=this.masked._appendChar(e,this.currentMaskFlags(r));return n.inserted&&this.doValidate(r)===!1&&(n=new oe,this.masked.state=s),!n.inserted&&!this.isOptional&&!this.lazy&&!r.input&&(n.inserted=this.placeholderChar),n.skip=!n.inserted&&!this.isOptional,this.isFilled=!!n.inserted,n}append(e,r,s){return this.masked.append(e,this.currentMaskFlags(r),s)}_appendPlaceholder(){return this.isFilled||this.isOptional?new oe:(this.isFilled=!0,new oe({inserted:this.placeholderChar}))}_appendEager(){return new oe}extractTail(e,r){return this.masked.extractTail(e,r)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,r,s){return e===void 0&&(e=0),r===void 0&&(r=this.value.length),this.masked.extractInput(e,r,s)}nearestInputPos(e,r){r===void 0&&(r=X.NONE);const s=0,n=this.value.length,a=Math.min(Math.max(e,s),n);switch(r){case X.LEFT:case X.FORCE_LEFT:return this.isComplete?a:s;case X.RIGHT:case X.FORCE_RIGHT:return this.isComplete?a:n;case X.NONE:default:return a}}totalInputPositions(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.value.length),this.value.slice(e,r).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var r;return{...e,_beforeTailState:(e==null||(r=e._beforeTailState)==null?void 0:r.masked)||(e==null?void 0:e._beforeTailState)}}pad(e){return new oe}}Zr.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class Vl extends ze{updateOptions(e){super.updateOptions(e)}_update(e){const r=e.mask;r&&(e.validate=s=>s.search(r)>=0),super._update(e)}}re.MaskedRegExp=Vl;class qe extends ze{constructor(e){super({...qe.DEFAULTS,...e,definitions:Object.assign({},Zr.DEFAULT_DEFINITIONS,e==null?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const r=this.mask;if(!r||!e)return;let s=!1,n=!1;for(let a=0;a<r.length;++a){if(this.blocks){const c=r.slice(a),d=Object.keys(this.blocks).filter(T=>c.indexOf(T)===0);d.sort((T,S)=>S.length-T.length);const p=d[0];if(p){const{expose:T,repeat:S,...E}=kr(this.blocks[p]),k={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...E,repeat:S,parent:this},_=S!=null?new re.RepeatBlock(k):wt(k);_&&(this._blocks.push(_),T&&(this.exposeBlock=_),this._maskedBlocks[p]||(this._maskedBlocks[p]=[]),this._maskedBlocks[p].push(this._blocks.length-1)),a+=p.length-1;continue}}let i=r[a],o=i in e;if(i===qe.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(i==="{"||i==="}"){s=!s;continue}if(i==="["||i==="]"){n=!n;continue}if(i===qe.ESCAPE_CHAR){if(++a,i=r[a],!i)break;o=!1}const u=o?new Zr({isOptional:n,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...kr(e[i]),parent:this}):new Xa({char:i,eager:this.eager,isUnmasking:s});this._blocks.push(u)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e){this.reset();return}const{_blocks:r,...s}=e;this._blocks.forEach((n,a)=>n.state=r[a]),super.state=s}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,r)=>e+=r.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(r),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,r)=>e+=r.value,"")}set value(e){if(this.exposeBlock){const r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(r),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(r),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,r)=>e+=r.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const r=new oe;let s=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(s==null)return r;this._blocks[s].isFilled&&++s;for(let n=s;n<this._blocks.length;++n){const a=this._blocks[n]._appendEager();if(!a.inserted)break;r.aggregate(a)}return r}_appendCharRaw(e,r){r===void 0&&(r={});const s=this._mapPosToBlock(this.displayValue.length),n=new oe;if(!s)return n;for(let i=s.index,o;o=this._blocks[i];++i){var a;const u=o._appendChar(e,{...r,_beforeTailState:(a=r._beforeTailState)==null||(a=a._blocks)==null?void 0:a[i]});if(n.aggregate(u),u.consumed)break}return n}extractTail(e,r){e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length);const s=new qt;return e===r||this._forEachBlocksInRange(e,r,(n,a,i,o)=>{const u=n.extractTail(i,o);u.stop=this._findStopBefore(a),u.from=this._blockStartPos(a),u instanceof qt&&(u.blockIndex=a),s.extend(u)}),s}extractInput(e,r,s){if(e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),s===void 0&&(s={}),e===r)return"";let n="";return this._forEachBlocksInRange(e,r,(a,i,o,u)=>{n+=a.extractInput(o,u,s)}),n}_findStopBefore(e){let r;for(let s=0;s<this._stops.length;++s){const n=this._stops[s];if(n<=e)r=n;else break}return r}_appendPlaceholder(e){const r=new oe;if(this.lazy&&e==null)return r;const s=this._mapPosToBlock(this.displayValue.length);if(!s)return r;const n=s.index,a=e??this._blocks.length;return this._blocks.slice(n,a).forEach(i=>{if(!i.lazy||e!=null){var o;r.aggregate(i._appendPlaceholder((o=i._blocks)==null?void 0:o.length))}}),r}_mapPosToBlock(e){let r="";for(let s=0;s<this._blocks.length;++s){const n=this._blocks[s],a=r.length;if(r+=n.displayValue,e<=r.length)return{index:s,offset:e-a}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((r,s)=>r+=s.displayValue.length,0)}_forEachBlocksInRange(e,r,s){r===void 0&&(r=this.displayValue.length);const n=this._mapPosToBlock(e);if(n){const a=this._mapPosToBlock(r),i=a&&n.index===a.index,o=n.offset,u=a&&i?a.offset:this._blocks[n.index].displayValue.length;if(s(this._blocks[n.index],n.index,o,u),a&&!i){for(let c=n.index+1;c<a.index;++c)s(this._blocks[c],c,0,this._blocks[c].displayValue.length);s(this._blocks[a.index],a.index,0,a.offset)}}}remove(e,r){e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length);const s=super.remove(e,r);return this._forEachBlocksInRange(e,r,(n,a,i,o)=>{s.aggregate(n.remove(i,o))}),s}nearestInputPos(e,r){if(r===void 0&&(r=X.NONE),!this._blocks.length)return 0;const s=new xl(this,e);if(r===X.NONE)return s.pushRightBeforeInput()||(s.popState(),s.pushLeftBeforeInput())?s.pos:this.displayValue.length;if(r===X.LEFT||r===X.FORCE_LEFT){if(r===X.LEFT){if(s.pushRightBeforeFilled(),s.ok&&s.pos===e)return e;s.popState()}if(s.pushLeftBeforeInput(),s.pushLeftBeforeRequired(),s.pushLeftBeforeFilled(),r===X.LEFT){if(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.ok&&s.pos<=e||(s.popState(),s.ok&&s.pos<=e))return s.pos;s.popState()}return s.ok?s.pos:r===X.FORCE_LEFT?0:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:0)}return r===X.RIGHT||r===X.FORCE_RIGHT?(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.pushRightBeforeFilled()?s.pos:r===X.FORCE_RIGHT?this.displayValue.length:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:this.nearestInputPos(e,X.LEFT))):e}totalInputPositions(e,r){e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length);let s=0;return this._forEachBlocksInRange(e,r,(n,a,i,o)=>{s+=n.totalInputPositions(i,o)}),s}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const r=this._maskedBlocks[e];return r?r.map(s=>this._blocks[s]):[]}pad(e){const r=new oe;return this._forEachBlocksInRange(0,this.displayValue.length,s=>r.aggregate(s.pad(e))),r}}qe.DEFAULTS={...ze.DEFAULTS,lazy:!0,placeholderChar:"_"},qe.STOP_CHAR="`",qe.ESCAPE_CHAR="\\",qe.InputDefinition=Zr,qe.FixedDefinition=Xa,re.MaskedPattern=qe;class Qr extends qe{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:r=this.to||0,from:s=this.from||0,maxLength:n=this.maxLength||0,autofix:a=this.autofix,...i}=e;this.to=r,this.from=s,this.maxLength=Math.max(String(r).length,n),this.autofix=a;const o=String(this.from).padStart(this.maxLength,"0"),u=String(this.to).padStart(this.maxLength,"0");let c=0;for(;c<u.length&&u[c]===o[c];)++c;i.mask=u.slice(0,c).replace(/0/g,"\\0")+"0".repeat(this.maxLength-c),super._update(i)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let r="",s="";const[,n,a]=e.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(r="0".repeat(n.length)+a,s="9".repeat(n.length)+a),r=r.padEnd(this.maxLength,"0"),s=s.padEnd(this.maxLength,"9"),[r,s]}doPrepareChar(e,r){r===void 0&&(r={});let s;return[e,s]=super.doPrepareChar(e.replace(/\D/g,""),r),e||(s.skip=!this.isComplete),[e,s]}_appendCharRaw(e,r){if(r===void 0&&(r={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,r);const s=String(this.from).padStart(this.maxLength,"0"),n=String(this.to).padStart(this.maxLength,"0"),[a,i]=this.boundaries(this.value+e);return Number(i)<this.from?super._appendCharRaw(s[this.value.length],r):Number(a)>this.to?!r.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(s[this.value.length],r).aggregate(this._appendCharRaw(e,r)):super._appendCharRaw(n[this.value.length],r):super._appendCharRaw(e,r)}doValidate(e){const r=this.value;if(r.search(/[^0]/)===-1&&r.length<=this._matchFrom)return!0;const[n,a]=this.boundaries(r);return this.from<=Number(a)&&Number(n)<=this.to&&super.doValidate(e)}pad(e){const r=new oe;if(this.value.length===this.maxLength)return r;const s=this.value,n=this.maxLength-this.value.length;if(n){this.reset();for(let a=0;a<n;++a)r.aggregate(super._appendCharRaw("0",e));s.split("").forEach(a=>this._appendCharRaw(a))}return r}}re.MaskedRange=Qr;class Ct extends qe{static extractPatternOptions(e){const{mask:r,pattern:s,...n}=e;return{...n,mask:Mt(r)?r:s}}constructor(e){super(Ct.extractPatternOptions({...Ct.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:r,pattern:s,blocks:n,...a}={...Ct.DEFAULTS,...e},i=Object.assign({},Ct.GET_DEFAULT_BLOCKS());e.min&&(i.Y.from=e.min.getFullYear()),e.max&&(i.Y.to=e.max.getFullYear()),e.min&&e.max&&i.Y.from===i.Y.to&&(i.m.from=e.min.getMonth()+1,i.m.to=e.max.getMonth()+1,i.m.from===i.m.to&&(i.d.from=e.min.getDate(),i.d.to=e.max.getDate())),Object.assign(i,this.blocks,n),super._update({...a,mask:Mt(r)?r:s,blocks:i})}doValidate(e){const r=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&r!=null&&(this.min==null||this.min<=r)&&(this.max==null||r<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(Ct.extractPatternOptions(e))}}Ct.GET_DEFAULT_BLOCKS=()=>({d:{mask:Qr,from:1,to:31,maxLength:2},m:{mask:Qr,from:1,to:12,maxLength:2},Y:{mask:Qr,from:1900,to:9999}}),Ct.DEFAULTS={...qe.DEFAULTS,mask:Date,pattern:"d{.}`m{.}`Y",format:(t,e)=>{if(!t)return"";const r=String(t.getDate()).padStart(2,"0"),s=String(t.getMonth()+1).padStart(2,"0"),n=t.getFullYear();return[r,s,n].join(".")},parse:(t,e)=>{const[r,s,n]=t.split(".").map(Number);return new Date(n,s-1,r)}},re.MaskedDate=Ct;class es extends ze{constructor(e){super({...es.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(r=>{const{expose:s,...n}=kr(r),a=wt({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...n});return s&&(this.exposeMask=a),a}):[])}_appendCharRaw(e,r){r===void 0&&(r={});const s=this._applyDispatch(e,r);return this.currentMask&&s.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(r))),s}_applyDispatch(e,r,s){e===void 0&&(e=""),r===void 0&&(r={}),s===void 0&&(s="");const n=r.tail&&r._beforeTailState!=null?r._beforeTailState._value:this.value,a=this.rawInputValue,i=r.tail&&r._beforeTailState!=null?r._beforeTailState._rawInputValue:a,o=a.slice(i.length),u=this.currentMask,c=new oe,d=u==null?void 0:u.state;return this.currentMask=this.doDispatch(e,{...r},s),this.currentMask&&(this.currentMask!==u?(this.currentMask.reset(),i&&(this.currentMask.append(i,{raw:!0}),c.tailShift=this.currentMask.value.length-n.length),o&&(c.tailShift+=this.currentMask.append(o,{raw:!0,tail:!0}).tailShift)):d&&(this.currentMask.state=d)),c}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const r=new oe;return e&&r.aggregate(this._applyDispatch("",{},e)),r.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var r,s;return{...e,_beforeTailState:((r=e._beforeTailState)==null?void 0:r.currentMaskRef)===this.currentMask&&((s=e._beforeTailState)==null?void 0:s.currentMask)||e._beforeTailState}}doDispatch(e,r,s){return r===void 0&&(r={}),s===void 0&&(s=""),this.dispatch(e,this,r,s)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,r){r===void 0&&(r={});let[s,n]=super.doPrepare(e,r);if(this.currentMask){let a;[s,a]=super.doPrepare(s,this.currentMaskFlags(r)),n=n.aggregate(a)}return[s,n]}doPrepareChar(e,r){r===void 0&&(r={});let[s,n]=super.doPrepareChar(e,r);if(this.currentMask){let a;[s,a]=super.doPrepareChar(s,this.currentMaskFlags(r)),n=n.aggregate(a)}return[s,n]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(r=>r.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let r=String(e);this.currentMask&&(this.currentMask.typedValue=e,r=this.currentMask.unmaskedValue),this.unmaskedValue=r}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,r){const s=new oe;return this.currentMask&&s.aggregate(this.currentMask.remove(e,r)).aggregate(this._applyDispatch()),s}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(r=>r.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:r,currentMaskRef:s,currentMask:n,...a}=e;r&&this.compiledMasks.forEach((i,o)=>i.state=r[o]),s!=null&&(this.currentMask=s,this.currentMask.state=n),super.state=a}extractInput(e,r,s){return this.currentMask?this.currentMask.extractInput(e,r,s):""}extractTail(e,r){return this.currentMask?this.currentMask.extractTail(e,r):super.extractTail(e,r)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,r){return this.currentMask?this.currentMask.nearestInputPos(e,r):super.nearestInputPos(e,r)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((r,s)=>{if(!e[s])return;const{mask:n,...a}=e[s];return Yr(r,a)&&r.maskEquals(n)}):super.maskEquals(e)}typedValueEquals(e){var r;return!!((r=this.currentMask)!=null&&r.typedValueEquals(e))}}es.DEFAULTS={...ze.DEFAULTS,dispatch:(t,e,r,s)=>{if(!e.compiledMasks.length)return;const n=e.rawInputValue,a=e.compiledMasks.map((i,o)=>{const u=e.currentMask===i,c=u?i.displayValue.length:i.nearestInputPos(i.displayValue.length,X.FORCE_LEFT);return i.rawInputValue!==n?(i.reset(),i.append(n,{raw:!0})):u||i.remove(c),i.append(t,e.currentMaskFlags(r)),i.appendTail(s),{index:o,weight:i.rawInputValue.length,totalInputPositions:i.totalInputPositions(0,Math.max(c,i.nearestInputPos(i.displayValue.length,X.FORCE_LEFT)))}});return a.sort((i,o)=>o.weight-i.weight||o.totalInputPositions-i.totalInputPositions),e.compiledMasks[a[0].index]}},re.MaskedDynamic=es;class ts extends qe{constructor(e){super({...ts.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:r,...s}=e;if(r){const n=r.map(o=>o.length),a=Math.min(...n),i=Math.max(...n)-a;s.mask="*".repeat(a),i&&(s.mask+="["+"*".repeat(i)+"]"),this.enum=r}super._update(s)}_appendCharRaw(e,r){r===void 0&&(r={});const s=Math.min(this.nearestInputPos(0,X.FORCE_RIGHT),this.value.length),n=this.enum.filter(a=>this.matchValue(a,this.unmaskedValue+e,s));if(n.length){n.length===1&&this._forEachBlocksInRange(0,this.value.length,(i,o)=>{const u=n[0][o];o>=this.value.length||u===i.value||(i.reset(),i._appendChar(u,r))});const a=super._appendCharRaw(n[0][this.value.length],r);return n.length===1&&n[0].slice(this.unmaskedValue.length).split("").forEach(i=>a.aggregate(super._appendCharRaw(i))),a}return new oe({skip:!this.isComplete})}extractTail(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),new mt("",e)}remove(e,r){if(e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),e===r)return new oe;const s=Math.min(super.nearestInputPos(0,X.FORCE_RIGHT),this.value.length);let n;for(n=e;n>=0&&!(this.enum.filter(o=>this.matchValue(o,this.value.slice(s,n),s)).length>1);--n);const a=super.remove(n,r);return a.tailShift+=n-e,a}get isComplete(){return this.enum.indexOf(this.value)>=0}}ts.DEFAULTS={...qe.DEFAULTS,matchValue:(t,e,r)=>t.indexOf(e,r)===r},re.MaskedEnum=ts;class Bl extends ze{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}re.MaskedFunction=Bl;var Ja;class Qe extends ze{constructor(e){super({...Qe.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),r="\\d*",s=(this.scale?"("+Ks(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+r+s),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(Ks).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(Ks(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const r=e.split(this.radix);return r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),r.join(this.radix)}doPrepareChar(e,r){r===void 0&&(r={});const[s,n]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(r.input&&r.raw||!r.input&&!r.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),r);return e&&!s&&(n.skip=!0),s&&!this.allowPositive&&!this.value&&s!=="-"&&n.aggregate(this._appendChar("-")),[s,n]}_separatorsCount(e,r){r===void 0&&(r=!1);let s=0;for(let n=0;n<e;++n)this._value.indexOf(this.thousandsSeparator,n)===n&&(++s,r&&(e+=this.thousandsSeparator.length));return s}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,r,s){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),[e,r]=this._adjustRangeWithSeparators(e,r),this._removeThousandsSeparators(super.extractInput(e,r,s))}_appendCharRaw(e,r){r===void 0&&(r={});const s=r.tail&&r._beforeTailState?r._beforeTailState._value:this._value,n=this._separatorsCountFromSlice(s);this._value=this._removeThousandsSeparators(this.value);const a=this._value;this._value+=e;const i=this.number;let o=!isNaN(i),u=!1;if(o){let T;this.min!=null&&this.min<0&&this.number<this.min&&(T=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(T=this.max),T!=null&&(this.autofix?(this._value=this.format(T,this).replace(Qe.UNMASKED_RADIX,this.radix),u||(u=a===this._value&&!r.tail)):o=!1),o&&(o=!!this._value.match(this._numberRegExp))}let c;o?c=new oe({inserted:this._value.slice(a.length),rawInserted:u?"":e,skip:u}):(this._value=a,c=new oe),this._value=this._insertThousandsSeparators(this._value);const d=r.tail&&r._beforeTailState?r._beforeTailState._value:this._value,p=this._separatorsCountFromSlice(d);return c.tailShift+=(p-n)*this.thousandsSeparator.length,c}_findSeparatorAround(e){if(this.thousandsSeparator){const r=e-this.thousandsSeparator.length+1,s=this.value.indexOf(this.thousandsSeparator,r);if(s<=e)return s}return-1}_adjustRangeWithSeparators(e,r){const s=this._findSeparatorAround(e);s>=0&&(e=s);const n=this._findSeparatorAround(r);return n>=0&&(r=n+this.thousandsSeparator.length),[e,r]}remove(e,r){e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),[e,r]=this._adjustRangeWithSeparators(e,r);const s=this.value.slice(0,e),n=this.value.slice(r),a=this._separatorsCount(s.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(s+n));const i=this._separatorsCountFromSlice(s);return new oe({tailShift:(i-a)*this.thousandsSeparator.length})}nearestInputPos(e,r){if(!this.thousandsSeparator)return e;switch(r){case X.NONE:case X.LEFT:case X.FORCE_LEFT:{const s=this._findSeparatorAround(e-1);if(s>=0){const n=s+this.thousandsSeparator.length;if(e<n||this.value.length<=n||r===X.FORCE_LEFT)return s}break}case X.RIGHT:case X.FORCE_RIGHT:{const s=this._findSeparatorAround(e);if(s>=0)return s+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let r=e;this.min!=null&&(r=Math.max(r,this.min)),this.max!=null&&(r=Math.min(r,this.max)),r!==e&&(this.unmaskedValue=this.format(r,this));let s=this.value;this.normalizeZeros&&(s=this._normalizeZeros(s)),this.padFractionalZeros&&this.scale>0&&(s=this._padFractionalZeros(s)),this._value=s}super.doCommit()}_normalizeZeros(e){const r=this._removeThousandsSeparators(e).split(this.radix);return r[0]=r[0].replace(/^(\D*)(0*)(\d*)/,(s,n,a,i)=>n+i),e.length&&!/\d$/.test(r[0])&&(r[0]=r[0]+"0"),r.length>1&&(r[1]=r[1].replace(/0*$/,""),r[1].length||(r.length=1)),this._insertThousandsSeparators(r.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const r=e.split(this.radix);return r.length<2&&r.push(""),r[1]=r[1].padEnd(this.scale,"0"),r.join(this.radix)}doSkipInvalid(e,r,s){r===void 0&&(r={});const n=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===Qe.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,r,s)&&!n}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Qe.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(Qe.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||Qe.EMPTY_VALUES.includes(e)&&Qe.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}Ja=Qe,Qe.UNMASKED_RADIX=".",Qe.EMPTY_VALUES=[...ze.EMPTY_VALUES,0],Qe.DEFAULTS={...ze.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Ja.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:t=>t.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},re.MaskedNumber=Qe;const Ws={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function Za(t,e,r){e===void 0&&(e=Ws.MASKED),r===void 0&&(r=Ws.MASKED);const s=wt(t);return n=>s.runIsolated(a=>(a[e]=n,a[r]))}function Ll(t,e,r,s){return Za(e,r,s)(t)}re.PIPE_TYPE=Ws,re.createPipe=Za,re.pipe=Ll;class Rl extends qe{get repeatFrom(){var e;return(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?e:0}get repeatTo(){var e;return(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var r,s,n;const{repeat:a,...i}=kr(e);this._blockOpts=Object.assign({},this._blockOpts,i);const o=wt(this._blockOpts);this.repeat=(r=(s=a??o.repeat)!=null?s:this.repeat)!=null?r:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((n=this._blocks)==null?void 0:n.length)||0,this.repeatFrom)),blocks:{m:o},eager:o.eager,overwrite:o.overwrite,skipInvalid:o.skipInvalid,lazy:o.lazy,placeholderChar:o.placeholderChar,displayChar:o.displayChar})}_allocateBlock(e){if(e<this._blocks.length)return this._blocks[e];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(wt(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(e,r){r===void 0&&(r={});const s=new oe;for(let u=(n=(a=this._mapPosToBlock(this.displayValue.length))==null?void 0:a.index)!=null?n:Math.max(this._blocks.length-1,0),c,d;c=(i=this._blocks[u])!=null?i:d=!d&&this._allocateBlock(u);++u){var n,a,i,o;const p=c._appendChar(e,{...r,_beforeTailState:(o=r._beforeTailState)==null||(o=o._blocks)==null?void 0:o[u]});if(p.skip&&d){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(s.aggregate(p),p.consumed)break}return s}_trimEmptyTail(e,r){var s,n;e===void 0&&(e=0);const a=Math.max(((s=this._mapPosToBlock(e))==null?void 0:s.index)||0,this.repeatFrom,0);let i;r!=null&&(i=(n=this._mapPosToBlock(r))==null?void 0:n.index),i==null&&(i=this._blocks.length-1);let o=0;for(let u=i;a<=u&&!this._blocks[u].unmaskedValue;--u,++o);o&&(this._blocks.splice(i-o+1,o),this.mask=this.mask.slice(o))}reset(){super.reset(),this._trimEmptyTail()}remove(e,r){e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length);const s=super.remove(e,r);return this._trimEmptyTail(e,r),s}totalInputPositions(e,r){return e===void 0&&(e=0),r==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,r)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}}re.RepeatBlock=Rl;try{globalThis.IMask=re}catch{}const Qa={mask:h.oneOfType([h.array,h.func,h.string,h.instanceOf(RegExp),h.oneOf([Date,Number,re.Masked]),h.instanceOf(re.Masked)]),value:h.any,unmask:h.oneOfType([h.bool,h.oneOf(["typed"])]),prepare:h.func,prepareChar:h.func,validate:h.func,commit:h.func,overwrite:h.oneOfType([h.bool,h.oneOf(["shift"])]),eager:h.oneOfType([h.bool,h.oneOf(["append","remove"])]),skipInvalid:h.bool,onAccept:h.func,onComplete:h.func,placeholderChar:h.string,displayChar:h.string,lazy:h.bool,definitions:h.object,blocks:h.object,enum:h.arrayOf(h.string),maxLength:h.number,from:h.number,to:h.number,pattern:h.string,format:h.func,parse:h.func,autofix:h.oneOfType([h.bool,h.oneOf(["pad"])]),radix:h.string,thousandsSeparator:h.string,mapToRadix:h.arrayOf(h.string),scale:h.number,normalizeZeros:h.bool,padFractionalZeros:h.bool,min:h.oneOfType([h.number,h.instanceOf(Date)]),max:h.oneOfType([h.number,h.instanceOf(Date)]),dispatch:h.func,inputRef:h.oneOfType([h.func,h.shape({current:h.object})])},ei=Object.keys(Qa).filter(t=>t!=="value"),zl=["value","unmask","onAccept","onComplete","inputRef"],ql=ei.filter(t=>zl.indexOf(t)<0);function Ul(t){var e;const r=(e=class extends F.Component{constructor(a){super(a),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const a=this.props,i=this._extractMaskOptionsFromProps(a);if(i.mask)this.maskRef?(this.maskRef.updateOptions(i),"value"in a&&a.value!==void 0&&(this.maskValue=a.value)):this.initMask(i);else if(this.destroyMask(),"value"in a&&a.value!==void 0){var o;(o=this.element)!=null&&o.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=a.value:this.element.value=a.value}}componentWillUnmount(){this.destroyMask()}_inputRef(a){this.element=a,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=a:this.props.inputRef(a))}initMask(a){a===void 0&&(a=this._extractMaskOptionsFromProps(this.props)),this.maskRef=re(this.element,a).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&this.props.value!==void 0&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(a){const{...i}=a;return Object.keys(i).filter(o=>ql.indexOf(o)<0).forEach(o=>{delete i[o]}),i}_extractNonMaskProps(a){const{...i}=a;return ei.forEach(o=>{o!=="maxLength"&&delete i[o]}),"defaultValue"in i||(i.defaultValue=a.mask?"":i.value),delete i.value,i}get maskValue(){return this.maskRef?this.props.unmask==="typed"?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(a){this.maskRef&&(a=a==null&&this.props.unmask!=="typed"?"":a,this.props.unmask==="typed"?this.maskRef.typedValue=a:this.props.unmask?this.maskRef.unmaskedValue=a:this.maskRef.value=a)}_onAccept(a){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,a)}_onComplete(a){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,a)}render(){return F.createElement(t,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}},e.displayName=void 0,e.propTypes=void 0,e),s=t.displayName||t.name||"Component";return r.displayName="IMask("+s+")",r.propTypes=Qa,F.forwardRef((n,a)=>F.createElement(r,{...n,ref:a}))}const Hl=Ul(t=>{let{inputRef:e,...r}=t;return F.createElement("input",{...r,ref:e})}),Kl=(t,e)=>F.createElement(Hl,{...t,ref:e});F.forwardRef(Kl);function Gl(t,e){let{onAccept:r,onComplete:s,ref:n=F.useRef(null),defaultValue:a,defaultUnmaskedValue:i,defaultTypedValue:o}=e===void 0?{}:e;const u=F.useRef(null),[c,d]=F.useState({}),[p,T]=F.useState(""),[S,E]=F.useState(""),[k,_]=F.useState(),g=F.useCallback(()=>{var b;(b=u.current)==null||b.destroy(),u.current=null},[]),I=F.useCallback(()=>{const b=u.current;b&&(d({value:b.value,unmaskedValue:b.unmaskedValue,typedValue:b.typedValue}),_(b.typedValue),E(b.unmaskedValue),T(b.value))},[]),N=F.useCallback(b=>{const L=u.current;L&&(I(),r==null||r(L.value,L,b))},[r]),D=F.useCallback(b=>u.current&&(s==null?void 0:s(u.current.value,u.current,b)),[s]);return F.useEffect(()=>{const{value:b,...L}=c,R=u.current;!R||p===void 0||(b!==p&&(R.value=p,R.value!==p&&N()),d(L))},[p]),F.useEffect(()=>{const{unmaskedValue:b,...L}=c,R=u.current;!R||S===void 0||(b!==S&&(R.unmaskedValue=S,R.unmaskedValue!==S&&N()),d(L))},[S]),F.useEffect(()=>{const{typedValue:b,...L}=c,R=u.current;!R||k===void 0||(b!==k&&(R.typedValue=k,R.masked.typedValueEquals(k)||N()),d(L))},[k]),F.useEffect(()=>{const b=n.current;if(!b||!(t!=null&&t.mask))return g();const L=u.current;L?L==null||L.updateOptions(t):b&&t!=null&&t.mask&&(u.current=re(b,t),I(),a!==void 0&&T(a),i!==void 0&&E(i),o!==void 0&&_(o))},[t,g,N]),F.useEffect(()=>{if(!u.current)return;const b=u.current;return b.on("accept",N),b.on("complete",D),()=>{b.off("accept",N),b.off("complete",D)}},[N,D]),F.useEffect(()=>g,[g]),{ref:n,maskRef:u,value:p,setValue:T,unmaskedValue:S,setUnmaskedValue:E,typedValue:k,setTypedValue:_}}const ti={Text:"text",Password:"password",Email:"email",Date:"date",Number:"number"},ri={Small:"small",Medium:"medium",Large:"large"},si={Default:"",Error:"error",Success:"success"},ni={Center:"center",End:"end",Initial:"initial"},ai={Top:"top",Right:"right",Bottom:"bottom",Left:"left"},Te={name:"Input",class:"ds-input",props:{name:{type:String,required:!0},testId:{type:String,default:""},type:{type:String,default:ti.Text,options:Object.values(ti)},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},size:{type:String,default:ri.Medium,options:Object.values(ri)},label:{type:String,default:""},placeholder:{type:String,default:" "},value:{type:String,default:""},min:{type:String,default:""},max:{type:String,default:""},status:{type:String,default:si.Default,options:Object.values(si)},feedback:{type:String,default:""},hasFeedback:{type:Boolean,default:!0},noMargin:{type:Boolean,default:!1},icon:{type:String,default:""},tooltip:{type:String,default:""},tooltipPlacement:{type:String,default:ni.Center,options:Object.values(ni)},tooltipPosition:{type:String,default:ai.Top,options:Object.values(ai)},mask:{type:String,default:""},onChangeHandler:{type:Function,default:()=>({})}}},ii={currency:{mask:"currency",blocks:{currency:{mask:"R$ num",lazy:!1,blocks:{num:{mask:Number,scale:2,thousandsSeparator:".",padFractionalZeros:!0,normalizeZeros:!1,radix:",",mapToRadix:[",","."]}}}}},document:{mask:[{mask:"000.000.000-00",startsWith:/[0-9]/,maxLength:14},{mask:"00.000.000/0000-00",startsWith:/[0-9]/,maxLength:18}]},"phone-br":{mask:[{mask:"(00) 0000-0000"},{mask:"(00) 00000-0000"}],dispatch:(t,e)=>(e.value+t).replace(/\D/g,"").length<=10?e.compiledMasks[0]:e.compiledMasks[1]}},oi={Top:"top",Right:"right",Bottom:"bottom",Left:"left"},li={Center:"center",End:"end",Initial:"initial"},Tt={name:"Tooltip",class:"ds-tooltip",props:{position:{type:String,default:oi.Top,options:Object.values(oi)},placement:{type:String,default:li.Center,options:Object.values(li)},text:{type:String,default:""}}},Ut=({children:t,position:e=Tt.props.position.default,placement:r=Tt.props.placement.default,text:s=Tt.props.text.default,className:n})=>{const a=F.useRef(null),i=F.useRef(null),[o,u]=F.useState(!1),c=e&&Tt.props.position.options.find(b=>b===e)&&`${Tt.class}--${e}`,d=r&&Tt.props.placement.options.find(b=>b===r)&&`${Tt.class}--${r}`,[p,T]=F.useState(0),[S,E]=F.useState(0),[k,_]=F.useState(0),[g,I]=F.useState(0);let N;switch(F.useEffect(()=>{var b,L,R,ee;i.current&&(_((b=i==null?void 0:i.current)==null?void 0:b.offsetHeight),I((L=i==null?void 0:i.current)==null?void 0:L.offsetWidth)),a.current&&(T((R=a==null?void 0:a.current)==null?void 0:R.offsetHeight),E((ee=a==null?void 0:a.current)==null?void 0:ee.offsetWidth))},[a,o]),F.useEffect(()=>(document.addEventListener("mousedown",D),()=>{document.removeEventListener("mousedown",D)}),[]),e){case"top":r==="initial"?N={bottom:p+9,left:S<30?-S/1.5:-S*.01}:r==="end"?N={bottom:p+9,right:S<30?-S/1.5:-S*.01}:N={bottom:p+9,left:-g/2+S/2};break;case"bottom":r==="initial"?N={top:p+9,left:S<30?-S/1.5:-S*.01}:r==="end"?N={top:p+9,right:S<30?-S/1.5:-S*.01}:N={top:p+9,left:-g/2+S/2};break;case"left":r==="initial"?N={right:S+9,top:p<30?-p/1.5:-p*.01}:r==="end"?N={right:S+9,bottom:p<30?-p/1.5:-p*.01}:N={right:S+9,top:-k/2+p/2};break;case"right":r==="initial"?N={left:S+9,top:p<30?-p/1.5:-p*.01}:r==="end"?N={left:S+9,bottom:p<30?-p/1.5:-p*.01}:N={left:S+9,top:-k/2+p/2};break}const D=({target:b})=>{a.current&&a.current.contains(b)||u(!1)};return w.jsxs("span",{className:[Tt.class,n].join(" "),onClick:()=>u(!o),ref:a,children:[t,o&&w.jsx("span",{className:[c,d].filter(b=>b).join(" "),children:w.jsx("span",{className:`${Tt.class}__wrapper`,ref:i,style:N,children:s})})]})};Ut.propTypes={position:h.string,placement:h.string,text:h.oneOfType([h.string,h.node])},Ut.displayName="DsTooltip";const ar=F.forwardRef(({name:t,testId:e=t||"ds-input-test",type:r=Te.props.type.default,animated:s=Te.props.animated.default,size:n=Te.props.size.default,label:a,placeholder:i,value:o,min:u,max:c,tooltip:d=Te.props.tooltip.default,tooltipPosition:p=Te.props.tooltipPosition.default,tooltipPlacement:T=Te.props.tooltipPlacement.default,icon:S=Te.props.icon.default,status:E=Te.props.status.default,feedback:k,hasFeedback:_=Te.props.hasFeedback.default,noMargin:g=Te.props.noMargin.default,disabled:I=Te.props.disabled.default,className:N,mask:D,onChangeHandler:b=Te.props.onChangeHandler.default,onBlurHandler:L,onKeyDownHandler:R,onFocusHandler:ee},K)=>{const[ce,U]=F.useState(!1),[G,ne]=F.useState(!1),W=!!b&&!!D,he=(B,z,te)=>{if(W&&te){const q={...te,target:{...te.target,name:t,maskedValue:B,value:z.unmaskedValue,type:"text"}};b(q)}},me=F.useMemo(()=>typeof D=="object"?{lazy:!0,...D}:ii[D]?{...ii[D],min:u,max:c,lazy:!0}:{mask:D||"",min:u,max:c,lazy:!0},[D]),{ref:ve,setUnmaskedValue:De}=Gl(me,{onAccept:he}),Pe=B=>{b&&!W&&b(B)},A=B=>{R&&R(B)},y=B=>{U(!1),L&&L(B)},M=B=>{U(!0),ee&&ee(B)},O=()=>{ne(B=>!B)},l=F.useMemo(()=>G&&r==="password"?"text":r,[G,r]),f=()=>{const B=[`${Te.class}`];return n&&B.push(`${Te.class}--${n}`),s&&B.push(`${Te.class}--animated`),g&&B.push(`${Te.class}--no-margin`),S&&B.push(`${Te.class}--with-icon`),E&&B.push(`${Te.class}--${E}`),N&&B.push(N),B.join(" ")},v=F.useMemo(()=>{const B=[`${Te.class}__label`];return(ce||o)&&B.push(`${Te.class}__label--active`),B.join(" ")},[o,ce]),P=()=>!s&&i?i:"",V=()=>E&&E==="error"?"info":"check_circle";return F.useEffect(()=>{D&&De(o||"")},[o,D,De]),w.jsxs("div",{className:f(),ref:K,children:[_&&w.jsx("div",{className:"ds-input__feedback",children:k&&w.jsxs(w.Fragment,{children:[w.jsx(Se,{image:V()}),k]})}),w.jsx("input",{className:"ds-input__input","data-testid":e,disabled:I,id:t,max:c,min:u,name:t,onBlur:y,onChange:Pe,onFocus:M,onInput:Pe,onKeyDown:A,placeholder:P(),ref:ve,type:l,...!D&&{value:o||""}}),w.jsxs("label",{className:v,htmlFor:t,children:[a,d&&w.jsx(Ut,{className:"ds-input__tooltip",placement:T,position:p,text:d,children:w.jsx(Se,{className:"ds-input__icon",image:"info"})})]}),S&&w.jsx(Se,{className:"ds-input__icon",image:S}),r==="password"&&w.jsx(Se,{className:"ds-input__password-icon",image:G?"visibility_off":"visibility",onClick:O,size:"xl"})]})});ar.propTypes={name:h.string,testId:h.string,type:h.oneOf(Te.props.type.options),animated:h.bool,size:h.oneOf(Te.props.size.options),label:h.string,placeholder:h.string,value:h.oneOfType([h.string]),min:h.string,max:h.string,tooltip:h.string,tooltipPosition:h.string,tooltipPlacement:h.string,icon:h.string,status:h.oneOf(Te.props.status.options),feedback:h.string,hasFeedback:h.bool,noMargin:h.bool,disabled:h.bool,mask:h.oneOfType([h.string,h.object]),onChangeHandler:h.func,onFocusHandler:h.func},ar.displayName="DsInput";const ui={Small:"small",Medium:"medium",Large:"large"},ci={None:"",Neutral20:"neutral-20",Neutral10:"neutral-10",Neutral05:"neutral-05",Neutral00:"neutral-00"},et={name:"Loading",class:"ds-loading",props:{size:{type:String,default:ui.Medium,options:Object.values(ui)},opacity:{type:Boolean,default:!0},fullscreen:{type:Boolean,default:!0},backgroundColor:{type:String,default:ci.Neutral10,options:Object.values(ci)},id:{type:String,default:""},testId:{type:String,default:"ds-loading"}}},Ys=({id:t,testId:e=et.props.testId.default,className:r,size:s=et.props.size.default,opacity:n=et.props.opacity.default,fullscreen:a=et.props.fullscreen.default,backgroundColor:i=et.props.backgroundColor.default})=>{const o=!a&&`${et.class}--absolute`,u=s&&`${et.class}__dots--${s}`,c=i&&et.props.backgroundColor.options.find(p=>p===i)&&`${et.class}__background--${i}`,d=n&&`${et.class}__background--opacity`;return w.jsxs("div",{className:[et.class,r,o].filter(p=>p).join(" "),"data-testid":e,id:t,children:[w.jsx("div",{className:[`${et.class}__background`,c,d].filter(p=>p).join(" ")}),w.jsx("div",{className:["ds-loading__dots",u].filter(p=>p).join(" "),role:"status"})]})};Ys.propTypes={id:h.string,testId:h.string,size:h.oneOf(et.props.size.options),opacity:h.bool,fullscreen:h.bool,backgroundColor:h.string},Ys.displayName="DsLoading";const Ot={name:"Option",class:"ds-option",props:{id:{type:String,default:""},name:{type:String,default:""},testId:{type:String,default:""},label:{type:String,default:""},value:{type:String,default:""},disabled:{type:Boolean,default:!1},detail:{type:String,default:""},checked:{type:Boolean,default:!1},onChangeHandler:{type:Function,default:()=>({})}}},Xs=({id:t,label:e,detail:r,name:s,testId:n=s||"ds-option-test",disabled:a=Ot.props.disabled.default,value:i,checked:o=Ot.props.checked.default,onChangeHandler:u=Ot.props.onChangeHandler.default})=>{const[c]=F.useState(Math.random()),d=()=>{const p=[Ot.class];return a&&p.push(`${Ot.class}--disabled`),p.join(" ")};return w.jsxs("div",{className:d(),children:[w.jsx("input",{checked:o,"data-testid":n,disabled:a,id:t||String(c),name:s,onChange:u,type:"radio",value:i}),w.jsx(Se,{className:`${Ot.class}__icon`,image:o?"radio_button_checked":"radio_button_unchecked",size:"xxl"}),w.jsxs("div",{className:`${Ot.class}__text-container`,children:[e&&w.jsx("label",{className:`${Ot.class}__label`,htmlFor:t||String(c),children:e}),r&&w.jsx("label",{className:`${Ot.class}__detail`,htmlFor:t||String(c),children:r})]})]})};Xs.propTypes={id:h.string,name:h.string,testId:h.string,label:h.oneOfType([h.string,h.node]),value:h.oneOfType([h.string,h.number]),detail:h.string,disabled:h.bool,checked:h.bool,onChangeHandler:h.func},Xs.displayName="DsOption";const di={Default:"",Large:"large",Small:"small"},rs={name:"Paragraph",class:"ds-paragraph",props:{type:{type:String,default:di.Default,options:Object.values(di)}}},At=({children:t,className:e,testId:r="ds-paragraph-test",type:s=rs.props.type.default})=>{const n=s&&`${rs.class}--${s}`;return w.jsx("p",{className:[rs.class,n,e&&e].filter(a=>a).join(" "),"data-testid":r,children:t})};At.propTypes={className:h.string,testId:h.string,type:h.oneOf(rs.props.type.options)},At.displayName="DsParagraph";const fi={Success:"success",SuccessDark:"success-dark",Warning:"warning",Danger:"danger"},pi={name:"Progress",class:"ds-progress",props:{label:{type:String,default:""},progress:{type:Number,default:0},color:{type:String,default:fi.Success,options:Object.values(fi)}}},Js={name:"Flex-Element",class:"ds-flex-element",props:{flex:{type:String,default:"0 1 auto",required:!1},className:{type:String,default:"",required:!1}}},Be=({children:t,flex:e=Js.props.flex.default,className:r=Js.props.className.default})=>{const s=()=>[Js.class,r].join(" "),n=()=>({flex:e});return w.jsx("div",{className:s(),style:n(),children:t})};Be.propTypes={className:h.string,flex:h.string},Be.displayName="DsFlexElement";const hi={Stretch:"stretch",FlexStart:"flex-start",FlexEnd:"flex-end",Center:"center",SpaceAround:"space-around",SpaceBetween:"space-between"},mi={Stretch:"stretch",FlexStart:"flex-start",FlexEnd:"flex-end",Center:"center"},gi={Row:"row",Column:"column",RowReverse:"row-reverse",ColumnReverse:"column-reverse"},yi={NoWrap:"nowrap",Wrap:"wrap",WrapReverse:"wrap-reverse"},Wl={Quark:"quark",Nano:"nano",XXXS:"xxxs",XXS:"xxs",XS:"xs",SM:"sm",MD:"md",LG:"lg",XL:"xl",XXL:"xxl",XXXL:"xxxl"},Ht={name:"Flex-Layout",class:"ds-flex-layout",props:{justifyContent:{type:String,default:hi.Stretch,required:!0,options:Object.values(hi)},alignItems:{type:String,default:mi.Stretch,required:!0,options:Object.values(mi)},flexDirection:{type:String,default:gi.Row,required:!0,options:Object.values(gi)},flexWrap:{type:String,default:yi.Wrap,required:!1,options:Object.values(yi)},className:{type:String,default:""},width:{type:String,default:"100%"},height:{type:String,default:""},gap:{type:String,default:"",options:Object.values(Wl)}}},Dt=({children:t,className:e,justifyContent:r=Ht.props.justifyContent.default,alignItems:s=Ht.props.alignItems.default,flexDirection:n=Ht.props.flexDirection.default,flexWrap:a=Ht.props.flexWrap.default,width:i=Ht.props.width.default,height:o,gap:u})=>{const c=()=>{const p=[Ht.class,e];return u&&p.push(`${Ht.class}--gap-${u}`),p.join(" ")},d=()=>({display:"flex",justifyContent:r,alignItems:s,flexDirection:n,flexWrap:a,width:i,height:o,gap:u});return w.jsx("div",{className:c(),style:d(),children:t})};Dt.propTypes={className:h.string,justifyContent:h.string,alignItems:h.string,flexDirection:h.string,flexWrap:h.string,width:h.string,height:h.string,gap:h.string},Dt.displayName="DsFlexLayout";const ss={None:"none",Quark:"quark",Nano:"nano",XXXS:"xxxs",XXS:"xxs",XS:"xs",SM:"sm"},wr={name:"Spacer",class:"ds-spacer",props:{vertical:{type:String,default:ss.None,options:Object.values(ss)},horizontal:{type:String,default:ss.None,options:Object.values(ss)}}},lt=({vertical:t=wr.props.vertical.default,horizontal:e=wr.props.horizontal.default})=>{const r=t&&`ds-spacer__vertical--${t}`,s=e&&`ds-spacer__horizontal--${e}`;return w.jsx("div",{className:[wr.class,r,s].filter(n=>n).join(" "),"data-testid":"spacer"})};lt.propTypes={vertical:h.oneOf(wr.props.vertical.options),horizontal:h.oneOf(wr.props.horizontal.options)},lt.displayName="DsSpacer";const Zs=({label:t,progress:e=pi.props.progress.default,color:r=pi.props.color.default})=>{const s=F.useMemo(()=>e>100?100:e,[e]),n=F.useMemo(()=>`ds-progress__progress--${r}`,[r]),a=F.useMemo(()=>r==="success-dark"?"color__success--dark":r==="warning"?"color__warning--dark":`color__${r}--default`,[r]);return w.jsx("div",{className:"ds-progress",children:w.jsxs(Dt,{flexDirection:"column",children:[w.jsx(Be,{children:w.jsx("div",{className:"ds-progress__container",children:w.jsx("div",{className:`ds-progress__progress ${n}`,style:{width:`${s||0}%`}})})}),w.jsx(Be,{children:w.jsxs(Dt,{alignItems:"flex-end",flexDirection:"column",justifyContent:"center",children:[w.jsx(lt,{vertical:"quark"}),w.jsx(At,{className:a,children:t})]})})]})})};Zs.propTypes={label:h.string,progress:h.number,color:h.string};const vi={Small:"sm",Medium:"md",Large:"lg"},_i={Default:"",Error:"error",Success:"success"},bi={Center:"center",End:"end",Initial:"initial"},$i={Top:"top",Right:"right",Bottom:"bottom",Left:"left"},Oe={name:"Select",class:"ds-select",props:{label:{type:String,default:""},className:{type:String,default:""},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},name:{type:String,default:""},testId:{type:String,default:""},placeholder:{type:String},onChange:{type:Function,default:()=>{}},value:{type:[Boolean,String,Number,void 0]},size:{type:String,options:Object.values(vi),default:vi.Medium},status:{type:String,default:_i.Default,options:Object.values(_i)},tooltip:{type:String,default:""},tooltipPlacement:{type:String,default:bi.Initial,options:Object.values(bi)},tooltipPosition:{type:String,default:$i.Top,options:Object.values($i)},feedback:{type:String,default:""}}},Qs=F.forwardRef(({label:t,className:e,disabled:r=Oe.props.disabled.default,animated:s=Oe.props.animated.default,multiple:n=Oe.props.multiple.default,name:a,testId:i=a||"ds-select-test",options:o,value:u,placeholder:c,onChange:d,onChangeHandler:p,size:T=Oe.props.size.default,status:S=Oe.props.status.default,tooltip:E,tooltipPosition:k=Oe.props.tooltipPosition.default,tooltipPlacement:_=Oe.props.tooltipPlacement.default,feedback:g,...I},N)=>{const[D,b]=F.useState(!1),L=K=>{b(!1),d&&d(K,K.target.value),p&&p(K,K.target.value)},R=()=>{const K=[Oe.class,"select-placeholder"];return K.push(`${Oe.class}--${T}`),S&&K.push(`${Oe.class}--${S}`),D&&K.push(`${Oe.class}--active`),r&&K.push(`${Oe.class}--disabled`),e&&K.push(e),K.join(" ")},ee=F.useMemo(()=>{const K=[`${Oe.class}__label`];return!s&&K.push(`${Oe.class}__label--not-animated`),u&&K.push(`${Oe.class}__label--has-value`),s&&!u&&!E&&K.push(`${Oe.class}__label--hidden`),K.join(" ")},[u]);return w.jsxs("div",{className:R(),children:[w.jsxs("label",{className:ee,htmlFor:a,children:[t,E&&w.jsx(Ut,{className:`${Oe.class}__tooltip`,placement:_,position:k,text:E,children:w.jsx(Se,{className:`${Oe.class}__icon`,image:"info"})})]}),w.jsxs("select",{"data-testid":i,disabled:r,id:a,multiple:n,name:a,onChange:K=>L(K),value:u||"",...I,onBlur:()=>b(!1),onFocus:()=>b(!0),ref:N,required:!0,children:[(c||s)&&w.jsx("option",{disabled:!0,value:"",children:c??t}),o==null?void 0:o.map((K,ce)=>{var U;return K.options?w.jsx("optgroup",{label:K.label,children:(U=K.options)==null?void 0:U.map((G,ne)=>w.jsx("option",{className:`${Oe.class}__option-select`,value:G.value,children:G.label||G.value},ne))},ce):w.jsx("option",{className:`${Oe.class}__option-select`,value:K.value,children:K.label||K.value},ce)})]}),g&&w.jsxs("div",{className:"ds-select__feedback-container",children:[w.jsx(Se,{className:"ds-select__icon",image:S==="success"?"check_circle":"info"}),w.jsx("span",{className:"ds-select__feedback",children:g})]})]})});Qs.propTypes={label:h.string.isRequired,className:h.string,disabled:h.bool,animated:h.bool,multiple:h.bool,name:h.string,testId:h.string,options:h.array,placeholder:h.string,onChange:h.func,onChangeHandler:h.func,value:h.oneOfType([h.string,h.number]),size:h.oneOf(Oe.props.size.options),status:h.oneOf(Oe.props.status.options),tooltip:h.string,tooltipPosition:h.string,tooltipPlacement:h.string,feedback:h.string},Qs.displayName="DsSelect";const Si={Large:"large",Small:"small"},en={name:"Subtitle",class:"ds-subtitle",props:{type:{type:String,default:Si.Large,options:Object.values(Si)}}},Ei=({children:t,className:e,testId:r="ds-subtitle-test",type:s})=>{const n=en.props.type.options.find(a=>a===s)&&`${en.class}--${s}`;return w.jsx("p",{className:[en.class,n,e&&e].filter(a=>a).join(" "),"data-testid":r,children:t})};Ei.displayName="DsSubtitle";const ki={Small:"small",Medium:"medium",Large:"large"},wi={Text:"text"},Ci={None:"",Error:"error",Success:"success"},Ti={None:"none",Both:"both",Horizontal:"horizontal",Vertical:"vertical",Block:"block",Inline:"inline"},xe={name:"TextArea",class:"ds-textarea",props:{name:{type:String,required:!0},testId:{type:String,default:""},type:{type:String,default:wi.Text,options:Object.values(wi)},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},size:{type:String,default:ki.Medium,options:Object.values(ki)},label:{type:String,default:""},placeholder:{type:String,default:" "},value:{type:String,default:""},minLength:{type:Number,default:void 0},maxLength:{type:Number,default:void 0},rows:{type:Number,default:1},status:{type:String,default:Ci.None,options:Object.values(Ci)},feedback:{type:String,default:""},description:{type:String,default:""},icon:{type:String,default:""},tooltip:{type:String,default:""},resize:{type:String,default:Ti.None,options:Object.values(Ti)},onChangeHandler:{type:Function,default:()=>{}}}},tn=F.forwardRef(({name:t,testId:e=t||"ds-textarea-test",animated:r=xe.props.animated.default,size:s=xe.props.size.default,label:n,placeholder:a,value:i,minLength:o,maxLength:u,tooltip:c,icon:d,status:p=xe.props.status.default,feedback:T,disabled:S=xe.props.disabled.default,className:E,resize:k=xe.props.resize.default,onChangeHandler:_=xe.props.onChangeHandler.default,onBlurHandler:g,onKeyDownHandler:I,onFocusHandler:N,rows:D=xe.props.rows.default,description:b},L)=>{const[R,ee]=F.useState(!1),[K,ce]=F.useState(0),[U,G]=F.useState(Math.random());F.useEffect(()=>{i==null&&G(Math.random())},[i]);const ne=y=>{ce(y.target.value.length),_&&_(y)},W=y=>{I&&I(y)},he=y=>{ee(!1),g&&g(y)},me=y=>{ee(!0),N&&N(y)},ve=()=>{const y=[`${xe.class}`];return s&&y.push(`${xe.class}--${s}`),r&&y.push(`${xe.class}--animated`),c&&y.push(`${xe.class}--with-icon`),p&&y.push(`${xe.class}--${p}`),E&&y.push(E),y.join(" ")},De=F.useMemo(()=>{const y=[`${xe.class}__label`];return(R||i)&&y.push(`${xe.class}__label--active`),y.join(" ")},[i,R]),Pe=()=>!r&&a?a:"",A=()=>p&&p==="error"?"info":"check_circle";return w.jsxs("div",{className:ve(),children:[b&&w.jsx("span",{className:"ds-textarea__description",children:b}),T&&w.jsxs("div",{className:"ds-textarea__feedback",children:[w.jsx(Se,{image:A()}),T]}),w.jsx("textarea",{className:"ds-textarea__textarea","data-testid":e,defaultValue:i||"",disabled:S,id:t,maxLength:u,minLength:o,name:t,onBlur:he,onChange:ne,onFocus:me,onInput:ne,onKeyDown:W,placeholder:Pe(),ref:L,rows:D,style:{resize:k||"none"}}),w.jsx("label",{className:De,htmlFor:t,children:n}),u&&w.jsxs("span",{className:"ds-textarea__count",children:[K,"/",u]}),c&&w.jsx(Ut,{className:"ds-textarea__tooltip",placement:"end",text:c,children:w.jsx(Se,{className:"ds-textarea__icon",image:d})})]},U)});tn.propTypes={name:h.string,testId:h.string,type:h.oneOf(xe.props.type.options),animated:h.bool,size:h.oneOf(xe.props.size.options),label:h.string,placeholder:h.string,value:h.oneOfType([h.string]),tooltip:h.string,icon:h.string,status:h.oneOf(xe.props.status.options),feedback:h.string,minLength:h.number,maxLength:h.number,rows:h.number,disabled:h.bool,onChangeHandler:h.func,onFocusHandler:h.func,resize:h.oneOf(xe.props.resize.options).isRequired,description:h.string},tn.displayName="DsTextArea";const rn={name:"Container",class:"ds-container",props:{fluid:{type:Boolean,default:!1}}},ns=({children:t,fluid:e=rn.props.fluid.default,className:r,style:s})=>{const n=e?`${rn.class}--fluid`:rn.class;return w.jsx("div",{className:[n,r].filter(a=>a).join(" "),style:s,children:t})};ns.propTypes={children:h.node,fluid:h.bool,className:h.string,style:h.object},ns.displayName="DsContainer";function Oi(){const{innerWidth:t,innerHeight:e}=window;return{width:t,height:e}}function Yl(){const[t,e]=F.useState(Oi());return F.useEffect(()=>{function r(){e(Oi())}return window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[]),t}const Ai=({children:t,grid:e})=>{const{row:r,col:s,mobileRow:n,mobileCol:a}=e,{width:i}=Yl(),[o,u]=F.useState(""),[c,d]=F.useState("");return F.useEffect(()=>{i<=768?(u(n||r),d(a||s)):(u(r),d(s))},[i]),w.jsx("div",{style:{gridRow:o,gridColumn:c},children:t})};Ai.displayName="DsGridElement";const Di={Quark:"quark",Nano:"nano",ExtraSmall:"xs",Small:"sm",Medium:"md",Large:"lg"},as={Start:"start",End:"end",Center:"center",Stretch:"stretch",SpaceAround:"space-around",SpaceBetween:"space-between",SpaceEvenly:"space-evenly"},Ve={name:"Grid-Layout",class:"ds-grid-layout",props:{rows:{type:String,default:"auto",required:!0},gap:{type:String,default:Di.Small,options:Object.values(Di)},vGap:{type:Boolean,default:!0},hGap:{type:Boolean,default:!0},width:{type:String,default:""},height:{type:String,default:""},horizontalAlign:{type:String,default:as.Start,options:Object.values(as)},verticalAlign:{type:String,default:as.Start,options:Object.values(as)}}};function Ii(){const{innerWidth:t,innerHeight:e}=window;return{width:t,height:e}}function Xl(){const[t,e]=F.useState(Ii());return F.useEffect(()=>{function r(){e(Ii())}return window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[]),t}const is=({children:t,rows:e,gap:r,vGap:s,hGap:n,horizontalAlign:a,verticalAlign:i,width:o,height:u})=>{const c=s&&`${Ve.class}__v-gap--${r}`,d=n&&`${Ve.class}__h-gap--${r}`,p=a&&Ve.props.horizontalAlign.options.find(N=>N===a)?`${Ve.class}--h-${a}`:null,T=i&&Ve.props.verticalAlign.options.find(N=>N===i)?`${Ve.class}--v-${i}`:null,{width:S}=Xl(),[E,k]=F.useState("");F.useEffect(()=>{S<=768?k("6"):k("12")},[S]);const _=N=>/^[+-]?\d+$/.test(N),g=()=>e.split(",").map(D=>(D=D.trim(),D==="0"||D==="*"||D==="auto"?"auto":_(D)?D+"fr":D)).join(" "),I=()=>`repeat(${E.split(",").map(D=>(D=D.trim(),D==="0"||D==="*"||D==="auto"?"auto":(_(D),D))).join(" ")}, minmax(0, 1fr))`;return w.jsx("div",{className:[Ve.class,p,T,c,d].filter(N=>N).join(" "),style:{width:o,height:u,gridTemplateColumns:I(),gridTemplateRows:g()},children:t})};is.propTypes={children:h.oneOfType([h.arrayOf(h.node),h.node,h.func]),rows:h.string,gap:h.oneOf(Ve.props.gap.options),vGap:h.bool,hGap:h.bool,width:h.string,height:h.string,horizontalAlign:h.oneOf(Ve.props.horizontalAlign.options),verticalAlign:h.oneOf(Ve.props.verticalAlign.options)},is.defaultProps={rows:Ve.props.rows.default,gap:Ve.props.gap.default,vGap:Ve.props.vGap.default,hGap:Ve.props.hGap.default,width:Ve.props.width.default,height:Ve.props.height.default,horizontalAlign:Ve.props.horizontalAlign.default,verticalAlign:Ve.props.verticalAlign.default},is.displayName="DsGridLayout";const ir={None:"none",Quark:"quark",Nano:"nano",ExtraSmall:"xs",Small:"sm",Medium:"md",Large:"lg"},rt={name:"Wrapper",class:"ds-wrapper",props:{space:{type:String,default:ir.ExtraSmall,options:Object.values(ir)},top:{type:String,options:Object.values(ir)},right:{type:String,options:Object.values(ir)},bottom:{type:String,options:Object.values(ir)},left:{type:String,options:Object.values(ir)}}},Kt=({children:t,space:e=rt.props.space.default,top:r,right:s,bottom:n,left:a})=>{const i=r&&`${rt.class}__top--${r}`,o=s&&`${rt.class}__right--${s}`,u=n&&`${rt.class}__bottom--${n}`,c=a&&`${rt.class}__left--${a}`,d=e&&`${rt.class}--${e}`;return w.jsx("div",{className:[rt.class,i,o,u,c,d].filter(p=>p).join(" "),children:t})};Kt.propTypes={space:h.oneOf(rt.props.space.options||[]),top:h.oneOf(rt.props.top.options||[]),right:h.oneOf(rt.props.right.options||[]),bottom:h.oneOf(rt.props.bottom.options||[]),left:h.oneOf(rt.props.left.options||[])},Kt.displayName="DsWrapper";const sn={name:"Accordion",class:"ds-accordion",props:{openItemListIndex:{type:Boolean,default:!1},items:{type:Array,default:[]},activeItem:{type:Number,default:0}}},or={name:"AccordionItem",class:"ds-accordion-item",props:{title:{type:String,default:""},content:{type:String,default:""},disabled:{type:Boolean,default:!1},active:{type:Boolean,default:!1}}},nn=({title:t,content:e,className:r,onToggle:s,active:n=or.props.active.default,disabled:a=or.props.disabled.default})=>{const i=n&&`${or.class}--active`;return w.jsxs("li",{className:[or.class,i,r&&r].filter(o=>o).join(" "),children:[w.jsxs("button",{className:`${or.class}__button`,disabled:a,onClick:s,children:[t,w.jsx(Se,{className:`${or.class}__icon`,color:"neutral-90",image:"expand_more",size:"xl"})]}),n&&w.jsx("div",{className:"ds-accordion-item__content",children:e})]})};nn.propTypes={active:h.bool,title:h.oneOfType([h.element,h.string]),content:h.oneOfType([h.element,h.string]),className:h.string,disabled:h.bool},nn.displayName="DsAccordionItem";const an=({items:t=sn.props.items.default,activeItem:e=sn.props.activeItem.default,onClick:r})=>{const[s,n]=F.useState(-1);F.useEffect(()=>{t.map((i,o)=>{i.active&&n(o)})},[t]),F.useEffect(()=>{e!=null&&n(e)},[e]);const a=i=>{if(s===i)return r&&r(-1),n(-1);n(i),r&&r(i)};return w.jsx("ul",{className:sn.class,children:t.map((i,o)=>w.jsx(nn,{active:s===o,content:i.content,disabled:i.disabled,onToggle:()=>{a(o)},title:i.title},o))})};an.propTypes={items:h.array,activeItem:h.number},an.displayName="DsAccordion";const Ni=({title:t,activeTags:e,handleTagClose:r})=>w.jsx("div",{className:"active-tags",children:e.length>0&&w.jsxs(w.Fragment,{children:[w.jsx(At,{className:"active-tags--title",children:t}),w.jsx("div",{className:"active-tags-list",children:e.map((s,n)=>w.jsx(Ut,{text:`Filtro ${s.text} aplicado`,children:w.jsxs("div",{className:"active-tag","data-testid":`active-tag-${n}`,children:[w.jsxs(Dt,{alignItems:"center",gap:"nano",children:[w.jsx(Be,{children:w.jsx(Se,{className:"tag-icon","data-testid":`icon-${s.icon}-${n}`,fill:!0,image:s.icon})}),w.jsx(Be,{children:w.jsx(At,{className:"tag-text",type:"small",children:s.text})})]}),!s.hiddenClose&&w.jsx(Se,{"data-testid":`icon-close-${n}`,image:"close",onClick:()=>r(n)})]},n)},`ds-tooltip-key-${n}`))})]})});Ni.displayName="DsActiveTags";const Me={name:"EditableSelect",class:"ds-editable-select",props:{label:{type:String,default:""},name:{type:String,default:""},value:{type:String,default:""},noOptionsMessage:{type:String,default:"Nenhum resultado encontrado"},status:{type:String,default:""},options:{type:Array,default:[]},icon:{type:String,default:void 0},disabled:{type:Boolean,default:!1},description:{type:String,default:""},checked:{type:Boolean,default:!1},onChangeHandler:{type:Function,default:()=>{}},onBlurHandler:{type:Function,default:()=>{}},onFocusHandler:{type:Function,default:()=>{}},onSelectHandler:{type:Function,default:()=>{}},getOptionLabel:{type:Function,default:t=>t.name||""}}},on=({label:t=Me.props.label.default,name:e=Me.props.name.default,value:r=Me.props.value.default,options:s=Me.props.options.default,getOptionLabel:n=Me.props.getOptionLabel.default,onChangeHandler:a=Me.props.onChangeHandler.default,onSelectHandler:i=Me.props.onSelectHandler.default,icon:o=Me.props.icon.default,noOptionsMessage:u=Me.props.noOptionsMessage.default,disabled:c=Me.props.disabled.default,status:d=Me.props.status.default,onBlurHandler:p=Me.props.onBlurHandler.default,onFocusHandler:T=Me.props.onFocusHandler.default})=>{const[S,E]=F.useState(r),[k,_]=F.useState(!1),[g,I]=F.useState(r),N=L=>{E(L.currentTarget.value),a(L),L.currentTarget.value?_(!0):_(!1)},D=L=>{E(n(L)),i(L),I(Math.random().toString()),_(!1)};F.useEffect(()=>{p()},[S,p]);const b=()=>s.length>0?s.map((L,R)=>w.jsx("option",{className:`${Me.class}__list--option`,"data-testid":L.label?`${L.label}`:"",onClick:()=>!c&&D(L),value:R,children:n(L)},R)):w.jsx("option",{className:`${Me.class}__list--option not-found`,children:u},"no_option");return w.jsxs("div",{className:`${Me.class}__container`,children:[w.jsx(ar,{className:`${Me.class}__input`,disabled:c,label:t,name:e,onBlurHandler:p,onChangeHandler:N,onFocusHandler:T,status:d,value:S},g),o&&w.jsx(Se,{className:`${Me.class}__icon`,image:o,size:"lg"}),k&&w.jsx("div",{className:`${Me.class}__list--container`,children:b()})]})};on.propTypes={label:h.string,name:h.string,value:h.string,options:h.arrayOf(h.object),getOptionLabel:h.func,onChangeHandler:h.func,onSelectHandler:h.func,icon:h.string,noOptionsMessage:h.string,disabled:h.bool,status:h.string,onBlurHandler:h.func,onFocusHandler:h.func},on.displayName="DsEditableSelect";const Cr={name:"DsIndicator",class:"ds-indicator",props:{current:{type:Number,default:0},length:{type:Number,required:!0}}},Jl=({length:t,current:e=Cr.props.current.default})=>{const[r,s]=F.useState(e),n=i=>i<r?`${Cr.class}__step--older`:i===r?`${Cr.class}__step--active`:"";F.useEffect(()=>{s(e)},[e]);const a=[];for(let i=0;i<t;i++)a.push(w.jsx("div",{className:`${Cr.class}__step ${n(i)}`,"data-testid":`indicator-step-${i}`},i));return w.jsx("div",{className:Cr.class,children:a})},Zl={name:"DsInlineEditable",class:"ds-inline-editable",props:{name:{type:String,required:!0},value:{type:String,default:""},min:{type:String,default:""},max:{type:String,default:""},prefix:{type:String,default:""},suffix:{type:String,default:""},onChangeHandler:{type:Function,default:()=>{}}}},ln=({name:t,value:e,prefix:r,sufix:s,min:n,max:a,onChangeHandler:i})=>{const o=F.useRef(null),[u,c]=F.useState(!1),[d,p]=F.useState("");F.useEffect(()=>{p(e??"")},[e]);const T=_=>{_.key==="Enter"&&S(_)};function S(_){c(!1),i&&(n&&parseInt(n)>=parseInt(d===""?n:d)?(_.currentTarget.value=n,p(n)):a&&parseInt(a)<parseInt(d)?(_.currentTarget.value=a,p(a)):_.currentTarget.value=d,i(_))}const E=_=>{p(_.currentTarget.value)},k=async()=>{var _;await c(!0),(_=o.current)==null||_.focus()};return w.jsx("div",{className:Zl.class,children:u?w.jsx("input",{className:"ds-input__input",max:a,min:n,name:t,onBlur:S,onChange:E,onKeyDown:T,ref:o,type:"number",value:d}):w.jsx("div",{onClick:k,children:w.jsxs(Dt,{alignItems:"center",gap:"nano",children:[w.jsx(Be,{children:w.jsx(At,{children:w.jsxs("b",{children:[r,e,s]})})}),w.jsx(Be,{children:w.jsx(Se,{image:"edit_square"})})]})})})};ln.propTypes={value:h.string},ln.displayName="DsInlineEditable";const Ql=[1,2,3,4],Pi={Squared:"squared",Rounded:"rounded"},st={name:"Modal",class:"ds-modal",props:{elevation:{type:Number,options:Ql},variant:{type:String,default:Pi.Rounded,options:Object.values(Pi)},cancelBtnText:{type:String,default:"Cancelar"},confirmBtnText:{type:String,default:"Confirmar"},isModalOpen:{type:Boolean,default:!1}}},un=({className:t,title:e,content:r,cancelBtnText:s=st.props.cancelBtnText.default,confirmBtnText:n=st.props.confirmBtnText.default,variant:a=st.props.variant.default,elevation:i,isModalOpen:o=st.props.isModalOpen.default,onClose:u,onCancel:c,onConfirm:d,...p})=>{const T=a&&st.props.variant.options.find(_=>_===a)?`${st.class}--${a}`:`${st.class}--${st.props.variant.default}`,S=i&&`${st.class}--elevation-${i}`,E=d||c,k=F.useCallback(_=>{_.keyCode===27&&u()},[u]);return F.useEffect(()=>{if(window)return E||window.addEventListener("keyup",k),()=>{window.removeEventListener("keyup",k)}},[E,k]),o?w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"ds-modal-overlay",...p,onClick:()=>E?()=>{}:u()}),w.jsxs("div",{className:[st.class,T,S,t&&t].filter(_=>_).join(" "),"data-testid":"modal",children:[!E&&w.jsx("button",{className:"ds-modal__closeBtn","data-testid":"modal-close-button",onClick:u,children:w.jsx(Se,{image:"close",size:"lg"})}),w.jsxs("div",{className:"ds-modal__content",children:[w.jsx("div",{className:"ds-modal__content__title",children:e}),e&&w.jsx(lt,{vertical:"xxxs"}),w.jsx("div",{className:"ds-modal__content__content",children:r})]}),E&&w.jsx(lt,{vertical:"sm"}),!E&&w.jsx(lt,{vertical:"xxs"}),w.jsxs("div",{className:"ds-modal__cta",children:[c&&w.jsx(Sr,{onClick:()=>{u(),c()},children:s}),d&&w.jsx(Sr,{onClick:()=>{u(),d()},children:n})]})]})]}):null};un.propTypes={firstButtonText:h.string,confirmBtnText:h.string,cancelBtnText:h.string,variant:h.oneOf(st.props.variant.options),elevation:h.oneOf(st.props.elevation.options),isModalOpen:h.bool,title:h.node,content:h.node},un.displayName="DsModal";const Fi={Success:"success",Danger:"danger",Warning:"warning",Info:"info"},Mi={Rounded:"rounded",Squared:"squared"},Ue={name:"DsNotification",class:"ds-notification",props:{type:{type:String,default:Fi.Info,options:Object.values(Fi)},id:{type:String},autoClose:{type:Boolean,default:!1},autoCloseTimer:{type:Number,default:4e3},dismissible:{type:Boolean,default:!1},elevation:{type:Number,options:[1,2,3,4]},variant:{type:String,default:Mi.Rounded,options:Object.values(Mi)},progressBar:{type:Boolean,default:!0}}},eu={success:"check",danger:"error",warning:"warning",info:"info"},os=({className:t,type:e=Ue.props.type.default,variant:r=Ue.props.variant.default,id:s,children:n,message:a,autoClose:i=Ue.props.autoClose.default,autoCloseTimer:o=Ue.props.autoCloseTimer.default,dismissible:u=Ue.props.dismissible.default,elevation:c,progressBar:d=Ue.props.progressBar.default,handleClose:p})=>{const[T,S]=F.useState(o),[E,k]=F.useState(!1),[_,g]=F.useState(!0),I=[Ue.class,e&&`${Ue.class}--${e}`,r&&`${Ue.class}--${r}`,c&&`${Ue.class}--elevation-${c}`,t&&t].join(" ");F.useEffect(()=>{!i&&!u&&g(!0);let L;return!E&&i&&(L=setInterval(()=>{S(R=>(R===0&&g(!1),R-100))},100)),()=>{clearInterval(L)}},[E,i,o,_]);const N=()=>{k(!0)},D=()=>{k(!1)},b=L=>{g(!1),p&&p(L)};return _?w.jsxs("div",{className:I,id:s,onMouseEnter:N,onMouseLeave:D,children:[w.jsx(Kt,{bottom:"nano",top:"nano",children:w.jsxs(Dt,{alignItems:"center",flexWrap:"nowrap",gap:"xxxs",children:[w.jsx(Be,{children:w.jsx(Se,{color:e,fill:!0,image:eu[e]})}),w.jsx(Be,{flex:"1",children:w.jsx(Kt,{left:"none",right:"none",space:"nano",children:n??a})}),w.jsx(Be,{children:u?w.jsx("div",{className:`${Ue.class}__button`,onClick:L=>b(L),children:w.jsx(Kt,{children:w.jsx(Se,{image:"close"})})}):w.jsx(lt,{horizontal:"quark"})})]})}),d&&i&&w.jsx("div",{className:`${Ue.class}__progress-bar ${Ue.class}__progress-bar--${e}`,style:{width:`${T/o*100}%`}})]}):null};os.propTypes={type:h.oneOf(Ue.props.type.options),id:h.string,variant:h.oneOf(Ue.props.variant.options),message:h.node,autoClose:h.bool,autoCloseTimer:h.number,dismissible:h.bool,elevation:h.oneOf(Ue.props.elevation.options),progressBar:h.bool,handleClose:h.func},os.displayName="DsNotification";const cn={name:"DsPasswordConfirmation",class:"ds-password-confirmation",props:{onChange:{type:Function,default:()=>{}},validationList:{type:Array,default:[{title:"Um número",rule:t=>/\d/.test(t)},{title:"Uma letra maiúscula",rule:t=>/[A-Z]/.test(t)},{title:"Um caractere especial. Ex: @#!?",rule:t=>/[!@#$%^&*()+\-=_[\]{};':"\\|,.<>/?]/.test(t)},{title:"Mínimo 8 caracteres",rule:t=>t.length>=8}]},instructionLabel:{type:String,default:"A senha deverá conter:"}}},dn=({onChange:t=cn.props.onChange.default,validationList:e=cn.props.validationList.default,instructionLabel:r=cn.props.instructionLabel.default})=>{const[s,n]=F.useState(""),[a,i]=F.useState(""),[o,u]=F.useState([]),[c,d]=F.useState({score:0,color:"danger",label:"Fraca"}),[p,T]=F.useState(!1),S=D=>{const b=e.map(L=>L==null?void 0:L.rule(D));return u(b),b},E=D=>{var R,ee,K,ce;n((R=D.currentTarget)==null?void 0:R.value);const b=S((ee=D.currentTarget)==null?void 0:ee.value),L=I(b);t&&t({password:(K=D.currentTarget)==null?void 0:K.value,confirmationPassword:a,isEqual:a===((ce=D.currentTarget)==null?void 0:ce.value),feedback:L})},k=D=>{var R,ee,K;i((R=D.currentTarget)==null?void 0:R.value);const b=S(s),L=I(b);t&&t({password:s,confirmationPassword:(ee=D.currentTarget)==null?void 0:ee.value,isEqual:s===((K=D.currentTarget)==null?void 0:K.value),feedback:L})},_=F.useMemo(()=>s!==a&&p?{status:"error",feedback:"As senhas são diferentes"}:{status:"",feedback:""},[s,a,p]),g=D=>{const b={score:D,color:"danger",label:"Fraco"};return D>30&&D<=75&&(b.color="warning",b.label="Médio"),D>=75&&D<100&&(b.color="success",b.label="Boa"),D===100&&(b.color="success-dark",b.label="Forte"),b},I=D=>{const b=D.reduce((K,ce)=>{let U=K;return ce?(U++,U):K},0),L=D==null?void 0:D.length,R=b*100/L||0,ee=g(R);return d(ee),ee},N=()=>w.jsx("ul",{children:e.map((D,b)=>{const L=o[b]?"ds-password-confirmation__list":"ds-password-confirmation__list--disc";return w.jsxs("li",{className:L,children:[o[b]?w.jsx(Se,{color:"success-dark",image:"check"}):null,w.jsx(lt,{horizontal:"quark"}),w.jsx(At,{children:D.title})]},b+D.title)})});return w.jsxs(Dt,{className:"ds-password-confirmation",flexDirection:"column",children:[w.jsx(Be,{children:w.jsx(ar,{label:"Senha",name:"password",onChangeHandler:E,type:"password",value:s})}),w.jsx(Be,{children:w.jsx(Zs,{color:c==null?void 0:c.color,label:c==null?void 0:c.label,progress:c==null?void 0:c.score})}),w.jsx(Be,{children:w.jsx(At,{children:r})}),w.jsx(Be,{children:N()}),w.jsx(lt,{vertical:"xxxs"}),w.jsx(Be,{children:w.jsx(ar,{feedback:_.feedback,label:"Confirme a senha",name:"confirmPassword",onBlurHandler:()=>T(!0),onChangeHandler:k,onFocusHandler:()=>T(!0),status:_.status,type:"password",value:a})})]})};dn.propTypes={onChange:h.func,validationList:h.array.isRequired,instructionLabel:h.string},dn.displayName="DsPasswordConfirmation";const ut={name:"DsStepper",class:"ds-stepper",props:{steps:{type:Array,required:!0},selectedStep:{type:Number,default:0}}},ji=({steps:t,selectedStep:e=ut.props.selectedStep.default,onChange:r})=>{const[s,n]=F.useState(e),a=(i,o)=>{const u=[`${ut.class}__button`];return o!==i&&u.push(`${ut.class}__button--round`),t[i]&&t[i].disabled&&u.push(`${ut.class}__button--disabled`),u.join(" ")};return F.useEffect(()=>{n(e)},[e]),F.useEffect(()=>{r(s)},[s]),w.jsxs("div",{className:ut.class,children:[w.jsxs("span",{className:`${ut.class}__step-counter`,children:["Etapa ",s+1," de ",t==null?void 0:t.length]}),w.jsx("div",{className:`${ut.class}__step`,children:t.map((i,o)=>w.jsx("div",{className:`${ut.class}__content`,children:w.jsx("button",{className:a(o,s),disabled:i.disabled,onClick:()=>n(o),children:w.jsxs("span",{className:`${ut.class}__text`,children:[s===o?w.jsx(Kt,{bottom:"none",left:"nano",right:"nano",top:"none",children:w.jsx(Se,{className:`${ut.class}__icon`,fill:!0,image:i.icon})}):w.jsx(Se,{className:`${ut.class}__icon`,fill:!0,image:i.icon}),s===o&&i.label]})})},o))})]})};ji.displayName="DsStepper";const gt={name:"Table",class:"ds-table",props:{header:{type:Array,default:[]},items:{type:Array,default:[]},columns:{type:Array,default:[]}}},xi=({item:t,columns:e})=>w.jsx("tr",{className:`${gt.class}__row`,children:e.map((r,s)=>{const n=r.align&&`${gt.class}__cell--align-${r.align}`;return w.jsx("td",{children:w.jsx("div",{className:[`${gt.class}__cell`,n,r.className].filter(a=>a).join(" "),children:t&&t[`${r.name}`]})},s)})});xi.displayName="DsTableRow";const Vi=({columns:t,data:e,className:r})=>w.jsx("div",{className:`${gt.class}__wrapper`,children:w.jsxs("table",{className:[`${gt.class}`,r].filter(s=>s).join(" "),children:[w.jsx("thead",{className:`${gt.class}__head`,children:w.jsx("tr",{className:`${gt.class}__row`,children:t&&t.map((s,n)=>w.jsx("th",{style:{width:s.size},children:w.jsx("div",{className:[`${gt.class}__cell`,s.align&&`${gt.class}__cell--align-${s.align}`].filter(a=>a).join(" "),children:s.label})},n))})}),w.jsx("tbody",{className:`${gt.class}__body`,children:e&&e.map((s,n)=>w.jsx(xi,{columns:t,item:s},n))})]})});Vi.displayName="DsTable";const Bi={None:"",Primary:"primary",Secondary:"secondary",Neutral:"neutral",Success:"success",Warning:"warning",Danger:"danger",Info:"info"},jt={name:"DsTabs",class:"ds-tabs",props:{tabs:{type:Array,required:!0},selectedTab:{type:Number,default:0},color:{type:String,default:Bi.Primary,options:Object.values(Bi)},className:{type:String,default:""},onChange:{type:Function,default:()=>{}}}},tu=({active:t,className:e,color:r,disabled:s,name:n,index:a,title:i,onClick:o})=>{const u=[`${jt.class}__tab`,`${jt.class}__tab-color--${r}`,t&&`${jt.class}__tab--active`,s&&`${jt.class}__tab--disabled`,e&&e].join(" "),c=d=>{o&&!s&&o(d)};return w.jsx("div",{className:u,id:n,onClick:()=>c(a),children:i})},ru=({tabs:t,color:e,selectedTab:r=jt.props.selectedTab.default,className:s,onChange:n})=>{const[a,i]=F.useState(r),o=u=>{i(u),n&&n(u)};return F.useEffect(()=>i(r),[r]),w.jsxs("div",{className:[jt.class,s&&s].join(" "),children:[w.jsx("div",{className:`${jt.class}__header`,children:t.map((u,c)=>F.createElement(tu,{...u,active:a===c,color:e,index:c,key:c,onClick:()=>o(c)}))}),w.jsx("div",{className:`${jt.class}__content`,children:t[a].content})]})};function Li({library:t,children:e,theme:r}){return w.jsx("div",{"data-library":t,"data-theme":r,children:w.jsx("div",{className:"ds-theme",children:e})})}Li.propTypes={library:h.string,children:h.node.isRequired,theme:h.string};const Ri={TopLeft:"top-left",TopCenter:"top-center",TopRight:"top-right",BottomLeft:"bottom-left",BottomCenter:"bottom-center",BottomRight:"bottom-right"},Gt={name:"DsNotificationList",class:"ds-notification-list",props:{position:{type:String,default:Ri.TopRight,options:Object.values(Ri)},fluid:{type:Boolean,default:!1},className:{type:String,default:""}}},fn=({className:t=Gt.props.className.default,position:e=Gt.props.position.default,fluid:r=Gt.props.fluid.default,notifications:s,removeNotification:n})=>{const a=[Gt.class,e?`${Gt.class}--${e}`:"",r?`${Gt.class}--fluid`:"",t&&t].join(" "),i=o=>{n&&n(o)};return w.jsx("div",{className:a,children:s.map(o=>{const u=o.autoClose??!0,c=o.autoCloseTimer??4e3,d=o.dismissible??!0,p=o.elevation??2,T=o.progressBar??!0;return w.jsx(os,{autoClose:u,autoCloseTimer:c,dismissible:d,elevation:p,handleClose:()=>i(o.id),id:o.id,message:o.message,progressBar:T,type:o.type},o.id)})})};fn.propTypes={position:h.oneOf(Gt.props.position.options),fluid:h.bool,notifications:h.array,removeNotification:h.func},fn.displayName="DsNotificationList";const ls={name:"TwoColumns",class:"ds-two-columns",props:{}},pn=({header:t,main:e,sidebar:r,breadcrumb:s})=>w.jsxs(ns,{children:[w.jsxs("div",{className:"ds-grid",children:[w.jsx("div",{className:"ds-grid__row",children:w.jsx("div",{className:"ds-grid__col ds-grid__col-12",children:s})}),w.jsxs("div",{className:`${ls.class}__content ds-grid__row`,children:[w.jsx("div",{className:"ds-grid__col ds-grid__col--lg-8 ds-grid__col--sm-12 ds-grid__col-12",children:w.jsxs(w.Fragment,{children:[w.jsx("div",{className:`${ls.class}__header`,children:t}),w.jsx("div",{className:`${ls.class}__main`,children:e})]})}),w.jsx("div",{className:`${ls.class}__sidebar ds-grid__col ds-grid__col--lg-4 ds-grid__col--sm-12 ds-grid__col-12`,children:r})]})]}),w.jsx(lt,{vertical:"sm"})]});pn.propTypes={breadcrumb:h.node,header:h.node,main:h.node,sidebar:h.node},pn.displayName="DsTwoColumns";const zi=(t,e)=>{var r;return(r=t==null?void 0:t.errors)==null?void 0:r.reduce((s,n)=>(n.keyword==="errorMessage"||(s={...s,...su(n,e)}),s),{})},su=(t,e)=>{const{keyword:r,params:s}=t,n=nu(t==null?void 0:t.instancePath);let a="",i=e?e+"."+n:n;if(r.match(/min/)||r.match(/max/))return a=`Tamanho ${r.match(/min/)?"mínimo":"máximo"} de ${s==null?void 0:s.limit}`,i=hn(i),{[i]:{status:!1,message:a}};switch(r){case"required":a="Campo obrigatório",i=hn(i),i=i+"."+(s==null?void 0:s.missingProperty),i.split("")[0]==="."&&(i=i.replace(".",""));break;case"pattern":a="Insira o valor no formato correto";break;case"format":a=`Formato de ${s==null?void 0:s.format} invalido`;break;default:a="Preencha o dado corretamente";break}return i=hn(i),{[i]:{status:!1,message:a}}},nu=t=>{let e="";return t.split("")[0]==="/"&&(e=t.replace("/","")),e.replace(/\//g,".")},hn=t=>{const e=t.split("");return e[e.length-1]==="."?(e.pop(),e.join("")):t},qi=(t,e,r)=>{const s=e.pop(),n=e.reduce((a,i)=>(i in a||(a[i]={}),a[i]),t);s&&(n[s]=r)},Ui=t=>{try{return{isObj:!0,parsedObj:JSON.parse(t)}}catch{return{isObj:!1,parsedObj:void 0}}},au=t=>{const e=/^[0-9]+$/.test(t);if(t==="true"||t==="false")return JSON.parse(t);if(e)return Number(t);const{isObj:r,parsedObj:s}=Ui(t);return r&&s?s:t},mn=(t,e)=>{var n;if(!t)return null;if(t.$id===e)return t;const r=a=>{if(a)for(const i of Object.values(a)){const o=mn(i,e);if(o)return o}return null};return r(t.properties)||r(t.definitions)||r((n=t.schemas)==null?void 0:n.definitions)||mn(t.items,e)||null},gn=(t,e)=>{var s;const r=(e==null?void 0:e.definitions)||((s=e==null?void 0:e.schemas)==null?void 0:s.definitions);if(!r)return console.error('No definitions found within the schema root or inside the "schemas" key.'),null;for(const n of Object.values(r)){const a=mn(n,t);if(a)return a}return null},Hi=t=>{const e=t.format;return e!=="email"&&e!=="password"?"text":e};function Tr(t,e,r=new WeakSet){if(typeof t!="object"&&typeof e!="object")return Object.is(t,e);if(t===null&&e===null)return!0;if(typeof t!=typeof e)return!1;if(t===e||r.has(t)&&r.has(e))return!0;if(r.add(t),r.add(e),Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let s=0;s<t.length;s++)if(!Tr(t[s],e[s],r))return!1;return!0}if(Array.isArray(t)||Array.isArray(e)||Object.keys(t).length!==Object.keys(e).length)return!1;for(const[s,n]of Object.entries(t))if(!Object.prototype.hasOwnProperty.call(e,s)||!Tr(n,e[s],r))return!1;return!0}var yn={exports:{}},Ki={},ct={},lr={},Or={},le={},Ar={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(I){if(super(),!t.IDENTIFIER.test(I))throw new Error("CodeGen: name must be a valid identifier");this.str=I}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class s extends e{constructor(I){super(),this._items=typeof I=="string"?[I]:I}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const I=this._items[0];return I===""||I==='""'}get str(){var I;return(I=this._str)!==null&&I!==void 0?I:this._str=this._items.reduce((N,D)=>`${N}${D}`,"")}get names(){var I;return(I=this._names)!==null&&I!==void 0?I:this._names=this._items.reduce((N,D)=>(D instanceof r&&(N[D.str]=(N[D.str]||0)+1),N),{})}}t._Code=s,t.nil=new s("");function n(g,...I){const N=[g[0]];let D=0;for(;D<I.length;)o(N,I[D]),N.push(g[++D]);return new s(N)}t._=n;const a=new s("+");function i(g,...I){const N=[S(g[0])];let D=0;for(;D<I.length;)N.push(a),o(N,I[D]),N.push(a,S(g[++D]));return u(N),new s(N)}t.str=i;function o(g,I){I instanceof s?g.push(...I._items):I instanceof r?g.push(I):g.push(p(I))}t.addCodeArg=o;function u(g){let I=1;for(;I<g.length-1;){if(g[I]===a){const N=c(g[I-1],g[I+1]);if(N!==void 0){g.splice(I-1,3,N);continue}g[I++]="+"}I++}}function c(g,I){if(I==='""')return g;if(g==='""')return I;if(typeof g=="string")return I instanceof r||g[g.length-1]!=='"'?void 0:typeof I!="string"?`${g.slice(0,-1)}${I}"`:I[0]==='"'?g.slice(0,-1)+I.slice(1):void 0;if(typeof I=="string"&&I[0]==='"'&&!(g instanceof r))return`"${g}${I.slice(1)}`}function d(g,I){return I.emptyStr()?g:g.emptyStr()?I:i`${g}${I}`}t.strConcat=d;function p(g){return typeof g=="number"||typeof g=="boolean"||g===null?g:S(Array.isArray(g)?g.join(","):g)}function T(g){return new s(S(g))}t.stringify=T;function S(g){return JSON.stringify(g).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=S;function E(g){return typeof g=="string"&&t.IDENTIFIER.test(g)?new s(`.${g}`):n`[${g}]`}t.getProperty=E;function k(g){if(typeof g=="string"&&t.IDENTIFIER.test(g))return new s(`${g}`);throw new Error(`CodeGen: invalid export name: ${g}, use explicit $id name mapping`)}t.getEsmExportName=k;function _(g){return new s(g.toString())}t.regexpCode=_})(Ar);var vn={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=Ar;class r extends Error{constructor(c){super(`CodeGen: "code" for ${c} not defined`),this.value=c.value}}var s;(function(u){u[u.Started=0]="Started",u[u.Completed=1]="Completed"})(s||(t.UsedValueState=s={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class n{constructor({prefixes:c,parent:d}={}){this._names={},this._prefixes=c,this._parent=d}toName(c){return c instanceof e.Name?c:this.name(c)}name(c){return new e.Name(this._newName(c))}_newName(c){const d=this._names[c]||this._nameGroup(c);return`${c}${d.index++}`}_nameGroup(c){var d,p;if(!((p=(d=this._parent)===null||d===void 0?void 0:d._prefixes)===null||p===void 0)&&p.has(c)||this._prefixes&&!this._prefixes.has(c))throw new Error(`CodeGen: prefix "${c}" is not allowed in this scope`);return this._names[c]={prefix:c,index:0}}}t.Scope=n;class a extends e.Name{constructor(c,d){super(d),this.prefix=c}setValue(c,{property:d,itemIndex:p}){this.value=c,this.scopePath=(0,e._)`.${new e.Name(d)}[${p}]`}}t.ValueScopeName=a;const i=(0,e._)`\n`;class o extends n{constructor(c){super(c),this._values={},this._scope=c.scope,this.opts={...c,_n:c.lines?i:e.nil}}get(){return this._scope}name(c){return new a(c,this._newName(c))}value(c,d){var p;if(d.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const T=this.toName(c),{prefix:S}=T,E=(p=d.key)!==null&&p!==void 0?p:d.ref;let k=this._values[S];if(k){const I=k.get(E);if(I)return I}else k=this._values[S]=new Map;k.set(E,T);const _=this._scope[S]||(this._scope[S]=[]),g=_.length;return _[g]=d.ref,T.setValue(d,{property:S,itemIndex:g}),T}getValue(c,d){const p=this._values[c];if(p)return p.get(d)}scopeRefs(c,d=this._values){return this._reduceValues(d,p=>{if(p.scopePath===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return(0,e._)`${c}${p.scopePath}`})}scopeCode(c=this._values,d,p){return this._reduceValues(c,T=>{if(T.value===void 0)throw new Error(`CodeGen: name "${T}" has no value`);return T.value.code},d,p)}_reduceValues(c,d,p={},T){let S=e.nil;for(const E in c){const k=c[E];if(!k)continue;const _=p[E]=p[E]||new Map;k.forEach(g=>{if(_.has(g))return;_.set(g,s.Started);let I=d(g);if(I){const N=this.opts.es5?t.varKinds.var:t.varKinds.const;S=(0,e._)`${S}${N} ${g} = ${I};${this.opts._n}`}else if(I=T==null?void 0:T(g))S=(0,e._)`${S}${I}${this.opts._n}`;else throw new r(g);_.set(g,s.Completed)})}return S}}t.ValueScope=o})(vn),function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const e=Ar,r=vn;var s=Ar;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return s.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return s.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return s.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return s.Name}});var n=vn;Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return n.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return n.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return n.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return n.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class a{optimizeNodes(){return this}optimizeNames(l,f){return this}}class i extends a{constructor(l,f,v){super(),this.varKind=l,this.name=f,this.rhs=v}render({es5:l,_n:f}){const v=l?r.varKinds.var:this.varKind,P=this.rhs===void 0?"":` = ${this.rhs}`;return`${v} ${this.name}${P};`+f}optimizeNames(l,f){if(l[this.name.str])return this.rhs&&(this.rhs=W(this.rhs,l,f)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class o extends a{constructor(l,f,v){super(),this.lhs=l,this.rhs=f,this.sideEffects=v}render({_n:l}){return`${this.lhs} = ${this.rhs};`+l}optimizeNames(l,f){if(!(this.lhs instanceof e.Name&&!l[this.lhs.str]&&!this.sideEffects))return this.rhs=W(this.rhs,l,f),this}get names(){const l=this.lhs instanceof e.Name?{}:{...this.lhs.names};return ne(l,this.rhs)}}class u extends o{constructor(l,f,v,P){super(l,v,P),this.op=f}render({_n:l}){return`${this.lhs} ${this.op}= ${this.rhs};`+l}}class c extends a{constructor(l){super(),this.label=l,this.names={}}render({_n:l}){return`${this.label}:`+l}}class d extends a{constructor(l){super(),this.label=l,this.names={}}render({_n:l}){return`break${this.label?` ${this.label}`:""};`+l}}class p extends a{constructor(l){super(),this.error=l}render({_n:l}){return`throw ${this.error};`+l}get names(){return this.error.names}}class T extends a{constructor(l){super(),this.code=l}render({_n:l}){return`${this.code};`+l}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(l,f){return this.code=W(this.code,l,f),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class S extends a{constructor(l=[]){super(),this.nodes=l}render(l){return this.nodes.reduce((f,v)=>f+v.render(l),"")}optimizeNodes(){const{nodes:l}=this;let f=l.length;for(;f--;){const v=l[f].optimizeNodes();Array.isArray(v)?l.splice(f,1,...v):v?l[f]=v:l.splice(f,1)}return l.length>0?this:void 0}optimizeNames(l,f){const{nodes:v}=this;let P=v.length;for(;P--;){const V=v[P];V.optimizeNames(l,f)||(he(l,V.names),v.splice(P,1))}return v.length>0?this:void 0}get names(){return this.nodes.reduce((l,f)=>G(l,f.names),{})}}class E extends S{render(l){return"{"+l._n+super.render(l)+"}"+l._n}}class k extends S{}class _ extends E{}_.kind="else";class g extends E{constructor(l,f){super(f),this.condition=l}render(l){let f=`if(${this.condition})`+super.render(l);return this.else&&(f+="else "+this.else.render(l)),f}optimizeNodes(){super.optimizeNodes();const l=this.condition;if(l===!0)return this.nodes;let f=this.else;if(f){const v=f.optimizeNodes();f=this.else=Array.isArray(v)?new _(v):v}if(f)return l===!1?f instanceof g?f:f.nodes:this.nodes.length?this:new g(me(l),f instanceof g?[f]:f.nodes);if(!(l===!1||!this.nodes.length))return this}optimizeNames(l,f){var v;if(this.else=(v=this.else)===null||v===void 0?void 0:v.optimizeNames(l,f),!!(super.optimizeNames(l,f)||this.else))return this.condition=W(this.condition,l,f),this}get names(){const l=super.names;return ne(l,this.condition),this.else&&G(l,this.else.names),l}}g.kind="if";class I extends E{}I.kind="for";class N extends I{constructor(l){super(),this.iteration=l}render(l){return`for(${this.iteration})`+super.render(l)}optimizeNames(l,f){if(super.optimizeNames(l,f))return this.iteration=W(this.iteration,l,f),this}get names(){return G(super.names,this.iteration.names)}}class D extends I{constructor(l,f,v,P){super(),this.varKind=l,this.name=f,this.from=v,this.to=P}render(l){const f=l.es5?r.varKinds.var:this.varKind,{name:v,from:P,to:V}=this;return`for(${f} ${v}=${P}; ${v}<${V}; ${v}++)`+super.render(l)}get names(){const l=ne(super.names,this.from);return ne(l,this.to)}}class b extends I{constructor(l,f,v,P){super(),this.loop=l,this.varKind=f,this.name=v,this.iterable=P}render(l){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(l)}optimizeNames(l,f){if(super.optimizeNames(l,f))return this.iterable=W(this.iterable,l,f),this}get names(){return G(super.names,this.iterable.names)}}class L extends E{constructor(l,f,v){super(),this.name=l,this.args=f,this.async=v}render(l){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(l)}}L.kind="func";class R extends S{render(l){return"return "+super.render(l)}}R.kind="return";class ee extends E{render(l){let f="try"+super.render(l);return this.catch&&(f+=this.catch.render(l)),this.finally&&(f+=this.finally.render(l)),f}optimizeNodes(){var l,f;return super.optimizeNodes(),(l=this.catch)===null||l===void 0||l.optimizeNodes(),(f=this.finally)===null||f===void 0||f.optimizeNodes(),this}optimizeNames(l,f){var v,P;return super.optimizeNames(l,f),(v=this.catch)===null||v===void 0||v.optimizeNames(l,f),(P=this.finally)===null||P===void 0||P.optimizeNames(l,f),this}get names(){const l=super.names;return this.catch&&G(l,this.catch.names),this.finally&&G(l,this.finally.names),l}}class K extends E{constructor(l){super(),this.error=l}render(l){return`catch(${this.error})`+super.render(l)}}K.kind="catch";class ce extends E{render(l){return"finally"+super.render(l)}}ce.kind="finally";class U{constructor(l,f={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...f,_n:f.lines?`
|
|
21
|
-
`:""},this._extScope=l,this._scope=new r.Scope({parent:l}),this._nodes=[new k]}toString(){return this._root.render(this.opts)}name(l){return this._scope.name(l)}scopeName(l){return this._extScope.name(l)}scopeValue(l,f){const v=this._extScope.value(l,f);return(this._values[v.prefix]||(this._values[v.prefix]=new Set)).add(v),v}getScopeValue(l,f){return this._extScope.getValue(l,f)}scopeRefs(l){return this._extScope.scopeRefs(l,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(l,f,v,P){const V=this._scope.toName(f);return v!==void 0&&P&&(this._constants[V.str]=v),this._leafNode(new i(l,V,v)),V}const(l,f,v){return this._def(r.varKinds.const,l,f,v)}let(l,f,v){return this._def(r.varKinds.let,l,f,v)}var(l,f,v){return this._def(r.varKinds.var,l,f,v)}assign(l,f,v){return this._leafNode(new o(l,f,v))}add(l,f){return this._leafNode(new u(l,t.operators.ADD,f))}code(l){return typeof l=="function"?l():l!==e.nil&&this._leafNode(new T(l)),this}object(...l){const f=["{"];for(const[v,P]of l)f.length>1&&f.push(","),f.push(v),(v!==P||this.opts.es5)&&(f.push(":"),(0,e.addCodeArg)(f,P));return f.push("}"),new e._Code(f)}if(l,f,v){if(this._blockNode(new g(l)),f&&v)this.code(f).else().code(v).endIf();else if(f)this.code(f).endIf();else if(v)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(l){return this._elseNode(new g(l))}else(){return this._elseNode(new _)}endIf(){return this._endBlockNode(g,_)}_for(l,f){return this._blockNode(l),f&&this.code(f).endFor(),this}for(l,f){return this._for(new N(l),f)}forRange(l,f,v,P,V=this.opts.es5?r.varKinds.var:r.varKinds.let){const B=this._scope.toName(l);return this._for(new D(V,B,f,v),()=>P(B))}forOf(l,f,v,P=r.varKinds.const){const V=this._scope.toName(l);if(this.opts.es5){const B=f instanceof e.Name?f:this.var("_arr",f);return this.forRange("_i",0,(0,e._)`${B}.length`,z=>{this.var(V,(0,e._)`${B}[${z}]`),v(V)})}return this._for(new b("of",P,V,f),()=>v(V))}forIn(l,f,v,P=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(l,(0,e._)`Object.keys(${f})`,v);const V=this._scope.toName(l);return this._for(new b("in",P,V,f),()=>v(V))}endFor(){return this._endBlockNode(I)}label(l){return this._leafNode(new c(l))}break(l){return this._leafNode(new d(l))}return(l){const f=new R;if(this._blockNode(f),this.code(l),f.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(R)}try(l,f,v){if(!f&&!v)throw new Error('CodeGen: "try" without "catch" and "finally"');const P=new ee;if(this._blockNode(P),this.code(l),f){const V=this.name("e");this._currNode=P.catch=new K(V),f(V)}return v&&(this._currNode=P.finally=new ce,this.code(v)),this._endBlockNode(K,ce)}throw(l){return this._leafNode(new p(l))}block(l,f){return this._blockStarts.push(this._nodes.length),l&&this.code(l).endBlock(f),this}endBlock(l){const f=this._blockStarts.pop();if(f===void 0)throw new Error("CodeGen: not in self-balancing block");const v=this._nodes.length-f;if(v<0||l!==void 0&&v!==l)throw new Error(`CodeGen: wrong number of nodes: ${v} vs ${l} expected`);return this._nodes.length=f,this}func(l,f=e.nil,v,P){return this._blockNode(new L(l,f,v)),P&&this.code(P).endFunc(),this}endFunc(){return this._endBlockNode(L)}optimize(l=1){for(;l-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(l){return this._currNode.nodes.push(l),this}_blockNode(l){this._currNode.nodes.push(l),this._nodes.push(l)}_endBlockNode(l,f){const v=this._currNode;if(v instanceof l||f&&v instanceof f)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${f?`${l.kind}/${f.kind}`:l.kind}"`)}_elseNode(l){const f=this._currNode;if(!(f instanceof g))throw new Error('CodeGen: "else" without "if"');return this._currNode=f.else=l,this}get _root(){return this._nodes[0]}get _currNode(){const l=this._nodes;return l[l.length-1]}set _currNode(l){const f=this._nodes;f[f.length-1]=l}}t.CodeGen=U;function G(O,l){for(const f in l)O[f]=(O[f]||0)+(l[f]||0);return O}function ne(O,l){return l instanceof e._CodeOrName?G(O,l.names):O}function W(O,l,f){if(O instanceof e.Name)return v(O);if(!P(O))return O;return new e._Code(O._items.reduce((V,B)=>(B instanceof e.Name&&(B=v(B)),B instanceof e._Code?V.push(...B._items):V.push(B),V),[]));function v(V){const B=f[V.str];return B===void 0||l[V.str]!==1?V:(delete l[V.str],B)}function P(V){return V instanceof e._Code&&V._items.some(B=>B instanceof e.Name&&l[B.str]===1&&f[B.str]!==void 0)}}function he(O,l){for(const f in l)O[f]=(O[f]||0)-(l[f]||0)}function me(O){return typeof O=="boolean"||typeof O=="number"||O===null?!O:(0,e._)`!${M(O)}`}t.not=me;const ve=y(t.operators.AND);function De(...O){return O.reduce(ve)}t.and=De;const Pe=y(t.operators.OR);function A(...O){return O.reduce(Pe)}t.or=A;function y(O){return(l,f)=>l===e.nil?f:f===e.nil?l:(0,e._)`${M(l)} ${O} ${M(f)}`}function M(O){return O instanceof e.Name?O:(0,e._)`(${O})`}}(le);var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.checkStrictMode=H.getErrorPath=H.Type=H.useFunc=H.setEvaluated=H.evaluatedPropsToName=H.mergeEvaluated=H.eachItem=H.unescapeJsonPointer=H.escapeJsonPointer=H.escapeFragment=H.unescapeFragment=H.schemaRefOrVal=H.schemaHasRulesButRef=H.schemaHasRules=H.checkUnknownRules=H.alwaysValidSchema=H.toHash=void 0;const be=le,iu=Ar;function ou(t){const e={};for(const r of t)e[r]=!0;return e}H.toHash=ou;function lu(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Gi(t,e),!Wi(e,t.self.RULES.all))}H.alwaysValidSchema=lu;function Gi(t,e=t.schema){const{opts:r,self:s}=t;if(!r.strictSchema||typeof e=="boolean")return;const n=s.RULES.keywords;for(const a in e)n[a]||Qi(t,`unknown keyword: "${a}"`)}H.checkUnknownRules=Gi;function Wi(t,e){if(typeof t=="boolean")return!t;for(const r in t)if(e[r])return!0;return!1}H.schemaHasRules=Wi;function uu(t,e){if(typeof t=="boolean")return!t;for(const r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}H.schemaHasRulesButRef=uu;function cu({topSchemaRef:t,schemaPath:e},r,s,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,be._)`${r}`}return(0,be._)`${t}${e}${(0,be.getProperty)(s)}`}H.schemaRefOrVal=cu;function du(t){return Yi(decodeURIComponent(t))}H.unescapeFragment=du;function fu(t){return encodeURIComponent(_n(t))}H.escapeFragment=fu;function _n(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}H.escapeJsonPointer=_n;function Yi(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}H.unescapeJsonPointer=Yi;function pu(t,e){if(Array.isArray(t))for(const r of t)e(r);else e(t)}H.eachItem=pu;function Xi({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:s}){return(n,a,i,o)=>{const u=i===void 0?a:i instanceof be.Name?(a instanceof be.Name?t(n,a,i):e(n,a,i),i):a instanceof be.Name?(e(n,i,a),a):r(a,i);return o===be.Name&&!(u instanceof be.Name)?s(n,u):u}}H.mergeEvaluated={props:Xi({mergeNames:(t,e,r)=>t.if((0,be._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,be._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,be._)`${r} || {}`).code((0,be._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,be._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,be._)`${r} || {}`),bn(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:Ji}),items:Xi({mergeNames:(t,e,r)=>t.if((0,be._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,be._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,be._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,be._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function Ji(t,e){if(e===!0)return t.var("props",!0);const r=t.var("props",(0,be._)`{}`);return e!==void 0&&bn(t,r,e),r}H.evaluatedPropsToName=Ji;function bn(t,e,r){Object.keys(r).forEach(s=>t.assign((0,be._)`${e}${(0,be.getProperty)(s)}`,!0))}H.setEvaluated=bn;const Zi={};function hu(t,e){return t.scopeValue("func",{ref:e,code:Zi[e.code]||(Zi[e.code]=new iu._Code(e.code))})}H.useFunc=hu;var $n;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})($n||(H.Type=$n={}));function mu(t,e,r){if(t instanceof be.Name){const s=e===$n.Num;return r?s?(0,be._)`"[" + ${t} + "]"`:(0,be._)`"['" + ${t} + "']"`:s?(0,be._)`"/" + ${t}`:(0,be._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,be.getProperty)(t).toString():"/"+_n(t)}H.getErrorPath=mu;function Qi(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}H.checkStrictMode=Qi;var yt={};Object.defineProperty(yt,"__esModule",{value:!0});const He=le,gu={data:new He.Name("data"),valCxt:new He.Name("valCxt"),instancePath:new He.Name("instancePath"),parentData:new He.Name("parentData"),parentDataProperty:new He.Name("parentDataProperty"),rootData:new He.Name("rootData"),dynamicAnchors:new He.Name("dynamicAnchors"),vErrors:new He.Name("vErrors"),errors:new He.Name("errors"),this:new He.Name("this"),self:new He.Name("self"),scope:new He.Name("scope"),json:new He.Name("json"),jsonPos:new He.Name("jsonPos"),jsonLen:new He.Name("jsonLen"),jsonPart:new He.Name("jsonPart")};yt.default=gu,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const e=le,r=H,s=yt;t.keywordError={message:({keyword:_})=>(0,e.str)`must pass "${_}" keyword validation`},t.keyword$DataError={message:({keyword:_,schemaType:g})=>g?(0,e.str)`"${_}" keyword must be ${g} ($data)`:(0,e.str)`"${_}" keyword is invalid ($data)`};function n(_,g=t.keywordError,I,N){const{it:D}=_,{gen:b,compositeRule:L,allErrors:R}=D,ee=p(_,g,I);N??(L||R)?u(b,ee):c(D,(0,e._)`[${ee}]`)}t.reportError=n;function a(_,g=t.keywordError,I){const{it:N}=_,{gen:D,compositeRule:b,allErrors:L}=N,R=p(_,g,I);u(D,R),b||L||c(N,s.default.vErrors)}t.reportExtraError=a;function i(_,g){_.assign(s.default.errors,g),_.if((0,e._)`${s.default.vErrors} !== null`,()=>_.if(g,()=>_.assign((0,e._)`${s.default.vErrors}.length`,g),()=>_.assign(s.default.vErrors,null)))}t.resetErrorsCount=i;function o({gen:_,keyword:g,schemaValue:I,data:N,errsCount:D,it:b}){if(D===void 0)throw new Error("ajv implementation error");const L=_.name("err");_.forRange("i",D,s.default.errors,R=>{_.const(L,(0,e._)`${s.default.vErrors}[${R}]`),_.if((0,e._)`${L}.instancePath === undefined`,()=>_.assign((0,e._)`${L}.instancePath`,(0,e.strConcat)(s.default.instancePath,b.errorPath))),_.assign((0,e._)`${L}.schemaPath`,(0,e.str)`${b.errSchemaPath}/${g}`),b.opts.verbose&&(_.assign((0,e._)`${L}.schema`,I),_.assign((0,e._)`${L}.data`,N))})}t.extendErrors=o;function u(_,g){const I=_.const("err",g);_.if((0,e._)`${s.default.vErrors} === null`,()=>_.assign(s.default.vErrors,(0,e._)`[${I}]`),(0,e._)`${s.default.vErrors}.push(${I})`),_.code((0,e._)`${s.default.errors}++`)}function c(_,g){const{gen:I,validateName:N,schemaEnv:D}=_;D.$async?I.throw((0,e._)`new ${_.ValidationError}(${g})`):(I.assign((0,e._)`${N}.errors`,g),I.return(!1))}const d={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function p(_,g,I){const{createErrors:N}=_.it;return N===!1?(0,e._)`{}`:T(_,g,I)}function T(_,g,I={}){const{gen:N,it:D}=_,b=[S(D,I),E(_,I)];return k(_,g,b),N.object(...b)}function S({errorPath:_},{instancePath:g}){const I=g?(0,e.str)`${_}${(0,r.getErrorPath)(g,r.Type.Str)}`:_;return[s.default.instancePath,(0,e.strConcat)(s.default.instancePath,I)]}function E({keyword:_,it:{errSchemaPath:g}},{schemaPath:I,parentSchema:N}){let D=N?g:(0,e.str)`${g}/${_}`;return I&&(D=(0,e.str)`${D}${(0,r.getErrorPath)(I,r.Type.Str)}`),[d.schemaPath,D]}function k(_,{params:g,message:I},N){const{keyword:D,data:b,schemaValue:L,it:R}=_,{opts:ee,propertyName:K,topSchemaRef:ce,schemaPath:U}=R;N.push([d.keyword,D],[d.params,typeof g=="function"?g(_):g||(0,e._)`{}`]),ee.messages&&N.push([d.message,typeof I=="function"?I(_):I]),ee.verbose&&N.push([d.schema,L],[d.parentSchema,(0,e._)`${ce}${U}`],[s.default.data,b]),K&&N.push([d.propertyName,K])}}(Or),Object.defineProperty(lr,"__esModule",{value:!0}),lr.boolOrEmptySchema=lr.topBoolOrEmptySchema=void 0;const yu=Or,vu=le,_u=yt,bu={message:"boolean schema is false"};function $u(t){const{gen:e,schema:r,validateName:s}=t;r===!1?eo(t,!1):typeof r=="object"&&r.$async===!0?e.return(_u.default.data):(e.assign((0,vu._)`${s}.errors`,null),e.return(!0))}lr.topBoolOrEmptySchema=$u;function Su(t,e){const{gen:r,schema:s}=t;s===!1?(r.var(e,!1),eo(t)):r.var(e,!0)}lr.boolOrEmptySchema=Su;function eo(t,e){const{gen:r,data:s}=t,n={gen:r,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,yu.reportError)(n,bu,void 0,e)}var je={},Wt={};Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.getRules=Wt.isJSONType=void 0;const Eu=["string","number","integer","boolean","null","object","array"],ku=new Set(Eu);function wu(t){return typeof t=="string"&&ku.has(t)}Wt.isJSONType=wu;function Cu(){const t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}Wt.getRules=Cu;var It={};Object.defineProperty(It,"__esModule",{value:!0}),It.shouldUseRule=It.shouldUseGroup=It.schemaHasRulesForType=void 0;function Tu({schema:t,self:e},r){const s=e.RULES.types[r];return s&&s!==!0&&to(t,s)}It.schemaHasRulesForType=Tu;function to(t,e){return e.rules.some(r=>ro(t,r))}It.shouldUseGroup=to;function ro(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(s=>t[s]!==void 0))}It.shouldUseRule=ro,Object.defineProperty(je,"__esModule",{value:!0}),je.reportTypeError=je.checkDataTypes=je.checkDataType=je.coerceAndCheckDataType=je.getJSONTypes=je.getSchemaTypes=je.DataType=void 0;const Ou=Wt,Au=It,Du=Or,ie=le,so=H;var ur;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(ur||(je.DataType=ur={}));function Iu(t){const e=no(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}je.getSchemaTypes=Iu;function no(t){const e=Array.isArray(t)?t:t?[t]:[];if(e.every(Ou.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}je.getJSONTypes=no;function Nu(t,e){const{gen:r,data:s,opts:n}=t,a=Pu(e,n.coerceTypes),i=e.length>0&&!(a.length===0&&e.length===1&&(0,Au.schemaHasRulesForType)(t,e[0]));if(i){const o=En(e,s,n.strictNumbers,ur.Wrong);r.if(o,()=>{a.length?Fu(t,e,a):kn(t)})}return i}je.coerceAndCheckDataType=Nu;const ao=new Set(["string","number","integer","boolean","null"]);function Pu(t,e){return e?t.filter(r=>ao.has(r)||e==="array"&&r==="array"):[]}function Fu(t,e,r){const{gen:s,data:n,opts:a}=t,i=s.let("dataType",(0,ie._)`typeof ${n}`),o=s.let("coerced",(0,ie._)`undefined`);a.coerceTypes==="array"&&s.if((0,ie._)`${i} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>s.assign(n,(0,ie._)`${n}[0]`).assign(i,(0,ie._)`typeof ${n}`).if(En(e,n,a.strictNumbers),()=>s.assign(o,n))),s.if((0,ie._)`${o} !== undefined`);for(const c of r)(ao.has(c)||c==="array"&&a.coerceTypes==="array")&&u(c);s.else(),kn(t),s.endIf(),s.if((0,ie._)`${o} !== undefined`,()=>{s.assign(n,o),Mu(t,o)});function u(c){switch(c){case"string":s.elseIf((0,ie._)`${i} == "number" || ${i} == "boolean"`).assign(o,(0,ie._)`"" + ${n}`).elseIf((0,ie._)`${n} === null`).assign(o,(0,ie._)`""`);return;case"number":s.elseIf((0,ie._)`${i} == "boolean" || ${n} === null
|
|
19
|
+
*/var Ms,ka;function wl(){if(ka)return Ms;ka=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function s(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function n(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var i={},o=0;o<10;o++)i["_"+String.fromCharCode(o)]=o;var u=Object.getOwnPropertyNames(i).map(function(d){return i[d]});if(u.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(d){c[d]=d}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ms=n()?Object.assign:function(a,i){for(var o,u=s(a),c,d=1;d<arguments.length;d++){o=Object(arguments[d]);for(var p in o)e.call(o,p)&&(u[p]=o[p]);if(t){c=t(o);for(var T=0;T<c.length;T++)r.call(o,c[T])&&(u[c[T]]=o[c[T]])}}return u},Ms}var js,wa;function xs(){if(wa)return js;wa=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return js=t,js}var Vs,Ca;function Ta(){return Ca||(Ca=1,Vs=Function.call.bind(Object.prototype.hasOwnProperty)),Vs}var Bs,Oa;function Cl(){if(Oa)return Bs;Oa=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=xs(),r={},s=Ta();t=function(a){var i="Warning: "+a;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function n(a,i,o,u,c){if(process.env.NODE_ENV!=="production"){for(var d in a)if(s(a,d)){var p;try{if(typeof a[d]!="function"){var T=Error((u||"React class")+": "+o+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw T.name="Invariant Violation",T}p=a[d](i,d,u,o,null,e)}catch(k){p=k}if(p&&!(p instanceof Error)&&t((u||"React class")+": type specification of "+o+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof p+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),p instanceof Error&&!(p.message in r)){r[p.message]=!0;var E=c?c():"";t("Failed "+o+" type: "+p.message+(E??""))}}}}return n.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Bs=n,Bs}var Ls,Aa;function Tl(){if(Aa)return Ls;Aa=1;var t=Ea(),e=wl(),r=xs(),s=Ta(),n=Cl(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(o){var u="Warning: "+o;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function i(){return null}return Ls=function(o,u){var c=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function p(A){var y=A&&(c&&A[c]||A[d]);if(typeof y=="function")return y}var T="<<anonymous>>",E={array:g("array"),bigint:g("bigint"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:D(),arrayOf:N,element:I(),elementType:b(),instanceOf:R,node:oe(),objectOf:ee,oneOf:L,oneOfType:U,shape:G,exact:ne};function k(A,y){return A===y?A!==0||1/A===1/y:A!==A&&y!==y}function S(A,y){this.message=A,this.data=y&&typeof y=="object"?y:{},this.stack=""}S.prototype=Error.prototype;function _(A){if(process.env.NODE_ENV!=="production")var y={},M=0;function O(f,v,P,V,B,z,te){if(V=V||T,z=z||P,te!==r){if(u){var q=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw q.name="Invariant Violation",q}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var pe=V+":"+P;!y[pe]&&M<3&&(a("You are manually calling a React.PropTypes validation function for the `"+z+"` prop on `"+V+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),y[pe]=!0,M++)}}return v[P]==null?f?v[P]===null?new S("The "+B+" `"+z+"` is marked as required "+("in `"+V+"`, but its value is `null`.")):new S("The "+B+" `"+z+"` is marked as required in "+("`"+V+"`, but its value is `undefined`.")):null:A(v,P,V,B,z)}var l=O.bind(null,!1);return l.isRequired=O.bind(null,!0),l}function g(A){function y(M,O,l,f,v,P){var V=M[O],B=me(V);if(B!==A){var z=_e(V);return new S("Invalid "+f+" `"+v+"` of type "+("`"+z+"` supplied to `"+l+"`, expected ")+("`"+A+"`."),{expectedType:A})}return null}return _(y)}function D(){return _(i)}function N(A){function y(M,O,l,f,v){if(typeof A!="function")return new S("Property `"+v+"` of component `"+l+"` has invalid PropType notation inside arrayOf.");var P=M[O];if(!Array.isArray(P)){var V=me(P);return new S("Invalid "+f+" `"+v+"` of type "+("`"+V+"` supplied to `"+l+"`, expected an array."))}for(var B=0;B<P.length;B++){var z=A(P,B,l,f,v+"["+B+"]",r);if(z instanceof Error)return z}return null}return _(y)}function I(){function A(y,M,O,l,f){var v=y[M];if(!o(v)){var P=me(v);return new S("Invalid "+l+" `"+f+"` of type "+("`"+P+"` supplied to `"+O+"`, expected a single ReactElement."))}return null}return _(A)}function b(){function A(y,M,O,l,f){var v=y[M];if(!t.isValidElementType(v)){var P=me(v);return new S("Invalid "+l+" `"+f+"` of type "+("`"+P+"` supplied to `"+O+"`, expected a single ReactElement type."))}return null}return _(A)}function R(A){function y(M,O,l,f,v){if(!(M[O]instanceof A)){var P=A.name||T,V=Fe(M[O]);return new S("Invalid "+f+" `"+v+"` of type "+("`"+V+"` supplied to `"+l+"`, expected ")+("instance of `"+P+"`."))}return null}return _(y)}function L(A){if(!Array.isArray(A))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),i;function y(M,O,l,f,v){for(var P=M[O],V=0;V<A.length;V++)if(k(P,A[V]))return null;var B=JSON.stringify(A,function(te,q){var pe=_e(q);return pe==="symbol"?String(q):q});return new S("Invalid "+f+" `"+v+"` of value `"+String(P)+"` "+("supplied to `"+l+"`, expected one of "+B+"."))}return _(y)}function ee(A){function y(M,O,l,f,v){if(typeof A!="function")return new S("Property `"+v+"` of component `"+l+"` has invalid PropType notation inside objectOf.");var P=M[O],V=me(P);if(V!=="object")return new S("Invalid "+f+" `"+v+"` of type "+("`"+V+"` supplied to `"+l+"`, expected an object."));for(var B in P)if(s(P,B)){var z=A(P,B,l,f,v+"."+B,r);if(z instanceof Error)return z}return null}return _(y)}function U(A){if(!Array.isArray(A))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var y=0;y<A.length;y++){var M=A[y];if(typeof M!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Ie(M)+" at index "+y+"."),i}function O(l,f,v,P,V){for(var B=[],z=0;z<A.length;z++){var te=A[z],q=te(l,f,v,P,V,r);if(q==null)return null;q.data&&s(q.data,"expectedType")&&B.push(q.data.expectedType)}var pe=B.length>0?", expected one of type ["+B.join(", ")+"]":"";return new S("Invalid "+P+" `"+V+"` supplied to "+("`"+v+"`"+pe+"."))}return _(O)}function oe(){function A(y,M,O,l,f){return W(y[M])?null:new S("Invalid "+l+" `"+f+"` supplied to "+("`"+O+"`, expected a ReactNode."))}return _(A)}function H(A,y,M,O,l){return new S((A||"React class")+": "+y+" type `"+M+"."+O+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+l+"`.")}function G(A){function y(M,O,l,f,v){var P=M[O],V=me(P);if(V!=="object")return new S("Invalid "+f+" `"+v+"` of type `"+V+"` "+("supplied to `"+l+"`, expected `object`."));for(var B in A){var z=A[B];if(typeof z!="function")return H(l,f,v,B,_e(z));var te=z(P,B,l,f,v+"."+B,r);if(te)return te}return null}return _(y)}function ne(A){function y(M,O,l,f,v){var P=M[O],V=me(P);if(V!=="object")return new S("Invalid "+f+" `"+v+"` of type `"+V+"` "+("supplied to `"+l+"`, expected `object`."));var B=e({},M[O],A);for(var z in B){var te=A[z];if(s(A,z)&&typeof te!="function")return H(l,f,v,z,_e(te));if(!te)return new S("Invalid "+f+" `"+v+"` key `"+z+"` supplied to `"+l+"`.\nBad object: "+JSON.stringify(M[O],null," ")+`
|
|
20
|
+
Valid keys: `+JSON.stringify(Object.keys(A),null," "));var q=te(P,z,l,f,v+"."+z,r);if(q)return q}return null}return _(y)}function W(A){switch(typeof A){case"number":case"string":case"undefined":return!0;case"boolean":return!A;case"object":if(Array.isArray(A))return A.every(W);if(A===null||o(A))return!0;var y=p(A);if(y){var M=y.call(A),O;if(y!==A.entries){for(;!(O=M.next()).done;)if(!W(O.value))return!1}else for(;!(O=M.next()).done;){var l=O.value;if(l&&!W(l[1]))return!1}}else return!1;return!0;default:return!1}}function he(A,y){return A==="symbol"?!0:y?y["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&y instanceof Symbol:!1}function me(A){var y=typeof A;return Array.isArray(A)?"array":A instanceof RegExp?"object":he(y,A)?"symbol":y}function _e(A){if(typeof A>"u"||A===null)return""+A;var y=me(A);if(y==="object"){if(A instanceof Date)return"date";if(A instanceof RegExp)return"regexp"}return y}function Ie(A){var y=_e(A);switch(y){case"array":case"object":return"an "+y;case"boolean":case"date":case"regexp":return"a "+y;default:return y}}function Fe(A){return!A.constructor||!A.constructor.name?T:A.constructor.name}return E.checkPropTypes=n,E.resetWarningCache=n.resetWarningCache,E.PropTypes=E,E},Ls}var Rs,Da;function Ol(){if(Da)return Rs;Da=1;var t=xs();function e(){}function r(){}return r.resetWarningCache=e,Rs=function(){function s(i,o,u,c,d,p){if(p!==t){var T=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw T.name="Invariant Violation",T}}s.isRequired=s;function n(){return s}var a={array:s,bigint:s,bool:s,func:s,number:s,object:s,string:s,symbol:s,any:s,arrayOf:n,element:s,elementType:s,instanceOf:n,node:s,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:r,resetWarningCache:e};return a.PropTypes=a,a},Rs}if(process.env.NODE_ENV!=="production"){var Al=Ea(),Dl=!0;Fs.exports=Tl()(Al.isElement,Dl)}else Fs.exports=Ol()();var Il=Fs.exports;const h=Ps(Il),Ia={Primary:"primary",Secondary:"secondary",Info:"info",Success:"success",Danger:"danger",Warning:"warning",Neutral:"neutral"},Na={Solid:"solid",Outline:"outline",Text:"text"},Pa={Large:"lg",Medium:"md",Small:"sm"},Fa={Right:"right",Left:"left"},ve={name:"Button",class:"ds-button",props:{color:{type:String,default:Ia.Primary,options:Object.values(Ia)},variant:{type:String,default:Na.Solid,options:Object.values(Na)},size:{type:String,default:Pa.Medium,options:Object.values(Pa)},elevation:{type:Number,options:[1,2,3,4]},disabled:{type:Boolean,default:!1},icon:{type:String,default:""},iconFill:{type:Boolean,default:!0},iconPosition:{type:String,default:Fa.Right,options:Object.values(Fa)},id:{type:String,default:""},testId:{type:String,default:"ds-button-test"},fullSize:{type:Boolean,default:!1}}},Ma={Primary:"primary",PrimaryLightest:"primary-lightest",PrimaryLighter:"primary-lighter",PrimaryLight:"primary-light",PrimaryDark:"primary-dark",PrimaryDarker:"primary-darker",Neutral90:"neutral-90",Neutral80:"neutral-80",Neutral60:"neutral-60",Neutral40:"neutral-40",Neutral20:"neutral-20",Neutral10:"neutral-10",Neutral05:"neutral-05",Neutral00:"neutral-00",Secondary:"secondary",SecondaryLightest:"secondary-lightest",SecondaryLighter:"secondary-lighter",SecondaryLight:"secondary-light",SecondaryDark:"secondary-dark",SecondaryDarker:"secondary-darker",Success:"success",SuccessLighter:"success-lighter",SuccessLight:"success-light",SuccessDark:"success-dark",Warning:"warning",WarningLighter:"warning-lighter",WarningLight:"warning-light",WarningDark:"warning-dark",Danger:"danger",DangerLighter:"danger-lighter",DangerLight:"danger-light",DangerDark:"danger-dark",Info:"info",InfoLighter:"info-lighter",InfoLight:"info-light",InfoDark:"info-dark"},ja={Outlined:"outlined",Rounded:"rounded",Sharp:"sharp"},xa={XXS:"xxs",XS:"xs",SM:"sm",MD:"md",LG:"lg",XL:"xl",XXL:"xxl",XXXL:"xxxl",Huge:"huge"},Va={Bold:"bold",Semibold:"semibold",Medium:"medium",Regular:"regular",Light:"light",Extralight:"extralight"},We={name:"Icon",class:"ds-icon",props:{color:{type:String,default:Ma.Neutral90,options:Object.values(Ma)},image:{type:String,default:"settings"},variation:{type:String,default:ja.Outlined,options:Object.values(ja)},size:{type:String,default:xa.MD,options:Object.values(xa)},fontVariationSettings:{type:Object,default:{fill:0,grad:0,weight:500,opticalSize:48}},fill:{type:Boolean,default:!1},testId:{type:String,default:"ds-icon-test"},weight:{type:String,default:Va.Semibold,options:Object.values(Va)},onClick:{type:Function,default:()=>({})}}};var Ba=(t=>(t[t.bold=700]="bold",t[t.semibold=600]="semibold",t[t.medium=500]="medium",t[t.regular=400]="regular",t[t.light=300]="light",t[t.extralight=200]="extralight",t))(Ba||{});const Ee=({image:t=We.props.image.default,color:e=We.props.color.default,className:r,size:s=We.props.size.default,fill:n=We.props.fill.default,weight:a=We.props.weight.default,testId:i=We.props.testId.default,onClick:o=We.props.onClick.default})=>{const u="material-symbols-rounded",c=e&&We.props.color.options.find(p=>p===e)&&`${We.class}__color--${e}`,d=F.useMemo(()=>({fontVariationSettings:`'FILL' ${n?1:0}, 'GRAD' 0,'wght' ${Ba[a]}, 'opsz' 48`}),[a,n]);return w.jsx("i",{className:[`${We.class}--${s}`,We.class,u,c,r&&r].filter(p=>p).join(" "),"data-testid":i,onClick:o,style:d,translate:"no",children:t})};Ee.propTypes={color:h.oneOf(We.props.color.options),image:h.string,fontVariationSettings:h.object,size:h.oneOf(We.props.size.options),fill:h.bool,weight:h.oneOf(We.props.weight.options),onClick:h.func},Ee.displayName="DsIcon";const Sr=({children:t,className:e,onClick:r,size:s=ve.props.size.default,disabled:n=ve.props.disabled.default,icon:a=ve.props.icon.default,id:i=ve.props.id.default,testId:o=ve.props.testId.default,elevation:u,variant:c=ve.props.variant.default,color:d=ve.props.color.default,iconFill:p=ve.props.iconFill.default,iconPosition:T=ve.props.iconPosition.default,fullSize:E=ve.props.fullSize.default})=>{const k=s&&ve.props.size.options.find(R=>R===s)?`${ve.class}--${s}`:`${ve.class}__${ve.props.size.default}`,S=n&&`${ve.class}--disabled`,_=`${ve.class}__${d}--${c}`,g=u&&`${ve.class}--elevation-${u}`,D=a&&`${ve.class}--with-icon`,N=E?`${ve.class}--full-size`:"",I=T==="right"?`${ve.class}__icon`:`${ve.class}__icon--left`,b=T==="right"?`${ve.class}__text`:`${ve.class}__text--reversed`;return w.jsx("button",{className:[ve.class,N,S,D,k,_,g,D,e&&e].filter(R=>R).join(" "),"data-testid":o,disabled:n,id:i,onClick:n?void 0:r,children:w.jsxs("span",{className:["ds-button__text",b].join(" "),children:[t,a&&w.jsx(Ee,{className:["ds-button__icon",I].join(" "),fill:p,image:a,size:s})]})})};Sr.propTypes={color:h.oneOf(ve.props.color.options),variant:h.oneOf(ve.props.variant.options),size:h.oneOf(ve.props.size.options),disabled:h.bool,icon:h.string,iconFill:h.bool,iconPosition:h.oneOf(ve.props.iconPosition.options),testId:h.string,id:h.string,fullSize:h.bool},Sr.displayName="DsButton";const Nl={name:"Caption",class:"ds-caption"},zs=({children:t,className:e,testId:r="ds-caption-test"})=>w.jsx("p",{className:[Nl.class,e&&e].filter(s=>s).join(" "),"data-testid":r,children:t});zs.propTypes={children:h.node.isRequired,className:h.string,testId:h.string},zs.displayName="DsCaption";const Wr={None:"",PrimaryDarker:"primary-darker",PrimaryDark:"primary-dark",Primary:"primary",PrimaryLight:"primary-light",PrimaryLighter:"primary-lighter",PrimaryLightest:"primary-lightest",SecondaryDarker:"secondary-darker",SecondaryDark:"secondary-dark",Secondary:"secondary",SecondaryLight:"secondary-light",SecondaryLighter:"secondary-lighter",SecondaryLightest:"secondary-lightest",Neutral90:"neutral-90",Neutral80:"neutral-80",Neutral60:"neutral-60",Neutral40:"neutral-40",Neutral20:"neutral-20",Neutral10:"neutral-10",Neutral05:"neutral-05",Neutral00:"neutral-00",SuccessDark:"success-dark",Success:"success",SuccessLight:"success-light",SuccessLighter:"success-lighter",WarningDark:"warning-dark",Warning:"warning",WarningLight:"warning-light",WarningLighter:"warning-lighter",DangerDark:"danger-dark",Danger:"danger",DangerLight:"danger-light",DangerLighter:"danger-lighter",InfoDark:"info-dark",Info:"info",InfoLight:"info-light",InfoLighter:"info-lighter"},ot={name:"Card",class:"ds-card",props:{backgroundColor:{type:String,default:Wr.None,options:Object.values(Wr)},borderColor:{type:String,default:Wr.None,options:Object.values(Wr)},elevation:{type:Number,default:0,options:[0,1,2,3,4]},id:{type:String,default:""},testId:{type:String,default:"ds-card"}}},qs=({id:t,testId:e=ot.props.testId.default,children:r,className:s,elevation:n=ot.props.elevation.default,backgroundColor:a=ot.props.backgroundColor.default,borderColor:i=ot.props.borderColor.default})=>{const o=n&&`${ot.class}--elevation-${n}`,u=i&&`${ot.class}--border-${i}`,c=a&&`${ot.class}--${a}`;return w.jsx("div",{className:[ot.class,s,o,u,c].filter(d=>d).join(" "),"data-testid":e,id:t,children:r})};qs.propTypes={id:h.string,testId:h.string,backgroundColor:h.oneOf(ot.props.backgroundColor.options),borderColor:h.oneOf(ot.props.borderColor.options),elevation:h.oneOf(ot.props.elevation.options)},qs.displayName="DsCard";const Ye={name:"Checkbox",class:"ds-checkbox",props:{name:{type:String,required:!1},testId:{type:String,default:""},label:{type:String,default:""},description:{type:String,default:""},checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},changeByChecked:{type:Boolean,default:!1},onChangeHandler:{type:Function,default:()=>({})}}},Us=F.forwardRef(({id:t,className:e,name:r,testId:s=r||"ds-checkbox-test",label:n=Ye.props.label.default,description:a=Ye.props.description.default,checked:i=Ye.props.checked.default,disabled:o=Ye.props.checked.default,changeByChecked:u=Ye.props.changeByChecked.default,onChangeHandler:c},d)=>{const p=u||!1,T=i||!1,[E,k]=F.useState(T),S={image:E?"check_box":"check_box_outline_blank",class:E?`${Ye.class}__icon--checked`:`${Ye.class}__icon--unchecked`},_=o&&`${Ye.class}--disabled`,g=D=>{o||(k(N=>!N),c&&c(D))};return F.useEffect(()=>{p&&k(i)},[i,p]),w.jsxs("label",{className:[Ye.class,_,e&&e].join(" "),htmlFor:t||r,children:[w.jsx("input",{checked:E,className:`${Ye.class}__input`,"data-testid":s,id:t||r,name:r,onChange:g,ref:d,type:"checkbox"}),w.jsx(Ee,{className:`${Ye.class}__icon ${S.class}`,"data-testid":`${s}-icon`,fill:!0,image:S.image,size:"xxl"}),(a||n)&&w.jsxs("div",{className:`${Ye.class}__label`,children:[n&&w.jsx("label",{className:`${Ye.class}__label-title`,htmlFor:t||r,children:n}),a&&w.jsx("label",{className:`${Ye.class}__label-description`,htmlFor:t||r,children:a})]})]})});Us.propTypes={label:h.oneOfType([h.string,h.node]),name:h.string,className:h.string,testId:h.string,description:h.oneOfType([h.string,h.node]),checked:h.bool,disabled:h.bool},Us.displayName="DsCheckbox";const La={Heading1:"heading-1",Heading2:"heading-2",Heading3:"heading-3",Heading4:"heading-4",Heading5:"heading-5",Heading6:"heading-6"},Er={name:"Heading",class:"ds-heading",props:{type:{type:String,default:La.Heading1,options:Object.values(La)}}},Hs=({children:t,testId:e="ds-heading-test",type:r=Er.props.type.default,className:s})=>{const n={"heading-1":"h1","heading-2":"h2","heading-3":"h3","heading-4":"h4","heading-5":"h5","heading-6":"h6"},a=Er.props.type.options.find(u=>u===r)&&`${Er.class}--${r}`,o=n[r];return w.jsx(o,{className:[Er.class,a,s&&s].filter(u=>u).join(" "),"data-testid":e,children:t})};Hs.propTypes={className:h.string,testId:h.string,type:h.oneOf(Er.props.type.options)},Hs.displayName="DsHeading";const Ra={None:"",Dashed:"dashed",Dotted:"dotted"},za={None:"",Small:"small",Large:"large"},zt={name:"HR",class:"ds-hr",props:{borderStyle:{type:String,default:Ra.None,options:Object.values(Ra)},size:{type:String,default:za.None,options:Object.values(za)}}};function qa(t,e,r){const s=r.props[t];return s.options&&s.options.some(n=>n===e)?`${r.class}--${e}`:""}const Ks=({size:t=zt.props.size.default,borderStyle:e=zt.props.borderStyle.default})=>{const r=qa("size",t,zt),s=qa("borderStyle",e,zt);return w.jsx("hr",{className:`${zt.class} ${r} ${s}`.trim()})};Ks.propTypes={size:h.oneOf(zt.props.size.options),borderStyle:h.oneOf(zt.props.borderStyle.options)},Ks.displayName="DsHR";function Mt(t){return typeof t=="string"||t instanceof String}function Ua(t){var e;return typeof t=="object"&&t!=null&&(t==null||(e=t.constructor)==null?void 0:e.name)==="Object"}function Ha(t,e){return Array.isArray(e)?Ha(t,(r,s)=>e.includes(s)):Object.entries(t).reduce((r,s)=>{let[n,a]=s;return e(a,n)&&(r[n]=a),r},{})}const X={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Pl(t){switch(t){case X.LEFT:return X.FORCE_LEFT;case X.RIGHT:return X.FORCE_RIGHT;default:return t}}function Gs(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Yr(t,e){if(e===t)return!0;const r=Array.isArray(e),s=Array.isArray(t);let n;if(r&&s){if(e.length!=t.length)return!1;for(n=0;n<e.length;n++)if(!Yr(e[n],t[n]))return!1;return!0}if(r!=s)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){const a=e instanceof Date,i=t instanceof Date;if(a&&i)return e.getTime()==t.getTime();if(a!=i)return!1;const o=e instanceof RegExp,u=t instanceof RegExp;if(o&&u)return e.toString()==t.toString();if(o!=u)return!1;const c=Object.keys(e);for(n=0;n<c.length;n++)if(!Object.prototype.hasOwnProperty.call(t,c[n]))return!1;for(n=0;n<c.length;n++)if(!Yr(t[c[n]],e[c[n]]))return!1;return!0}else if(e&&t&&typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();return!1}class Fl{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?X.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?X.RIGHT:X.LEFT}}function re(t,e){return new re.InputMask(t,e)}function Ka(t){if(t==null)throw new Error("mask property should be defined");return t instanceof RegExp?re.MaskedRegExp:Mt(t)?re.MaskedPattern:t===Date?re.MaskedDate:t===Number?re.MaskedNumber:Array.isArray(t)||t===Array?re.MaskedDynamic:re.Masked&&t.prototype instanceof re.Masked?t:re.Masked&&t instanceof re.Masked?t.constructor:t instanceof Function?re.MaskedFunction:(console.warn("Mask not found for mask",t),re.Masked)}function kr(t){if(!t)throw new Error("Options in not defined");if(re.Masked){if(t.prototype instanceof re.Masked)return{mask:t};const{mask:e=void 0,...r}=t instanceof re.Masked?{mask:t}:Ua(t)&&t.mask instanceof re.Masked?t:{};if(e){const s=e.mask;return{...Ha(e,(n,a)=>!a.startsWith("_")),mask:e.constructor,_mask:s,...r}}}return Ua(t)?{...t}:{mask:t}}function wt(t){if(re.Masked&&t instanceof re.Masked)return t;const e=kr(t),r=Ka(e.mask);if(!r)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===r&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new r(e)}re.createMask=wt;class Ws{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,r){if(!(e==null||r==null||e===this.selectionStart&&r===this.selectionEnd))try{this._unsafeSelect(e,r)}catch{}}get isActive(){return!1}}re.MaskElement=Ws;const Ga=90,Ml=89;class Xr extends Ws{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,r,s;return(e=(r=(s=this.input).getRootNode)==null?void 0:r.call(s))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){if(this._handlers.redo&&(e.keyCode===Ga&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===Ml&&e.ctrlKey))return e.preventDefault(),this._handlers.redo(e);if(this._handlers.undo&&e.keyCode===Ga&&(e.metaKey||e.ctrlKey))return e.preventDefault(),this._handlers.undo(e);e.isComposing||this._handlers.selectionChange(e)}_onBeforeinput(e){if(e.inputType==="historyUndo"&&this._handlers.undo)return e.preventDefault(),this._handlers.undo(e);if(e.inputType==="historyRedo"&&this._handlers.redo)return e.preventDefault(),this._handlers.redo(e)}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}re.HTMLMaskElement=Xr;class jl extends Xr{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,r){this.input.setSelectionRange(e,r)}get value(){return this.input.value}set value(e){this.input.value=e}}re.HTMLMaskElement=Xr;class Wa extends Xr{get _unsafeSelectionStart(){const e=this.rootElement,r=e.getSelection&&e.getSelection(),s=r&&r.anchorOffset,n=r&&r.focusOffset;return n==null||s==null||s<n?s:n}get _unsafeSelectionEnd(){const e=this.rootElement,r=e.getSelection&&e.getSelection(),s=r&&r.anchorOffset,n=r&&r.focusOffset;return n==null||s==null||s>n?s:n}_unsafeSelect(e,r){if(!this.rootElement.createRange)return;const s=this.rootElement.createRange();s.setStart(this.input.firstChild||this.input,e),s.setEnd(this.input.lastChild||this.input,r);const n=this.rootElement,a=n.getSelection&&n.getSelection();a&&(a.removeAllRanges(),a.addRange(s))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}re.HTMLContenteditableMaskElement=Wa;class Jr{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>Jr.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}Jr.MAX_LENGTH=100;class xl{constructor(e,r){this.el=e instanceof Ws?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new Wa(e):new jl(e),this.masked=wt(r),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new Jr,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this._onChange()}maskEquals(e){var r;return e==null||((r=this.masked)==null?void 0:r.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof re.Masked)&&this.masked.constructor===Ka(e)){this.masked.updateOptions({mask:e});return}const r=e instanceof re.Masked?e:wt({mask:e});r.unmaskedValue=this.masked.unmaskedValue,this.masked=r}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,r){const s=this._listeners[e];s&&s.forEach(n=>n(r))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const r=this.masked.unmaskedValue,s=this.masked.value,n=this.masked.rawInputValue,a=this.displayValue,i=this.unmaskedValue!==r||this.value!==s||this._rawInputValue!==n;this._unmaskedValue=r,this._value=s,this._rawInputValue=n,this.el.value!==a&&(this.el.value=a),e==="auto"?this.alignCursor():e!=null&&(this.cursorPos=e),i&&this._fireChangeEvents(),!this._historyChanging&&(i||this.history.isEmpty)&&this.history.push({unmaskedValue:r,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:r,...s}=e,n=!this.maskEquals(r),a=this.masked.optionsIsChanged(s);n&&(this.mask=r),a&&this.masked.updateOptions(s),(n||a)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,X.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,r){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(r),this}off(e,r){if(!this._listeners[e])return this;if(!r)return delete this._listeners[e],this;const s=this._listeners[e].indexOf(r);return s>=0&&this._listeners[e].splice(s,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const r=new Fl({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),s=this.masked.rawInputValue,n=this.masked.splice(r.startChangePos,r.removed.length,r.inserted,r.removeDirection,{input:!0,raw:!0}).offset,a=s===this.masked.rawInputValue?r.removeDirection:X.NONE;let i=this.masked.nearestInputPos(r.startChangePos+n,a);a!==X.NONE&&(i=this.masked.nearestInputPos(i,X.NONE)),this.updateControl(i),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}re.InputMask=xl;class le{static normalize(e){return Array.isArray(e)?e:[e,new le]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}re.ChangeDetails=le;class mt{constructor(e,r,s){e===void 0&&(e=""),r===void 0&&(r=0),this.value=e,this.from=r,this.stop=s}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const r=this.value[0];return this.value=this.value.slice(1),r}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class ze{constructor(e){this._value="",this._update({...ze.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,r){r===void 0&&(r={input:!0}),this.reset(),this.append(e,r,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,r){return e}totalInputPositions(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),Math.min(this.displayValue.length,r-e)}extractInput(e,r,s){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),this.displayValue.slice(e,r)}extractTail(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),new mt(this.extractInput(e,r),e)}appendTail(e){return Mt(e)&&(e=new mt(String(e))),e.appendTo(this)}_appendCharRaw(e,r){return e?(this._value+=e,new le({inserted:e,rawInserted:e})):new le}_appendChar(e,r,s){r===void 0&&(r={});const n=this.state;let a;if([e,a]=this.doPrepareChar(e,r),e&&(a=a.aggregate(this._appendCharRaw(e,r)),!a.rawInserted&&this.autofix==="pad")){const i=this.state;this.state=n;let o=this.pad(r);const u=this._appendCharRaw(e,r);o=o.aggregate(u),u.rawInserted||o.equals(a)?a=o:this.state=i}if(a.inserted){let i,o=this.doValidate(r)!==!1;if(o&&s!=null){const u=this.state;if(this.overwrite===!0){i=s.state;for(let d=0;d<a.rawInserted.length;++d)s.unshift(this.displayValue.length-a.tailShift)}let c=this.appendTail(s);if(o=c.rawInserted.length===s.toString().length,!(o&&c.inserted)&&this.overwrite==="shift"){this.state=u,i=s.state;for(let d=0;d<a.rawInserted.length;++d)s.shift();c=this.appendTail(s),o=c.rawInserted.length===s.toString().length}o&&c.inserted&&(this.state=u)}o||(a=new le,this.state=n,s&&i&&(s.state=i))}return a}_appendPlaceholder(){return new le}_appendEager(){return new le}append(e,r,s){if(!Mt(e))throw new Error("value should be string");const n=Mt(s)?new mt(String(s)):s;r!=null&&r.tail&&(r._beforeTailState=this.state);let a;[e,a]=this.doPrepare(e,r);for(let i=0;i<e.length;++i){const o=this._appendChar(e[i],r,n);if(!o.rawInserted&&!this.doSkipInvalid(e[i],r,n))break;a.aggregate(o)}return(this.eager===!0||this.eager==="append")&&r!=null&&r.input&&e&&a.aggregate(this._appendEager()),n!=null&&(a.tailShift+=this.appendTail(n).tailShift),a}remove(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(r),new le}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const r=this.rawInputValue,s=this.value,n=e();return this.rawInputValue=r,this.value&&this.value!==s&&s.indexOf(this.value)===0&&(this.append(s.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,n}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const r=this.state,s=e(this);return this.state=r,delete this._isolated,s}doSkipInvalid(e,r,s){return!!this.skipInvalid}doPrepare(e,r){return r===void 0&&(r={}),le.normalize(this.prepare?this.prepare(e,this,r):e)}doPrepareChar(e,r){return r===void 0&&(r={}),le.normalize(this.prepareChar?this.prepareChar(e,this,r):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,r,s,n,a){s===void 0&&(s=""),n===void 0&&(n=X.NONE),a===void 0&&(a={input:!0});const i=e+r,o=this.extractTail(i),u=this.eager===!0||this.eager==="remove";let c;u&&(n=Pl(n),c=this.extractInput(0,i,{raw:!0}));let d=e;const p=new le;if(n!==X.NONE&&(d=this.nearestInputPos(e,r>1&&e!==0&&!u?X.NONE:n),p.tailShift=d-e),p.aggregate(this.remove(d)),u&&n!==X.NONE&&c===this.rawInputValue)if(n===X.FORCE_LEFT){let T;for(;c===this.rawInputValue&&(T=this.displayValue.length);)p.aggregate(new le({tailShift:-1})).aggregate(this.remove(T-1))}else n===X.FORCE_RIGHT&&o.unshift();return p.aggregate(this.append(s,a,o))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!Yr(this,e)}typedValueEquals(e){const r=this.typedValue;return e===r||ze.EMPTY_VALUES.includes(e)&&ze.EMPTY_VALUES.includes(r)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new le}}ze.DEFAULTS={skipInvalid:!0},ze.EMPTY_VALUES=[void 0,null,""],re.Masked=ze;class qt{constructor(e,r){e===void 0&&(e=[]),r===void 0&&(r=0),this.chunks=e,this.from=r}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=Mt(e)?new mt(String(e)):e;const r=this.chunks[this.chunks.length-1],s=r&&(r.stop===e.stop||e.stop==null)&&e.from===r.from+r.toString().length;if(e instanceof mt)s?r.extend(e.toString()):this.chunks.push(e);else if(e instanceof qt){if(e.stop==null){let n;for(;e.chunks.length&&e.chunks[0].stop==null;)n=e.chunks.shift(),n.from+=e.from,this.extend(n)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof re.MaskedPattern))return new mt(this.toString()).appendTo(e);const r=new le;for(let s=0;s<this.chunks.length;++s){const n=this.chunks[s],a=e._mapPosToBlock(e.displayValue.length),i=n.stop;let o;if(i!=null&&(!a||a.index<=i)&&((n instanceof qt||e._stops.indexOf(i)>=0)&&r.aggregate(e._appendPlaceholder(i)),o=n instanceof qt&&e._blocks[i]),o){const u=o.appendTail(n);r.aggregate(u);const c=n.toString().slice(u.rawInserted.length);c&&r.aggregate(e.append(c,{tail:!0}))}else r.aggregate(e.append(n.toString(),{tail:!0}))}return r}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:r,...s}=e;Object.assign(this,s),this.chunks=r.map(n=>{const a="chunks"in n?new qt:new mt;return a.state=n,a})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const r=e!=null?e-this.from:e;let s=0;for(;s<this.chunks.length;){const n=this.chunks[s],a=n.unshift(r);if(n.toString()){if(!a)break;++s}else this.chunks.splice(s,1);if(a)return a}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const r=this.chunks[e],s=r.shift();if(r.toString()){if(!s)break;--e}else this.chunks.splice(e,1);if(s)return s}return""}}class Vl{constructor(e,r){this.masked=e,this._log=[];const{offset:s,index:n}=e._mapPosToBlock(r)||(r<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=s,this.index=n,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((r=this.block)==null?void 0:r.displayValue.length)||0){var r;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,X.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,X.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,X.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,X.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,X.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,X.NONE),!0})}}class Ya{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,r){return e===void 0&&(e=0),r===void 0&&(r=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(r),this._value||(this._isRawInput=!1),new le}nearestInputPos(e,r){r===void 0&&(r=X.NONE);const s=0,n=this._value.length;switch(r){case X.LEFT:case X.FORCE_LEFT:return s;case X.NONE:case X.RIGHT:case X.FORCE_RIGHT:default:return n}}totalInputPositions(e,r){return e===void 0&&(e=0),r===void 0&&(r=this._value.length),this._isRawInput?r-e:0}extractInput(e,r,s){return e===void 0&&(e=0),r===void 0&&(r=this._value.length),s===void 0&&(s={}),s.raw&&this._isRawInput&&this._value.slice(e,r)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,r){if(r===void 0&&(r={}),this.isFilled)return new le;const s=this.eager===!0||this.eager==="append",a=this.char===e&&(this.isUnmasking||r.input||r.raw)&&(!r.raw||!s)&&!r.tail,i=new le({inserted:this.char,rawInserted:a?this.char:""});return this._value=this.char,this._isRawInput=a&&(r.raw||r.input),i}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new le;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new mt("")}appendTail(e){return Mt(e)&&(e=new mt(String(e))),e.appendTo(this)}append(e,r,s){const n=this._appendChar(e[0],r);return s!=null&&(n.tailShift+=this.appendTail(s).tailShift),n}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}pad(e){return this._appendPlaceholder()}}class Zr{constructor(e){const{parent:r,isOptional:s,placeholderChar:n,displayChar:a,lazy:i,eager:o,...u}=e;this.masked=wt(u),Object.assign(this,{parent:r,isOptional:s,placeholderChar:n,displayChar:a,lazy:i,eager:o})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.value.length),e===0&&r>=1?(this.isFilled=!1,this.masked.remove(e,r)):new le}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,r){if(r===void 0&&(r={}),this.isFilled)return new le;const s=this.masked.state;let n=this.masked._appendChar(e,this.currentMaskFlags(r));return n.inserted&&this.doValidate(r)===!1&&(n=new le,this.masked.state=s),!n.inserted&&!this.isOptional&&!this.lazy&&!r.input&&(n.inserted=this.placeholderChar),n.skip=!n.inserted&&!this.isOptional,this.isFilled=!!n.inserted,n}append(e,r,s){return this.masked.append(e,this.currentMaskFlags(r),s)}_appendPlaceholder(){return this.isFilled||this.isOptional?new le:(this.isFilled=!0,new le({inserted:this.placeholderChar}))}_appendEager(){return new le}extractTail(e,r){return this.masked.extractTail(e,r)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,r,s){return e===void 0&&(e=0),r===void 0&&(r=this.value.length),this.masked.extractInput(e,r,s)}nearestInputPos(e,r){r===void 0&&(r=X.NONE);const s=0,n=this.value.length,a=Math.min(Math.max(e,s),n);switch(r){case X.LEFT:case X.FORCE_LEFT:return this.isComplete?a:s;case X.RIGHT:case X.FORCE_RIGHT:return this.isComplete?a:n;case X.NONE:default:return a}}totalInputPositions(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.value.length),this.value.slice(e,r).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var r;return{...e,_beforeTailState:(e==null||(r=e._beforeTailState)==null?void 0:r.masked)||(e==null?void 0:e._beforeTailState)}}pad(e){return new le}}Zr.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class Bl extends ze{updateOptions(e){super.updateOptions(e)}_update(e){const r=e.mask;r&&(e.validate=s=>s.search(r)>=0),super._update(e)}}re.MaskedRegExp=Bl;class qe extends ze{constructor(e){super({...qe.DEFAULTS,...e,definitions:Object.assign({},Zr.DEFAULT_DEFINITIONS,e==null?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const r=this.mask;if(!r||!e)return;let s=!1,n=!1;for(let a=0;a<r.length;++a){if(this.blocks){const c=r.slice(a),d=Object.keys(this.blocks).filter(T=>c.indexOf(T)===0);d.sort((T,E)=>E.length-T.length);const p=d[0];if(p){const{expose:T,repeat:E,...k}=kr(this.blocks[p]),S={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...k,repeat:E,parent:this},_=E!=null?new re.RepeatBlock(S):wt(S);_&&(this._blocks.push(_),T&&(this.exposeBlock=_),this._maskedBlocks[p]||(this._maskedBlocks[p]=[]),this._maskedBlocks[p].push(this._blocks.length-1)),a+=p.length-1;continue}}let i=r[a],o=i in e;if(i===qe.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(i==="{"||i==="}"){s=!s;continue}if(i==="["||i==="]"){n=!n;continue}if(i===qe.ESCAPE_CHAR){if(++a,i=r[a],!i)break;o=!1}const u=o?new Zr({isOptional:n,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...kr(e[i]),parent:this}):new Ya({char:i,eager:this.eager,isUnmasking:s});this._blocks.push(u)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e){this.reset();return}const{_blocks:r,...s}=e;this._blocks.forEach((n,a)=>n.state=r[a]),super.state=s}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,r)=>e+=r.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(r),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,r)=>e+=r.value,"")}set value(e){if(this.exposeBlock){const r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(r),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(r),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,r)=>e+=r.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const r=new le;let s=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(s==null)return r;this._blocks[s].isFilled&&++s;for(let n=s;n<this._blocks.length;++n){const a=this._blocks[n]._appendEager();if(!a.inserted)break;r.aggregate(a)}return r}_appendCharRaw(e,r){r===void 0&&(r={});const s=this._mapPosToBlock(this.displayValue.length),n=new le;if(!s)return n;for(let i=s.index,o;o=this._blocks[i];++i){var a;const u=o._appendChar(e,{...r,_beforeTailState:(a=r._beforeTailState)==null||(a=a._blocks)==null?void 0:a[i]});if(n.aggregate(u),u.consumed)break}return n}extractTail(e,r){e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length);const s=new qt;return e===r||this._forEachBlocksInRange(e,r,(n,a,i,o)=>{const u=n.extractTail(i,o);u.stop=this._findStopBefore(a),u.from=this._blockStartPos(a),u instanceof qt&&(u.blockIndex=a),s.extend(u)}),s}extractInput(e,r,s){if(e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),s===void 0&&(s={}),e===r)return"";let n="";return this._forEachBlocksInRange(e,r,(a,i,o,u)=>{n+=a.extractInput(o,u,s)}),n}_findStopBefore(e){let r;for(let s=0;s<this._stops.length;++s){const n=this._stops[s];if(n<=e)r=n;else break}return r}_appendPlaceholder(e){const r=new le;if(this.lazy&&e==null)return r;const s=this._mapPosToBlock(this.displayValue.length);if(!s)return r;const n=s.index,a=e??this._blocks.length;return this._blocks.slice(n,a).forEach(i=>{if(!i.lazy||e!=null){var o;r.aggregate(i._appendPlaceholder((o=i._blocks)==null?void 0:o.length))}}),r}_mapPosToBlock(e){let r="";for(let s=0;s<this._blocks.length;++s){const n=this._blocks[s],a=r.length;if(r+=n.displayValue,e<=r.length)return{index:s,offset:e-a}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((r,s)=>r+=s.displayValue.length,0)}_forEachBlocksInRange(e,r,s){r===void 0&&(r=this.displayValue.length);const n=this._mapPosToBlock(e);if(n){const a=this._mapPosToBlock(r),i=a&&n.index===a.index,o=n.offset,u=a&&i?a.offset:this._blocks[n.index].displayValue.length;if(s(this._blocks[n.index],n.index,o,u),a&&!i){for(let c=n.index+1;c<a.index;++c)s(this._blocks[c],c,0,this._blocks[c].displayValue.length);s(this._blocks[a.index],a.index,0,a.offset)}}}remove(e,r){e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length);const s=super.remove(e,r);return this._forEachBlocksInRange(e,r,(n,a,i,o)=>{s.aggregate(n.remove(i,o))}),s}nearestInputPos(e,r){if(r===void 0&&(r=X.NONE),!this._blocks.length)return 0;const s=new Vl(this,e);if(r===X.NONE)return s.pushRightBeforeInput()||(s.popState(),s.pushLeftBeforeInput())?s.pos:this.displayValue.length;if(r===X.LEFT||r===X.FORCE_LEFT){if(r===X.LEFT){if(s.pushRightBeforeFilled(),s.ok&&s.pos===e)return e;s.popState()}if(s.pushLeftBeforeInput(),s.pushLeftBeforeRequired(),s.pushLeftBeforeFilled(),r===X.LEFT){if(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.ok&&s.pos<=e||(s.popState(),s.ok&&s.pos<=e))return s.pos;s.popState()}return s.ok?s.pos:r===X.FORCE_LEFT?0:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:0)}return r===X.RIGHT||r===X.FORCE_RIGHT?(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.pushRightBeforeFilled()?s.pos:r===X.FORCE_RIGHT?this.displayValue.length:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:this.nearestInputPos(e,X.LEFT))):e}totalInputPositions(e,r){e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length);let s=0;return this._forEachBlocksInRange(e,r,(n,a,i,o)=>{s+=n.totalInputPositions(i,o)}),s}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const r=this._maskedBlocks[e];return r?r.map(s=>this._blocks[s]):[]}pad(e){const r=new le;return this._forEachBlocksInRange(0,this.displayValue.length,s=>r.aggregate(s.pad(e))),r}}qe.DEFAULTS={...ze.DEFAULTS,lazy:!0,placeholderChar:"_"},qe.STOP_CHAR="`",qe.ESCAPE_CHAR="\\",qe.InputDefinition=Zr,qe.FixedDefinition=Ya,re.MaskedPattern=qe;class Qr extends qe{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:r=this.to||0,from:s=this.from||0,maxLength:n=this.maxLength||0,autofix:a=this.autofix,...i}=e;this.to=r,this.from=s,this.maxLength=Math.max(String(r).length,n),this.autofix=a;const o=String(this.from).padStart(this.maxLength,"0"),u=String(this.to).padStart(this.maxLength,"0");let c=0;for(;c<u.length&&u[c]===o[c];)++c;i.mask=u.slice(0,c).replace(/0/g,"\\0")+"0".repeat(this.maxLength-c),super._update(i)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let r="",s="";const[,n,a]=e.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(r="0".repeat(n.length)+a,s="9".repeat(n.length)+a),r=r.padEnd(this.maxLength,"0"),s=s.padEnd(this.maxLength,"9"),[r,s]}doPrepareChar(e,r){r===void 0&&(r={});let s;return[e,s]=super.doPrepareChar(e.replace(/\D/g,""),r),e||(s.skip=!this.isComplete),[e,s]}_appendCharRaw(e,r){if(r===void 0&&(r={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,r);const s=String(this.from).padStart(this.maxLength,"0"),n=String(this.to).padStart(this.maxLength,"0"),[a,i]=this.boundaries(this.value+e);return Number(i)<this.from?super._appendCharRaw(s[this.value.length],r):Number(a)>this.to?!r.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(s[this.value.length],r).aggregate(this._appendCharRaw(e,r)):super._appendCharRaw(n[this.value.length],r):super._appendCharRaw(e,r)}doValidate(e){const r=this.value;if(r.search(/[^0]/)===-1&&r.length<=this._matchFrom)return!0;const[n,a]=this.boundaries(r);return this.from<=Number(a)&&Number(n)<=this.to&&super.doValidate(e)}pad(e){const r=new le;if(this.value.length===this.maxLength)return r;const s=this.value,n=this.maxLength-this.value.length;if(n){this.reset();for(let a=0;a<n;++a)r.aggregate(super._appendCharRaw("0",e));s.split("").forEach(a=>this._appendCharRaw(a))}return r}}re.MaskedRange=Qr;class Ct extends qe{static extractPatternOptions(e){const{mask:r,pattern:s,...n}=e;return{...n,mask:Mt(r)?r:s}}constructor(e){super(Ct.extractPatternOptions({...Ct.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:r,pattern:s,blocks:n,...a}={...Ct.DEFAULTS,...e},i=Object.assign({},Ct.GET_DEFAULT_BLOCKS());e.min&&(i.Y.from=e.min.getFullYear()),e.max&&(i.Y.to=e.max.getFullYear()),e.min&&e.max&&i.Y.from===i.Y.to&&(i.m.from=e.min.getMonth()+1,i.m.to=e.max.getMonth()+1,i.m.from===i.m.to&&(i.d.from=e.min.getDate(),i.d.to=e.max.getDate())),Object.assign(i,this.blocks,n),super._update({...a,mask:Mt(r)?r:s,blocks:i})}doValidate(e){const r=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&r!=null&&(this.min==null||this.min<=r)&&(this.max==null||r<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(Ct.extractPatternOptions(e))}}Ct.GET_DEFAULT_BLOCKS=()=>({d:{mask:Qr,from:1,to:31,maxLength:2},m:{mask:Qr,from:1,to:12,maxLength:2},Y:{mask:Qr,from:1900,to:9999}}),Ct.DEFAULTS={...qe.DEFAULTS,mask:Date,pattern:"d{.}`m{.}`Y",format:(t,e)=>{if(!t)return"";const r=String(t.getDate()).padStart(2,"0"),s=String(t.getMonth()+1).padStart(2,"0"),n=t.getFullYear();return[r,s,n].join(".")},parse:(t,e)=>{const[r,s,n]=t.split(".").map(Number);return new Date(n,s-1,r)}},re.MaskedDate=Ct;class es extends ze{constructor(e){super({...es.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(r=>{const{expose:s,...n}=kr(r),a=wt({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...n});return s&&(this.exposeMask=a),a}):[])}_appendCharRaw(e,r){r===void 0&&(r={});const s=this._applyDispatch(e,r);return this.currentMask&&s.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(r))),s}_applyDispatch(e,r,s){e===void 0&&(e=""),r===void 0&&(r={}),s===void 0&&(s="");const n=r.tail&&r._beforeTailState!=null?r._beforeTailState._value:this.value,a=this.rawInputValue,i=r.tail&&r._beforeTailState!=null?r._beforeTailState._rawInputValue:a,o=a.slice(i.length),u=this.currentMask,c=new le,d=u==null?void 0:u.state;return this.currentMask=this.doDispatch(e,{...r},s),this.currentMask&&(this.currentMask!==u?(this.currentMask.reset(),i&&(this.currentMask.append(i,{raw:!0}),c.tailShift=this.currentMask.value.length-n.length),o&&(c.tailShift+=this.currentMask.append(o,{raw:!0,tail:!0}).tailShift)):d&&(this.currentMask.state=d)),c}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const r=new le;return e&&r.aggregate(this._applyDispatch("",{},e)),r.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var r,s;return{...e,_beforeTailState:((r=e._beforeTailState)==null?void 0:r.currentMaskRef)===this.currentMask&&((s=e._beforeTailState)==null?void 0:s.currentMask)||e._beforeTailState}}doDispatch(e,r,s){return r===void 0&&(r={}),s===void 0&&(s=""),this.dispatch(e,this,r,s)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,r){r===void 0&&(r={});let[s,n]=super.doPrepare(e,r);if(this.currentMask){let a;[s,a]=super.doPrepare(s,this.currentMaskFlags(r)),n=n.aggregate(a)}return[s,n]}doPrepareChar(e,r){r===void 0&&(r={});let[s,n]=super.doPrepareChar(e,r);if(this.currentMask){let a;[s,a]=super.doPrepareChar(s,this.currentMaskFlags(r)),n=n.aggregate(a)}return[s,n]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(r=>r.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let r=String(e);this.currentMask&&(this.currentMask.typedValue=e,r=this.currentMask.unmaskedValue),this.unmaskedValue=r}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,r){const s=new le;return this.currentMask&&s.aggregate(this.currentMask.remove(e,r)).aggregate(this._applyDispatch()),s}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(r=>r.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:r,currentMaskRef:s,currentMask:n,...a}=e;r&&this.compiledMasks.forEach((i,o)=>i.state=r[o]),s!=null&&(this.currentMask=s,this.currentMask.state=n),super.state=a}extractInput(e,r,s){return this.currentMask?this.currentMask.extractInput(e,r,s):""}extractTail(e,r){return this.currentMask?this.currentMask.extractTail(e,r):super.extractTail(e,r)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,r){return this.currentMask?this.currentMask.nearestInputPos(e,r):super.nearestInputPos(e,r)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((r,s)=>{if(!e[s])return;const{mask:n,...a}=e[s];return Yr(r,a)&&r.maskEquals(n)}):super.maskEquals(e)}typedValueEquals(e){var r;return!!((r=this.currentMask)!=null&&r.typedValueEquals(e))}}es.DEFAULTS={...ze.DEFAULTS,dispatch:(t,e,r,s)=>{if(!e.compiledMasks.length)return;const n=e.rawInputValue,a=e.compiledMasks.map((i,o)=>{const u=e.currentMask===i,c=u?i.displayValue.length:i.nearestInputPos(i.displayValue.length,X.FORCE_LEFT);return i.rawInputValue!==n?(i.reset(),i.append(n,{raw:!0})):u||i.remove(c),i.append(t,e.currentMaskFlags(r)),i.appendTail(s),{index:o,weight:i.rawInputValue.length,totalInputPositions:i.totalInputPositions(0,Math.max(c,i.nearestInputPos(i.displayValue.length,X.FORCE_LEFT)))}});return a.sort((i,o)=>o.weight-i.weight||o.totalInputPositions-i.totalInputPositions),e.compiledMasks[a[0].index]}},re.MaskedDynamic=es;class ts extends qe{constructor(e){super({...ts.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:r,...s}=e;if(r){const n=r.map(o=>o.length),a=Math.min(...n),i=Math.max(...n)-a;s.mask="*".repeat(a),i&&(s.mask+="["+"*".repeat(i)+"]"),this.enum=r}super._update(s)}_appendCharRaw(e,r){r===void 0&&(r={});const s=Math.min(this.nearestInputPos(0,X.FORCE_RIGHT),this.value.length),n=this.enum.filter(a=>this.matchValue(a,this.unmaskedValue+e,s));if(n.length){n.length===1&&this._forEachBlocksInRange(0,this.value.length,(i,o)=>{const u=n[0][o];o>=this.value.length||u===i.value||(i.reset(),i._appendChar(u,r))});const a=super._appendCharRaw(n[0][this.value.length],r);return n.length===1&&n[0].slice(this.unmaskedValue.length).split("").forEach(i=>a.aggregate(super._appendCharRaw(i))),a}return new le({skip:!this.isComplete})}extractTail(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),new mt("",e)}remove(e,r){if(e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),e===r)return new le;const s=Math.min(super.nearestInputPos(0,X.FORCE_RIGHT),this.value.length);let n;for(n=e;n>=0&&!(this.enum.filter(o=>this.matchValue(o,this.value.slice(s,n),s)).length>1);--n);const a=super.remove(n,r);return a.tailShift+=n-e,a}get isComplete(){return this.enum.indexOf(this.value)>=0}}ts.DEFAULTS={...qe.DEFAULTS,matchValue:(t,e,r)=>t.indexOf(e,r)===r},re.MaskedEnum=ts;class Ll extends ze{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}re.MaskedFunction=Ll;var Xa;class Qe extends ze{constructor(e){super({...Qe.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),r="\\d*",s=(this.scale?"("+Gs(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+r+s),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(Gs).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(Gs(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const r=e.split(this.radix);return r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),r.join(this.radix)}doPrepareChar(e,r){r===void 0&&(r={});const[s,n]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(r.input&&r.raw||!r.input&&!r.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),r);return e&&!s&&(n.skip=!0),s&&!this.allowPositive&&!this.value&&s!=="-"&&n.aggregate(this._appendChar("-")),[s,n]}_separatorsCount(e,r){r===void 0&&(r=!1);let s=0;for(let n=0;n<e;++n)this._value.indexOf(this.thousandsSeparator,n)===n&&(++s,r&&(e+=this.thousandsSeparator.length));return s}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,r,s){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),[e,r]=this._adjustRangeWithSeparators(e,r),this._removeThousandsSeparators(super.extractInput(e,r,s))}_appendCharRaw(e,r){r===void 0&&(r={});const s=r.tail&&r._beforeTailState?r._beforeTailState._value:this._value,n=this._separatorsCountFromSlice(s);this._value=this._removeThousandsSeparators(this.value);const a=this._value;this._value+=e;const i=this.number;let o=!isNaN(i),u=!1;if(o){let T;this.min!=null&&this.min<0&&this.number<this.min&&(T=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(T=this.max),T!=null&&(this.autofix?(this._value=this.format(T,this).replace(Qe.UNMASKED_RADIX,this.radix),u||(u=a===this._value&&!r.tail)):o=!1),o&&(o=!!this._value.match(this._numberRegExp))}let c;o?c=new le({inserted:this._value.slice(a.length),rawInserted:u?"":e,skip:u}):(this._value=a,c=new le),this._value=this._insertThousandsSeparators(this._value);const d=r.tail&&r._beforeTailState?r._beforeTailState._value:this._value,p=this._separatorsCountFromSlice(d);return c.tailShift+=(p-n)*this.thousandsSeparator.length,c}_findSeparatorAround(e){if(this.thousandsSeparator){const r=e-this.thousandsSeparator.length+1,s=this.value.indexOf(this.thousandsSeparator,r);if(s<=e)return s}return-1}_adjustRangeWithSeparators(e,r){const s=this._findSeparatorAround(e);s>=0&&(e=s);const n=this._findSeparatorAround(r);return n>=0&&(r=n+this.thousandsSeparator.length),[e,r]}remove(e,r){e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),[e,r]=this._adjustRangeWithSeparators(e,r);const s=this.value.slice(0,e),n=this.value.slice(r),a=this._separatorsCount(s.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(s+n));const i=this._separatorsCountFromSlice(s);return new le({tailShift:(i-a)*this.thousandsSeparator.length})}nearestInputPos(e,r){if(!this.thousandsSeparator)return e;switch(r){case X.NONE:case X.LEFT:case X.FORCE_LEFT:{const s=this._findSeparatorAround(e-1);if(s>=0){const n=s+this.thousandsSeparator.length;if(e<n||this.value.length<=n||r===X.FORCE_LEFT)return s}break}case X.RIGHT:case X.FORCE_RIGHT:{const s=this._findSeparatorAround(e);if(s>=0)return s+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let r=e;this.min!=null&&(r=Math.max(r,this.min)),this.max!=null&&(r=Math.min(r,this.max)),r!==e&&(this.unmaskedValue=this.format(r,this));let s=this.value;this.normalizeZeros&&(s=this._normalizeZeros(s)),this.padFractionalZeros&&this.scale>0&&(s=this._padFractionalZeros(s)),this._value=s}super.doCommit()}_normalizeZeros(e){const r=this._removeThousandsSeparators(e).split(this.radix);return r[0]=r[0].replace(/^(\D*)(0*)(\d*)/,(s,n,a,i)=>n+i),e.length&&!/\d$/.test(r[0])&&(r[0]=r[0]+"0"),r.length>1&&(r[1]=r[1].replace(/0*$/,""),r[1].length||(r.length=1)),this._insertThousandsSeparators(r.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const r=e.split(this.radix);return r.length<2&&r.push(""),r[1]=r[1].padEnd(this.scale,"0"),r.join(this.radix)}doSkipInvalid(e,r,s){r===void 0&&(r={});const n=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===Qe.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,r,s)&&!n}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Qe.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(Qe.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||Qe.EMPTY_VALUES.includes(e)&&Qe.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}Xa=Qe,Qe.UNMASKED_RADIX=".",Qe.EMPTY_VALUES=[...ze.EMPTY_VALUES,0],Qe.DEFAULTS={...ze.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Xa.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:t=>t.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},re.MaskedNumber=Qe;const Ys={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function Ja(t,e,r){e===void 0&&(e=Ys.MASKED),r===void 0&&(r=Ys.MASKED);const s=wt(t);return n=>s.runIsolated(a=>(a[e]=n,a[r]))}function Rl(t,e,r,s){return Ja(e,r,s)(t)}re.PIPE_TYPE=Ys,re.createPipe=Ja,re.pipe=Rl;class zl extends qe{get repeatFrom(){var e;return(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?e:0}get repeatTo(){var e;return(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var r,s,n;const{repeat:a,...i}=kr(e);this._blockOpts=Object.assign({},this._blockOpts,i);const o=wt(this._blockOpts);this.repeat=(r=(s=a??o.repeat)!=null?s:this.repeat)!=null?r:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((n=this._blocks)==null?void 0:n.length)||0,this.repeatFrom)),blocks:{m:o},eager:o.eager,overwrite:o.overwrite,skipInvalid:o.skipInvalid,lazy:o.lazy,placeholderChar:o.placeholderChar,displayChar:o.displayChar})}_allocateBlock(e){if(e<this._blocks.length)return this._blocks[e];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(wt(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(e,r){r===void 0&&(r={});const s=new le;for(let u=(n=(a=this._mapPosToBlock(this.displayValue.length))==null?void 0:a.index)!=null?n:Math.max(this._blocks.length-1,0),c,d;c=(i=this._blocks[u])!=null?i:d=!d&&this._allocateBlock(u);++u){var n,a,i,o;const p=c._appendChar(e,{...r,_beforeTailState:(o=r._beforeTailState)==null||(o=o._blocks)==null?void 0:o[u]});if(p.skip&&d){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(s.aggregate(p),p.consumed)break}return s}_trimEmptyTail(e,r){var s,n;e===void 0&&(e=0);const a=Math.max(((s=this._mapPosToBlock(e))==null?void 0:s.index)||0,this.repeatFrom,0);let i;r!=null&&(i=(n=this._mapPosToBlock(r))==null?void 0:n.index),i==null&&(i=this._blocks.length-1);let o=0;for(let u=i;a<=u&&!this._blocks[u].unmaskedValue;--u,++o);o&&(this._blocks.splice(i-o+1,o),this.mask=this.mask.slice(o))}reset(){super.reset(),this._trimEmptyTail()}remove(e,r){e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length);const s=super.remove(e,r);return this._trimEmptyTail(e,r),s}totalInputPositions(e,r){return e===void 0&&(e=0),r==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,r)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}}re.RepeatBlock=zl;try{globalThis.IMask=re}catch{}const Za={mask:h.oneOfType([h.array,h.func,h.string,h.instanceOf(RegExp),h.oneOf([Date,Number,re.Masked]),h.instanceOf(re.Masked)]),value:h.any,unmask:h.oneOfType([h.bool,h.oneOf(["typed"])]),prepare:h.func,prepareChar:h.func,validate:h.func,commit:h.func,overwrite:h.oneOfType([h.bool,h.oneOf(["shift"])]),eager:h.oneOfType([h.bool,h.oneOf(["append","remove"])]),skipInvalid:h.bool,onAccept:h.func,onComplete:h.func,placeholderChar:h.string,displayChar:h.string,lazy:h.bool,definitions:h.object,blocks:h.object,enum:h.arrayOf(h.string),maxLength:h.number,from:h.number,to:h.number,pattern:h.string,format:h.func,parse:h.func,autofix:h.oneOfType([h.bool,h.oneOf(["pad"])]),radix:h.string,thousandsSeparator:h.string,mapToRadix:h.arrayOf(h.string),scale:h.number,normalizeZeros:h.bool,padFractionalZeros:h.bool,min:h.oneOfType([h.number,h.instanceOf(Date)]),max:h.oneOfType([h.number,h.instanceOf(Date)]),dispatch:h.func,inputRef:h.oneOfType([h.func,h.shape({current:h.object})])},Qa=Object.keys(Za).filter(t=>t!=="value"),ql=["value","unmask","onAccept","onComplete","inputRef"],Ul=Qa.filter(t=>ql.indexOf(t)<0);function Hl(t){var e;const r=(e=class extends F.Component{constructor(a){super(a),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const a=this.props,i=this._extractMaskOptionsFromProps(a);if(i.mask)this.maskRef?(this.maskRef.updateOptions(i),"value"in a&&a.value!==void 0&&(this.maskValue=a.value)):this.initMask(i);else if(this.destroyMask(),"value"in a&&a.value!==void 0){var o;(o=this.element)!=null&&o.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=a.value:this.element.value=a.value}}componentWillUnmount(){this.destroyMask()}_inputRef(a){this.element=a,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=a:this.props.inputRef(a))}initMask(a){a===void 0&&(a=this._extractMaskOptionsFromProps(this.props)),this.maskRef=re(this.element,a).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&this.props.value!==void 0&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(a){const{...i}=a;return Object.keys(i).filter(o=>Ul.indexOf(o)<0).forEach(o=>{delete i[o]}),i}_extractNonMaskProps(a){const{...i}=a;return Qa.forEach(o=>{o!=="maxLength"&&delete i[o]}),"defaultValue"in i||(i.defaultValue=a.mask?"":i.value),delete i.value,i}get maskValue(){return this.maskRef?this.props.unmask==="typed"?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(a){this.maskRef&&(a=a==null&&this.props.unmask!=="typed"?"":a,this.props.unmask==="typed"?this.maskRef.typedValue=a:this.props.unmask?this.maskRef.unmaskedValue=a:this.maskRef.value=a)}_onAccept(a){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,a)}_onComplete(a){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,a)}render(){return F.createElement(t,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}},e.displayName=void 0,e.propTypes=void 0,e),s=t.displayName||t.name||"Component";return r.displayName="IMask("+s+")",r.propTypes=Za,F.forwardRef((n,a)=>F.createElement(r,{...n,ref:a}))}const Kl=Hl(t=>{let{inputRef:e,...r}=t;return F.createElement("input",{...r,ref:e})}),Gl=(t,e)=>F.createElement(Kl,{...t,ref:e});F.forwardRef(Gl);function Wl(t,e){let{onAccept:r,onComplete:s,ref:n=F.useRef(null),defaultValue:a,defaultUnmaskedValue:i,defaultTypedValue:o}=e===void 0?{}:e;const u=F.useRef(null),[c,d]=F.useState({}),[p,T]=F.useState(""),[E,k]=F.useState(""),[S,_]=F.useState(),g=F.useCallback(()=>{var b;(b=u.current)==null||b.destroy(),u.current=null},[]),D=F.useCallback(()=>{const b=u.current;b&&(d({value:b.value,unmaskedValue:b.unmaskedValue,typedValue:b.typedValue}),_(b.typedValue),k(b.unmaskedValue),T(b.value))},[]),N=F.useCallback(b=>{const R=u.current;R&&(D(),r==null||r(R.value,R,b))},[r]),I=F.useCallback(b=>u.current&&(s==null?void 0:s(u.current.value,u.current,b)),[s]);return F.useEffect(()=>{const{value:b,...R}=c,L=u.current;!L||p===void 0||(b!==p&&(L.value=p,L.value!==p&&N()),d(R))},[p]),F.useEffect(()=>{const{unmaskedValue:b,...R}=c,L=u.current;!L||E===void 0||(b!==E&&(L.unmaskedValue=E,L.unmaskedValue!==E&&N()),d(R))},[E]),F.useEffect(()=>{const{typedValue:b,...R}=c,L=u.current;!L||S===void 0||(b!==S&&(L.typedValue=S,L.masked.typedValueEquals(S)||N()),d(R))},[S]),F.useEffect(()=>{const b=n.current;if(!b||!(t!=null&&t.mask))return g();const R=u.current;R?R==null||R.updateOptions(t):b&&t!=null&&t.mask&&(u.current=re(b,t),D(),a!==void 0&&T(a),i!==void 0&&k(i),o!==void 0&&_(o))},[t,g,N]),F.useEffect(()=>{if(!u.current)return;const b=u.current;return b.on("accept",N),b.on("complete",I),()=>{b.off("accept",N),b.off("complete",I)}},[N,I]),F.useEffect(()=>g,[g]),{ref:n,maskRef:u,value:p,setValue:T,unmaskedValue:E,setUnmaskedValue:k,typedValue:S,setTypedValue:_}}const ei={Text:"text",Password:"password",Email:"email",Date:"date",Number:"number"},ti={Small:"small",Medium:"medium",Large:"large"},ri={Default:"",Error:"error",Success:"success"},si={Center:"center",End:"end",Initial:"initial"},ni={Top:"top",Right:"right",Bottom:"bottom",Left:"left"},Oe={name:"Input",class:"ds-input",props:{name:{type:String,required:!0},testId:{type:String,default:""},type:{type:String,default:ei.Text,options:Object.values(ei)},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},size:{type:String,default:ti.Medium,options:Object.values(ti)},label:{type:String,default:""},placeholder:{type:String,default:" "},value:{type:String,default:""},min:{type:String,default:""},max:{type:String,default:""},status:{type:String,default:ri.Default,options:Object.values(ri)},feedback:{type:String,default:""},hasFeedback:{type:Boolean,default:!0},noMargin:{type:Boolean,default:!1},icon:{type:String,default:""},tooltip:{type:String,default:""},tooltipPlacement:{type:String,default:si.Center,options:Object.values(si)},tooltipPosition:{type:String,default:ni.Top,options:Object.values(ni)},mask:{type:String,default:""},onChangeHandler:{type:Function,default:()=>({})}}},ai={currency:{mask:"currency",blocks:{currency:{mask:"R$ num",lazy:!1,blocks:{num:{mask:Number,scale:2,thousandsSeparator:".",padFractionalZeros:!0,normalizeZeros:!1,radix:",",mapToRadix:[",","."]}}}}},document:{mask:[{mask:"000.000.000-00",startsWith:/[0-9]/,maxLength:14},{mask:"00.000.000/0000-00",startsWith:/[0-9]/,maxLength:18}]},"phone-br":{mask:[{mask:"(00) 0000-0000"},{mask:"(00) 00000-0000"}],dispatch:(t,e)=>(e.value+t).replace(/\D/g,"").length<=10?e.compiledMasks[0]:e.compiledMasks[1]}},ii={Top:"top",Right:"right",Bottom:"bottom",Left:"left"},oi={Center:"center",End:"end",Initial:"initial"},Tt={name:"Tooltip",class:"ds-tooltip",props:{position:{type:String,default:ii.Top,options:Object.values(ii)},placement:{type:String,default:oi.Center,options:Object.values(oi)},text:{type:String,default:""}}},Ut=({children:t,position:e=Tt.props.position.default,placement:r=Tt.props.placement.default,text:s=Tt.props.text.default,className:n})=>{const a=F.useRef(null),i=F.useRef(null),[o,u]=F.useState(!1),c=e&&Tt.props.position.options.find(b=>b===e)&&`${Tt.class}--${e}`,d=r&&Tt.props.placement.options.find(b=>b===r)&&`${Tt.class}--${r}`,[p,T]=F.useState(0),[E,k]=F.useState(0),[S,_]=F.useState(0),[g,D]=F.useState(0);let N;switch(F.useEffect(()=>{var b,R,L,ee;i.current&&(_((b=i==null?void 0:i.current)==null?void 0:b.offsetHeight),D((R=i==null?void 0:i.current)==null?void 0:R.offsetWidth)),a.current&&(T((L=a==null?void 0:a.current)==null?void 0:L.offsetHeight),k((ee=a==null?void 0:a.current)==null?void 0:ee.offsetWidth))},[a,o]),F.useEffect(()=>(document.addEventListener("mousedown",I),()=>{document.removeEventListener("mousedown",I)}),[]),e){case"top":r==="initial"?N={bottom:p+9,left:E<30?-E/1.5:-E*.01}:r==="end"?N={bottom:p+9,right:E<30?-E/1.5:-E*.01}:N={bottom:p+9,left:-g/2+E/2};break;case"bottom":r==="initial"?N={top:p+9,left:E<30?-E/1.5:-E*.01}:r==="end"?N={top:p+9,right:E<30?-E/1.5:-E*.01}:N={top:p+9,left:-g/2+E/2};break;case"left":r==="initial"?N={right:E+9,top:p<30?-p/1.5:-p*.01}:r==="end"?N={right:E+9,bottom:p<30?-p/1.5:-p*.01}:N={right:E+9,top:-S/2+p/2};break;case"right":r==="initial"?N={left:E+9,top:p<30?-p/1.5:-p*.01}:r==="end"?N={left:E+9,bottom:p<30?-p/1.5:-p*.01}:N={left:E+9,top:-S/2+p/2};break}const I=({target:b})=>{a.current&&a.current.contains(b)||u(!1)};return w.jsxs("span",{className:[Tt.class,n].join(" "),"data-testid":"tooltip",onClick:()=>u(!o),ref:a,children:[t,o&&w.jsx("span",{className:[c,d].filter(b=>b).join(" "),children:w.jsx("span",{className:`${Tt.class}__wrapper`,"data-testid":"tooltip-wrapper",ref:i,style:N,children:s})})]})};Ut.propTypes={position:h.string,placement:h.string,text:h.oneOfType([h.string,h.node])},Ut.displayName="DsTooltip";const ar=F.forwardRef(({name:t,testId:e=t||"ds-input-test",type:r=Oe.props.type.default,animated:s=Oe.props.animated.default,size:n=Oe.props.size.default,label:a,placeholder:i,value:o,min:u,max:c,tooltip:d=Oe.props.tooltip.default,tooltipPosition:p=Oe.props.tooltipPosition.default,tooltipPlacement:T=Oe.props.tooltipPlacement.default,icon:E=Oe.props.icon.default,status:k=Oe.props.status.default,feedback:S,hasFeedback:_=Oe.props.hasFeedback.default,noMargin:g=Oe.props.noMargin.default,disabled:D=Oe.props.disabled.default,className:N,mask:I,onChangeHandler:b=Oe.props.onChangeHandler.default,onBlurHandler:R,onKeyDownHandler:L,onFocusHandler:ee},U)=>{const[oe,H]=F.useState(!1),[G,ne]=F.useState(!1),W=!!b&&!!I,he=(B,z,te)=>{if(W&&te){const q={...te,target:{...te.target,name:t,maskedValue:B,value:z.unmaskedValue,type:"text"}};b(q)}},me=F.useMemo(()=>typeof I=="object"?{lazy:!0,...I}:ai[I]?{...ai[I],min:u,max:c,lazy:!0}:{mask:I||"",min:u,max:c,lazy:!0},[I]),{ref:_e,setUnmaskedValue:Ie}=Wl(me,{onAccept:he}),Fe=B=>{b&&!W&&b(B)},A=B=>{L&&L(B)},y=B=>{H(!1),R&&R(B)},M=B=>{H(!0),ee&&ee(B)},O=()=>{ne(B=>!B)},l=F.useMemo(()=>G&&r==="password"?"text":r,[G,r]),f=()=>{const B=[`${Oe.class}`];return n&&B.push(`${Oe.class}--${n}`),s&&B.push(`${Oe.class}--animated`),g&&B.push(`${Oe.class}--no-margin`),E&&B.push(`${Oe.class}--with-icon`),k&&B.push(`${Oe.class}--${k}`),N&&B.push(N),B.join(" ")},v=F.useMemo(()=>{const B=[`${Oe.class}__label`];return(oe||o)&&B.push(`${Oe.class}__label--active`),B.join(" ")},[o,oe]),P=()=>!s&&i?i:"",V=()=>k&&k==="error"?"info":"check_circle";return F.useEffect(()=>{I&&Ie(o||"")},[o,I,Ie]),w.jsxs("div",{className:f(),ref:U,children:[_&&w.jsx("div",{className:"ds-input__feedback",children:S&&w.jsxs(w.Fragment,{children:[w.jsx(Ee,{image:V()}),S]})}),w.jsx("input",{className:"ds-input__input","data-testid":e,disabled:D,id:t,max:c,min:u,name:t,onBlur:y,onChange:Fe,onFocus:M,onInput:Fe,onKeyDown:A,placeholder:P(),ref:_e,type:l,...!I&&{value:o||""}}),w.jsxs("label",{className:v,htmlFor:t,children:[a,d&&w.jsx(Ut,{className:"ds-input__tooltip",placement:T,position:p,text:d,children:w.jsx(Ee,{className:"ds-input__icon",image:"info"})})]}),E&&w.jsx(Ee,{className:"ds-input__icon",image:E}),r==="password"&&w.jsx(Ee,{className:"ds-input__password-icon",image:G?"visibility_off":"visibility",onClick:O,size:"xl"})]})});ar.propTypes={name:h.string,testId:h.string,type:h.oneOf(Oe.props.type.options),animated:h.bool,size:h.oneOf(Oe.props.size.options),label:h.string,placeholder:h.string,value:h.oneOfType([h.string]),min:h.string,max:h.string,tooltip:h.string,tooltipPosition:h.string,tooltipPlacement:h.string,icon:h.string,status:h.oneOf(Oe.props.status.options),feedback:h.string,hasFeedback:h.bool,noMargin:h.bool,disabled:h.bool,mask:h.oneOfType([h.string,h.object]),onChangeHandler:h.func,onFocusHandler:h.func},ar.displayName="DsInput";const li={Small:"small",Medium:"medium",Large:"large"},ui={None:"",Neutral20:"neutral-20",Neutral10:"neutral-10",Neutral05:"neutral-05",Neutral00:"neutral-00"},et={name:"Loading",class:"ds-loading",props:{size:{type:String,default:li.Medium,options:Object.values(li)},opacity:{type:Boolean,default:!0},fullscreen:{type:Boolean,default:!0},backgroundColor:{type:String,default:ui.Neutral10,options:Object.values(ui)},id:{type:String,default:""},testId:{type:String,default:"ds-loading"}}},rs=({id:t,testId:e=et.props.testId.default,className:r,size:s=et.props.size.default,opacity:n=et.props.opacity.default,fullscreen:a=et.props.fullscreen.default,backgroundColor:i=et.props.backgroundColor.default})=>{const o=!a&&`${et.class}--absolute`,u=s&&`${et.class}__dots--${s}`,c=i&&et.props.backgroundColor.options.find(p=>p===i)&&`${et.class}__background--${i}`,d=n&&`${et.class}__background--opacity`;return w.jsxs("div",{className:[et.class,r,o].filter(p=>p).join(" "),"data-testid":e,id:t,children:[w.jsx("div",{className:[`${et.class}__background`,c,d].filter(p=>p).join(" ")}),w.jsx("div",{className:["ds-loading__dots",u].filter(p=>p).join(" "),role:"status"})]})};rs.propTypes={id:h.string,testId:h.string,size:h.oneOf(et.props.size.options),opacity:h.bool,fullscreen:h.bool,backgroundColor:h.string},rs.displayName="DsLoading";const Ot={name:"Option",class:"ds-option",props:{id:{type:String,default:""},name:{type:String,default:""},testId:{type:String,default:""},label:{type:String,default:""},value:{type:String,default:""},disabled:{type:Boolean,default:!1},detail:{type:String,default:""},checked:{type:Boolean,default:!1},onChangeHandler:{type:Function,default:()=>({})}}},Xs=({id:t,label:e,detail:r,name:s,testId:n=s||"ds-option-test",disabled:a=Ot.props.disabled.default,value:i,checked:o=Ot.props.checked.default,onChangeHandler:u=Ot.props.onChangeHandler.default})=>{const[c]=F.useState(Math.random()),d=()=>{const p=[Ot.class];return a&&p.push(`${Ot.class}--disabled`),p.join(" ")};return w.jsxs("div",{className:d(),children:[w.jsx("input",{checked:o,"data-testid":n,disabled:a,id:t||String(c),name:s,onChange:u,type:"radio",value:i}),w.jsx(Ee,{className:`${Ot.class}__icon`,image:o?"radio_button_checked":"radio_button_unchecked",size:"xxl"}),w.jsxs("div",{className:`${Ot.class}__text-container`,children:[e&&w.jsx("label",{className:`${Ot.class}__label`,htmlFor:t||String(c),children:e}),r&&w.jsx("label",{className:`${Ot.class}__detail`,htmlFor:t||String(c),children:r})]})]})};Xs.propTypes={id:h.string,name:h.string,testId:h.string,label:h.oneOfType([h.string,h.node]),value:h.oneOfType([h.string,h.number]),detail:h.string,disabled:h.bool,checked:h.bool,onChangeHandler:h.func},Xs.displayName="DsOption";const ci={Default:"",Large:"large",Small:"small"},ss={name:"Paragraph",class:"ds-paragraph",props:{type:{type:String,default:ci.Default,options:Object.values(ci)}}},At=({children:t,className:e,testId:r="ds-paragraph-test",type:s=ss.props.type.default})=>{const n=s&&`${ss.class}--${s}`;return w.jsx("p",{className:[ss.class,n,e&&e].filter(a=>a).join(" "),"data-testid":r,children:t})};At.propTypes={className:h.string,testId:h.string,type:h.oneOf(ss.props.type.options)},At.displayName="DsParagraph";const di={Success:"success",SuccessDark:"success-dark",Warning:"warning",Danger:"danger"},fi={name:"Progress",class:"ds-progress",props:{label:{type:String,default:""},progress:{type:Number,default:0},color:{type:String,default:di.Success,options:Object.values(di)}}},Js={name:"Flex-Element",class:"ds-flex-element",props:{flex:{type:String,default:"0 1 auto",required:!1},className:{type:String,default:"",required:!1}}},Be=({children:t,flex:e=Js.props.flex.default,className:r=Js.props.className.default})=>{const s=()=>[Js.class,r].join(" "),n=()=>({flex:e});return w.jsx("div",{className:s(),style:n(),children:t})};Be.propTypes={className:h.string,flex:h.string},Be.displayName="DsFlexElement";const pi={Stretch:"stretch",FlexStart:"flex-start",FlexEnd:"flex-end",Center:"center",SpaceAround:"space-around",SpaceBetween:"space-between"},hi={Stretch:"stretch",FlexStart:"flex-start",FlexEnd:"flex-end",Center:"center"},mi={Row:"row",Column:"column",RowReverse:"row-reverse",ColumnReverse:"column-reverse"},gi={NoWrap:"nowrap",Wrap:"wrap",WrapReverse:"wrap-reverse"},Yl={Quark:"quark",Nano:"nano",XXXS:"xxxs",XXS:"xxs",XS:"xs",SM:"sm",MD:"md",LG:"lg",XL:"xl",XXL:"xxl",XXXL:"xxxl"},Ht={name:"Flex-Layout",class:"ds-flex-layout",props:{justifyContent:{type:String,default:pi.Stretch,required:!0,options:Object.values(pi)},alignItems:{type:String,default:hi.Stretch,required:!0,options:Object.values(hi)},flexDirection:{type:String,default:mi.Row,required:!0,options:Object.values(mi)},flexWrap:{type:String,default:gi.Wrap,required:!1,options:Object.values(gi)},className:{type:String,default:""},width:{type:String,default:"100%"},height:{type:String,default:""},gap:{type:String,default:"",options:Object.values(Yl)}}},Dt=({children:t,className:e,justifyContent:r=Ht.props.justifyContent.default,alignItems:s=Ht.props.alignItems.default,flexDirection:n=Ht.props.flexDirection.default,flexWrap:a=Ht.props.flexWrap.default,width:i=Ht.props.width.default,height:o,gap:u})=>{const c=()=>{const p=[Ht.class,e];return u&&p.push(`${Ht.class}--gap-${u}`),p.join(" ")},d=()=>({display:"flex",justifyContent:r,alignItems:s,flexDirection:n,flexWrap:a,width:i,height:o,gap:u});return w.jsx("div",{className:c(),style:d(),children:t})};Dt.propTypes={className:h.string,justifyContent:h.string,alignItems:h.string,flexDirection:h.string,flexWrap:h.string,width:h.string,height:h.string,gap:h.string},Dt.displayName="DsFlexLayout";const ns={None:"none",Quark:"quark",Nano:"nano",XXXS:"xxxs",XXS:"xxs",XS:"xs",SM:"sm"},wr={name:"Spacer",class:"ds-spacer",props:{vertical:{type:String,default:ns.None,options:Object.values(ns)},horizontal:{type:String,default:ns.None,options:Object.values(ns)}}},lt=({vertical:t=wr.props.vertical.default,horizontal:e=wr.props.horizontal.default})=>{const r=t&&`ds-spacer__vertical--${t}`,s=e&&`ds-spacer__horizontal--${e}`;return w.jsx("div",{className:[wr.class,r,s].filter(n=>n).join(" "),"data-testid":"spacer"})};lt.propTypes={vertical:h.oneOf(wr.props.vertical.options),horizontal:h.oneOf(wr.props.horizontal.options)},lt.displayName="DsSpacer";const Zs=({label:t,progress:e=fi.props.progress.default,color:r=fi.props.color.default})=>{const s=F.useMemo(()=>e>100?100:e,[e]),n=F.useMemo(()=>`ds-progress__progress--${r}`,[r]),a=F.useMemo(()=>r==="success-dark"?"color__success--dark":r==="warning"?"color__warning--dark":`color__${r}--default`,[r]);return w.jsx("div",{className:"ds-progress",children:w.jsxs(Dt,{flexDirection:"column",children:[w.jsx(Be,{children:w.jsx("div",{className:"ds-progress__container",children:w.jsx("div",{className:`ds-progress__progress ${n}`,style:{width:`${s||0}%`}})})}),w.jsx(Be,{children:w.jsxs(Dt,{alignItems:"flex-end",flexDirection:"column",justifyContent:"center",children:[w.jsx(lt,{vertical:"quark"}),w.jsx(At,{className:a,children:t})]})})]})})};Zs.propTypes={label:h.string,progress:h.number,color:h.string};const yi={Small:"sm",Medium:"md",Large:"lg"},vi={Default:"",Error:"error",Success:"success"},_i={Center:"center",End:"end",Initial:"initial"},bi={Top:"top",Right:"right",Bottom:"bottom",Left:"left"},Ae={name:"Select",class:"ds-select",props:{label:{type:String,default:""},className:{type:String,default:""},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},name:{type:String,default:""},testId:{type:String,default:"ds-select-test"},placeholder:{type:String},onChange:{type:Function,default:()=>{}},value:{type:[Boolean,String,Number,void 0]},size:{type:String,options:Object.values(yi),default:yi.Medium},status:{type:String,default:vi.Default,options:Object.values(vi)},tooltip:{type:String,default:""},tooltipPlacement:{type:String,default:_i.Initial,options:Object.values(_i)},tooltipPosition:{type:String,default:bi.Top,options:Object.values(bi)},feedback:{type:String,default:""},options:[]}},Qs=F.forwardRef(({label:t,className:e,disabled:r=Ae.props.disabled.default,animated:s=Ae.props.animated.default,multiple:n=Ae.props.multiple.default,testId:a=Ae.props.testId.default,name:i,options:o,value:u,placeholder:c,onChange:d,onChangeHandler:p,size:T=Ae.props.size.default,status:E=Ae.props.status.default,tooltip:k,tooltipPosition:S=Ae.props.tooltipPosition.default,tooltipPlacement:_=Ae.props.tooltipPlacement.default,feedback:g,...D},N)=>{const[I,b]=F.useState(!1),R=U=>{b(!1),d&&d(U,U.target.value),p&&p(U,U.target.value)},L=()=>{const U=[Ae.class,"select-placeholder"];return U.push(`${Ae.class}--${T}`),E&&U.push(`${Ae.class}--${E}`),I&&U.push(`${Ae.class}--active`),r&&U.push(`${Ae.class}--disabled`),e&&U.push(e),U.join(" ")},ee=F.useMemo(()=>{const U=[`${Ae.class}__label`];return!s&&U.push(`${Ae.class}__label--not-animated`),u&&U.push(`${Ae.class}__label--has-value`),s&&!u&&!k&&U.push(`${Ae.class}__label--hidden`),U.join(" ")},[u]);return w.jsxs("div",{className:L(),"data-testid":"select-component",children:[w.jsxs("label",{className:ee,"data-testid":"label-id",htmlFor:i,children:[t,k&&w.jsx(Ut,{className:`${Ae.class}__tooltip`,placement:_,position:S,text:k,children:w.jsx(Ee,{className:`${Ae.class}__icon`,image:"info"})})]}),w.jsxs("select",{"data-testid":a,disabled:r,id:i,multiple:n,name:i,onChange:U=>R(U),value:u||"",...D,onBlur:()=>b(!1),onFocus:()=>b(!0),ref:N,required:!0,children:[(c||s)&&w.jsx("option",{disabled:!0,value:"",children:c??t}),o==null?void 0:o.map((U,oe)=>{var H;return"options"in U?w.jsx("optgroup",{label:U.label,children:(H=U.options)==null?void 0:H.map((G,ne)=>w.jsx("option",{className:`${Ae.class}__option-select`,value:G.value,children:G.label||G.value},ne))},oe):w.jsx("option",{className:`${Ae.class}__option-select`,value:U.value,children:U.label||U.value},oe)})]}),g&&w.jsxs("div",{className:"ds-select__feedback-container",children:[w.jsx(Ee,{className:"ds-select__icon",image:E==="success"?"check_circle":"info"}),w.jsx("span",{className:"ds-select__feedback",children:g})]})]})});Qs.propTypes={label:h.string.isRequired,className:h.string,disabled:h.bool,animated:h.bool,multiple:h.bool,name:h.string,testId:h.string,options:h.array.isRequired,placeholder:h.string,onChange:h.func,onChangeHandler:h.func,value:h.oneOfType([h.string,h.number]),size:h.oneOf(Ae.props.size.options),status:h.oneOf(Ae.props.status.options),tooltip:h.string,tooltipPosition:h.string,tooltipPlacement:h.string,feedback:h.string},Qs.displayName="DsSelect";const $i={Large:"large",Small:"small"},en={name:"Subtitle",class:"ds-subtitle",props:{type:{type:String,default:$i.Large,options:Object.values($i)}}},Si=({children:t,className:e,testId:r="ds-subtitle-test",type:s})=>{const n=en.props.type.options.find(a=>a===s)&&`${en.class}--${s}`;return w.jsx("p",{className:[en.class,n,e&&e].filter(a=>a).join(" "),"data-testid":r,children:t})};Si.displayName="DsSubtitle";const Ei={Small:"small",Medium:"medium",Large:"large"},ki={Text:"text"},wi={None:"",Error:"error",Success:"success"},Ci={None:"none",Both:"both",Horizontal:"horizontal",Vertical:"vertical",Block:"block",Inline:"inline"},xe={name:"TextArea",class:"ds-textarea",props:{name:{type:String,required:!0},testId:{type:String,default:""},type:{type:String,default:ki.Text,options:Object.values(ki)},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},size:{type:String,default:Ei.Medium,options:Object.values(Ei)},label:{type:String,default:""},placeholder:{type:String,default:" "},value:{type:String,default:""},minLength:{type:Number,default:void 0},maxLength:{type:Number,default:void 0},rows:{type:Number,default:1},status:{type:String,default:wi.None,options:Object.values(wi)},feedback:{type:String,default:""},description:{type:String,default:""},icon:{type:String,default:""},tooltip:{type:String,default:""},resize:{type:String,default:Ci.None,options:Object.values(Ci)},onChangeHandler:{type:Function,default:()=>{}}}},tn=F.forwardRef(({name:t,testId:e=t||"ds-textarea-test",animated:r=xe.props.animated.default,size:s=xe.props.size.default,label:n,placeholder:a,value:i,minLength:o,maxLength:u,tooltip:c,icon:d,status:p=xe.props.status.default,feedback:T,disabled:E=xe.props.disabled.default,className:k,resize:S=xe.props.resize.default,onChangeHandler:_=xe.props.onChangeHandler.default,onBlurHandler:g,onKeyDownHandler:D,onFocusHandler:N,rows:I=xe.props.rows.default,description:b},R)=>{const[L,ee]=F.useState(!1),[U,oe]=F.useState(0),[H,G]=F.useState(Math.random());F.useEffect(()=>{i==null&&G(Math.random())},[i]);const ne=y=>{oe(y.target.value.length),_&&_(y)},W=y=>{D&&D(y)},he=y=>{ee(!1),g&&g(y)},me=y=>{ee(!0),N&&N(y)},_e=()=>{const y=[`${xe.class}`];return s&&y.push(`${xe.class}--${s}`),r&&y.push(`${xe.class}--animated`),c&&y.push(`${xe.class}--with-icon`),p&&y.push(`${xe.class}--${p}`),k&&y.push(k),y.join(" ")},Ie=F.useMemo(()=>{const y=[`${xe.class}__label`];return(L||i)&&y.push(`${xe.class}__label--active`),y.join(" ")},[i,L]),Fe=()=>!r&&a?a:"",A=()=>p&&p==="error"?"info":"check_circle";return w.jsxs("div",{className:_e(),children:[b&&w.jsx("span",{className:"ds-textarea__description",children:b}),T&&w.jsxs("div",{className:"ds-textarea__feedback",children:[w.jsx(Ee,{image:A()}),T]}),w.jsx("textarea",{className:"ds-textarea__textarea","data-testid":e,defaultValue:i||"",disabled:E,id:t,maxLength:u,minLength:o,name:t,onBlur:he,onChange:ne,onFocus:me,onInput:ne,onKeyDown:W,placeholder:Fe(),ref:R,rows:I,style:{resize:S||"none"}}),w.jsx("label",{className:Ie,htmlFor:t,children:n}),u&&w.jsxs("span",{className:"ds-textarea__count",children:[U,"/",u]}),c&&w.jsx(Ut,{className:"ds-textarea__tooltip",placement:"end",text:c,children:w.jsx(Ee,{className:"ds-textarea__icon",image:d})})]},H)});tn.propTypes={name:h.string,testId:h.string,type:h.oneOf(xe.props.type.options),animated:h.bool,size:h.oneOf(xe.props.size.options),label:h.string,placeholder:h.string,value:h.oneOfType([h.string]),tooltip:h.string,icon:h.string,status:h.oneOf(xe.props.status.options),feedback:h.string,minLength:h.number,maxLength:h.number,rows:h.number,disabled:h.bool,onChangeHandler:h.func,onFocusHandler:h.func,resize:h.oneOf(xe.props.resize.options).isRequired,description:h.string},tn.displayName="DsTextArea";const rn={name:"Container",class:"ds-container",props:{fluid:{type:Boolean,default:!1}}},as=({children:t,fluid:e=rn.props.fluid.default,className:r,style:s})=>{const n=e?`${rn.class}--fluid`:rn.class;return w.jsx("div",{className:[n,r].filter(a=>a).join(" "),style:s,children:t})};as.propTypes={children:h.node,fluid:h.bool,className:h.string,style:h.object},as.displayName="DsContainer";function Ti(){const{innerWidth:t,innerHeight:e}=window;return{width:t,height:e}}function Xl(){const[t,e]=F.useState(Ti());return F.useEffect(()=>{function r(){e(Ti())}return window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[]),t}const Oi=({children:t,grid:e})=>{const{row:r,col:s,mobileRow:n,mobileCol:a}=e,{width:i}=Xl(),[o,u]=F.useState(""),[c,d]=F.useState("");return F.useEffect(()=>{i<=768?(u(n||r),d(a||s)):(u(r),d(s))},[i]),w.jsx("div",{style:{gridRow:o,gridColumn:c},children:t})};Oi.displayName="DsGridElement";const Ai={Quark:"quark",Nano:"nano",ExtraSmall:"xs",Small:"sm",Medium:"md",Large:"lg"},is={Start:"start",End:"end",Center:"center",Stretch:"stretch",SpaceAround:"space-around",SpaceBetween:"space-between",SpaceEvenly:"space-evenly"},Ve={name:"Grid-Layout",class:"ds-grid-layout",props:{rows:{type:String,default:"auto",required:!0},gap:{type:String,default:Ai.Small,options:Object.values(Ai)},vGap:{type:Boolean,default:!0},hGap:{type:Boolean,default:!0},width:{type:String,default:""},height:{type:String,default:""},horizontalAlign:{type:String,default:is.Start,options:Object.values(is)},verticalAlign:{type:String,default:is.Start,options:Object.values(is)}}};function Di(){const{innerWidth:t,innerHeight:e}=window;return{width:t,height:e}}function Jl(){const[t,e]=F.useState(Di());return F.useEffect(()=>{function r(){e(Di())}return window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[]),t}const os=({children:t,rows:e,gap:r,vGap:s,hGap:n,horizontalAlign:a,verticalAlign:i,width:o,height:u})=>{const c=s&&`${Ve.class}__v-gap--${r}`,d=n&&`${Ve.class}__h-gap--${r}`,p=a&&Ve.props.horizontalAlign.options.find(N=>N===a)?`${Ve.class}--h-${a}`:null,T=i&&Ve.props.verticalAlign.options.find(N=>N===i)?`${Ve.class}--v-${i}`:null,{width:E}=Jl(),[k,S]=F.useState("");F.useEffect(()=>{E<=768?S("6"):S("12")},[E]);const _=N=>/^[+-]?\d+$/.test(N),g=()=>e.split(",").map(I=>(I=I.trim(),I==="0"||I==="*"||I==="auto"?"auto":_(I)?I+"fr":I)).join(" "),D=()=>`repeat(${k.split(",").map(I=>(I=I.trim(),I==="0"||I==="*"||I==="auto"?"auto":(_(I),I))).join(" ")}, minmax(0, 1fr))`;return w.jsx("div",{className:[Ve.class,p,T,c,d].filter(N=>N).join(" "),style:{width:o,height:u,gridTemplateColumns:D(),gridTemplateRows:g()},children:t})};os.propTypes={children:h.oneOfType([h.arrayOf(h.node),h.node,h.func]),rows:h.string,gap:h.oneOf(Ve.props.gap.options),vGap:h.bool,hGap:h.bool,width:h.string,height:h.string,horizontalAlign:h.oneOf(Ve.props.horizontalAlign.options),verticalAlign:h.oneOf(Ve.props.verticalAlign.options)},os.defaultProps={rows:Ve.props.rows.default,gap:Ve.props.gap.default,vGap:Ve.props.vGap.default,hGap:Ve.props.hGap.default,width:Ve.props.width.default,height:Ve.props.height.default,horizontalAlign:Ve.props.horizontalAlign.default,verticalAlign:Ve.props.verticalAlign.default},os.displayName="DsGridLayout";const ir={None:"none",Quark:"quark",Nano:"nano",ExtraSmall:"xs",Small:"sm",Medium:"md",Large:"lg"},rt={name:"Wrapper",class:"ds-wrapper",props:{space:{type:String,default:ir.ExtraSmall,options:Object.values(ir)},top:{type:String,options:Object.values(ir)},right:{type:String,options:Object.values(ir)},bottom:{type:String,options:Object.values(ir)},left:{type:String,options:Object.values(ir)}}},Kt=({children:t,space:e=rt.props.space.default,top:r,right:s,bottom:n,left:a})=>{const i=r&&`${rt.class}__top--${r}`,o=s&&`${rt.class}__right--${s}`,u=n&&`${rt.class}__bottom--${n}`,c=a&&`${rt.class}__left--${a}`,d=e&&`${rt.class}--${e}`;return w.jsx("div",{className:[rt.class,i,o,u,c,d].filter(p=>p).join(" "),children:t})};Kt.propTypes={space:h.oneOf(rt.props.space.options||[]),top:h.oneOf(rt.props.top.options||[]),right:h.oneOf(rt.props.right.options||[]),bottom:h.oneOf(rt.props.bottom.options||[]),left:h.oneOf(rt.props.left.options||[])},Kt.displayName="DsWrapper";const sn={name:"Accordion",class:"ds-accordion",props:{openItemListIndex:{type:Boolean,default:!1},items:{type:Array,default:[]},activeItem:{type:Number,default:0}}},or={name:"AccordionItem",class:"ds-accordion-item",props:{title:{type:String,default:""},content:{type:String,default:""},disabled:{type:Boolean,default:!1},active:{type:Boolean,default:!1}}},nn=({title:t,content:e,className:r,onToggle:s,active:n=or.props.active.default,disabled:a=or.props.disabled.default})=>{const i=n&&`${or.class}--active`;return w.jsxs("li",{className:[or.class,i,r&&r].filter(o=>o).join(" "),children:[w.jsxs("button",{className:`${or.class}__button`,disabled:a,onClick:s,children:[t,w.jsx(Ee,{className:`${or.class}__icon`,color:"neutral-90",image:"expand_more",size:"xl"})]}),n&&w.jsx("div",{className:"ds-accordion-item__content",children:e})]})};nn.propTypes={active:h.bool,title:h.oneOfType([h.element,h.string]),content:h.oneOfType([h.element,h.string]),className:h.string,disabled:h.bool},nn.displayName="DsAccordionItem";const an=({items:t=sn.props.items.default,activeItem:e=sn.props.activeItem.default,onClick:r})=>{const[s,n]=F.useState(-1);F.useEffect(()=>{t.map((i,o)=>{i.active&&n(o)})},[t]),F.useEffect(()=>{e!=null&&n(e)},[e]);const a=i=>{if(s===i)return r&&r(-1),n(-1);n(i),r&&r(i)};return w.jsx("ul",{className:sn.class,children:t.map((i,o)=>w.jsx(nn,{active:s===o,content:i.content,disabled:i.disabled,onToggle:()=>{a(o)},title:i.title},o))})};an.propTypes={items:h.array,activeItem:h.number},an.displayName="DsAccordion";const Ii=({title:t,activeTags:e,handleTagClose:r})=>w.jsx("div",{className:"active-tags",children:e.length>0&&w.jsxs(w.Fragment,{children:[w.jsx(At,{className:"active-tags__title",children:t}),w.jsx("div",{className:"active-tags__list","data-testid":"list",children:e.map((s,n)=>w.jsx(Ut,{text:`Filtro ${s.text} aplicado`,children:w.jsxs("div",{className:`active-tags__item ${s.hiddenClose&&"active-tags__item--no-close"}`,"data-testid":`active-tag-${n}`,children:[w.jsxs(Dt,{alignItems:"center",gap:"nano",children:[w.jsx(Be,{children:w.jsx(Ee,{className:"active-tags__icon",color:s.hiddenClose?"neutral-00":"neutral-90",fill:!0,image:s.icon,testId:`icon-${n}`})}),w.jsx(Be,{children:w.jsx(At,{type:"small",children:s.text})})]}),!s.hiddenClose&&w.jsx(Ee,{image:"close",onClick:()=>r(n),testId:`icon-close-${n}`})]},n)},`ds-tooltip-key-${n}`))})]})});Ii.displayName="DsActiveTags";const Ni={Small:"small",Medium:"medium",Large:"large"},$e={name:"EditableSelect",class:"ds-editable-select",props:{label:{type:String,default:""},animated:{type:Boolean,default:!0},placeholder:{type:String,default:""},name:{type:String,default:""},value:{type:String,default:""},noOptionsMessage:{type:String,default:"Nenhum resultado encontrado"},size:{type:String,default:Ni.Medium,options:Object.values(Ni)},status:{type:String,default:""},options:{type:Array,default:[]},icon:{type:String,default:void 0},disabled:{type:Boolean,default:!1},loading:{type:Boolean},onChangeHandler:{type:Function,default:()=>{}},onBlurHandler:{type:Function,default:()=>{}},onFocusHandler:{type:Function,default:()=>{}},onSelectHandler:{type:Function,default:()=>{}}}},Pi=({label:t=$e.props.label.default,name:e=$e.props.name.default,value:r=$e.props.value.default,options:s=$e.props.options.default,size:n=$e.props.size.default,onChangeHandler:a=$e.props.onChangeHandler.default,onSelectHandler:i=$e.props.onSelectHandler.default,icon:o=$e.props.icon.default,noOptionsMessage:u=$e.props.noOptionsMessage.default,disabled:c=$e.props.disabled.default,status:d=$e.props.status.default,onBlurHandler:p=$e.props.onBlurHandler.default,onFocusHandler:T=$e.props.onFocusHandler.default,animated:E=$e.props.animated.default,placeholder:k=$e.props.placeholder.default,loading:S})=>{const[_,g]=F.useState(r),[D,N]=F.useState(!1),[I,b]=F.useState(r),R=U=>{g(U.currentTarget.value),a(U),S===void 0&&(U.currentTarget.value?N(!0):N(!1))},L=U=>{g(U.label),i(U),p(),b(Math.random().toString()),N(!1)};F.useEffect(()=>{S&&D||_.length===0?N(!1):S===!1&&!D&&_.length>3&&N(!0)},[S,D,_]);const ee=()=>s.length>0?s.map((U,oe)=>w.jsx("option",{className:`${$e.class}__option ${$e.class}__option--${n}`,"data-testid":`Option ${U.id||U.label}`,onClick:()=>!c&&L(U),value:oe,children:U.label},oe)):w.jsx("option",{className:`${$e.class}__option ${$e.class}__option--not-found`,children:u},"no_option");return w.jsxs("div",{className:`${$e.class}__container`,children:[w.jsx(ar,{animated:E,className:`${$e.class}__input`,disabled:c,label:t,name:e,onBlurHandler:p,onChangeHandler:R,onFocusHandler:T,placeholder:k,size:n,status:d,value:_},I),(o||S)&&(S?w.jsx("div",{className:`${$e.class}__loading ${$e.class}__loading--${n}`,style:{width:"18px"},children:w.jsx(rs,{fullscreen:!1})}):o&&w.jsx(Ee,{className:`${$e.class}__icon ${$e.class}__icon--${n}`,image:o})),D&&w.jsx("div",{className:`${$e.class}__list`,"data-testid":"list",children:ee()})]})};Pi.displayName="DsEditableSelect";const Cr={name:"DsIndicator",class:"ds-indicator",props:{current:{type:Number,default:0},length:{type:Number,required:!0}}},Zl=({length:t,current:e=Cr.props.current.default})=>{const[r,s]=F.useState(e),n=i=>i<r?`${Cr.class}__step--older`:i===r?`${Cr.class}__step--active`:"";F.useEffect(()=>{s(e)},[e]);const a=[];for(let i=0;i<t;i++)a.push(w.jsx("div",{className:`${Cr.class}__step ${n(i)}`,"data-testid":`indicator-step-${i}`},i));return w.jsx("div",{className:Cr.class,children:a})},Ql={name:"DsInlineEditable",class:"ds-inline-editable",props:{name:{type:String,required:!0},value:{type:String,default:""},min:{type:String,default:""},max:{type:String,default:""},prefix:{type:String,default:""},suffix:{type:String,default:""},onChangeHandler:{type:Function,default:()=>{}}}},on=({name:t,value:e,prefix:r,sufix:s,min:n,max:a,onChangeHandler:i})=>{const o=F.useRef(null),[u,c]=F.useState(!1),[d,p]=F.useState("");F.useEffect(()=>{p(e??"")},[e]);const T=_=>{_.key==="Enter"&&E(_)};function E(_){c(!1),i&&(n&&parseInt(n)>=parseInt(d===""?n:d)?(_.currentTarget.value=n,p(n)):a&&parseInt(a)<parseInt(d)?(_.currentTarget.value=a,p(a)):_.currentTarget.value=d,i(_))}const k=_=>{p(_.currentTarget.value)},S=async()=>{var _;await c(!0),(_=o.current)==null||_.focus()};return w.jsx("div",{className:Ql.class,children:u?w.jsx("input",{className:"ds-input__input","data-testid":"input",max:a,min:n,name:t,onBlur:E,onChange:k,onKeyDown:T,ref:o,type:"number",value:d}):w.jsx("div",{"data-testid":"inline-editible-div-click",onClick:S,children:w.jsxs(Dt,{alignItems:"center",gap:"nano",children:[w.jsx(Be,{children:w.jsx(At,{children:w.jsxs("b",{children:[r,e,s]})})}),w.jsx(Be,{children:w.jsx(Ee,{image:"edit_square"})})]})})})};on.propTypes={value:h.string},on.displayName="DsInlineEditable";const eu=[1,2,3,4],Fi={Squared:"squared",Rounded:"rounded"},st={name:"Modal",class:"ds-modal",props:{elevation:{type:Number,options:eu},variant:{type:String,default:Fi.Rounded,options:Object.values(Fi)},cancelBtnText:{type:String,default:"Cancelar"},confirmBtnText:{type:String,default:"Confirmar"},isModalOpen:{type:Boolean,default:!1}}},ln=({className:t,title:e,content:r,cancelBtnText:s=st.props.cancelBtnText.default,confirmBtnText:n=st.props.confirmBtnText.default,variant:a=st.props.variant.default,elevation:i,isModalOpen:o=st.props.isModalOpen.default,onClose:u,onCancel:c,onConfirm:d,...p})=>{const T=a&&st.props.variant.options.find(_=>_===a)?`${st.class}--${a}`:`${st.class}--${st.props.variant.default}`,E=i&&`${st.class}--elevation-${i}`,k=d||c,S=F.useCallback(_=>{_.keyCode===27&&u()},[u]);return F.useEffect(()=>{if(window)return k||window.addEventListener("keyup",S),()=>{window.removeEventListener("keyup",S)}},[k,S]),o?w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"ds-modal-overlay",...p,onClick:()=>k?()=>{}:u()}),w.jsxs("div",{className:[st.class,T,E,t&&t].filter(_=>_).join(" "),"data-testid":"modal",children:[!k&&w.jsx("button",{className:"ds-modal__closeBtn","data-testid":"modal-close-button",onClick:u,children:w.jsx(Ee,{image:"close",size:"lg"})}),w.jsxs("div",{className:"ds-modal__content",children:[w.jsx("div",{className:"ds-modal__content__title",children:e}),e&&w.jsx(lt,{vertical:"xxxs"}),w.jsx("div",{className:"ds-modal__content__content",children:r})]}),k&&w.jsx(lt,{vertical:"sm"}),!k&&w.jsx(lt,{vertical:"xxs"}),w.jsxs("div",{className:"ds-modal__cta",children:[c&&w.jsx(Sr,{onClick:()=>{u(),c()},children:s}),d&&w.jsx(Sr,{onClick:()=>{u(),d()},children:n})]})]})]}):null};ln.propTypes={firstButtonText:h.string,confirmBtnText:h.string,cancelBtnText:h.string,variant:h.oneOf(st.props.variant.options),elevation:h.oneOf(st.props.elevation.options),isModalOpen:h.bool,title:h.node,content:h.node},ln.displayName="DsModal";const Mi={Success:"success",Danger:"danger",Warning:"warning",Info:"info"},ji={Rounded:"rounded",Squared:"squared"},Ue={name:"DsNotification",class:"ds-notification",props:{type:{type:String,default:Mi.Info,options:Object.values(Mi)},id:{type:String},autoClose:{type:Boolean,default:!1},autoCloseTimer:{type:Number,default:4e3},dismissible:{type:Boolean,default:!1},elevation:{type:Number,options:[1,2,3,4]},variant:{type:String,default:ji.Rounded,options:Object.values(ji)},progressBar:{type:Boolean,default:!0}}},tu={success:"check",danger:"error",warning:"warning",info:"info"},ls=({className:t,type:e=Ue.props.type.default,variant:r=Ue.props.variant.default,id:s,children:n,message:a,autoClose:i=Ue.props.autoClose.default,autoCloseTimer:o=Ue.props.autoCloseTimer.default,dismissible:u=Ue.props.dismissible.default,elevation:c,progressBar:d=Ue.props.progressBar.default,handleClose:p})=>{const[T,E]=F.useState(o),[k,S]=F.useState(!1),[_,g]=F.useState(!0),D=[Ue.class,e&&`${Ue.class}--${e}`,r&&`${Ue.class}--${r}`,c&&`${Ue.class}--elevation-${c}`,t&&t].join(" ");F.useEffect(()=>{!i&&!u&&g(!0);let R;return!k&&i&&(R=setInterval(()=>{E(L=>(L===0&&g(!1),L-100))},100)),()=>{clearInterval(R)}},[k,i,o,_]);const N=()=>{S(!0)},I=()=>{S(!1)},b=R=>{g(!1),p&&p(R)};return _?w.jsxs("div",{className:D,id:s,onMouseEnter:N,onMouseLeave:I,children:[w.jsx(Kt,{bottom:"nano",top:"nano",children:w.jsxs(Dt,{alignItems:"center",flexWrap:"nowrap",gap:"xxxs",children:[w.jsx(Be,{children:w.jsx(Ee,{color:e,fill:!0,image:tu[e]})}),w.jsx(Be,{flex:"1",children:w.jsx(Kt,{left:"none",right:"none",space:"nano",children:n??a})}),w.jsx(Be,{children:u?w.jsx("div",{className:`${Ue.class}__button`,onClick:R=>b(R),children:w.jsx(Kt,{children:w.jsx(Ee,{image:"close"})})}):w.jsx(lt,{horizontal:"quark"})})]})}),d&&i&&w.jsx("div",{className:`${Ue.class}__progress-bar ${Ue.class}__progress-bar--${e}`,style:{width:`${T/o*100}%`}})]}):null};ls.propTypes={type:h.oneOf(Ue.props.type.options),id:h.string,variant:h.oneOf(Ue.props.variant.options),message:h.node,autoClose:h.bool,autoCloseTimer:h.number,dismissible:h.bool,elevation:h.oneOf(Ue.props.elevation.options),progressBar:h.bool,handleClose:h.func},ls.displayName="DsNotification";const un={name:"DsPasswordConfirmation",class:"ds-password-confirmation",props:{onChange:{type:Function,default:()=>{}},validationList:{type:Array,default:[{title:"Um número",rule:t=>/\d/.test(t)},{title:"Uma letra maiúscula",rule:t=>/[A-Z]/.test(t)},{title:"Um caractere especial. Ex: @#!?",rule:t=>/[!@#$%^&*()+\-=_[\]{};':"\\|,.<>/?]/.test(t)},{title:"Mínimo 8 caracteres",rule:t=>t.length>=8}]},instructionLabel:{type:String,default:"A senha deverá conter:"}}},cn=({onChange:t=un.props.onChange.default,validationList:e=un.props.validationList.default,instructionLabel:r=un.props.instructionLabel.default})=>{const[s,n]=F.useState(""),[a,i]=F.useState(""),[o,u]=F.useState([]),[c,d]=F.useState({score:0,color:"danger",label:"Fraca"}),[p,T]=F.useState(!1),E=I=>{const b=e.map(R=>R==null?void 0:R.rule(I));return u(b),b},k=I=>{var L,ee,U,oe;n((L=I.currentTarget)==null?void 0:L.value);const b=E((ee=I.currentTarget)==null?void 0:ee.value),R=D(b);t&&t({password:(U=I.currentTarget)==null?void 0:U.value,confirmationPassword:a,isEqual:a===((oe=I.currentTarget)==null?void 0:oe.value),feedback:R})},S=I=>{var L,ee,U;i((L=I.currentTarget)==null?void 0:L.value);const b=E(s),R=D(b);t&&t({password:s,confirmationPassword:(ee=I.currentTarget)==null?void 0:ee.value,isEqual:s===((U=I.currentTarget)==null?void 0:U.value),feedback:R})},_=F.useMemo(()=>s!==a&&p?{status:"error",feedback:"As senhas são diferentes"}:{status:"",feedback:""},[s,a,p]),g=I=>{const b={score:I,color:"danger",label:"Fraco"};return I>30&&I<=75&&(b.color="warning",b.label="Médio"),I>=75&&I<100&&(b.color="success",b.label="Boa"),I===100&&(b.color="success-dark",b.label="Forte"),b},D=I=>{const b=I.reduce((U,oe)=>{let H=U;return oe?(H++,H):U},0),R=I==null?void 0:I.length,L=b*100/R||0,ee=g(L);return d(ee),ee},N=()=>w.jsx("ul",{children:e.map((I,b)=>{const R=o[b]?"ds-password-confirmation__list":"ds-password-confirmation__list--disc";return w.jsxs("li",{className:R,children:[o[b]?w.jsx(Ee,{color:"success-dark",image:"check"}):null,w.jsx(lt,{horizontal:"quark"}),w.jsx(At,{children:I.title})]},b+I.title)})});return w.jsxs(Dt,{className:"ds-password-confirmation",flexDirection:"column",children:[w.jsx(Be,{children:w.jsx(ar,{label:"Senha",name:"password",onChangeHandler:k,type:"password",value:s})}),w.jsx(Be,{children:w.jsx(Zs,{color:c==null?void 0:c.color,label:c==null?void 0:c.label,progress:c==null?void 0:c.score})}),w.jsx(Be,{children:w.jsx(At,{children:r})}),w.jsx(Be,{children:N()}),w.jsx(lt,{vertical:"xxxs"}),w.jsx(Be,{children:w.jsx(ar,{feedback:_.feedback,label:"Confirme a senha",name:"confirmPassword",onBlurHandler:()=>T(!0),onChangeHandler:S,onFocusHandler:()=>T(!0),status:_.status,type:"password",value:a})})]})};cn.propTypes={onChange:h.func,validationList:h.array.isRequired,instructionLabel:h.string},cn.displayName="DsPasswordConfirmation";const ut={name:"DsStepper",class:"ds-stepper",props:{steps:{type:Array,required:!0},selectedStep:{type:Number,default:0}}},xi=({steps:t,selectedStep:e=ut.props.selectedStep.default,onChange:r})=>{const[s,n]=F.useState(e),a=(i,o)=>{const u=[`${ut.class}__button`];return o!==i&&u.push(`${ut.class}__button--round`),t[i]&&t[i].disabled&&u.push(`${ut.class}__button--disabled`),u.join(" ")};return F.useEffect(()=>{n(e)},[e]),F.useEffect(()=>{r(s)},[s]),w.jsxs("div",{className:ut.class,children:[w.jsxs("span",{className:`${ut.class}__step-counter`,children:["Etapa ",s+1," de ",t==null?void 0:t.length]}),w.jsx("div",{className:`${ut.class}__step`,children:t.map((i,o)=>w.jsx("div",{className:`${ut.class}__content`,children:w.jsx("button",{className:a(o,s),disabled:i.disabled,onClick:()=>n(o),children:w.jsxs("span",{className:`${ut.class}__text`,children:[s===o?w.jsx(Kt,{bottom:"none",left:"nano",right:"nano",top:"none",children:w.jsx(Ee,{className:`${ut.class}__icon`,fill:!0,image:i.icon})}):w.jsx(Ee,{className:`${ut.class}__icon`,fill:!0,image:i.icon}),s===o&&i.label]})})},o))})]})};xi.displayName="DsStepper";const gt={name:"Table",class:"ds-table",props:{header:{type:Array,default:[]},items:{type:Array,default:[]},columns:{type:Array,default:[]}}},Vi=({item:t,columns:e})=>w.jsx("tr",{className:`${gt.class}__row`,children:e.map((r,s)=>{const n=r.align&&`${gt.class}__cell--align-${r.align}`;return w.jsx("td",{children:w.jsx("div",{className:[`${gt.class}__cell`,n,r.className].filter(a=>a).join(" "),children:t&&t[`${r.name}`]})},s)})});Vi.displayName="DsTableRow";const Bi=({columns:t,data:e,className:r})=>w.jsx("div",{className:`${gt.class}__wrapper`,children:w.jsxs("table",{className:[`${gt.class}`,r].filter(s=>s).join(" "),children:[w.jsx("thead",{className:`${gt.class}__head`,children:w.jsx("tr",{className:`${gt.class}__row`,children:t&&t.map((s,n)=>w.jsx("th",{style:{width:s.size},children:w.jsx("div",{className:[`${gt.class}__cell`,s.align&&`${gt.class}__cell--align-${s.align}`].filter(a=>a).join(" "),children:s.label})},n))})}),w.jsx("tbody",{className:`${gt.class}__body`,children:e&&e.map((s,n)=>w.jsx(Vi,{columns:t,item:s},n))})]})});Bi.displayName="DsTable";const Li={None:"",Primary:"primary",Secondary:"secondary",Neutral:"neutral",Success:"success",Warning:"warning",Danger:"danger",Info:"info"},jt={name:"DsTabs",class:"ds-tabs",props:{tabs:{type:Array,required:!0},selectedTab:{type:Number,default:0},color:{type:String,default:Li.Primary,options:Object.values(Li)},className:{type:String,default:""},onChange:{type:Function,default:()=>{}}}},ru=({active:t,className:e,color:r,disabled:s,name:n,index:a,title:i,onClick:o})=>{const u=[`${jt.class}__tab`,`${jt.class}__tab-color--${r}`,t&&`${jt.class}__tab--active`,s&&`${jt.class}__tab--disabled`,e&&e].join(" "),c=d=>{o&&!s&&o(d)};return w.jsx("div",{className:u,id:n,onClick:()=>c(a),children:i})},su=({tabs:t,color:e,selectedTab:r=jt.props.selectedTab.default,className:s,onChange:n})=>{const[a,i]=F.useState(r),o=u=>{i(u),n&&n(u)};return F.useEffect(()=>i(r),[r]),w.jsxs("div",{className:[jt.class,s&&s].join(" "),children:[w.jsx("div",{className:`${jt.class}__header`,children:t.map((u,c)=>F.createElement(ru,{...u,active:a===c,color:e,index:c,key:c,onClick:()=>o(c)}))}),w.jsx("div",{className:`${jt.class}__content`,children:t[a].content})]})};function Ri({library:t,children:e,theme:r}){return w.jsx("div",{"data-library":t,"data-theme":r,children:w.jsx("div",{className:"ds-theme",children:e})})}Ri.propTypes={library:h.string,children:h.node.isRequired,theme:h.string};const zi={TopLeft:"top-left",TopCenter:"top-center",TopRight:"top-right",BottomLeft:"bottom-left",BottomCenter:"bottom-center",BottomRight:"bottom-right"},Gt={name:"DsNotificationList",class:"ds-notification-list",props:{position:{type:String,default:zi.TopRight,options:Object.values(zi)},fluid:{type:Boolean,default:!1},className:{type:String,default:""}}},dn=({className:t=Gt.props.className.default,position:e=Gt.props.position.default,fluid:r=Gt.props.fluid.default,notifications:s,removeNotification:n})=>{const a=[Gt.class,e?`${Gt.class}--${e}`:"",r?`${Gt.class}--fluid`:"",t&&t].join(" "),i=o=>{n&&n(o)};return w.jsx("div",{className:a,children:s.map(o=>{const u=o.autoClose??!0,c=o.autoCloseTimer??4e3,d=o.dismissible??!0,p=o.elevation??2,T=o.progressBar??!0;return w.jsx(ls,{autoClose:u,autoCloseTimer:c,dismissible:d,elevation:p,handleClose:()=>i(o.id),id:o.id,message:o.message,progressBar:T,type:o.type},o.id)})})};dn.propTypes={position:h.oneOf(Gt.props.position.options),fluid:h.bool,notifications:h.array,removeNotification:h.func},dn.displayName="DsNotificationList";const us={name:"TwoColumns",class:"ds-two-columns",props:{}},fn=({header:t,main:e,sidebar:r,breadcrumb:s})=>w.jsxs(as,{children:[w.jsxs("div",{className:"ds-grid",children:[w.jsx("div",{className:"ds-grid__row",children:w.jsx("div",{className:"ds-grid__col ds-grid__col-12",children:s})}),w.jsxs("div",{className:`${us.class}__content ds-grid__row`,children:[w.jsx("div",{className:"ds-grid__col ds-grid__col--lg-8 ds-grid__col--sm-12 ds-grid__col-12",children:w.jsxs(w.Fragment,{children:[w.jsx("div",{className:`${us.class}__header`,children:t}),w.jsx("div",{className:`${us.class}__main`,children:e})]})}),w.jsx("div",{className:`${us.class}__sidebar ds-grid__col ds-grid__col--lg-4 ds-grid__col--sm-12 ds-grid__col-12`,children:r})]})]}),w.jsx(lt,{vertical:"sm"})]});fn.propTypes={breadcrumb:h.node,header:h.node,main:h.node,sidebar:h.node},fn.displayName="DsTwoColumns";const qi=(t,e)=>{var r;return(r=t==null?void 0:t.errors)==null?void 0:r.reduce((s,n)=>(n.keyword==="errorMessage"||(s={...s,...nu(n,e)}),s),{})},nu=(t,e)=>{const{keyword:r,params:s}=t,n=au(t==null?void 0:t.instancePath);let a="",i=e?e+"."+n:n;if(r.match(/min/)||r.match(/max/))return a=`Tamanho ${r.match(/min/)?"mínimo":"máximo"} de ${s==null?void 0:s.limit}`,i=pn(i),{[i]:{status:!1,message:a}};switch(r){case"required":a="Campo obrigatório",i=pn(i),i=i+"."+(s==null?void 0:s.missingProperty),i.split("")[0]==="."&&(i=i.replace(".",""));break;case"pattern":a="Insira o valor no formato correto";break;case"format":a=`Formato de ${s==null?void 0:s.format} invalido`;break;default:a="Preencha o dado corretamente";break}return i=pn(i),{[i]:{status:!1,message:a}}},au=t=>{let e="";return t.split("")[0]==="/"&&(e=t.replace("/","")),e.replace(/\//g,".")},pn=t=>{const e=t.split("");return e[e.length-1]==="."?(e.pop(),e.join("")):t},Ui=(t,e,r)=>{const s=e.pop(),n=e.reduce((a,i)=>(i in a||(a[i]={}),a[i]),t);s&&(n[s]=r)},Hi=t=>{try{return{isObj:!0,parsedObj:JSON.parse(t)}}catch{return{isObj:!1,parsedObj:void 0}}},iu=t=>{const e=/^[0-9]+$/.test(t);if(t==="true"||t==="false")return JSON.parse(t);if(e)return Number(t);const{isObj:r,parsedObj:s}=Hi(t);return r&&s?s:t},hn=(t,e)=>{var n;if(!t)return null;if(t.$id===e)return t;const r=a=>{if(a)for(const i of Object.values(a)){const o=hn(i,e);if(o)return o}return null};return r(t.properties)||r(t.definitions)||r((n=t.schemas)==null?void 0:n.definitions)||hn(t.items,e)||null},mn=(t,e)=>{var s;const r=(e==null?void 0:e.definitions)||((s=e==null?void 0:e.schemas)==null?void 0:s.definitions);if(!r)return console.error('No definitions found within the schema root or inside the "schemas" key.'),null;for(const n of Object.values(r)){const a=hn(n,t);if(a)return a}return null},Ki=t=>{const e=t.format;return e!=="email"&&e!=="password"?"text":e};function Tr(t,e,r=new WeakSet){if(typeof t!="object"&&typeof e!="object")return Object.is(t,e);if(t===null&&e===null)return!0;if(typeof t!=typeof e)return!1;if(t===e||r.has(t)&&r.has(e))return!0;if(r.add(t),r.add(e),Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let s=0;s<t.length;s++)if(!Tr(t[s],e[s],r))return!1;return!0}if(Array.isArray(t)||Array.isArray(e)||Object.keys(t).length!==Object.keys(e).length)return!1;for(const[s,n]of Object.entries(t))if(!Object.prototype.hasOwnProperty.call(e,s)||!Tr(n,e[s],r))return!1;return!0}var gn={exports:{}},Gi={},ct={},lr={},Or={},ue={},Ar={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(D){if(super(),!t.IDENTIFIER.test(D))throw new Error("CodeGen: name must be a valid identifier");this.str=D}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class s extends e{constructor(D){super(),this._items=typeof D=="string"?[D]:D}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const D=this._items[0];return D===""||D==='""'}get str(){var D;return(D=this._str)!==null&&D!==void 0?D:this._str=this._items.reduce((N,I)=>`${N}${I}`,"")}get names(){var D;return(D=this._names)!==null&&D!==void 0?D:this._names=this._items.reduce((N,I)=>(I instanceof r&&(N[I.str]=(N[I.str]||0)+1),N),{})}}t._Code=s,t.nil=new s("");function n(g,...D){const N=[g[0]];let I=0;for(;I<D.length;)o(N,D[I]),N.push(g[++I]);return new s(N)}t._=n;const a=new s("+");function i(g,...D){const N=[E(g[0])];let I=0;for(;I<D.length;)N.push(a),o(N,D[I]),N.push(a,E(g[++I]));return u(N),new s(N)}t.str=i;function o(g,D){D instanceof s?g.push(...D._items):D instanceof r?g.push(D):g.push(p(D))}t.addCodeArg=o;function u(g){let D=1;for(;D<g.length-1;){if(g[D]===a){const N=c(g[D-1],g[D+1]);if(N!==void 0){g.splice(D-1,3,N);continue}g[D++]="+"}D++}}function c(g,D){if(D==='""')return g;if(g==='""')return D;if(typeof g=="string")return D instanceof r||g[g.length-1]!=='"'?void 0:typeof D!="string"?`${g.slice(0,-1)}${D}"`:D[0]==='"'?g.slice(0,-1)+D.slice(1):void 0;if(typeof D=="string"&&D[0]==='"'&&!(g instanceof r))return`"${g}${D.slice(1)}`}function d(g,D){return D.emptyStr()?g:g.emptyStr()?D:i`${g}${D}`}t.strConcat=d;function p(g){return typeof g=="number"||typeof g=="boolean"||g===null?g:E(Array.isArray(g)?g.join(","):g)}function T(g){return new s(E(g))}t.stringify=T;function E(g){return JSON.stringify(g).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=E;function k(g){return typeof g=="string"&&t.IDENTIFIER.test(g)?new s(`.${g}`):n`[${g}]`}t.getProperty=k;function S(g){if(typeof g=="string"&&t.IDENTIFIER.test(g))return new s(`${g}`);throw new Error(`CodeGen: invalid export name: ${g}, use explicit $id name mapping`)}t.getEsmExportName=S;function _(g){return new s(g.toString())}t.regexpCode=_})(Ar);var yn={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=Ar;class r extends Error{constructor(c){super(`CodeGen: "code" for ${c} not defined`),this.value=c.value}}var s;(function(u){u[u.Started=0]="Started",u[u.Completed=1]="Completed"})(s||(t.UsedValueState=s={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class n{constructor({prefixes:c,parent:d}={}){this._names={},this._prefixes=c,this._parent=d}toName(c){return c instanceof e.Name?c:this.name(c)}name(c){return new e.Name(this._newName(c))}_newName(c){const d=this._names[c]||this._nameGroup(c);return`${c}${d.index++}`}_nameGroup(c){var d,p;if(!((p=(d=this._parent)===null||d===void 0?void 0:d._prefixes)===null||p===void 0)&&p.has(c)||this._prefixes&&!this._prefixes.has(c))throw new Error(`CodeGen: prefix "${c}" is not allowed in this scope`);return this._names[c]={prefix:c,index:0}}}t.Scope=n;class a extends e.Name{constructor(c,d){super(d),this.prefix=c}setValue(c,{property:d,itemIndex:p}){this.value=c,this.scopePath=(0,e._)`.${new e.Name(d)}[${p}]`}}t.ValueScopeName=a;const i=(0,e._)`\n`;class o extends n{constructor(c){super(c),this._values={},this._scope=c.scope,this.opts={...c,_n:c.lines?i:e.nil}}get(){return this._scope}name(c){return new a(c,this._newName(c))}value(c,d){var p;if(d.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const T=this.toName(c),{prefix:E}=T,k=(p=d.key)!==null&&p!==void 0?p:d.ref;let S=this._values[E];if(S){const D=S.get(k);if(D)return D}else S=this._values[E]=new Map;S.set(k,T);const _=this._scope[E]||(this._scope[E]=[]),g=_.length;return _[g]=d.ref,T.setValue(d,{property:E,itemIndex:g}),T}getValue(c,d){const p=this._values[c];if(p)return p.get(d)}scopeRefs(c,d=this._values){return this._reduceValues(d,p=>{if(p.scopePath===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return(0,e._)`${c}${p.scopePath}`})}scopeCode(c=this._values,d,p){return this._reduceValues(c,T=>{if(T.value===void 0)throw new Error(`CodeGen: name "${T}" has no value`);return T.value.code},d,p)}_reduceValues(c,d,p={},T){let E=e.nil;for(const k in c){const S=c[k];if(!S)continue;const _=p[k]=p[k]||new Map;S.forEach(g=>{if(_.has(g))return;_.set(g,s.Started);let D=d(g);if(D){const N=this.opts.es5?t.varKinds.var:t.varKinds.const;E=(0,e._)`${E}${N} ${g} = ${D};${this.opts._n}`}else if(D=T==null?void 0:T(g))E=(0,e._)`${E}${D}${this.opts._n}`;else throw new r(g);_.set(g,s.Completed)})}return E}}t.ValueScope=o})(yn),function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const e=Ar,r=yn;var s=Ar;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return s.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return s.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return s.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return s.Name}});var n=yn;Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return n.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return n.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return n.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return n.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class a{optimizeNodes(){return this}optimizeNames(l,f){return this}}class i extends a{constructor(l,f,v){super(),this.varKind=l,this.name=f,this.rhs=v}render({es5:l,_n:f}){const v=l?r.varKinds.var:this.varKind,P=this.rhs===void 0?"":` = ${this.rhs}`;return`${v} ${this.name}${P};`+f}optimizeNames(l,f){if(l[this.name.str])return this.rhs&&(this.rhs=W(this.rhs,l,f)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class o extends a{constructor(l,f,v){super(),this.lhs=l,this.rhs=f,this.sideEffects=v}render({_n:l}){return`${this.lhs} = ${this.rhs};`+l}optimizeNames(l,f){if(!(this.lhs instanceof e.Name&&!l[this.lhs.str]&&!this.sideEffects))return this.rhs=W(this.rhs,l,f),this}get names(){const l=this.lhs instanceof e.Name?{}:{...this.lhs.names};return ne(l,this.rhs)}}class u extends o{constructor(l,f,v,P){super(l,v,P),this.op=f}render({_n:l}){return`${this.lhs} ${this.op}= ${this.rhs};`+l}}class c extends a{constructor(l){super(),this.label=l,this.names={}}render({_n:l}){return`${this.label}:`+l}}class d extends a{constructor(l){super(),this.label=l,this.names={}}render({_n:l}){return`break${this.label?` ${this.label}`:""};`+l}}class p extends a{constructor(l){super(),this.error=l}render({_n:l}){return`throw ${this.error};`+l}get names(){return this.error.names}}class T extends a{constructor(l){super(),this.code=l}render({_n:l}){return`${this.code};`+l}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(l,f){return this.code=W(this.code,l,f),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class E extends a{constructor(l=[]){super(),this.nodes=l}render(l){return this.nodes.reduce((f,v)=>f+v.render(l),"")}optimizeNodes(){const{nodes:l}=this;let f=l.length;for(;f--;){const v=l[f].optimizeNodes();Array.isArray(v)?l.splice(f,1,...v):v?l[f]=v:l.splice(f,1)}return l.length>0?this:void 0}optimizeNames(l,f){const{nodes:v}=this;let P=v.length;for(;P--;){const V=v[P];V.optimizeNames(l,f)||(he(l,V.names),v.splice(P,1))}return v.length>0?this:void 0}get names(){return this.nodes.reduce((l,f)=>G(l,f.names),{})}}class k extends E{render(l){return"{"+l._n+super.render(l)+"}"+l._n}}class S extends E{}class _ extends k{}_.kind="else";class g extends k{constructor(l,f){super(f),this.condition=l}render(l){let f=`if(${this.condition})`+super.render(l);return this.else&&(f+="else "+this.else.render(l)),f}optimizeNodes(){super.optimizeNodes();const l=this.condition;if(l===!0)return this.nodes;let f=this.else;if(f){const v=f.optimizeNodes();f=this.else=Array.isArray(v)?new _(v):v}if(f)return l===!1?f instanceof g?f:f.nodes:this.nodes.length?this:new g(me(l),f instanceof g?[f]:f.nodes);if(!(l===!1||!this.nodes.length))return this}optimizeNames(l,f){var v;if(this.else=(v=this.else)===null||v===void 0?void 0:v.optimizeNames(l,f),!!(super.optimizeNames(l,f)||this.else))return this.condition=W(this.condition,l,f),this}get names(){const l=super.names;return ne(l,this.condition),this.else&&G(l,this.else.names),l}}g.kind="if";class D extends k{}D.kind="for";class N extends D{constructor(l){super(),this.iteration=l}render(l){return`for(${this.iteration})`+super.render(l)}optimizeNames(l,f){if(super.optimizeNames(l,f))return this.iteration=W(this.iteration,l,f),this}get names(){return G(super.names,this.iteration.names)}}class I extends D{constructor(l,f,v,P){super(),this.varKind=l,this.name=f,this.from=v,this.to=P}render(l){const f=l.es5?r.varKinds.var:this.varKind,{name:v,from:P,to:V}=this;return`for(${f} ${v}=${P}; ${v}<${V}; ${v}++)`+super.render(l)}get names(){const l=ne(super.names,this.from);return ne(l,this.to)}}class b extends D{constructor(l,f,v,P){super(),this.loop=l,this.varKind=f,this.name=v,this.iterable=P}render(l){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(l)}optimizeNames(l,f){if(super.optimizeNames(l,f))return this.iterable=W(this.iterable,l,f),this}get names(){return G(super.names,this.iterable.names)}}class R extends k{constructor(l,f,v){super(),this.name=l,this.args=f,this.async=v}render(l){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(l)}}R.kind="func";class L extends E{render(l){return"return "+super.render(l)}}L.kind="return";class ee extends k{render(l){let f="try"+super.render(l);return this.catch&&(f+=this.catch.render(l)),this.finally&&(f+=this.finally.render(l)),f}optimizeNodes(){var l,f;return super.optimizeNodes(),(l=this.catch)===null||l===void 0||l.optimizeNodes(),(f=this.finally)===null||f===void 0||f.optimizeNodes(),this}optimizeNames(l,f){var v,P;return super.optimizeNames(l,f),(v=this.catch)===null||v===void 0||v.optimizeNames(l,f),(P=this.finally)===null||P===void 0||P.optimizeNames(l,f),this}get names(){const l=super.names;return this.catch&&G(l,this.catch.names),this.finally&&G(l,this.finally.names),l}}class U extends k{constructor(l){super(),this.error=l}render(l){return`catch(${this.error})`+super.render(l)}}U.kind="catch";class oe extends k{render(l){return"finally"+super.render(l)}}oe.kind="finally";class H{constructor(l,f={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...f,_n:f.lines?`
|
|
21
|
+
`:""},this._extScope=l,this._scope=new r.Scope({parent:l}),this._nodes=[new S]}toString(){return this._root.render(this.opts)}name(l){return this._scope.name(l)}scopeName(l){return this._extScope.name(l)}scopeValue(l,f){const v=this._extScope.value(l,f);return(this._values[v.prefix]||(this._values[v.prefix]=new Set)).add(v),v}getScopeValue(l,f){return this._extScope.getValue(l,f)}scopeRefs(l){return this._extScope.scopeRefs(l,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(l,f,v,P){const V=this._scope.toName(f);return v!==void 0&&P&&(this._constants[V.str]=v),this._leafNode(new i(l,V,v)),V}const(l,f,v){return this._def(r.varKinds.const,l,f,v)}let(l,f,v){return this._def(r.varKinds.let,l,f,v)}var(l,f,v){return this._def(r.varKinds.var,l,f,v)}assign(l,f,v){return this._leafNode(new o(l,f,v))}add(l,f){return this._leafNode(new u(l,t.operators.ADD,f))}code(l){return typeof l=="function"?l():l!==e.nil&&this._leafNode(new T(l)),this}object(...l){const f=["{"];for(const[v,P]of l)f.length>1&&f.push(","),f.push(v),(v!==P||this.opts.es5)&&(f.push(":"),(0,e.addCodeArg)(f,P));return f.push("}"),new e._Code(f)}if(l,f,v){if(this._blockNode(new g(l)),f&&v)this.code(f).else().code(v).endIf();else if(f)this.code(f).endIf();else if(v)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(l){return this._elseNode(new g(l))}else(){return this._elseNode(new _)}endIf(){return this._endBlockNode(g,_)}_for(l,f){return this._blockNode(l),f&&this.code(f).endFor(),this}for(l,f){return this._for(new N(l),f)}forRange(l,f,v,P,V=this.opts.es5?r.varKinds.var:r.varKinds.let){const B=this._scope.toName(l);return this._for(new I(V,B,f,v),()=>P(B))}forOf(l,f,v,P=r.varKinds.const){const V=this._scope.toName(l);if(this.opts.es5){const B=f instanceof e.Name?f:this.var("_arr",f);return this.forRange("_i",0,(0,e._)`${B}.length`,z=>{this.var(V,(0,e._)`${B}[${z}]`),v(V)})}return this._for(new b("of",P,V,f),()=>v(V))}forIn(l,f,v,P=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(l,(0,e._)`Object.keys(${f})`,v);const V=this._scope.toName(l);return this._for(new b("in",P,V,f),()=>v(V))}endFor(){return this._endBlockNode(D)}label(l){return this._leafNode(new c(l))}break(l){return this._leafNode(new d(l))}return(l){const f=new L;if(this._blockNode(f),this.code(l),f.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(L)}try(l,f,v){if(!f&&!v)throw new Error('CodeGen: "try" without "catch" and "finally"');const P=new ee;if(this._blockNode(P),this.code(l),f){const V=this.name("e");this._currNode=P.catch=new U(V),f(V)}return v&&(this._currNode=P.finally=new oe,this.code(v)),this._endBlockNode(U,oe)}throw(l){return this._leafNode(new p(l))}block(l,f){return this._blockStarts.push(this._nodes.length),l&&this.code(l).endBlock(f),this}endBlock(l){const f=this._blockStarts.pop();if(f===void 0)throw new Error("CodeGen: not in self-balancing block");const v=this._nodes.length-f;if(v<0||l!==void 0&&v!==l)throw new Error(`CodeGen: wrong number of nodes: ${v} vs ${l} expected`);return this._nodes.length=f,this}func(l,f=e.nil,v,P){return this._blockNode(new R(l,f,v)),P&&this.code(P).endFunc(),this}endFunc(){return this._endBlockNode(R)}optimize(l=1){for(;l-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(l){return this._currNode.nodes.push(l),this}_blockNode(l){this._currNode.nodes.push(l),this._nodes.push(l)}_endBlockNode(l,f){const v=this._currNode;if(v instanceof l||f&&v instanceof f)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${f?`${l.kind}/${f.kind}`:l.kind}"`)}_elseNode(l){const f=this._currNode;if(!(f instanceof g))throw new Error('CodeGen: "else" without "if"');return this._currNode=f.else=l,this}get _root(){return this._nodes[0]}get _currNode(){const l=this._nodes;return l[l.length-1]}set _currNode(l){const f=this._nodes;f[f.length-1]=l}}t.CodeGen=H;function G(O,l){for(const f in l)O[f]=(O[f]||0)+(l[f]||0);return O}function ne(O,l){return l instanceof e._CodeOrName?G(O,l.names):O}function W(O,l,f){if(O instanceof e.Name)return v(O);if(!P(O))return O;return new e._Code(O._items.reduce((V,B)=>(B instanceof e.Name&&(B=v(B)),B instanceof e._Code?V.push(...B._items):V.push(B),V),[]));function v(V){const B=f[V.str];return B===void 0||l[V.str]!==1?V:(delete l[V.str],B)}function P(V){return V instanceof e._Code&&V._items.some(B=>B instanceof e.Name&&l[B.str]===1&&f[B.str]!==void 0)}}function he(O,l){for(const f in l)O[f]=(O[f]||0)-(l[f]||0)}function me(O){return typeof O=="boolean"||typeof O=="number"||O===null?!O:(0,e._)`!${M(O)}`}t.not=me;const _e=y(t.operators.AND);function Ie(...O){return O.reduce(_e)}t.and=Ie;const Fe=y(t.operators.OR);function A(...O){return O.reduce(Fe)}t.or=A;function y(O){return(l,f)=>l===e.nil?f:f===e.nil?l:(0,e._)`${M(l)} ${O} ${M(f)}`}function M(O){return O instanceof e.Name?O:(0,e._)`(${O})`}}(ue);var K={};Object.defineProperty(K,"__esModule",{value:!0}),K.checkStrictMode=K.getErrorPath=K.Type=K.useFunc=K.setEvaluated=K.evaluatedPropsToName=K.mergeEvaluated=K.eachItem=K.unescapeJsonPointer=K.escapeJsonPointer=K.escapeFragment=K.unescapeFragment=K.schemaRefOrVal=K.schemaHasRulesButRef=K.schemaHasRules=K.checkUnknownRules=K.alwaysValidSchema=K.toHash=void 0;const be=ue,ou=Ar;function lu(t){const e={};for(const r of t)e[r]=!0;return e}K.toHash=lu;function uu(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Wi(t,e),!Yi(e,t.self.RULES.all))}K.alwaysValidSchema=uu;function Wi(t,e=t.schema){const{opts:r,self:s}=t;if(!r.strictSchema||typeof e=="boolean")return;const n=s.RULES.keywords;for(const a in e)n[a]||eo(t,`unknown keyword: "${a}"`)}K.checkUnknownRules=Wi;function Yi(t,e){if(typeof t=="boolean")return!t;for(const r in t)if(e[r])return!0;return!1}K.schemaHasRules=Yi;function cu(t,e){if(typeof t=="boolean")return!t;for(const r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}K.schemaHasRulesButRef=cu;function du({topSchemaRef:t,schemaPath:e},r,s,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,be._)`${r}`}return(0,be._)`${t}${e}${(0,be.getProperty)(s)}`}K.schemaRefOrVal=du;function fu(t){return Xi(decodeURIComponent(t))}K.unescapeFragment=fu;function pu(t){return encodeURIComponent(vn(t))}K.escapeFragment=pu;function vn(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}K.escapeJsonPointer=vn;function Xi(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}K.unescapeJsonPointer=Xi;function hu(t,e){if(Array.isArray(t))for(const r of t)e(r);else e(t)}K.eachItem=hu;function Ji({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:s}){return(n,a,i,o)=>{const u=i===void 0?a:i instanceof be.Name?(a instanceof be.Name?t(n,a,i):e(n,a,i),i):a instanceof be.Name?(e(n,i,a),a):r(a,i);return o===be.Name&&!(u instanceof be.Name)?s(n,u):u}}K.mergeEvaluated={props:Ji({mergeNames:(t,e,r)=>t.if((0,be._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,be._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,be._)`${r} || {}`).code((0,be._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,be._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,be._)`${r} || {}`),_n(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:Zi}),items:Ji({mergeNames:(t,e,r)=>t.if((0,be._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,be._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,be._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,be._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function Zi(t,e){if(e===!0)return t.var("props",!0);const r=t.var("props",(0,be._)`{}`);return e!==void 0&&_n(t,r,e),r}K.evaluatedPropsToName=Zi;function _n(t,e,r){Object.keys(r).forEach(s=>t.assign((0,be._)`${e}${(0,be.getProperty)(s)}`,!0))}K.setEvaluated=_n;const Qi={};function mu(t,e){return t.scopeValue("func",{ref:e,code:Qi[e.code]||(Qi[e.code]=new ou._Code(e.code))})}K.useFunc=mu;var bn;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(bn||(K.Type=bn={}));function gu(t,e,r){if(t instanceof be.Name){const s=e===bn.Num;return r?s?(0,be._)`"[" + ${t} + "]"`:(0,be._)`"['" + ${t} + "']"`:s?(0,be._)`"/" + ${t}`:(0,be._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,be.getProperty)(t).toString():"/"+vn(t)}K.getErrorPath=gu;function eo(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}K.checkStrictMode=eo;var yt={};Object.defineProperty(yt,"__esModule",{value:!0});const He=ue,yu={data:new He.Name("data"),valCxt:new He.Name("valCxt"),instancePath:new He.Name("instancePath"),parentData:new He.Name("parentData"),parentDataProperty:new He.Name("parentDataProperty"),rootData:new He.Name("rootData"),dynamicAnchors:new He.Name("dynamicAnchors"),vErrors:new He.Name("vErrors"),errors:new He.Name("errors"),this:new He.Name("this"),self:new He.Name("self"),scope:new He.Name("scope"),json:new He.Name("json"),jsonPos:new He.Name("jsonPos"),jsonLen:new He.Name("jsonLen"),jsonPart:new He.Name("jsonPart")};yt.default=yu,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const e=ue,r=K,s=yt;t.keywordError={message:({keyword:_})=>(0,e.str)`must pass "${_}" keyword validation`},t.keyword$DataError={message:({keyword:_,schemaType:g})=>g?(0,e.str)`"${_}" keyword must be ${g} ($data)`:(0,e.str)`"${_}" keyword is invalid ($data)`};function n(_,g=t.keywordError,D,N){const{it:I}=_,{gen:b,compositeRule:R,allErrors:L}=I,ee=p(_,g,D);N??(R||L)?u(b,ee):c(I,(0,e._)`[${ee}]`)}t.reportError=n;function a(_,g=t.keywordError,D){const{it:N}=_,{gen:I,compositeRule:b,allErrors:R}=N,L=p(_,g,D);u(I,L),b||R||c(N,s.default.vErrors)}t.reportExtraError=a;function i(_,g){_.assign(s.default.errors,g),_.if((0,e._)`${s.default.vErrors} !== null`,()=>_.if(g,()=>_.assign((0,e._)`${s.default.vErrors}.length`,g),()=>_.assign(s.default.vErrors,null)))}t.resetErrorsCount=i;function o({gen:_,keyword:g,schemaValue:D,data:N,errsCount:I,it:b}){if(I===void 0)throw new Error("ajv implementation error");const R=_.name("err");_.forRange("i",I,s.default.errors,L=>{_.const(R,(0,e._)`${s.default.vErrors}[${L}]`),_.if((0,e._)`${R}.instancePath === undefined`,()=>_.assign((0,e._)`${R}.instancePath`,(0,e.strConcat)(s.default.instancePath,b.errorPath))),_.assign((0,e._)`${R}.schemaPath`,(0,e.str)`${b.errSchemaPath}/${g}`),b.opts.verbose&&(_.assign((0,e._)`${R}.schema`,D),_.assign((0,e._)`${R}.data`,N))})}t.extendErrors=o;function u(_,g){const D=_.const("err",g);_.if((0,e._)`${s.default.vErrors} === null`,()=>_.assign(s.default.vErrors,(0,e._)`[${D}]`),(0,e._)`${s.default.vErrors}.push(${D})`),_.code((0,e._)`${s.default.errors}++`)}function c(_,g){const{gen:D,validateName:N,schemaEnv:I}=_;I.$async?D.throw((0,e._)`new ${_.ValidationError}(${g})`):(D.assign((0,e._)`${N}.errors`,g),D.return(!1))}const d={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function p(_,g,D){const{createErrors:N}=_.it;return N===!1?(0,e._)`{}`:T(_,g,D)}function T(_,g,D={}){const{gen:N,it:I}=_,b=[E(I,D),k(_,D)];return S(_,g,b),N.object(...b)}function E({errorPath:_},{instancePath:g}){const D=g?(0,e.str)`${_}${(0,r.getErrorPath)(g,r.Type.Str)}`:_;return[s.default.instancePath,(0,e.strConcat)(s.default.instancePath,D)]}function k({keyword:_,it:{errSchemaPath:g}},{schemaPath:D,parentSchema:N}){let I=N?g:(0,e.str)`${g}/${_}`;return D&&(I=(0,e.str)`${I}${(0,r.getErrorPath)(D,r.Type.Str)}`),[d.schemaPath,I]}function S(_,{params:g,message:D},N){const{keyword:I,data:b,schemaValue:R,it:L}=_,{opts:ee,propertyName:U,topSchemaRef:oe,schemaPath:H}=L;N.push([d.keyword,I],[d.params,typeof g=="function"?g(_):g||(0,e._)`{}`]),ee.messages&&N.push([d.message,typeof D=="function"?D(_):D]),ee.verbose&&N.push([d.schema,R],[d.parentSchema,(0,e._)`${oe}${H}`],[s.default.data,b]),U&&N.push([d.propertyName,U])}}(Or),Object.defineProperty(lr,"__esModule",{value:!0}),lr.boolOrEmptySchema=lr.topBoolOrEmptySchema=void 0;const vu=Or,_u=ue,bu=yt,$u={message:"boolean schema is false"};function Su(t){const{gen:e,schema:r,validateName:s}=t;r===!1?to(t,!1):typeof r=="object"&&r.$async===!0?e.return(bu.default.data):(e.assign((0,_u._)`${s}.errors`,null),e.return(!0))}lr.topBoolOrEmptySchema=Su;function Eu(t,e){const{gen:r,schema:s}=t;s===!1?(r.var(e,!1),to(t)):r.var(e,!0)}lr.boolOrEmptySchema=Eu;function to(t,e){const{gen:r,data:s}=t,n={gen:r,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,vu.reportError)(n,$u,void 0,e)}var je={},Wt={};Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.getRules=Wt.isJSONType=void 0;const ku=["string","number","integer","boolean","null","object","array"],wu=new Set(ku);function Cu(t){return typeof t=="string"&&wu.has(t)}Wt.isJSONType=Cu;function Tu(){const t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}Wt.getRules=Tu;var It={};Object.defineProperty(It,"__esModule",{value:!0}),It.shouldUseRule=It.shouldUseGroup=It.schemaHasRulesForType=void 0;function Ou({schema:t,self:e},r){const s=e.RULES.types[r];return s&&s!==!0&&ro(t,s)}It.schemaHasRulesForType=Ou;function ro(t,e){return e.rules.some(r=>so(t,r))}It.shouldUseGroup=ro;function so(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(s=>t[s]!==void 0))}It.shouldUseRule=so,Object.defineProperty(je,"__esModule",{value:!0}),je.reportTypeError=je.checkDataTypes=je.checkDataType=je.coerceAndCheckDataType=je.getJSONTypes=je.getSchemaTypes=je.DataType=void 0;const Au=Wt,Du=It,Iu=Or,ie=ue,no=K;var ur;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(ur||(je.DataType=ur={}));function Nu(t){const e=ao(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}je.getSchemaTypes=Nu;function ao(t){const e=Array.isArray(t)?t:t?[t]:[];if(e.every(Au.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}je.getJSONTypes=ao;function Pu(t,e){const{gen:r,data:s,opts:n}=t,a=Fu(e,n.coerceTypes),i=e.length>0&&!(a.length===0&&e.length===1&&(0,Du.schemaHasRulesForType)(t,e[0]));if(i){const o=Sn(e,s,n.strictNumbers,ur.Wrong);r.if(o,()=>{a.length?Mu(t,e,a):En(t)})}return i}je.coerceAndCheckDataType=Pu;const io=new Set(["string","number","integer","boolean","null"]);function Fu(t,e){return e?t.filter(r=>io.has(r)||e==="array"&&r==="array"):[]}function Mu(t,e,r){const{gen:s,data:n,opts:a}=t,i=s.let("dataType",(0,ie._)`typeof ${n}`),o=s.let("coerced",(0,ie._)`undefined`);a.coerceTypes==="array"&&s.if((0,ie._)`${i} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>s.assign(n,(0,ie._)`${n}[0]`).assign(i,(0,ie._)`typeof ${n}`).if(Sn(e,n,a.strictNumbers),()=>s.assign(o,n))),s.if((0,ie._)`${o} !== undefined`);for(const c of r)(io.has(c)||c==="array"&&a.coerceTypes==="array")&&u(c);s.else(),En(t),s.endIf(),s.if((0,ie._)`${o} !== undefined`,()=>{s.assign(n,o),ju(t,o)});function u(c){switch(c){case"string":s.elseIf((0,ie._)`${i} == "number" || ${i} == "boolean"`).assign(o,(0,ie._)`"" + ${n}`).elseIf((0,ie._)`${n} === null`).assign(o,(0,ie._)`""`);return;case"number":s.elseIf((0,ie._)`${i} == "boolean" || ${n} === null
|
|
22
22
|
|| (${i} == "string" && ${n} && ${n} == +${n})`).assign(o,(0,ie._)`+${n}`);return;case"integer":s.elseIf((0,ie._)`${i} === "boolean" || ${n} === null
|
|
23
23
|
|| (${i} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(o,(0,ie._)`+${n}`);return;case"boolean":s.elseIf((0,ie._)`${n} === "false" || ${n} === 0 || ${n} === null`).assign(o,!1).elseIf((0,ie._)`${n} === "true" || ${n} === 1`).assign(o,!0);return;case"null":s.elseIf((0,ie._)`${n} === "" || ${n} === 0 || ${n} === false`),s.assign(o,null);return;case"array":s.elseIf((0,ie._)`${i} === "string" || ${i} === "number"
|
|
24
|
-
|| ${i} === "boolean" || ${n} === null`).assign(o,(0,ie._)`[${n}]`)}}}function Mu({gen:t,parentData:e,parentDataProperty:r},s){t.if((0,ie._)`${e} !== undefined`,()=>t.assign((0,ie._)`${e}[${r}]`,s))}function Sn(t,e,r,s=ur.Correct){const n=s===ur.Correct?ie.operators.EQ:ie.operators.NEQ;let a;switch(t){case"null":return(0,ie._)`${e} ${n} null`;case"array":a=(0,ie._)`Array.isArray(${e})`;break;case"object":a=(0,ie._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":a=i((0,ie._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":a=i();break;default:return(0,ie._)`typeof ${e} ${n} ${t}`}return s===ur.Correct?a:(0,ie.not)(a);function i(o=ie.nil){return(0,ie.and)((0,ie._)`typeof ${e} == "number"`,o,r?(0,ie._)`isFinite(${e})`:ie.nil)}}je.checkDataType=Sn;function En(t,e,r,s){if(t.length===1)return Sn(t[0],e,r,s);let n;const a=(0,so.toHash)(t);if(a.array&&a.object){const i=(0,ie._)`typeof ${e} != "object"`;n=a.null?i:(0,ie._)`!${e} || ${i}`,delete a.null,delete a.array,delete a.object}else n=ie.nil;a.number&&delete a.integer;for(const i in a)n=(0,ie.and)(n,Sn(i,e,r,s));return n}je.checkDataTypes=En;const ju={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,ie._)`{type: ${t}}`:(0,ie._)`{type: ${e}}`};function kn(t){const e=xu(t);(0,Du.reportError)(e,ju)}je.reportTypeError=kn;function xu(t){const{gen:e,data:r,schema:s}=t,n=(0,so.schemaRefOrVal)(t,s,"type");return{gen:e,keyword:"type",data:r,schema:s.type,schemaCode:n,schemaValue:n,parentSchema:s,params:{},it:t}}var us={};Object.defineProperty(us,"__esModule",{value:!0}),us.assignDefaults=void 0;const cr=le,Vu=H;function Bu(t,e){const{properties:r,items:s}=t.schema;if(e==="object"&&r)for(const n in r)io(t,n,r[n].default);else e==="array"&&Array.isArray(s)&&s.forEach((n,a)=>io(t,a,n.default))}us.assignDefaults=Bu;function io(t,e,r){const{gen:s,compositeRule:n,data:a,opts:i}=t;if(r===void 0)return;const o=(0,cr._)`${a}${(0,cr.getProperty)(e)}`;if(n){(0,Vu.checkStrictMode)(t,`default is ignored for: ${o}`);return}let u=(0,cr._)`${o} === undefined`;i.useDefaults==="empty"&&(u=(0,cr._)`${u} || ${o} === null || ${o} === ""`),s.if(u,(0,cr._)`${o} = ${(0,cr.stringify)(r)}`)}var vt={},ue={};Object.defineProperty(ue,"__esModule",{value:!0}),ue.validateUnion=ue.validateArray=ue.usePattern=ue.callValidateCode=ue.schemaProperties=ue.allSchemaProperties=ue.noPropertyInData=ue.propertyInData=ue.isOwnProperty=ue.hasPropFunc=ue.reportMissingProp=ue.checkMissingProp=ue.checkReportMissingProp=void 0;const Ee=le,wn=H,xt=yt,Lu=H;function Ru(t,e){const{gen:r,data:s,it:n}=t;r.if(Tn(r,s,e,n.opts.ownProperties),()=>{t.setParams({missingProperty:(0,Ee._)`${e}`},!0),t.error()})}ue.checkReportMissingProp=Ru;function zu({gen:t,data:e,it:{opts:r}},s,n){return(0,Ee.or)(...s.map(a=>(0,Ee.and)(Tn(t,e,a,r.ownProperties),(0,Ee._)`${n} = ${a}`)))}ue.checkMissingProp=zu;function qu(t,e){t.setParams({missingProperty:e},!0),t.error()}ue.reportMissingProp=qu;function oo(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Ee._)`Object.prototype.hasOwnProperty`})}ue.hasPropFunc=oo;function Cn(t,e,r){return(0,Ee._)`${oo(t)}.call(${e}, ${r})`}ue.isOwnProperty=Cn;function Uu(t,e,r,s){const n=(0,Ee._)`${e}${(0,Ee.getProperty)(r)} !== undefined`;return s?(0,Ee._)`${n} && ${Cn(t,e,r)}`:n}ue.propertyInData=Uu;function Tn(t,e,r,s){const n=(0,Ee._)`${e}${(0,Ee.getProperty)(r)} === undefined`;return s?(0,Ee.or)(n,(0,Ee.not)(Cn(t,e,r))):n}ue.noPropertyInData=Tn;function lo(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}ue.allSchemaProperties=lo;function Hu(t,e){return lo(e).filter(r=>!(0,wn.alwaysValidSchema)(t,e[r]))}ue.schemaProperties=Hu;function Ku({schemaCode:t,data:e,it:{gen:r,topSchemaRef:s,schemaPath:n,errorPath:a},it:i},o,u,c){const d=c?(0,Ee._)`${t}, ${e}, ${s}${n}`:e,p=[[xt.default.instancePath,(0,Ee.strConcat)(xt.default.instancePath,a)],[xt.default.parentData,i.parentData],[xt.default.parentDataProperty,i.parentDataProperty],[xt.default.rootData,xt.default.rootData]];i.opts.dynamicRef&&p.push([xt.default.dynamicAnchors,xt.default.dynamicAnchors]);const T=(0,Ee._)`${d}, ${r.object(...p)}`;return u!==Ee.nil?(0,Ee._)`${o}.call(${u}, ${T})`:(0,Ee._)`${o}(${T})`}ue.callValidateCode=Ku;const Gu=(0,Ee._)`new RegExp`;function Wu({gen:t,it:{opts:e}},r){const s=e.unicodeRegExp?"u":"",{regExp:n}=e.code,a=n(r,s);return t.scopeValue("pattern",{key:a.toString(),ref:a,code:(0,Ee._)`${n.code==="new RegExp"?Gu:(0,Lu.useFunc)(t,n)}(${r}, ${s})`})}ue.usePattern=Wu;function Yu(t){const{gen:e,data:r,keyword:s,it:n}=t,a=e.name("valid");if(n.allErrors){const o=e.let("valid",!0);return i(()=>e.assign(o,!1)),o}return e.var(a,!0),i(()=>e.break()),a;function i(o){const u=e.const("len",(0,Ee._)`${r}.length`);e.forRange("i",0,u,c=>{t.subschema({keyword:s,dataProp:c,dataPropType:wn.Type.Num},a),e.if((0,Ee.not)(a),o)})}}ue.validateArray=Yu;function Xu(t){const{gen:e,schema:r,keyword:s,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(u=>(0,wn.alwaysValidSchema)(n,u))&&!n.opts.unevaluated)return;const i=e.let("valid",!1),o=e.name("_valid");e.block(()=>r.forEach((u,c)=>{const d=t.subschema({keyword:s,schemaProp:c,compositeRule:!0},o);e.assign(i,(0,Ee._)`${i} || ${o}`),t.mergeValidEvaluated(d,o)||e.if((0,Ee.not)(i))})),t.result(i,()=>t.reset(),()=>t.error(!0))}ue.validateUnion=Xu,Object.defineProperty(vt,"__esModule",{value:!0}),vt.validateKeywordUsage=vt.validSchemaType=vt.funcKeywordCode=vt.macroKeywordCode=void 0;const Ke=le,Yt=yt,Ju=ue,Zu=Or;function Qu(t,e){const{gen:r,keyword:s,schema:n,parentSchema:a,it:i}=t,o=e.macro.call(i.self,n,a,i),u=co(r,s,o);i.opts.validateSchema!==!1&&i.self.validateSchema(o,!0);const c=r.name("valid");t.subschema({schema:o,schemaPath:Ke.nil,errSchemaPath:`${i.errSchemaPath}/${s}`,topSchemaRef:u,compositeRule:!0},c),t.pass(c,()=>t.error(!0))}vt.macroKeywordCode=Qu;function ec(t,e){var r;const{gen:s,keyword:n,schema:a,parentSchema:i,$data:o,it:u}=t;rc(u,e);const c=!o&&e.compile?e.compile.call(u.self,a,i,u):e.validate,d=co(s,n,c),p=s.let("valid");t.block$data(p,T),t.ok((r=e.valid)!==null&&r!==void 0?r:p);function T(){if(e.errors===!1)k(),e.modifying&&uo(t),_(()=>t.error());else{const g=e.async?S():E();e.modifying&&uo(t),_(()=>tc(t,g))}}function S(){const g=s.let("ruleErrs",null);return s.try(()=>k((0,Ke._)`await `),I=>s.assign(p,!1).if((0,Ke._)`${I} instanceof ${u.ValidationError}`,()=>s.assign(g,(0,Ke._)`${I}.errors`),()=>s.throw(I))),g}function E(){const g=(0,Ke._)`${d}.errors`;return s.assign(g,null),k(Ke.nil),g}function k(g=e.async?(0,Ke._)`await `:Ke.nil){const I=u.opts.passContext?Yt.default.this:Yt.default.self,N=!("compile"in e&&!o||e.schema===!1);s.assign(p,(0,Ke._)`${g}${(0,Ju.callValidateCode)(t,d,I,N)}`,e.modifying)}function _(g){var I;s.if((0,Ke.not)((I=e.valid)!==null&&I!==void 0?I:p),g)}}vt.funcKeywordCode=ec;function uo(t){const{gen:e,data:r,it:s}=t;e.if(s.parentData,()=>e.assign(r,(0,Ke._)`${s.parentData}[${s.parentDataProperty}]`))}function tc(t,e){const{gen:r}=t;r.if((0,Ke._)`Array.isArray(${e})`,()=>{r.assign(Yt.default.vErrors,(0,Ke._)`${Yt.default.vErrors} === null ? ${e} : ${Yt.default.vErrors}.concat(${e})`).assign(Yt.default.errors,(0,Ke._)`${Yt.default.vErrors}.length`),(0,Zu.extendErrors)(t)},()=>t.error())}function rc({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function co(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Ke.stringify)(r)})}function sc(t,e,r=!1){return!e.length||e.some(s=>s==="array"?Array.isArray(t):s==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==s||r&&typeof t>"u")}vt.validSchemaType=sc;function nc({schema:t,opts:e,self:r,errSchemaPath:s},n,a){if(Array.isArray(n.keyword)?!n.keyword.includes(a):n.keyword!==a)throw new Error("ajv implementation error");const i=n.dependencies;if(i!=null&&i.some(o=>!Object.prototype.hasOwnProperty.call(t,o)))throw new Error(`parent schema must have dependencies of ${a}: ${i.join(",")}`);if(n.validateSchema&&!n.validateSchema(t[a])){const u=`keyword "${a}" value is invalid at path "${s}": `+r.errorsText(n.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(u);else throw new Error(u)}}vt.validateKeywordUsage=nc;var Vt={};Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.extendSubschemaMode=Vt.extendSubschemaData=Vt.getSubschema=void 0;const _t=le,fo=H;function ac(t,{keyword:e,schemaProp:r,schema:s,schemaPath:n,errSchemaPath:a,topSchemaRef:i}){if(e!==void 0&&s!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){const o=t.schema[e];return r===void 0?{schema:o,schemaPath:(0,_t._)`${t.schemaPath}${(0,_t.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:o[r],schemaPath:(0,_t._)`${t.schemaPath}${(0,_t.getProperty)(e)}${(0,_t.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,fo.escapeFragment)(r)}`}}if(s!==void 0){if(n===void 0||a===void 0||i===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:n,topSchemaRef:i,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')}Vt.getSubschema=ac;function ic(t,e,{dataProp:r,dataPropType:s,data:n,dataTypes:a,propertyName:i}){if(n!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:o}=e;if(r!==void 0){const{errorPath:c,dataPathArr:d,opts:p}=e,T=o.let("data",(0,_t._)`${e.data}${(0,_t.getProperty)(r)}`,!0);u(T),t.errorPath=(0,_t.str)`${c}${(0,fo.getErrorPath)(r,s,p.jsPropertySyntax)}`,t.parentDataProperty=(0,_t._)`${r}`,t.dataPathArr=[...d,t.parentDataProperty]}if(n!==void 0){const c=n instanceof _t.Name?n:o.let("data",n,!0);u(c),i!==void 0&&(t.propertyName=i)}a&&(t.dataTypes=a);function u(c){t.data=c,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,c]}}Vt.extendSubschemaData=ic;function oc(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:s,createErrors:n,allErrors:a}){s!==void 0&&(t.compositeRule=s),n!==void 0&&(t.createErrors=n),a!==void 0&&(t.allErrors=a),t.jtdDiscriminator=e,t.jtdMetadata=r}Vt.extendSubschemaMode=oc;var Le={},po=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var s,n,a;if(Array.isArray(e)){if(s=e.length,s!=r.length)return!1;for(n=s;n--!==0;)if(!t(e[n],r[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(a=Object.keys(e),s=a.length,s!==Object.keys(r).length)return!1;for(n=s;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[n]))return!1;for(n=s;n--!==0;){var i=a[n];if(!t(e[i],r[i]))return!1}return!0}return e!==e&&r!==r},ho={exports:{}},Bt=ho.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var s=typeof r=="function"?r:r.pre||function(){},n=r.post||function(){};cs(e,s,n,t,"",t)};Bt.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},Bt.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},Bt.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},Bt.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function cs(t,e,r,s,n,a,i,o,u,c){if(s&&typeof s=="object"&&!Array.isArray(s)){e(s,n,a,i,o,u,c);for(var d in s){var p=s[d];if(Array.isArray(p)){if(d in Bt.arrayKeywords)for(var T=0;T<p.length;T++)cs(t,e,r,p[T],n+"/"+d+"/"+T,a,n,d,s,T)}else if(d in Bt.propsKeywords){if(p&&typeof p=="object")for(var S in p)cs(t,e,r,p[S],n+"/"+d+"/"+lc(S),a,n,d,s,S)}else(d in Bt.keywords||t.allKeys&&!(d in Bt.skipKeywords))&&cs(t,e,r,p,n+"/"+d,a,n,d,s)}r(s,n,a,i,o,u,c)}}function lc(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}var uc=ho.exports;Object.defineProperty(Le,"__esModule",{value:!0}),Le.getSchemaRefs=Le.resolveUrl=Le.normalizeId=Le._getFullPath=Le.getFullPath=Le.inlineRef=void 0;const cc=H,dc=po,fc=uc,pc=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function hc(t,e=!0){return typeof t=="boolean"?!0:e===!0?!On(t):e?mo(t)<=e:!1}Le.inlineRef=hc;const mc=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function On(t){for(const e in t){if(mc.has(e))return!0;const r=t[e];if(Array.isArray(r)&&r.some(On)||typeof r=="object"&&On(r))return!0}return!1}function mo(t){let e=0;for(const r in t){if(r==="$ref")return 1/0;if(e++,!pc.has(r)&&(typeof t[r]=="object"&&(0,cc.eachItem)(t[r],s=>e+=mo(s)),e===1/0))return 1/0}return e}function go(t,e="",r){r!==!1&&(e=dr(e));const s=t.parse(e);return yo(t,s)}Le.getFullPath=go;function yo(t,e){return t.serialize(e).split("#")[0]+"#"}Le._getFullPath=yo;const gc=/#\/?$/;function dr(t){return t?t.replace(gc,""):""}Le.normalizeId=dr;function yc(t,e,r){return r=dr(r),t.resolve(e,r)}Le.resolveUrl=yc;const vc=/^[a-z_][-a-z0-9._]*$/i;function _c(t,e){if(typeof t=="boolean")return{};const{schemaId:r,uriResolver:s}=this.opts,n=dr(t[r]||e),a={"":n},i=go(s,n,!1),o={},u=new Set;return fc(t,{allKeys:!0},(p,T,S,E)=>{if(E===void 0)return;const k=i+T;let _=a[E];typeof p[r]=="string"&&(_=g.call(this,p[r])),I.call(this,p.$anchor),I.call(this,p.$dynamicAnchor),a[T]=_;function g(N){const D=this.opts.uriResolver.resolve;if(N=dr(_?D(_,N):N),u.has(N))throw d(N);u.add(N);let b=this.refs[N];return typeof b=="string"&&(b=this.refs[b]),typeof b=="object"?c(p,b.schema,N):N!==dr(k)&&(N[0]==="#"?(c(p,o[N],N),o[N]=p):this.refs[N]=k),N}function I(N){if(typeof N=="string"){if(!vc.test(N))throw new Error(`invalid anchor "${N}"`);g.call(this,`#${N}`)}}}),o;function c(p,T,S){if(T!==void 0&&!dc(p,T))throw d(S)}function d(p){return new Error(`reference "${p}" resolves to more than one schema`)}}Le.getSchemaRefs=_c,Object.defineProperty(ct,"__esModule",{value:!0}),ct.getData=ct.KeywordCxt=ct.validateFunctionCode=void 0;const vo=lr,_o=je,An=It,ds=je,bc=us,Dr=vt,Dn=Vt,Y=le,se=yt,$c=Le,Nt=H,Ir=Or;function Sc(t){if(Eo(t)&&(ko(t),So(t))){wc(t);return}bo(t,()=>(0,vo.topBoolOrEmptySchema)(t))}ct.validateFunctionCode=Sc;function bo({gen:t,validateName:e,schema:r,schemaEnv:s,opts:n},a){n.code.es5?t.func(e,(0,Y._)`${se.default.data}, ${se.default.valCxt}`,s.$async,()=>{t.code((0,Y._)`"use strict"; ${$o(r,n)}`),kc(t,n),t.code(a)}):t.func(e,(0,Y._)`${se.default.data}, ${Ec(n)}`,s.$async,()=>t.code($o(r,n)).code(a))}function Ec(t){return(0,Y._)`{${se.default.instancePath}="", ${se.default.parentData}, ${se.default.parentDataProperty}, ${se.default.rootData}=${se.default.data}${t.dynamicRef?(0,Y._)`, ${se.default.dynamicAnchors}={}`:Y.nil}}={}`}function kc(t,e){t.if(se.default.valCxt,()=>{t.var(se.default.instancePath,(0,Y._)`${se.default.valCxt}.${se.default.instancePath}`),t.var(se.default.parentData,(0,Y._)`${se.default.valCxt}.${se.default.parentData}`),t.var(se.default.parentDataProperty,(0,Y._)`${se.default.valCxt}.${se.default.parentDataProperty}`),t.var(se.default.rootData,(0,Y._)`${se.default.valCxt}.${se.default.rootData}`),e.dynamicRef&&t.var(se.default.dynamicAnchors,(0,Y._)`${se.default.valCxt}.${se.default.dynamicAnchors}`)},()=>{t.var(se.default.instancePath,(0,Y._)`""`),t.var(se.default.parentData,(0,Y._)`undefined`),t.var(se.default.parentDataProperty,(0,Y._)`undefined`),t.var(se.default.rootData,se.default.data),e.dynamicRef&&t.var(se.default.dynamicAnchors,(0,Y._)`{}`)})}function wc(t){const{schema:e,opts:r,gen:s}=t;bo(t,()=>{r.$comment&&e.$comment&&Co(t),Dc(t),s.let(se.default.vErrors,null),s.let(se.default.errors,0),r.unevaluated&&Cc(t),wo(t),Pc(t)})}function Cc(t){const{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,Y._)`${r}.evaluated`),e.if((0,Y._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,Y._)`${t.evaluated}.props`,(0,Y._)`undefined`)),e.if((0,Y._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,Y._)`${t.evaluated}.items`,(0,Y._)`undefined`))}function $o(t,e){const r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,Y._)`/*# sourceURL=${r} */`:Y.nil}function Tc(t,e){if(Eo(t)&&(ko(t),So(t))){Oc(t,e);return}(0,vo.boolOrEmptySchema)(t,e)}function So({schema:t,self:e}){if(typeof t=="boolean")return!t;for(const r in t)if(e.RULES.all[r])return!0;return!1}function Eo(t){return typeof t.schema!="boolean"}function Oc(t,e){const{schema:r,gen:s,opts:n}=t;n.$comment&&r.$comment&&Co(t),Ic(t),Nc(t);const a=s.const("_errs",se.default.errors);wo(t,a),s.var(e,(0,Y._)`${a} === ${se.default.errors}`)}function ko(t){(0,Nt.checkUnknownRules)(t),Ac(t)}function wo(t,e){if(t.opts.jtd)return To(t,[],!1,e);const r=(0,_o.getSchemaTypes)(t.schema),s=(0,_o.coerceAndCheckDataType)(t,r);To(t,r,!s,e)}function Ac(t){const{schema:e,errSchemaPath:r,opts:s,self:n}=t;e.$ref&&s.ignoreKeywordsWithRef&&(0,Nt.schemaHasRulesButRef)(e,n.RULES)&&n.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function Dc(t){const{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Nt.checkStrictMode)(t,"default is ignored in the schema root")}function Ic(t){const e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,$c.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function Nc(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function Co({gen:t,schemaEnv:e,schema:r,errSchemaPath:s,opts:n}){const a=r.$comment;if(n.$comment===!0)t.code((0,Y._)`${se.default.self}.logger.log(${a})`);else if(typeof n.$comment=="function"){const i=(0,Y.str)`${s}/$comment`,o=t.scopeValue("root",{ref:e.root});t.code((0,Y._)`${se.default.self}.opts.$comment(${a}, ${i}, ${o}.schema)`)}}function Pc(t){const{gen:e,schemaEnv:r,validateName:s,ValidationError:n,opts:a}=t;r.$async?e.if((0,Y._)`${se.default.errors} === 0`,()=>e.return(se.default.data),()=>e.throw((0,Y._)`new ${n}(${se.default.vErrors})`)):(e.assign((0,Y._)`${s}.errors`,se.default.vErrors),a.unevaluated&&Fc(t),e.return((0,Y._)`${se.default.errors} === 0`))}function Fc({gen:t,evaluated:e,props:r,items:s}){r instanceof Y.Name&&t.assign((0,Y._)`${e}.props`,r),s instanceof Y.Name&&t.assign((0,Y._)`${e}.items`,s)}function To(t,e,r,s){const{gen:n,schema:a,data:i,allErrors:o,opts:u,self:c}=t,{RULES:d}=c;if(a.$ref&&(u.ignoreKeywordsWithRef||!(0,Nt.schemaHasRulesButRef)(a,d))){n.block(()=>Io(t,"$ref",d.all.$ref.definition));return}u.jtd||Mc(t,e),n.block(()=>{for(const T of d.rules)p(T);p(d.post)});function p(T){(0,An.shouldUseGroup)(a,T)&&(T.type?(n.if((0,ds.checkDataType)(T.type,i,u.strictNumbers)),Oo(t,T),e.length===1&&e[0]===T.type&&r&&(n.else(),(0,ds.reportTypeError)(t)),n.endIf()):Oo(t,T),o||n.if((0,Y._)`${se.default.errors} === ${s||0}`))}}function Oo(t,e){const{gen:r,schema:s,opts:{useDefaults:n}}=t;n&&(0,bc.assignDefaults)(t,e.type),r.block(()=>{for(const a of e.rules)(0,An.shouldUseRule)(s,a)&&Io(t,a.keyword,a.definition,e.type)})}function Mc(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(jc(t,e),t.opts.allowUnionTypes||xc(t,e),Vc(t,t.dataTypes))}function jc(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{Ao(t.dataTypes,r)||In(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),Lc(t,e)}}function xc(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&In(t,"use allowUnionTypes to allow union type keyword")}function Vc(t,e){const r=t.self.RULES.all;for(const s in r){const n=r[s];if(typeof n=="object"&&(0,An.shouldUseRule)(t.schema,n)){const{type:a}=n.definition;a.length&&!a.some(i=>Bc(e,i))&&In(t,`missing type "${a.join(",")}" for keyword "${s}"`)}}}function Bc(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function Ao(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function Lc(t,e){const r=[];for(const s of t.dataTypes)Ao(e,s)?r.push(s):e.includes("integer")&&s==="number"&&r.push("integer");t.dataTypes=r}function In(t,e){const r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Nt.checkStrictMode)(t,e,t.opts.strictTypes)}class Do{constructor(e,r,s){if((0,Dr.validateKeywordUsage)(e,r,s),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=s,this.data=e.data,this.schema=e.schema[s],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Nt.schemaRefOrVal)(e,this.schema,s,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",No(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Dr.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${s} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",se.default.errors))}result(e,r,s){this.failResult((0,Y.not)(e),r,s)}failResult(e,r,s){this.gen.if(e),s?s():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,Y.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:r}=this;this.fail((0,Y._)`${r} !== undefined && (${(0,Y.or)(this.invalid$data(),e)})`)}error(e,r,s){if(r){this.setParams(r),this._error(e,s),this.setParams({});return}this._error(e,s)}_error(e,r){(e?Ir.reportExtraError:Ir.reportError)(this,this.def.error,r)}$dataError(){(0,Ir.reportError)(this,this.def.$dataError||Ir.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Ir.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,s=Y.nil){this.gen.block(()=>{this.check$data(e,s),r()})}check$data(e=Y.nil,r=Y.nil){if(!this.$data)return;const{gen:s,schemaCode:n,schemaType:a,def:i}=this;s.if((0,Y.or)((0,Y._)`${n} === undefined`,r)),e!==Y.nil&&s.assign(e,!0),(a.length||i.validateSchema)&&(s.elseIf(this.invalid$data()),this.$dataError(),e!==Y.nil&&s.assign(e,!1)),s.else()}invalid$data(){const{gen:e,schemaCode:r,schemaType:s,def:n,it:a}=this;return(0,Y.or)(i(),o());function i(){if(s.length){if(!(r instanceof Y.Name))throw new Error("ajv implementation error");const u=Array.isArray(s)?s:[s];return(0,Y._)`${(0,ds.checkDataTypes)(u,r,a.opts.strictNumbers,ds.DataType.Wrong)}`}return Y.nil}function o(){if(n.validateSchema){const u=e.scopeValue("validate$data",{ref:n.validateSchema});return(0,Y._)`!${u}(${r})`}return Y.nil}}subschema(e,r){const s=(0,Dn.getSubschema)(this.it,e);(0,Dn.extendSubschemaData)(s,this.it,e),(0,Dn.extendSubschemaMode)(s,e);const n={...this.it,...s,items:void 0,props:void 0};return Tc(n,r),n}mergeEvaluated(e,r){const{it:s,gen:n}=this;s.opts.unevaluated&&(s.props!==!0&&e.props!==void 0&&(s.props=Nt.mergeEvaluated.props(n,e.props,s.props,r)),s.items!==!0&&e.items!==void 0&&(s.items=Nt.mergeEvaluated.items(n,e.items,s.items,r)))}mergeValidEvaluated(e,r){const{it:s,gen:n}=this;if(s.opts.unevaluated&&(s.props!==!0||s.items!==!0))return n.if(r,()=>this.mergeEvaluated(e,Y.Name)),!0}}ct.KeywordCxt=Do;function Io(t,e,r,s){const n=new Do(t,r,e);"code"in r?r.code(n,s):n.$data&&r.validate?(0,Dr.funcKeywordCode)(n,r):"macro"in r?(0,Dr.macroKeywordCode)(n,r):(r.compile||r.validate)&&(0,Dr.funcKeywordCode)(n,r)}const Rc=/^\/(?:[^~]|~0|~1)*$/,zc=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function No(t,{dataLevel:e,dataNames:r,dataPathArr:s}){let n,a;if(t==="")return se.default.rootData;if(t[0]==="/"){if(!Rc.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);n=t,a=se.default.rootData}else{const c=zc.exec(t);if(!c)throw new Error(`Invalid JSON-pointer: ${t}`);const d=+c[1];if(n=c[2],n==="#"){if(d>=e)throw new Error(u("property/index",d));return s[e-d]}if(d>e)throw new Error(u("data",d));if(a=r[e-d],!n)return a}let i=a;const o=n.split("/");for(const c of o)c&&(a=(0,Y._)`${a}${(0,Y.getProperty)((0,Nt.unescapeJsonPointer)(c))}`,i=(0,Y._)`${i} && ${a}`);return i;function u(c,d){return`Cannot access ${c} ${d} levels up, current level is ${e}`}}ct.getData=No;var Nr={};Object.defineProperty(Nr,"__esModule",{value:!0});class qc extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}Nr.default=qc;var Pr={};Object.defineProperty(Pr,"__esModule",{value:!0});const Nn=Le;class Uc extends Error{constructor(e,r,s,n){super(n||`can't resolve reference ${s} from id ${r}`),this.missingRef=(0,Nn.resolveUrl)(e,r,s),this.missingSchema=(0,Nn.normalizeId)((0,Nn.getFullPath)(e,this.missingRef))}}Pr.default=Uc;var We={};Object.defineProperty(We,"__esModule",{value:!0}),We.resolveSchema=We.getCompilingSchema=We.resolveRef=We.compileSchema=We.SchemaEnv=void 0;const dt=le,Hc=Nr,Xt=yt,ft=Le,Po=H,Kc=ct;class fs{constructor(e){var r;this.refs={},this.dynamicAnchors={};let s;typeof e.schema=="object"&&(s=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,ft.normalizeId)(s==null?void 0:s[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=s==null?void 0:s.$async,this.refs={}}}We.SchemaEnv=fs;function Pn(t){const e=Fo.call(this,t);if(e)return e;const r=(0,ft.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:s,lines:n}=this.opts.code,{ownProperties:a}=this.opts,i=new dt.CodeGen(this.scope,{es5:s,lines:n,ownProperties:a});let o;t.$async&&(o=i.scopeValue("Error",{ref:Hc.default,code:(0,dt._)`require("ajv/dist/runtime/validation_error").default`}));const u=i.scopeName("validate");t.validateName=u;const c={gen:i,allErrors:this.opts.allErrors,data:Xt.default.data,parentData:Xt.default.parentData,parentDataProperty:Xt.default.parentDataProperty,dataNames:[Xt.default.data],dataPathArr:[dt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,dt.stringify)(t.schema)}:{ref:t.schema}),validateName:u,ValidationError:o,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:dt.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,dt._)`""`,opts:this.opts,self:this};let d;try{this._compilations.add(t),(0,Kc.validateFunctionCode)(c),i.optimize(this.opts.code.optimize);const p=i.toString();d=`${i.scopeRefs(Xt.default.scope)}return ${p}`,this.opts.code.process&&(d=this.opts.code.process(d,t));const S=new Function(`${Xt.default.self}`,`${Xt.default.scope}`,d)(this,this.scope.get());if(this.scope.value(u,{ref:S}),S.errors=null,S.schema=t.schema,S.schemaEnv=t,t.$async&&(S.$async=!0),this.opts.code.source===!0&&(S.source={validateName:u,validateCode:p,scopeValues:i._values}),this.opts.unevaluated){const{props:E,items:k}=c;S.evaluated={props:E instanceof dt.Name?void 0:E,items:k instanceof dt.Name?void 0:k,dynamicProps:E instanceof dt.Name,dynamicItems:k instanceof dt.Name},S.source&&(S.source.evaluated=(0,dt.stringify)(S.evaluated))}return t.validate=S,t}catch(p){throw delete t.validate,delete t.validateName,d&&this.logger.error("Error compiling schema, function code:",d),p}finally{this._compilations.delete(t)}}We.compileSchema=Pn;function Gc(t,e,r){var s;r=(0,ft.resolveUrl)(this.opts.uriResolver,e,r);const n=t.refs[r];if(n)return n;let a=Xc.call(this,t,r);if(a===void 0){const i=(s=t.localRefs)===null||s===void 0?void 0:s[r],{schemaId:o}=this.opts;i&&(a=new fs({schema:i,schemaId:o,root:t,baseId:e}))}if(a!==void 0)return t.refs[r]=Wc.call(this,a)}We.resolveRef=Gc;function Wc(t){return(0,ft.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:Pn.call(this,t)}function Fo(t){for(const e of this._compilations)if(Yc(e,t))return e}We.getCompilingSchema=Fo;function Yc(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function Xc(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||ps.call(this,t,e)}function ps(t,e){const r=this.opts.uriResolver.parse(e),s=(0,ft._getFullPath)(this.opts.uriResolver,r);let n=(0,ft.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&s===n)return Fn.call(this,r,t);const a=(0,ft.normalizeId)(s),i=this.refs[a]||this.schemas[a];if(typeof i=="string"){const o=ps.call(this,t,i);return typeof(o==null?void 0:o.schema)!="object"?void 0:Fn.call(this,r,o)}if(typeof(i==null?void 0:i.schema)=="object"){if(i.validate||Pn.call(this,i),a===(0,ft.normalizeId)(e)){const{schema:o}=i,{schemaId:u}=this.opts,c=o[u];return c&&(n=(0,ft.resolveUrl)(this.opts.uriResolver,n,c)),new fs({schema:o,schemaId:u,root:t,baseId:n})}return Fn.call(this,r,i)}}We.resolveSchema=ps;const Jc=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Fn(t,{baseId:e,schema:r,root:s}){var n;if(((n=t.fragment)===null||n===void 0?void 0:n[0])!=="/")return;for(const o of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;const u=r[(0,Po.unescapeFragment)(o)];if(u===void 0)return;r=u;const c=typeof r=="object"&&r[this.opts.schemaId];!Jc.has(o)&&c&&(e=(0,ft.resolveUrl)(this.opts.uriResolver,e,c))}let a;if(typeof r!="boolean"&&r.$ref&&!(0,Po.schemaHasRulesButRef)(r,this.RULES)){const o=(0,ft.resolveUrl)(this.opts.uriResolver,e,r.$ref);a=ps.call(this,s,o)}const{schemaId:i}=this.opts;if(a=a||new fs({schema:r,schemaId:i,root:s,baseId:e}),a.schema!==a.root.schema)return a}const Zc={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1};var Mn={},jn={exports:{}};/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */(function(t,e){(function(r,s){s(e)})($l,function(r){function s(){for(var $=arguments.length,m=Array($),C=0;C<$;C++)m[C]=arguments[C];if(m.length>1){m[0]=m[0].slice(0,-1);for(var x=m.length-1,j=1;j<x;++j)m[j]=m[j].slice(1,-1);return m[x]=m[x].slice(1),m.join("")}else return m[0]}function n($){return"(?:"+$+")"}function a($){return $===void 0?"undefined":$===null?"null":Object.prototype.toString.call($).split(" ").pop().split("]").shift().toLowerCase()}function i($){return $.toUpperCase()}function o($){return $!=null?$ instanceof Array?$:typeof $.length!="number"||$.split||$.setInterval||$.call?[$]:Array.prototype.slice.call($):[]}function u($,m){var C=$;if(m)for(var x in m)C[x]=m[x];return C}function c($){var m="[A-Za-z]",C="[0-9]",x=s(C,"[A-Fa-f]"),j=n(n("%[EFef]"+x+"%"+x+x+"%"+x+x)+"|"+n("%[89A-Fa-f]"+x+"%"+x+x)+"|"+n("%"+x+x)),J="[\\:\\/\\?\\#\\[\\]\\@]",Q="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",fe=s(J,Q),ke=$?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",Ie=$?"[\\uE000-\\uF8FF]":"[]",de=s(m,C,"[\\-\\.\\_\\~]",ke);n(m+s(m,C,"[\\+\\-\\.]")+"*"),n(n(j+"|"+s(de,Q,"[\\:]"))+"*");var $e=n(n("25[0-5]")+"|"+n("2[0-4]"+C)+"|"+n("1"+C+C)+"|"+n("0?[1-9]"+C)+"|0?0?"+C),Ne=n($e+"\\."+$e+"\\."+$e+"\\."+$e),ae=n(x+"{1,4}"),we=n(n(ae+"\\:"+ae)+"|"+Ne),Fe=n(n(ae+"\\:")+"{6}"+we),Ce=n("\\:\\:"+n(ae+"\\:")+"{5}"+we),Rt=n(n(ae)+"?\\:\\:"+n(ae+"\\:")+"{4}"+we),St=n(n(n(ae+"\\:")+"{0,1}"+ae)+"?\\:\\:"+n(ae+"\\:")+"{3}"+we),Et=n(n(n(ae+"\\:")+"{0,2}"+ae)+"?\\:\\:"+n(ae+"\\:")+"{2}"+we),$r=n(n(n(ae+"\\:")+"{0,3}"+ae)+"?\\:\\:"+ae+"\\:"+we),sr=n(n(n(ae+"\\:")+"{0,4}"+ae)+"?\\:\\:"+we),it=n(n(n(ae+"\\:")+"{0,5}"+ae)+"?\\:\\:"+ae),kt=n(n(n(ae+"\\:")+"{0,6}"+ae)+"?\\:\\:"),nr=n([Fe,Ce,Rt,St,Et,$r,sr,it,kt].join("|")),Ft=n(n(de+"|"+j)+"+");n("[vV]"+x+"+\\."+s(de,Q,"[\\:]")+"+"),n(n(j+"|"+s(de,Q))+"*");var Hr=n(j+"|"+s(de,Q,"[\\:\\@]"));return n(n(j+"|"+s(de,Q,"[\\@]"))+"+"),n(n(Hr+"|"+s("[\\/\\?]",Ie))+"*"),{NOT_SCHEME:new RegExp(s("[^]",m,C,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(s("[^\\%\\:]",de,Q),"g"),NOT_HOST:new RegExp(s("[^\\%\\[\\]\\:]",de,Q),"g"),NOT_PATH:new RegExp(s("[^\\%\\/\\:\\@]",de,Q),"g"),NOT_PATH_NOSCHEME:new RegExp(s("[^\\%\\/\\@]",de,Q),"g"),NOT_QUERY:new RegExp(s("[^\\%]",de,Q,"[\\:\\@\\/\\?]",Ie),"g"),NOT_FRAGMENT:new RegExp(s("[^\\%]",de,Q,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(s("[^]",de,Q),"g"),UNRESERVED:new RegExp(de,"g"),OTHER_CHARS:new RegExp(s("[^\\%]",de,fe),"g"),PCT_ENCODED:new RegExp(j,"g"),IPV4ADDRESS:new RegExp("^("+Ne+")$"),IPV6ADDRESS:new RegExp("^\\[?("+nr+")"+n(n("\\%25|\\%(?!"+x+"{2})")+"("+Ft+")")+"?\\]?$")}}var d=c(!1),p=c(!0),T=function(){function $(m,C){var x=[],j=!0,J=!1,Q=void 0;try{for(var fe=m[Symbol.iterator](),ke;!(j=(ke=fe.next()).done)&&(x.push(ke.value),!(C&&x.length===C));j=!0);}catch(Ie){J=!0,Q=Ie}finally{try{!j&&fe.return&&fe.return()}finally{if(J)throw Q}}return x}return function(m,C){if(Array.isArray(m))return m;if(Symbol.iterator in Object(m))return $(m,C);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),S=function($){if(Array.isArray($)){for(var m=0,C=Array($.length);m<$.length;m++)C[m]=$[m];return C}else return Array.from($)},E=2147483647,k=36,_=1,g=26,I=38,N=700,D=72,b=128,L="-",R=/^xn--/,ee=/[^\0-\x7E]/,K=/[\x2E\u3002\uFF0E\uFF61]/g,ce={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},U=k-_,G=Math.floor,ne=String.fromCharCode;function W($){throw new RangeError(ce[$])}function he($,m){for(var C=[],x=$.length;x--;)C[x]=m($[x]);return C}function me($,m){var C=$.split("@"),x="";C.length>1&&(x=C[0]+"@",$=C[1]),$=$.replace(K,".");var j=$.split("."),J=he(j,m).join(".");return x+J}function ve($){for(var m=[],C=0,x=$.length;C<x;){var j=$.charCodeAt(C++);if(j>=55296&&j<=56319&&C<x){var J=$.charCodeAt(C++);(J&64512)==56320?m.push(((j&1023)<<10)+(J&1023)+65536):(m.push(j),C--)}else m.push(j)}return m}var De=function(m){return String.fromCodePoint.apply(String,S(m))},Pe=function(m){return m-48<10?m-22:m-65<26?m-65:m-97<26?m-97:k},A=function(m,C){return m+22+75*(m<26)-((C!=0)<<5)},y=function(m,C,x){var j=0;for(m=x?G(m/N):m>>1,m+=G(m/C);m>U*g>>1;j+=k)m=G(m/U);return G(j+(U+1)*m/(m+I))},M=function(m){var C=[],x=m.length,j=0,J=b,Q=D,fe=m.lastIndexOf(L);fe<0&&(fe=0);for(var ke=0;ke<fe;++ke)m.charCodeAt(ke)>=128&&W("not-basic"),C.push(m.charCodeAt(ke));for(var Ie=fe>0?fe+1:0;Ie<x;){for(var de=j,$e=1,Ne=k;;Ne+=k){Ie>=x&&W("invalid-input");var ae=Pe(m.charCodeAt(Ie++));(ae>=k||ae>G((E-j)/$e))&&W("overflow"),j+=ae*$e;var we=Ne<=Q?_:Ne>=Q+g?g:Ne-Q;if(ae<we)break;var Fe=k-we;$e>G(E/Fe)&&W("overflow"),$e*=Fe}var Ce=C.length+1;Q=y(j-de,Ce,de==0),G(j/Ce)>E-J&&W("overflow"),J+=G(j/Ce),j%=Ce,C.splice(j++,0,J)}return String.fromCodePoint.apply(String,C)},O=function(m){var C=[];m=ve(m);var x=m.length,j=b,J=0,Q=D,fe=!0,ke=!1,Ie=void 0;try{for(var de=m[Symbol.iterator](),$e;!(fe=($e=de.next()).done);fe=!0){var Ne=$e.value;Ne<128&&C.push(ne(Ne))}}catch(Kr){ke=!0,Ie=Kr}finally{try{!fe&&de.return&&de.return()}finally{if(ke)throw Ie}}var ae=C.length,we=ae;for(ae&&C.push(L);we<x;){var Fe=E,Ce=!0,Rt=!1,St=void 0;try{for(var Et=m[Symbol.iterator](),$r;!(Ce=($r=Et.next()).done);Ce=!0){var sr=$r.value;sr>=j&&sr<Fe&&(Fe=sr)}}catch(Kr){Rt=!0,St=Kr}finally{try{!Ce&&Et.return&&Et.return()}finally{if(Rt)throw St}}var it=we+1;Fe-j>G((E-J)/it)&&W("overflow"),J+=(Fe-j)*it,j=Fe;var kt=!0,nr=!1,Ft=void 0;try{for(var Hr=m[Symbol.iterator](),yl;!(kt=(yl=Hr.next()).done);kt=!0){var vl=yl.value;if(vl<j&&++J>E&&W("overflow"),vl==j){for(var As=J,Ds=k;;Ds+=k){var Is=Ds<=Q?_:Ds>=Q+g?g:Ds-Q;if(As<Is)break;var _l=As-Is,bl=k-Is;C.push(ne(A(Is+_l%bl,0))),As=G(_l/bl)}C.push(ne(A(As,0))),Q=y(J,it,we==ae),J=0,++we}}}catch(Kr){nr=!0,Ft=Kr}finally{try{!kt&&Hr.return&&Hr.return()}finally{if(nr)throw Ft}}++J,++j}return C.join("")},l=function(m){return me(m,function(C){return R.test(C)?M(C.slice(4).toLowerCase()):C})},f=function(m){return me(m,function(C){return ee.test(C)?"xn--"+O(C):C})},v={version:"2.1.0",ucs2:{decode:ve,encode:De},decode:M,encode:O,toASCII:f,toUnicode:l},P={};function V($){var m=$.charCodeAt(0),C=void 0;return m<16?C="%0"+m.toString(16).toUpperCase():m<128?C="%"+m.toString(16).toUpperCase():m<2048?C="%"+(m>>6|192).toString(16).toUpperCase()+"%"+(m&63|128).toString(16).toUpperCase():C="%"+(m>>12|224).toString(16).toUpperCase()+"%"+(m>>6&63|128).toString(16).toUpperCase()+"%"+(m&63|128).toString(16).toUpperCase(),C}function B($){for(var m="",C=0,x=$.length;C<x;){var j=parseInt($.substr(C+1,2),16);if(j<128)m+=String.fromCharCode(j),C+=3;else if(j>=194&&j<224){if(x-C>=6){var J=parseInt($.substr(C+4,2),16);m+=String.fromCharCode((j&31)<<6|J&63)}else m+=$.substr(C,6);C+=6}else if(j>=224){if(x-C>=9){var Q=parseInt($.substr(C+4,2),16),fe=parseInt($.substr(C+7,2),16);m+=String.fromCharCode((j&15)<<12|(Q&63)<<6|fe&63)}else m+=$.substr(C,9);C+=9}else m+=$.substr(C,3),C+=3}return m}function z($,m){function C(x){var j=B(x);return j.match(m.UNRESERVED)?j:x}return $.scheme&&($.scheme=String($.scheme).replace(m.PCT_ENCODED,C).toLowerCase().replace(m.NOT_SCHEME,"")),$.userinfo!==void 0&&($.userinfo=String($.userinfo).replace(m.PCT_ENCODED,C).replace(m.NOT_USERINFO,V).replace(m.PCT_ENCODED,i)),$.host!==void 0&&($.host=String($.host).replace(m.PCT_ENCODED,C).toLowerCase().replace(m.NOT_HOST,V).replace(m.PCT_ENCODED,i)),$.path!==void 0&&($.path=String($.path).replace(m.PCT_ENCODED,C).replace($.scheme?m.NOT_PATH:m.NOT_PATH_NOSCHEME,V).replace(m.PCT_ENCODED,i)),$.query!==void 0&&($.query=String($.query).replace(m.PCT_ENCODED,C).replace(m.NOT_QUERY,V).replace(m.PCT_ENCODED,i)),$.fragment!==void 0&&($.fragment=String($.fragment).replace(m.PCT_ENCODED,C).replace(m.NOT_FRAGMENT,V).replace(m.PCT_ENCODED,i)),$}function te($){return $.replace(/^0*(.*)/,"$1")||"0"}function q($,m){var C=$.match(m.IPV4ADDRESS)||[],x=T(C,2),j=x[1];return j?j.split(".").map(te).join("."):$}function pe($,m){var C=$.match(m.IPV6ADDRESS)||[],x=T(C,3),j=x[1],J=x[2];if(j){for(var Q=j.toLowerCase().split("::").reverse(),fe=T(Q,2),ke=fe[0],Ie=fe[1],de=Ie?Ie.split(":").map(te):[],$e=ke.split(":").map(te),Ne=m.IPV4ADDRESS.test($e[$e.length-1]),ae=Ne?7:8,we=$e.length-ae,Fe=Array(ae),Ce=0;Ce<ae;++Ce)Fe[Ce]=de[Ce]||$e[we+Ce]||"";Ne&&(Fe[ae-1]=q(Fe[ae-1],m));var Rt=Fe.reduce(function(it,kt,nr){if(!kt||kt==="0"){var Ft=it[it.length-1];Ft&&Ft.index+Ft.length===nr?Ft.length++:it.push({index:nr,length:1})}return it},[]),St=Rt.sort(function(it,kt){return kt.length-it.length})[0],Et=void 0;if(St&&St.length>1){var $r=Fe.slice(0,St.index),sr=Fe.slice(St.index+St.length);Et=$r.join(":")+"::"+sr.join(":")}else Et=Fe.join(":");return J&&(Et+="%"+J),Et}else return $}var tt=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,ht="".match(/(){0}/)[1]===void 0;function Ge($){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C={},x=m.iri!==!1?p:d;m.reference==="suffix"&&($=(m.scheme?m.scheme+":":"")+"//"+$);var j=$.match(tt);if(j){ht?(C.scheme=j[1],C.userinfo=j[3],C.host=j[4],C.port=parseInt(j[5],10),C.path=j[6]||"",C.query=j[7],C.fragment=j[8],isNaN(C.port)&&(C.port=j[5])):(C.scheme=j[1]||void 0,C.userinfo=$.indexOf("@")!==-1?j[3]:void 0,C.host=$.indexOf("//")!==-1?j[4]:void 0,C.port=parseInt(j[5],10),C.path=j[6]||"",C.query=$.indexOf("?")!==-1?j[7]:void 0,C.fragment=$.indexOf("#")!==-1?j[8]:void 0,isNaN(C.port)&&(C.port=$.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?j[4]:void 0)),C.host&&(C.host=pe(q(C.host,x),x)),C.scheme===void 0&&C.userinfo===void 0&&C.host===void 0&&C.port===void 0&&!C.path&&C.query===void 0?C.reference="same-document":C.scheme===void 0?C.reference="relative":C.fragment===void 0?C.reference="absolute":C.reference="uri",m.reference&&m.reference!=="suffix"&&m.reference!==C.reference&&(C.error=C.error||"URI is not a "+m.reference+" reference.");var J=P[(m.scheme||C.scheme||"").toLowerCase()];if(!m.unicodeSupport&&(!J||!J.unicodeSupport)){if(C.host&&(m.domainHost||J&&J.domainHost))try{C.host=v.toASCII(C.host.replace(x.PCT_ENCODED,B).toLowerCase())}catch(Q){C.error=C.error||"Host's domain name can not be converted to ASCII via punycode: "+Q}z(C,d)}else z(C,x);J&&J.parse&&J.parse(C,m)}else C.error=C.error||"URI can not be parsed.";return C}function er($,m){var C=m.iri!==!1?p:d,x=[];return $.userinfo!==void 0&&(x.push($.userinfo),x.push("@")),$.host!==void 0&&x.push(pe(q(String($.host),C),C).replace(C.IPV6ADDRESS,function(j,J,Q){return"["+J+(Q?"%25"+Q:"")+"]"})),(typeof $.port=="number"||typeof $.port=="string")&&(x.push(":"),x.push(String($.port))),x.length?x.join(""):void 0}var Pt=/^\.\.?\//,yr=/^\/\.(\/|$)/,vr=/^\/\.\.(\/|$)/,Rr=/^\/?(?:.|\n)*?(?=\/|$)/;function bt($){for(var m=[];$.length;)if($.match(Pt))$=$.replace(Pt,"");else if($.match(yr))$=$.replace(yr,"/");else if($.match(vr))$=$.replace(vr,"/"),m.pop();else if($==="."||$==="..")$="";else{var C=$.match(Rr);if(C){var x=C[0];$=$.slice(x.length),m.push(x)}else throw new Error("Unexpected dot segment condition")}return m.join("")}function Xe($){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C=m.iri?p:d,x=[],j=P[(m.scheme||$.scheme||"").toLowerCase()];if(j&&j.serialize&&j.serialize($,m),$.host&&!C.IPV6ADDRESS.test($.host)){if(m.domainHost||j&&j.domainHost)try{$.host=m.iri?v.toUnicode($.host):v.toASCII($.host.replace(C.PCT_ENCODED,B).toLowerCase())}catch(fe){$.error=$.error||"Host's domain name can not be converted to "+(m.iri?"Unicode":"ASCII")+" via punycode: "+fe}}z($,C),m.reference!=="suffix"&&$.scheme&&(x.push($.scheme),x.push(":"));var J=er($,m);if(J!==void 0&&(m.reference!=="suffix"&&x.push("//"),x.push(J),$.path&&$.path.charAt(0)!=="/"&&x.push("/")),$.path!==void 0){var Q=$.path;!m.absolutePath&&(!j||!j.absolutePath)&&(Q=bt(Q)),J===void 0&&(Q=Q.replace(/^\/\//,"/%2F")),x.push(Q)}return $.query!==void 0&&(x.push("?"),x.push($.query)),$.fragment!==void 0&&(x.push("#"),x.push($.fragment)),x.join("")}function _r($,m){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},x=arguments[3],j={};return x||($=Ge(Xe($,C),C),m=Ge(Xe(m,C),C)),C=C||{},!C.tolerant&&m.scheme?(j.scheme=m.scheme,j.userinfo=m.userinfo,j.host=m.host,j.port=m.port,j.path=bt(m.path||""),j.query=m.query):(m.userinfo!==void 0||m.host!==void 0||m.port!==void 0?(j.userinfo=m.userinfo,j.host=m.host,j.port=m.port,j.path=bt(m.path||""),j.query=m.query):(m.path?(m.path.charAt(0)==="/"?j.path=bt(m.path):(($.userinfo!==void 0||$.host!==void 0||$.port!==void 0)&&!$.path?j.path="/"+m.path:$.path?j.path=$.path.slice(0,$.path.lastIndexOf("/")+1)+m.path:j.path=m.path,j.path=bt(j.path)),j.query=m.query):(j.path=$.path,m.query!==void 0?j.query=m.query:j.query=$.query),j.userinfo=$.userinfo,j.host=$.host,j.port=$.port),j.scheme=$.scheme),j.fragment=m.fragment,j}function zr($,m,C){var x=u({scheme:"null"},C);return Xe(_r(Ge($,x),Ge(m,x),x,!0),x)}function tr($,m){return typeof $=="string"?$=Xe(Ge($,m),m):a($)==="object"&&($=Ge(Xe($,m),m)),$}function qr($,m,C){return typeof $=="string"?$=Xe(Ge($,C),C):a($)==="object"&&($=Xe($,C)),typeof m=="string"?m=Xe(Ge(m,C),C):a(m)==="object"&&(m=Xe(m,C)),$===m}function Os($,m){return $&&$.toString().replace(!m||!m.iri?d.ESCAPE:p.ESCAPE,V)}function at($,m){return $&&$.toString().replace(!m||!m.iri?d.PCT_ENCODED:p.PCT_ENCODED,B)}var rr={scheme:"http",domainHost:!0,parse:function(m,C){return m.host||(m.error=m.error||"HTTP URIs must have a host."),m},serialize:function(m,C){var x=String(m.scheme).toLowerCase()==="https";return(m.port===(x?443:80)||m.port==="")&&(m.port=void 0),m.path||(m.path="/"),m}},ul={scheme:"https",domainHost:rr.domainHost,parse:rr.parse,serialize:rr.serialize};function cl($){return typeof $.secure=="boolean"?$.secure:String($.scheme).toLowerCase()==="wss"}var Ur={scheme:"ws",domainHost:!0,parse:function(m,C){var x=m;return x.secure=cl(x),x.resourceName=(x.path||"/")+(x.query?"?"+x.query:""),x.path=void 0,x.query=void 0,x},serialize:function(m,C){if((m.port===(cl(m)?443:80)||m.port==="")&&(m.port=void 0),typeof m.secure=="boolean"&&(m.scheme=m.secure?"wss":"ws",m.secure=void 0),m.resourceName){var x=m.resourceName.split("?"),j=T(x,2),J=j[0],Q=j[1];m.path=J&&J!=="/"?J:void 0,m.query=Q,m.resourceName=void 0}return m.fragment=void 0,m}},dl={scheme:"wss",domainHost:Ur.domainHost,parse:Ur.parse,serialize:Ur.serialize},Xf={},fl="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",$t="[0-9A-Fa-f]",Jf=n(n("%[EFef]"+$t+"%"+$t+$t+"%"+$t+$t)+"|"+n("%[89A-Fa-f]"+$t+"%"+$t+$t)+"|"+n("%"+$t+$t)),Zf="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Qf="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",ep=s(Qf,'[\\"\\\\]'),tp="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",rp=new RegExp(fl,"g"),br=new RegExp(Jf,"g"),sp=new RegExp(s("[^]",Zf,"[\\.]",'[\\"]',ep),"g"),pl=new RegExp(s("[^]",fl,tp),"g"),np=pl;function ba($){var m=B($);return m.match(rp)?m:$}var hl={scheme:"mailto",parse:function(m,C){var x=m,j=x.to=x.path?x.path.split(","):[];if(x.path=void 0,x.query){for(var J=!1,Q={},fe=x.query.split("&"),ke=0,Ie=fe.length;ke<Ie;++ke){var de=fe[ke].split("=");switch(de[0]){case"to":for(var $e=de[1].split(","),Ne=0,ae=$e.length;Ne<ae;++Ne)j.push($e[Ne]);break;case"subject":x.subject=at(de[1],C);break;case"body":x.body=at(de[1],C);break;default:J=!0,Q[at(de[0],C)]=at(de[1],C);break}}J&&(x.headers=Q)}x.query=void 0;for(var we=0,Fe=j.length;we<Fe;++we){var Ce=j[we].split("@");if(Ce[0]=at(Ce[0]),C.unicodeSupport)Ce[1]=at(Ce[1],C).toLowerCase();else try{Ce[1]=v.toASCII(at(Ce[1],C).toLowerCase())}catch(Rt){x.error=x.error||"Email address's domain name can not be converted to ASCII via punycode: "+Rt}j[we]=Ce.join("@")}return x},serialize:function(m,C){var x=m,j=o(m.to);if(j){for(var J=0,Q=j.length;J<Q;++J){var fe=String(j[J]),ke=fe.lastIndexOf("@"),Ie=fe.slice(0,ke).replace(br,ba).replace(br,i).replace(sp,V),de=fe.slice(ke+1);try{de=C.iri?v.toUnicode(de):v.toASCII(at(de,C).toLowerCase())}catch(we){x.error=x.error||"Email address's domain name can not be converted to "+(C.iri?"Unicode":"ASCII")+" via punycode: "+we}j[J]=Ie+"@"+de}x.path=j.join(",")}var $e=m.headers=m.headers||{};m.subject&&($e.subject=m.subject),m.body&&($e.body=m.body);var Ne=[];for(var ae in $e)$e[ae]!==Xf[ae]&&Ne.push(ae.replace(br,ba).replace(br,i).replace(pl,V)+"="+$e[ae].replace(br,ba).replace(br,i).replace(np,V));return Ne.length&&(x.query=Ne.join("&")),x}},ap=/^([^\:]+)\:(.*)/,ml={scheme:"urn",parse:function(m,C){var x=m.path&&m.path.match(ap),j=m;if(x){var J=C.scheme||j.scheme||"urn",Q=x[1].toLowerCase(),fe=x[2],ke=J+":"+(C.nid||Q),Ie=P[ke];j.nid=Q,j.nss=fe,j.path=void 0,Ie&&(j=Ie.parse(j,C))}else j.error=j.error||"URN can not be parsed.";return j},serialize:function(m,C){var x=C.scheme||m.scheme||"urn",j=m.nid,J=x+":"+(C.nid||j),Q=P[J];Q&&(m=Q.serialize(m,C));var fe=m,ke=m.nss;return fe.path=(j||C.nid)+":"+ke,fe}},ip=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,gl={scheme:"urn:uuid",parse:function(m,C){var x=m;return x.uuid=x.nss,x.nss=void 0,!C.tolerant&&(!x.uuid||!x.uuid.match(ip))&&(x.error=x.error||"UUID is not valid."),x},serialize:function(m,C){var x=m;return x.nss=(m.uuid||"").toLowerCase(),x}};P[rr.scheme]=rr,P[ul.scheme]=ul,P[Ur.scheme]=Ur,P[dl.scheme]=dl,P[hl.scheme]=hl,P[ml.scheme]=ml,P[gl.scheme]=gl,r.SCHEMES=P,r.pctEncChar=V,r.pctDecChars=B,r.parse=Ge,r.removeDotSegments=bt,r.serialize=Xe,r.resolveComponents=_r,r.resolve=zr,r.normalize=tr,r.equal=qr,r.escapeComponent=Os,r.unescapeComponent=at,Object.defineProperty(r,"__esModule",{value:!0})})})(jn,jn.exports);var Qc=jn.exports;Object.defineProperty(Mn,"__esModule",{value:!0});const Mo=Qc;Mo.code='require("ajv/dist/runtime/uri").default',Mn.default=Mo,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=ct;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=le;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const s=Nr,n=Pr,a=Wt,i=We,o=le,u=Le,c=je,d=H,p=Zc,T=Mn,S=(A,y)=>new RegExp(A,y);S.code="new RegExp";const E=["removeAdditional","useDefaults","coerceTypes"],k=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),_={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},I=200;function N(A){var y,M,O,l,f,v,P,V,B,z,te,q,pe,tt,ht,Ge,er,Pt,yr,vr,Rr,bt,Xe,_r,zr;const tr=A.strict,qr=(y=A.code)===null||y===void 0?void 0:y.optimize,Os=qr===!0||qr===void 0?1:qr||0,at=(O=(M=A.code)===null||M===void 0?void 0:M.regExp)!==null&&O!==void 0?O:S,rr=(l=A.uriResolver)!==null&&l!==void 0?l:T.default;return{strictSchema:(v=(f=A.strictSchema)!==null&&f!==void 0?f:tr)!==null&&v!==void 0?v:!0,strictNumbers:(V=(P=A.strictNumbers)!==null&&P!==void 0?P:tr)!==null&&V!==void 0?V:!0,strictTypes:(z=(B=A.strictTypes)!==null&&B!==void 0?B:tr)!==null&&z!==void 0?z:"log",strictTuples:(q=(te=A.strictTuples)!==null&&te!==void 0?te:tr)!==null&&q!==void 0?q:"log",strictRequired:(tt=(pe=A.strictRequired)!==null&&pe!==void 0?pe:tr)!==null&&tt!==void 0?tt:!1,code:A.code?{...A.code,optimize:Os,regExp:at}:{optimize:Os,regExp:at},loopRequired:(ht=A.loopRequired)!==null&&ht!==void 0?ht:I,loopEnum:(Ge=A.loopEnum)!==null&&Ge!==void 0?Ge:I,meta:(er=A.meta)!==null&&er!==void 0?er:!0,messages:(Pt=A.messages)!==null&&Pt!==void 0?Pt:!0,inlineRefs:(yr=A.inlineRefs)!==null&&yr!==void 0?yr:!0,schemaId:(vr=A.schemaId)!==null&&vr!==void 0?vr:"$id",addUsedSchema:(Rr=A.addUsedSchema)!==null&&Rr!==void 0?Rr:!0,validateSchema:(bt=A.validateSchema)!==null&&bt!==void 0?bt:!0,validateFormats:(Xe=A.validateFormats)!==null&&Xe!==void 0?Xe:!0,unicodeRegExp:(_r=A.unicodeRegExp)!==null&&_r!==void 0?_r:!0,int32range:(zr=A.int32range)!==null&&zr!==void 0?zr:!0,uriResolver:rr}}class D{constructor(y={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,y=this.opts={...y,...N(y)};const{es5:M,lines:O}=this.opts.code;this.scope=new o.ValueScope({scope:{},prefixes:k,es5:M,lines:O}),this.logger=G(y.logger);const l=y.validateFormats;y.validateFormats=!1,this.RULES=(0,a.getRules)(),b.call(this,_,y,"NOT SUPPORTED"),b.call(this,g,y,"DEPRECATED","warn"),this._metaOpts=ce.call(this),y.formats&&ee.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),y.keywords&&K.call(this,y.keywords),typeof y.meta=="object"&&this.addMetaSchema(y.meta),R.call(this),y.validateFormats=l}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:y,meta:M,schemaId:O}=this.opts;let l=p;O==="id"&&(l={...p},l.id=l.$id,delete l.$id),M&&y&&this.addMetaSchema(l,l[O],!1)}defaultMeta(){const{meta:y,schemaId:M}=this.opts;return this.opts.defaultMeta=typeof y=="object"?y[M]||y:void 0}validate(y,M){let O;if(typeof y=="string"){if(O=this.getSchema(y),!O)throw new Error(`no schema with key or ref "${y}"`)}else O=this.compile(y);const l=O(M);return"$async"in O||(this.errors=O.errors),l}compile(y,M){const O=this._addSchema(y,M);return O.validate||this._compileSchemaEnv(O)}compileAsync(y,M){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:O}=this.opts;return l.call(this,y,M);async function l(z,te){await f.call(this,z.$schema);const q=this._addSchema(z,te);return q.validate||v.call(this,q)}async function f(z){z&&!this.getSchema(z)&&await l.call(this,{$ref:z},!0)}async function v(z){try{return this._compileSchemaEnv(z)}catch(te){if(!(te instanceof n.default))throw te;return P.call(this,te),await V.call(this,te.missingSchema),v.call(this,z)}}function P({missingSchema:z,missingRef:te}){if(this.refs[z])throw new Error(`AnySchema ${z} is loaded but ${te} cannot be resolved`)}async function V(z){const te=await B.call(this,z);this.refs[z]||await f.call(this,te.$schema),this.refs[z]||this.addSchema(te,z,M)}async function B(z){const te=this._loading[z];if(te)return te;try{return await(this._loading[z]=O(z))}finally{delete this._loading[z]}}}addSchema(y,M,O,l=this.opts.validateSchema){if(Array.isArray(y)){for(const v of y)this.addSchema(v,void 0,O,l);return this}let f;if(typeof y=="object"){const{schemaId:v}=this.opts;if(f=y[v],f!==void 0&&typeof f!="string")throw new Error(`schema ${v} must be string`)}return M=(0,u.normalizeId)(M||f),this._checkUnique(M),this.schemas[M]=this._addSchema(y,O,M,l,!0),this}addMetaSchema(y,M,O=this.opts.validateSchema){return this.addSchema(y,M,!0,O),this}validateSchema(y,M){if(typeof y=="boolean")return!0;let O;if(O=y.$schema,O!==void 0&&typeof O!="string")throw new Error("$schema must be a string");if(O=O||this.opts.defaultMeta||this.defaultMeta(),!O)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const l=this.validate(O,y);if(!l&&M){const f="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(f);else throw new Error(f)}return l}getSchema(y){let M;for(;typeof(M=L.call(this,y))=="string";)y=M;if(M===void 0){const{schemaId:O}=this.opts,l=new i.SchemaEnv({schema:{},schemaId:O});if(M=i.resolveSchema.call(this,l,y),!M)return;this.refs[y]=M}return M.validate||this._compileSchemaEnv(M)}removeSchema(y){if(y instanceof RegExp)return this._removeAllSchemas(this.schemas,y),this._removeAllSchemas(this.refs,y),this;switch(typeof y){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const M=L.call(this,y);return typeof M=="object"&&this._cache.delete(M.schema),delete this.schemas[y],delete this.refs[y],this}case"object":{const M=y;this._cache.delete(M);let O=y[this.opts.schemaId];return O&&(O=(0,u.normalizeId)(O),delete this.schemas[O],delete this.refs[O]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(y){for(const M of y)this.addKeyword(M);return this}addKeyword(y,M){let O;if(typeof y=="string")O=y,typeof M=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),M.keyword=O);else if(typeof y=="object"&&M===void 0){if(M=y,O=M.keyword,Array.isArray(O)&&!O.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(W.call(this,O,M),!M)return(0,d.eachItem)(O,f=>he.call(this,f)),this;ve.call(this,M);const l={...M,type:(0,c.getJSONTypes)(M.type),schemaType:(0,c.getJSONTypes)(M.schemaType)};return(0,d.eachItem)(O,l.type.length===0?f=>he.call(this,f,l):f=>l.type.forEach(v=>he.call(this,f,l,v))),this}getKeyword(y){const M=this.RULES.all[y];return typeof M=="object"?M.definition:!!M}removeKeyword(y){const{RULES:M}=this;delete M.keywords[y],delete M.all[y];for(const O of M.rules){const l=O.rules.findIndex(f=>f.keyword===y);l>=0&&O.rules.splice(l,1)}return this}addFormat(y,M){return typeof M=="string"&&(M=new RegExp(M)),this.formats[y]=M,this}errorsText(y=this.errors,{separator:M=", ",dataVar:O="data"}={}){return!y||y.length===0?"No errors":y.map(l=>`${O}${l.instancePath} ${l.message}`).reduce((l,f)=>l+M+f)}$dataMetaSchema(y,M){const O=this.RULES.all;y=JSON.parse(JSON.stringify(y));for(const l of M){const f=l.split("/").slice(1);let v=y;for(const P of f)v=v[P];for(const P in O){const V=O[P];if(typeof V!="object")continue;const{$data:B}=V.definition,z=v[P];B&&z&&(v[P]=Pe(z))}}return y}_removeAllSchemas(y,M){for(const O in y){const l=y[O];(!M||M.test(O))&&(typeof l=="string"?delete y[O]:l&&!l.meta&&(this._cache.delete(l.schema),delete y[O]))}}_addSchema(y,M,O,l=this.opts.validateSchema,f=this.opts.addUsedSchema){let v;const{schemaId:P}=this.opts;if(typeof y=="object")v=y[P];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof y!="boolean")throw new Error("schema must be object or boolean")}let V=this._cache.get(y);if(V!==void 0)return V;O=(0,u.normalizeId)(v||O);const B=u.getSchemaRefs.call(this,y,O);return V=new i.SchemaEnv({schema:y,schemaId:P,meta:M,baseId:O,localRefs:B}),this._cache.set(V.schema,V),f&&!O.startsWith("#")&&(O&&this._checkUnique(O),this.refs[O]=V),l&&this.validateSchema(y,!0),V}_checkUnique(y){if(this.schemas[y]||this.refs[y])throw new Error(`schema with key or id "${y}" already exists`)}_compileSchemaEnv(y){if(y.meta?this._compileMetaSchema(y):i.compileSchema.call(this,y),!y.validate)throw new Error("ajv implementation error");return y.validate}_compileMetaSchema(y){const M=this.opts;this.opts=this._metaOpts;try{i.compileSchema.call(this,y)}finally{this.opts=M}}}D.ValidationError=s.default,D.MissingRefError=n.default,t.default=D;function b(A,y,M,O="error"){for(const l in A){const f=l;f in y&&this.logger[O](`${M}: option ${l}. ${A[f]}`)}}function L(A){return A=(0,u.normalizeId)(A),this.schemas[A]||this.refs[A]}function R(){const A=this.opts.schemas;if(A)if(Array.isArray(A))this.addSchema(A);else for(const y in A)this.addSchema(A[y],y)}function ee(){for(const A in this.opts.formats){const y=this.opts.formats[A];y&&this.addFormat(A,y)}}function K(A){if(Array.isArray(A)){this.addVocabulary(A);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const y in A){const M=A[y];M.keyword||(M.keyword=y),this.addKeyword(M)}}function ce(){const A={...this.opts};for(const y of E)delete A[y];return A}const U={log(){},warn(){},error(){}};function G(A){if(A===!1)return U;if(A===void 0)return console;if(A.log&&A.warn&&A.error)return A;throw new Error("logger must implement log, warn and error methods")}const ne=/^[a-z_$][a-z0-9_$:-]*$/i;function W(A,y){const{RULES:M}=this;if((0,d.eachItem)(A,O=>{if(M.keywords[O])throw new Error(`Keyword ${O} is already defined`);if(!ne.test(O))throw new Error(`Keyword ${O} has invalid name`)}),!!y&&y.$data&&!("code"in y||"validate"in y))throw new Error('$data keyword must have "code" or "validate" function')}function he(A,y,M){var O;const l=y==null?void 0:y.post;if(M&&l)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:f}=this;let v=l?f.post:f.rules.find(({type:V})=>V===M);if(v||(v={type:M,rules:[]},f.rules.push(v)),f.keywords[A]=!0,!y)return;const P={keyword:A,definition:{...y,type:(0,c.getJSONTypes)(y.type),schemaType:(0,c.getJSONTypes)(y.schemaType)}};y.before?me.call(this,v,P,y.before):v.rules.push(P),f.all[A]=P,(O=y.implements)===null||O===void 0||O.forEach(V=>this.addKeyword(V))}function me(A,y,M){const O=A.rules.findIndex(l=>l.keyword===M);O>=0?A.rules.splice(O,0,y):(A.rules.push(y),this.logger.warn(`rule ${M} is not defined`))}function ve(A){let{metaSchema:y}=A;y!==void 0&&(A.$data&&this.opts.$data&&(y=Pe(y)),A.validateSchema=this.compile(y,!0))}const De={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Pe(A){return{anyOf:[A,De]}}}(Ki);var xn={},Vn={},Bn={};Object.defineProperty(Bn,"__esModule",{value:!0});const ed={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Bn.default=ed;var Jt={};Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.callRef=Jt.getValidate=void 0;const td=Pr,jo=ue,Ye=le,fr=yt,xo=We,hs=H,rd={keyword:"$ref",schemaType:"string",code(t){const{gen:e,schema:r,it:s}=t,{baseId:n,schemaEnv:a,validateName:i,opts:o,self:u}=s,{root:c}=a;if((r==="#"||r==="#/")&&n===c.baseId)return p();const d=xo.resolveRef.call(u,c,n,r);if(d===void 0)throw new td.default(s.opts.uriResolver,n,r);if(d instanceof xo.SchemaEnv)return T(d);return S(d);function p(){if(a===c)return ms(t,i,a,a.$async);const E=e.scopeValue("root",{ref:c});return ms(t,(0,Ye._)`${E}.validate`,c,c.$async)}function T(E){const k=Vo(t,E);ms(t,k,E,E.$async)}function S(E){const k=e.scopeValue("schema",o.code.source===!0?{ref:E,code:(0,Ye.stringify)(E)}:{ref:E}),_=e.name("valid"),g=t.subschema({schema:E,dataTypes:[],schemaPath:Ye.nil,topSchemaRef:k,errSchemaPath:r},_);t.mergeEvaluated(g),t.ok(_)}}};function Vo(t,e){const{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,Ye._)`${r.scopeValue("wrapper",{ref:e})}.validate`}Jt.getValidate=Vo;function ms(t,e,r,s){const{gen:n,it:a}=t,{allErrors:i,schemaEnv:o,opts:u}=a,c=u.passContext?fr.default.this:Ye.nil;s?d():p();function d(){if(!o.$async)throw new Error("async schema referenced by sync schema");const E=n.let("valid");n.try(()=>{n.code((0,Ye._)`await ${(0,jo.callValidateCode)(t,e,c)}`),S(e),i||n.assign(E,!0)},k=>{n.if((0,Ye._)`!(${k} instanceof ${a.ValidationError})`,()=>n.throw(k)),T(k),i||n.assign(E,!1)}),t.ok(E)}function p(){t.result((0,jo.callValidateCode)(t,e,c),()=>S(e),()=>T(e))}function T(E){const k=(0,Ye._)`${E}.errors`;n.assign(fr.default.vErrors,(0,Ye._)`${fr.default.vErrors} === null ? ${k} : ${fr.default.vErrors}.concat(${k})`),n.assign(fr.default.errors,(0,Ye._)`${fr.default.vErrors}.length`)}function S(E){var k;if(!a.opts.unevaluated)return;const _=(k=r==null?void 0:r.validate)===null||k===void 0?void 0:k.evaluated;if(a.props!==!0)if(_&&!_.dynamicProps)_.props!==void 0&&(a.props=hs.mergeEvaluated.props(n,_.props,a.props));else{const g=n.var("props",(0,Ye._)`${E}.evaluated.props`);a.props=hs.mergeEvaluated.props(n,g,a.props,Ye.Name)}if(a.items!==!0)if(_&&!_.dynamicItems)_.items!==void 0&&(a.items=hs.mergeEvaluated.items(n,_.items,a.items));else{const g=n.var("items",(0,Ye._)`${E}.evaluated.items`);a.items=hs.mergeEvaluated.items(n,g,a.items,Ye.Name)}}}Jt.callRef=ms,Jt.default=rd,Object.defineProperty(Vn,"__esModule",{value:!0});const sd=Bn,nd=Jt,ad=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",sd.default,nd.default];Vn.default=ad;var Ln={},Rn={};Object.defineProperty(Rn,"__esModule",{value:!0});const gs=le,Lt=gs.operators,ys={maximum:{okStr:"<=",ok:Lt.LTE,fail:Lt.GT},minimum:{okStr:">=",ok:Lt.GTE,fail:Lt.LT},exclusiveMaximum:{okStr:"<",ok:Lt.LT,fail:Lt.GTE},exclusiveMinimum:{okStr:">",ok:Lt.GT,fail:Lt.LTE}},id={message:({keyword:t,schemaCode:e})=>(0,gs.str)`must be ${ys[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,gs._)`{comparison: ${ys[t].okStr}, limit: ${e}}`},od={keyword:Object.keys(ys),type:"number",schemaType:"number",$data:!0,error:id,code(t){const{keyword:e,data:r,schemaCode:s}=t;t.fail$data((0,gs._)`${r} ${ys[e].fail} ${s} || isNaN(${r})`)}};Rn.default=od;var zn={};Object.defineProperty(zn,"__esModule",{value:!0});const Fr=le,ld={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:t})=>(0,Fr.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Fr._)`{multipleOf: ${t}}`},code(t){const{gen:e,data:r,schemaCode:s,it:n}=t,a=n.opts.multipleOfPrecision,i=e.let("res"),o=a?(0,Fr._)`Math.abs(Math.round(${i}) - ${i}) > 1e-${a}`:(0,Fr._)`${i} !== parseInt(${i})`;t.fail$data((0,Fr._)`(${s} === 0 || (${i} = ${r}/${s}, ${o}))`)}};zn.default=ld;var qn={},Un={};Object.defineProperty(Un,"__esModule",{value:!0});function Bo(t){const e=t.length;let r=0,s=0,n;for(;s<e;)r++,n=t.charCodeAt(s++),n>=55296&&n<=56319&&s<e&&(n=t.charCodeAt(s),(n&64512)===56320&&s++);return r}Un.default=Bo,Bo.code='require("ajv/dist/runtime/ucs2length").default',Object.defineProperty(qn,"__esModule",{value:!0});const Zt=le,ud=H,cd=Un,dd={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:t,schemaCode:e}){const r=t==="maxLength"?"more":"fewer";return(0,Zt.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,Zt._)`{limit: ${t}}`},code(t){const{keyword:e,data:r,schemaCode:s,it:n}=t,a=e==="maxLength"?Zt.operators.GT:Zt.operators.LT,i=n.opts.unicode===!1?(0,Zt._)`${r}.length`:(0,Zt._)`${(0,ud.useFunc)(t.gen,cd.default)}(${r})`;t.fail$data((0,Zt._)`${i} ${a} ${s}`)}};qn.default=dd;var Hn={};Object.defineProperty(Hn,"__esModule",{value:!0});const fd=ue,vs=le,pd={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:t})=>(0,vs.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,vs._)`{pattern: ${t}}`},code(t){const{data:e,$data:r,schema:s,schemaCode:n,it:a}=t,i=a.opts.unicodeRegExp?"u":"",o=r?(0,vs._)`(new RegExp(${n}, ${i}))`:(0,fd.usePattern)(t,s);t.fail$data((0,vs._)`!${o}.test(${e})`)}};Hn.default=pd;var Kn={};Object.defineProperty(Kn,"__esModule",{value:!0});const Mr=le,hd={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:t,schemaCode:e}){const r=t==="maxProperties"?"more":"fewer";return(0,Mr.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,Mr._)`{limit: ${t}}`},code(t){const{keyword:e,data:r,schemaCode:s}=t,n=e==="maxProperties"?Mr.operators.GT:Mr.operators.LT;t.fail$data((0,Mr._)`Object.keys(${r}).length ${n} ${s}`)}};Kn.default=hd;var Gn={};Object.defineProperty(Gn,"__esModule",{value:!0});const jr=ue,xr=le,md=H,gd={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:t}})=>(0,xr.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,xr._)`{missingProperty: ${t}}`},code(t){const{gen:e,schema:r,schemaCode:s,data:n,$data:a,it:i}=t,{opts:o}=i;if(!a&&r.length===0)return;const u=r.length>=o.loopRequired;if(i.allErrors?c():d(),o.strictRequired){const S=t.parentSchema.properties,{definedProperties:E}=t.it;for(const k of r)if((S==null?void 0:S[k])===void 0&&!E.has(k)){const _=i.schemaEnv.baseId+i.errSchemaPath,g=`required property "${k}" is not defined at "${_}" (strictRequired)`;(0,md.checkStrictMode)(i,g,i.opts.strictRequired)}}function c(){if(u||a)t.block$data(xr.nil,p);else for(const S of r)(0,jr.checkReportMissingProp)(t,S)}function d(){const S=e.let("missing");if(u||a){const E=e.let("valid",!0);t.block$data(E,()=>T(S,E)),t.ok(E)}else e.if((0,jr.checkMissingProp)(t,r,S)),(0,jr.reportMissingProp)(t,S),e.else()}function p(){e.forOf("prop",s,S=>{t.setParams({missingProperty:S}),e.if((0,jr.noPropertyInData)(e,n,S,o.ownProperties),()=>t.error())})}function T(S,E){t.setParams({missingProperty:S}),e.forOf(S,s,()=>{e.assign(E,(0,jr.propertyInData)(e,n,S,o.ownProperties)),e.if((0,xr.not)(E),()=>{t.error(),e.break()})},xr.nil)}}};Gn.default=gd;var Wn={};Object.defineProperty(Wn,"__esModule",{value:!0});const Vr=le,yd={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:t,schemaCode:e}){const r=t==="maxItems"?"more":"fewer";return(0,Vr.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,Vr._)`{limit: ${t}}`},code(t){const{keyword:e,data:r,schemaCode:s}=t,n=e==="maxItems"?Vr.operators.GT:Vr.operators.LT;t.fail$data((0,Vr._)`${r}.length ${n} ${s}`)}};Wn.default=yd;var Yn={},Br={};Object.defineProperty(Br,"__esModule",{value:!0});const Lo=po;Lo.code='require("ajv/dist/runtime/equal").default',Br.default=Lo,Object.defineProperty(Yn,"__esModule",{value:!0});const Xn=je,Re=le,vd=H,_d=Br,bd={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:t,j:e}})=>(0,Re.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Re._)`{i: ${t}, j: ${e}}`},code(t){const{gen:e,data:r,$data:s,schema:n,parentSchema:a,schemaCode:i,it:o}=t;if(!s&&!n)return;const u=e.let("valid"),c=a.items?(0,Xn.getSchemaTypes)(a.items):[];t.block$data(u,d,(0,Re._)`${i} === false`),t.ok(u);function d(){const E=e.let("i",(0,Re._)`${r}.length`),k=e.let("j");t.setParams({i:E,j:k}),e.assign(u,!0),e.if((0,Re._)`${E} > 1`,()=>(p()?T:S)(E,k))}function p(){return c.length>0&&!c.some(E=>E==="object"||E==="array")}function T(E,k){const _=e.name("item"),g=(0,Xn.checkDataTypes)(c,_,o.opts.strictNumbers,Xn.DataType.Wrong),I=e.const("indices",(0,Re._)`{}`);e.for((0,Re._)`;${E}--;`,()=>{e.let(_,(0,Re._)`${r}[${E}]`),e.if(g,(0,Re._)`continue`),c.length>1&&e.if((0,Re._)`typeof ${_} == "string"`,(0,Re._)`${_} += "_"`),e.if((0,Re._)`typeof ${I}[${_}] == "number"`,()=>{e.assign(k,(0,Re._)`${I}[${_}]`),t.error(),e.assign(u,!1).break()}).code((0,Re._)`${I}[${_}] = ${E}`)})}function S(E,k){const _=(0,vd.useFunc)(e,_d.default),g=e.name("outer");e.label(g).for((0,Re._)`;${E}--;`,()=>e.for((0,Re._)`${k} = ${E}; ${k}--;`,()=>e.if((0,Re._)`${_}(${r}[${E}], ${r}[${k}])`,()=>{t.error(),e.assign(u,!1).break(g)})))}}};Yn.default=bd;var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0});const Zn=le,$d=H,Sd=Br,Ed={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:t})=>(0,Zn._)`{allowedValue: ${t}}`},code(t){const{gen:e,data:r,$data:s,schemaCode:n,schema:a}=t;s||a&&typeof a=="object"?t.fail$data((0,Zn._)`!${(0,$d.useFunc)(e,Sd.default)}(${r}, ${n})`):t.fail((0,Zn._)`${a} !== ${r}`)}};Jn.default=Ed;var Qn={};Object.defineProperty(Qn,"__esModule",{value:!0});const Lr=le,kd=H,wd=Br,Cd={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,Lr._)`{allowedValues: ${t}}`},code(t){const{gen:e,data:r,$data:s,schema:n,schemaCode:a,it:i}=t;if(!s&&n.length===0)throw new Error("enum must have non-empty array");const o=n.length>=i.opts.loopEnum;let u;const c=()=>u??(u=(0,kd.useFunc)(e,wd.default));let d;if(o||s)d=e.let("valid"),t.block$data(d,p);else{if(!Array.isArray(n))throw new Error("ajv implementation error");const S=e.const("vSchema",a);d=(0,Lr.or)(...n.map((E,k)=>T(S,k)))}t.pass(d);function p(){e.assign(d,!1),e.forOf("v",a,S=>e.if((0,Lr._)`${c()}(${r}, ${S})`,()=>e.assign(d,!0).break()))}function T(S,E){const k=n[E];return typeof k=="object"&&k!==null?(0,Lr._)`${c()}(${r}, ${S}[${E}])`:(0,Lr._)`${r} === ${k}`}}};Qn.default=Cd,Object.defineProperty(Ln,"__esModule",{value:!0});const Td=Rn,Od=zn,Ad=qn,Dd=Hn,Id=Kn,Nd=Gn,Pd=Wn,Fd=Yn,Md=Jn,jd=Qn,xd=[Td.default,Od.default,Ad.default,Dd.default,Id.default,Nd.default,Pd.default,Fd.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Md.default,jd.default];Ln.default=xd;var ea={},pr={};Object.defineProperty(pr,"__esModule",{value:!0}),pr.validateAdditionalItems=void 0;const Qt=le,ta=H,Vd={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:t}})=>(0,Qt.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Qt._)`{limit: ${t}}`},code(t){const{parentSchema:e,it:r}=t,{items:s}=e;if(!Array.isArray(s)){(0,ta.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Ro(t,s)}};function Ro(t,e){const{gen:r,schema:s,data:n,keyword:a,it:i}=t;i.items=!0;const o=r.const("len",(0,Qt._)`${n}.length`);if(s===!1)t.setParams({len:e.length}),t.pass((0,Qt._)`${o} <= ${e.length}`);else if(typeof s=="object"&&!(0,ta.alwaysValidSchema)(i,s)){const c=r.var("valid",(0,Qt._)`${o} <= ${e.length}`);r.if((0,Qt.not)(c),()=>u(c)),t.ok(c)}function u(c){r.forRange("i",e.length,o,d=>{t.subschema({keyword:a,dataProp:d,dataPropType:ta.Type.Num},c),i.allErrors||r.if((0,Qt.not)(c),()=>r.break())})}}pr.validateAdditionalItems=Ro,pr.default=Vd;var ra={},hr={};Object.defineProperty(hr,"__esModule",{value:!0}),hr.validateTuple=void 0;const zo=le,_s=H,Bd=ue,Ld={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){const{schema:e,it:r}=t;if(Array.isArray(e))return qo(t,"additionalItems",e);r.items=!0,!(0,_s.alwaysValidSchema)(r,e)&&t.ok((0,Bd.validateArray)(t))}};function qo(t,e,r=t.schema){const{gen:s,parentSchema:n,data:a,keyword:i,it:o}=t;d(n),o.opts.unevaluated&&r.length&&o.items!==!0&&(o.items=_s.mergeEvaluated.items(s,r.length,o.items));const u=s.name("valid"),c=s.const("len",(0,zo._)`${a}.length`);r.forEach((p,T)=>{(0,_s.alwaysValidSchema)(o,p)||(s.if((0,zo._)`${c} > ${T}`,()=>t.subschema({keyword:i,schemaProp:T,dataProp:T},u)),t.ok(u))});function d(p){const{opts:T,errSchemaPath:S}=o,E=r.length,k=E===p.minItems&&(E===p.maxItems||p[e]===!1);if(T.strictTuples&&!k){const _=`"${i}" is ${E}-tuple, but minItems or maxItems/${e} are not specified or different at path "${S}"`;(0,_s.checkStrictMode)(o,_,T.strictTuples)}}}hr.validateTuple=qo,hr.default=Ld,Object.defineProperty(ra,"__esModule",{value:!0});const Rd=hr,zd={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,Rd.validateTuple)(t,"items")};ra.default=zd;var sa={};Object.defineProperty(sa,"__esModule",{value:!0});const Uo=le,qd=H,Ud=ue,Hd=pr,Kd={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:t}})=>(0,Uo.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Uo._)`{limit: ${t}}`},code(t){const{schema:e,parentSchema:r,it:s}=t,{prefixItems:n}=r;s.items=!0,!(0,qd.alwaysValidSchema)(s,e)&&(n?(0,Hd.validateAdditionalItems)(t,n):t.ok((0,Ud.validateArray)(t)))}};sa.default=Kd;var na={};Object.defineProperty(na,"__esModule",{value:!0});const nt=le,bs=H,Gd={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:t,max:e}})=>e===void 0?(0,nt.str)`must contain at least ${t} valid item(s)`:(0,nt.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,nt._)`{minContains: ${t}}`:(0,nt._)`{minContains: ${t}, maxContains: ${e}}`},code(t){const{gen:e,schema:r,parentSchema:s,data:n,it:a}=t;let i,o;const{minContains:u,maxContains:c}=s;a.opts.next?(i=u===void 0?1:u,o=c):i=1;const d=e.const("len",(0,nt._)`${n}.length`);if(t.setParams({min:i,max:o}),o===void 0&&i===0){(0,bs.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(o!==void 0&&i>o){(0,bs.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,bs.alwaysValidSchema)(a,r)){let k=(0,nt._)`${d} >= ${i}`;o!==void 0&&(k=(0,nt._)`${k} && ${d} <= ${o}`),t.pass(k);return}a.items=!0;const p=e.name("valid");o===void 0&&i===1?S(p,()=>e.if(p,()=>e.break())):i===0?(e.let(p,!0),o!==void 0&&e.if((0,nt._)`${n}.length > 0`,T)):(e.let(p,!1),T()),t.result(p,()=>t.reset());function T(){const k=e.name("_valid"),_=e.let("count",0);S(k,()=>e.if(k,()=>E(_)))}function S(k,_){e.forRange("i",0,d,g=>{t.subschema({keyword:"contains",dataProp:g,dataPropType:bs.Type.Num,compositeRule:!0},k),_()})}function E(k){e.code((0,nt._)`${k}++`),o===void 0?e.if((0,nt._)`${k} >= ${i}`,()=>e.assign(p,!0).break()):(e.if((0,nt._)`${k} > ${o}`,()=>e.assign(p,!1).break()),i===1?e.assign(p,!0):e.if((0,nt._)`${k} >= ${i}`,()=>e.assign(p,!0)))}}};na.default=Gd;var Ho={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=le,r=H,s=ue;t.error={message:({params:{property:u,depsCount:c,deps:d}})=>{const p=c===1?"property":"properties";return(0,e.str)`must have ${p} ${d} when property ${u} is present`},params:({params:{property:u,depsCount:c,deps:d,missingProperty:p}})=>(0,e._)`{property: ${u},
|
|
24
|
+
|| ${i} === "boolean" || ${n} === null`).assign(o,(0,ie._)`[${n}]`)}}}function ju({gen:t,parentData:e,parentDataProperty:r},s){t.if((0,ie._)`${e} !== undefined`,()=>t.assign((0,ie._)`${e}[${r}]`,s))}function $n(t,e,r,s=ur.Correct){const n=s===ur.Correct?ie.operators.EQ:ie.operators.NEQ;let a;switch(t){case"null":return(0,ie._)`${e} ${n} null`;case"array":a=(0,ie._)`Array.isArray(${e})`;break;case"object":a=(0,ie._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":a=i((0,ie._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":a=i();break;default:return(0,ie._)`typeof ${e} ${n} ${t}`}return s===ur.Correct?a:(0,ie.not)(a);function i(o=ie.nil){return(0,ie.and)((0,ie._)`typeof ${e} == "number"`,o,r?(0,ie._)`isFinite(${e})`:ie.nil)}}je.checkDataType=$n;function Sn(t,e,r,s){if(t.length===1)return $n(t[0],e,r,s);let n;const a=(0,no.toHash)(t);if(a.array&&a.object){const i=(0,ie._)`typeof ${e} != "object"`;n=a.null?i:(0,ie._)`!${e} || ${i}`,delete a.null,delete a.array,delete a.object}else n=ie.nil;a.number&&delete a.integer;for(const i in a)n=(0,ie.and)(n,$n(i,e,r,s));return n}je.checkDataTypes=Sn;const xu={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,ie._)`{type: ${t}}`:(0,ie._)`{type: ${e}}`};function En(t){const e=Vu(t);(0,Iu.reportError)(e,xu)}je.reportTypeError=En;function Vu(t){const{gen:e,data:r,schema:s}=t,n=(0,no.schemaRefOrVal)(t,s,"type");return{gen:e,keyword:"type",data:r,schema:s.type,schemaCode:n,schemaValue:n,parentSchema:s,params:{},it:t}}var cs={};Object.defineProperty(cs,"__esModule",{value:!0}),cs.assignDefaults=void 0;const cr=ue,Bu=K;function Lu(t,e){const{properties:r,items:s}=t.schema;if(e==="object"&&r)for(const n in r)oo(t,n,r[n].default);else e==="array"&&Array.isArray(s)&&s.forEach((n,a)=>oo(t,a,n.default))}cs.assignDefaults=Lu;function oo(t,e,r){const{gen:s,compositeRule:n,data:a,opts:i}=t;if(r===void 0)return;const o=(0,cr._)`${a}${(0,cr.getProperty)(e)}`;if(n){(0,Bu.checkStrictMode)(t,`default is ignored for: ${o}`);return}let u=(0,cr._)`${o} === undefined`;i.useDefaults==="empty"&&(u=(0,cr._)`${u} || ${o} === null || ${o} === ""`),s.if(u,(0,cr._)`${o} = ${(0,cr.stringify)(r)}`)}var vt={},ce={};Object.defineProperty(ce,"__esModule",{value:!0}),ce.validateUnion=ce.validateArray=ce.usePattern=ce.callValidateCode=ce.schemaProperties=ce.allSchemaProperties=ce.noPropertyInData=ce.propertyInData=ce.isOwnProperty=ce.hasPropFunc=ce.reportMissingProp=ce.checkMissingProp=ce.checkReportMissingProp=void 0;const ke=ue,kn=K,xt=yt,Ru=K;function zu(t,e){const{gen:r,data:s,it:n}=t;r.if(Cn(r,s,e,n.opts.ownProperties),()=>{t.setParams({missingProperty:(0,ke._)`${e}`},!0),t.error()})}ce.checkReportMissingProp=zu;function qu({gen:t,data:e,it:{opts:r}},s,n){return(0,ke.or)(...s.map(a=>(0,ke.and)(Cn(t,e,a,r.ownProperties),(0,ke._)`${n} = ${a}`)))}ce.checkMissingProp=qu;function Uu(t,e){t.setParams({missingProperty:e},!0),t.error()}ce.reportMissingProp=Uu;function lo(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ke._)`Object.prototype.hasOwnProperty`})}ce.hasPropFunc=lo;function wn(t,e,r){return(0,ke._)`${lo(t)}.call(${e}, ${r})`}ce.isOwnProperty=wn;function Hu(t,e,r,s){const n=(0,ke._)`${e}${(0,ke.getProperty)(r)} !== undefined`;return s?(0,ke._)`${n} && ${wn(t,e,r)}`:n}ce.propertyInData=Hu;function Cn(t,e,r,s){const n=(0,ke._)`${e}${(0,ke.getProperty)(r)} === undefined`;return s?(0,ke.or)(n,(0,ke.not)(wn(t,e,r))):n}ce.noPropertyInData=Cn;function uo(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}ce.allSchemaProperties=uo;function Ku(t,e){return uo(e).filter(r=>!(0,kn.alwaysValidSchema)(t,e[r]))}ce.schemaProperties=Ku;function Gu({schemaCode:t,data:e,it:{gen:r,topSchemaRef:s,schemaPath:n,errorPath:a},it:i},o,u,c){const d=c?(0,ke._)`${t}, ${e}, ${s}${n}`:e,p=[[xt.default.instancePath,(0,ke.strConcat)(xt.default.instancePath,a)],[xt.default.parentData,i.parentData],[xt.default.parentDataProperty,i.parentDataProperty],[xt.default.rootData,xt.default.rootData]];i.opts.dynamicRef&&p.push([xt.default.dynamicAnchors,xt.default.dynamicAnchors]);const T=(0,ke._)`${d}, ${r.object(...p)}`;return u!==ke.nil?(0,ke._)`${o}.call(${u}, ${T})`:(0,ke._)`${o}(${T})`}ce.callValidateCode=Gu;const Wu=(0,ke._)`new RegExp`;function Yu({gen:t,it:{opts:e}},r){const s=e.unicodeRegExp?"u":"",{regExp:n}=e.code,a=n(r,s);return t.scopeValue("pattern",{key:a.toString(),ref:a,code:(0,ke._)`${n.code==="new RegExp"?Wu:(0,Ru.useFunc)(t,n)}(${r}, ${s})`})}ce.usePattern=Yu;function Xu(t){const{gen:e,data:r,keyword:s,it:n}=t,a=e.name("valid");if(n.allErrors){const o=e.let("valid",!0);return i(()=>e.assign(o,!1)),o}return e.var(a,!0),i(()=>e.break()),a;function i(o){const u=e.const("len",(0,ke._)`${r}.length`);e.forRange("i",0,u,c=>{t.subschema({keyword:s,dataProp:c,dataPropType:kn.Type.Num},a),e.if((0,ke.not)(a),o)})}}ce.validateArray=Xu;function Ju(t){const{gen:e,schema:r,keyword:s,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(u=>(0,kn.alwaysValidSchema)(n,u))&&!n.opts.unevaluated)return;const i=e.let("valid",!1),o=e.name("_valid");e.block(()=>r.forEach((u,c)=>{const d=t.subschema({keyword:s,schemaProp:c,compositeRule:!0},o);e.assign(i,(0,ke._)`${i} || ${o}`),t.mergeValidEvaluated(d,o)||e.if((0,ke.not)(i))})),t.result(i,()=>t.reset(),()=>t.error(!0))}ce.validateUnion=Ju,Object.defineProperty(vt,"__esModule",{value:!0}),vt.validateKeywordUsage=vt.validSchemaType=vt.funcKeywordCode=vt.macroKeywordCode=void 0;const Ke=ue,Yt=yt,Zu=ce,Qu=Or;function ec(t,e){const{gen:r,keyword:s,schema:n,parentSchema:a,it:i}=t,o=e.macro.call(i.self,n,a,i),u=fo(r,s,o);i.opts.validateSchema!==!1&&i.self.validateSchema(o,!0);const c=r.name("valid");t.subschema({schema:o,schemaPath:Ke.nil,errSchemaPath:`${i.errSchemaPath}/${s}`,topSchemaRef:u,compositeRule:!0},c),t.pass(c,()=>t.error(!0))}vt.macroKeywordCode=ec;function tc(t,e){var r;const{gen:s,keyword:n,schema:a,parentSchema:i,$data:o,it:u}=t;sc(u,e);const c=!o&&e.compile?e.compile.call(u.self,a,i,u):e.validate,d=fo(s,n,c),p=s.let("valid");t.block$data(p,T),t.ok((r=e.valid)!==null&&r!==void 0?r:p);function T(){if(e.errors===!1)S(),e.modifying&&co(t),_(()=>t.error());else{const g=e.async?E():k();e.modifying&&co(t),_(()=>rc(t,g))}}function E(){const g=s.let("ruleErrs",null);return s.try(()=>S((0,Ke._)`await `),D=>s.assign(p,!1).if((0,Ke._)`${D} instanceof ${u.ValidationError}`,()=>s.assign(g,(0,Ke._)`${D}.errors`),()=>s.throw(D))),g}function k(){const g=(0,Ke._)`${d}.errors`;return s.assign(g,null),S(Ke.nil),g}function S(g=e.async?(0,Ke._)`await `:Ke.nil){const D=u.opts.passContext?Yt.default.this:Yt.default.self,N=!("compile"in e&&!o||e.schema===!1);s.assign(p,(0,Ke._)`${g}${(0,Zu.callValidateCode)(t,d,D,N)}`,e.modifying)}function _(g){var D;s.if((0,Ke.not)((D=e.valid)!==null&&D!==void 0?D:p),g)}}vt.funcKeywordCode=tc;function co(t){const{gen:e,data:r,it:s}=t;e.if(s.parentData,()=>e.assign(r,(0,Ke._)`${s.parentData}[${s.parentDataProperty}]`))}function rc(t,e){const{gen:r}=t;r.if((0,Ke._)`Array.isArray(${e})`,()=>{r.assign(Yt.default.vErrors,(0,Ke._)`${Yt.default.vErrors} === null ? ${e} : ${Yt.default.vErrors}.concat(${e})`).assign(Yt.default.errors,(0,Ke._)`${Yt.default.vErrors}.length`),(0,Qu.extendErrors)(t)},()=>t.error())}function sc({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function fo(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Ke.stringify)(r)})}function nc(t,e,r=!1){return!e.length||e.some(s=>s==="array"?Array.isArray(t):s==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==s||r&&typeof t>"u")}vt.validSchemaType=nc;function ac({schema:t,opts:e,self:r,errSchemaPath:s},n,a){if(Array.isArray(n.keyword)?!n.keyword.includes(a):n.keyword!==a)throw new Error("ajv implementation error");const i=n.dependencies;if(i!=null&&i.some(o=>!Object.prototype.hasOwnProperty.call(t,o)))throw new Error(`parent schema must have dependencies of ${a}: ${i.join(",")}`);if(n.validateSchema&&!n.validateSchema(t[a])){const u=`keyword "${a}" value is invalid at path "${s}": `+r.errorsText(n.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(u);else throw new Error(u)}}vt.validateKeywordUsage=ac;var Vt={};Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.extendSubschemaMode=Vt.extendSubschemaData=Vt.getSubschema=void 0;const _t=ue,po=K;function ic(t,{keyword:e,schemaProp:r,schema:s,schemaPath:n,errSchemaPath:a,topSchemaRef:i}){if(e!==void 0&&s!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){const o=t.schema[e];return r===void 0?{schema:o,schemaPath:(0,_t._)`${t.schemaPath}${(0,_t.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:o[r],schemaPath:(0,_t._)`${t.schemaPath}${(0,_t.getProperty)(e)}${(0,_t.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,po.escapeFragment)(r)}`}}if(s!==void 0){if(n===void 0||a===void 0||i===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:n,topSchemaRef:i,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')}Vt.getSubschema=ic;function oc(t,e,{dataProp:r,dataPropType:s,data:n,dataTypes:a,propertyName:i}){if(n!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:o}=e;if(r!==void 0){const{errorPath:c,dataPathArr:d,opts:p}=e,T=o.let("data",(0,_t._)`${e.data}${(0,_t.getProperty)(r)}`,!0);u(T),t.errorPath=(0,_t.str)`${c}${(0,po.getErrorPath)(r,s,p.jsPropertySyntax)}`,t.parentDataProperty=(0,_t._)`${r}`,t.dataPathArr=[...d,t.parentDataProperty]}if(n!==void 0){const c=n instanceof _t.Name?n:o.let("data",n,!0);u(c),i!==void 0&&(t.propertyName=i)}a&&(t.dataTypes=a);function u(c){t.data=c,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,c]}}Vt.extendSubschemaData=oc;function lc(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:s,createErrors:n,allErrors:a}){s!==void 0&&(t.compositeRule=s),n!==void 0&&(t.createErrors=n),a!==void 0&&(t.allErrors=a),t.jtdDiscriminator=e,t.jtdMetadata=r}Vt.extendSubschemaMode=lc;var Le={},ho=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var s,n,a;if(Array.isArray(e)){if(s=e.length,s!=r.length)return!1;for(n=s;n--!==0;)if(!t(e[n],r[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(a=Object.keys(e),s=a.length,s!==Object.keys(r).length)return!1;for(n=s;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[n]))return!1;for(n=s;n--!==0;){var i=a[n];if(!t(e[i],r[i]))return!1}return!0}return e!==e&&r!==r},mo={exports:{}},Bt=mo.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var s=typeof r=="function"?r:r.pre||function(){},n=r.post||function(){};ds(e,s,n,t,"",t)};Bt.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},Bt.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},Bt.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},Bt.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function ds(t,e,r,s,n,a,i,o,u,c){if(s&&typeof s=="object"&&!Array.isArray(s)){e(s,n,a,i,o,u,c);for(var d in s){var p=s[d];if(Array.isArray(p)){if(d in Bt.arrayKeywords)for(var T=0;T<p.length;T++)ds(t,e,r,p[T],n+"/"+d+"/"+T,a,n,d,s,T)}else if(d in Bt.propsKeywords){if(p&&typeof p=="object")for(var E in p)ds(t,e,r,p[E],n+"/"+d+"/"+uc(E),a,n,d,s,E)}else(d in Bt.keywords||t.allKeys&&!(d in Bt.skipKeywords))&&ds(t,e,r,p,n+"/"+d,a,n,d,s)}r(s,n,a,i,o,u,c)}}function uc(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}var cc=mo.exports;Object.defineProperty(Le,"__esModule",{value:!0}),Le.getSchemaRefs=Le.resolveUrl=Le.normalizeId=Le._getFullPath=Le.getFullPath=Le.inlineRef=void 0;const dc=K,fc=ho,pc=cc,hc=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function mc(t,e=!0){return typeof t=="boolean"?!0:e===!0?!Tn(t):e?go(t)<=e:!1}Le.inlineRef=mc;const gc=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Tn(t){for(const e in t){if(gc.has(e))return!0;const r=t[e];if(Array.isArray(r)&&r.some(Tn)||typeof r=="object"&&Tn(r))return!0}return!1}function go(t){let e=0;for(const r in t){if(r==="$ref")return 1/0;if(e++,!hc.has(r)&&(typeof t[r]=="object"&&(0,dc.eachItem)(t[r],s=>e+=go(s)),e===1/0))return 1/0}return e}function yo(t,e="",r){r!==!1&&(e=dr(e));const s=t.parse(e);return vo(t,s)}Le.getFullPath=yo;function vo(t,e){return t.serialize(e).split("#")[0]+"#"}Le._getFullPath=vo;const yc=/#\/?$/;function dr(t){return t?t.replace(yc,""):""}Le.normalizeId=dr;function vc(t,e,r){return r=dr(r),t.resolve(e,r)}Le.resolveUrl=vc;const _c=/^[a-z_][-a-z0-9._]*$/i;function bc(t,e){if(typeof t=="boolean")return{};const{schemaId:r,uriResolver:s}=this.opts,n=dr(t[r]||e),a={"":n},i=yo(s,n,!1),o={},u=new Set;return pc(t,{allKeys:!0},(p,T,E,k)=>{if(k===void 0)return;const S=i+T;let _=a[k];typeof p[r]=="string"&&(_=g.call(this,p[r])),D.call(this,p.$anchor),D.call(this,p.$dynamicAnchor),a[T]=_;function g(N){const I=this.opts.uriResolver.resolve;if(N=dr(_?I(_,N):N),u.has(N))throw d(N);u.add(N);let b=this.refs[N];return typeof b=="string"&&(b=this.refs[b]),typeof b=="object"?c(p,b.schema,N):N!==dr(S)&&(N[0]==="#"?(c(p,o[N],N),o[N]=p):this.refs[N]=S),N}function D(N){if(typeof N=="string"){if(!_c.test(N))throw new Error(`invalid anchor "${N}"`);g.call(this,`#${N}`)}}}),o;function c(p,T,E){if(T!==void 0&&!fc(p,T))throw d(E)}function d(p){return new Error(`reference "${p}" resolves to more than one schema`)}}Le.getSchemaRefs=bc,Object.defineProperty(ct,"__esModule",{value:!0}),ct.getData=ct.KeywordCxt=ct.validateFunctionCode=void 0;const _o=lr,bo=je,On=It,fs=je,$c=cs,Dr=vt,An=Vt,Y=ue,se=yt,Sc=Le,Nt=K,Ir=Or;function Ec(t){if(ko(t)&&(wo(t),Eo(t))){Cc(t);return}$o(t,()=>(0,_o.topBoolOrEmptySchema)(t))}ct.validateFunctionCode=Ec;function $o({gen:t,validateName:e,schema:r,schemaEnv:s,opts:n},a){n.code.es5?t.func(e,(0,Y._)`${se.default.data}, ${se.default.valCxt}`,s.$async,()=>{t.code((0,Y._)`"use strict"; ${So(r,n)}`),wc(t,n),t.code(a)}):t.func(e,(0,Y._)`${se.default.data}, ${kc(n)}`,s.$async,()=>t.code(So(r,n)).code(a))}function kc(t){return(0,Y._)`{${se.default.instancePath}="", ${se.default.parentData}, ${se.default.parentDataProperty}, ${se.default.rootData}=${se.default.data}${t.dynamicRef?(0,Y._)`, ${se.default.dynamicAnchors}={}`:Y.nil}}={}`}function wc(t,e){t.if(se.default.valCxt,()=>{t.var(se.default.instancePath,(0,Y._)`${se.default.valCxt}.${se.default.instancePath}`),t.var(se.default.parentData,(0,Y._)`${se.default.valCxt}.${se.default.parentData}`),t.var(se.default.parentDataProperty,(0,Y._)`${se.default.valCxt}.${se.default.parentDataProperty}`),t.var(se.default.rootData,(0,Y._)`${se.default.valCxt}.${se.default.rootData}`),e.dynamicRef&&t.var(se.default.dynamicAnchors,(0,Y._)`${se.default.valCxt}.${se.default.dynamicAnchors}`)},()=>{t.var(se.default.instancePath,(0,Y._)`""`),t.var(se.default.parentData,(0,Y._)`undefined`),t.var(se.default.parentDataProperty,(0,Y._)`undefined`),t.var(se.default.rootData,se.default.data),e.dynamicRef&&t.var(se.default.dynamicAnchors,(0,Y._)`{}`)})}function Cc(t){const{schema:e,opts:r,gen:s}=t;$o(t,()=>{r.$comment&&e.$comment&&To(t),Ic(t),s.let(se.default.vErrors,null),s.let(se.default.errors,0),r.unevaluated&&Tc(t),Co(t),Fc(t)})}function Tc(t){const{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,Y._)`${r}.evaluated`),e.if((0,Y._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,Y._)`${t.evaluated}.props`,(0,Y._)`undefined`)),e.if((0,Y._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,Y._)`${t.evaluated}.items`,(0,Y._)`undefined`))}function So(t,e){const r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,Y._)`/*# sourceURL=${r} */`:Y.nil}function Oc(t,e){if(ko(t)&&(wo(t),Eo(t))){Ac(t,e);return}(0,_o.boolOrEmptySchema)(t,e)}function Eo({schema:t,self:e}){if(typeof t=="boolean")return!t;for(const r in t)if(e.RULES.all[r])return!0;return!1}function ko(t){return typeof t.schema!="boolean"}function Ac(t,e){const{schema:r,gen:s,opts:n}=t;n.$comment&&r.$comment&&To(t),Nc(t),Pc(t);const a=s.const("_errs",se.default.errors);Co(t,a),s.var(e,(0,Y._)`${a} === ${se.default.errors}`)}function wo(t){(0,Nt.checkUnknownRules)(t),Dc(t)}function Co(t,e){if(t.opts.jtd)return Oo(t,[],!1,e);const r=(0,bo.getSchemaTypes)(t.schema),s=(0,bo.coerceAndCheckDataType)(t,r);Oo(t,r,!s,e)}function Dc(t){const{schema:e,errSchemaPath:r,opts:s,self:n}=t;e.$ref&&s.ignoreKeywordsWithRef&&(0,Nt.schemaHasRulesButRef)(e,n.RULES)&&n.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function Ic(t){const{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Nt.checkStrictMode)(t,"default is ignored in the schema root")}function Nc(t){const e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,Sc.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function Pc(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function To({gen:t,schemaEnv:e,schema:r,errSchemaPath:s,opts:n}){const a=r.$comment;if(n.$comment===!0)t.code((0,Y._)`${se.default.self}.logger.log(${a})`);else if(typeof n.$comment=="function"){const i=(0,Y.str)`${s}/$comment`,o=t.scopeValue("root",{ref:e.root});t.code((0,Y._)`${se.default.self}.opts.$comment(${a}, ${i}, ${o}.schema)`)}}function Fc(t){const{gen:e,schemaEnv:r,validateName:s,ValidationError:n,opts:a}=t;r.$async?e.if((0,Y._)`${se.default.errors} === 0`,()=>e.return(se.default.data),()=>e.throw((0,Y._)`new ${n}(${se.default.vErrors})`)):(e.assign((0,Y._)`${s}.errors`,se.default.vErrors),a.unevaluated&&Mc(t),e.return((0,Y._)`${se.default.errors} === 0`))}function Mc({gen:t,evaluated:e,props:r,items:s}){r instanceof Y.Name&&t.assign((0,Y._)`${e}.props`,r),s instanceof Y.Name&&t.assign((0,Y._)`${e}.items`,s)}function Oo(t,e,r,s){const{gen:n,schema:a,data:i,allErrors:o,opts:u,self:c}=t,{RULES:d}=c;if(a.$ref&&(u.ignoreKeywordsWithRef||!(0,Nt.schemaHasRulesButRef)(a,d))){n.block(()=>No(t,"$ref",d.all.$ref.definition));return}u.jtd||jc(t,e),n.block(()=>{for(const T of d.rules)p(T);p(d.post)});function p(T){(0,On.shouldUseGroup)(a,T)&&(T.type?(n.if((0,fs.checkDataType)(T.type,i,u.strictNumbers)),Ao(t,T),e.length===1&&e[0]===T.type&&r&&(n.else(),(0,fs.reportTypeError)(t)),n.endIf()):Ao(t,T),o||n.if((0,Y._)`${se.default.errors} === ${s||0}`))}}function Ao(t,e){const{gen:r,schema:s,opts:{useDefaults:n}}=t;n&&(0,$c.assignDefaults)(t,e.type),r.block(()=>{for(const a of e.rules)(0,On.shouldUseRule)(s,a)&&No(t,a.keyword,a.definition,e.type)})}function jc(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(xc(t,e),t.opts.allowUnionTypes||Vc(t,e),Bc(t,t.dataTypes))}function xc(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{Do(t.dataTypes,r)||Dn(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),Rc(t,e)}}function Vc(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&Dn(t,"use allowUnionTypes to allow union type keyword")}function Bc(t,e){const r=t.self.RULES.all;for(const s in r){const n=r[s];if(typeof n=="object"&&(0,On.shouldUseRule)(t.schema,n)){const{type:a}=n.definition;a.length&&!a.some(i=>Lc(e,i))&&Dn(t,`missing type "${a.join(",")}" for keyword "${s}"`)}}}function Lc(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function Do(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function Rc(t,e){const r=[];for(const s of t.dataTypes)Do(e,s)?r.push(s):e.includes("integer")&&s==="number"&&r.push("integer");t.dataTypes=r}function Dn(t,e){const r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Nt.checkStrictMode)(t,e,t.opts.strictTypes)}class Io{constructor(e,r,s){if((0,Dr.validateKeywordUsage)(e,r,s),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=s,this.data=e.data,this.schema=e.schema[s],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Nt.schemaRefOrVal)(e,this.schema,s,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",Po(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Dr.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${s} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",se.default.errors))}result(e,r,s){this.failResult((0,Y.not)(e),r,s)}failResult(e,r,s){this.gen.if(e),s?s():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,Y.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:r}=this;this.fail((0,Y._)`${r} !== undefined && (${(0,Y.or)(this.invalid$data(),e)})`)}error(e,r,s){if(r){this.setParams(r),this._error(e,s),this.setParams({});return}this._error(e,s)}_error(e,r){(e?Ir.reportExtraError:Ir.reportError)(this,this.def.error,r)}$dataError(){(0,Ir.reportError)(this,this.def.$dataError||Ir.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Ir.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,s=Y.nil){this.gen.block(()=>{this.check$data(e,s),r()})}check$data(e=Y.nil,r=Y.nil){if(!this.$data)return;const{gen:s,schemaCode:n,schemaType:a,def:i}=this;s.if((0,Y.or)((0,Y._)`${n} === undefined`,r)),e!==Y.nil&&s.assign(e,!0),(a.length||i.validateSchema)&&(s.elseIf(this.invalid$data()),this.$dataError(),e!==Y.nil&&s.assign(e,!1)),s.else()}invalid$data(){const{gen:e,schemaCode:r,schemaType:s,def:n,it:a}=this;return(0,Y.or)(i(),o());function i(){if(s.length){if(!(r instanceof Y.Name))throw new Error("ajv implementation error");const u=Array.isArray(s)?s:[s];return(0,Y._)`${(0,fs.checkDataTypes)(u,r,a.opts.strictNumbers,fs.DataType.Wrong)}`}return Y.nil}function o(){if(n.validateSchema){const u=e.scopeValue("validate$data",{ref:n.validateSchema});return(0,Y._)`!${u}(${r})`}return Y.nil}}subschema(e,r){const s=(0,An.getSubschema)(this.it,e);(0,An.extendSubschemaData)(s,this.it,e),(0,An.extendSubschemaMode)(s,e);const n={...this.it,...s,items:void 0,props:void 0};return Oc(n,r),n}mergeEvaluated(e,r){const{it:s,gen:n}=this;s.opts.unevaluated&&(s.props!==!0&&e.props!==void 0&&(s.props=Nt.mergeEvaluated.props(n,e.props,s.props,r)),s.items!==!0&&e.items!==void 0&&(s.items=Nt.mergeEvaluated.items(n,e.items,s.items,r)))}mergeValidEvaluated(e,r){const{it:s,gen:n}=this;if(s.opts.unevaluated&&(s.props!==!0||s.items!==!0))return n.if(r,()=>this.mergeEvaluated(e,Y.Name)),!0}}ct.KeywordCxt=Io;function No(t,e,r,s){const n=new Io(t,r,e);"code"in r?r.code(n,s):n.$data&&r.validate?(0,Dr.funcKeywordCode)(n,r):"macro"in r?(0,Dr.macroKeywordCode)(n,r):(r.compile||r.validate)&&(0,Dr.funcKeywordCode)(n,r)}const zc=/^\/(?:[^~]|~0|~1)*$/,qc=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Po(t,{dataLevel:e,dataNames:r,dataPathArr:s}){let n,a;if(t==="")return se.default.rootData;if(t[0]==="/"){if(!zc.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);n=t,a=se.default.rootData}else{const c=qc.exec(t);if(!c)throw new Error(`Invalid JSON-pointer: ${t}`);const d=+c[1];if(n=c[2],n==="#"){if(d>=e)throw new Error(u("property/index",d));return s[e-d]}if(d>e)throw new Error(u("data",d));if(a=r[e-d],!n)return a}let i=a;const o=n.split("/");for(const c of o)c&&(a=(0,Y._)`${a}${(0,Y.getProperty)((0,Nt.unescapeJsonPointer)(c))}`,i=(0,Y._)`${i} && ${a}`);return i;function u(c,d){return`Cannot access ${c} ${d} levels up, current level is ${e}`}}ct.getData=Po;var Nr={};Object.defineProperty(Nr,"__esModule",{value:!0});class Uc extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}Nr.default=Uc;var Pr={};Object.defineProperty(Pr,"__esModule",{value:!0});const In=Le;class Hc extends Error{constructor(e,r,s,n){super(n||`can't resolve reference ${s} from id ${r}`),this.missingRef=(0,In.resolveUrl)(e,r,s),this.missingSchema=(0,In.normalizeId)((0,In.getFullPath)(e,this.missingRef))}}Pr.default=Hc;var Xe={};Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.resolveSchema=Xe.getCompilingSchema=Xe.resolveRef=Xe.compileSchema=Xe.SchemaEnv=void 0;const dt=ue,Kc=Nr,Xt=yt,ft=Le,Fo=K,Gc=ct;class ps{constructor(e){var r;this.refs={},this.dynamicAnchors={};let s;typeof e.schema=="object"&&(s=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,ft.normalizeId)(s==null?void 0:s[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=s==null?void 0:s.$async,this.refs={}}}Xe.SchemaEnv=ps;function Nn(t){const e=Mo.call(this,t);if(e)return e;const r=(0,ft.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:s,lines:n}=this.opts.code,{ownProperties:a}=this.opts,i=new dt.CodeGen(this.scope,{es5:s,lines:n,ownProperties:a});let o;t.$async&&(o=i.scopeValue("Error",{ref:Kc.default,code:(0,dt._)`require("ajv/dist/runtime/validation_error").default`}));const u=i.scopeName("validate");t.validateName=u;const c={gen:i,allErrors:this.opts.allErrors,data:Xt.default.data,parentData:Xt.default.parentData,parentDataProperty:Xt.default.parentDataProperty,dataNames:[Xt.default.data],dataPathArr:[dt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,dt.stringify)(t.schema)}:{ref:t.schema}),validateName:u,ValidationError:o,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:dt.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,dt._)`""`,opts:this.opts,self:this};let d;try{this._compilations.add(t),(0,Gc.validateFunctionCode)(c),i.optimize(this.opts.code.optimize);const p=i.toString();d=`${i.scopeRefs(Xt.default.scope)}return ${p}`,this.opts.code.process&&(d=this.opts.code.process(d,t));const E=new Function(`${Xt.default.self}`,`${Xt.default.scope}`,d)(this,this.scope.get());if(this.scope.value(u,{ref:E}),E.errors=null,E.schema=t.schema,E.schemaEnv=t,t.$async&&(E.$async=!0),this.opts.code.source===!0&&(E.source={validateName:u,validateCode:p,scopeValues:i._values}),this.opts.unevaluated){const{props:k,items:S}=c;E.evaluated={props:k instanceof dt.Name?void 0:k,items:S instanceof dt.Name?void 0:S,dynamicProps:k instanceof dt.Name,dynamicItems:S instanceof dt.Name},E.source&&(E.source.evaluated=(0,dt.stringify)(E.evaluated))}return t.validate=E,t}catch(p){throw delete t.validate,delete t.validateName,d&&this.logger.error("Error compiling schema, function code:",d),p}finally{this._compilations.delete(t)}}Xe.compileSchema=Nn;function Wc(t,e,r){var s;r=(0,ft.resolveUrl)(this.opts.uriResolver,e,r);const n=t.refs[r];if(n)return n;let a=Jc.call(this,t,r);if(a===void 0){const i=(s=t.localRefs)===null||s===void 0?void 0:s[r],{schemaId:o}=this.opts;i&&(a=new ps({schema:i,schemaId:o,root:t,baseId:e}))}if(a!==void 0)return t.refs[r]=Yc.call(this,a)}Xe.resolveRef=Wc;function Yc(t){return(0,ft.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:Nn.call(this,t)}function Mo(t){for(const e of this._compilations)if(Xc(e,t))return e}Xe.getCompilingSchema=Mo;function Xc(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function Jc(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||hs.call(this,t,e)}function hs(t,e){const r=this.opts.uriResolver.parse(e),s=(0,ft._getFullPath)(this.opts.uriResolver,r);let n=(0,ft.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&s===n)return Pn.call(this,r,t);const a=(0,ft.normalizeId)(s),i=this.refs[a]||this.schemas[a];if(typeof i=="string"){const o=hs.call(this,t,i);return typeof(o==null?void 0:o.schema)!="object"?void 0:Pn.call(this,r,o)}if(typeof(i==null?void 0:i.schema)=="object"){if(i.validate||Nn.call(this,i),a===(0,ft.normalizeId)(e)){const{schema:o}=i,{schemaId:u}=this.opts,c=o[u];return c&&(n=(0,ft.resolveUrl)(this.opts.uriResolver,n,c)),new ps({schema:o,schemaId:u,root:t,baseId:n})}return Pn.call(this,r,i)}}Xe.resolveSchema=hs;const Zc=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Pn(t,{baseId:e,schema:r,root:s}){var n;if(((n=t.fragment)===null||n===void 0?void 0:n[0])!=="/")return;for(const o of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;const u=r[(0,Fo.unescapeFragment)(o)];if(u===void 0)return;r=u;const c=typeof r=="object"&&r[this.opts.schemaId];!Zc.has(o)&&c&&(e=(0,ft.resolveUrl)(this.opts.uriResolver,e,c))}let a;if(typeof r!="boolean"&&r.$ref&&!(0,Fo.schemaHasRulesButRef)(r,this.RULES)){const o=(0,ft.resolveUrl)(this.opts.uriResolver,e,r.$ref);a=hs.call(this,s,o)}const{schemaId:i}=this.opts;if(a=a||new ps({schema:r,schemaId:i,root:s,baseId:e}),a.schema!==a.root.schema)return a}const Qc={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1};var Fn={},Mn={exports:{}};/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */(function(t,e){(function(r,s){s(e)})(Sl,function(r){function s(){for(var $=arguments.length,m=Array($),C=0;C<$;C++)m[C]=arguments[C];if(m.length>1){m[0]=m[0].slice(0,-1);for(var x=m.length-1,j=1;j<x;++j)m[j]=m[j].slice(1,-1);return m[x]=m[x].slice(1),m.join("")}else return m[0]}function n($){return"(?:"+$+")"}function a($){return $===void 0?"undefined":$===null?"null":Object.prototype.toString.call($).split(" ").pop().split("]").shift().toLowerCase()}function i($){return $.toUpperCase()}function o($){return $!=null?$ instanceof Array?$:typeof $.length!="number"||$.split||$.setInterval||$.call?[$]:Array.prototype.slice.call($):[]}function u($,m){var C=$;if(m)for(var x in m)C[x]=m[x];return C}function c($){var m="[A-Za-z]",C="[0-9]",x=s(C,"[A-Fa-f]"),j=n(n("%[EFef]"+x+"%"+x+x+"%"+x+x)+"|"+n("%[89A-Fa-f]"+x+"%"+x+x)+"|"+n("%"+x+x)),J="[\\:\\/\\?\\#\\[\\]\\@]",Q="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",fe=s(J,Q),we=$?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",Ne=$?"[\\uE000-\\uF8FF]":"[]",de=s(m,C,"[\\-\\.\\_\\~]",we);n(m+s(m,C,"[\\+\\-\\.]")+"*"),n(n(j+"|"+s(de,Q,"[\\:]"))+"*");var Se=n(n("25[0-5]")+"|"+n("2[0-4]"+C)+"|"+n("1"+C+C)+"|"+n("0?[1-9]"+C)+"|0?0?"+C),Pe=n(Se+"\\."+Se+"\\."+Se+"\\."+Se),ae=n(x+"{1,4}"),Ce=n(n(ae+"\\:"+ae)+"|"+Pe),Me=n(n(ae+"\\:")+"{6}"+Ce),Te=n("\\:\\:"+n(ae+"\\:")+"{5}"+Ce),Rt=n(n(ae)+"?\\:\\:"+n(ae+"\\:")+"{4}"+Ce),St=n(n(n(ae+"\\:")+"{0,1}"+ae)+"?\\:\\:"+n(ae+"\\:")+"{3}"+Ce),Et=n(n(n(ae+"\\:")+"{0,2}"+ae)+"?\\:\\:"+n(ae+"\\:")+"{2}"+Ce),$r=n(n(n(ae+"\\:")+"{0,3}"+ae)+"?\\:\\:"+ae+"\\:"+Ce),sr=n(n(n(ae+"\\:")+"{0,4}"+ae)+"?\\:\\:"+Ce),it=n(n(n(ae+"\\:")+"{0,5}"+ae)+"?\\:\\:"+ae),kt=n(n(n(ae+"\\:")+"{0,6}"+ae)+"?\\:\\:"),nr=n([Me,Te,Rt,St,Et,$r,sr,it,kt].join("|")),Ft=n(n(de+"|"+j)+"+");n("[vV]"+x+"+\\."+s(de,Q,"[\\:]")+"+"),n(n(j+"|"+s(de,Q))+"*");var Hr=n(j+"|"+s(de,Q,"[\\:\\@]"));return n(n(j+"|"+s(de,Q,"[\\@]"))+"+"),n(n(Hr+"|"+s("[\\/\\?]",Ne))+"*"),{NOT_SCHEME:new RegExp(s("[^]",m,C,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(s("[^\\%\\:]",de,Q),"g"),NOT_HOST:new RegExp(s("[^\\%\\[\\]\\:]",de,Q),"g"),NOT_PATH:new RegExp(s("[^\\%\\/\\:\\@]",de,Q),"g"),NOT_PATH_NOSCHEME:new RegExp(s("[^\\%\\/\\@]",de,Q),"g"),NOT_QUERY:new RegExp(s("[^\\%]",de,Q,"[\\:\\@\\/\\?]",Ne),"g"),NOT_FRAGMENT:new RegExp(s("[^\\%]",de,Q,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(s("[^]",de,Q),"g"),UNRESERVED:new RegExp(de,"g"),OTHER_CHARS:new RegExp(s("[^\\%]",de,fe),"g"),PCT_ENCODED:new RegExp(j,"g"),IPV4ADDRESS:new RegExp("^("+Pe+")$"),IPV6ADDRESS:new RegExp("^\\[?("+nr+")"+n(n("\\%25|\\%(?!"+x+"{2})")+"("+Ft+")")+"?\\]?$")}}var d=c(!1),p=c(!0),T=function(){function $(m,C){var x=[],j=!0,J=!1,Q=void 0;try{for(var fe=m[Symbol.iterator](),we;!(j=(we=fe.next()).done)&&(x.push(we.value),!(C&&x.length===C));j=!0);}catch(Ne){J=!0,Q=Ne}finally{try{!j&&fe.return&&fe.return()}finally{if(J)throw Q}}return x}return function(m,C){if(Array.isArray(m))return m;if(Symbol.iterator in Object(m))return $(m,C);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),E=function($){if(Array.isArray($)){for(var m=0,C=Array($.length);m<$.length;m++)C[m]=$[m];return C}else return Array.from($)},k=2147483647,S=36,_=1,g=26,D=38,N=700,I=72,b=128,R="-",L=/^xn--/,ee=/[^\0-\x7E]/,U=/[\x2E\u3002\uFF0E\uFF61]/g,oe={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},H=S-_,G=Math.floor,ne=String.fromCharCode;function W($){throw new RangeError(oe[$])}function he($,m){for(var C=[],x=$.length;x--;)C[x]=m($[x]);return C}function me($,m){var C=$.split("@"),x="";C.length>1&&(x=C[0]+"@",$=C[1]),$=$.replace(U,".");var j=$.split("."),J=he(j,m).join(".");return x+J}function _e($){for(var m=[],C=0,x=$.length;C<x;){var j=$.charCodeAt(C++);if(j>=55296&&j<=56319&&C<x){var J=$.charCodeAt(C++);(J&64512)==56320?m.push(((j&1023)<<10)+(J&1023)+65536):(m.push(j),C--)}else m.push(j)}return m}var Ie=function(m){return String.fromCodePoint.apply(String,E(m))},Fe=function(m){return m-48<10?m-22:m-65<26?m-65:m-97<26?m-97:S},A=function(m,C){return m+22+75*(m<26)-((C!=0)<<5)},y=function(m,C,x){var j=0;for(m=x?G(m/N):m>>1,m+=G(m/C);m>H*g>>1;j+=S)m=G(m/H);return G(j+(H+1)*m/(m+D))},M=function(m){var C=[],x=m.length,j=0,J=b,Q=I,fe=m.lastIndexOf(R);fe<0&&(fe=0);for(var we=0;we<fe;++we)m.charCodeAt(we)>=128&&W("not-basic"),C.push(m.charCodeAt(we));for(var Ne=fe>0?fe+1:0;Ne<x;){for(var de=j,Se=1,Pe=S;;Pe+=S){Ne>=x&&W("invalid-input");var ae=Fe(m.charCodeAt(Ne++));(ae>=S||ae>G((k-j)/Se))&&W("overflow"),j+=ae*Se;var Ce=Pe<=Q?_:Pe>=Q+g?g:Pe-Q;if(ae<Ce)break;var Me=S-Ce;Se>G(k/Me)&&W("overflow"),Se*=Me}var Te=C.length+1;Q=y(j-de,Te,de==0),G(j/Te)>k-J&&W("overflow"),J+=G(j/Te),j%=Te,C.splice(j++,0,J)}return String.fromCodePoint.apply(String,C)},O=function(m){var C=[];m=_e(m);var x=m.length,j=b,J=0,Q=I,fe=!0,we=!1,Ne=void 0;try{for(var de=m[Symbol.iterator](),Se;!(fe=(Se=de.next()).done);fe=!0){var Pe=Se.value;Pe<128&&C.push(ne(Pe))}}catch(Kr){we=!0,Ne=Kr}finally{try{!fe&&de.return&&de.return()}finally{if(we)throw Ne}}var ae=C.length,Ce=ae;for(ae&&C.push(R);Ce<x;){var Me=k,Te=!0,Rt=!1,St=void 0;try{for(var Et=m[Symbol.iterator](),$r;!(Te=($r=Et.next()).done);Te=!0){var sr=$r.value;sr>=j&&sr<Me&&(Me=sr)}}catch(Kr){Rt=!0,St=Kr}finally{try{!Te&&Et.return&&Et.return()}finally{if(Rt)throw St}}var it=Ce+1;Me-j>G((k-J)/it)&&W("overflow"),J+=(Me-j)*it,j=Me;var kt=!0,nr=!1,Ft=void 0;try{for(var Hr=m[Symbol.iterator](),vl;!(kt=(vl=Hr.next()).done);kt=!0){var _l=vl.value;if(_l<j&&++J>k&&W("overflow"),_l==j){for(var Ds=J,Is=S;;Is+=S){var Ns=Is<=Q?_:Is>=Q+g?g:Is-Q;if(Ds<Ns)break;var bl=Ds-Ns,$l=S-Ns;C.push(ne(A(Ns+bl%$l,0))),Ds=G(bl/$l)}C.push(ne(A(Ds,0))),Q=y(J,it,Ce==ae),J=0,++Ce}}}catch(Kr){nr=!0,Ft=Kr}finally{try{!kt&&Hr.return&&Hr.return()}finally{if(nr)throw Ft}}++J,++j}return C.join("")},l=function(m){return me(m,function(C){return L.test(C)?M(C.slice(4).toLowerCase()):C})},f=function(m){return me(m,function(C){return ee.test(C)?"xn--"+O(C):C})},v={version:"2.1.0",ucs2:{decode:_e,encode:Ie},decode:M,encode:O,toASCII:f,toUnicode:l},P={};function V($){var m=$.charCodeAt(0),C=void 0;return m<16?C="%0"+m.toString(16).toUpperCase():m<128?C="%"+m.toString(16).toUpperCase():m<2048?C="%"+(m>>6|192).toString(16).toUpperCase()+"%"+(m&63|128).toString(16).toUpperCase():C="%"+(m>>12|224).toString(16).toUpperCase()+"%"+(m>>6&63|128).toString(16).toUpperCase()+"%"+(m&63|128).toString(16).toUpperCase(),C}function B($){for(var m="",C=0,x=$.length;C<x;){var j=parseInt($.substr(C+1,2),16);if(j<128)m+=String.fromCharCode(j),C+=3;else if(j>=194&&j<224){if(x-C>=6){var J=parseInt($.substr(C+4,2),16);m+=String.fromCharCode((j&31)<<6|J&63)}else m+=$.substr(C,6);C+=6}else if(j>=224){if(x-C>=9){var Q=parseInt($.substr(C+4,2),16),fe=parseInt($.substr(C+7,2),16);m+=String.fromCharCode((j&15)<<12|(Q&63)<<6|fe&63)}else m+=$.substr(C,9);C+=9}else m+=$.substr(C,3),C+=3}return m}function z($,m){function C(x){var j=B(x);return j.match(m.UNRESERVED)?j:x}return $.scheme&&($.scheme=String($.scheme).replace(m.PCT_ENCODED,C).toLowerCase().replace(m.NOT_SCHEME,"")),$.userinfo!==void 0&&($.userinfo=String($.userinfo).replace(m.PCT_ENCODED,C).replace(m.NOT_USERINFO,V).replace(m.PCT_ENCODED,i)),$.host!==void 0&&($.host=String($.host).replace(m.PCT_ENCODED,C).toLowerCase().replace(m.NOT_HOST,V).replace(m.PCT_ENCODED,i)),$.path!==void 0&&($.path=String($.path).replace(m.PCT_ENCODED,C).replace($.scheme?m.NOT_PATH:m.NOT_PATH_NOSCHEME,V).replace(m.PCT_ENCODED,i)),$.query!==void 0&&($.query=String($.query).replace(m.PCT_ENCODED,C).replace(m.NOT_QUERY,V).replace(m.PCT_ENCODED,i)),$.fragment!==void 0&&($.fragment=String($.fragment).replace(m.PCT_ENCODED,C).replace(m.NOT_FRAGMENT,V).replace(m.PCT_ENCODED,i)),$}function te($){return $.replace(/^0*(.*)/,"$1")||"0"}function q($,m){var C=$.match(m.IPV4ADDRESS)||[],x=T(C,2),j=x[1];return j?j.split(".").map(te).join("."):$}function pe($,m){var C=$.match(m.IPV6ADDRESS)||[],x=T(C,3),j=x[1],J=x[2];if(j){for(var Q=j.toLowerCase().split("::").reverse(),fe=T(Q,2),we=fe[0],Ne=fe[1],de=Ne?Ne.split(":").map(te):[],Se=we.split(":").map(te),Pe=m.IPV4ADDRESS.test(Se[Se.length-1]),ae=Pe?7:8,Ce=Se.length-ae,Me=Array(ae),Te=0;Te<ae;++Te)Me[Te]=de[Te]||Se[Ce+Te]||"";Pe&&(Me[ae-1]=q(Me[ae-1],m));var Rt=Me.reduce(function(it,kt,nr){if(!kt||kt==="0"){var Ft=it[it.length-1];Ft&&Ft.index+Ft.length===nr?Ft.length++:it.push({index:nr,length:1})}return it},[]),St=Rt.sort(function(it,kt){return kt.length-it.length})[0],Et=void 0;if(St&&St.length>1){var $r=Me.slice(0,St.index),sr=Me.slice(St.index+St.length);Et=$r.join(":")+"::"+sr.join(":")}else Et=Me.join(":");return J&&(Et+="%"+J),Et}else return $}var tt=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,ht="".match(/(){0}/)[1]===void 0;function Ge($){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C={},x=m.iri!==!1?p:d;m.reference==="suffix"&&($=(m.scheme?m.scheme+":":"")+"//"+$);var j=$.match(tt);if(j){ht?(C.scheme=j[1],C.userinfo=j[3],C.host=j[4],C.port=parseInt(j[5],10),C.path=j[6]||"",C.query=j[7],C.fragment=j[8],isNaN(C.port)&&(C.port=j[5])):(C.scheme=j[1]||void 0,C.userinfo=$.indexOf("@")!==-1?j[3]:void 0,C.host=$.indexOf("//")!==-1?j[4]:void 0,C.port=parseInt(j[5],10),C.path=j[6]||"",C.query=$.indexOf("?")!==-1?j[7]:void 0,C.fragment=$.indexOf("#")!==-1?j[8]:void 0,isNaN(C.port)&&(C.port=$.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?j[4]:void 0)),C.host&&(C.host=pe(q(C.host,x),x)),C.scheme===void 0&&C.userinfo===void 0&&C.host===void 0&&C.port===void 0&&!C.path&&C.query===void 0?C.reference="same-document":C.scheme===void 0?C.reference="relative":C.fragment===void 0?C.reference="absolute":C.reference="uri",m.reference&&m.reference!=="suffix"&&m.reference!==C.reference&&(C.error=C.error||"URI is not a "+m.reference+" reference.");var J=P[(m.scheme||C.scheme||"").toLowerCase()];if(!m.unicodeSupport&&(!J||!J.unicodeSupport)){if(C.host&&(m.domainHost||J&&J.domainHost))try{C.host=v.toASCII(C.host.replace(x.PCT_ENCODED,B).toLowerCase())}catch(Q){C.error=C.error||"Host's domain name can not be converted to ASCII via punycode: "+Q}z(C,d)}else z(C,x);J&&J.parse&&J.parse(C,m)}else C.error=C.error||"URI can not be parsed.";return C}function er($,m){var C=m.iri!==!1?p:d,x=[];return $.userinfo!==void 0&&(x.push($.userinfo),x.push("@")),$.host!==void 0&&x.push(pe(q(String($.host),C),C).replace(C.IPV6ADDRESS,function(j,J,Q){return"["+J+(Q?"%25"+Q:"")+"]"})),(typeof $.port=="number"||typeof $.port=="string")&&(x.push(":"),x.push(String($.port))),x.length?x.join(""):void 0}var Pt=/^\.\.?\//,yr=/^\/\.(\/|$)/,vr=/^\/\.\.(\/|$)/,Rr=/^\/?(?:.|\n)*?(?=\/|$)/;function bt($){for(var m=[];$.length;)if($.match(Pt))$=$.replace(Pt,"");else if($.match(yr))$=$.replace(yr,"/");else if($.match(vr))$=$.replace(vr,"/"),m.pop();else if($==="."||$==="..")$="";else{var C=$.match(Rr);if(C){var x=C[0];$=$.slice(x.length),m.push(x)}else throw new Error("Unexpected dot segment condition")}return m.join("")}function Ze($){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C=m.iri?p:d,x=[],j=P[(m.scheme||$.scheme||"").toLowerCase()];if(j&&j.serialize&&j.serialize($,m),$.host&&!C.IPV6ADDRESS.test($.host)){if(m.domainHost||j&&j.domainHost)try{$.host=m.iri?v.toUnicode($.host):v.toASCII($.host.replace(C.PCT_ENCODED,B).toLowerCase())}catch(fe){$.error=$.error||"Host's domain name can not be converted to "+(m.iri?"Unicode":"ASCII")+" via punycode: "+fe}}z($,C),m.reference!=="suffix"&&$.scheme&&(x.push($.scheme),x.push(":"));var J=er($,m);if(J!==void 0&&(m.reference!=="suffix"&&x.push("//"),x.push(J),$.path&&$.path.charAt(0)!=="/"&&x.push("/")),$.path!==void 0){var Q=$.path;!m.absolutePath&&(!j||!j.absolutePath)&&(Q=bt(Q)),J===void 0&&(Q=Q.replace(/^\/\//,"/%2F")),x.push(Q)}return $.query!==void 0&&(x.push("?"),x.push($.query)),$.fragment!==void 0&&(x.push("#"),x.push($.fragment)),x.join("")}function _r($,m){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},x=arguments[3],j={};return x||($=Ge(Ze($,C),C),m=Ge(Ze(m,C),C)),C=C||{},!C.tolerant&&m.scheme?(j.scheme=m.scheme,j.userinfo=m.userinfo,j.host=m.host,j.port=m.port,j.path=bt(m.path||""),j.query=m.query):(m.userinfo!==void 0||m.host!==void 0||m.port!==void 0?(j.userinfo=m.userinfo,j.host=m.host,j.port=m.port,j.path=bt(m.path||""),j.query=m.query):(m.path?(m.path.charAt(0)==="/"?j.path=bt(m.path):(($.userinfo!==void 0||$.host!==void 0||$.port!==void 0)&&!$.path?j.path="/"+m.path:$.path?j.path=$.path.slice(0,$.path.lastIndexOf("/")+1)+m.path:j.path=m.path,j.path=bt(j.path)),j.query=m.query):(j.path=$.path,m.query!==void 0?j.query=m.query:j.query=$.query),j.userinfo=$.userinfo,j.host=$.host,j.port=$.port),j.scheme=$.scheme),j.fragment=m.fragment,j}function zr($,m,C){var x=u({scheme:"null"},C);return Ze(_r(Ge($,x),Ge(m,x),x,!0),x)}function tr($,m){return typeof $=="string"?$=Ze(Ge($,m),m):a($)==="object"&&($=Ge(Ze($,m),m)),$}function qr($,m,C){return typeof $=="string"?$=Ze(Ge($,C),C):a($)==="object"&&($=Ze($,C)),typeof m=="string"?m=Ze(Ge(m,C),C):a(m)==="object"&&(m=Ze(m,C)),$===m}function As($,m){return $&&$.toString().replace(!m||!m.iri?d.ESCAPE:p.ESCAPE,V)}function at($,m){return $&&$.toString().replace(!m||!m.iri?d.PCT_ENCODED:p.PCT_ENCODED,B)}var rr={scheme:"http",domainHost:!0,parse:function(m,C){return m.host||(m.error=m.error||"HTTP URIs must have a host."),m},serialize:function(m,C){var x=String(m.scheme).toLowerCase()==="https";return(m.port===(x?443:80)||m.port==="")&&(m.port=void 0),m.path||(m.path="/"),m}},cl={scheme:"https",domainHost:rr.domainHost,parse:rr.parse,serialize:rr.serialize};function dl($){return typeof $.secure=="boolean"?$.secure:String($.scheme).toLowerCase()==="wss"}var Ur={scheme:"ws",domainHost:!0,parse:function(m,C){var x=m;return x.secure=dl(x),x.resourceName=(x.path||"/")+(x.query?"?"+x.query:""),x.path=void 0,x.query=void 0,x},serialize:function(m,C){if((m.port===(dl(m)?443:80)||m.port==="")&&(m.port=void 0),typeof m.secure=="boolean"&&(m.scheme=m.secure?"wss":"ws",m.secure=void 0),m.resourceName){var x=m.resourceName.split("?"),j=T(x,2),J=j[0],Q=j[1];m.path=J&&J!=="/"?J:void 0,m.query=Q,m.resourceName=void 0}return m.fragment=void 0,m}},fl={scheme:"wss",domainHost:Ur.domainHost,parse:Ur.parse,serialize:Ur.serialize},Jf={},pl="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",$t="[0-9A-Fa-f]",Zf=n(n("%[EFef]"+$t+"%"+$t+$t+"%"+$t+$t)+"|"+n("%[89A-Fa-f]"+$t+"%"+$t+$t)+"|"+n("%"+$t+$t)),Qf="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",ep="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",tp=s(ep,'[\\"\\\\]'),rp="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",sp=new RegExp(pl,"g"),br=new RegExp(Zf,"g"),np=new RegExp(s("[^]",Qf,"[\\.]",'[\\"]',tp),"g"),hl=new RegExp(s("[^]",pl,rp),"g"),ap=hl;function _a($){var m=B($);return m.match(sp)?m:$}var ml={scheme:"mailto",parse:function(m,C){var x=m,j=x.to=x.path?x.path.split(","):[];if(x.path=void 0,x.query){for(var J=!1,Q={},fe=x.query.split("&"),we=0,Ne=fe.length;we<Ne;++we){var de=fe[we].split("=");switch(de[0]){case"to":for(var Se=de[1].split(","),Pe=0,ae=Se.length;Pe<ae;++Pe)j.push(Se[Pe]);break;case"subject":x.subject=at(de[1],C);break;case"body":x.body=at(de[1],C);break;default:J=!0,Q[at(de[0],C)]=at(de[1],C);break}}J&&(x.headers=Q)}x.query=void 0;for(var Ce=0,Me=j.length;Ce<Me;++Ce){var Te=j[Ce].split("@");if(Te[0]=at(Te[0]),C.unicodeSupport)Te[1]=at(Te[1],C).toLowerCase();else try{Te[1]=v.toASCII(at(Te[1],C).toLowerCase())}catch(Rt){x.error=x.error||"Email address's domain name can not be converted to ASCII via punycode: "+Rt}j[Ce]=Te.join("@")}return x},serialize:function(m,C){var x=m,j=o(m.to);if(j){for(var J=0,Q=j.length;J<Q;++J){var fe=String(j[J]),we=fe.lastIndexOf("@"),Ne=fe.slice(0,we).replace(br,_a).replace(br,i).replace(np,V),de=fe.slice(we+1);try{de=C.iri?v.toUnicode(de):v.toASCII(at(de,C).toLowerCase())}catch(Ce){x.error=x.error||"Email address's domain name can not be converted to "+(C.iri?"Unicode":"ASCII")+" via punycode: "+Ce}j[J]=Ne+"@"+de}x.path=j.join(",")}var Se=m.headers=m.headers||{};m.subject&&(Se.subject=m.subject),m.body&&(Se.body=m.body);var Pe=[];for(var ae in Se)Se[ae]!==Jf[ae]&&Pe.push(ae.replace(br,_a).replace(br,i).replace(hl,V)+"="+Se[ae].replace(br,_a).replace(br,i).replace(ap,V));return Pe.length&&(x.query=Pe.join("&")),x}},ip=/^([^\:]+)\:(.*)/,gl={scheme:"urn",parse:function(m,C){var x=m.path&&m.path.match(ip),j=m;if(x){var J=C.scheme||j.scheme||"urn",Q=x[1].toLowerCase(),fe=x[2],we=J+":"+(C.nid||Q),Ne=P[we];j.nid=Q,j.nss=fe,j.path=void 0,Ne&&(j=Ne.parse(j,C))}else j.error=j.error||"URN can not be parsed.";return j},serialize:function(m,C){var x=C.scheme||m.scheme||"urn",j=m.nid,J=x+":"+(C.nid||j),Q=P[J];Q&&(m=Q.serialize(m,C));var fe=m,we=m.nss;return fe.path=(j||C.nid)+":"+we,fe}},op=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,yl={scheme:"urn:uuid",parse:function(m,C){var x=m;return x.uuid=x.nss,x.nss=void 0,!C.tolerant&&(!x.uuid||!x.uuid.match(op))&&(x.error=x.error||"UUID is not valid."),x},serialize:function(m,C){var x=m;return x.nss=(m.uuid||"").toLowerCase(),x}};P[rr.scheme]=rr,P[cl.scheme]=cl,P[Ur.scheme]=Ur,P[fl.scheme]=fl,P[ml.scheme]=ml,P[gl.scheme]=gl,P[yl.scheme]=yl,r.SCHEMES=P,r.pctEncChar=V,r.pctDecChars=B,r.parse=Ge,r.removeDotSegments=bt,r.serialize=Ze,r.resolveComponents=_r,r.resolve=zr,r.normalize=tr,r.equal=qr,r.escapeComponent=As,r.unescapeComponent=at,Object.defineProperty(r,"__esModule",{value:!0})})})(Mn,Mn.exports);var ed=Mn.exports;Object.defineProperty(Fn,"__esModule",{value:!0});const jo=ed;jo.code='require("ajv/dist/runtime/uri").default',Fn.default=jo,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=ct;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=ue;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const s=Nr,n=Pr,a=Wt,i=Xe,o=ue,u=Le,c=je,d=K,p=Qc,T=Fn,E=(A,y)=>new RegExp(A,y);E.code="new RegExp";const k=["removeAdditional","useDefaults","coerceTypes"],S=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),_={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},D=200;function N(A){var y,M,O,l,f,v,P,V,B,z,te,q,pe,tt,ht,Ge,er,Pt,yr,vr,Rr,bt,Ze,_r,zr;const tr=A.strict,qr=(y=A.code)===null||y===void 0?void 0:y.optimize,As=qr===!0||qr===void 0?1:qr||0,at=(O=(M=A.code)===null||M===void 0?void 0:M.regExp)!==null&&O!==void 0?O:E,rr=(l=A.uriResolver)!==null&&l!==void 0?l:T.default;return{strictSchema:(v=(f=A.strictSchema)!==null&&f!==void 0?f:tr)!==null&&v!==void 0?v:!0,strictNumbers:(V=(P=A.strictNumbers)!==null&&P!==void 0?P:tr)!==null&&V!==void 0?V:!0,strictTypes:(z=(B=A.strictTypes)!==null&&B!==void 0?B:tr)!==null&&z!==void 0?z:"log",strictTuples:(q=(te=A.strictTuples)!==null&&te!==void 0?te:tr)!==null&&q!==void 0?q:"log",strictRequired:(tt=(pe=A.strictRequired)!==null&&pe!==void 0?pe:tr)!==null&&tt!==void 0?tt:!1,code:A.code?{...A.code,optimize:As,regExp:at}:{optimize:As,regExp:at},loopRequired:(ht=A.loopRequired)!==null&&ht!==void 0?ht:D,loopEnum:(Ge=A.loopEnum)!==null&&Ge!==void 0?Ge:D,meta:(er=A.meta)!==null&&er!==void 0?er:!0,messages:(Pt=A.messages)!==null&&Pt!==void 0?Pt:!0,inlineRefs:(yr=A.inlineRefs)!==null&&yr!==void 0?yr:!0,schemaId:(vr=A.schemaId)!==null&&vr!==void 0?vr:"$id",addUsedSchema:(Rr=A.addUsedSchema)!==null&&Rr!==void 0?Rr:!0,validateSchema:(bt=A.validateSchema)!==null&&bt!==void 0?bt:!0,validateFormats:(Ze=A.validateFormats)!==null&&Ze!==void 0?Ze:!0,unicodeRegExp:(_r=A.unicodeRegExp)!==null&&_r!==void 0?_r:!0,int32range:(zr=A.int32range)!==null&&zr!==void 0?zr:!0,uriResolver:rr}}class I{constructor(y={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,y=this.opts={...y,...N(y)};const{es5:M,lines:O}=this.opts.code;this.scope=new o.ValueScope({scope:{},prefixes:S,es5:M,lines:O}),this.logger=G(y.logger);const l=y.validateFormats;y.validateFormats=!1,this.RULES=(0,a.getRules)(),b.call(this,_,y,"NOT SUPPORTED"),b.call(this,g,y,"DEPRECATED","warn"),this._metaOpts=oe.call(this),y.formats&&ee.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),y.keywords&&U.call(this,y.keywords),typeof y.meta=="object"&&this.addMetaSchema(y.meta),L.call(this),y.validateFormats=l}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:y,meta:M,schemaId:O}=this.opts;let l=p;O==="id"&&(l={...p},l.id=l.$id,delete l.$id),M&&y&&this.addMetaSchema(l,l[O],!1)}defaultMeta(){const{meta:y,schemaId:M}=this.opts;return this.opts.defaultMeta=typeof y=="object"?y[M]||y:void 0}validate(y,M){let O;if(typeof y=="string"){if(O=this.getSchema(y),!O)throw new Error(`no schema with key or ref "${y}"`)}else O=this.compile(y);const l=O(M);return"$async"in O||(this.errors=O.errors),l}compile(y,M){const O=this._addSchema(y,M);return O.validate||this._compileSchemaEnv(O)}compileAsync(y,M){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:O}=this.opts;return l.call(this,y,M);async function l(z,te){await f.call(this,z.$schema);const q=this._addSchema(z,te);return q.validate||v.call(this,q)}async function f(z){z&&!this.getSchema(z)&&await l.call(this,{$ref:z},!0)}async function v(z){try{return this._compileSchemaEnv(z)}catch(te){if(!(te instanceof n.default))throw te;return P.call(this,te),await V.call(this,te.missingSchema),v.call(this,z)}}function P({missingSchema:z,missingRef:te}){if(this.refs[z])throw new Error(`AnySchema ${z} is loaded but ${te} cannot be resolved`)}async function V(z){const te=await B.call(this,z);this.refs[z]||await f.call(this,te.$schema),this.refs[z]||this.addSchema(te,z,M)}async function B(z){const te=this._loading[z];if(te)return te;try{return await(this._loading[z]=O(z))}finally{delete this._loading[z]}}}addSchema(y,M,O,l=this.opts.validateSchema){if(Array.isArray(y)){for(const v of y)this.addSchema(v,void 0,O,l);return this}let f;if(typeof y=="object"){const{schemaId:v}=this.opts;if(f=y[v],f!==void 0&&typeof f!="string")throw new Error(`schema ${v} must be string`)}return M=(0,u.normalizeId)(M||f),this._checkUnique(M),this.schemas[M]=this._addSchema(y,O,M,l,!0),this}addMetaSchema(y,M,O=this.opts.validateSchema){return this.addSchema(y,M,!0,O),this}validateSchema(y,M){if(typeof y=="boolean")return!0;let O;if(O=y.$schema,O!==void 0&&typeof O!="string")throw new Error("$schema must be a string");if(O=O||this.opts.defaultMeta||this.defaultMeta(),!O)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const l=this.validate(O,y);if(!l&&M){const f="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(f);else throw new Error(f)}return l}getSchema(y){let M;for(;typeof(M=R.call(this,y))=="string";)y=M;if(M===void 0){const{schemaId:O}=this.opts,l=new i.SchemaEnv({schema:{},schemaId:O});if(M=i.resolveSchema.call(this,l,y),!M)return;this.refs[y]=M}return M.validate||this._compileSchemaEnv(M)}removeSchema(y){if(y instanceof RegExp)return this._removeAllSchemas(this.schemas,y),this._removeAllSchemas(this.refs,y),this;switch(typeof y){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const M=R.call(this,y);return typeof M=="object"&&this._cache.delete(M.schema),delete this.schemas[y],delete this.refs[y],this}case"object":{const M=y;this._cache.delete(M);let O=y[this.opts.schemaId];return O&&(O=(0,u.normalizeId)(O),delete this.schemas[O],delete this.refs[O]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(y){for(const M of y)this.addKeyword(M);return this}addKeyword(y,M){let O;if(typeof y=="string")O=y,typeof M=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),M.keyword=O);else if(typeof y=="object"&&M===void 0){if(M=y,O=M.keyword,Array.isArray(O)&&!O.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(W.call(this,O,M),!M)return(0,d.eachItem)(O,f=>he.call(this,f)),this;_e.call(this,M);const l={...M,type:(0,c.getJSONTypes)(M.type),schemaType:(0,c.getJSONTypes)(M.schemaType)};return(0,d.eachItem)(O,l.type.length===0?f=>he.call(this,f,l):f=>l.type.forEach(v=>he.call(this,f,l,v))),this}getKeyword(y){const M=this.RULES.all[y];return typeof M=="object"?M.definition:!!M}removeKeyword(y){const{RULES:M}=this;delete M.keywords[y],delete M.all[y];for(const O of M.rules){const l=O.rules.findIndex(f=>f.keyword===y);l>=0&&O.rules.splice(l,1)}return this}addFormat(y,M){return typeof M=="string"&&(M=new RegExp(M)),this.formats[y]=M,this}errorsText(y=this.errors,{separator:M=", ",dataVar:O="data"}={}){return!y||y.length===0?"No errors":y.map(l=>`${O}${l.instancePath} ${l.message}`).reduce((l,f)=>l+M+f)}$dataMetaSchema(y,M){const O=this.RULES.all;y=JSON.parse(JSON.stringify(y));for(const l of M){const f=l.split("/").slice(1);let v=y;for(const P of f)v=v[P];for(const P in O){const V=O[P];if(typeof V!="object")continue;const{$data:B}=V.definition,z=v[P];B&&z&&(v[P]=Fe(z))}}return y}_removeAllSchemas(y,M){for(const O in y){const l=y[O];(!M||M.test(O))&&(typeof l=="string"?delete y[O]:l&&!l.meta&&(this._cache.delete(l.schema),delete y[O]))}}_addSchema(y,M,O,l=this.opts.validateSchema,f=this.opts.addUsedSchema){let v;const{schemaId:P}=this.opts;if(typeof y=="object")v=y[P];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof y!="boolean")throw new Error("schema must be object or boolean")}let V=this._cache.get(y);if(V!==void 0)return V;O=(0,u.normalizeId)(v||O);const B=u.getSchemaRefs.call(this,y,O);return V=new i.SchemaEnv({schema:y,schemaId:P,meta:M,baseId:O,localRefs:B}),this._cache.set(V.schema,V),f&&!O.startsWith("#")&&(O&&this._checkUnique(O),this.refs[O]=V),l&&this.validateSchema(y,!0),V}_checkUnique(y){if(this.schemas[y]||this.refs[y])throw new Error(`schema with key or id "${y}" already exists`)}_compileSchemaEnv(y){if(y.meta?this._compileMetaSchema(y):i.compileSchema.call(this,y),!y.validate)throw new Error("ajv implementation error");return y.validate}_compileMetaSchema(y){const M=this.opts;this.opts=this._metaOpts;try{i.compileSchema.call(this,y)}finally{this.opts=M}}}I.ValidationError=s.default,I.MissingRefError=n.default,t.default=I;function b(A,y,M,O="error"){for(const l in A){const f=l;f in y&&this.logger[O](`${M}: option ${l}. ${A[f]}`)}}function R(A){return A=(0,u.normalizeId)(A),this.schemas[A]||this.refs[A]}function L(){const A=this.opts.schemas;if(A)if(Array.isArray(A))this.addSchema(A);else for(const y in A)this.addSchema(A[y],y)}function ee(){for(const A in this.opts.formats){const y=this.opts.formats[A];y&&this.addFormat(A,y)}}function U(A){if(Array.isArray(A)){this.addVocabulary(A);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const y in A){const M=A[y];M.keyword||(M.keyword=y),this.addKeyword(M)}}function oe(){const A={...this.opts};for(const y of k)delete A[y];return A}const H={log(){},warn(){},error(){}};function G(A){if(A===!1)return H;if(A===void 0)return console;if(A.log&&A.warn&&A.error)return A;throw new Error("logger must implement log, warn and error methods")}const ne=/^[a-z_$][a-z0-9_$:-]*$/i;function W(A,y){const{RULES:M}=this;if((0,d.eachItem)(A,O=>{if(M.keywords[O])throw new Error(`Keyword ${O} is already defined`);if(!ne.test(O))throw new Error(`Keyword ${O} has invalid name`)}),!!y&&y.$data&&!("code"in y||"validate"in y))throw new Error('$data keyword must have "code" or "validate" function')}function he(A,y,M){var O;const l=y==null?void 0:y.post;if(M&&l)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:f}=this;let v=l?f.post:f.rules.find(({type:V})=>V===M);if(v||(v={type:M,rules:[]},f.rules.push(v)),f.keywords[A]=!0,!y)return;const P={keyword:A,definition:{...y,type:(0,c.getJSONTypes)(y.type),schemaType:(0,c.getJSONTypes)(y.schemaType)}};y.before?me.call(this,v,P,y.before):v.rules.push(P),f.all[A]=P,(O=y.implements)===null||O===void 0||O.forEach(V=>this.addKeyword(V))}function me(A,y,M){const O=A.rules.findIndex(l=>l.keyword===M);O>=0?A.rules.splice(O,0,y):(A.rules.push(y),this.logger.warn(`rule ${M} is not defined`))}function _e(A){let{metaSchema:y}=A;y!==void 0&&(A.$data&&this.opts.$data&&(y=Fe(y)),A.validateSchema=this.compile(y,!0))}const Ie={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Fe(A){return{anyOf:[A,Ie]}}}(Gi);var jn={},xn={},Vn={};Object.defineProperty(Vn,"__esModule",{value:!0});const td={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Vn.default=td;var Jt={};Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.callRef=Jt.getValidate=void 0;const rd=Pr,xo=ce,Je=ue,fr=yt,Vo=Xe,ms=K,sd={keyword:"$ref",schemaType:"string",code(t){const{gen:e,schema:r,it:s}=t,{baseId:n,schemaEnv:a,validateName:i,opts:o,self:u}=s,{root:c}=a;if((r==="#"||r==="#/")&&n===c.baseId)return p();const d=Vo.resolveRef.call(u,c,n,r);if(d===void 0)throw new rd.default(s.opts.uriResolver,n,r);if(d instanceof Vo.SchemaEnv)return T(d);return E(d);function p(){if(a===c)return gs(t,i,a,a.$async);const k=e.scopeValue("root",{ref:c});return gs(t,(0,Je._)`${k}.validate`,c,c.$async)}function T(k){const S=Bo(t,k);gs(t,S,k,k.$async)}function E(k){const S=e.scopeValue("schema",o.code.source===!0?{ref:k,code:(0,Je.stringify)(k)}:{ref:k}),_=e.name("valid"),g=t.subschema({schema:k,dataTypes:[],schemaPath:Je.nil,topSchemaRef:S,errSchemaPath:r},_);t.mergeEvaluated(g),t.ok(_)}}};function Bo(t,e){const{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,Je._)`${r.scopeValue("wrapper",{ref:e})}.validate`}Jt.getValidate=Bo;function gs(t,e,r,s){const{gen:n,it:a}=t,{allErrors:i,schemaEnv:o,opts:u}=a,c=u.passContext?fr.default.this:Je.nil;s?d():p();function d(){if(!o.$async)throw new Error("async schema referenced by sync schema");const k=n.let("valid");n.try(()=>{n.code((0,Je._)`await ${(0,xo.callValidateCode)(t,e,c)}`),E(e),i||n.assign(k,!0)},S=>{n.if((0,Je._)`!(${S} instanceof ${a.ValidationError})`,()=>n.throw(S)),T(S),i||n.assign(k,!1)}),t.ok(k)}function p(){t.result((0,xo.callValidateCode)(t,e,c),()=>E(e),()=>T(e))}function T(k){const S=(0,Je._)`${k}.errors`;n.assign(fr.default.vErrors,(0,Je._)`${fr.default.vErrors} === null ? ${S} : ${fr.default.vErrors}.concat(${S})`),n.assign(fr.default.errors,(0,Je._)`${fr.default.vErrors}.length`)}function E(k){var S;if(!a.opts.unevaluated)return;const _=(S=r==null?void 0:r.validate)===null||S===void 0?void 0:S.evaluated;if(a.props!==!0)if(_&&!_.dynamicProps)_.props!==void 0&&(a.props=ms.mergeEvaluated.props(n,_.props,a.props));else{const g=n.var("props",(0,Je._)`${k}.evaluated.props`);a.props=ms.mergeEvaluated.props(n,g,a.props,Je.Name)}if(a.items!==!0)if(_&&!_.dynamicItems)_.items!==void 0&&(a.items=ms.mergeEvaluated.items(n,_.items,a.items));else{const g=n.var("items",(0,Je._)`${k}.evaluated.items`);a.items=ms.mergeEvaluated.items(n,g,a.items,Je.Name)}}}Jt.callRef=gs,Jt.default=sd,Object.defineProperty(xn,"__esModule",{value:!0});const nd=Vn,ad=Jt,id=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",nd.default,ad.default];xn.default=id;var Bn={},Ln={};Object.defineProperty(Ln,"__esModule",{value:!0});const ys=ue,Lt=ys.operators,vs={maximum:{okStr:"<=",ok:Lt.LTE,fail:Lt.GT},minimum:{okStr:">=",ok:Lt.GTE,fail:Lt.LT},exclusiveMaximum:{okStr:"<",ok:Lt.LT,fail:Lt.GTE},exclusiveMinimum:{okStr:">",ok:Lt.GT,fail:Lt.LTE}},od={message:({keyword:t,schemaCode:e})=>(0,ys.str)`must be ${vs[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,ys._)`{comparison: ${vs[t].okStr}, limit: ${e}}`},ld={keyword:Object.keys(vs),type:"number",schemaType:"number",$data:!0,error:od,code(t){const{keyword:e,data:r,schemaCode:s}=t;t.fail$data((0,ys._)`${r} ${vs[e].fail} ${s} || isNaN(${r})`)}};Ln.default=ld;var Rn={};Object.defineProperty(Rn,"__esModule",{value:!0});const Fr=ue,ud={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:t})=>(0,Fr.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Fr._)`{multipleOf: ${t}}`},code(t){const{gen:e,data:r,schemaCode:s,it:n}=t,a=n.opts.multipleOfPrecision,i=e.let("res"),o=a?(0,Fr._)`Math.abs(Math.round(${i}) - ${i}) > 1e-${a}`:(0,Fr._)`${i} !== parseInt(${i})`;t.fail$data((0,Fr._)`(${s} === 0 || (${i} = ${r}/${s}, ${o}))`)}};Rn.default=ud;var zn={},qn={};Object.defineProperty(qn,"__esModule",{value:!0});function Lo(t){const e=t.length;let r=0,s=0,n;for(;s<e;)r++,n=t.charCodeAt(s++),n>=55296&&n<=56319&&s<e&&(n=t.charCodeAt(s),(n&64512)===56320&&s++);return r}qn.default=Lo,Lo.code='require("ajv/dist/runtime/ucs2length").default',Object.defineProperty(zn,"__esModule",{value:!0});const Zt=ue,cd=K,dd=qn,fd={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:t,schemaCode:e}){const r=t==="maxLength"?"more":"fewer";return(0,Zt.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,Zt._)`{limit: ${t}}`},code(t){const{keyword:e,data:r,schemaCode:s,it:n}=t,a=e==="maxLength"?Zt.operators.GT:Zt.operators.LT,i=n.opts.unicode===!1?(0,Zt._)`${r}.length`:(0,Zt._)`${(0,cd.useFunc)(t.gen,dd.default)}(${r})`;t.fail$data((0,Zt._)`${i} ${a} ${s}`)}};zn.default=fd;var Un={};Object.defineProperty(Un,"__esModule",{value:!0});const pd=ce,_s=ue,hd={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:t})=>(0,_s.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,_s._)`{pattern: ${t}}`},code(t){const{data:e,$data:r,schema:s,schemaCode:n,it:a}=t,i=a.opts.unicodeRegExp?"u":"",o=r?(0,_s._)`(new RegExp(${n}, ${i}))`:(0,pd.usePattern)(t,s);t.fail$data((0,_s._)`!${o}.test(${e})`)}};Un.default=hd;var Hn={};Object.defineProperty(Hn,"__esModule",{value:!0});const Mr=ue,md={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:t,schemaCode:e}){const r=t==="maxProperties"?"more":"fewer";return(0,Mr.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,Mr._)`{limit: ${t}}`},code(t){const{keyword:e,data:r,schemaCode:s}=t,n=e==="maxProperties"?Mr.operators.GT:Mr.operators.LT;t.fail$data((0,Mr._)`Object.keys(${r}).length ${n} ${s}`)}};Hn.default=md;var Kn={};Object.defineProperty(Kn,"__esModule",{value:!0});const jr=ce,xr=ue,gd=K,yd={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:t}})=>(0,xr.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,xr._)`{missingProperty: ${t}}`},code(t){const{gen:e,schema:r,schemaCode:s,data:n,$data:a,it:i}=t,{opts:o}=i;if(!a&&r.length===0)return;const u=r.length>=o.loopRequired;if(i.allErrors?c():d(),o.strictRequired){const E=t.parentSchema.properties,{definedProperties:k}=t.it;for(const S of r)if((E==null?void 0:E[S])===void 0&&!k.has(S)){const _=i.schemaEnv.baseId+i.errSchemaPath,g=`required property "${S}" is not defined at "${_}" (strictRequired)`;(0,gd.checkStrictMode)(i,g,i.opts.strictRequired)}}function c(){if(u||a)t.block$data(xr.nil,p);else for(const E of r)(0,jr.checkReportMissingProp)(t,E)}function d(){const E=e.let("missing");if(u||a){const k=e.let("valid",!0);t.block$data(k,()=>T(E,k)),t.ok(k)}else e.if((0,jr.checkMissingProp)(t,r,E)),(0,jr.reportMissingProp)(t,E),e.else()}function p(){e.forOf("prop",s,E=>{t.setParams({missingProperty:E}),e.if((0,jr.noPropertyInData)(e,n,E,o.ownProperties),()=>t.error())})}function T(E,k){t.setParams({missingProperty:E}),e.forOf(E,s,()=>{e.assign(k,(0,jr.propertyInData)(e,n,E,o.ownProperties)),e.if((0,xr.not)(k),()=>{t.error(),e.break()})},xr.nil)}}};Kn.default=yd;var Gn={};Object.defineProperty(Gn,"__esModule",{value:!0});const Vr=ue,vd={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:t,schemaCode:e}){const r=t==="maxItems"?"more":"fewer";return(0,Vr.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,Vr._)`{limit: ${t}}`},code(t){const{keyword:e,data:r,schemaCode:s}=t,n=e==="maxItems"?Vr.operators.GT:Vr.operators.LT;t.fail$data((0,Vr._)`${r}.length ${n} ${s}`)}};Gn.default=vd;var Wn={},Br={};Object.defineProperty(Br,"__esModule",{value:!0});const Ro=ho;Ro.code='require("ajv/dist/runtime/equal").default',Br.default=Ro,Object.defineProperty(Wn,"__esModule",{value:!0});const Yn=je,Re=ue,_d=K,bd=Br,$d={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:t,j:e}})=>(0,Re.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Re._)`{i: ${t}, j: ${e}}`},code(t){const{gen:e,data:r,$data:s,schema:n,parentSchema:a,schemaCode:i,it:o}=t;if(!s&&!n)return;const u=e.let("valid"),c=a.items?(0,Yn.getSchemaTypes)(a.items):[];t.block$data(u,d,(0,Re._)`${i} === false`),t.ok(u);function d(){const k=e.let("i",(0,Re._)`${r}.length`),S=e.let("j");t.setParams({i:k,j:S}),e.assign(u,!0),e.if((0,Re._)`${k} > 1`,()=>(p()?T:E)(k,S))}function p(){return c.length>0&&!c.some(k=>k==="object"||k==="array")}function T(k,S){const _=e.name("item"),g=(0,Yn.checkDataTypes)(c,_,o.opts.strictNumbers,Yn.DataType.Wrong),D=e.const("indices",(0,Re._)`{}`);e.for((0,Re._)`;${k}--;`,()=>{e.let(_,(0,Re._)`${r}[${k}]`),e.if(g,(0,Re._)`continue`),c.length>1&&e.if((0,Re._)`typeof ${_} == "string"`,(0,Re._)`${_} += "_"`),e.if((0,Re._)`typeof ${D}[${_}] == "number"`,()=>{e.assign(S,(0,Re._)`${D}[${_}]`),t.error(),e.assign(u,!1).break()}).code((0,Re._)`${D}[${_}] = ${k}`)})}function E(k,S){const _=(0,_d.useFunc)(e,bd.default),g=e.name("outer");e.label(g).for((0,Re._)`;${k}--;`,()=>e.for((0,Re._)`${S} = ${k}; ${S}--;`,()=>e.if((0,Re._)`${_}(${r}[${k}], ${r}[${S}])`,()=>{t.error(),e.assign(u,!1).break(g)})))}}};Wn.default=$d;var Xn={};Object.defineProperty(Xn,"__esModule",{value:!0});const Jn=ue,Sd=K,Ed=Br,kd={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:t})=>(0,Jn._)`{allowedValue: ${t}}`},code(t){const{gen:e,data:r,$data:s,schemaCode:n,schema:a}=t;s||a&&typeof a=="object"?t.fail$data((0,Jn._)`!${(0,Sd.useFunc)(e,Ed.default)}(${r}, ${n})`):t.fail((0,Jn._)`${a} !== ${r}`)}};Xn.default=kd;var Zn={};Object.defineProperty(Zn,"__esModule",{value:!0});const Lr=ue,wd=K,Cd=Br,Td={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,Lr._)`{allowedValues: ${t}}`},code(t){const{gen:e,data:r,$data:s,schema:n,schemaCode:a,it:i}=t;if(!s&&n.length===0)throw new Error("enum must have non-empty array");const o=n.length>=i.opts.loopEnum;let u;const c=()=>u??(u=(0,wd.useFunc)(e,Cd.default));let d;if(o||s)d=e.let("valid"),t.block$data(d,p);else{if(!Array.isArray(n))throw new Error("ajv implementation error");const E=e.const("vSchema",a);d=(0,Lr.or)(...n.map((k,S)=>T(E,S)))}t.pass(d);function p(){e.assign(d,!1),e.forOf("v",a,E=>e.if((0,Lr._)`${c()}(${r}, ${E})`,()=>e.assign(d,!0).break()))}function T(E,k){const S=n[k];return typeof S=="object"&&S!==null?(0,Lr._)`${c()}(${r}, ${E}[${k}])`:(0,Lr._)`${r} === ${S}`}}};Zn.default=Td,Object.defineProperty(Bn,"__esModule",{value:!0});const Od=Ln,Ad=Rn,Dd=zn,Id=Un,Nd=Hn,Pd=Kn,Fd=Gn,Md=Wn,jd=Xn,xd=Zn,Vd=[Od.default,Ad.default,Dd.default,Id.default,Nd.default,Pd.default,Fd.default,Md.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},jd.default,xd.default];Bn.default=Vd;var Qn={},pr={};Object.defineProperty(pr,"__esModule",{value:!0}),pr.validateAdditionalItems=void 0;const Qt=ue,ea=K,Bd={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:t}})=>(0,Qt.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Qt._)`{limit: ${t}}`},code(t){const{parentSchema:e,it:r}=t,{items:s}=e;if(!Array.isArray(s)){(0,ea.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}zo(t,s)}};function zo(t,e){const{gen:r,schema:s,data:n,keyword:a,it:i}=t;i.items=!0;const o=r.const("len",(0,Qt._)`${n}.length`);if(s===!1)t.setParams({len:e.length}),t.pass((0,Qt._)`${o} <= ${e.length}`);else if(typeof s=="object"&&!(0,ea.alwaysValidSchema)(i,s)){const c=r.var("valid",(0,Qt._)`${o} <= ${e.length}`);r.if((0,Qt.not)(c),()=>u(c)),t.ok(c)}function u(c){r.forRange("i",e.length,o,d=>{t.subschema({keyword:a,dataProp:d,dataPropType:ea.Type.Num},c),i.allErrors||r.if((0,Qt.not)(c),()=>r.break())})}}pr.validateAdditionalItems=zo,pr.default=Bd;var ta={},hr={};Object.defineProperty(hr,"__esModule",{value:!0}),hr.validateTuple=void 0;const qo=ue,bs=K,Ld=ce,Rd={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){const{schema:e,it:r}=t;if(Array.isArray(e))return Uo(t,"additionalItems",e);r.items=!0,!(0,bs.alwaysValidSchema)(r,e)&&t.ok((0,Ld.validateArray)(t))}};function Uo(t,e,r=t.schema){const{gen:s,parentSchema:n,data:a,keyword:i,it:o}=t;d(n),o.opts.unevaluated&&r.length&&o.items!==!0&&(o.items=bs.mergeEvaluated.items(s,r.length,o.items));const u=s.name("valid"),c=s.const("len",(0,qo._)`${a}.length`);r.forEach((p,T)=>{(0,bs.alwaysValidSchema)(o,p)||(s.if((0,qo._)`${c} > ${T}`,()=>t.subschema({keyword:i,schemaProp:T,dataProp:T},u)),t.ok(u))});function d(p){const{opts:T,errSchemaPath:E}=o,k=r.length,S=k===p.minItems&&(k===p.maxItems||p[e]===!1);if(T.strictTuples&&!S){const _=`"${i}" is ${k}-tuple, but minItems or maxItems/${e} are not specified or different at path "${E}"`;(0,bs.checkStrictMode)(o,_,T.strictTuples)}}}hr.validateTuple=Uo,hr.default=Rd,Object.defineProperty(ta,"__esModule",{value:!0});const zd=hr,qd={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,zd.validateTuple)(t,"items")};ta.default=qd;var ra={};Object.defineProperty(ra,"__esModule",{value:!0});const Ho=ue,Ud=K,Hd=ce,Kd=pr,Gd={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:t}})=>(0,Ho.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Ho._)`{limit: ${t}}`},code(t){const{schema:e,parentSchema:r,it:s}=t,{prefixItems:n}=r;s.items=!0,!(0,Ud.alwaysValidSchema)(s,e)&&(n?(0,Kd.validateAdditionalItems)(t,n):t.ok((0,Hd.validateArray)(t)))}};ra.default=Gd;var sa={};Object.defineProperty(sa,"__esModule",{value:!0});const nt=ue,$s=K,Wd={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:t,max:e}})=>e===void 0?(0,nt.str)`must contain at least ${t} valid item(s)`:(0,nt.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,nt._)`{minContains: ${t}}`:(0,nt._)`{minContains: ${t}, maxContains: ${e}}`},code(t){const{gen:e,schema:r,parentSchema:s,data:n,it:a}=t;let i,o;const{minContains:u,maxContains:c}=s;a.opts.next?(i=u===void 0?1:u,o=c):i=1;const d=e.const("len",(0,nt._)`${n}.length`);if(t.setParams({min:i,max:o}),o===void 0&&i===0){(0,$s.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(o!==void 0&&i>o){(0,$s.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,$s.alwaysValidSchema)(a,r)){let S=(0,nt._)`${d} >= ${i}`;o!==void 0&&(S=(0,nt._)`${S} && ${d} <= ${o}`),t.pass(S);return}a.items=!0;const p=e.name("valid");o===void 0&&i===1?E(p,()=>e.if(p,()=>e.break())):i===0?(e.let(p,!0),o!==void 0&&e.if((0,nt._)`${n}.length > 0`,T)):(e.let(p,!1),T()),t.result(p,()=>t.reset());function T(){const S=e.name("_valid"),_=e.let("count",0);E(S,()=>e.if(S,()=>k(_)))}function E(S,_){e.forRange("i",0,d,g=>{t.subschema({keyword:"contains",dataProp:g,dataPropType:$s.Type.Num,compositeRule:!0},S),_()})}function k(S){e.code((0,nt._)`${S}++`),o===void 0?e.if((0,nt._)`${S} >= ${i}`,()=>e.assign(p,!0).break()):(e.if((0,nt._)`${S} > ${o}`,()=>e.assign(p,!1).break()),i===1?e.assign(p,!0):e.if((0,nt._)`${S} >= ${i}`,()=>e.assign(p,!0)))}}};sa.default=Wd;var Ko={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=ue,r=K,s=ce;t.error={message:({params:{property:u,depsCount:c,deps:d}})=>{const p=c===1?"property":"properties";return(0,e.str)`must have ${p} ${d} when property ${u} is present`},params:({params:{property:u,depsCount:c,deps:d,missingProperty:p}})=>(0,e._)`{property: ${u},
|
|
25
25
|
missingProperty: ${p},
|
|
26
26
|
depsCount: ${c},
|
|
27
|
-
deps: ${d}}`};const n={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(u){const[c,d]=a(u);i(u,c),o(u,d)}};function a({schema:u}){const c={},d={};for(const p in u){if(p==="__proto__")continue;const T=Array.isArray(u[p])?c:d;T[p]=u[p]}return[c,d]}function i(u,c=u.schema){const{gen:d,data:p,it:T}=u;if(Object.keys(c).length===0)return;const S=d.let("missing");for(const E in c){const k=c[E];if(k.length===0)continue;const _=(0,s.propertyInData)(d,p,E,T.opts.ownProperties);u.setParams({property:E,depsCount:k.length,deps:k.join(", ")}),T.allErrors?d.if(_,()=>{for(const g of k)(0,s.checkReportMissingProp)(u,g)}):(d.if((0,e._)`${_} && (${(0,s.checkMissingProp)(u,k,S)})`),(0,s.reportMissingProp)(u,S),d.else())}}t.validatePropertyDeps=i;function o(u,c=u.schema){const{gen:d,data:p,keyword:T,it:S}=u,E=d.name("valid");for(const k in c)(0,r.alwaysValidSchema)(S,c[k])||(d.if((0,s.propertyInData)(d,p,k,S.opts.ownProperties),()=>{const _=u.subschema({keyword:T,schemaProp:k},E);u.mergeValidEvaluated(_,E)},()=>d.var(E,!0)),u.ok(E))}t.validateSchemaDeps=o,t.default=n})(Ho);var aa={};Object.defineProperty(aa,"__esModule",{value:!0});const Ko=le,Wd=H,Yd={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:t})=>(0,Ko._)`{propertyName: ${t.propertyName}}`},code(t){const{gen:e,schema:r,data:s,it:n}=t;if((0,Wd.alwaysValidSchema)(n,r))return;const a=e.name("valid");e.forIn("key",s,i=>{t.setParams({propertyName:i}),t.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},a),e.if((0,Ko.not)(a),()=>{t.error(!0),n.allErrors||e.break()})}),t.ok(a)}};aa.default=Yd;var $s={};Object.defineProperty($s,"__esModule",{value:!0});const Ss=ue,pt=le,Xd=yt,Es=H,Jd={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:t})=>(0,pt._)`{additionalProperty: ${t.additionalProperty}}`},code(t){const{gen:e,schema:r,parentSchema:s,data:n,errsCount:a,it:i}=t;if(!a)throw new Error("ajv implementation error");const{allErrors:o,opts:u}=i;if(i.props=!0,u.removeAdditional!=="all"&&(0,Es.alwaysValidSchema)(i,r))return;const c=(0,Ss.allSchemaProperties)(s.properties),d=(0,Ss.allSchemaProperties)(s.patternProperties);p(),t.ok((0,pt._)`${a} === ${Xd.default.errors}`);function p(){e.forIn("key",n,_=>{!c.length&&!d.length?E(_):e.if(T(_),()=>E(_))})}function T(_){let g;if(c.length>8){const I=(0,Es.schemaRefOrVal)(i,s.properties,"properties");g=(0,Ss.isOwnProperty)(e,I,_)}else c.length?g=(0,pt.or)(...c.map(I=>(0,pt._)`${_} === ${I}`)):g=pt.nil;return d.length&&(g=(0,pt.or)(g,...d.map(I=>(0,pt._)`${(0,Ss.usePattern)(t,I)}.test(${_})`))),(0,pt.not)(g)}function S(_){e.code((0,pt._)`delete ${n}[${_}]`)}function E(_){if(u.removeAdditional==="all"||u.removeAdditional&&r===!1){S(_);return}if(r===!1){t.setParams({additionalProperty:_}),t.error(),o||e.break();return}if(typeof r=="object"&&!(0,Es.alwaysValidSchema)(i,r)){const g=e.name("valid");u.removeAdditional==="failing"?(k(_,g,!1),e.if((0,pt.not)(g),()=>{t.reset(),S(_)})):(k(_,g),o||e.if((0,pt.not)(g),()=>e.break()))}}function k(_,g,I){const N={keyword:"additionalProperties",dataProp:_,dataPropType:Es.Type.Str};I===!1&&Object.assign(N,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(N,g)}}};$s.default=Jd;var ia={};Object.defineProperty(ia,"__esModule",{value:!0});const Zd=ct,Go=ue,oa=H,Wo=$s,Qd={keyword:"properties",type:"object",schemaType:"object",code(t){const{gen:e,schema:r,parentSchema:s,data:n,it:a}=t;a.opts.removeAdditional==="all"&&s.additionalProperties===void 0&&Wo.default.code(new Zd.KeywordCxt(a,Wo.default,"additionalProperties"));const i=(0,Go.allSchemaProperties)(r);for(const p of i)a.definedProperties.add(p);a.opts.unevaluated&&i.length&&a.props!==!0&&(a.props=oa.mergeEvaluated.props(e,(0,oa.toHash)(i),a.props));const o=i.filter(p=>!(0,oa.alwaysValidSchema)(a,r[p]));if(o.length===0)return;const u=e.name("valid");for(const p of o)c(p)?d(p):(e.if((0,Go.propertyInData)(e,n,p,a.opts.ownProperties)),d(p),a.allErrors||e.else().var(u,!0),e.endIf()),t.it.definedProperties.add(p),t.ok(u);function c(p){return a.opts.useDefaults&&!a.compositeRule&&r[p].default!==void 0}function d(p){t.subschema({keyword:"properties",schemaProp:p,dataProp:p},u)}}};ia.default=Qd;var la={};Object.defineProperty(la,"__esModule",{value:!0});const Yo=ue,ks=le,Xo=H,Jo=H,ef={keyword:"patternProperties",type:"object",schemaType:"object",code(t){const{gen:e,schema:r,data:s,parentSchema:n,it:a}=t,{opts:i}=a,o=(0,Yo.allSchemaProperties)(r),u=o.filter(k=>(0,Xo.alwaysValidSchema)(a,r[k]));if(o.length===0||u.length===o.length&&(!a.opts.unevaluated||a.props===!0))return;const c=i.strictSchema&&!i.allowMatchingProperties&&n.properties,d=e.name("valid");a.props!==!0&&!(a.props instanceof ks.Name)&&(a.props=(0,Jo.evaluatedPropsToName)(e,a.props));const{props:p}=a;T();function T(){for(const k of o)c&&S(k),a.allErrors?E(k):(e.var(d,!0),E(k),e.if(d))}function S(k){for(const _ in c)new RegExp(k).test(_)&&(0,Xo.checkStrictMode)(a,`property ${_} matches pattern ${k} (use allowMatchingProperties)`)}function E(k){e.forIn("key",s,_=>{e.if((0,ks._)`${(0,Yo.usePattern)(t,k)}.test(${_})`,()=>{const g=u.includes(k);g||t.subschema({keyword:"patternProperties",schemaProp:k,dataProp:_,dataPropType:Jo.Type.Str},d),a.opts.unevaluated&&p!==!0?e.assign((0,ks._)`${p}[${_}]`,!0):!g&&!a.allErrors&&e.if((0,ks.not)(d),()=>e.break())})})}}};la.default=ef;var ua={};Object.defineProperty(ua,"__esModule",{value:!0});const tf=H,rf={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){const{gen:e,schema:r,it:s}=t;if((0,tf.alwaysValidSchema)(s,r)){t.fail();return}const n=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),t.failResult(n,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};ua.default=rf;var ca={};Object.defineProperty(ca,"__esModule",{value:!0});const sf={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:ue.validateUnion,error:{message:"must match a schema in anyOf"}};ca.default=sf;var da={};Object.defineProperty(da,"__esModule",{value:!0});const ws=le,nf=H,af={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:t})=>(0,ws._)`{passingSchemas: ${t.passing}}`},code(t){const{gen:e,schema:r,parentSchema:s,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(n.opts.discriminator&&s.discriminator)return;const a=r,i=e.let("valid",!1),o=e.let("passing",null),u=e.name("_valid");t.setParams({passing:o}),e.block(c),t.result(i,()=>t.reset(),()=>t.error(!0));function c(){a.forEach((d,p)=>{let T;(0,nf.alwaysValidSchema)(n,d)?e.var(u,!0):T=t.subschema({keyword:"oneOf",schemaProp:p,compositeRule:!0},u),p>0&&e.if((0,ws._)`${u} && ${i}`).assign(i,!1).assign(o,(0,ws._)`[${o}, ${p}]`).else(),e.if(u,()=>{e.assign(i,!0),e.assign(o,p),T&&t.mergeEvaluated(T,ws.Name)})})}}};da.default=af;var fa={};Object.defineProperty(fa,"__esModule",{value:!0});const of=H,lf={keyword:"allOf",schemaType:"array",code(t){const{gen:e,schema:r,it:s}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");const n=e.name("valid");r.forEach((a,i)=>{if((0,of.alwaysValidSchema)(s,a))return;const o=t.subschema({keyword:"allOf",schemaProp:i},n);t.ok(n),t.mergeEvaluated(o)})}};fa.default=lf;var pa={};Object.defineProperty(pa,"__esModule",{value:!0});const Cs=le,Zo=H,uf={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:t})=>(0,Cs.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,Cs._)`{failingKeyword: ${t.ifClause}}`},code(t){const{gen:e,parentSchema:r,it:s}=t;r.then===void 0&&r.else===void 0&&(0,Zo.checkStrictMode)(s,'"if" without "then" and "else" is ignored');const n=Qo(s,"then"),a=Qo(s,"else");if(!n&&!a)return;const i=e.let("valid",!0),o=e.name("_valid");if(u(),t.reset(),n&&a){const d=e.let("ifClause");t.setParams({ifClause:d}),e.if(o,c("then",d),c("else",d))}else n?e.if(o,c("then")):e.if((0,Cs.not)(o),c("else"));t.pass(i,()=>t.error(!0));function u(){const d=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);t.mergeEvaluated(d)}function c(d,p){return()=>{const T=t.subschema({keyword:d},o);e.assign(i,o),t.mergeValidEvaluated(T,i),p?e.assign(p,(0,Cs._)`${d}`):t.setParams({ifClause:d})}}}};function Qo(t,e){const r=t.schema[e];return r!==void 0&&!(0,Zo.alwaysValidSchema)(t,r)}pa.default=uf;var ha={};Object.defineProperty(ha,"__esModule",{value:!0});const cf=H,df={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,cf.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};ha.default=df,Object.defineProperty(ea,"__esModule",{value:!0});const ff=pr,pf=ra,hf=hr,mf=sa,gf=na,yf=Ho,vf=aa,_f=$s,bf=ia,$f=la,Sf=ua,Ef=ca,kf=da,wf=fa,Cf=pa,Tf=ha;function Of(t=!1){const e=[Sf.default,Ef.default,kf.default,wf.default,Cf.default,Tf.default,vf.default,_f.default,yf.default,bf.default,$f.default];return t?e.push(pf.default,mf.default):e.push(ff.default,hf.default),e.push(gf.default),e}ea.default=Of;var ma={},ga={};Object.defineProperty(ga,"__esModule",{value:!0});const Ae=le,Af={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:t})=>(0,Ae.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,Ae._)`{format: ${t}}`},code(t,e){const{gen:r,data:s,$data:n,schema:a,schemaCode:i,it:o}=t,{opts:u,errSchemaPath:c,schemaEnv:d,self:p}=o;if(!u.validateFormats)return;n?T():S();function T(){const E=r.scopeValue("formats",{ref:p.formats,code:u.code.formats}),k=r.const("fDef",(0,Ae._)`${E}[${i}]`),_=r.let("fType"),g=r.let("format");r.if((0,Ae._)`typeof ${k} == "object" && !(${k} instanceof RegExp)`,()=>r.assign(_,(0,Ae._)`${k}.type || "string"`).assign(g,(0,Ae._)`${k}.validate`),()=>r.assign(_,(0,Ae._)`"string"`).assign(g,k)),t.fail$data((0,Ae.or)(I(),N()));function I(){return u.strictSchema===!1?Ae.nil:(0,Ae._)`${i} && !${g}`}function N(){const D=d.$async?(0,Ae._)`(${k}.async ? await ${g}(${s}) : ${g}(${s}))`:(0,Ae._)`${g}(${s})`,b=(0,Ae._)`(typeof ${g} == "function" ? ${D} : ${g}.test(${s}))`;return(0,Ae._)`${g} && ${g} !== true && ${_} === ${e} && !${b}`}}function S(){const E=p.formats[a];if(!E){I();return}if(E===!0)return;const[k,_,g]=N(E);k===e&&t.pass(D());function I(){if(u.strictSchema===!1){p.logger.warn(b());return}throw new Error(b());function b(){return`unknown format "${a}" ignored in schema at path "${c}"`}}function N(b){const L=b instanceof RegExp?(0,Ae.regexpCode)(b):u.code.formats?(0,Ae._)`${u.code.formats}${(0,Ae.getProperty)(a)}`:void 0,R=r.scopeValue("formats",{key:a,ref:b,code:L});return typeof b=="object"&&!(b instanceof RegExp)?[b.type||"string",b.validate,(0,Ae._)`${R}.validate`]:["string",b,R]}function D(){if(typeof E=="object"&&!(E instanceof RegExp)&&E.async){if(!d.$async)throw new Error("async format in sync schema");return(0,Ae._)`await ${g}(${s})`}return typeof _=="function"?(0,Ae._)`${g}(${s})`:(0,Ae._)`${g}.test(${s})`}}}};ga.default=Af,Object.defineProperty(ma,"__esModule",{value:!0});const Df=[ga.default];ma.default=Df;var mr={};Object.defineProperty(mr,"__esModule",{value:!0}),mr.contentVocabulary=mr.metadataVocabulary=void 0,mr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],mr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(xn,"__esModule",{value:!0});const If=Vn,Nf=Ln,Pf=ea,Ff=ma,el=mr,Mf=[If.default,Nf.default,(0,Pf.default)(),Ff.default,el.metadataVocabulary,el.contentVocabulary];xn.default=Mf;var ya={},Ts={};Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.DiscrError=void 0;var tl;(function(t){t.Tag="tag",t.Mapping="mapping"})(tl||(Ts.DiscrError=tl={})),Object.defineProperty(ya,"__esModule",{value:!0});const gr=le,va=Ts,rl=We,jf=H,xf={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:t,tagName:e}})=>t===va.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,gr._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},code(t){const{gen:e,data:r,schema:s,parentSchema:n,it:a}=t,{oneOf:i}=n;if(!a.opts.discriminator)throw new Error("discriminator: requires discriminator option");const o=s.propertyName;if(typeof o!="string")throw new Error("discriminator: requires propertyName");if(s.mapping)throw new Error("discriminator: mapping is not supported");if(!i)throw new Error("discriminator: requires oneOf keyword");const u=e.let("valid",!1),c=e.const("tag",(0,gr._)`${r}${(0,gr.getProperty)(o)}`);e.if((0,gr._)`typeof ${c} == "string"`,()=>d(),()=>t.error(!1,{discrError:va.DiscrError.Tag,tag:c,tagName:o})),t.ok(u);function d(){const S=T();e.if(!1);for(const E in S)e.elseIf((0,gr._)`${c} === ${E}`),e.assign(u,p(S[E]));e.else(),t.error(!1,{discrError:va.DiscrError.Mapping,tag:c,tagName:o}),e.endIf()}function p(S){const E=e.name("valid"),k=t.subschema({keyword:"oneOf",schemaProp:S},E);return t.mergeEvaluated(k,gr.Name),E}function T(){var S;const E={},k=g(n);let _=!0;for(let D=0;D<i.length;D++){let b=i[D];b!=null&&b.$ref&&!(0,jf.schemaHasRulesButRef)(b,a.self.RULES)&&(b=rl.resolveRef.call(a.self,a.schemaEnv.root,a.baseId,b==null?void 0:b.$ref),b instanceof rl.SchemaEnv&&(b=b.schema));const L=(S=b==null?void 0:b.properties)===null||S===void 0?void 0:S[o];if(typeof L!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${o}"`);_=_&&(k||g(b)),I(L,D)}if(!_)throw new Error(`discriminator: "${o}" must be required`);return E;function g({required:D}){return Array.isArray(D)&&D.includes(o)}function I(D,b){if(D.const)N(D.const,b);else if(D.enum)for(const L of D.enum)N(L,b);else throw new Error(`discriminator: "properties/${o}" must have "const" or "enum"`)}function N(D,b){if(typeof D!="string"||D in E)throw new Error(`discriminator: "${o}" values must be unique strings`);E[D]=b}}}};ya.default=xf;const Vf={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;const r=Ki,s=xn,n=ya,a=Vf,i=["/properties"],o="http://json-schema.org/draft-07/schema";class u extends r.default{_addVocabularies(){super._addVocabularies(),s.default.forEach(E=>this.addVocabulary(E)),this.opts.discriminator&&this.addKeyword(n.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const E=this.opts.$data?this.$dataMetaSchema(a,i):a;this.addMetaSchema(E,o,!1),this.refs["http://json-schema.org/schema"]=o}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}}e.Ajv=u,t.exports=e=u,t.exports.Ajv=u,Object.defineProperty(e,"__esModule",{value:!0}),e.default=u;var c=ct;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var d=le;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var p=Nr;Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return p.default}});var T=Pr;Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return T.default}})})(yn,yn.exports);var sl=yn.exports;const Bf=Ns(sl);var _a={exports:{}},nl={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0;function e(U,G){return{validate:U,compare:G}}t.fullFormats={date:e(a,i),time:e(u(!0),c),"date-time":e(T(!0),S),"iso-time":e(u(),d),"iso-date-time":e(T(),E),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:g,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:ce,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:N,int32:{type:"number",validate:L},int64:{type:"number",validate:R},float:{type:"number",validate:ee},double:{type:"number",validate:ee},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,i),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,c),"date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,S),"iso-time":e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,d),"iso-date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,E),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);function r(U){return U%4===0&&(U%100!==0||U%400===0)}const s=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,n=[0,31,28,31,30,31,30,31,31,30,31,30,31];function a(U){const G=s.exec(U);if(!G)return!1;const ne=+G[1],W=+G[2],he=+G[3];return W>=1&&W<=12&&he>=1&&he<=(W===2&&r(ne)?29:n[W])}function i(U,G){if(U&&G)return U>G?1:U<G?-1:0}const o=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function u(U){return function(ne){const W=o.exec(ne);if(!W)return!1;const he=+W[1],me=+W[2],ve=+W[3],De=W[4],Pe=W[5]==="-"?-1:1,A=+(W[6]||0),y=+(W[7]||0);if(A>23||y>59||U&&!De)return!1;if(he<=23&&me<=59&&ve<60)return!0;const M=me-y*Pe,O=he-A*Pe-(M<0?1:0);return(O===23||O===-1)&&(M===59||M===-1)&&ve<61}}function c(U,G){if(!(U&&G))return;const ne=new Date("2020-01-01T"+U).valueOf(),W=new Date("2020-01-01T"+G).valueOf();if(ne&&W)return ne-W}function d(U,G){if(!(U&&G))return;const ne=o.exec(U),W=o.exec(G);if(ne&&W)return U=ne[1]+ne[2]+ne[3],G=W[1]+W[2]+W[3],U>G?1:U<G?-1:0}const p=/t|\s/i;function T(U){const G=u(U);return function(W){const he=W.split(p);return he.length===2&&a(he[0])&&G(he[1])}}function S(U,G){if(!(U&&G))return;const ne=new Date(U).valueOf(),W=new Date(G).valueOf();if(ne&&W)return ne-W}function E(U,G){if(!(U&&G))return;const[ne,W]=U.split(p),[he,me]=G.split(p),ve=i(ne,he);if(ve!==void 0)return ve||c(W,me)}const k=/\/|:/,_=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function g(U){return k.test(U)&&_.test(U)}const I=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function N(U){return I.lastIndex=0,I.test(U)}const D=-(2**31),b=2**31-1;function L(U){return Number.isInteger(U)&&U<=b&&U>=D}function R(U){return Number.isInteger(U)}function ee(){return!0}const K=/[^\\]\\Z/;function ce(U){if(K.test(U))return!1;try{return new RegExp(U),!0}catch{return!1}}})(nl);var al={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const e=sl,r=le,s=r.operators,n={formatMaximum:{okStr:"<=",ok:s.LTE,fail:s.GT},formatMinimum:{okStr:">=",ok:s.GTE,fail:s.LT},formatExclusiveMaximum:{okStr:"<",ok:s.LT,fail:s.GTE},formatExclusiveMinimum:{okStr:">",ok:s.GT,fail:s.LTE}},a={message:({keyword:o,schemaCode:u})=>(0,r.str)`should be ${n[o].okStr} ${u}`,params:({keyword:o,schemaCode:u})=>(0,r._)`{comparison: ${n[o].okStr}, limit: ${u}}`};t.formatLimitDefinition={keyword:Object.keys(n),type:"string",schemaType:"string",$data:!0,error:a,code(o){const{gen:u,data:c,schemaCode:d,keyword:p,it:T}=o,{opts:S,self:E}=T;if(!S.validateFormats)return;const k=new e.KeywordCxt(T,E.RULES.all.format.definition,"format");k.$data?_():g();function _(){const N=u.scopeValue("formats",{ref:E.formats,code:S.code.formats}),D=u.const("fmt",(0,r._)`${N}[${k.schemaCode}]`);o.fail$data((0,r.or)((0,r._)`typeof ${D} != "object"`,(0,r._)`${D} instanceof RegExp`,(0,r._)`typeof ${D}.compare != "function"`,I(D)))}function g(){const N=k.schema,D=E.formats[N];if(!D||D===!0)return;if(typeof D!="object"||D instanceof RegExp||typeof D.compare!="function")throw new Error(`"${p}": format "${N}" does not define "compare" function`);const b=u.scopeValue("formats",{key:N,ref:D,code:S.code.formats?(0,r._)`${S.code.formats}${(0,r.getProperty)(N)}`:void 0});o.fail$data(I(b))}function I(N){return(0,r._)`${N}.compare(${c}, ${d}) ${n[p].fail} 0`}},dependencies:["format"]};const i=o=>(o.addKeyword(t.formatLimitDefinition),o);t.default=i})(al),function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=nl,s=al,n=le,a=new n.Name("fullFormats"),i=new n.Name("fastFormats"),o=(c,d={keywords:!0})=>{if(Array.isArray(d))return u(c,d,r.fullFormats,a),c;const[p,T]=d.mode==="fast"?[r.fastFormats,i]:[r.fullFormats,a],S=d.formats||r.formatNames;return u(c,S,p,T),d.keywords&&(0,s.default)(c),c};o.get=(c,d="full")=>{const T=(d==="fast"?r.fastFormats:r.fullFormats)[c];if(!T)throw new Error(`Unknown format "${c}"`);return T};function u(c,d,p,T){var S,E;(S=(E=c.opts.code).formats)!==null&&S!==void 0||(E.formats=(0,n._)`require("ajv-formats/dist/formats").${T}`);for(const k of d)c.addFormat(k,p[k])}t.exports=e=o,Object.defineProperty(e,"__esModule",{value:!0}),e.default=o}(_a,_a.exports);var Lf=_a.exports;const Rf=Ns(Lf),il={"zip-code":{type:"string",validate:"/^[0-9]{5}[0-9]{3}$/"},cnpj:{type:"string",validate:ll},email:{type:"string",validate:qf},"phone-br":{type:"string",validate:Hf},cpf:{type:"string",validate:ol},"cpf-cnpj":{type:"string",validate:Uf}},zf=()=>{const t=new Bf({allErrors:!0,strict:!1,useDefaults:"empty"});return Rf(t),Object.keys(il).forEach(e=>t.addFormat(e,il[e])),t};function qf(t){if(t.length>254)return!1;const[e,r]=t.split("@");return!e||!r||e.length>64||e.startsWith(".")||e.endsWith(".")||e.includes("..")||!/^[a-zA-Z0-9!#$%&'+-/=?^_{|}~.]+$/.test(e)?!1:/^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\.[a-zA-Z]{2,}$/.test(r)}function Uf(t){return t=t.replace(/[^\d]+/g,""),t.length==11?ol(t):t.length==14?ll(t):!1}function ol(t){const e=t.replace(/[^\d]+/g,"");if(e.length!==11||e.match(/(\d)\1{10}/))return!1;const r=e.split("").map(n=>+n),s=n=>r.slice(0,n-12).reduce((a,i,o)=>a+i*(n-o),0)*10%11%10;return String(s(10))===t[9]&&String(s(11))===t[10]}function ll(t){const e=t.replace(/[^\d]+/g,"");if(e.length!==14||/^(\d)\1+$/.test(e))return!1;let r=e.length-2,s=e.substring(0,r);const n=e.substring(r);let a=0,i=r-7;for(let u=r;u>=1;u--)a+=Number(s.charAt(r-u))*i--,i<2&&(i=9);let o=a%11<2?0:11-a%11;if(String(o)!=n.charAt(0))return!1;r=r+1,s=t.substring(0,r),a=0,i=r-7;for(let u=r;u>=1;u--)a+=Number(s.charAt(r-u))*i--,i<2&&(i=9);return o=a%11<2?0:11-a%11,String(o)==n.charAt(1)}function Hf(t){if(!t)return!1;const e=t.replace(/\D/g,""),r=e.slice(0,2),s=e.slice(2),n=/^[1-9]\d$/.test(r),i=!/^(\d)\1*$/.test(s)&&(s.startsWith("9")&&s.length===9||!s.startsWith("9")&&s.length===8&&/^[23457]/.test(s));return n&&i}const Kf=({formSchema:t,initialValue:e={}})=>{const[r,s]=F.useState({}),[n,a]=F.useState({status:void 0,fields:{}}),[i,o]=F.useState({}),[u,c]=F.useState({}),[d,p]=F.useState([]),[T,S]=F.useState({}),[E,k]=F.useState(void 0);F.useEffect(()=>{I()},[]),F.useEffect(()=>{const l=zf();l.compile(t),k(l)},[t]);const _=F.useCallback(l=>{const f=d.includes(String(l));return e!=null&&e[l]?u[l]!==(e==null?void 0:e[l])||f:u[l]!==void 0||f},[d,u,e]),g=F.useMemo(()=>Object.keys(n.fields).map(f=>{var v,P;return(P=(v=n.fields)==null?void 0:v[f])==null?void 0:P.touched}).some(f=>f),[n]),I=F.useCallback(()=>{Object.keys(e||[]).forEach(l=>{c(f=>({...f,[l]:e[l]}))})},[e]),N=F.useCallback(l=>{var P,V,B,z;const f=((P=l==null?void 0:l.target)==null?void 0:P.type)==="checkbox"?(V=l==null?void 0:l.target)==null?void 0:V.checked:(B=l==null?void 0:l.target)==null?void 0:B.value,v=gn((z=l==null?void 0:l.target)==null?void 0:z.name,t);return(v==null?void 0:v.type)==="number"?Number(f):(v==null?void 0:v.type)==="boolean"?JSON.parse(String(f)):(v==null?void 0:v.type)==="string"?String(f):f},[t]),D=F.useCallback(()=>{const l={};return Object.keys(u).forEach(f=>{const v=String(f).split(".");qi(l,v,u[f])}),{...l,toJson:()=>JSON.stringify(l)}},[u]),b=F.useCallback(()=>{if(!E)return{result:null,errors:void 0};const{...l}=D(),f=E.compile(t),v=f(l),P=zi(f);return{result:v,errors:P}},[E,D,t]),L=F.useCallback((l,f)=>{if(!E)return{result:null,errors:void 0};const v=E.getSchema(l);if(!v)return{result:null};const P=v(f);if(!(v!=null&&v.errors))return{status:P,errors:{}};const V=zi(v,l);return{status:P,errors:V}},[E]),R=F.useCallback(l=>{const f={[l.target.name]:l},v={...n};v==null||delete v.fields[l.target.name],a(v),s(B=>({...B,...f}));const P=N(l),V={[l.target.name]:P};c(B=>({...B,...V}))},[n,N]),ee=F.useCallback((l,f)=>{const v={[l]:f};o(P=>({...P,...v}))},[]),K=F.useCallback((l,f)=>{const v={[l]:f};c(P=>({...P,...v}))},[]),ce=F.useCallback(({touched:l})=>{const{errors:f}=b(),v=Object.keys(u).reduce((V,B)=>({...V,[B]:{status:!0}}),{}),P={status:!f,fields:{...v,...f}};return Object.keys(P==null?void 0:P.fields).forEach(V=>{if(l!=null)return P.fields[V].touched=l;P.fields[V].touched=!0}),a(P),P},[u,b]),U=F.useCallback(l=>Object.keys(u).filter(f=>f.split(".").includes(l)||f===l).reduce((f,v)=>({...f,[v]:{status:!0}}),{}),[u]),G=F.useCallback((l,f)=>{Object.keys(n.fields).forEach(V=>{new RegExp(`(\\.|^)${f}(\\.|$)`).test(V)&&delete n.fields[V]});const v={...n.fields,...l.fields},P=Object.keys(v).map(V=>v[V].status).every(V=>V);a(V=>({status:P,fields:{...V.fields,...l.fields}}))},[n.fields]),ne=F.useCallback((l,f,v={})=>{const{touched:P}=v,V=L(l,f),B=U(l);if(V.status===null)return console.warn(`Cannot find schemaID: ${l}`),V;const z={status:!!V.status,fields:{...B,...V.errors}};return Object.keys(z.fields).forEach(te=>{if(P!=null)return z.fields[te].touched=P;z.fields[te].touched=_(te)}),G(z,l),z},[L,_,G,U]),W=F.useCallback(l=>{p(f=>[...f,l])},[]),he=F.useCallback(l=>{var f,v,P,V,B;return(f=n==null?void 0:n.fields[l])!=null&&f.touched&&((v=n==null?void 0:n.fields[l])!=null&&v.status)?{status:"",message:""}:(P=n==null?void 0:n.fields[l])!=null&&P.touched&&!((V=n==null?void 0:n.fields[l])!=null&&V.status)?{status:"error",message:(B=n==null?void 0:n.fields[l])==null?void 0:B.message}:{status:"",message:""}},[n==null?void 0:n.fields]),me=F.useCallback(l=>{const{status:f}=he(l);return f},[he]),ve=F.useCallback(l=>{const{message:f}=he(l);return f},[he]),De=F.useCallback(l=>gn(l,t),[t]),Pe=F.useCallback(()=>{s({}),o({}),a({status:void 0,fields:{}}),c({})},[]),A=F.useCallback((l,f)=>({...l,onBlurHandler:()=>ne(f,u[f]),onChangeHandler:R,onFocusHandler:()=>W(f)}),[u,W,R,ne]),y=F.useCallback(l=>{if(!l)return;const f=l.value?l:l.querySelectorAll("input,select,textarea")[0]||l;T[f==null?void 0:f.name]||S(v=>({...v,[f.name]:f}))},[T]),M=F.useCallback(l=>{var tt,ht;const f=["text","email","password","radio","number"],v=De(l);if(v===null)return console.error(`Cannot find schemaID: ${l}`),{};const P=v["x-label"]||"",V=v["x-placeholder"]||"",B=v["x-tooltip"]||"",z=T[l],te=((tt=z==null?void 0:z.tagName)==null?void 0:tt.toLowerCase())||"",q=((ht=z==null?void 0:z.type)==null?void 0:ht.toLowerCase())||"",pe={name:l,feedback:ve(l),...P&&{label:P},...V&&{placeholder:V},...B&&{tooltip:B},status:me(l),value:u[l],ref:y,animated:!1};if(te==="input"&&q==="checkbox")return pe.checked=u[l],A(pe,l);if(te==="input"&&(v==null?void 0:v.format)==="date")return pe.type="date",pe.value=String(u[l]||""),v!=null&&v.formatMinimum&&(pe.min=v==null?void 0:v.formatMinimum),v!=null&&v.formatMaximum&&(pe.max=v==null?void 0:v.formatMaximum),A(pe,l);if(te==="input"&&f.includes(q)||te==="textarea")return pe.type=Hi(v),pe.value=String(u[l]||""),A(pe,l);if(te==="select"){const Ge=v["x-options"]||[];return pe.value=u[l],pe.onChangeHandler=er=>{const Pt=N(er);K(l,Pt),ne(l,Pt,{touched:!0})},pe.options=Ge,pe}return pe},[y,T,u,De,ve,me,N,K,ne,A]),O=F.useCallback(l=>{const f=(P,V)=>{const B={...P};return Object.keys(B).forEach(z=>{V.test(z)&&delete B[z]}),B},v=new RegExp(`(\\.|^)${l}(\\.|$)`);c(P=>f(P,v)),a(P=>({...P,fields:f(P.fields,v)}))},[]);return{getFormSchema:t,getFormEvent:r,setFormData:s,getFormData:u,getInputValidateStatus:me,getInputValidateMessage:ve,getInputSchema:De,isFormDirty:g,handleFocused:W,handleFormInput:R,handleFormFlagFields:ee,handleCustomValue:K,clearFormDataKey:O,getFormValidated:n,getFormFlagFields:i,validateForm:ce,validateFormSchema:ne,parseFormToObject:D,clearFormData:Pe,register:M,ajv:E}};function Gf(t){const e=n=>typeof window<"u"?window.matchMedia(n).matches:!1,[r,s]=F.useState(e(t));return F.useEffect(()=>{const n=window.matchMedia(t);function a(){s(e(t))}return a(),n.addListener?n.addListener(a):n.addEventListener("change",a),()=>{n.removeListener?n.removeListener(a):n.removeEventListener("change",a)}},[t]),r}const Wf=()=>{const[t,e]=F.useState([]);function r(n){const a={...n,id:Date.now().toString()};e([...t,a])}function s(n){e(t.filter(a=>a.id!==n))}return{notifications:t,setNotifications:e,addNotification:r,removeNotification:s}},Yf=(t=[],e=0)=>{const[r,s]=F.useState(e),[n,a]=F.useState(t),i=F.useMemo(()=>n.length-1,[n]),o=F.useMemo(()=>r+1<=i&&!n[r+1].disabled,[r,i,n]),u=F.useMemo(()=>r-1>=0&&!n[r-1].disabled,[r,n]),c=F.useCallback(()=>{o&&s(R=>R+1)},[o]),d=F.useCallback(()=>{u&&s(R=>R-1)},[u]);function p(R){Tr(R,n)||a(R)}const T=F.useCallback(R=>n[R],[n]),S=F.useMemo(()=>({index:r,...T(r)}),[r,T]),E=F.useMemo(()=>r===i,[r,i]),k=F.useCallback(R=>n.findIndex(K=>Tr(K,R)),[n]),_=F.useCallback(R=>n.findIndex(K=>K.name===R),[n]),g=F.useCallback(R=>typeof R=="object"?k(R):typeof R=="string"?_(R):R,[k,_]),I=F.useCallback(R=>{const ee=g(R);ee!==r&&s(ee)},[g,r]),N=F.useCallback(R=>{const ee=g(R);return{index:ee,...T(ee)}},[g,T]),D=F.useCallback(R=>r===g(R),[r,g]),b=F.useCallback(R=>{const K=[...n].map((ce,U)=>(ce.disabled=U>g(R),ce));a(K)},[n,g]);function L(R){const ee=[...n],K=Array.isArray(R)?R.map(ce=>g(ce)):[g(R)];return ee.map((ce,U)=>(ce.disabled=!!K.includes(U),ce))}return[{getSteps:n,getStep:N,getStepSelected:S,getStepIndexByName:_,setSteps:p,setStepSelected:I,goToNextStep:c,goToPrevStep:d,canGoToNextStep:o,canGoToPrevStep:u,isStep:D,isLastStep:E,disableSteps:L,disableStepsAfter:b}]};Z.DsAccordion=an,Z.DsActiveTags=Ni,Z.DsButton=Sr,Z.DsCaption=Rs,Z.DsCard=zs,Z.DsCheckbox=qs,Z.DsContainer=ns,Z.DsEditableSelect=on,Z.DsFlexElement=Be,Z.DsFlexLayout=Dt,Z.DsGridElement=Ai,Z.DsGridLayout=is,Z.DsHR=Hs,Z.DsHeading=Us,Z.DsIcon=Se,Z.DsIndicator=Jl,Z.DsInlineEditable=ln,Z.DsInput=ar,Z.DsLoading=Ys,Z.DsModal=un,Z.DsNotification=os,Z.DsNotificationList=fn,Z.DsOption=Xs,Z.DsParagraph=At,Z.DsPasswordConfirmation=dn,Z.DsProgress=Zs,Z.DsSelect=Qs,Z.DsSpacer=lt,Z.DsStepper=ji,Z.DsSubtitle=Ei,Z.DsTable=Vi,Z.DsTabs=ru,Z.DsTextArea=tn,Z.DsTooltip=Ut,Z.DsTwoColumns=pn,Z.DsWrapper=Kt,Z.ThemeProvider=Li,Z.customAssign=qi,Z.getInputTypeByFormat=Hi,Z.getSchemaProperties=gn,Z.isEqual=Tr,Z.isValidObject=Ui,Z.parseOptionValue=au,Z.useForm=Kf,Z.useMediaQuery=Gf,Z.useNotification=Wf,Z.useStepper=Yf,Object.defineProperty(Z,Symbol.toStringTag,{value:"Module"})});
|
|
27
|
+
deps: ${d}}`};const n={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(u){const[c,d]=a(u);i(u,c),o(u,d)}};function a({schema:u}){const c={},d={};for(const p in u){if(p==="__proto__")continue;const T=Array.isArray(u[p])?c:d;T[p]=u[p]}return[c,d]}function i(u,c=u.schema){const{gen:d,data:p,it:T}=u;if(Object.keys(c).length===0)return;const E=d.let("missing");for(const k in c){const S=c[k];if(S.length===0)continue;const _=(0,s.propertyInData)(d,p,k,T.opts.ownProperties);u.setParams({property:k,depsCount:S.length,deps:S.join(", ")}),T.allErrors?d.if(_,()=>{for(const g of S)(0,s.checkReportMissingProp)(u,g)}):(d.if((0,e._)`${_} && (${(0,s.checkMissingProp)(u,S,E)})`),(0,s.reportMissingProp)(u,E),d.else())}}t.validatePropertyDeps=i;function o(u,c=u.schema){const{gen:d,data:p,keyword:T,it:E}=u,k=d.name("valid");for(const S in c)(0,r.alwaysValidSchema)(E,c[S])||(d.if((0,s.propertyInData)(d,p,S,E.opts.ownProperties),()=>{const _=u.subschema({keyword:T,schemaProp:S},k);u.mergeValidEvaluated(_,k)},()=>d.var(k,!0)),u.ok(k))}t.validateSchemaDeps=o,t.default=n})(Ko);var na={};Object.defineProperty(na,"__esModule",{value:!0});const Go=ue,Yd=K,Xd={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:t})=>(0,Go._)`{propertyName: ${t.propertyName}}`},code(t){const{gen:e,schema:r,data:s,it:n}=t;if((0,Yd.alwaysValidSchema)(n,r))return;const a=e.name("valid");e.forIn("key",s,i=>{t.setParams({propertyName:i}),t.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},a),e.if((0,Go.not)(a),()=>{t.error(!0),n.allErrors||e.break()})}),t.ok(a)}};na.default=Xd;var Ss={};Object.defineProperty(Ss,"__esModule",{value:!0});const Es=ce,pt=ue,Jd=yt,ks=K,Zd={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:t})=>(0,pt._)`{additionalProperty: ${t.additionalProperty}}`},code(t){const{gen:e,schema:r,parentSchema:s,data:n,errsCount:a,it:i}=t;if(!a)throw new Error("ajv implementation error");const{allErrors:o,opts:u}=i;if(i.props=!0,u.removeAdditional!=="all"&&(0,ks.alwaysValidSchema)(i,r))return;const c=(0,Es.allSchemaProperties)(s.properties),d=(0,Es.allSchemaProperties)(s.patternProperties);p(),t.ok((0,pt._)`${a} === ${Jd.default.errors}`);function p(){e.forIn("key",n,_=>{!c.length&&!d.length?k(_):e.if(T(_),()=>k(_))})}function T(_){let g;if(c.length>8){const D=(0,ks.schemaRefOrVal)(i,s.properties,"properties");g=(0,Es.isOwnProperty)(e,D,_)}else c.length?g=(0,pt.or)(...c.map(D=>(0,pt._)`${_} === ${D}`)):g=pt.nil;return d.length&&(g=(0,pt.or)(g,...d.map(D=>(0,pt._)`${(0,Es.usePattern)(t,D)}.test(${_})`))),(0,pt.not)(g)}function E(_){e.code((0,pt._)`delete ${n}[${_}]`)}function k(_){if(u.removeAdditional==="all"||u.removeAdditional&&r===!1){E(_);return}if(r===!1){t.setParams({additionalProperty:_}),t.error(),o||e.break();return}if(typeof r=="object"&&!(0,ks.alwaysValidSchema)(i,r)){const g=e.name("valid");u.removeAdditional==="failing"?(S(_,g,!1),e.if((0,pt.not)(g),()=>{t.reset(),E(_)})):(S(_,g),o||e.if((0,pt.not)(g),()=>e.break()))}}function S(_,g,D){const N={keyword:"additionalProperties",dataProp:_,dataPropType:ks.Type.Str};D===!1&&Object.assign(N,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(N,g)}}};Ss.default=Zd;var aa={};Object.defineProperty(aa,"__esModule",{value:!0});const Qd=ct,Wo=ce,ia=K,Yo=Ss,ef={keyword:"properties",type:"object",schemaType:"object",code(t){const{gen:e,schema:r,parentSchema:s,data:n,it:a}=t;a.opts.removeAdditional==="all"&&s.additionalProperties===void 0&&Yo.default.code(new Qd.KeywordCxt(a,Yo.default,"additionalProperties"));const i=(0,Wo.allSchemaProperties)(r);for(const p of i)a.definedProperties.add(p);a.opts.unevaluated&&i.length&&a.props!==!0&&(a.props=ia.mergeEvaluated.props(e,(0,ia.toHash)(i),a.props));const o=i.filter(p=>!(0,ia.alwaysValidSchema)(a,r[p]));if(o.length===0)return;const u=e.name("valid");for(const p of o)c(p)?d(p):(e.if((0,Wo.propertyInData)(e,n,p,a.opts.ownProperties)),d(p),a.allErrors||e.else().var(u,!0),e.endIf()),t.it.definedProperties.add(p),t.ok(u);function c(p){return a.opts.useDefaults&&!a.compositeRule&&r[p].default!==void 0}function d(p){t.subschema({keyword:"properties",schemaProp:p,dataProp:p},u)}}};aa.default=ef;var oa={};Object.defineProperty(oa,"__esModule",{value:!0});const Xo=ce,ws=ue,Jo=K,Zo=K,tf={keyword:"patternProperties",type:"object",schemaType:"object",code(t){const{gen:e,schema:r,data:s,parentSchema:n,it:a}=t,{opts:i}=a,o=(0,Xo.allSchemaProperties)(r),u=o.filter(S=>(0,Jo.alwaysValidSchema)(a,r[S]));if(o.length===0||u.length===o.length&&(!a.opts.unevaluated||a.props===!0))return;const c=i.strictSchema&&!i.allowMatchingProperties&&n.properties,d=e.name("valid");a.props!==!0&&!(a.props instanceof ws.Name)&&(a.props=(0,Zo.evaluatedPropsToName)(e,a.props));const{props:p}=a;T();function T(){for(const S of o)c&&E(S),a.allErrors?k(S):(e.var(d,!0),k(S),e.if(d))}function E(S){for(const _ in c)new RegExp(S).test(_)&&(0,Jo.checkStrictMode)(a,`property ${_} matches pattern ${S} (use allowMatchingProperties)`)}function k(S){e.forIn("key",s,_=>{e.if((0,ws._)`${(0,Xo.usePattern)(t,S)}.test(${_})`,()=>{const g=u.includes(S);g||t.subschema({keyword:"patternProperties",schemaProp:S,dataProp:_,dataPropType:Zo.Type.Str},d),a.opts.unevaluated&&p!==!0?e.assign((0,ws._)`${p}[${_}]`,!0):!g&&!a.allErrors&&e.if((0,ws.not)(d),()=>e.break())})})}}};oa.default=tf;var la={};Object.defineProperty(la,"__esModule",{value:!0});const rf=K,sf={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){const{gen:e,schema:r,it:s}=t;if((0,rf.alwaysValidSchema)(s,r)){t.fail();return}const n=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),t.failResult(n,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};la.default=sf;var ua={};Object.defineProperty(ua,"__esModule",{value:!0});const nf={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:ce.validateUnion,error:{message:"must match a schema in anyOf"}};ua.default=nf;var ca={};Object.defineProperty(ca,"__esModule",{value:!0});const Cs=ue,af=K,of={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:t})=>(0,Cs._)`{passingSchemas: ${t.passing}}`},code(t){const{gen:e,schema:r,parentSchema:s,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(n.opts.discriminator&&s.discriminator)return;const a=r,i=e.let("valid",!1),o=e.let("passing",null),u=e.name("_valid");t.setParams({passing:o}),e.block(c),t.result(i,()=>t.reset(),()=>t.error(!0));function c(){a.forEach((d,p)=>{let T;(0,af.alwaysValidSchema)(n,d)?e.var(u,!0):T=t.subschema({keyword:"oneOf",schemaProp:p,compositeRule:!0},u),p>0&&e.if((0,Cs._)`${u} && ${i}`).assign(i,!1).assign(o,(0,Cs._)`[${o}, ${p}]`).else(),e.if(u,()=>{e.assign(i,!0),e.assign(o,p),T&&t.mergeEvaluated(T,Cs.Name)})})}}};ca.default=of;var da={};Object.defineProperty(da,"__esModule",{value:!0});const lf=K,uf={keyword:"allOf",schemaType:"array",code(t){const{gen:e,schema:r,it:s}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");const n=e.name("valid");r.forEach((a,i)=>{if((0,lf.alwaysValidSchema)(s,a))return;const o=t.subschema({keyword:"allOf",schemaProp:i},n);t.ok(n),t.mergeEvaluated(o)})}};da.default=uf;var fa={};Object.defineProperty(fa,"__esModule",{value:!0});const Ts=ue,Qo=K,cf={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:t})=>(0,Ts.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,Ts._)`{failingKeyword: ${t.ifClause}}`},code(t){const{gen:e,parentSchema:r,it:s}=t;r.then===void 0&&r.else===void 0&&(0,Qo.checkStrictMode)(s,'"if" without "then" and "else" is ignored');const n=el(s,"then"),a=el(s,"else");if(!n&&!a)return;const i=e.let("valid",!0),o=e.name("_valid");if(u(),t.reset(),n&&a){const d=e.let("ifClause");t.setParams({ifClause:d}),e.if(o,c("then",d),c("else",d))}else n?e.if(o,c("then")):e.if((0,Ts.not)(o),c("else"));t.pass(i,()=>t.error(!0));function u(){const d=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);t.mergeEvaluated(d)}function c(d,p){return()=>{const T=t.subschema({keyword:d},o);e.assign(i,o),t.mergeValidEvaluated(T,i),p?e.assign(p,(0,Ts._)`${d}`):t.setParams({ifClause:d})}}}};function el(t,e){const r=t.schema[e];return r!==void 0&&!(0,Qo.alwaysValidSchema)(t,r)}fa.default=cf;var pa={};Object.defineProperty(pa,"__esModule",{value:!0});const df=K,ff={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,df.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};pa.default=ff,Object.defineProperty(Qn,"__esModule",{value:!0});const pf=pr,hf=ta,mf=hr,gf=ra,yf=sa,vf=Ko,_f=na,bf=Ss,$f=aa,Sf=oa,Ef=la,kf=ua,wf=ca,Cf=da,Tf=fa,Of=pa;function Af(t=!1){const e=[Ef.default,kf.default,wf.default,Cf.default,Tf.default,Of.default,_f.default,bf.default,vf.default,$f.default,Sf.default];return t?e.push(hf.default,gf.default):e.push(pf.default,mf.default),e.push(yf.default),e}Qn.default=Af;var ha={},ma={};Object.defineProperty(ma,"__esModule",{value:!0});const De=ue,Df={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:t})=>(0,De.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,De._)`{format: ${t}}`},code(t,e){const{gen:r,data:s,$data:n,schema:a,schemaCode:i,it:o}=t,{opts:u,errSchemaPath:c,schemaEnv:d,self:p}=o;if(!u.validateFormats)return;n?T():E();function T(){const k=r.scopeValue("formats",{ref:p.formats,code:u.code.formats}),S=r.const("fDef",(0,De._)`${k}[${i}]`),_=r.let("fType"),g=r.let("format");r.if((0,De._)`typeof ${S} == "object" && !(${S} instanceof RegExp)`,()=>r.assign(_,(0,De._)`${S}.type || "string"`).assign(g,(0,De._)`${S}.validate`),()=>r.assign(_,(0,De._)`"string"`).assign(g,S)),t.fail$data((0,De.or)(D(),N()));function D(){return u.strictSchema===!1?De.nil:(0,De._)`${i} && !${g}`}function N(){const I=d.$async?(0,De._)`(${S}.async ? await ${g}(${s}) : ${g}(${s}))`:(0,De._)`${g}(${s})`,b=(0,De._)`(typeof ${g} == "function" ? ${I} : ${g}.test(${s}))`;return(0,De._)`${g} && ${g} !== true && ${_} === ${e} && !${b}`}}function E(){const k=p.formats[a];if(!k){D();return}if(k===!0)return;const[S,_,g]=N(k);S===e&&t.pass(I());function D(){if(u.strictSchema===!1){p.logger.warn(b());return}throw new Error(b());function b(){return`unknown format "${a}" ignored in schema at path "${c}"`}}function N(b){const R=b instanceof RegExp?(0,De.regexpCode)(b):u.code.formats?(0,De._)`${u.code.formats}${(0,De.getProperty)(a)}`:void 0,L=r.scopeValue("formats",{key:a,ref:b,code:R});return typeof b=="object"&&!(b instanceof RegExp)?[b.type||"string",b.validate,(0,De._)`${L}.validate`]:["string",b,L]}function I(){if(typeof k=="object"&&!(k instanceof RegExp)&&k.async){if(!d.$async)throw new Error("async format in sync schema");return(0,De._)`await ${g}(${s})`}return typeof _=="function"?(0,De._)`${g}(${s})`:(0,De._)`${g}.test(${s})`}}}};ma.default=Df,Object.defineProperty(ha,"__esModule",{value:!0});const If=[ma.default];ha.default=If;var mr={};Object.defineProperty(mr,"__esModule",{value:!0}),mr.contentVocabulary=mr.metadataVocabulary=void 0,mr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],mr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(jn,"__esModule",{value:!0});const Nf=xn,Pf=Bn,Ff=Qn,Mf=ha,tl=mr,jf=[Nf.default,Pf.default,(0,Ff.default)(),Mf.default,tl.metadataVocabulary,tl.contentVocabulary];jn.default=jf;var ga={},Os={};Object.defineProperty(Os,"__esModule",{value:!0}),Os.DiscrError=void 0;var rl;(function(t){t.Tag="tag",t.Mapping="mapping"})(rl||(Os.DiscrError=rl={})),Object.defineProperty(ga,"__esModule",{value:!0});const gr=ue,ya=Os,sl=Xe,xf=K,Vf={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:t,tagName:e}})=>t===ya.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,gr._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},code(t){const{gen:e,data:r,schema:s,parentSchema:n,it:a}=t,{oneOf:i}=n;if(!a.opts.discriminator)throw new Error("discriminator: requires discriminator option");const o=s.propertyName;if(typeof o!="string")throw new Error("discriminator: requires propertyName");if(s.mapping)throw new Error("discriminator: mapping is not supported");if(!i)throw new Error("discriminator: requires oneOf keyword");const u=e.let("valid",!1),c=e.const("tag",(0,gr._)`${r}${(0,gr.getProperty)(o)}`);e.if((0,gr._)`typeof ${c} == "string"`,()=>d(),()=>t.error(!1,{discrError:ya.DiscrError.Tag,tag:c,tagName:o})),t.ok(u);function d(){const E=T();e.if(!1);for(const k in E)e.elseIf((0,gr._)`${c} === ${k}`),e.assign(u,p(E[k]));e.else(),t.error(!1,{discrError:ya.DiscrError.Mapping,tag:c,tagName:o}),e.endIf()}function p(E){const k=e.name("valid"),S=t.subschema({keyword:"oneOf",schemaProp:E},k);return t.mergeEvaluated(S,gr.Name),k}function T(){var E;const k={},S=g(n);let _=!0;for(let I=0;I<i.length;I++){let b=i[I];b!=null&&b.$ref&&!(0,xf.schemaHasRulesButRef)(b,a.self.RULES)&&(b=sl.resolveRef.call(a.self,a.schemaEnv.root,a.baseId,b==null?void 0:b.$ref),b instanceof sl.SchemaEnv&&(b=b.schema));const R=(E=b==null?void 0:b.properties)===null||E===void 0?void 0:E[o];if(typeof R!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${o}"`);_=_&&(S||g(b)),D(R,I)}if(!_)throw new Error(`discriminator: "${o}" must be required`);return k;function g({required:I}){return Array.isArray(I)&&I.includes(o)}function D(I,b){if(I.const)N(I.const,b);else if(I.enum)for(const R of I.enum)N(R,b);else throw new Error(`discriminator: "properties/${o}" must have "const" or "enum"`)}function N(I,b){if(typeof I!="string"||I in k)throw new Error(`discriminator: "${o}" values must be unique strings`);k[I]=b}}}};ga.default=Vf;const Bf={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;const r=Gi,s=jn,n=ga,a=Bf,i=["/properties"],o="http://json-schema.org/draft-07/schema";class u extends r.default{_addVocabularies(){super._addVocabularies(),s.default.forEach(k=>this.addVocabulary(k)),this.opts.discriminator&&this.addKeyword(n.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const k=this.opts.$data?this.$dataMetaSchema(a,i):a;this.addMetaSchema(k,o,!1),this.refs["http://json-schema.org/schema"]=o}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}}e.Ajv=u,t.exports=e=u,t.exports.Ajv=u,Object.defineProperty(e,"__esModule",{value:!0}),e.default=u;var c=ct;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var d=ue;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var p=Nr;Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return p.default}});var T=Pr;Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return T.default}})})(gn,gn.exports);var nl=gn.exports;const Lf=Ps(nl);var va={exports:{}},al={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0;function e(H,G){return{validate:H,compare:G}}t.fullFormats={date:e(a,i),time:e(u(!0),c),"date-time":e(T(!0),E),"iso-time":e(u(),d),"iso-date-time":e(T(),k),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:g,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:oe,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:N,int32:{type:"number",validate:R},int64:{type:"number",validate:L},float:{type:"number",validate:ee},double:{type:"number",validate:ee},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,i),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,c),"date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,E),"iso-time":e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,d),"iso-date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,k),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);function r(H){return H%4===0&&(H%100!==0||H%400===0)}const s=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,n=[0,31,28,31,30,31,30,31,31,30,31,30,31];function a(H){const G=s.exec(H);if(!G)return!1;const ne=+G[1],W=+G[2],he=+G[3];return W>=1&&W<=12&&he>=1&&he<=(W===2&&r(ne)?29:n[W])}function i(H,G){if(H&&G)return H>G?1:H<G?-1:0}const o=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function u(H){return function(ne){const W=o.exec(ne);if(!W)return!1;const he=+W[1],me=+W[2],_e=+W[3],Ie=W[4],Fe=W[5]==="-"?-1:1,A=+(W[6]||0),y=+(W[7]||0);if(A>23||y>59||H&&!Ie)return!1;if(he<=23&&me<=59&&_e<60)return!0;const M=me-y*Fe,O=he-A*Fe-(M<0?1:0);return(O===23||O===-1)&&(M===59||M===-1)&&_e<61}}function c(H,G){if(!(H&&G))return;const ne=new Date("2020-01-01T"+H).valueOf(),W=new Date("2020-01-01T"+G).valueOf();if(ne&&W)return ne-W}function d(H,G){if(!(H&&G))return;const ne=o.exec(H),W=o.exec(G);if(ne&&W)return H=ne[1]+ne[2]+ne[3],G=W[1]+W[2]+W[3],H>G?1:H<G?-1:0}const p=/t|\s/i;function T(H){const G=u(H);return function(W){const he=W.split(p);return he.length===2&&a(he[0])&&G(he[1])}}function E(H,G){if(!(H&&G))return;const ne=new Date(H).valueOf(),W=new Date(G).valueOf();if(ne&&W)return ne-W}function k(H,G){if(!(H&&G))return;const[ne,W]=H.split(p),[he,me]=G.split(p),_e=i(ne,he);if(_e!==void 0)return _e||c(W,me)}const S=/\/|:/,_=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function g(H){return S.test(H)&&_.test(H)}const D=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function N(H){return D.lastIndex=0,D.test(H)}const I=-(2**31),b=2**31-1;function R(H){return Number.isInteger(H)&&H<=b&&H>=I}function L(H){return Number.isInteger(H)}function ee(){return!0}const U=/[^\\]\\Z/;function oe(H){if(U.test(H))return!1;try{return new RegExp(H),!0}catch{return!1}}})(al);var il={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const e=nl,r=ue,s=r.operators,n={formatMaximum:{okStr:"<=",ok:s.LTE,fail:s.GT},formatMinimum:{okStr:">=",ok:s.GTE,fail:s.LT},formatExclusiveMaximum:{okStr:"<",ok:s.LT,fail:s.GTE},formatExclusiveMinimum:{okStr:">",ok:s.GT,fail:s.LTE}},a={message:({keyword:o,schemaCode:u})=>(0,r.str)`should be ${n[o].okStr} ${u}`,params:({keyword:o,schemaCode:u})=>(0,r._)`{comparison: ${n[o].okStr}, limit: ${u}}`};t.formatLimitDefinition={keyword:Object.keys(n),type:"string",schemaType:"string",$data:!0,error:a,code(o){const{gen:u,data:c,schemaCode:d,keyword:p,it:T}=o,{opts:E,self:k}=T;if(!E.validateFormats)return;const S=new e.KeywordCxt(T,k.RULES.all.format.definition,"format");S.$data?_():g();function _(){const N=u.scopeValue("formats",{ref:k.formats,code:E.code.formats}),I=u.const("fmt",(0,r._)`${N}[${S.schemaCode}]`);o.fail$data((0,r.or)((0,r._)`typeof ${I} != "object"`,(0,r._)`${I} instanceof RegExp`,(0,r._)`typeof ${I}.compare != "function"`,D(I)))}function g(){const N=S.schema,I=k.formats[N];if(!I||I===!0)return;if(typeof I!="object"||I instanceof RegExp||typeof I.compare!="function")throw new Error(`"${p}": format "${N}" does not define "compare" function`);const b=u.scopeValue("formats",{key:N,ref:I,code:E.code.formats?(0,r._)`${E.code.formats}${(0,r.getProperty)(N)}`:void 0});o.fail$data(D(b))}function D(N){return(0,r._)`${N}.compare(${c}, ${d}) ${n[p].fail} 0`}},dependencies:["format"]};const i=o=>(o.addKeyword(t.formatLimitDefinition),o);t.default=i})(il),function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=al,s=il,n=ue,a=new n.Name("fullFormats"),i=new n.Name("fastFormats"),o=(c,d={keywords:!0})=>{if(Array.isArray(d))return u(c,d,r.fullFormats,a),c;const[p,T]=d.mode==="fast"?[r.fastFormats,i]:[r.fullFormats,a],E=d.formats||r.formatNames;return u(c,E,p,T),d.keywords&&(0,s.default)(c),c};o.get=(c,d="full")=>{const T=(d==="fast"?r.fastFormats:r.fullFormats)[c];if(!T)throw new Error(`Unknown format "${c}"`);return T};function u(c,d,p,T){var E,k;(E=(k=c.opts.code).formats)!==null&&E!==void 0||(k.formats=(0,n._)`require("ajv-formats/dist/formats").${T}`);for(const S of d)c.addFormat(S,p[S])}t.exports=e=o,Object.defineProperty(e,"__esModule",{value:!0}),e.default=o}(va,va.exports);var Rf=va.exports;const zf=Ps(Rf),ol={"zip-code":{type:"string",validate:"/^[0-9]{5}[0-9]{3}$/"},cnpj:{type:"string",validate:ul},email:{type:"string",validate:Uf},"phone-br":{type:"string",validate:Kf},cpf:{type:"string",validate:ll},"cpf-cnpj":{type:"string",validate:Hf}},qf=()=>{const t=new Lf({allErrors:!0,strict:!1,useDefaults:"empty"});return zf(t),Object.keys(ol).forEach(e=>t.addFormat(e,ol[e])),t};function Uf(t){if(t.length>254)return!1;const[e,r]=t.split("@");return!e||!r||e.length>64||e.startsWith(".")||e.endsWith(".")||e.includes("..")||!/^[a-zA-Z0-9!#$%&'+-/=?^_{|}~.]+$/.test(e)?!1:/^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\.[a-zA-Z]{2,}$/.test(r)}function Hf(t){return t=t.replace(/[^\d]+/g,""),t.length==11?ll(t):t.length==14?ul(t):!1}function ll(t){const e=t.replace(/[^\d]+/g,"");if(e.length!==11||e.match(/(\d)\1{10}/))return!1;const r=e.split("").map(n=>+n),s=n=>r.slice(0,n-12).reduce((a,i,o)=>a+i*(n-o),0)*10%11%10;return String(s(10))===t[9]&&String(s(11))===t[10]}function ul(t){const e=t.replace(/[^\d]+/g,"");if(e.length!==14||/^(\d)\1+$/.test(e))return!1;let r=e.length-2,s=e.substring(0,r);const n=e.substring(r);let a=0,i=r-7;for(let u=r;u>=1;u--)a+=Number(s.charAt(r-u))*i--,i<2&&(i=9);let o=a%11<2?0:11-a%11;if(String(o)!=n.charAt(0))return!1;r=r+1,s=t.substring(0,r),a=0,i=r-7;for(let u=r;u>=1;u--)a+=Number(s.charAt(r-u))*i--,i<2&&(i=9);return o=a%11<2?0:11-a%11,String(o)==n.charAt(1)}function Kf(t){if(!t)return!1;const e=t.replace(/\D/g,""),r=e.slice(0,2),s=e.slice(2),n=/^[1-9]\d$/.test(r),i=!/^(\d)\1*$/.test(s)&&(s.startsWith("9")&&s.length===9||!s.startsWith("9")&&s.length===8&&/^[23457]/.test(s));return n&&i}const Gf=({formSchema:t,initialValue:e={}})=>{const[r,s]=F.useState({}),[n,a]=F.useState({status:void 0,fields:{}}),[i,o]=F.useState({}),[u,c]=F.useState({}),[d,p]=F.useState([]),[T,E]=F.useState({}),[k,S]=F.useState(void 0);F.useEffect(()=>{D()},[]),F.useEffect(()=>{const l=qf();l.compile(t),S(l)},[t]);const _=F.useCallback(l=>{const f=d.includes(String(l));return e!=null&&e[l]?u[l]!==(e==null?void 0:e[l])||f:u[l]!==void 0||f},[d,u,e]),g=F.useMemo(()=>Object.keys(n.fields).map(f=>{var v,P;return(P=(v=n.fields)==null?void 0:v[f])==null?void 0:P.touched}).some(f=>f),[n]),D=F.useCallback(()=>{Object.keys(e||[]).forEach(l=>{c(f=>({...f,[l]:e[l]}))})},[e]),N=F.useCallback(l=>{var P,V,B,z;const f=((P=l==null?void 0:l.target)==null?void 0:P.type)==="checkbox"?(V=l==null?void 0:l.target)==null?void 0:V.checked:(B=l==null?void 0:l.target)==null?void 0:B.value,v=mn((z=l==null?void 0:l.target)==null?void 0:z.name,t);return(v==null?void 0:v.type)==="number"?Number(f):(v==null?void 0:v.type)==="boolean"?JSON.parse(String(f)):(v==null?void 0:v.type)==="string"?String(f):f},[t]),I=F.useCallback(()=>{const l={};return Object.keys(u).forEach(f=>{const v=String(f).split(".");Ui(l,v,u[f])}),{...l,toJson:()=>JSON.stringify(l)}},[u]),b=F.useCallback(()=>{if(!k)return{result:null,errors:void 0};const{...l}=I(),f=k.compile(t),v=f(l),P=qi(f);return{result:v,errors:P}},[k,I,t]),R=F.useCallback((l,f)=>{if(!k)return{result:null,errors:void 0};const v=k.getSchema(l);if(!v)return{result:null};const P=v(f);if(!(v!=null&&v.errors))return{status:P,errors:{}};const V=qi(v,l);return{status:P,errors:V}},[k]),L=F.useCallback(l=>{const f={[l.target.name]:l},v={...n};v==null||delete v.fields[l.target.name],a(v),s(B=>({...B,...f}));const P=N(l),V={[l.target.name]:P};c(B=>({...B,...V}))},[n,N]),ee=F.useCallback((l,f)=>{const v={[l]:f};o(P=>({...P,...v}))},[]),U=F.useCallback((l,f)=>{const v={[l]:f};c(P=>({...P,...v}))},[]),oe=F.useCallback(({touched:l})=>{const{errors:f}=b(),v=Object.keys(u).reduce((V,B)=>({...V,[B]:{status:!0}}),{}),P={status:!f,fields:{...v,...f}};return Object.keys(P==null?void 0:P.fields).forEach(V=>{if(l!=null)return P.fields[V].touched=l;P.fields[V].touched=!0}),a(P),P},[u,b]),H=F.useCallback(l=>Object.keys(u).filter(f=>f.split(".").includes(l)||f===l).reduce((f,v)=>({...f,[v]:{status:!0}}),{}),[u]),G=F.useCallback((l,f)=>{Object.keys(n.fields).forEach(V=>{new RegExp(`(\\.|^)${f}(\\.|$)`).test(V)&&delete n.fields[V]});const v={...n.fields,...l.fields},P=Object.keys(v).map(V=>v[V].status).every(V=>V);a(V=>({status:P,fields:{...V.fields,...l.fields}}))},[n.fields]),ne=F.useCallback((l,f,v={})=>{const{touched:P}=v,V=R(l,f),B=H(l);if(V.status===null)return console.warn(`Cannot find schemaID: ${l}`),V;const z={status:!!V.status,fields:{...B,...V.errors}};return Object.keys(z.fields).forEach(te=>{if(P!=null)return z.fields[te].touched=P;z.fields[te].touched=_(te)}),G(z,l),z},[R,_,G,H]),W=F.useCallback(l=>{p(f=>[...f,l])},[]),he=F.useCallback(l=>{var f,v,P,V,B;return(f=n==null?void 0:n.fields[l])!=null&&f.touched&&((v=n==null?void 0:n.fields[l])!=null&&v.status)?{status:"",message:""}:(P=n==null?void 0:n.fields[l])!=null&&P.touched&&!((V=n==null?void 0:n.fields[l])!=null&&V.status)?{status:"error",message:(B=n==null?void 0:n.fields[l])==null?void 0:B.message}:{status:"",message:""}},[n==null?void 0:n.fields]),me=F.useCallback(l=>{const{status:f}=he(l);return f},[he]),_e=F.useCallback(l=>{const{message:f}=he(l);return f},[he]),Ie=F.useCallback(l=>mn(l,t),[t]),Fe=F.useCallback(()=>{s({}),o({}),a({status:void 0,fields:{}}),c({})},[]),A=F.useCallback((l,f)=>({...l,onBlurHandler:()=>ne(f,u[f]),onChangeHandler:L,onFocusHandler:()=>W(f)}),[u,W,L,ne]),y=F.useCallback(l=>{if(!l)return;const f=l.value?l:l.querySelectorAll("input,select,textarea")[0]||l;T[f==null?void 0:f.name]||E(v=>({...v,[f.name]:f}))},[T]),M=F.useCallback(l=>{var tt,ht;const f=["text","email","password","radio","number"],v=Ie(l);if(v===null)return console.error(`Cannot find schemaID: ${l}`),{};const P=v["x-label"]||"",V=v["x-placeholder"]||"",B=v["x-tooltip"]||"",z=T[l],te=((tt=z==null?void 0:z.tagName)==null?void 0:tt.toLowerCase())||"",q=((ht=z==null?void 0:z.type)==null?void 0:ht.toLowerCase())||"",pe={name:l,feedback:_e(l),...P&&{label:P},...V&&{placeholder:V},...B&&{tooltip:B},status:me(l),value:u[l],ref:y,animated:!1};if(te==="input"&&q==="checkbox")return pe.checked=u[l],A(pe,l);if(te==="input"&&(v==null?void 0:v.format)==="date")return pe.type="date",pe.value=String(u[l]||""),v!=null&&v.formatMinimum&&(pe.min=v==null?void 0:v.formatMinimum),v!=null&&v.formatMaximum&&(pe.max=v==null?void 0:v.formatMaximum),A(pe,l);if(te==="input"&&f.includes(q)||te==="textarea")return pe.type=Ki(v),pe.value=String(u[l]||""),A(pe,l);if(te==="select"){const Ge=v["x-options"]||[];return pe.value=u[l],pe.onChangeHandler=er=>{const Pt=N(er);U(l,Pt),ne(l,Pt,{touched:!0})},pe.options=Ge,pe}return pe},[y,T,u,Ie,_e,me,N,U,ne,A]),O=F.useCallback(l=>{const f=(P,V)=>{const B={...P};return Object.keys(B).forEach(z=>{V.test(z)&&delete B[z]}),B},v=new RegExp(`(\\.|^)${l}(\\.|$)`);c(P=>f(P,v)),a(P=>({...P,fields:f(P.fields,v)}))},[]);return{getFormSchema:t,getFormEvent:r,setFormData:s,getFormData:u,getInputValidateStatus:me,getInputValidateMessage:_e,getInputSchema:Ie,isFormDirty:g,handleFocused:W,handleFormInput:L,handleFormFlagFields:ee,handleCustomValue:U,clearFormDataKey:O,getFormValidated:n,getFormFlagFields:i,validateForm:oe,validateFormSchema:ne,parseFormToObject:I,clearFormData:Fe,register:M,ajv:k}};function Wf(t){const e=n=>typeof window<"u"?window.matchMedia(n).matches:!1,[r,s]=F.useState(e(t));return F.useEffect(()=>{const n=window.matchMedia(t);function a(){s(e(t))}return a(),n.addListener?n.addListener(a):n.addEventListener("change",a),()=>{n.removeListener?n.removeListener(a):n.removeEventListener("change",a)}},[t]),r}const Yf=()=>{const[t,e]=F.useState([]);function r(n){const a={...n,id:Date.now().toString()};e([...t,a])}function s(n){e(t.filter(a=>a.id!==n))}return{notifications:t,setNotifications:e,addNotification:r,removeNotification:s}},Xf=(t=[],e=0)=>{const[r,s]=F.useState(e),[n,a]=F.useState(t),i=F.useMemo(()=>n.length-1,[n]),o=F.useMemo(()=>r+1<=i&&!n[r+1].disabled,[r,i,n]),u=F.useMemo(()=>r-1>=0&&!n[r-1].disabled,[r,n]),c=F.useCallback(()=>{o&&s(L=>L+1)},[o]),d=F.useCallback(()=>{u&&s(L=>L-1)},[u]);function p(L){Tr(L,n)||a(L)}const T=F.useCallback(L=>n[L],[n]),E=F.useMemo(()=>({index:r,...T(r)}),[r,T]),k=F.useMemo(()=>r===i,[r,i]),S=F.useCallback(L=>n.findIndex(U=>Tr(U,L)),[n]),_=F.useCallback(L=>n.findIndex(U=>U.name===L),[n]),g=F.useCallback(L=>typeof L=="object"?S(L):typeof L=="string"?_(L):L,[S,_]),D=F.useCallback(L=>{const ee=g(L);ee!==r&&s(ee)},[g,r]),N=F.useCallback(L=>{const ee=g(L);return{index:ee,...T(ee)}},[g,T]),I=F.useCallback(L=>r===g(L),[r,g]),b=F.useCallback(L=>{const U=[...n].map((oe,H)=>(oe.disabled=H>g(L),oe));a(U)},[n,g]);function R(L){const ee=[...n],U=Array.isArray(L)?L.map(oe=>g(oe)):[g(L)];return ee.map((oe,H)=>(oe.disabled=!!U.includes(H),oe))}return[{getSteps:n,getStep:N,getStepSelected:E,getStepIndexByName:_,setSteps:p,setStepSelected:D,goToNextStep:c,goToPrevStep:d,canGoToNextStep:o,canGoToPrevStep:u,isStep:I,isLastStep:k,disableSteps:R,disableStepsAfter:b}]};Z.DsAccordion=an,Z.DsActiveTags=Ii,Z.DsButton=Sr,Z.DsCaption=zs,Z.DsCard=qs,Z.DsCheckbox=Us,Z.DsContainer=as,Z.DsEditableSelect=Pi,Z.DsFlexElement=Be,Z.DsFlexLayout=Dt,Z.DsGridElement=Oi,Z.DsGridLayout=os,Z.DsHR=Ks,Z.DsHeading=Hs,Z.DsIcon=Ee,Z.DsIndicator=Zl,Z.DsInlineEditable=on,Z.DsInput=ar,Z.DsLoading=rs,Z.DsModal=ln,Z.DsNotification=ls,Z.DsNotificationList=dn,Z.DsOption=Xs,Z.DsParagraph=At,Z.DsPasswordConfirmation=cn,Z.DsProgress=Zs,Z.DsSelect=Qs,Z.DsSpacer=lt,Z.DsStepper=xi,Z.DsSubtitle=Si,Z.DsTable=Bi,Z.DsTabs=su,Z.DsTextArea=tn,Z.DsTooltip=Ut,Z.DsTwoColumns=fn,Z.DsWrapper=Kt,Z.ThemeProvider=Ri,Z.customAssign=Ui,Z.getInputTypeByFormat=Ki,Z.getSchemaProperties=mn,Z.isEqual=Tr,Z.isValidObject=Hi,Z.parseOptionValue=iu,Z.useForm=Gf,Z.useMediaQuery=Wf,Z.useNotification=Yf,Z.useStepper=Xf,Object.defineProperty(Z,Symbol.toStringTag,{value:"Module"})});
|