@akad/design-system 1.1.4 → 1.1.6
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/core.css +1 -1
- package/package.json +1 -1
- package/react/react-lib.js +689 -686
- package/react/react-lib.umd.cjs +4 -4
- package/react/src/components/atoms/Progress/Progress.config.d.ts +34 -2
- package/react/src/components/atoms/Progress/Progress.d.ts +1 -1
- package/react/src/components/atoms/Progress/Progress.stories.d.ts +5 -1
- package/scss/core/components/atoms/progress.scss +0 -16
package/react/react-lib.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(p,u){typeof exports=="object"&&typeof module<"u"?u(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],u):(p=typeof globalThis<"u"?globalThis:p||self,u(p["react-lib"]={},p.jsxRuntime,p.React))})(this,function(p,u,v){"use strict";const Va="pushClickEvent: missing required field(s). Required: eventLabel";function La(t){return!!(t.eventLabel&&typeof t.eventLabel=="string"&&t.eventLabel.trim())}function ja(t){var a;if(!La(t))throw new Error(Va);if(!((a=globalThis.window)!=null&&a.dataLayer))return;const e={};Object.keys(t).forEach(n=>{const r=t[n];r!=null&&(typeof r=="string"&&!r.trim()||(e[n]=r))});const s={event:"clickEvent",userClick:e};globalThis.window.dataLayer.push(s)}function Pa(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var
|
|
1
|
+
(function(p,u){typeof exports=="object"&&typeof module<"u"?u(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],u):(p=typeof globalThis<"u"?globalThis:p||self,u(p["react-lib"]={},p.jsxRuntime,p.React))})(this,function(p,u,v){"use strict";const Va="pushClickEvent: missing required field(s). Required: eventLabel";function La(t){return!!(t.eventLabel&&typeof t.eventLabel=="string"&&t.eventLabel.trim())}function ja(t){var a;if(!La(t))throw new Error(Va);if(!((a=globalThis.window)!=null&&a.dataLayer))return;const e={};Object.keys(t).forEach(n=>{const r=t[n];r!=null&&(typeof r=="string"&&!r.trim()||(e[n]=r))});const s={event:"clickEvent",userClick:e};globalThis.window.dataLayer.push(s)}function Pa(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Tt={exports:{}},it={exports:{}},Y={};/** @license React v16.13.1
|
|
2
2
|
* react-is.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -12,9 +12,9 @@
|
|
|
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 Rs;function za(){return Rs||(Rs=1,process.env.NODE_ENV!=="production"&&function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,s=t?Symbol.for("react.portal"):60106,a=t?Symbol.for("react.fragment"):60107,n=t?Symbol.for("react.strict_mode"):60108,r=t?Symbol.for("react.profiler"):60114,i=t?Symbol.for("react.provider"):60109,o=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,d=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,g=t?Symbol.for("react.suspense"):60113,k=t?Symbol.for("react.suspense_list"):60120,E=t?Symbol.for("react.memo"):60115,C=t?Symbol.for("react.lazy"):60116,_=t?Symbol.for("react.block"):60121,m=t?Symbol.for("react.fundamental"):60117,w=t?Symbol.for("react.responder"):60118,N=t?Symbol.for("react.scope"):60119;function T(b){return typeof b=="string"||typeof b=="function"||b===a||b===d||b===r||b===n||b===g||b===k||typeof b=="object"&&b!==null&&(b.$$typeof===C||b.$$typeof===E||b.$$typeof===i||b.$$typeof===o||b.$$typeof===f||b.$$typeof===m||b.$$typeof===w||b.$$typeof===N||b.$$typeof===_)}function D(b){if(typeof b=="object"&&b!==null){var de=b.$$typeof;switch(de){case e:var He=b.type;switch(He){case c:case d:case a:case r:case n:case g:return He;default:var
|
|
15
|
+
*/var Rs;function za(){return Rs||(Rs=1,process.env.NODE_ENV!=="production"&&function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,s=t?Symbol.for("react.portal"):60106,a=t?Symbol.for("react.fragment"):60107,n=t?Symbol.for("react.strict_mode"):60108,r=t?Symbol.for("react.profiler"):60114,i=t?Symbol.for("react.provider"):60109,o=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,d=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,g=t?Symbol.for("react.suspense"):60113,k=t?Symbol.for("react.suspense_list"):60120,E=t?Symbol.for("react.memo"):60115,C=t?Symbol.for("react.lazy"):60116,_=t?Symbol.for("react.block"):60121,m=t?Symbol.for("react.fundamental"):60117,w=t?Symbol.for("react.responder"):60118,N=t?Symbol.for("react.scope"):60119;function T(b){return typeof b=="string"||typeof b=="function"||b===a||b===d||b===r||b===n||b===g||b===k||typeof b=="object"&&b!==null&&(b.$$typeof===C||b.$$typeof===E||b.$$typeof===i||b.$$typeof===o||b.$$typeof===f||b.$$typeof===m||b.$$typeof===w||b.$$typeof===N||b.$$typeof===_)}function D(b){if(typeof b=="object"&&b!==null){var de=b.$$typeof;switch(de){case e:var He=b.type;switch(He){case c:case d:case a:case r:case n:case g:return He;default:var Dt=He&&He.$$typeof;switch(Dt){case o:case f:case C:case E:case i:return Dt;default:return de}}case s:return de}}}var h=c,I=d,M=o,W=i,z=e,se=f,ue=a,ce=C,De=E,ye=s,_e=r,le=n,ke=g,Ce=!1;function be(b){return Ce||(Ce=!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.")),y(b)||D(b)===c}function y(b){return D(b)===d}function A(b){return D(b)===o}function j(b){return D(b)===i}function V(b){return typeof b=="object"&&b!==null&&b.$$typeof===e}function $(b){return D(b)===f}function O(b){return D(b)===a}function L(b){return D(b)===C}function P(b){return D(b)===E}function U(b){return D(b)===s}function S(b){return D(b)===r}function x(b){return D(b)===n}function Z(b){return D(b)===g}K.AsyncMode=h,K.ConcurrentMode=I,K.ContextConsumer=M,K.ContextProvider=W,K.Element=z,K.ForwardRef=se,K.Fragment=ue,K.Lazy=ce,K.Memo=De,K.Portal=ye,K.Profiler=_e,K.StrictMode=le,K.Suspense=ke,K.isAsyncMode=be,K.isConcurrentMode=y,K.isContextConsumer=A,K.isContextProvider=j,K.isElement=V,K.isForwardRef=$,K.isFragment=O,K.isLazy=L,K.isMemo=P,K.isPortal=U,K.isProfiler=S,K.isStrictMode=x,K.isSuspense=Z,K.isValidElementType=T,K.typeOf=D}()),K}var Gs;function Zs(){return Gs||(Gs=1,process.env.NODE_ENV==="production"?it.exports=qa():it.exports=za()),it.exports}/*
|
|
16
16
|
object-assign
|
|
17
17
|
(c) Sindre Sorhus
|
|
18
18
|
@license MIT
|
|
19
|
-
*/var
|
|
20
|
-
Valid keys: `+JSON.stringify(Object.keys(y),null," "));var b=Z(P,x,$,O,L+"."+x,s);if(b)return b}return null}return m(A)}function ye(y){switch(typeof y){case"number":case"string":case"undefined":return!0;case"boolean":return!y;case"object":if(Array.isArray(y))return y.every(ye);if(y===null||o(y))return!0;var A=g(y);if(A){var j=A.call(y),V;if(A!==y.entries){for(;!(V=j.next()).done;)if(!ye(V.value))return!1}else for(;!(V=j.next()).done;){var $=V.value;if($&&!ye($[1]))return!1}}else return!1;return!0;default:return!1}}function _e(y,A){return y==="symbol"?!0:A?A["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&A instanceof Symbol:!1}function le(y){var A=typeof y;return Array.isArray(y)?"array":y instanceof RegExp?"object":_e(A,y)?"symbol":A}function ke(y){if(typeof y>"u"||y===null)return""+y;var A=le(y);if(A==="object"){if(y instanceof Date)return"date";if(y instanceof RegExp)return"regexp"}return A}function Ce(y){var A=ke(y);switch(A){case"array":case"object":return"an "+A;case"boolean":case"date":case"regexp":return"a "+A;default:return A}}function be(y){return!y.constructor||!y.constructor.name?k:y.constructor.name}return E.checkPropTypes=n,E.resetWarningCache=n.resetWarningCache,E.PropTypes=E,E},xt}var Bt,na;function Ya(){if(na)return Bt;na=1;var t=Ot();function e(){}function s(){}return s.resetWarningCache=e,Bt=function(){function a(i,o,c,d,f,g){if(g!==t){var k=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 k.name="Invariant Violation",k}}a.isRequired=a;function n(){return a}var r={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:n,element:a,elementType:a,instanceOf:n,node:a,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:s,resetWarningCache:e};return r.PropTypes=r,r},Bt}if(process.env.NODE_ENV!=="production"){var Ka=Zs(),Xa=!0;Dt.exports=Wa()(Ka.isElement,Xa)}else Dt.exports=Ya()();var Ra=Dt.exports;const l=Pa(Ra);var $t=(t=>(t.Primary="primary",t.Secondary="secondary",t.Info="info",t.Success="success",t.Danger="danger",t.Warning="warning",t.Neutral="neutral",t))($t||{}),Mt=(t=>(t.Solid="solid",t.Outline="outline",t.Text="text",t))(Mt||{}),Vt=(t=>(t.Large="lg",t.Medium="md",t.Small="sm",t))(Vt||{}),Lt=(t=>(t.Right="right",t.Left="left",t))(Lt||{}),ra=(t=>(t[t.Elevation1=1]="Elevation1",t[t.Elevation2=2]="Elevation2",t[t.Elevation3=3]="Elevation3",t[t.Elevation4=4]="Elevation4",t))(ra||{});const X={name:"Button",class:"ds-button",props:{color:{type:String,default:"primary",options:Object.values($t)},variant:{type:String,default:"solid",options:Object.values(Mt)},size:{type:String,default:"md",options:Object.values(Vt)},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:"right",options:Object.values(Lt)},id:{type:String,default:""},testId:{type:String,default:"ds-button-test"},fullSize:{type:Boolean,default:!1}}};var jt=(t=>(t.Primary="primary",t.PrimaryLightest="primary-lightest",t.PrimaryLighter="primary-lighter",t.PrimaryLight="primary-light",t.PrimaryDark="primary-dark",t.PrimaryDarker="primary-darker",t.Neutral90="neutral-90",t.Neutral80="neutral-80",t.Neutral60="neutral-60",t.Neutral40="neutral-40",t.Neutral20="neutral-20",t.Neutral10="neutral-10",t.Neutral05="neutral-05",t.Neutral00="neutral-00",t.Secondary="secondary",t.SecondaryLightest="secondary-lightest",t.SecondaryLighter="secondary-lighter",t.SecondaryLight="secondary-light",t.SecondaryDark="secondary-dark",t.SecondaryDarker="secondary-darker",t.Success="success",t.SuccessLighter="success-lighter",t.SuccessLight="success-light",t.SuccessDark="success-dark",t.Warning="warning",t.WarningLighter="warning-lighter",t.WarningLight="warning-light",t.WarningDark="warning-dark",t.Danger="danger",t.DangerLighter="danger-lighter",t.DangerLight="danger-light",t.DangerDark="danger-dark",t.Info="info",t.InfoLighter="info-lighter",t.InfoLight="info-light",t.InfoDark="info-dark",t))(jt||{}),Pt=(t=>(t.Outlined="outlined",t.Rounded="rounded",t.Sharp="sharp",t))(Pt||{}),qt=(t=>(t.XXS="xxs",t.XS="xs",t.SM="sm",t.MD="md",t.LG="lg",t.XL="xl",t.XXL="xxl",t.XXXL="xxxl",t.Huge="huge",t))(qt||{}),zt=(t=>(t.Bold="bold",t.Semibold="semibold",t.Medium="medium",t.Regular="regular",t.Light="light",t.Extralight="extralight",t))(zt||{});const pe={name:"Icon",class:"ds-icon",props:{color:{type:String,default:"neutral-90",options:Object.values(jt)},image:{type:String,default:"settings"},variation:{type:String,default:"outlined",options:Object.values(Pt)},size:{type:String,default:"md",options:Object.values(qt)},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:"semibold",options:Object.values(zt)},onClick:{type:Function,default:()=>({})}}};var it=(t=>(t["primary-darker"]="primary--darker",t["primary-dark"]="primary--dark",t["primary-light"]="primary--light",t["primary-lighter"]="primary--lighter",t["primary-lightest"]="primary--lightest",t["secondary-darker"]="secondary--darker",t["secondary-dark"]="secondary--dark",t["secondary-light"]="secondary--light",t["secondary-lighter"]="secondary--lighter",t["secondary-lightest"]="secondary--lightest",t["success-dark"]="success--dark",t["success-light"]="success--light",t["success-lighter"]="success--lighter",t["warning-dark"]="warning--dark",t["warning-light"]="warning--light",t["warning-lighter"]="warning--lighter",t["danger-dark"]="danger--dark",t["danger-light"]="danger--light",t["danger-lighter"]="danger--lighter",t["info-dark"]="info--dark",t["info-light"]="info--light",t["info-lighter"]="info--lighter",t))(it||{});const Ga={bold:700,semibold:600,medium:500,regular:400,light:300,extralight:200},R=({image:t=pe.props.image.default,color:e=pe.props.color.default,className:s,size:a=pe.props.size.default,fill:n=pe.props.fill.default,weight:r=pe.props.weight.default,testId:i=pe.props.testId.default,onClick:o=pe.props.onClick.default})=>{const c="material-symbols-rounded",d=e&&pe.props.color.options.find(g=>g===e)&&`color__${it[e]??e}`,f=v.useMemo(()=>({fontVariationSettings:`'FILL' ${n?1:0}, 'GRAD' 0,'wght' ${Ga[r]}, 'opsz' 48`}),[r,n]);return u.jsx("i",{className:[`${pe.class}--${a}`,pe.class,c,d,s].filter(g=>g).join(" "),"data-testid":i,onClick:o,style:f,translate:"no",children:t})};R.propTypes={color:l.oneOf(pe.props.color.options),image:l.string,fontVariationSettings:l.object,size:l.oneOf(pe.props.size.options),fill:l.bool,weight:l.oneOf(pe.props.weight.options),onClick:l.func},R.displayName="DsIcon";const Qe=({children:t,className:e,onClick:s,size:a=X.props.size.default,disabled:n=X.props.disabled.default,icon:r=X.props.icon.default,id:i=X.props.id.default,testId:o=X.props.testId.default,elevation:c,variant:d=X.props.variant.default,color:f=X.props.color.default,iconFill:g=X.props.iconFill.default,iconPosition:k=X.props.iconPosition.default,fullSize:E=X.props.fullSize.default,trackingData:C})=>{const _=a&&X.props.size.options.find(W=>W===a)?`${X.class}--${a}`:`${X.class}__${X.props.size.default}`,m=n&&`${X.class}--disabled`,w=`${X.class}__${f}--${d}`,N=c&&`${X.class}--elevation-${c}`,T=r&&`${X.class}--with-icon`,D=E?`${X.class}--full-size`:"",h=k==="right"?`${X.class}__icon`:`${X.class}__icon--left`,I=k==="right"?`${X.class}__text`:`${X.class}__text--reversed`,M=W=>{C&&ja(C),s&&s(W)};return u.jsx("button",{className:[X.class,D,m,_,w,N,T,e].filter(W=>W).join(" "),"data-testid":o,disabled:n,id:i,onClick:n?void 0:M,children:u.jsxs("span",{className:["ds-button__text",I].join(" "),children:[t,r&&u.jsx(R,{className:["ds-button__icon",h].join(" "),fill:g,image:r,size:a})]})})};Qe.propTypes={color:l.oneOf(X.props.color.options),variant:l.oneOf(X.props.variant.options),size:l.oneOf(X.props.size.options),disabled:l.bool,icon:l.string,iconFill:l.bool,iconPosition:l.oneOf(X.props.iconPosition.options),testId:l.string,id:l.string,fullSize:l.bool,trackingData:l.object},Qe.displayName="DsButton";const ia={name:"Caption",class:"ds-caption"},Ut=({children:t,className:e,testId:s="ds-caption-test"})=>u.jsx("p",{className:[ia.class,e].filter(a=>a).join(" "),"data-testid":s,children:t});Ut.propTypes={children:l.node.isRequired,className:l.string,testId:l.string},Ut.displayName="DsCaption";var lt=(t=>(t.None="",t.PrimaryDarker="primary-darker",t.PrimaryDark="primary-dark",t.Primary="primary",t.PrimaryLight="primary-light",t.PrimaryLighter="primary-lighter",t.PrimaryLightest="primary-lightest",t.SecondaryDarker="secondary-darker",t.SecondaryDark="secondary-dark",t.Secondary="secondary",t.SecondaryLight="secondary-light",t.SecondaryLighter="secondary-lighter",t.SecondaryLightest="secondary-lightest",t.Neutral90="neutral-90",t.Neutral80="neutral-80",t.Neutral60="neutral-60",t.Neutral40="neutral-40",t.Neutral20="neutral-20",t.Neutral10="neutral-10",t.Neutral05="neutral-05",t.Neutral00="neutral-00",t.SuccessDark="success-dark",t.Success="success",t.SuccessLight="success-light",t.SuccessLighter="success-lighter",t.WarningDark="warning-dark",t.Warning="warning",t.WarningLight="warning-light",t.WarningLighter="warning-lighter",t.DangerDark="danger-dark",t.Danger="danger",t.DangerLight="danger-light",t.DangerLighter="danger-lighter",t.InfoDark="info-dark",t.Info="info",t.InfoLight="info-light",t.InfoLighter="info-lighter",t))(lt||{}),la=(t=>(t[t.Elevation=0]="Elevation",t[t.Elevation1=1]="Elevation1",t[t.Elevation2=2]="Elevation2",t[t.Elevation3=3]="Elevation3",t[t.Elevation4=4]="Elevation4",t))(la||{});const Ne={name:"Card",class:"ds-card",props:{backgroundColor:{type:String,default:"",options:Object.values(lt)},borderColor:{type:String,default:"",options:Object.values(lt)},elevation:{type:Number,default:0,options:[0,1,2,3,4]},id:{type:String,default:""},testId:{type:String,default:"ds-card"}}},Ht=({id:t,testId:e=Ne.props.testId.default,children:s,className:a,elevation:n=Ne.props.elevation.default,backgroundColor:r=Ne.props.backgroundColor.default,borderColor:i=Ne.props.borderColor.default})=>{const o=n&&`elevation-${n}`,c=i&&`border-color__${it[i]??i}`,d=r&&`bg-color__${it[r]??r}`;return u.jsx("div",{className:[Ne.class,a,o,c,d].filter(f=>f).join(" "),"data-testid":e,id:t,children:s})};Ht.propTypes={id:l.string,testId:l.string,backgroundColor:l.oneOf(Ne.props.backgroundColor.options),borderColor:l.oneOf(Ne.props.borderColor.options),elevation:l.oneOf(Ne.props.elevation.options)},Ht.displayName="DsCard";const ae={name:"Checkbox",class:"ds-checkbox",props:{name:{type:String,required:!1},testId:{type:String,default:"ds-checkbox-test"},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:()=>({})}}},Wt=v.forwardRef(({id:t,className:e,name:s,testId:a=ae.props.testId.default,label:n=ae.props.label.default,description:r=ae.props.description.default,checked:i=ae.props.checked.default,disabled:o=ae.props.disabled.default,changeByChecked:c=ae.props.changeByChecked.default,onChangeHandler:d},f)=>{const g=c??!1,k=i??!1,[E,C]=v.useState(k),_={image:E?"check_box":"check_box_outline_blank",class:E?`${ae.class}__icon--checked`:`${ae.class}__icon--unchecked`},m=o&&`${ae.class}--disabled`,w=N=>{o||(C(T=>!T),d&&d(N))};return v.useEffect(()=>{g&&C(i)},[i,g]),u.jsxs("label",{className:[ae.class,m,e].join(" "),htmlFor:t||s,children:[u.jsx("input",{checked:E,className:`${ae.class}__input`,"data-testid":a,disabled:o,id:t||s,name:s,onChange:w,ref:f,type:"checkbox"}),u.jsx(R,{className:`${ae.class}__icon ${_.class}`,fill:!0,image:_.image,size:"xxl",testId:`${a}-icon`}),(r||n)&&u.jsxs("div",{className:`${ae.class}__label`,children:[n&&u.jsx("label",{className:`${ae.class}__label-title`,htmlFor:t||s,children:n}),r&&u.jsx("label",{className:`${ae.class}__label-description`,htmlFor:t||s,children:r})]})]})});Wt.propTypes={label:l.oneOfType([l.string,l.element]),name:l.string,className:l.string,testId:l.string,description:l.oneOfType([l.string,l.element]),checked:l.bool,disabled:l.bool},Wt.displayName="DsCheckbox";var Yt=(t=>(t.Primary="primary",t.Secondary="secondary",t.Info="info",t.Success="success",t.Danger="danger",t.Warning="warning",t.Neutral="neutral",t))(Yt||{}),Kt=(t=>(t.Solid="solid",t.Light="light",t))(Kt||{}),Je=(t=>(t.Left="left",t.Right="right",t))(Je||{});const Te={name:"DsChip",class:"ds-chip",props:{color:{type:String,default:"primary",options:Object.values(Yt)},variant:{type:String,default:"solid",options:Object.values(Kt)},iconPosition:{type:String,default:"left",options:Object.values(Je)}}},Za=({label:t,color:e=Te.props.color.default,variant:s=Te.props.variant.default,icon:a,iconPosition:n=Te.props.iconPosition.default,className:r,title:i,testId:o="ds-chip"})=>{const c=[Te.class,`${Te.class}__${e}--${s}`,a&&`${Te.class}--with-icon`,a&&`${Te.class}--icon-${n}`,r].filter(Boolean).join(" "),d=a?u.jsx("span",{className:`${Te.class}__icon`,"data-testid":`${o}-icon`,children:a}):null;return u.jsxs("span",{className:c,"data-testid":o,title:i,children:[n===Je.Left&&d,u.jsx("span",{className:`${Te.class}__label`,children:t}),n===Je.Right&&d]})};var Xt=(t=>(t.Heading1="heading-1",t.Heading2="heading-2",t.Heading3="heading-3",t.Heading4="heading-4",t.Heading5="heading-5",t.Heading6="heading-6",t))(Xt||{});const We={name:"Heading",class:"ds-heading",props:{type:{type:String,default:"heading-1",options:Object.values(Xt)}}},ot=({children:t,testId:e="ds-heading-test",type:s=We.props.type.default,className:a})=>{const n={"heading-1":"h1","heading-2":"h2","heading-3":"h3","heading-4":"h4","heading-5":"h5","heading-6":"h6"},r=s.replace("heading-",""),i=We.props.type.options.find(d=>d===s)&&`${We.class}--${r}`,c=n[s];return u.jsx(c,{className:[We.class,i,a].filter(d=>d).join(" "),"data-testid":e,children:t})};ot.propTypes={className:l.string,testId:l.string,type:l.oneOf(We.props.type.options)},ot.displayName="DsHeading";var Rt=(t=>(t.None="",t.Dashed="dashed",t.Dotted="dotted",t))(Rt||{}),Gt=(t=>(t.None="",t.Small="small",t.Large="large",t))(Gt||{});const Me={name:"HR",class:"ds-hr",props:{borderStyle:{type:String,default:"",options:Object.values(Rt)},size:{type:String,default:"",options:Object.values(Gt)}}};function oa(t,e,s){const a=s.props[t];return a.options&&a.options.some(n=>n===e)?`${s.class}--${e}`:""}const Zt=({size:t=Me.props.size.default,borderStyle:e=Me.props.borderStyle.default})=>{const s=oa("size",t,Me),a=oa("borderStyle",e,Me);return u.jsx("hr",{className:`${Me.class} ${s} ${a}`.trim()})};Zt.propTypes={size:l.oneOf(Me.props.size.options),borderStyle:l.oneOf(Me.props.borderStyle.options)},Zt.displayName="DsHR";function Ve(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 ca(t,e){return Array.isArray(e)?ca(t,(s,a)=>e.includes(a)):Object.entries(t).reduce((s,a)=>{let[n,r]=a;return e(r,n)&&(s[n]=r),s},{})}const F={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Qa(t){switch(t){case F.LEFT:return F.FORCE_LEFT;case F.RIGHT:return F.FORCE_RIGHT;default:return t}}function Qt(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function ut(t,e){if(e===t)return!0;const s=Array.isArray(e),a=Array.isArray(t);let n;if(s&&a){if(e.length!=t.length)return!1;for(n=0;n<e.length;n++)if(!ut(e[n],t[n]))return!1;return!0}if(s!=a)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){const r=e instanceof Date,i=t instanceof Date;if(r&&i)return e.getTime()==t.getTime();if(r!=i)return!1;const o=e instanceof RegExp,c=t instanceof RegExp;if(o&&c)return e.toString()==t.toString();if(o!=c)return!1;const d=Object.keys(e);for(n=0;n<d.length;n++)if(!Object.prototype.hasOwnProperty.call(t,d[n]))return!1;for(n=0;n<d.length;n++)if(!ut(t[d[n]],e[d[n]]))return!1;return!0}else if(e&&t&&typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();return!1}class Ja{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?F.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?F.RIGHT:F.LEFT}}function B(t,e){return new B.InputMask(t,e)}function da(t){if(t==null)throw new Error("mask property should be defined");return t instanceof RegExp?B.MaskedRegExp:Ve(t)?B.MaskedPattern:t===Date?B.MaskedDate:t===Number?B.MaskedNumber:Array.isArray(t)||t===Array?B.MaskedDynamic:B.Masked&&t.prototype instanceof B.Masked?t:B.Masked&&t instanceof B.Masked?t.constructor:t instanceof Function?B.MaskedFunction:(console.warn("Mask not found for mask",t),B.Masked)}function et(t){if(!t)throw new Error("Options in not defined");if(B.Masked){if(t.prototype instanceof B.Masked)return{mask:t};const{mask:e=void 0,...s}=t instanceof B.Masked?{mask:t}:ua(t)&&t.mask instanceof B.Masked?t:{};if(e){const a=e.mask;return{...ca(e,(n,r)=>!r.startsWith("_")),mask:e.constructor,_mask:a,...s}}}return ua(t)?{...t}:{mask:t}}function xe(t){if(B.Masked&&t instanceof B.Masked)return t;const e=et(t),s=da(e.mask);if(!s)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===s&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new s(e)}B.createMask=xe;class Jt{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,s){if(!(e==null||s==null||e===this.selectionStart&&s===this.selectionEnd))try{this._unsafeSelect(e,s)}catch{}}get isActive(){return!1}}B.MaskElement=Jt;const pa=90,en=89;class ct extends Jt{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,s,a;return(e=(s=(a=this.input).getRootNode)==null?void 0:s.call(a))!=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===pa&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===en&&e.ctrlKey))return e.preventDefault(),this._handlers.redo(e);if(this._handlers.undo&&e.keyCode===pa&&(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={}}}B.HTMLMaskElement=ct;class tn extends ct{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,s){this.input.setSelectionRange(e,s)}get value(){return this.input.value}set value(e){this.input.value=e}}B.HTMLMaskElement=ct;class ha extends ct{get _unsafeSelectionStart(){const e=this.rootElement,s=e.getSelection&&e.getSelection(),a=s&&s.anchorOffset,n=s&&s.focusOffset;return n==null||a==null||a<n?a:n}get _unsafeSelectionEnd(){const e=this.rootElement,s=e.getSelection&&e.getSelection(),a=s&&s.anchorOffset,n=s&&s.focusOffset;return n==null||a==null||a>n?a:n}_unsafeSelect(e,s){if(!this.rootElement.createRange)return;const a=this.rootElement.createRange();a.setStart(this.input.firstChild||this.input,e),a.setEnd(this.input.lastChild||this.input,s);const n=this.rootElement,r=n.getSelection&&n.getSelection();r&&(r.removeAllRanges(),r.addRange(a))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}B.HTMLContenteditableMaskElement=ha;class dt{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>dt.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}}dt.MAX_LENGTH=100;class sn{constructor(e,s){this.el=e instanceof Jt?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new ha(e):new tn(e),this.masked=xe(s),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new dt,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.updateValue(),this._onChange()}maskEquals(e){var s;return e==null||((s=this.masked)==null?void 0:s.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof B.Masked)&&this.masked.constructor===da(e)){this.masked.updateOptions({mask:e});return}const s=e instanceof B.Masked?e:xe({mask:e});s.unmaskedValue=this.masked.unmaskedValue,this.masked=s}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,s){const a=this._listeners[e];a&&a.forEach(n=>n(s))}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 s=this.masked.unmaskedValue,a=this.masked.value,n=this.masked.rawInputValue,r=this.displayValue,i=this.unmaskedValue!==s||this.value!==a||this._rawInputValue!==n;this._unmaskedValue=s,this._value=a,this._rawInputValue=n,this.el.value!==r&&(this.el.value=r),e==="auto"?this.alignCursor():e!=null&&(this.cursorPos=e),i&&this._fireChangeEvents(),!this._historyChanging&&(i||this.history.isEmpty)&&this.history.push({unmaskedValue:s,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:s,...a}=e,n=!this.maskEquals(s),r=this.masked.optionsIsChanged(a);n&&(this.mask=s),r&&this.masked.updateOptions(a),(n||r)&&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,F.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,s){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(s),this}off(e,s){if(!this._listeners[e])return this;if(!s)return delete this._listeners[e],this;const a=this._listeners[e].indexOf(s);return a>=0&&this._listeners[e].splice(a,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const s=new Ja({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),a=this.masked.rawInputValue,n=this.masked.splice(s.startChangePos,s.removed.length,s.inserted,s.removeDirection,{input:!0,raw:!0}).offset,r=a===this.masked.rawInputValue?s.removeDirection:F.NONE;let i=this.masked.nearestInputPos(s.startChangePos+n,r);r!==F.NONE&&(i=this.masked.nearestInputPos(i,F.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}}B.InputMask=sn;class q{static normalize(e){return Array.isArray(e)?e:[e,new q]}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}}B.ChangeDetails=q;class Fe{constructor(e,s,a){e===void 0&&(e=""),s===void 0&&(s=0),this.value=e,this.from=s,this.stop=a}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 s=this.value[0];return this.value=this.value.slice(1),s}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class ne{constructor(e){this._value="",this._update({...ne.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,s){s===void 0&&(s={input:!0}),this.reset(),this.append(e,s,""),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,s){return e}totalInputPositions(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),Math.min(this.displayValue.length,s-e)}extractInput(e,s,a){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),this.displayValue.slice(e,s)}extractTail(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),new Fe(this.extractInput(e,s),e)}appendTail(e){return Ve(e)&&(e=new Fe(String(e))),e.appendTo(this)}_appendCharRaw(e,s){return e?(this._value+=e,new q({inserted:e,rawInserted:e})):new q}_appendChar(e,s,a){s===void 0&&(s={});const n=this.state;let r;if([e,r]=this.doPrepareChar(e,s),e&&(r=r.aggregate(this._appendCharRaw(e,s)),!r.rawInserted&&this.autofix==="pad")){const i=this.state;this.state=n;let o=this.pad(s);const c=this._appendCharRaw(e,s);o=o.aggregate(c),c.rawInserted||o.equals(r)?r=o:this.state=i}if(r.inserted){let i,o=this.doValidate(s)!==!1;if(o&&a!=null){const c=this.state;if(this.overwrite===!0){i=a.state;for(let f=0;f<r.rawInserted.length;++f)a.unshift(this.displayValue.length-r.tailShift)}let d=this.appendTail(a);if(o=d.rawInserted.length===a.toString().length,!(o&&d.inserted)&&this.overwrite==="shift"){this.state=c,i=a.state;for(let f=0;f<r.rawInserted.length;++f)a.shift();d=this.appendTail(a),o=d.rawInserted.length===a.toString().length}o&&d.inserted&&(this.state=c)}o||(r=new q,this.state=n,a&&i&&(a.state=i))}return r}_appendPlaceholder(){return new q}_appendEager(){return new q}append(e,s,a){if(!Ve(e))throw new Error("value should be string");const n=Ve(a)?new Fe(String(a)):a;s!=null&&s.tail&&(s._beforeTailState=this.state);let r;[e,r]=this.doPrepare(e,s);for(let i=0;i<e.length;++i){const o=this._appendChar(e[i],s,n);if(!o.rawInserted&&!this.doSkipInvalid(e[i],s,n))break;r.aggregate(o)}return(this.eager===!0||this.eager==="append")&&s!=null&&s.input&&e&&r.aggregate(this._appendEager()),n!=null&&(r.tailShift+=this.appendTail(n).tailShift),r}remove(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(s),new q}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const s=this.rawInputValue,a=this.value,n=e();return this.rawInputValue=s,this.value&&this.value!==a&&a.indexOf(this.value)===0&&(this.append(a.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,n}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const s=this.state,a=e(this);return this.state=s,delete this._isolated,a}doSkipInvalid(e,s,a){return!!this.skipInvalid}doPrepare(e,s){return s===void 0&&(s={}),q.normalize(this.prepare?this.prepare(e,this,s):e)}doPrepareChar(e,s){return s===void 0&&(s={}),q.normalize(this.prepareChar?this.prepareChar(e,this,s):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,s,a,n,r){a===void 0&&(a=""),n===void 0&&(n=F.NONE),r===void 0&&(r={input:!0});const i=e+s,o=this.extractTail(i),c=this.eager===!0||this.eager==="remove";let d;c&&(n=Qa(n),d=this.extractInput(0,i,{raw:!0}));let f=e;const g=new q;if(n!==F.NONE&&(f=this.nearestInputPos(e,s>1&&e!==0&&!c?F.NONE:n),g.tailShift=f-e),g.aggregate(this.remove(f)),c&&n!==F.NONE&&d===this.rawInputValue)if(n===F.FORCE_LEFT){let k;for(;d===this.rawInputValue&&(k=this.displayValue.length);)g.aggregate(new q({tailShift:-1})).aggregate(this.remove(k-1))}else n===F.FORCE_RIGHT&&o.unshift();return g.aggregate(this.append(a,r,o))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!ut(this,e)}typedValueEquals(e){const s=this.typedValue;return e===s||ne.EMPTY_VALUES.includes(e)&&ne.EMPTY_VALUES.includes(s)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new q}}ne.DEFAULTS={skipInvalid:!0},ne.EMPTY_VALUES=[void 0,null,""],B.Masked=ne;class Pe{constructor(e,s){e===void 0&&(e=[]),s===void 0&&(s=0),this.chunks=e,this.from=s}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=Ve(e)?new Fe(String(e)):e;const s=this.chunks[this.chunks.length-1],a=s&&(s.stop===e.stop||e.stop==null)&&e.from===s.from+s.toString().length;if(e instanceof Fe)a?s.extend(e.toString()):this.chunks.push(e);else if(e instanceof Pe){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 B.MaskedPattern))return new Fe(this.toString()).appendTo(e);const s=new q;for(let a=0;a<this.chunks.length;++a){const n=this.chunks[a],r=e._mapPosToBlock(e.displayValue.length),i=n.stop;let o;if(i!=null&&(!r||r.index<=i)&&((n instanceof Pe||e._stops.indexOf(i)>=0)&&s.aggregate(e._appendPlaceholder(i)),o=n instanceof Pe&&e._blocks[i]),o){const c=o.appendTail(n);s.aggregate(c);const d=n.toString().slice(c.rawInserted.length);d&&s.aggregate(e.append(d,{tail:!0}))}else s.aggregate(e.append(n.toString(),{tail:!0}))}return s}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:s,...a}=e;Object.assign(this,a),this.chunks=s.map(n=>{const r="chunks"in n?new Pe:new Fe;return r.state=n,r})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const s=e!=null?e-this.from:e;let a=0;for(;a<this.chunks.length;){const n=this.chunks[a],r=n.unshift(s);if(n.toString()){if(!r)break;++a}else this.chunks.splice(a,1);if(r)return r}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const s=this.chunks[e],a=s.shift();if(s.toString()){if(!a)break;--e}else this.chunks.splice(e,1);if(a)return a}return""}}class an{constructor(e,s){this.masked=e,this._log=[];const{offset:a,index:n}=e._mapPosToBlock(s)||(s<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=a,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=((s=this.block)==null?void 0:s.displayValue.length)||0){var s;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,F.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,F.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,F.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,F.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,F.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,F.NONE),!0})}}class fa{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,s){return e===void 0&&(e=0),s===void 0&&(s=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(s),this._value||(this._isRawInput=!1),new q}nearestInputPos(e,s){s===void 0&&(s=F.NONE);const a=0,n=this._value.length;switch(s){case F.LEFT:case F.FORCE_LEFT:return a;case F.NONE:case F.RIGHT:case F.FORCE_RIGHT:default:return n}}totalInputPositions(e,s){return e===void 0&&(e=0),s===void 0&&(s=this._value.length),this._isRawInput?s-e:0}extractInput(e,s,a){return e===void 0&&(e=0),s===void 0&&(s=this._value.length),a===void 0&&(a={}),a.raw&&this._isRawInput&&this._value.slice(e,s)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,s){if(s===void 0&&(s={}),this.isFilled)return new q;const a=this.eager===!0||this.eager==="append",r=this.char===e&&(this.isUnmasking||s.input||s.raw)&&(!s.raw||!a)&&!s.tail,i=new q({inserted:this.char,rawInserted:r?this.char:""});return this._value=this.char,this._isRawInput=r&&(s.raw||s.input),i}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new q;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new Fe("")}appendTail(e){return Ve(e)&&(e=new Fe(String(e))),e.appendTo(this)}append(e,s,a){const n=this._appendChar(e[0],s);return a!=null&&(n.tailShift+=this.appendTail(a).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 pt{constructor(e){const{parent:s,isOptional:a,placeholderChar:n,displayChar:r,lazy:i,eager:o,...c}=e;this.masked=xe(c),Object.assign(this,{parent:s,isOptional:a,placeholderChar:n,displayChar:r,lazy:i,eager:o})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.value.length),e===0&&s>=1?(this.isFilled=!1,this.masked.remove(e,s)):new q}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,s){if(s===void 0&&(s={}),this.isFilled)return new q;const a=this.masked.state;let n=this.masked._appendChar(e,this.currentMaskFlags(s));return n.inserted&&this.doValidate(s)===!1&&(n=new q,this.masked.state=a),!n.inserted&&!this.isOptional&&!this.lazy&&!s.input&&(n.inserted=this.placeholderChar),n.skip=!n.inserted&&!this.isOptional,this.isFilled=!!n.inserted,n}append(e,s,a){return this.masked.append(e,this.currentMaskFlags(s),a)}_appendPlaceholder(){return this.isFilled||this.isOptional?new q:(this.isFilled=!0,new q({inserted:this.placeholderChar}))}_appendEager(){return new q}extractTail(e,s){return this.masked.extractTail(e,s)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,s,a){return e===void 0&&(e=0),s===void 0&&(s=this.value.length),this.masked.extractInput(e,s,a)}nearestInputPos(e,s){s===void 0&&(s=F.NONE);const a=0,n=this.value.length,r=Math.min(Math.max(e,a),n);switch(s){case F.LEFT:case F.FORCE_LEFT:return this.isComplete?r:a;case F.RIGHT:case F.FORCE_RIGHT:return this.isComplete?r:n;case F.NONE:default:return r}}totalInputPositions(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.value.length),this.value.slice(e,s).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 s;return{...e,_beforeTailState:(e==null||(s=e._beforeTailState)==null?void 0:s.masked)||(e==null?void 0:e._beforeTailState)}}pad(e){return new q}}pt.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 nn extends ne{updateOptions(e){super.updateOptions(e)}_update(e){const s=e.mask;s&&(e.validate=a=>a.search(s)>=0),super._update(e)}}B.MaskedRegExp=nn;class re extends ne{constructor(e){super({...re.DEFAULTS,...e,definitions:Object.assign({},pt.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 s=this.mask;if(!s||!e)return;let a=!1,n=!1;for(let r=0;r<s.length;++r){if(this.blocks){const d=s.slice(r),f=Object.keys(this.blocks).filter(k=>d.indexOf(k)===0);f.sort((k,E)=>E.length-k.length);const g=f[0];if(g){const{expose:k,repeat:E,...C}=et(this.blocks[g]),_={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...C,repeat:E,parent:this},m=E!=null?new B.RepeatBlock(_):xe(_);m&&(this._blocks.push(m),k&&(this.exposeBlock=m),this._maskedBlocks[g]||(this._maskedBlocks[g]=[]),this._maskedBlocks[g].push(this._blocks.length-1)),r+=g.length-1;continue}}let i=s[r],o=i in e;if(i===re.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(i==="{"||i==="}"){a=!a;continue}if(i==="["||i==="]"){n=!n;continue}if(i===re.ESCAPE_CHAR){if(++r,i=s[r],!i)break;o=!1}const c=o?new pt({isOptional:n,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...et(e[i]),parent:this}):new fa({char:i,eager:this.eager,isUnmasking:a});this._blocks.push(c)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e){this.reset();return}const{_blocks:s,...a}=e;this._blocks.forEach((n,r)=>n.state=s[r]),super.state=a}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,s)=>e+=s.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const s=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(s),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,s)=>e+=s.value,"")}set value(e){if(this.exposeBlock){const s=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(s),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const s=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(s),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,s)=>e+=s.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const s=new q;let a=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(a==null)return s;this._blocks[a].isFilled&&++a;for(let n=a;n<this._blocks.length;++n){const r=this._blocks[n]._appendEager();if(!r.inserted)break;s.aggregate(r)}return s}_appendCharRaw(e,s){s===void 0&&(s={});const a=this._mapPosToBlock(this.displayValue.length),n=new q;if(!a)return n;for(let i=a.index,o;o=this._blocks[i];++i){var r;const c=o._appendChar(e,{...s,_beforeTailState:(r=s._beforeTailState)==null||(r=r._blocks)==null?void 0:r[i]});if(n.aggregate(c),c.consumed)break}return n}extractTail(e,s){e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length);const a=new Pe;return e===s||this._forEachBlocksInRange(e,s,(n,r,i,o)=>{const c=n.extractTail(i,o);c.stop=this._findStopBefore(r),c.from=this._blockStartPos(r),c instanceof Pe&&(c.blockIndex=r),a.extend(c)}),a}extractInput(e,s,a){if(e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),a===void 0&&(a={}),e===s)return"";let n="";return this._forEachBlocksInRange(e,s,(r,i,o,c)=>{n+=r.extractInput(o,c,a)}),n}_findStopBefore(e){let s;for(let a=0;a<this._stops.length;++a){const n=this._stops[a];if(n<=e)s=n;else break}return s}_appendPlaceholder(e){const s=new q;if(this.lazy&&e==null)return s;const a=this._mapPosToBlock(this.displayValue.length);if(!a)return s;const n=a.index,r=e??this._blocks.length;return this._blocks.slice(n,r).forEach(i=>{if(!i.lazy||e!=null){var o;s.aggregate(i._appendPlaceholder((o=i._blocks)==null?void 0:o.length))}}),s}_mapPosToBlock(e){let s="";for(let a=0;a<this._blocks.length;++a){const n=this._blocks[a],r=s.length;if(s+=n.displayValue,e<=s.length)return{index:a,offset:e-r}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((s,a)=>s+=a.displayValue.length,0)}_forEachBlocksInRange(e,s,a){s===void 0&&(s=this.displayValue.length);const n=this._mapPosToBlock(e);if(n){const r=this._mapPosToBlock(s),i=r&&n.index===r.index,o=n.offset,c=r&&i?r.offset:this._blocks[n.index].displayValue.length;if(a(this._blocks[n.index],n.index,o,c),r&&!i){for(let d=n.index+1;d<r.index;++d)a(this._blocks[d],d,0,this._blocks[d].displayValue.length);a(this._blocks[r.index],r.index,0,r.offset)}}}remove(e,s){e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length);const a=super.remove(e,s);return this._forEachBlocksInRange(e,s,(n,r,i,o)=>{a.aggregate(n.remove(i,o))}),a}nearestInputPos(e,s){if(s===void 0&&(s=F.NONE),!this._blocks.length)return 0;const a=new an(this,e);if(s===F.NONE)return a.pushRightBeforeInput()||(a.popState(),a.pushLeftBeforeInput())?a.pos:this.displayValue.length;if(s===F.LEFT||s===F.FORCE_LEFT){if(s===F.LEFT){if(a.pushRightBeforeFilled(),a.ok&&a.pos===e)return e;a.popState()}if(a.pushLeftBeforeInput(),a.pushLeftBeforeRequired(),a.pushLeftBeforeFilled(),s===F.LEFT){if(a.pushRightBeforeInput(),a.pushRightBeforeRequired(),a.ok&&a.pos<=e||(a.popState(),a.ok&&a.pos<=e))return a.pos;a.popState()}return a.ok?a.pos:s===F.FORCE_LEFT?0:(a.popState(),a.ok||(a.popState(),a.ok)?a.pos:0)}return s===F.RIGHT||s===F.FORCE_RIGHT?(a.pushRightBeforeInput(),a.pushRightBeforeRequired(),a.pushRightBeforeFilled()?a.pos:s===F.FORCE_RIGHT?this.displayValue.length:(a.popState(),a.ok||(a.popState(),a.ok)?a.pos:this.nearestInputPos(e,F.LEFT))):e}totalInputPositions(e,s){e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length);let a=0;return this._forEachBlocksInRange(e,s,(n,r,i,o)=>{a+=n.totalInputPositions(i,o)}),a}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const s=this._maskedBlocks[e];return s?s.map(a=>this._blocks[a]):[]}pad(e){const s=new q;return this._forEachBlocksInRange(0,this.displayValue.length,a=>s.aggregate(a.pad(e))),s}}re.DEFAULTS={...ne.DEFAULTS,lazy:!0,placeholderChar:"_"},re.STOP_CHAR="`",re.ESCAPE_CHAR="\\",re.InputDefinition=pt,re.FixedDefinition=fa,B.MaskedPattern=re;class ht extends re{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:s=this.to||0,from:a=this.from||0,maxLength:n=this.maxLength||0,autofix:r=this.autofix,...i}=e;this.to=s,this.from=a,this.maxLength=Math.max(String(s).length,n),this.autofix=r;const o=String(this.from).padStart(this.maxLength,"0"),c=String(this.to).padStart(this.maxLength,"0");let d=0;for(;d<c.length&&c[d]===o[d];)++d;i.mask=c.slice(0,d).replace(/0/g,"\\0")+"0".repeat(this.maxLength-d),super._update(i)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let s="",a="";const[,n,r]=e.match(/^(\D*)(\d*)(\D*)/)||[];return r&&(s="0".repeat(n.length)+r,a="9".repeat(n.length)+r),s=s.padEnd(this.maxLength,"0"),a=a.padEnd(this.maxLength,"9"),[s,a]}doPrepareChar(e,s){s===void 0&&(s={});let a;return[e,a]=super.doPrepareChar(e.replace(/\D/g,""),s),e||(a.skip=!this.isComplete),[e,a]}_appendCharRaw(e,s){if(s===void 0&&(s={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,s);const a=String(this.from).padStart(this.maxLength,"0"),n=String(this.to).padStart(this.maxLength,"0"),[r,i]=this.boundaries(this.value+e);return Number(i)<this.from?super._appendCharRaw(a[this.value.length],s):Number(r)>this.to?!s.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(a[this.value.length],s).aggregate(this._appendCharRaw(e,s)):super._appendCharRaw(n[this.value.length],s):super._appendCharRaw(e,s)}doValidate(e){const s=this.value;if(s.search(/[^0]/)===-1&&s.length<=this._matchFrom)return!0;const[n,r]=this.boundaries(s);return this.from<=Number(r)&&Number(n)<=this.to&&super.doValidate(e)}pad(e){const s=new q;if(this.value.length===this.maxLength)return s;const a=this.value,n=this.maxLength-this.value.length;if(n){this.reset();for(let r=0;r<n;++r)s.aggregate(super._appendCharRaw("0",e));a.split("").forEach(r=>this._appendCharRaw(r))}return s}}B.MaskedRange=ht;const rn="d{.}`m{.}`Y";class Be extends re{static extractPatternOptions(e){const{mask:s,pattern:a,...n}=e;return{...n,mask:Ve(s)?s:a}}constructor(e){super(Be.extractPatternOptions({...Be.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:s,pattern:a,blocks:n,...r}={...Be.DEFAULTS,...e},i=Object.assign({},Be.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({...r,mask:Ve(s)?s:a,blocks:i})}doValidate(e){const s=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&s!=null&&(this.min==null||this.min<=s)&&(this.max==null||s<=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(Be.extractPatternOptions(e))}}Be.GET_DEFAULT_BLOCKS=()=>({d:{mask:ht,from:1,to:31,maxLength:2},m:{mask:ht,from:1,to:12,maxLength:2},Y:{mask:ht,from:1900,to:9999}}),Be.DEFAULTS={...re.DEFAULTS,mask:Date,pattern:rn,format:(t,e)=>{if(!t)return"";const s=String(t.getDate()).padStart(2,"0"),a=String(t.getMonth()+1).padStart(2,"0"),n=t.getFullYear();return[s,a,n].join(".")},parse:(t,e)=>{const[s,a,n]=t.split(".").map(Number);return new Date(n,a-1,s)}},B.MaskedDate=Be;class ft extends ne{constructor(e){super({...ft.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(s=>{const{expose:a,...n}=et(s),r=xe({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...n});return a&&(this.exposeMask=r),r}):[])}_appendCharRaw(e,s){s===void 0&&(s={});const a=this._applyDispatch(e,s);return this.currentMask&&a.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(s))),a}_applyDispatch(e,s,a){e===void 0&&(e=""),s===void 0&&(s={}),a===void 0&&(a="");const n=s.tail&&s._beforeTailState!=null?s._beforeTailState._value:this.value,r=this.rawInputValue,i=s.tail&&s._beforeTailState!=null?s._beforeTailState._rawInputValue:r,o=r.slice(i.length),c=this.currentMask,d=new q,f=c==null?void 0:c.state;return this.currentMask=this.doDispatch(e,{...s},a),this.currentMask&&(this.currentMask!==c?(this.currentMask.reset(),i&&(this.currentMask.append(i,{raw:!0}),d.tailShift=this.currentMask.value.length-n.length),o&&(d.tailShift+=this.currentMask.append(o,{raw:!0,tail:!0}).tailShift)):f&&(this.currentMask.state=f)),d}_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 s=new q;return e&&s.aggregate(this._applyDispatch("",{},e)),s.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var s,a;return{...e,_beforeTailState:((s=e._beforeTailState)==null?void 0:s.currentMaskRef)===this.currentMask&&((a=e._beforeTailState)==null?void 0:a.currentMask)||e._beforeTailState}}doDispatch(e,s,a){return s===void 0&&(s={}),a===void 0&&(a=""),this.dispatch(e,this,s,a)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,s){s===void 0&&(s={});let[a,n]=super.doPrepare(e,s);if(this.currentMask){let r;[a,r]=super.doPrepare(a,this.currentMaskFlags(s)),n=n.aggregate(r)}return[a,n]}doPrepareChar(e,s){s===void 0&&(s={});let[a,n]=super.doPrepareChar(e,s);if(this.currentMask){let r;[a,r]=super.doPrepareChar(a,this.currentMaskFlags(s)),n=n.aggregate(r)}return[a,n]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(s=>s.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 s=String(e);this.currentMask&&(this.currentMask.typedValue=e,s=this.currentMask.unmaskedValue),this.unmaskedValue=s}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,s){const a=new q;return this.currentMask&&a.aggregate(this.currentMask.remove(e,s)).aggregate(this._applyDispatch()),a}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(s=>s.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:s,currentMaskRef:a,currentMask:n,...r}=e;s&&this.compiledMasks.forEach((i,o)=>i.state=s[o]),a!=null&&(this.currentMask=a,this.currentMask.state=n),super.state=r}extractInput(e,s,a){return this.currentMask?this.currentMask.extractInput(e,s,a):""}extractTail(e,s){return this.currentMask?this.currentMask.extractTail(e,s):super.extractTail(e,s)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,s){return this.currentMask?this.currentMask.nearestInputPos(e,s):super.nearestInputPos(e,s)}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((s,a)=>{if(!e[a])return;const{mask:n,...r}=e[a];return ut(s,r)&&s.maskEquals(n)}):super.maskEquals(e)}typedValueEquals(e){var s;return!!((s=this.currentMask)!=null&&s.typedValueEquals(e))}}ft.DEFAULTS={...ne.DEFAULTS,dispatch:(t,e,s,a)=>{if(!e.compiledMasks.length)return;const n=e.rawInputValue,r=e.compiledMasks.map((i,o)=>{const c=e.currentMask===i,d=c?i.displayValue.length:i.nearestInputPos(i.displayValue.length,F.FORCE_LEFT);return i.rawInputValue!==n?(i.reset(),i.append(n,{raw:!0})):c||i.remove(d),i.append(t,e.currentMaskFlags(s)),i.appendTail(a),{index:o,weight:i.rawInputValue.length,totalInputPositions:i.totalInputPositions(0,Math.max(d,i.nearestInputPos(i.displayValue.length,F.FORCE_LEFT)))}});return r.sort((i,o)=>o.weight-i.weight||o.totalInputPositions-i.totalInputPositions),e.compiledMasks[r[0].index]}},B.MaskedDynamic=ft;class gt extends re{constructor(e){super({...gt.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:s,...a}=e;if(s){const n=s.map(o=>o.length),r=Math.min(...n),i=Math.max(...n)-r;a.mask="*".repeat(r),i&&(a.mask+="["+"*".repeat(i)+"]"),this.enum=s}super._update(a)}_appendCharRaw(e,s){s===void 0&&(s={});const a=Math.min(this.nearestInputPos(0,F.FORCE_RIGHT),this.value.length),n=this.enum.filter(r=>this.matchValue(r,this.unmaskedValue+e,a));if(n.length){n.length===1&&this._forEachBlocksInRange(0,this.value.length,(i,o)=>{const c=n[0][o];o>=this.value.length||c===i.value||(i.reset(),i._appendChar(c,s))});const r=super._appendCharRaw(n[0][this.value.length],s);return n.length===1&&n[0].slice(this.unmaskedValue.length).split("").forEach(i=>r.aggregate(super._appendCharRaw(i))),r}return new q({skip:!this.isComplete})}extractTail(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),new Fe("",e)}remove(e,s){if(e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),e===s)return new q;const a=Math.min(super.nearestInputPos(0,F.FORCE_RIGHT),this.value.length);let n;for(n=e;n>=0&&!(this.enum.filter(o=>this.matchValue(o,this.value.slice(a,n),a)).length>1);--n);const r=super.remove(n,s);return r.tailShift+=n-e,r}get isComplete(){return this.enum.indexOf(this.value)>=0}}gt.DEFAULTS={...re.DEFAULTS,matchValue:(t,e,s)=>t.indexOf(e,s)===s},B.MaskedEnum=gt;class ln extends ne{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}B.MaskedFunction=ln;var ga;class fe extends ne{constructor(e){super({...fe.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),s="\\d*",a=(this.scale?"("+Qt(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+s+a),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(Qt).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(Qt(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const s=e.split(this.radix);return s[0]=s[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),s.join(this.radix)}doPrepareChar(e,s){s===void 0&&(s={});const[a,n]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(s.input&&s.raw||!s.input&&!s.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),s);return e&&!a&&(n.skip=!0),a&&!this.allowPositive&&!this.value&&a!=="-"&&n.aggregate(this._appendChar("-")),[a,n]}_separatorsCount(e,s){s===void 0&&(s=!1);let a=0;for(let n=0;n<e;++n)this._value.indexOf(this.thousandsSeparator,n)===n&&(++a,s&&(e+=this.thousandsSeparator.length));return a}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,s,a){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),[e,s]=this._adjustRangeWithSeparators(e,s),this._removeThousandsSeparators(super.extractInput(e,s,a))}_appendCharRaw(e,s){s===void 0&&(s={});const a=s.tail&&s._beforeTailState?s._beforeTailState._value:this._value,n=this._separatorsCountFromSlice(a);this._value=this._removeThousandsSeparators(this.value);const r=this._value;this._value+=e;const i=this.number;let o=!isNaN(i),c=!1;if(o){let k;this.min!=null&&this.min<0&&this.number<this.min&&(k=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(k=this.max),k!=null&&(this.autofix?(this._value=this.format(k,this).replace(fe.UNMASKED_RADIX,this.radix),c||(c=r===this._value&&!s.tail)):o=!1),o&&(o=!!this._value.match(this._numberRegExp))}let d;o?d=new q({inserted:this._value.slice(r.length),rawInserted:c?"":e,skip:c}):(this._value=r,d=new q),this._value=this._insertThousandsSeparators(this._value);const f=s.tail&&s._beforeTailState?s._beforeTailState._value:this._value,g=this._separatorsCountFromSlice(f);return d.tailShift+=(g-n)*this.thousandsSeparator.length,d}_findSeparatorAround(e){if(this.thousandsSeparator){const s=e-this.thousandsSeparator.length+1,a=this.value.indexOf(this.thousandsSeparator,s);if(a<=e)return a}return-1}_adjustRangeWithSeparators(e,s){const a=this._findSeparatorAround(e);a>=0&&(e=a);const n=this._findSeparatorAround(s);return n>=0&&(s=n+this.thousandsSeparator.length),[e,s]}remove(e,s){e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),[e,s]=this._adjustRangeWithSeparators(e,s);const a=this.value.slice(0,e),n=this.value.slice(s),r=this._separatorsCount(a.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(a+n));const i=this._separatorsCountFromSlice(a);return new q({tailShift:(i-r)*this.thousandsSeparator.length})}nearestInputPos(e,s){if(!this.thousandsSeparator)return e;switch(s){case F.NONE:case F.LEFT:case F.FORCE_LEFT:{const a=this._findSeparatorAround(e-1);if(a>=0){const n=a+this.thousandsSeparator.length;if(e<n||this.value.length<=n||s===F.FORCE_LEFT)return a}break}case F.RIGHT:case F.FORCE_RIGHT:{const a=this._findSeparatorAround(e);if(a>=0)return a+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let s=e;this.min!=null&&(s=Math.max(s,this.min)),this.max!=null&&(s=Math.min(s,this.max)),s!==e&&(this.unmaskedValue=this.format(s,this));let a=this.value;this.normalizeZeros&&(a=this._normalizeZeros(a)),this.padFractionalZeros&&this.scale>0&&(a=this._padFractionalZeros(a)),this._value=a}super.doCommit()}_normalizeZeros(e){const s=this._removeThousandsSeparators(e).split(this.radix);return s[0]=s[0].replace(/^(\D*)(0*)(\d*)/,(a,n,r,i)=>n+i),e.length&&!/\d$/.test(s[0])&&(s[0]=s[0]+"0"),s.length>1&&(s[1]=s[1].replace(/0*$/,""),s[1].length||(s.length=1)),this._insertThousandsSeparators(s.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const s=e.split(this.radix);return s.length<2&&s.push(""),s[1]=s[1].padEnd(this.scale,"0"),s.join(this.radix)}doSkipInvalid(e,s,a){s===void 0&&(s={});const n=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===fe.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,s,a)&&!n}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,fe.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(fe.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)||fe.EMPTY_VALUES.includes(e)&&fe.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}ga=fe,fe.UNMASKED_RADIX=".",fe.EMPTY_VALUES=[...ne.EMPTY_VALUES,0],fe.DEFAULTS={...ne.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[ga.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})},B.MaskedNumber=fe;const es={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function ma(t,e,s){e===void 0&&(e=es.MASKED),s===void 0&&(s=es.MASKED);const a=xe(t);return n=>a.runIsolated(r=>(r[e]=n,r[s]))}function on(t,e,s,a){return ma(e,s,a)(t)}B.PIPE_TYPE=es,B.createPipe=ma,B.pipe=on;class un extends re{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 s,a,n;const{repeat:r,...i}=et(e);this._blockOpts=Object.assign({},this._blockOpts,i);const o=xe(this._blockOpts);this.repeat=(s=(a=r??o.repeat)!=null?a:this.repeat)!=null?s: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(xe(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(e,s){s===void 0&&(s={});const a=new q;for(let c=(n=(r=this._mapPosToBlock(this.displayValue.length))==null?void 0:r.index)!=null?n:Math.max(this._blocks.length-1,0),d,f;d=(i=this._blocks[c])!=null?i:f=!f&&this._allocateBlock(c);++c){var n,r,i,o;const g=d._appendChar(e,{...s,_beforeTailState:(o=s._beforeTailState)==null||(o=o._blocks)==null?void 0:o[c]});if(g.skip&&f){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(a.aggregate(g),g.consumed)break}return a}_trimEmptyTail(e,s){var a,n;e===void 0&&(e=0);const r=Math.max(((a=this._mapPosToBlock(e))==null?void 0:a.index)||0,this.repeatFrom,0);let i;s!=null&&(i=(n=this._mapPosToBlock(s))==null?void 0:n.index),i==null&&(i=this._blocks.length-1);let o=0;for(let c=i;r<=c&&!this._blocks[c].unmaskedValue;--c,++o);o&&(this._blocks.splice(i-o+1,o),this.mask=this.mask.slice(o))}reset(){super.reset(),this._trimEmptyTail()}remove(e,s){e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length);const a=super.remove(e,s);return this._trimEmptyTail(e,s),a}totalInputPositions(e,s){return e===void 0&&(e=0),s==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,s)}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}}B.RepeatBlock=un;try{globalThis.IMask=B}catch{}const va={mask:l.oneOfType([l.array,l.func,l.string,l.instanceOf(RegExp),l.oneOf([Date,Number,B.Masked]),l.instanceOf(B.Masked)]),value:l.any,unmask:l.oneOfType([l.bool,l.oneOf(["typed"])]),prepare:l.func,prepareChar:l.func,validate:l.func,commit:l.func,overwrite:l.oneOfType([l.bool,l.oneOf(["shift"])]),eager:l.oneOfType([l.bool,l.oneOf(["append","remove"])]),skipInvalid:l.bool,onAccept:l.func,onComplete:l.func,placeholderChar:l.string,displayChar:l.string,lazy:l.bool,definitions:l.object,blocks:l.object,enum:l.arrayOf(l.string),maxLength:l.number,from:l.number,to:l.number,pattern:l.string,format:l.func,parse:l.func,autofix:l.oneOfType([l.bool,l.oneOf(["pad"])]),radix:l.string,thousandsSeparator:l.string,mapToRadix:l.arrayOf(l.string),scale:l.number,normalizeZeros:l.bool,padFractionalZeros:l.bool,min:l.oneOfType([l.number,l.instanceOf(Date)]),max:l.oneOfType([l.number,l.instanceOf(Date)]),dispatch:l.func,inputRef:l.oneOfType([l.func,l.shape({current:l.object})])},ya=Object.keys(va).filter(t=>t!=="value"),cn=["value","unmask","onAccept","onComplete","inputRef"],dn=ya.filter(t=>cn.indexOf(t)<0);function pn(t){var e;const s=(e=class extends v.Component{constructor(r){super(r),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const r=this.props,i=this._extractMaskOptionsFromProps(r);if(i.mask)this.maskRef?(this.maskRef.updateOptions(i),"value"in r&&r.value!==void 0&&(this.maskValue=r.value)):this.initMask(i);else if(this.destroyMask(),"value"in r&&r.value!==void 0){var o;(o=this.element)!=null&&o.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=r.value:this.element.value=r.value}}componentWillUnmount(){this.destroyMask()}_inputRef(r){this.element=r,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=r:this.props.inputRef(r))}initMask(r){r===void 0&&(r=this._extractMaskOptionsFromProps(this.props)),this.maskRef=B(this.element,r).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(r){const{...i}=r;return Object.keys(i).filter(o=>dn.indexOf(o)<0).forEach(o=>{delete i[o]}),i}_extractNonMaskProps(r){const{...i}=r;return ya.forEach(o=>{o!=="maxLength"&&delete i[o]}),"defaultValue"in i||(i.defaultValue=r.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(r){this.maskRef&&(r=r==null&&this.props.unmask!=="typed"?"":r,this.props.unmask==="typed"?this.maskRef.typedValue=r:this.props.unmask?this.maskRef.unmaskedValue=r:this.maskRef.value=r)}_onAccept(r){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,r)}_onComplete(r){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,r)}render(){return v.createElement(t,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}},e.displayName=void 0,e.propTypes=void 0,e),a=t.displayName||t.name||"Component";return s.displayName="IMask("+a+")",s.propTypes=va,v.forwardRef((n,r)=>v.createElement(s,{...n,ref:r}))}const hn=pn(t=>{let{inputRef:e,...s}=t;return v.createElement("input",{...s,ref:e})}),fn=(t,e)=>v.createElement(hn,{...t,ref:e});v.forwardRef(fn);function gn(t,e){let{onAccept:s,onComplete:a,ref:n=v.useRef(null),defaultValue:r,defaultUnmaskedValue:i,defaultTypedValue:o}=e===void 0?{}:e;const c=v.useRef(null),[d,f]=v.useState({}),[g,k]=v.useState(""),[E,C]=v.useState(""),[_,m]=v.useState(),w=v.useCallback(()=>{var h;(h=c.current)==null||h.destroy(),c.current=null},[]),N=v.useCallback(()=>{const h=c.current;h&&(f({value:h.value,unmaskedValue:h.unmaskedValue,typedValue:h.typedValue}),m(h.typedValue),C(h.unmaskedValue),k(h.value))},[]),T=v.useCallback(h=>{const I=c.current;I&&(N(),s==null||s(I.value,I,h))},[s]),D=v.useCallback(h=>c.current&&(a==null?void 0:a(c.current.value,c.current,h)),[a]);return v.useEffect(()=>{const{value:h,...I}=d,M=c.current;!M||g===void 0||(h!==g&&(M.value=g,M.value!==g&&T()),f(I))},[g]),v.useEffect(()=>{const{unmaskedValue:h,...I}=d,M=c.current;!M||E===void 0||(h!==E&&(M.unmaskedValue=E,M.unmaskedValue!==E&&T()),f(I))},[E]),v.useEffect(()=>{const{typedValue:h,...I}=d,M=c.current;!M||_===void 0||(h!==_&&(M.typedValue=_,M.masked.typedValueEquals(_)||T()),f(I))},[_]),v.useEffect(()=>{const h=n.current;if(!h||!(t!=null&&t.mask))return w();const I=c.current;I?I==null||I.updateOptions(t):h&&t!=null&&t.mask&&(c.current=B(h,t),N(),r!==void 0&&k(r),i!==void 0&&C(i),o!==void 0&&m(o))},[t,w,T]),v.useEffect(()=>{if(!c.current)return;const h=c.current;return h.on("accept",T),h.on("complete",D),()=>{h.off("accept",T),h.off("complete",D)}},[T,D]),v.useEffect(()=>w,[w]),{ref:n,maskRef:c,value:g,setValue:k,unmaskedValue:E,setUnmaskedValue:C,typedValue:_,setTypedValue:m}}var ts=(t=>(t.Text="text",t.Password="password",t.Email="email",t.Date="date",t.Number="number",t))(ts||{}),ss=(t=>(t.Small="small",t.Medium="medium",t.Large="large",t))(ss||{}),as=(t=>(t.Default="",t.Error="error",t.Success="success",t))(as||{}),ns=(t=>(t.Center="center",t.End="end",t.Initial="initial",t))(ns||{}),rs=(t=>(t.Top="top",t.Right="right",t.Bottom="bottom",t.Left="left",t))(rs||{});const G={name:"Input",class:"ds-input",props:{name:{type:String,required:!0},testId:{type:String,default:"ds-input-test"},type:{type:String,default:"text",options:Object.values(ts)},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},size:{type:String,default:"medium",options:Object.values(ss)},label:{type:String,default:""},placeholder:{type:String,default:" "},value:{type:String,default:""},min:{type:String,default:""},max:{type:String,default:""},status:{type:String,default:"",options:Object.values(as)},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:"center",options:Object.values(ns)},tooltipPosition:{type:String,default:"top",options:Object.values(rs)},mask:{type:String,default:""},onChangeHandler:{type:Function,default:()=>({})}}},_a={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:"AA.AAA.AAA/AAAA-AA",definitions:{A:/[0-9A-Z]/},prepareChar:t=>t.toUpperCase(),startsWith:/[A-Z0-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]}};var is=(t=>(t.Top="top",t.Right="right",t.Bottom="bottom",t.Left="left",t))(is||{}),ls=(t=>(t.Center="center",t.End="end",t.Initial="initial",t))(ls||{});const Ae={name:"Tooltip",class:"ds-tooltip",props:{position:{type:String,default:"top",options:Object.values(is)},placement:{type:String,default:"center",options:Object.values(ls)},text:{type:String,default:""},testId:{type:String,default:"ds-tooltip"}}},qe=({children:t,position:e=Ae.props.position.default,placement:s=Ae.props.placement.default,text:a=Ae.props.text.default,testId:n=Ae.props.testId.default,className:r})=>{const i=v.useRef(null),[o,c]=v.useState(0),[d,f]=v.useState(0),[g,k]=v.useState(!1),E=e&&Ae.props.position.options.find(w=>w===e)&&`${Ae.class}--${e}`,C=s&&Ae.props.placement.options.find(w=>w===s)&&`${Ae.class}--${s}`;let _;v.useLayoutEffect(()=>{var w,N;i.current&&(c((w=i==null?void 0:i.current)==null?void 0:w.offsetHeight),f((N=i==null?void 0:i.current)==null?void 0:N.offsetWidth))},[]);const m=9;switch(e){case"top":s==="initial"?_={bottom:o+m,left:-m}:s==="end"?_={bottom:o+m,right:-m}:_={bottom:o+m,left:"50%",transform:"translateX(-50%)"};break;case"bottom":s==="initial"?_={top:o+m,left:-m}:s==="end"?_={top:o+m,right:-m}:_={top:o+m,left:"50%",transform:"translateX(-50%)"};break;case"left":s==="initial"?_={right:d+m,top:-m}:s==="end"?_={right:d+m,bottom:-m}:_={right:d+m,top:"50%",transform:"translateY(-50%)"};break;case"right":s==="initial"?_={left:d+m,top:-m}:s==="end"?_={left:d+m,bottom:-m}:_={left:d+m,top:"50%",transform:"translateY(-50%)"};break}return u.jsxs("div",{className:[Ae.class,r].join(" "),"data-testid":n,onMouseEnter:()=>k(!0),onMouseLeave:()=>k(!1),ref:i,role:"tooltip",children:[t,g&&u.jsx("div",{className:[E,C].filter(w=>w).join(" "),children:u.jsx("span",{className:`${Ae.class}__wrapper`,"data-testid":"ds-tooltip-wrapper",style:_,children:a})})]})};qe.propTypes={position:l.string,placement:l.string,text:l.oneOfType([l.string,l.node]),testId:l.string},qe.displayName="DsTooltip";const Ye=v.forwardRef(({name:t,testId:e=G.props.testId.default,type:s=G.props.type.default,animated:a=G.props.animated.default,size:n=G.props.size.default,label:r,placeholder:i,value:o,min:c,max:d,tooltip:f=G.props.tooltip.default,tooltipPosition:g=G.props.tooltipPosition.default,tooltipPlacement:k=G.props.tooltipPlacement.default,icon:E=G.props.icon.default,status:C=G.props.status.default,feedback:_,hasFeedback:m=G.props.hasFeedback.default,noMargin:w=G.props.noMargin.default,disabled:N=G.props.disabled.default,className:T,mask:D,onChangeHandler:h=G.props.onChangeHandler.default,onBlurHandler:I,onKeyDownHandler:M,onFocusHandler:W},z)=>{const[se,ue]=v.useState(!1),[ce,De]=v.useState(!1),ye=!!h&&!!D,_e=(S,x,Z)=>{if(ye&&Z){const b={...Z,target:{...Z.target,name:t,maskedValue:S,value:x.unmaskedValue,type:"text"}};h(b)}},le=v.useMemo(()=>typeof D=="object"?{lazy:!0,...D}:_a[D]?{..._a[D],min:c,max:d,lazy:!0}:{mask:D??"",min:c,max:d,lazy:!0},[D]),{ref:ke,setUnmaskedValue:Ce}=gn(le,{onAccept:_e}),be=S=>{h&&!ye&&h(S)},y=S=>{M&&M(S)},A=S=>{ue(!1),I&&I(S)},j=S=>{ue(!0),W&&W(S)},V=()=>{De(S=>!S)},$=v.useMemo(()=>ce&&s==="password"?"text":s,[ce,s]),O=()=>{const S=[`${G.class}`];return n&&S.push(`${G.class}--${n}`),a&&S.push(`${G.class}--animated`),w&&S.push(`${G.class}--no-margin`),E&&S.push(`${G.class}--with-icon`),C&&S.push(`${G.class}--${C}`),T&&S.push(T),S.join(" ")},L=v.useMemo(()=>{const S=[`${G.class}__label`];return(se||o)&&S.push(`${G.class}__label--active`),S.join(" ")},[o,se]),P=()=>!a&&i?i:"",U=()=>C&&C==="error"?"info":"check_circle";return v.useEffect(()=>{D&&Ce(o??"")},[o,D,Ce]),u.jsxs("div",{className:O(),ref:z,children:[m&&u.jsx("div",{className:"ds-input__feedback",children:_&&u.jsxs(u.Fragment,{children:[u.jsx(R,{image:U()}),_]})}),u.jsx("input",{className:"ds-input__input","data-testid":e,disabled:N,id:t,max:d,min:c,name:t,onBlur:A,onChange:be,onFocus:j,onInput:be,onKeyDown:y,placeholder:P(),ref:ke,type:$,...!D&&{value:o??""}}),u.jsxs("label",{className:L,htmlFor:t,children:[r,f&&u.jsx(qe,{className:"ds-input__tooltip",placement:k,position:g,text:f,children:u.jsx(R,{className:"ds-input__icon",image:"info"})})]}),E&&u.jsx(R,{className:"ds-input__icon",image:E}),s==="password"&&u.jsx(R,{className:"ds-input__password-icon",image:ce?"visibility_off":"visibility",onClick:V,size:"xl"})]})});Ye.propTypes={name:l.string,testId:l.string,type:l.oneOf(G.props.type.options),animated:l.bool,size:l.oneOf(G.props.size.options),label:l.string,placeholder:l.string,value:l.oneOfType([l.string]),min:l.string,max:l.string,tooltip:l.string,tooltipPosition:l.string,tooltipPlacement:l.string,icon:l.string,status:l.oneOf(G.props.status.options),feedback:l.string,hasFeedback:l.bool,noMargin:l.bool,disabled:l.bool,mask:l.oneOfType([l.string,l.object]),onChangeHandler:l.func,onFocusHandler:l.func},Ye.displayName="DsInput";var os=(t=>(t.Small="small",t.Medium="medium",t.Large="large",t))(os||{}),us=(t=>(t.None="",t.Neutral20="neutral-20",t.Neutral10="neutral-10",t.Neutral05="neutral-05",t.Neutral00="neutral-00",t))(us||{});const he={name:"Loading",class:"ds-loading",props:{size:{type:String,default:"medium",options:Object.values(os)},opacity:{type:Boolean,default:!0},fullscreen:{type:Boolean,default:!0},backgroundColor:{type:String,default:"neutral-10",options:Object.values(us)},id:{type:String,default:""},testId:{type:String,default:"ds-loading"}}},mt=({id:t,testId:e=he.props.testId.default,className:s,size:a=he.props.size.default,opacity:n=he.props.opacity.default,fullscreen:r=he.props.fullscreen.default,backgroundColor:i=he.props.backgroundColor.default})=>{const o=!r&&`${he.class}--absolute`,c=a&&`${he.class}__dots--${a}`,d=i&&he.props.backgroundColor.options.find(g=>g===i)&&`${he.class}__background--${i}`,f=n&&`${he.class}__background--opacity`;return u.jsxs("div",{className:[he.class,s,o].filter(g=>g).join(" "),"data-testid":e,id:t,children:[u.jsx("div",{className:[`${he.class}__background`,d,f].filter(g=>g).join(" ")}),u.jsx("div",{className:["ds-loading__dots",c].filter(g=>g).join(" "),role:"status"})]})};mt.propTypes={id:l.string,testId:l.string,size:l.oneOf(he.props.size.options),opacity:l.bool,fullscreen:l.bool,backgroundColor:l.string},mt.displayName="DsLoading";const Oe={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:()=>({})}}},cs=({id:t,label:e,detail:s,name:a,testId:n=a??"ds-option-test",disabled:r=Oe.props.disabled.default,value:i,checked:o=Oe.props.checked.default,onChangeHandler:c=Oe.props.onChangeHandler.default})=>{const[d]=v.useState(crypto.randomUUID()),f=()=>{const g=[Oe.class];return r&&g.push(`${Oe.class}--disabled`),g.join(" ")};return u.jsxs("div",{className:f(),children:[u.jsx("input",{checked:o,"data-testid":n,disabled:r,id:t??String(d),name:a,onChange:c,type:"radio",value:i}),u.jsx(R,{className:`${Oe.class}__icon`,image:o?"radio_button_checked":"radio_button_unchecked",size:"xxl"}),u.jsxs("div",{className:`${Oe.class}__text-container`,children:[e&&u.jsx("label",{className:`${Oe.class}__label`,htmlFor:t??String(d),children:e}),s&&u.jsx("label",{className:`${Oe.class}__detail`,htmlFor:t??String(d),children:s})]})]})};cs.propTypes={id:l.string,name:l.string,testId:l.string,label:l.oneOfType([l.string,l.node]),value:l.oneOfType([l.string,l.number]),detail:l.string,disabled:l.bool,checked:l.bool,onChangeHandler:l.func},cs.displayName="DsOption";var ds=(t=>(t.Default="",t.Large="large",t.Small="small",t))(ds||{});const tt={name:"Paragraph",class:"ds-paragraph",props:{type:{type:String,default:"",options:Object.values(ds)}}},Ie=({children:t,className:e,testId:s="ds-paragraph-test",type:a=tt.props.type.default})=>{const n=a&&`${tt.class}--${a}`;return u.jsx("p",{className:[tt.class,n,e].filter(r=>r).join(" "),"data-testid":s,children:t})};Ie.propTypes={className:l.string,testId:l.string,type:l.oneOf(tt.props.type.options)},Ie.displayName="DsParagraph";var ps=(t=>(t.Success="success",t.SuccessDark="success-dark",t.Warning="warning",t.Danger="danger",t))(ps||{});const hs={name:"Progress",class:"ds-progress",props:{label:{type:String,default:""},progress:{type:Number,default:0},color:{type:String,default:"success",options:Object.values(ps)}}};var fs=(t=>(t.Stretch="stretch",t.FlexStart="flex-start",t.FlexEnd="flex-end",t.Center="center",t.SpaceAround="space-around",t.SpaceBetween="space-between",t))(fs||{}),gs=(t=>(t.Stretch="stretch",t.FlexStart="flex-start",t.FlexEnd="flex-end",t.Center="center",t))(gs||{}),ms=(t=>(t.Row="row",t.Column="column",t.RowReverse="row-reverse",t.ColumnReverse="column-reverse",t))(ms||{}),vs=(t=>(t.NoWrap="nowrap",t.Wrap="wrap",t.WrapReverse="wrap-reverse",t))(vs||{}),ys=(t=>(t.Quark="quark",t.Nano="nano",t.XXXS="xxxs",t.XXS="xxs",t.XS="xs",t.SM="sm",t.MD="md",t.LG="lg",t.XL="xl",t.XXL="xxl",t.XXXL="xxxl",t))(ys||{});const Le={name:"Flex-Layout",class:"ds-flex-layout",props:{justifyContent:{type:String,default:"stretch",required:!0,options:Object.values(fs)},alignItems:{type:String,default:"stretch",required:!0,options:Object.values(gs)},flexDirection:{type:String,default:"row",required:!0,options:Object.values(ms)},flexWrap:{type:String,default:"wrap",required:!1,options:Object.values(vs)},className:{type:String,default:""},width:{type:String,default:"100%"},height:{type:String,default:""},gap:{type:String,default:"",options:Object.values(ys)}}},$e=({children:t,className:e,justifyContent:s=Le.props.justifyContent.default,alignItems:a=Le.props.alignItems.default,flexDirection:n=Le.props.flexDirection.default,flexWrap:r=Le.props.flexWrap.default,width:i=Le.props.width.default,height:o,gap:c})=>{const d=()=>{const g=[Le.class,e];return c&&g.push(`${Le.class}--gap-${c}`),g.join(" ")},f=()=>({display:"flex",justifyContent:s,alignItems:a,flexDirection:n,flexWrap:r,width:i,height:o,gap:c});return u.jsx("div",{className:d(),style:f(),children:t})};$e.propTypes={className:l.string,justifyContent:l.string,alignItems:l.string,flexDirection:l.string,flexWrap:l.string,width:l.string,height:l.string,gap:l.string},$e.displayName="DsFlexLayout";const vt={name:"Flex-Element",class:"ds-flex-element",props:{flex:{type:String,default:"0 1 auto",required:!1},className:{type:String,default:"",required:!1}}},te=({children:t,flex:e=vt.props.flex.default,className:s=vt.props.className.default})=>{const a=()=>[vt.class,s].join(" "),n=()=>({flex:e});return u.jsx("div",{className:a(),style:n(),children:t})};te.propTypes={className:l.string,flex:l.string},te.displayName="DsFlexElement";var yt=(t=>(t.None="none",t.Quark="quark",t.Nano="nano",t.XXXS="xxxs",t.XXS="xxs",t.XS="xs",t.SM="sm",t))(yt||{});const Ke={name:"Spacer",class:"ds-spacer",props:{vertical:{type:String,default:"none",options:Object.values(yt)},horizontal:{type:String,default:"none",options:Object.values(yt)}}},ge=({vertical:t=Ke.props.vertical.default,horizontal:e=Ke.props.horizontal.default})=>{const s=t&&`ds-spacer__vertical--${t}`,a=e&&`ds-spacer__horizontal--${e}`;return u.jsx("div",{className:[Ke.class,s,a].filter(n=>n).join(" "),"data-testid":"ds-spacer"})};ge.propTypes={vertical:l.oneOf(Ke.props.vertical.options),horizontal:l.oneOf(Ke.props.horizontal.options)},ge.displayName="DsSpacer";const _s=({label:t,progress:e=hs.props.progress.default,color:s=hs.props.color.default})=>{const a=v.useMemo(()=>e>100?100:e<0?0:e,[e]),n=v.useMemo(()=>`ds-progress__progress--${s}`,[s]),r=v.useMemo(()=>s==="success-dark"?"color__success--dark":s==="warning"?"color__warning--dark":`color__${s}`,[s]);return u.jsx("div",{className:"ds-progress",children:u.jsxs($e,{flexDirection:"column",children:[u.jsx(te,{children:u.jsx("div",{"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":a,className:"ds-progress__container",role:"progressbar",children:u.jsx("div",{className:`ds-progress__progress ${n}`,"data-testid":"ds-progress-bar",style:{width:`${a}%`}})})}),u.jsx(te,{children:u.jsxs($e,{alignItems:"flex-end",flexDirection:"column",justifyContent:"center",children:[u.jsx(ge,{vertical:"quark"}),u.jsx(u.Fragment,{children:t&&u.jsx(Ie,{className:r,children:t})})]})})]})})};_s.propTypes={label:l.string,progress:l.number,color:l.string};var ks=(t=>(t.Default="default",t.Card="card",t))(ks||{});const me={name:"DsRadio",class:"ds-radio",props:{variant:{type:String,default:"default",options:Object.values(ks)},fullWidth:{type:Boolean,default:!1}}},ka=v.forwardRef(({variant:t=me.props.variant.default,fullWidth:e=me.props.fullWidth.default,label:s,description:a,className:n,id:r,testId:i="ds-radio",disabled:o,...c},d)=>{const f=v.useId(),g=r??`${me.class}-${f.replace(/:/g,"")}`,k=[me.class,`${me.class}--${t}`,e&&`${me.class}--full-width`,o&&`${me.class}--disabled`,n].filter(Boolean).join(" ");return u.jsxs("label",{className:k,"data-testid":`${i}-root`,htmlFor:g,children:[u.jsx("input",{...c,className:`${me.class}__input`,"data-testid":i,disabled:o,id:g,ref:d,type:"radio"}),u.jsx("span",{"aria-hidden":"true",className:`${me.class}__control`}),(s||a)&&u.jsxs("span",{className:`${me.class}__text`,children:[s&&u.jsx("span",{className:`${me.class}__label`,children:s}),a&&u.jsx("span",{className:`${me.class}__description`,children:a})]})]})});ka.displayName="DsRadio";var bs=(t=>(t.Small="sm",t.Medium="md",t.Large="lg",t))(bs||{}),Ss=(t=>(t.Default="",t.Error="error",t.Success="success",t))(Ss||{}),Es=(t=>(t.Center="center",t.End="end",t.Initial="initial",t))(Es||{}),Cs=(t=>(t.Top="top",t.Right="right",t.Bottom="bottom",t.Left="left",t))(Cs||{});const Q={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(bs),default:"md"},status:{type:String,default:"",options:Object.values(Ss)},tooltip:{type:String,default:""},tooltipPlacement:{type:String,default:"initial",options:Object.values(Es)},tooltipPosition:{type:String,default:"top",options:Object.values(Cs)},feedback:{type:String,default:""},options:[]}},As=v.forwardRef(({label:t,className:e,disabled:s=Q.props.disabled.default,animated:a=Q.props.animated.default,multiple:n=Q.props.multiple.default,testId:r=Q.props.testId.default,name:i,options:o,value:c,placeholder:d,onChange:f,onChangeHandler:g,size:k=Q.props.size.default,status:E=Q.props.status.default,tooltip:C,tooltipPosition:_=Q.props.tooltipPosition.default,tooltipPlacement:m=Q.props.tooltipPlacement.default,feedback:w,...N},T)=>{const[D,h]=v.useState(!1),I=z=>{h(!1),f&&f(z,z.target.value),g&&g(z,z.target.value)},M=()=>{const z=[Q.class,"select-placeholder"];return z.push(`${Q.class}--${k}`),E&&z.push(`${Q.class}--${E}`),D&&z.push(`${Q.class}--active`),s&&z.push(`${Q.class}--disabled`),e&&z.push(e),z.join(" ")},W=v.useMemo(()=>{const z=[`${Q.class}__label`];return!a&&z.push(`${Q.class}__label--not-animated`),c&&z.push(`${Q.class}__label--has-value`),a&&!c&&!C&&z.push(`${Q.class}__label--hidden`),z.join(" ")},[c]);return u.jsxs("div",{className:M(),"data-testid":"ds-select-component",children:[t&&u.jsxs("label",{className:W,"data-testid":"ds-label-id",htmlFor:i,children:[t,C&&u.jsx(qe,{className:`${Q.class}__tooltip`,placement:m,position:_,text:C,children:u.jsx(R,{className:`${Q.class}__icon`,image:"info"})})]}),u.jsxs("select",{"data-testid":r,disabled:s,id:i,multiple:n,name:i,onBlur:()=>h(!1),onChange:z=>I(z),onFocus:()=>h(!0),ref:T,value:c??"",...N,children:[(d||a)&&u.jsx("option",{disabled:!0,value:"",children:d??t}),o==null?void 0:o.map((z,se)=>{var ue;return"options"in z?u.jsx("optgroup",{label:z.label,children:(ue=z.options)==null?void 0:ue.map((ce,De)=>u.jsx("option",{className:`${Q.class}__option-select`,value:ce.value,children:ce.label??ce.value},De))},se):u.jsx("option",{className:`${Q.class}__option-select`,value:z.value,children:z.label??z.value},se)})]}),w&&u.jsxs("div",{className:"ds-select__feedback-container",children:[u.jsx(R,{className:"ds-select__icon",image:E==="success"?"check_circle":"info"}),u.jsx("span",{className:"ds-select__feedback",children:w})]})]})});As.propTypes={label:l.string.isRequired,className:l.string,disabled:l.bool,animated:l.bool,multiple:l.bool,name:l.string,testId:l.string,options:l.array.isRequired,placeholder:l.string,onChange:l.func,onChangeHandler:l.func,value:l.oneOfType([l.string,l.number]),size:l.oneOf(Q.props.size.options),status:l.oneOf(Q.props.status.options),tooltip:l.string,tooltipPosition:l.string,tooltipPlacement:l.string,feedback:l.string},As.displayName="DsSelect";var ws=(t=>(t.Large="large",t.Small="small",t))(ws||{});const _t={name:"Subtitle",class:"ds-subtitle",props:{type:{type:String,default:"large",options:Object.values(ws)}}},ba=({children:t,className:e,testId:s="ds-subtitle-test",type:a})=>{const n=_t.props.type.options.find(r=>r===a)&&`${_t.class}--${a}`;return u.jsx("p",{className:[_t.class,n,e].filter(r=>r).join(" "),"data-testid":s,children:t})};ba.displayName="DsSubtitle";var Ds=(t=>(t.Small="small",t.Medium="medium",t.Large="large",t))(Ds||{}),Ts=(t=>(t.Text="text",t))(Ts||{}),Fs=(t=>(t.None="",t.Error="error",t.Success="success",t))(Fs||{}),Os=(t=>(t.None="none",t.Both="both",t.Horizontal="horizontal",t.Vertical="vertical",t.Block="block",t.Inline="inline",t))(Os||{});const ee={name:"TextArea",class:"ds-textarea",props:{name:{type:String,required:!0},testId:{type:String,default:"ds-textarea-test"},type:{type:String,default:"text",options:Object.values(Ts)},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},size:{type:String,default:"medium",options:Object.values(Ds)},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:"",options:Object.values(Fs)},feedback:{type:String,default:""},description:{type:String,default:""},icon:{type:String,default:""},tooltip:{type:String,default:""},resize:{type:String,default:"none",options:Object.values(Os)},onChangeHandler:{type:Function,default:()=>{}}}},Is=v.forwardRef(({name:t,testId:e=ee.props.testId.default,animated:s=ee.props.animated.default,size:a=ee.props.size.default,label:n,placeholder:r,value:i,minLength:o,maxLength:c,tooltip:d,icon:f,status:g=ee.props.status.default,feedback:k,disabled:E=ee.props.disabled.default,required:C,className:_,resize:m=ee.props.resize.default,onChangeHandler:w,onBlurHandler:N,onKeyDownHandler:T,onFocusHandler:D,rows:h=ee.props.rows.default,cols:I,description:M,style:W},z)=>{const[se,ue]=v.useState(!1),[ce,De]=v.useState(0),[ye,_e]=v.useState(crypto.randomUUID());v.useEffect(()=>{i==null&&_e(crypto.randomUUID())},[i]);const le=O=>{De(O.target.value.length),w&&w(O)},ke=O=>{T&&T(O)},Ce=O=>{ue(!1),N&&N(O)},be=O=>{ue(!0),D&&D(O)},y=()=>{const O=[`${ee.class}`];return a&&O.push(`${ee.class}--${a}`),s&&O.push(`${ee.class}--animated`),d&&O.push(`${ee.class}--with-icon`),g&&O.push(`${ee.class}--${g}`),_&&O.push(_),O.join(" ")},A=v.useMemo(()=>{const O=[`${ee.class}__label`];return(se||i)&&O.push(`${ee.class}__label--active`),O.join(" ")},[i,se]),j=()=>!s&&r?r:"",V=()=>g&&g==="error"?"info":"check_circle",$={resize:m,...W??{}};return u.jsxs("div",{className:y(),children:[M&&u.jsx("span",{className:"ds-textarea__description",children:M}),k&&u.jsxs("div",{className:"ds-textarea__feedback",children:[u.jsx(R,{image:V()}),k]}),u.jsx("textarea",{className:"ds-textarea__textarea",cols:I,"data-testid":e,defaultValue:i??"",disabled:E,id:t,maxLength:c,minLength:o,name:t,onBlur:Ce,onChange:le,onFocus:be,onKeyDown:ke,placeholder:j(),ref:z,required:C,rows:h,style:$}),u.jsx("label",{className:A,htmlFor:t,children:n}),c&&u.jsxs("span",{className:"ds-textarea__count",children:[ce,"/",c]}),d&&u.jsx(qe,{className:"ds-textarea__tooltip",placement:"end",text:d,children:u.jsx(R,{className:"ds-textarea__icon",image:f})})]},ye)});Is.propTypes={name:l.string,testId:l.string,animated:l.bool,size:l.oneOf(ee.props.size.options),label:l.string,placeholder:l.string,value:l.oneOfType([l.string]),tooltip:l.string,icon:l.string,status:l.oneOf(ee.props.status.options),feedback:l.string,minLength:l.number,maxLength:l.number,rows:l.number,cols:l.number,disabled:l.bool,required:l.bool,onChangeHandler:l.func,onBlur:l.func,onKeyDown:l.func,onFocus:l.func,resize:l.oneOf(ee.props.resize.options).isRequired,description:l.string,style:l.object},Is.displayName="DsTextArea";const st={name:"Container",class:"ds-container",props:{fluid:{type:Boolean,default:!1},testId:{type:String,default:"ds-container-test"}}},kt=({children:t,fluid:e=st.props.fluid.default,className:s,style:a,testId:n=st.props.testId.default})=>{const r=e?`${st.class}--fluid`:st.class;return u.jsx("div",{className:[r,s].filter(i=>i).join(" "),"data-testid":n,style:a,children:t})};kt.propTypes={children:l.node,fluid:l.bool,className:l.string,style:l.object,testId:l.string},kt.displayName="DsContainer";var Ns=(t=>(t.Quark="quark",t.Nano="nano",t.ExtraSmall="xs",t.Small="sm",t.Medium="md",t.Large="lg",t))(Ns||{}),bt=(t=>(t.Start="start",t.End="end",t.Center="center",t.Stretch="stretch",t.SpaceAround="space-around",t.SpaceBetween="space-between",t.SpaceEvenly="space-evenly",t))(bt||{});const J={name:"Grid-Layout",class:"ds-grid-layout",props:{rows:{type:String,default:"auto",required:!0},gap:{type:String,default:"sm",options:Object.values(Ns)},vGap:{type:Boolean,default:!0},hGap:{type:Boolean,default:!0},width:{type:String,default:""},height:{type:String,default:""},horizontalAlign:{type:String,default:"start",options:Object.values(bt)},verticalAlign:{type:String,default:"start",options:Object.values(bt)}}};function Sa(){const{innerWidth:t,innerHeight:e}=window;return{width:t,height:e}}function mn(){const[t,e]=v.useState(Sa());return v.useEffect(()=>{function s(){e(Sa())}return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),t}const xs=({children:t,rows:e=J.props.rows.default,gap:s=J.props.gap.default,vGap:a=J.props.vGap.default,hGap:n=J.props.hGap.default,horizontalAlign:r=J.props.horizontalAlign.default,verticalAlign:i=J.props.verticalAlign.default,width:o=J.props.width.default,height:c=J.props.height.default})=>{const d=a&&`${J.class}__v-gap--${s}`,f=n&&`${J.class}__h-gap--${s}`,g=r&&J.props.horizontalAlign.options.find(T=>T===r)?`${J.class}--h-${r}`:null,k=i&&J.props.verticalAlign.options.find(T=>T===i)?`${J.class}--v-${i}`:null,{width:E}=mn(),[C,_]=v.useState("auto");v.useEffect(()=>{E<=768?_("6"):_("12")},[E]);const m=T=>/^[+-]?\d+$/.test(T),w=()=>e.split(",").map(D=>(D=D.trim(),D==="0"||D==="*"||D==="auto"?"auto":m(D)?D+"fr":D)).join(" "),N=()=>`repeat(${C}, minmax(0, 1fr))`;return u.jsx("div",{className:[J.class,g,k,d,f].filter(T=>T).join(" "),style:{width:o,height:c,gridTemplateColumns:N(),gridTemplateRows:w()},children:t})};xs.propTypes={children:l.oneOfType([l.arrayOf(l.node),l.node,l.func]),rows:l.string,gap:l.oneOf(J.props.gap.options),vGap:l.bool,hGap:l.bool,width:l.string,height:l.string,horizontalAlign:l.oneOf(J.props.horizontalAlign.options),verticalAlign:l.oneOf(J.props.verticalAlign.options)},xs.displayName="DsGridLayout";const Ea=()=>typeof window<"u"&&window.innerWidth?window.innerWidth:0,Ca=({children:t,grid:e})=>{const{row:s,col:a,mobileRow:n,mobileCol:r}=e,[i,o]=v.useState(Ea());v.useEffect(()=>{const d=()=>{o(Ea())};if(typeof window<"u")return window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[]);const c=v.useMemo(()=>i<=768?{gridRow:n??s,gridColumn:r??a}:{gridRow:s,gridColumn:a},[i,s,a,n,r]);return u.jsx("div",{style:c,children:t})};Ca.displayName="DsGridElement";const vn={name:"Grid-Element",class:"ds-grid-element",props:{grid:{type:Object,default:{row:"auto",col:"auto"}}}};var ze=(t=>(t.None="none",t.Quark="quark",t.Nano="nano",t.ExtraSmall="xs",t.Small="sm",t.Medium="md",t.Large="lg",t))(ze||{});const Se={name:"Wrapper",class:"ds-wrapper",props:{space:{type:String,default:"xs",options:Object.values(ze)},top:{type:String,default:"none",options:Object.values(ze)},right:{type:String,default:"none",options:Object.values(ze)},bottom:{type:String,default:"none",options:Object.values(ze)},left:{type:String,default:"none",options:Object.values(ze)}}},Xe=({children:t,space:e=Se.props.space.default,top:s=Se.props.top.default,right:a=Se.props.right.default,bottom:n=Se.props.bottom.default,left:r=Se.props.left.default})=>{const i=s&&`${Se.class}__top--${s}`,o=a&&`${Se.class}__right--${a}`,c=n&&`${Se.class}__bottom--${n}`,d=r&&`${Se.class}__left--${r}`,f=e&&`${Se.class}--${e}`;return u.jsx("div",{className:[Se.class,i,o,c,d,f].filter(g=>g).join(" "),children:t})};Xe.displayName="DsWrapper";const St={name:"Accordion",class:"ds-accordion",props:{openItemListIndex:{type:Boolean,default:!1},items:{type:Array,default:[]},activeItem:{type:Number,default:0}}},Ue={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}}},Et=({title:t,content:e,onToggle:s,active:a=Ue.props.active.default,disabled:n=Ue.props.disabled.default})=>{const r=a&&`${Ue.class}--active`;return u.jsxs("li",{className:[Ue.class,r].filter(i=>i).join(" "),children:[u.jsxs("button",{className:`${Ue.class}__button`,disabled:n,onClick:s,children:[t,u.jsx(R,{className:`${Ue.class}__icon`,color:"neutral-90",image:"expand_more",size:"xl"})]}),a&&u.jsx("div",{className:"ds-accordion-item__content",children:e})]})};Et.propTypes={active:l.bool,title:l.oneOfType([l.element,l.string]),content:l.oneOfType([l.element,l.string]),disabled:l.bool},Et.displayName="DsAccordionItem";const Bs=({items:t=St.props.items.default,activeItem:e=St.props.activeItem.default,onClick:s})=>{const[a,n]=v.useState(-1);v.useEffect(()=>{t.map((i,o)=>{i.active&&n(o)})},[t]),v.useEffect(()=>{e!=null&&n(e)},[e]);const r=i=>{if(a===i)return s&&s(-1),n(-1);n(i),s&&s(i)};return u.jsx("ul",{className:St.class,children:t.map((i,o)=>u.jsx(Et,{active:a===o,content:i.content,disabled:i.disabled,onToggle:()=>{r(o)},title:i.title},o))})};Bs.propTypes={items:l.array,activeItem:l.number},Bs.displayName="DsAccordion";const Aa=({title:t,activeTags:e,handleTagClose:s})=>u.jsx("div",{className:"active-tags",children:e.length>0&&u.jsxs(u.Fragment,{children:[u.jsx(Ie,{className:"active-tags__title",children:t}),u.jsx("div",{className:"active-tags__list","data-testid":"ds-list",children:e.map((a,n)=>u.jsx(qe,{text:`Filtro ${a.text} aplicado`,children:u.jsxs("div",{className:`active-tags__item ${a.hiddenClose&&"active-tags__item--no-close"}`,"data-testid":`ds-active-tag-${n}`,children:[u.jsxs($e,{alignItems:"center",gap:"nano",children:[u.jsx(te,{children:u.jsx(R,{className:"active-tags__icon",color:a.hiddenClose?"neutral-00":"neutral-90",fill:!0,image:a.icon,testId:`icon-${n}`})}),u.jsx(te,{children:u.jsx(Ie,{type:"small",children:a.text})})]}),!a.hiddenClose&&u.jsx(R,{image:"close",onClick:()=>s(n),testId:`icon-close-${n}`})]},n)},`ds-tooltip-key-${a.id}-${a.text}`))})]})});Aa.displayName="DsActiveTags";const yn={name:"ActiveTags",class:"ds-active-tags",props:{title:{type:String,default:""},activeTags:{type:Array,default:[]},handleTagClose:{type:Function,default:()=>{}}}},Re={name:"Carousel",class:"ds-carousel",props:{}},wa=({slides:t,interval:e=3e3,imageHeight:s=100,imageWidth:a=100,imageMaxHeight:n,imageMaxWidth:r})=>{const[i,o]=v.useState(0),[c,d]=v.useState(!1),f=v.useRef(null);v.useEffect(()=>(c||(f.current=setInterval(()=>{o(E=>E===t.length-1?0:E+1)},e)),()=>{f.current&&clearInterval(f.current)}),[c,e,t.length]);const g=()=>d(!0),k=()=>d(!1);return u.jsxs("div",{className:`${Re.class}`,"data-testid":"ds-carousel",onMouseEnter:g,onMouseLeave:k,children:[u.jsx("div",{className:`${Re.class}__image-wrapper`,style:{height:s,width:a,maxHeight:n,maxWidth:r},children:t.map((E,C)=>u.jsx("img",{alt:E.title,className:`${Re.class}__image ${C===i?"active":"inactive"}`,height:s,src:E.image,style:{maxHeight:n,maxWidth:r},width:a},C))}),u.jsx(ge,{vertical:"xxs"}),u.jsx("div",{children:u.jsx(ot,{className:"color__primary",type:"heading-4",children:t[i].title})}),u.jsx("div",{children:u.jsx(Ie,{type:"large",children:t[i].description})}),u.jsx(ge,{vertical:"xxs"}),u.jsx("div",{className:`${Re.class}__dots`,children:u.jsx("div",{className:`${Re.class}__dots-wrapper`,children:t.map((E,C)=>u.jsx("button",{"aria-label":`Go to slide ${C+1}`,className:`dot ${i===C?"dot--active":""}`,onClick:()=>o(C)},C))})})]})};wa.propTypes={slides:l.arrayOf(l.shape({title:l.string.isRequired,image:l.string.isRequired,description:l.string.isRequired})).isRequired,interval:l.number,imageHeight:l.oneOfType([l.number,l.string]),imageWidth:l.oneOfType([l.number,l.string]),imageMaxHeight:l.oneOfType([l.number,l.string]),imageMaxWidth:l.oneOfType([l.number,l.string])};var $s=(t=>(t.Small="small",t.Medium="medium",t.Large="large",t))($s||{});const H={name:"EditableSelect",class:"ds-editable-select",props:{label:{type:String,default:""},testId:{type:String,default:"ds-editable-select"},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:"medium",options:Object.values($s)},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:()=>{}},onClearHandler:{type:Function,default:()=>{}}}},_n=(t,e)=>{if(!e)return t;const s=e.toLowerCase();return t.filter(a=>a.label.toLowerCase().includes(s))},Da=t=>t,Ta=({label:t=H.props.label.default,name:e=H.props.name.default,testId:s=H.props.testId.default,value:a=H.props.value.default,options:n=H.props.options.default,size:r=H.props.size.default,onChangeHandler:i=H.props.onChangeHandler.default,onSelectHandler:o=H.props.onSelectHandler.default,onClearHandler:c=H.props.onClearHandler.default,icon:d=H.props.icon.default,noOptionsMessage:f=H.props.noOptionsMessage.default,disabled:g=H.props.disabled.default,status:k=H.props.status.default,onBlurHandler:E=H.props.onBlurHandler.default,onFocusHandler:C=H.props.onFocusHandler.default,animated:_=H.props.animated.default,placeholder:m=H.props.placeholder.default,loading:w,showOptionsOnFocus:N=!1,inputType:T,inputMin:D,inputMax:h,inputTooltip:I,inputTooltipPosition:M,inputTooltipPlacement:W,inputFeedback:z,inputHasFeedback:se,inputNoMargin:ue,inputMask:ce,inputOnKeyDownHandler:De})=>{const[ye,_e]=v.useState(!1),[le,ke]=v.useState(a),[Ce,be]=v.useState(!0),y=v.useRef(null),A=S=>{if(N){const b=a.trim().toLowerCase(),de=S.currentTarget.value.trim().toLowerCase(),He=n.map(Cn=>Cn.label.trim().toLowerCase()),wt=!!b&&He.includes(b),En=!!de&&He.includes(de);wt&&!En&&c()}i(S),be(!1);const x=S.currentTarget.value.length;(N||w==null&&x>0||!w&&x>2)&&_e(!0)},j=()=>{C(),be(!0),N&&_e(!0)},V=()=>{var Z,b;const S=(Z=y.current)==null?void 0:Z.querySelector("input");if(!S)return;const x=(b=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:b.set;x==null||x.call(S,""),S.dispatchEvent(new Event("input",{bubbles:!0}))},$=()=>{if(N){const S=a.trim(),x=S?n.find(Z=>Z.label.trim().toLowerCase()===S.toLowerCase()):void 0;S&&(x?o(x):(V(),c()))}E(),be(!0)},O=S=>{o(S),E(),N||ke(crypto.randomUUID().toString()),be(!0),_e(!1)},L=S=>{g||O(S)};v.useEffect(()=>{!N&&a.length===0&&_e(!1)},[a,N]),v.useEffect(()=>{if(!N)return;const S=x=>{y.current&&!y.current.contains(x.target)&&_e(!1)};return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[N]);const P=v.useMemo(()=>N?Ce?Da(n):_n(n,a):Da(n),[n,a,N,Ce]),U=()=>P.length>0?P.map((S,x)=>{const b=S.label===a?` ${H.class}__option--selected`:"";return u.jsx("button",{className:`${H.class}__option ${H.class}__option--${r}${b}`,"data-testid":`ds-option-${S.id??S.label}`,onClick:()=>L(S),onMouseDown:de=>de.preventDefault(),type:"button",children:S.label},x)}):u.jsx("div",{className:`${H.class}__option ${H.class}__option--not-found--${r}`,children:f},"no_option");return u.jsxs("div",{className:`${H.class}__container`,ref:y,children:[u.jsx(Ye,{animated:_,className:`${H.class}__input`,disabled:g,feedback:z,hasFeedback:se,label:t,mask:ce,max:h,min:D,name:e,noMargin:ue,onBlurHandler:$,onChangeHandler:A,onFocusHandler:j,onKeyDownHandler:De,placeholder:m,size:r,status:k,testId:s,tooltip:I,tooltipPlacement:W,tooltipPosition:M,type:T,value:a},le),(d||w)&&(w?u.jsx("div",{className:`${H.class}__loading ${H.class}__loading--${r}`,style:{width:"18px"},children:u.jsx(mt,{fullscreen:!1})}):d&&u.jsx(R,{className:`${H.class}__icon ${H.class}__icon--${r}`,image:d})),ye&&u.jsx("div",{className:`${H.class}__list ${H.class}__list--${r}`,"data-testid":"ds-list",children:U()})]})};Ta.displayName="DsEditableSelect";const Ge={name:"DsIndicator",class:"ds-indicator",props:{current:{type:Number,default:0},length:{type:Number,required:!0}}},kn=({length:t,current:e=Ge.props.current.default})=>{const[s,a]=v.useState(e),n=i=>i<s?`${Ge.class}__step--older`:i===s?`${Ge.class}__step--active`:"";v.useEffect(()=>{a(e)},[e]);const r=[];for(let i=0;i<t;i++)r.push(u.jsx("div",{className:`${Ge.class}__step ${n(i)}`,"data-testid":`ds-indicator-step-${i}`},i));return u.jsx("div",{className:Ge.class,children:r})},Fa={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:()=>{}}}},Ms=({name:t,value:e,prefix:s,sufix:a,min:n,max:r,onChangeHandler:i})=>{const o=v.useRef(null),[c,d]=v.useState(!1),[f,g]=v.useState("");v.useEffect(()=>{g(e??"")},[e]);const k=m=>{m.key==="Enter"&&E(m)};function E(m){d(!1),i&&(n&&parseInt(n)>=parseInt(f===""?n:f)?(m.currentTarget.value=n,g(n)):r&&parseInt(r)<parseInt(f)?(m.currentTarget.value=r,g(r)):m.currentTarget.value=f,i(m))}const C=m=>{g(m.currentTarget.value)},_=async()=>{var m;await d(!0),(m=o.current)==null||m.focus()};return u.jsx("div",{className:Fa.class,children:c?u.jsx("input",{className:"ds-input__input","data-testid":"ds-input",max:r,min:n,name:t,onBlur:E,onChange:C,onKeyDown:k,ref:o,type:"number",value:f}):u.jsx("div",{"data-testid":"ds-inline-editible-div-click",onClick:_,children:u.jsxs($e,{alignItems:"center",gap:"nano",children:[u.jsx(te,{children:u.jsx(Ie,{children:u.jsxs("b",{children:[s,e,a]})})}),u.jsx(te,{children:u.jsx(R,{image:"edit_square"})})]})})})};Ms.propTypes={value:l.string},Ms.displayName="DsInlineEditable";var Oa=(t=>(t[t.Elevation1=1]="Elevation1",t[t.Elevation2=2]="Elevation2",t[t.Elevation3=3]="Elevation3",t[t.Elevation4=4]="Elevation4",t))(Oa||{}),Vs=(t=>(t.Squared="squared",t.Rounded="rounded",t))(Vs||{});const ve={name:"Modal",class:"ds-modal",props:{elevation:{type:Number,options:[1,2,3,4]},variant:{type:String,default:"rounded",options:Object.values(Vs)},cancelBtnText:{type:String,default:"Cancelar"},confirmBtnText:{type:String,default:"Confirmar"},isModalOpen:{type:Boolean,default:!1}}},Ls=({className:t,title:e,content:s,cancelBtnText:a=ve.props.cancelBtnText.default,confirmBtnText:n=ve.props.confirmBtnText.default,variant:r=ve.props.variant.default,elevation:i,isModalOpen:o=ve.props.isModalOpen.default,onClose:c,onCancel:d,onConfirm:f,...g})=>{const k=r&&ve.props.variant.options.find(m=>m===r)?`${ve.class}--${r}`:`${ve.class}--${ve.props.variant.default}`,E=i&&`${ve.class}--elevation-${i}`,C=f||d,_=v.useCallback(m=>{m.keyCode===27&&c()},[c]);return v.useEffect(()=>(o&&window&&!C&&window.addEventListener("keyup",_),()=>{window.removeEventListener("keyup",_)}),[C,_]),o?u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"ds-modal-overlay","data-testid":"ds-modal-overlay",...g,onClick:()=>C?()=>{}:c()}),u.jsxs("div",{className:[ve.class,k,E,t].filter(m=>m).join(" "),"data-testid":"ds-modal",children:[!C&&u.jsx("button",{className:"ds-modal__closeBtn","data-testid":"ds-modal-close-button",onClick:c,children:u.jsx(R,{image:"close",size:"lg"})}),u.jsxs("div",{className:"ds-modal__content",children:[u.jsx("div",{className:"ds-modal__content__title",children:e}),e&&u.jsx(ge,{vertical:"xxxs"}),u.jsx("div",{className:"ds-modal__content__content",children:s})]}),C&&u.jsx(ge,{vertical:"sm"}),!C&&u.jsx(ge,{vertical:"xxs"}),u.jsxs("div",{className:"ds-modal__cta",children:[d&&u.jsx(Qe,{onClick:()=>{c(),d()},children:a}),f&&u.jsx(Qe,{onClick:()=>{c(),f()},children:n})]})]})]}):null};Ls.propTypes={firstButtonText:l.string,confirmBtnText:l.string,cancelBtnText:l.string,variant:l.oneOf(ve.props.variant.options),elevation:l.oneOf(ve.props.elevation.options),isModalOpen:l.bool,title:l.node,content:l.node},Ls.displayName="DsModal";var js=(t=>(t.Success="success",t.Danger="danger",t.Warning="warning",t.Info="info",t))(js||{}),Ps=(t=>(t.Rounded="rounded",t.Squared="squared",t))(Ps||{});const oe={name:"DsNotification",class:"ds-notification",props:{type:{type:String,default:"info",options:Object.values(js)},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:"rounded",options:Object.values(Ps)},progressBar:{type:Boolean,default:!0},testId:{type:String,default:"ds-notification"}}};var Ia=(t=>(t.success="check",t.danger="error",t.warning="warning",t.info="info",t))(Ia||{});const qs=({className:t,type:e=oe.props.type.default,variant:s=oe.props.variant.default,id:a,children:n,message:r,autoClose:i=oe.props.autoClose.default,autoCloseTimer:o=oe.props.autoCloseTimer.default,dismissible:c=oe.props.dismissible.default,elevation:d,progressBar:f=oe.props.progressBar.default,handleClose:g,testId:k=oe.props.testId.default})=>{const[E,C]=v.useState(o),[_,m]=v.useState(!1),[w,N]=v.useState(!0),T=[oe.class,e&&`${oe.class}--${e}`,s&&`${oe.class}--${s}`,d&&`${oe.class}--elevation-${d}`,t].join(" "),D=()=>C(W=>(W===0&&N(!1),W-100));v.useEffect(()=>{!i&&!c&&N(!0);let W;return!_&&i&&(W=setInterval(D,100)),()=>{clearInterval(W)}},[_,i,o,w,c]);const h=()=>{m(!0)},I=()=>{m(!1)},M=W=>{N(!1),g&&g(W)};return w?u.jsxs("div",{className:T,"data-testid":k,id:a,onMouseEnter:h,onMouseLeave:I,children:[u.jsx(Xe,{bottom:"nano",top:"nano",children:u.jsxs($e,{alignItems:"center",flexWrap:"nowrap",gap:"xxxs",children:[u.jsx(te,{children:u.jsx(R,{color:e,fill:!0,image:Ia[e]})}),u.jsx(te,{flex:"1",children:u.jsx(Xe,{left:"none",right:"none",space:"nano",children:n??r})}),u.jsx(te,{children:c?u.jsx("div",{className:`${oe.class}__button`,"data-testid":`${k}-close`,onClick:W=>M(W),children:u.jsx(Xe,{children:u.jsx(R,{image:"close"})})}):u.jsx(ge,{horizontal:"quark"})})]})}),f&&i&&u.jsx("div",{className:`${oe.class}__progress-bar ${oe.class}__progress-bar--${e}`,"data-testid":`${k}-progress-bar`,style:{width:`${E/o*100}%`}})]}):null};qs.displayName="DsNotification";const Ct={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:"},testId:{type:String,default:"ds-password-confirmation"}}},At={strong:"Forte",good:"Boa",medium:"Médio",weak:"Fraco"},zs=({onChange:t,validationList:e=Ct.props.validationList.default,instructionLabel:s=Ct.props.instructionLabel.default,testId:a=Ct.props.testId.default})=>{const[n,r]=v.useState(""),[i,o]=v.useState(""),[c,d]=v.useState([]),[f,g]=v.useState({score:0,color:"danger",label:"Fraco"}),[k,E]=v.useState(!1),C=v.useCallback(h=>{const I=e.map(M=>M==null?void 0:M.rule(h));return d(I),I},[e]),_=v.useCallback(h=>{r(h.currentTarget.value);const I=C(h.currentTarget.value),M=T(I);t({password:h.currentTarget.value,confirmationPassword:i,isEqual:i===h.currentTarget.value,feedback:M})},[i,t,C]),m=v.useCallback(h=>{o(h.currentTarget.value);const I=C(n),M=T(I);t({password:n,confirmationPassword:h.currentTarget.value,isEqual:n===h.currentTarget.value,feedback:M})},[n,t,C]),w=v.useMemo(()=>n!==i&&k?{status:"error",feedback:"As senhas são diferentes"}:{status:"",feedback:""},[n,i,k]),N=v.useCallback(h=>{const I={score:h,color:"danger",label:At.weak};return h>30&&h<75?(I.color="warning",I.label=At.medium):h>=75&&h<100?(I.color="success",I.label=At.good):h===100&&(I.color="success-dark",I.label=At.strong),I},[]),T=v.useCallback(h=>{const I=h.reduce((W,z)=>{let se=W;return z?(se++,se):W},0),M=N(I*100/h.length);return g(M),M},[N]),D=()=>u.jsx("ul",{children:e.map((h,I)=>{const M=c[I]?"ds-password-confirmation__list":"ds-password-confirmation__list--disc";return u.jsxs("li",{className:M,children:[c[I]?u.jsx(R,{color:"success-dark",image:"check",testId:"ds-check-icon"}):null,u.jsx(ge,{horizontal:"quark"}),u.jsx(Ie,{children:h.title})]},I+h.title)})});return u.jsxs($e,{className:"ds-password-confirmation",flexDirection:"column",children:[u.jsx(te,{children:u.jsx(Ye,{label:"Senha",name:"password",onChangeHandler:_,testId:`${a}-main-input`,type:"password",value:n})}),u.jsx(te,{children:u.jsx(_s,{color:f==null?void 0:f.color,label:f==null?void 0:f.label,progress:f==null?void 0:f.score})}),u.jsx(te,{children:u.jsx(Ie,{children:s})}),u.jsx(te,{children:D()}),u.jsx(ge,{vertical:"xxs"}),u.jsx(te,{children:u.jsx(Ye,{feedback:w.feedback,label:"Confirme a senha",name:"confirmPassword",onBlurHandler:()=>E(!0),onChangeHandler:m,onFocusHandler:()=>E(!0),status:w.status,testId:`${a}-confirm-input`,type:"password",value:i})})]})};zs.propTypes={onChange:l.func,validationList:l.array,instructionLabel:l.string,testId:l.string},zs.displayName="DsPasswordConfirmation";const Ee={name:"DsStepper",class:"ds-stepper",props:{steps:{type:Array,required:!0},selectedStep:{type:Number,default:0}}},Na=({steps:t,selectedStep:e=Ee.props.selectedStep.default,onChange:s})=>{const[a,n]=v.useState(e),r=(i,o)=>{const c=[`${Ee.class}__button`];return o!==i&&c.push(`${Ee.class}__button--round`),t[i]&&t[i].disabled&&c.push(`${Ee.class}__button--disabled`),c.join(" ")};return v.useEffect(()=>{n(e)},[e]),v.useEffect(()=>{s(a)},[a]),u.jsxs("div",{className:Ee.class,children:[u.jsxs("span",{className:`${Ee.class}__step-counter`,children:["Etapa ",a+1," de ",t==null?void 0:t.length]}),u.jsx("div",{className:`${Ee.class}__step`,children:t.map((i,o)=>u.jsx("div",{className:`${Ee.class}__content`,children:u.jsx("button",{className:r(o,a),"data-testid":`ds-button-${o}`,disabled:i.disabled,onClick:()=>n(o),children:u.jsxs("span",{className:`${Ee.class}__text`,children:[a===o?u.jsx(Xe,{bottom:"none",left:"nano",right:"nano",top:"none",children:u.jsx(R,{className:`${Ee.class}__icon`,fill:!0,image:i.icon,testId:`ds-icon-${o}`})}):u.jsx(R,{className:`${Ee.class}__icon`,fill:!0,image:i.icon,testId:`ds-icon-${o}`}),a===o&&i.label]})})},`${i.name}-${i.label}`))})]})};Na.displayName="DsStepper";const we={name:"Table",class:"ds-table",props:{header:{type:Array,default:[]},items:{type:Array,default:[]},columns:{type:Array,default:[]}}},xa=({item:t,columns:e})=>u.jsx("tr",{className:`${we.class}__row`,children:e.map((s,a)=>{const n=s.align&&`${we.class}__cell--align-${s.align}`;return u.jsx("td",{children:u.jsx("div",{className:[`${we.class}__cell`,n,s.className].filter(r=>r).join(" "),children:t&&t[`${s.name}`]})},a)})});xa.displayName="DsTableRow";const Ba=({columns:t,data:e,className:s})=>u.jsx("div",{className:`${we.class}__wrapper`,children:u.jsxs("table",{className:[`${we.class}`,s].filter(a=>a).join(" "),children:[u.jsx("thead",{className:`${we.class}__head`,children:u.jsx("tr",{className:`${we.class}__row`,children:t==null?void 0:t.map((a,n)=>u.jsx("th",{style:{width:a.size},children:u.jsx("div",{className:[`${we.class}__cell`,a.align&&`${we.class}__cell--align-${a.align}`].filter(r=>r).join(" "),children:a.label})},n))})}),u.jsx("tbody",{className:`${we.class}__body`,children:e&&e.map((a,n)=>u.jsx(xa,{columns:t,item:a},n))})]})});Ba.displayName="DsTable";var Us=(t=>(t.None="",t.Primary="primary",t.Secondary="secondary",t.Neutral="neutral",t.Success="success",t.Warning="warning",t.Danger="danger",t.Info="info",t))(Us||{}),Ze=(t=>(t.Segmented="segmented",t.Navigation="navigation",t))(Ze||{});const ie={name:"DsTabs",class:"ds-tabs",props:{tabs:{type:Array,required:!0},selectedTab:{type:Number,default:0},color:{type:String,default:"primary",options:Object.values(Us)},variant:{type:String,default:"segmented",options:Object.values(Ze)},className:{type:String,default:""},onChange:{type:Function,default:()=>{}}}},bn=({active:t,className:e,color:s,disabled:a,index:n,name:r,title:i,onClick:o,variant:c,tabDomId:d,panelDomId:f,hasPanel:g,tabDataTestId:k})=>{const E=[`${ie.class}__tab`,s&&`${ie.class}__tab-color--${s}`,t&&`${ie.class}__tab--active`,a&&`${ie.class}__tab--disabled`,e].filter(Boolean).join(" "),C=()=>{a||o==null||o(n)},_=m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),C())};return c===Ze.Navigation?u.jsx("button",{"aria-controls":g?f:void 0,"aria-selected":t,className:E,"data-testid":k??`ds-tab-${n}`,disabled:a,id:d,onClick:C,role:"tab",type:"button",children:i}):u.jsx("div",{"aria-disabled":a,"aria-selected":t,className:E,"data-testid":k??`ds-tab-${n}`,id:r,onClick:C,onKeyDown:_,role:"tab",tabIndex:a?-1:0,children:i})};function Hs(t,e){if(t.length===0)return 0;const s=t[e];if(s&&!s.hidden)return e;const a=t.findIndex(n=>!n.hidden);return a>=0?a:0}const Sn=({tabs:t,color:e,selectedTab:s=ie.props.selectedTab.default,className:a,variant:n=ie.props.variant.default,onChange:r,"aria-label":i,"aria-labelledby":o,rootDataTestId:c})=>{const[d,f]=v.useState(()=>Hs(t,s));v.useEffect(()=>{f(Hs(t,s))},[s,t]),v.useEffect(()=>{if(t.length===0)return;const m=t[d];(!m||m.hidden)&&f(Hs(t,d))},[t,d]);const g=v.useMemo(()=>t.map((m,w)=>({tab:m,index:w})).filter(({tab:m})=>!m.hidden),[t]),k=m=>{f(m),r==null||r(m)},E=[ie.class,n===Ze.Navigation&&`${ie.class}--navigation`,a].filter(Boolean).join(" "),C=n===Ze.Navigation,_=t[d];return u.jsxs("div",{"aria-label":i,"aria-labelledby":o,className:E,"data-testid":c??"ds-tabs",children:[u.jsx("div",{className:`${ie.class}__header`,role:C?"tablist":void 0,children:g.map(({tab:m,index:w})=>{const N=`${ie.class}-tab-${m.name??w}`,T=`${ie.class}-panel-${m.name??w}`,D=m.content!==void 0;return u.jsx(bn,{...m,active:d===w,color:e,hasPanel:D,index:w,onClick:()=>k(w),panelDomId:D?T:void 0,tabDomId:N,variant:n},N)})}),C?g.map(({tab:m,index:w})=>{if(m.content===void 0)return null;const N=`${ie.class}-panel-${m.name??w}`,T=`${ie.class}-tab-${m.name??w}`,D=d===w;return u.jsx("div",{"aria-labelledby":T,className:`${ie.class}__panel`,"data-testid":m.panelDataTestId??`ds-tabs-panel-${m.name??w}`,hidden:!D,id:N,role:"tabpanel",tabIndex:D?0:-1,children:m.content},N)}):u.jsx("div",{className:`${ie.class}__content`,children:_?_.content:null})]})};function $a({library:t,children:e,theme:s}){return u.jsx("div",{"data-library":t,"data-theme":s,children:u.jsx("div",{className:"ds-theme",children:e})})}$a.propTypes={library:l.string,children:l.node.isRequired,theme:l.string};var Ws=(t=>(t.TopLeft="top-left",t.TopCenter="top-center",t.TopRight="top-right",t.BottomLeft="bottom-left",t.BottomCenter="bottom-center",t.BottomRight="bottom-right",t))(Ws||{});const je={name:"DsNotificationList",class:"ds-notification-list",props:{position:{type:String,default:"top-right",options:Object.values(Ws)},fluid:{type:Boolean,default:!1},className:{type:String,default:""}}},Ys=({className:t=je.props.className.default,position:e=je.props.position.default,fluid:s=je.props.fluid.default,notifications:a,removeNotification:n})=>{const r=[je.class,`${je.class}--${e}`,s&&`${je.class}--fluid`,t].join(" "),i=o=>{n&&n(o)};return u.jsx("div",{className:r,"data-testid":"ds-notification-list",children:a.map(o=>{const c=o.autoClose??!0,d=o.autoCloseTimer??4e3,f=o.dismissible??!0,g=o.elevation??2,k=o.progressBar??!0;return u.jsx(qs,{autoClose:c,autoCloseTimer:d,dismissible:f,elevation:g,handleClose:()=>i(o.id),id:o.id,message:o.message,progressBar:k,type:o.type},o.id)})})};Ys.propTypes={position:l.oneOf(je.props.position.options),fluid:l.bool,notifications:l.array,removeNotification:l.func},Ys.displayName="DsNotificationList";const at={class:"ds-split-layout"},Ma=({leftContent:t,rightContent:e,leftBackgroundColor:s,rightBackgroundColor:a,reverseOnMobile:n=!1})=>{const r=s?`bg-color__${s}`:"",i=a?`bg-color__${a}`:"",o=n?`${at.class}__content--mobile-order-2`:"",c=n?`${at.class}__content--mobile-order-1`:"",d=`${at.class}__content ${r} ${o}`,f=`${at.class}__content ${i} ${c}`;return u.jsxs("div",{className:at.class,children:[u.jsx("div",{className:d,children:t}),u.jsx("div",{className:f,children:e})]})};Ma.displayName="DsSplitLayout";const nt={name:"TwoColumns",class:"ds-two-columns",props:{}},Ks=({header:t,main:e,sidebar:s,breadcrumb:a})=>u.jsxs(kt,{children:[u.jsxs("div",{className:"ds-grid",children:[u.jsx("div",{className:"ds-grid__row",children:u.jsx("div",{className:"ds-grid__col ds-grid__col-12",children:a})}),u.jsxs("div",{className:`${nt.class}__content ds-grid__row`,children:[u.jsxs("div",{className:"ds-grid__col ds-grid__col--lg-8 ds-grid__col--sm-12 ds-grid__col-12",children:[u.jsx("div",{className:`${nt.class}__header`,children:t}),u.jsx("div",{className:`${nt.class}__main`,children:e})]}),u.jsx("div",{className:`${nt.class}__sidebar ds-grid__col ds-grid__col--lg-4 ds-grid__col--sm-12 ds-grid__col-12`,children:s})]})]}),u.jsx(ge,{vertical:"sm"})]});Ks.propTypes={breadcrumb:l.node,header:l.node,main:l.node,sidebar:l.node},Ks.displayName="DsTwoColumns",p.ButtonColor=$t,p.ButtonElevation=ra,p.ButtonIconPosition=Lt,p.ButtonSize=Vt,p.ButtonVariant=Mt,p.CardColor=lt,p.CardElevation=la,p.ChipColor=Yt,p.ChipIconPosition=Je,p.ChipVariant=Kt,p.DsAccordion=Bs,p.DsAccordionItem=Et,p.DsActiveTags=Aa,p.DsButton=Qe,p.DsCaption=Ut,p.DsCard=Ht,p.DsCarousel=wa,p.DsCheckbox=Wt,p.DsChip=Za,p.DsContainer=kt,p.DsEditableSelect=Ta,p.DsFlexElement=te,p.DsFlexLayout=$e,p.DsGridElement=Ca,p.DsGridLayout=xs,p.DsHR=Zt,p.DsHeading=ot,p.DsIcon=R,p.DsIndicator=kn,p.DsInlineEditable=Ms,p.DsInput=Ye,p.DsLoading=mt,p.DsModal=Ls,p.DsNotification=qs,p.DsNotificationList=Ys,p.DsOption=cs,p.DsParagraph=Ie,p.DsPasswordConfirmation=zs,p.DsProgress=_s,p.DsRadio=ka,p.DsSelect=As,p.DsSpacer=ge,p.DsSplitLayout=Ma,p.DsStepper=Na,p.DsSubtitle=ba,p.DsTable=Ba,p.DsTabs=Sn,p.DsTextArea=Is,p.DsTooltip=qe,p.DsTwoColumns=Ks,p.DsWrapper=Xe,p.EditableSelectSize=$s,p.FlexLayoutAlignItems=gs,p.FlexLayoutDirection=ms,p.FlexLayoutGap=ys,p.FlexLayoutJustifyContent=fs,p.FlexLayoutWrap=vs,p.GridLayoutAlign=bt,p.GridLayoutGap=Ns,p.HRBorderStyle=Rt,p.HRSize=Gt,p.HeadingType=Xt,p.IconColor=jt,p.IconSize=qt,p.IconVariation=Pt,p.IconWeight=zt,p.InputSize=ss,p.InputStatus=as,p.InputTooltipPlacement=ns,p.InputTooltipPosition=rs,p.InputType=ts,p.LoadingBackgroundColor=us,p.LoadingSize=os,p.ModalElevation=Oa,p.ModalVariant=Vs,p.NotificationListPosition=Ws,p.NotificationType=js,p.NotificationVariant=Ps,p.ParagraphType=ds,p.ProgressColor=ps,p.RadioVariant=ks,p.SelectSize=bs,p.SelectStatus=Ss,p.SelectTooltipPlacement=Es,p.SelectTooltipPosition=Cs,p.SpacerSize=yt,p.SubtitleType=ws,p.TabsColor=Us,p.TabsVariant=Ze,p.TextAreaResize=Os,p.TextAreaSize=Ds,p.TextAreaStatus=Fs,p.TextAreaType=Ts,p.ThemeProvider=$a,p.TooltipPlacement=ls,p.TooltipPosition=is,p.WrapperSpace=ze,p.accordionConfig=St,p.accordionItemConfig=Ue,p.activeTagsConfig=yn,p.buttonConfig=X,p.captionConfig=ia,p.cardConfig=Ne,p.carouselConfig=Re,p.checkboxConfig=ae,p.chipConfig=Te,p.containerConfig=st,p.editableSelectConfig=H,p.flexElementConfig=vt,p.flexLayoutConfig=Le,p.gridElementConfig=vn,p.gridLayoutConfig=J,p.headingConfig=We,p.horizontalRuleConfig=Me,p.iconConfig=pe,p.indicatorConfig=Ge,p.inlineEditableConfig=Fa,p.inputConfig=G,p.loadingConfig=he,p.modalConfig=ve,p.notificationConfig=oe,p.notificationListConfig=je,p.optionConfig=Oe,p.paragraphConfig=tt,p.passwordConfirmationConfig=Ct,p.progressConfig=hs,p.radioConfig=me,p.selectConfig=Q,p.spacerConfig=Ke,p.stepperConfig=Ee,p.subtitleConfig=_t,p.tableConfig=we,p.tabsConfig=ie,p.textAreaConfig=ee,p.tooltipConfig=Ae,p.twoColumnsConfig=nt,p.wrapperConfig=Se,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
|
|
19
|
+
*/var Ft,Qs;function Ua(){if(Qs)return Ft;Qs=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;function a(r){if(r==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(r)}function n(){try{if(!Object.assign)return!1;var r=new String("abc");if(r[5]="de",Object.getOwnPropertyNames(r)[0]==="5")return!1;for(var i={},o=0;o<10;o++)i["_"+String.fromCharCode(o)]=o;var c=Object.getOwnPropertyNames(i).map(function(f){return i[f]});if(c.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(f){d[f]=f}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ft=n()?Object.assign:function(r,i){for(var o,c=a(r),d,f=1;f<arguments.length;f++){o=Object(arguments[f]);for(var g in o)e.call(o,g)&&(c[g]=o[g]);if(t){d=t(o);for(var k=0;k<d.length;k++)s.call(o,d[k])&&(c[d[k]]=o[d[k]])}}return c},Ft}var Ot,Js;function It(){if(Js)return Ot;Js=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ot=t,Ot}var Nt,ea;function ta(){return ea||(ea=1,Nt=Function.call.bind(Object.prototype.hasOwnProperty)),Nt}var xt,sa;function Ha(){if(sa)return xt;sa=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=It(),s={},a=ta();t=function(r){var i="Warning: "+r;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function n(r,i,o,c,d){if(process.env.NODE_ENV!=="production"){for(var f in r)if(a(r,f)){var g;try{if(typeof r[f]!="function"){var k=Error((c||"React class")+": "+o+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw k.name="Invariant Violation",k}g=r[f](i,f,c,o,null,e)}catch(C){g=C}if(g&&!(g instanceof Error)&&t((c||"React class")+": type specification of "+o+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof g+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),g instanceof Error&&!(g.message in s)){s[g.message]=!0;var E=d?d():"";t("Failed "+o+" type: "+g.message+(E??""))}}}}return n.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(s={})},xt=n,xt}var Bt,aa;function Wa(){if(aa)return Bt;aa=1;var t=Zs(),e=Ua(),s=It(),a=ta(),n=Ha(),r=function(){};process.env.NODE_ENV!=="production"&&(r=function(o){var c="Warning: "+o;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function i(){return null}return Bt=function(o,c){var d=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function g(y){var A=y&&(d&&y[d]||y[f]);if(typeof A=="function")return A}var k="<<anonymous>>",E={array:w("array"),bigint:w("bigint"),bool:w("boolean"),func:w("function"),number:w("number"),object:w("object"),string:w("string"),symbol:w("symbol"),any:N(),arrayOf:T,element:D(),elementType:h(),instanceOf:I,node:se(),objectOf:W,oneOf:M,oneOfType:z,shape:ce,exact:De};function C(y,A){return y===A?y!==0||1/y===1/A:y!==y&&A!==A}function _(y,A){this.message=y,this.data=A&&typeof A=="object"?A:{},this.stack=""}_.prototype=Error.prototype;function m(y){if(process.env.NODE_ENV!=="production")var A={},j=0;function V(O,L,P,U,S,x,Z){if(U=U||k,x=x||P,Z!==s){if(c){var b=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 b.name="Invariant Violation",b}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var de=U+":"+P;!A[de]&&j<3&&(r("You are manually calling a React.PropTypes validation function for the `"+x+"` prop on `"+U+"`. 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."),A[de]=!0,j++)}}return L[P]==null?O?L[P]===null?new _("The "+S+" `"+x+"` is marked as required "+("in `"+U+"`, but its value is `null`.")):new _("The "+S+" `"+x+"` is marked as required in "+("`"+U+"`, but its value is `undefined`.")):null:y(L,P,U,S,x)}var $=V.bind(null,!1);return $.isRequired=V.bind(null,!0),$}function w(y){function A(j,V,$,O,L,P){var U=j[V],S=le(U);if(S!==y){var x=ke(U);return new _("Invalid "+O+" `"+L+"` of type "+("`"+x+"` supplied to `"+$+"`, expected ")+("`"+y+"`."),{expectedType:y})}return null}return m(A)}function N(){return m(i)}function T(y){function A(j,V,$,O,L){if(typeof y!="function")return new _("Property `"+L+"` of component `"+$+"` has invalid PropType notation inside arrayOf.");var P=j[V];if(!Array.isArray(P)){var U=le(P);return new _("Invalid "+O+" `"+L+"` of type "+("`"+U+"` supplied to `"+$+"`, expected an array."))}for(var S=0;S<P.length;S++){var x=y(P,S,$,O,L+"["+S+"]",s);if(x instanceof Error)return x}return null}return m(A)}function D(){function y(A,j,V,$,O){var L=A[j];if(!o(L)){var P=le(L);return new _("Invalid "+$+" `"+O+"` of type "+("`"+P+"` supplied to `"+V+"`, expected a single ReactElement."))}return null}return m(y)}function h(){function y(A,j,V,$,O){var L=A[j];if(!t.isValidElementType(L)){var P=le(L);return new _("Invalid "+$+" `"+O+"` of type "+("`"+P+"` supplied to `"+V+"`, expected a single ReactElement type."))}return null}return m(y)}function I(y){function A(j,V,$,O,L){if(!(j[V]instanceof y)){var P=y.name||k,U=be(j[V]);return new _("Invalid "+O+" `"+L+"` of type "+("`"+U+"` supplied to `"+$+"`, expected ")+("instance of `"+P+"`."))}return null}return m(A)}function M(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&(arguments.length>1?r("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])."):r("Invalid argument supplied to oneOf, expected an array.")),i;function A(j,V,$,O,L){for(var P=j[V],U=0;U<y.length;U++)if(C(P,y[U]))return null;var S=JSON.stringify(y,function(Z,b){var de=ke(b);return de==="symbol"?String(b):b});return new _("Invalid "+O+" `"+L+"` of value `"+String(P)+"` "+("supplied to `"+$+"`, expected one of "+S+"."))}return m(A)}function W(y){function A(j,V,$,O,L){if(typeof y!="function")return new _("Property `"+L+"` of component `"+$+"` has invalid PropType notation inside objectOf.");var P=j[V],U=le(P);if(U!=="object")return new _("Invalid "+O+" `"+L+"` of type "+("`"+U+"` supplied to `"+$+"`, expected an object."));for(var S in P)if(a(P,S)){var x=y(P,S,$,O,L+"."+S,s);if(x instanceof Error)return x}return null}return m(A)}function z(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&r("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var A=0;A<y.length;A++){var j=y[A];if(typeof j!="function")return r("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Ce(j)+" at index "+A+"."),i}function V($,O,L,P,U){for(var S=[],x=0;x<y.length;x++){var Z=y[x],b=Z($,O,L,P,U,s);if(b==null)return null;b.data&&a(b.data,"expectedType")&&S.push(b.data.expectedType)}var de=S.length>0?", expected one of type ["+S.join(", ")+"]":"";return new _("Invalid "+P+" `"+U+"` supplied to "+("`"+L+"`"+de+"."))}return m(V)}function se(){function y(A,j,V,$,O){return ye(A[j])?null:new _("Invalid "+$+" `"+O+"` supplied to "+("`"+V+"`, expected a ReactNode."))}return m(y)}function ue(y,A,j,V,$){return new _((y||"React class")+": "+A+" type `"+j+"."+V+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+$+"`.")}function ce(y){function A(j,V,$,O,L){var P=j[V],U=le(P);if(U!=="object")return new _("Invalid "+O+" `"+L+"` of type `"+U+"` "+("supplied to `"+$+"`, expected `object`."));for(var S in y){var x=y[S];if(typeof x!="function")return ue($,O,L,S,ke(x));var Z=x(P,S,$,O,L+"."+S,s);if(Z)return Z}return null}return m(A)}function De(y){function A(j,V,$,O,L){var P=j[V],U=le(P);if(U!=="object")return new _("Invalid "+O+" `"+L+"` of type `"+U+"` "+("supplied to `"+$+"`, expected `object`."));var S=e({},j[V],y);for(var x in S){var Z=y[x];if(a(y,x)&&typeof Z!="function")return ue($,O,L,x,ke(Z));if(!Z)return new _("Invalid "+O+" `"+L+"` key `"+x+"` supplied to `"+$+"`.\nBad object: "+JSON.stringify(j[V],null," ")+`
|
|
20
|
+
Valid keys: `+JSON.stringify(Object.keys(y),null," "));var b=Z(P,x,$,O,L+"."+x,s);if(b)return b}return null}return m(A)}function ye(y){switch(typeof y){case"number":case"string":case"undefined":return!0;case"boolean":return!y;case"object":if(Array.isArray(y))return y.every(ye);if(y===null||o(y))return!0;var A=g(y);if(A){var j=A.call(y),V;if(A!==y.entries){for(;!(V=j.next()).done;)if(!ye(V.value))return!1}else for(;!(V=j.next()).done;){var $=V.value;if($&&!ye($[1]))return!1}}else return!1;return!0;default:return!1}}function _e(y,A){return y==="symbol"?!0:A?A["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&A instanceof Symbol:!1}function le(y){var A=typeof y;return Array.isArray(y)?"array":y instanceof RegExp?"object":_e(A,y)?"symbol":A}function ke(y){if(typeof y>"u"||y===null)return""+y;var A=le(y);if(A==="object"){if(y instanceof Date)return"date";if(y instanceof RegExp)return"regexp"}return A}function Ce(y){var A=ke(y);switch(A){case"array":case"object":return"an "+A;case"boolean":case"date":case"regexp":return"a "+A;default:return A}}function be(y){return!y.constructor||!y.constructor.name?k:y.constructor.name}return E.checkPropTypes=n,E.resetWarningCache=n.resetWarningCache,E.PropTypes=E,E},Bt}var $t,na;function Ya(){if(na)return $t;na=1;var t=It();function e(){}function s(){}return s.resetWarningCache=e,$t=function(){function a(i,o,c,d,f,g){if(g!==t){var k=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 k.name="Invariant Violation",k}}a.isRequired=a;function n(){return a}var r={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:n,element:a,elementType:a,instanceOf:n,node:a,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:s,resetWarningCache:e};return r.PropTypes=r,r},$t}if(process.env.NODE_ENV!=="production"){var Ka=Zs(),Xa=!0;Tt.exports=Wa()(Ka.isElement,Xa)}else Tt.exports=Ya()();var Ra=Tt.exports;const l=Pa(Ra);var Mt=(t=>(t.Primary="primary",t.Secondary="secondary",t.Info="info",t.Success="success",t.Danger="danger",t.Warning="warning",t.Neutral="neutral",t))(Mt||{}),Vt=(t=>(t.Solid="solid",t.Outline="outline",t.Text="text",t))(Vt||{}),Lt=(t=>(t.Large="lg",t.Medium="md",t.Small="sm",t))(Lt||{}),jt=(t=>(t.Right="right",t.Left="left",t))(jt||{}),ra=(t=>(t[t.Elevation1=1]="Elevation1",t[t.Elevation2=2]="Elevation2",t[t.Elevation3=3]="Elevation3",t[t.Elevation4=4]="Elevation4",t))(ra||{});const X={name:"Button",class:"ds-button",props:{color:{type:String,default:"primary",options:Object.values(Mt)},variant:{type:String,default:"solid",options:Object.values(Vt)},size:{type:String,default:"md",options:Object.values(Lt)},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:"right",options:Object.values(jt)},id:{type:String,default:""},testId:{type:String,default:"ds-button-test"},fullSize:{type:Boolean,default:!1}}};var Pt=(t=>(t.Primary="primary",t.PrimaryLightest="primary-lightest",t.PrimaryLighter="primary-lighter",t.PrimaryLight="primary-light",t.PrimaryDark="primary-dark",t.PrimaryDarker="primary-darker",t.Neutral90="neutral-90",t.Neutral80="neutral-80",t.Neutral60="neutral-60",t.Neutral40="neutral-40",t.Neutral20="neutral-20",t.Neutral10="neutral-10",t.Neutral05="neutral-05",t.Neutral00="neutral-00",t.Secondary="secondary",t.SecondaryLightest="secondary-lightest",t.SecondaryLighter="secondary-lighter",t.SecondaryLight="secondary-light",t.SecondaryDark="secondary-dark",t.SecondaryDarker="secondary-darker",t.Success="success",t.SuccessLighter="success-lighter",t.SuccessLight="success-light",t.SuccessDark="success-dark",t.Warning="warning",t.WarningLighter="warning-lighter",t.WarningLight="warning-light",t.WarningDark="warning-dark",t.Danger="danger",t.DangerLighter="danger-lighter",t.DangerLight="danger-light",t.DangerDark="danger-dark",t.Info="info",t.InfoLighter="info-lighter",t.InfoLight="info-light",t.InfoDark="info-dark",t))(Pt||{}),qt=(t=>(t.Outlined="outlined",t.Rounded="rounded",t.Sharp="sharp",t))(qt||{}),zt=(t=>(t.XXS="xxs",t.XS="xs",t.SM="sm",t.MD="md",t.LG="lg",t.XL="xl",t.XXL="xxl",t.XXXL="xxxl",t.Huge="huge",t))(zt||{}),Ut=(t=>(t.Bold="bold",t.Semibold="semibold",t.Medium="medium",t.Regular="regular",t.Light="light",t.Extralight="extralight",t))(Ut||{});const pe={name:"Icon",class:"ds-icon",props:{color:{type:String,default:"neutral-90",options:Object.values(Pt)},image:{type:String,default:"settings"},variation:{type:String,default:"outlined",options:Object.values(qt)},size:{type:String,default:"md",options:Object.values(zt)},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:"semibold",options:Object.values(Ut)},onClick:{type:Function,default:()=>({})}}};var Qe=(t=>(t["primary-darker"]="primary--darker",t["primary-dark"]="primary--dark",t["primary-light"]="primary--light",t["primary-lighter"]="primary--lighter",t["primary-lightest"]="primary--lightest",t["secondary-darker"]="secondary--darker",t["secondary-dark"]="secondary--dark",t["secondary-light"]="secondary--light",t["secondary-lighter"]="secondary--lighter",t["secondary-lightest"]="secondary--lightest",t["success-dark"]="success--dark",t["success-light"]="success--light",t["success-lighter"]="success--lighter",t["warning-dark"]="warning--dark",t["warning-light"]="warning--light",t["warning-lighter"]="warning--lighter",t["danger-dark"]="danger--dark",t["danger-light"]="danger--light",t["danger-lighter"]="danger--lighter",t["info-dark"]="info--dark",t["info-light"]="info--light",t["info-lighter"]="info--lighter",t))(Qe||{});const Ga={bold:700,semibold:600,medium:500,regular:400,light:300,extralight:200},R=({image:t=pe.props.image.default,color:e=pe.props.color.default,className:s,size:a=pe.props.size.default,fill:n=pe.props.fill.default,weight:r=pe.props.weight.default,testId:i=pe.props.testId.default,onClick:o=pe.props.onClick.default})=>{const c="material-symbols-rounded",d=e&&pe.props.color.options.find(g=>g===e)&&`color__${Qe[e]??e}`,f=v.useMemo(()=>({fontVariationSettings:`'FILL' ${n?1:0}, 'GRAD' 0,'wght' ${Ga[r]}, 'opsz' 48`}),[r,n]);return u.jsx("i",{className:[`${pe.class}--${a}`,pe.class,c,d,s].filter(g=>g).join(" "),"data-testid":i,onClick:o,style:f,translate:"no",children:t})};R.propTypes={color:l.oneOf(pe.props.color.options),image:l.string,fontVariationSettings:l.object,size:l.oneOf(pe.props.size.options),fill:l.bool,weight:l.oneOf(pe.props.weight.options),onClick:l.func},R.displayName="DsIcon";const Je=({children:t,className:e,onClick:s,size:a=X.props.size.default,disabled:n=X.props.disabled.default,icon:r=X.props.icon.default,id:i=X.props.id.default,testId:o=X.props.testId.default,elevation:c,variant:d=X.props.variant.default,color:f=X.props.color.default,iconFill:g=X.props.iconFill.default,iconPosition:k=X.props.iconPosition.default,fullSize:E=X.props.fullSize.default,trackingData:C})=>{const _=a&&X.props.size.options.find(W=>W===a)?`${X.class}--${a}`:`${X.class}__${X.props.size.default}`,m=n&&`${X.class}--disabled`,w=`${X.class}__${f}--${d}`,N=c&&`${X.class}--elevation-${c}`,T=r&&`${X.class}--with-icon`,D=E?`${X.class}--full-size`:"",h=k==="right"?`${X.class}__icon`:`${X.class}__icon--left`,I=k==="right"?`${X.class}__text`:`${X.class}__text--reversed`,M=W=>{C&&ja(C),s&&s(W)};return u.jsx("button",{className:[X.class,D,m,_,w,N,T,e].filter(W=>W).join(" "),"data-testid":o,disabled:n,id:i,onClick:n?void 0:M,children:u.jsxs("span",{className:["ds-button__text",I].join(" "),children:[t,r&&u.jsx(R,{className:["ds-button__icon",h].join(" "),fill:g,image:r,size:a})]})})};Je.propTypes={color:l.oneOf(X.props.color.options),variant:l.oneOf(X.props.variant.options),size:l.oneOf(X.props.size.options),disabled:l.bool,icon:l.string,iconFill:l.bool,iconPosition:l.oneOf(X.props.iconPosition.options),testId:l.string,id:l.string,fullSize:l.bool,trackingData:l.object},Je.displayName="DsButton";const ia={name:"Caption",class:"ds-caption"},Ht=({children:t,className:e,testId:s="ds-caption-test"})=>u.jsx("p",{className:[ia.class,e].filter(a=>a).join(" "),"data-testid":s,children:t});Ht.propTypes={children:l.node.isRequired,className:l.string,testId:l.string},Ht.displayName="DsCaption";var lt=(t=>(t.None="",t.PrimaryDarker="primary-darker",t.PrimaryDark="primary-dark",t.Primary="primary",t.PrimaryLight="primary-light",t.PrimaryLighter="primary-lighter",t.PrimaryLightest="primary-lightest",t.SecondaryDarker="secondary-darker",t.SecondaryDark="secondary-dark",t.Secondary="secondary",t.SecondaryLight="secondary-light",t.SecondaryLighter="secondary-lighter",t.SecondaryLightest="secondary-lightest",t.Neutral90="neutral-90",t.Neutral80="neutral-80",t.Neutral60="neutral-60",t.Neutral40="neutral-40",t.Neutral20="neutral-20",t.Neutral10="neutral-10",t.Neutral05="neutral-05",t.Neutral00="neutral-00",t.SuccessDark="success-dark",t.Success="success",t.SuccessLight="success-light",t.SuccessLighter="success-lighter",t.WarningDark="warning-dark",t.Warning="warning",t.WarningLight="warning-light",t.WarningLighter="warning-lighter",t.DangerDark="danger-dark",t.Danger="danger",t.DangerLight="danger-light",t.DangerLighter="danger-lighter",t.InfoDark="info-dark",t.Info="info",t.InfoLight="info-light",t.InfoLighter="info-lighter",t))(lt||{}),la=(t=>(t[t.Elevation=0]="Elevation",t[t.Elevation1=1]="Elevation1",t[t.Elevation2=2]="Elevation2",t[t.Elevation3=3]="Elevation3",t[t.Elevation4=4]="Elevation4",t))(la||{});const Ne={name:"Card",class:"ds-card",props:{backgroundColor:{type:String,default:"",options:Object.values(lt)},borderColor:{type:String,default:"",options:Object.values(lt)},elevation:{type:Number,default:0,options:[0,1,2,3,4]},id:{type:String,default:""},testId:{type:String,default:"ds-card"}}},Wt=({id:t,testId:e=Ne.props.testId.default,children:s,className:a,elevation:n=Ne.props.elevation.default,backgroundColor:r=Ne.props.backgroundColor.default,borderColor:i=Ne.props.borderColor.default})=>{const o=n&&`elevation-${n}`,c=i&&`border-color__${Qe[i]??i}`,d=r&&`bg-color__${Qe[r]??r}`;return u.jsx("div",{className:[Ne.class,a,o,c,d].filter(f=>f).join(" "),"data-testid":e,id:t,children:s})};Wt.propTypes={id:l.string,testId:l.string,backgroundColor:l.oneOf(Ne.props.backgroundColor.options),borderColor:l.oneOf(Ne.props.borderColor.options),elevation:l.oneOf(Ne.props.elevation.options)},Wt.displayName="DsCard";const ae={name:"Checkbox",class:"ds-checkbox",props:{name:{type:String,required:!1},testId:{type:String,default:"ds-checkbox-test"},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:()=>({})}}},Yt=v.forwardRef(({id:t,className:e,name:s,testId:a=ae.props.testId.default,label:n=ae.props.label.default,description:r=ae.props.description.default,checked:i=ae.props.checked.default,disabled:o=ae.props.disabled.default,changeByChecked:c=ae.props.changeByChecked.default,onChangeHandler:d},f)=>{const g=c??!1,k=i??!1,[E,C]=v.useState(k),_={image:E?"check_box":"check_box_outline_blank",class:E?`${ae.class}__icon--checked`:`${ae.class}__icon--unchecked`},m=o&&`${ae.class}--disabled`,w=N=>{o||(C(T=>!T),d&&d(N))};return v.useEffect(()=>{g&&C(i)},[i,g]),u.jsxs("label",{className:[ae.class,m,e].join(" "),htmlFor:t||s,children:[u.jsx("input",{checked:E,className:`${ae.class}__input`,"data-testid":a,disabled:o,id:t||s,name:s,onChange:w,ref:f,type:"checkbox"}),u.jsx(R,{className:`${ae.class}__icon ${_.class}`,fill:!0,image:_.image,size:"xxl",testId:`${a}-icon`}),(r||n)&&u.jsxs("div",{className:`${ae.class}__label`,children:[n&&u.jsx("label",{className:`${ae.class}__label-title`,htmlFor:t||s,children:n}),r&&u.jsx("label",{className:`${ae.class}__label-description`,htmlFor:t||s,children:r})]})]})});Yt.propTypes={label:l.oneOfType([l.string,l.element]),name:l.string,className:l.string,testId:l.string,description:l.oneOfType([l.string,l.element]),checked:l.bool,disabled:l.bool},Yt.displayName="DsCheckbox";var Kt=(t=>(t.Primary="primary",t.Secondary="secondary",t.Info="info",t.Success="success",t.Danger="danger",t.Warning="warning",t.Neutral="neutral",t))(Kt||{}),Xt=(t=>(t.Solid="solid",t.Light="light",t))(Xt||{}),et=(t=>(t.Left="left",t.Right="right",t))(et||{});const Te={name:"DsChip",class:"ds-chip",props:{color:{type:String,default:"primary",options:Object.values(Kt)},variant:{type:String,default:"solid",options:Object.values(Xt)},iconPosition:{type:String,default:"left",options:Object.values(et)}}},Za=({label:t,color:e=Te.props.color.default,variant:s=Te.props.variant.default,icon:a,iconPosition:n=Te.props.iconPosition.default,className:r,title:i,testId:o="ds-chip"})=>{const c=[Te.class,`${Te.class}__${e}--${s}`,a&&`${Te.class}--with-icon`,a&&`${Te.class}--icon-${n}`,r].filter(Boolean).join(" "),d=a?u.jsx("span",{className:`${Te.class}__icon`,"data-testid":`${o}-icon`,children:a}):null;return u.jsxs("span",{className:c,"data-testid":o,title:i,children:[n===et.Left&&d,u.jsx("span",{className:`${Te.class}__label`,children:t}),n===et.Right&&d]})};var Rt=(t=>(t.Heading1="heading-1",t.Heading2="heading-2",t.Heading3="heading-3",t.Heading4="heading-4",t.Heading5="heading-5",t.Heading6="heading-6",t))(Rt||{});const We={name:"Heading",class:"ds-heading",props:{type:{type:String,default:"heading-1",options:Object.values(Rt)}}},ot=({children:t,testId:e="ds-heading-test",type:s=We.props.type.default,className:a})=>{const n={"heading-1":"h1","heading-2":"h2","heading-3":"h3","heading-4":"h4","heading-5":"h5","heading-6":"h6"},r=s.replace("heading-",""),i=We.props.type.options.find(d=>d===s)&&`${We.class}--${r}`,c=n[s];return u.jsx(c,{className:[We.class,i,a].filter(d=>d).join(" "),"data-testid":e,children:t})};ot.propTypes={className:l.string,testId:l.string,type:l.oneOf(We.props.type.options)},ot.displayName="DsHeading";var Gt=(t=>(t.None="",t.Dashed="dashed",t.Dotted="dotted",t))(Gt||{}),Zt=(t=>(t.None="",t.Small="small",t.Large="large",t))(Zt||{});const Me={name:"HR",class:"ds-hr",props:{borderStyle:{type:String,default:"",options:Object.values(Gt)},size:{type:String,default:"",options:Object.values(Zt)}}};function oa(t,e,s){const a=s.props[t];return a.options&&a.options.some(n=>n===e)?`${s.class}--${e}`:""}const Qt=({size:t=Me.props.size.default,borderStyle:e=Me.props.borderStyle.default})=>{const s=oa("size",t,Me),a=oa("borderStyle",e,Me);return u.jsx("hr",{className:`${Me.class} ${s} ${a}`.trim()})};Qt.propTypes={size:l.oneOf(Me.props.size.options),borderStyle:l.oneOf(Me.props.borderStyle.options)},Qt.displayName="DsHR";function Ve(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 ca(t,e){return Array.isArray(e)?ca(t,(s,a)=>e.includes(a)):Object.entries(t).reduce((s,a)=>{let[n,r]=a;return e(r,n)&&(s[n]=r),s},{})}const F={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Qa(t){switch(t){case F.LEFT:return F.FORCE_LEFT;case F.RIGHT:return F.FORCE_RIGHT;default:return t}}function Jt(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function ut(t,e){if(e===t)return!0;const s=Array.isArray(e),a=Array.isArray(t);let n;if(s&&a){if(e.length!=t.length)return!1;for(n=0;n<e.length;n++)if(!ut(e[n],t[n]))return!1;return!0}if(s!=a)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){const r=e instanceof Date,i=t instanceof Date;if(r&&i)return e.getTime()==t.getTime();if(r!=i)return!1;const o=e instanceof RegExp,c=t instanceof RegExp;if(o&&c)return e.toString()==t.toString();if(o!=c)return!1;const d=Object.keys(e);for(n=0;n<d.length;n++)if(!Object.prototype.hasOwnProperty.call(t,d[n]))return!1;for(n=0;n<d.length;n++)if(!ut(t[d[n]],e[d[n]]))return!1;return!0}else if(e&&t&&typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();return!1}class Ja{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?F.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?F.RIGHT:F.LEFT}}function B(t,e){return new B.InputMask(t,e)}function da(t){if(t==null)throw new Error("mask property should be defined");return t instanceof RegExp?B.MaskedRegExp:Ve(t)?B.MaskedPattern:t===Date?B.MaskedDate:t===Number?B.MaskedNumber:Array.isArray(t)||t===Array?B.MaskedDynamic:B.Masked&&t.prototype instanceof B.Masked?t:B.Masked&&t instanceof B.Masked?t.constructor:t instanceof Function?B.MaskedFunction:(console.warn("Mask not found for mask",t),B.Masked)}function tt(t){if(!t)throw new Error("Options in not defined");if(B.Masked){if(t.prototype instanceof B.Masked)return{mask:t};const{mask:e=void 0,...s}=t instanceof B.Masked?{mask:t}:ua(t)&&t.mask instanceof B.Masked?t:{};if(e){const a=e.mask;return{...ca(e,(n,r)=>!r.startsWith("_")),mask:e.constructor,_mask:a,...s}}}return ua(t)?{...t}:{mask:t}}function xe(t){if(B.Masked&&t instanceof B.Masked)return t;const e=tt(t),s=da(e.mask);if(!s)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===s&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new s(e)}B.createMask=xe;class es{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,s){if(!(e==null||s==null||e===this.selectionStart&&s===this.selectionEnd))try{this._unsafeSelect(e,s)}catch{}}get isActive(){return!1}}B.MaskElement=es;const pa=90,en=89;class ct extends es{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,s,a;return(e=(s=(a=this.input).getRootNode)==null?void 0:s.call(a))!=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===pa&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===en&&e.ctrlKey))return e.preventDefault(),this._handlers.redo(e);if(this._handlers.undo&&e.keyCode===pa&&(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={}}}B.HTMLMaskElement=ct;class tn extends ct{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,s){this.input.setSelectionRange(e,s)}get value(){return this.input.value}set value(e){this.input.value=e}}B.HTMLMaskElement=ct;class ha extends ct{get _unsafeSelectionStart(){const e=this.rootElement,s=e.getSelection&&e.getSelection(),a=s&&s.anchorOffset,n=s&&s.focusOffset;return n==null||a==null||a<n?a:n}get _unsafeSelectionEnd(){const e=this.rootElement,s=e.getSelection&&e.getSelection(),a=s&&s.anchorOffset,n=s&&s.focusOffset;return n==null||a==null||a>n?a:n}_unsafeSelect(e,s){if(!this.rootElement.createRange)return;const a=this.rootElement.createRange();a.setStart(this.input.firstChild||this.input,e),a.setEnd(this.input.lastChild||this.input,s);const n=this.rootElement,r=n.getSelection&&n.getSelection();r&&(r.removeAllRanges(),r.addRange(a))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}B.HTMLContenteditableMaskElement=ha;class dt{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>dt.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}}dt.MAX_LENGTH=100;class sn{constructor(e,s){this.el=e instanceof es?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new ha(e):new tn(e),this.masked=xe(s),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new dt,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.updateValue(),this._onChange()}maskEquals(e){var s;return e==null||((s=this.masked)==null?void 0:s.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof B.Masked)&&this.masked.constructor===da(e)){this.masked.updateOptions({mask:e});return}const s=e instanceof B.Masked?e:xe({mask:e});s.unmaskedValue=this.masked.unmaskedValue,this.masked=s}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,s){const a=this._listeners[e];a&&a.forEach(n=>n(s))}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 s=this.masked.unmaskedValue,a=this.masked.value,n=this.masked.rawInputValue,r=this.displayValue,i=this.unmaskedValue!==s||this.value!==a||this._rawInputValue!==n;this._unmaskedValue=s,this._value=a,this._rawInputValue=n,this.el.value!==r&&(this.el.value=r),e==="auto"?this.alignCursor():e!=null&&(this.cursorPos=e),i&&this._fireChangeEvents(),!this._historyChanging&&(i||this.history.isEmpty)&&this.history.push({unmaskedValue:s,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:s,...a}=e,n=!this.maskEquals(s),r=this.masked.optionsIsChanged(a);n&&(this.mask=s),r&&this.masked.updateOptions(a),(n||r)&&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,F.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,s){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(s),this}off(e,s){if(!this._listeners[e])return this;if(!s)return delete this._listeners[e],this;const a=this._listeners[e].indexOf(s);return a>=0&&this._listeners[e].splice(a,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const s=new Ja({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),a=this.masked.rawInputValue,n=this.masked.splice(s.startChangePos,s.removed.length,s.inserted,s.removeDirection,{input:!0,raw:!0}).offset,r=a===this.masked.rawInputValue?s.removeDirection:F.NONE;let i=this.masked.nearestInputPos(s.startChangePos+n,r);r!==F.NONE&&(i=this.masked.nearestInputPos(i,F.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}}B.InputMask=sn;class q{static normalize(e){return Array.isArray(e)?e:[e,new q]}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}}B.ChangeDetails=q;class Fe{constructor(e,s,a){e===void 0&&(e=""),s===void 0&&(s=0),this.value=e,this.from=s,this.stop=a}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 s=this.value[0];return this.value=this.value.slice(1),s}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class ne{constructor(e){this._value="",this._update({...ne.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,s){s===void 0&&(s={input:!0}),this.reset(),this.append(e,s,""),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,s){return e}totalInputPositions(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),Math.min(this.displayValue.length,s-e)}extractInput(e,s,a){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),this.displayValue.slice(e,s)}extractTail(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),new Fe(this.extractInput(e,s),e)}appendTail(e){return Ve(e)&&(e=new Fe(String(e))),e.appendTo(this)}_appendCharRaw(e,s){return e?(this._value+=e,new q({inserted:e,rawInserted:e})):new q}_appendChar(e,s,a){s===void 0&&(s={});const n=this.state;let r;if([e,r]=this.doPrepareChar(e,s),e&&(r=r.aggregate(this._appendCharRaw(e,s)),!r.rawInserted&&this.autofix==="pad")){const i=this.state;this.state=n;let o=this.pad(s);const c=this._appendCharRaw(e,s);o=o.aggregate(c),c.rawInserted||o.equals(r)?r=o:this.state=i}if(r.inserted){let i,o=this.doValidate(s)!==!1;if(o&&a!=null){const c=this.state;if(this.overwrite===!0){i=a.state;for(let f=0;f<r.rawInserted.length;++f)a.unshift(this.displayValue.length-r.tailShift)}let d=this.appendTail(a);if(o=d.rawInserted.length===a.toString().length,!(o&&d.inserted)&&this.overwrite==="shift"){this.state=c,i=a.state;for(let f=0;f<r.rawInserted.length;++f)a.shift();d=this.appendTail(a),o=d.rawInserted.length===a.toString().length}o&&d.inserted&&(this.state=c)}o||(r=new q,this.state=n,a&&i&&(a.state=i))}return r}_appendPlaceholder(){return new q}_appendEager(){return new q}append(e,s,a){if(!Ve(e))throw new Error("value should be string");const n=Ve(a)?new Fe(String(a)):a;s!=null&&s.tail&&(s._beforeTailState=this.state);let r;[e,r]=this.doPrepare(e,s);for(let i=0;i<e.length;++i){const o=this._appendChar(e[i],s,n);if(!o.rawInserted&&!this.doSkipInvalid(e[i],s,n))break;r.aggregate(o)}return(this.eager===!0||this.eager==="append")&&s!=null&&s.input&&e&&r.aggregate(this._appendEager()),n!=null&&(r.tailShift+=this.appendTail(n).tailShift),r}remove(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(s),new q}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const s=this.rawInputValue,a=this.value,n=e();return this.rawInputValue=s,this.value&&this.value!==a&&a.indexOf(this.value)===0&&(this.append(a.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,n}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const s=this.state,a=e(this);return this.state=s,delete this._isolated,a}doSkipInvalid(e,s,a){return!!this.skipInvalid}doPrepare(e,s){return s===void 0&&(s={}),q.normalize(this.prepare?this.prepare(e,this,s):e)}doPrepareChar(e,s){return s===void 0&&(s={}),q.normalize(this.prepareChar?this.prepareChar(e,this,s):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,s,a,n,r){a===void 0&&(a=""),n===void 0&&(n=F.NONE),r===void 0&&(r={input:!0});const i=e+s,o=this.extractTail(i),c=this.eager===!0||this.eager==="remove";let d;c&&(n=Qa(n),d=this.extractInput(0,i,{raw:!0}));let f=e;const g=new q;if(n!==F.NONE&&(f=this.nearestInputPos(e,s>1&&e!==0&&!c?F.NONE:n),g.tailShift=f-e),g.aggregate(this.remove(f)),c&&n!==F.NONE&&d===this.rawInputValue)if(n===F.FORCE_LEFT){let k;for(;d===this.rawInputValue&&(k=this.displayValue.length);)g.aggregate(new q({tailShift:-1})).aggregate(this.remove(k-1))}else n===F.FORCE_RIGHT&&o.unshift();return g.aggregate(this.append(a,r,o))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!ut(this,e)}typedValueEquals(e){const s=this.typedValue;return e===s||ne.EMPTY_VALUES.includes(e)&&ne.EMPTY_VALUES.includes(s)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new q}}ne.DEFAULTS={skipInvalid:!0},ne.EMPTY_VALUES=[void 0,null,""],B.Masked=ne;class Pe{constructor(e,s){e===void 0&&(e=[]),s===void 0&&(s=0),this.chunks=e,this.from=s}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=Ve(e)?new Fe(String(e)):e;const s=this.chunks[this.chunks.length-1],a=s&&(s.stop===e.stop||e.stop==null)&&e.from===s.from+s.toString().length;if(e instanceof Fe)a?s.extend(e.toString()):this.chunks.push(e);else if(e instanceof Pe){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 B.MaskedPattern))return new Fe(this.toString()).appendTo(e);const s=new q;for(let a=0;a<this.chunks.length;++a){const n=this.chunks[a],r=e._mapPosToBlock(e.displayValue.length),i=n.stop;let o;if(i!=null&&(!r||r.index<=i)&&((n instanceof Pe||e._stops.indexOf(i)>=0)&&s.aggregate(e._appendPlaceholder(i)),o=n instanceof Pe&&e._blocks[i]),o){const c=o.appendTail(n);s.aggregate(c);const d=n.toString().slice(c.rawInserted.length);d&&s.aggregate(e.append(d,{tail:!0}))}else s.aggregate(e.append(n.toString(),{tail:!0}))}return s}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:s,...a}=e;Object.assign(this,a),this.chunks=s.map(n=>{const r="chunks"in n?new Pe:new Fe;return r.state=n,r})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const s=e!=null?e-this.from:e;let a=0;for(;a<this.chunks.length;){const n=this.chunks[a],r=n.unshift(s);if(n.toString()){if(!r)break;++a}else this.chunks.splice(a,1);if(r)return r}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const s=this.chunks[e],a=s.shift();if(s.toString()){if(!a)break;--e}else this.chunks.splice(e,1);if(a)return a}return""}}class an{constructor(e,s){this.masked=e,this._log=[];const{offset:a,index:n}=e._mapPosToBlock(s)||(s<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=a,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=((s=this.block)==null?void 0:s.displayValue.length)||0){var s;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,F.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,F.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,F.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,F.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,F.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,F.NONE),!0})}}class fa{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,s){return e===void 0&&(e=0),s===void 0&&(s=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(s),this._value||(this._isRawInput=!1),new q}nearestInputPos(e,s){s===void 0&&(s=F.NONE);const a=0,n=this._value.length;switch(s){case F.LEFT:case F.FORCE_LEFT:return a;case F.NONE:case F.RIGHT:case F.FORCE_RIGHT:default:return n}}totalInputPositions(e,s){return e===void 0&&(e=0),s===void 0&&(s=this._value.length),this._isRawInput?s-e:0}extractInput(e,s,a){return e===void 0&&(e=0),s===void 0&&(s=this._value.length),a===void 0&&(a={}),a.raw&&this._isRawInput&&this._value.slice(e,s)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,s){if(s===void 0&&(s={}),this.isFilled)return new q;const a=this.eager===!0||this.eager==="append",r=this.char===e&&(this.isUnmasking||s.input||s.raw)&&(!s.raw||!a)&&!s.tail,i=new q({inserted:this.char,rawInserted:r?this.char:""});return this._value=this.char,this._isRawInput=r&&(s.raw||s.input),i}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new q;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new Fe("")}appendTail(e){return Ve(e)&&(e=new Fe(String(e))),e.appendTo(this)}append(e,s,a){const n=this._appendChar(e[0],s);return a!=null&&(n.tailShift+=this.appendTail(a).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 pt{constructor(e){const{parent:s,isOptional:a,placeholderChar:n,displayChar:r,lazy:i,eager:o,...c}=e;this.masked=xe(c),Object.assign(this,{parent:s,isOptional:a,placeholderChar:n,displayChar:r,lazy:i,eager:o})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.value.length),e===0&&s>=1?(this.isFilled=!1,this.masked.remove(e,s)):new q}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,s){if(s===void 0&&(s={}),this.isFilled)return new q;const a=this.masked.state;let n=this.masked._appendChar(e,this.currentMaskFlags(s));return n.inserted&&this.doValidate(s)===!1&&(n=new q,this.masked.state=a),!n.inserted&&!this.isOptional&&!this.lazy&&!s.input&&(n.inserted=this.placeholderChar),n.skip=!n.inserted&&!this.isOptional,this.isFilled=!!n.inserted,n}append(e,s,a){return this.masked.append(e,this.currentMaskFlags(s),a)}_appendPlaceholder(){return this.isFilled||this.isOptional?new q:(this.isFilled=!0,new q({inserted:this.placeholderChar}))}_appendEager(){return new q}extractTail(e,s){return this.masked.extractTail(e,s)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,s,a){return e===void 0&&(e=0),s===void 0&&(s=this.value.length),this.masked.extractInput(e,s,a)}nearestInputPos(e,s){s===void 0&&(s=F.NONE);const a=0,n=this.value.length,r=Math.min(Math.max(e,a),n);switch(s){case F.LEFT:case F.FORCE_LEFT:return this.isComplete?r:a;case F.RIGHT:case F.FORCE_RIGHT:return this.isComplete?r:n;case F.NONE:default:return r}}totalInputPositions(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.value.length),this.value.slice(e,s).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 s;return{...e,_beforeTailState:(e==null||(s=e._beforeTailState)==null?void 0:s.masked)||(e==null?void 0:e._beforeTailState)}}pad(e){return new q}}pt.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 nn extends ne{updateOptions(e){super.updateOptions(e)}_update(e){const s=e.mask;s&&(e.validate=a=>a.search(s)>=0),super._update(e)}}B.MaskedRegExp=nn;class re extends ne{constructor(e){super({...re.DEFAULTS,...e,definitions:Object.assign({},pt.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 s=this.mask;if(!s||!e)return;let a=!1,n=!1;for(let r=0;r<s.length;++r){if(this.blocks){const d=s.slice(r),f=Object.keys(this.blocks).filter(k=>d.indexOf(k)===0);f.sort((k,E)=>E.length-k.length);const g=f[0];if(g){const{expose:k,repeat:E,...C}=tt(this.blocks[g]),_={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...C,repeat:E,parent:this},m=E!=null?new B.RepeatBlock(_):xe(_);m&&(this._blocks.push(m),k&&(this.exposeBlock=m),this._maskedBlocks[g]||(this._maskedBlocks[g]=[]),this._maskedBlocks[g].push(this._blocks.length-1)),r+=g.length-1;continue}}let i=s[r],o=i in e;if(i===re.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(i==="{"||i==="}"){a=!a;continue}if(i==="["||i==="]"){n=!n;continue}if(i===re.ESCAPE_CHAR){if(++r,i=s[r],!i)break;o=!1}const c=o?new pt({isOptional:n,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...tt(e[i]),parent:this}):new fa({char:i,eager:this.eager,isUnmasking:a});this._blocks.push(c)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e){this.reset();return}const{_blocks:s,...a}=e;this._blocks.forEach((n,r)=>n.state=s[r]),super.state=a}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,s)=>e+=s.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const s=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(s),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,s)=>e+=s.value,"")}set value(e){if(this.exposeBlock){const s=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(s),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const s=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(s),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,s)=>e+=s.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const s=new q;let a=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(a==null)return s;this._blocks[a].isFilled&&++a;for(let n=a;n<this._blocks.length;++n){const r=this._blocks[n]._appendEager();if(!r.inserted)break;s.aggregate(r)}return s}_appendCharRaw(e,s){s===void 0&&(s={});const a=this._mapPosToBlock(this.displayValue.length),n=new q;if(!a)return n;for(let i=a.index,o;o=this._blocks[i];++i){var r;const c=o._appendChar(e,{...s,_beforeTailState:(r=s._beforeTailState)==null||(r=r._blocks)==null?void 0:r[i]});if(n.aggregate(c),c.consumed)break}return n}extractTail(e,s){e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length);const a=new Pe;return e===s||this._forEachBlocksInRange(e,s,(n,r,i,o)=>{const c=n.extractTail(i,o);c.stop=this._findStopBefore(r),c.from=this._blockStartPos(r),c instanceof Pe&&(c.blockIndex=r),a.extend(c)}),a}extractInput(e,s,a){if(e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),a===void 0&&(a={}),e===s)return"";let n="";return this._forEachBlocksInRange(e,s,(r,i,o,c)=>{n+=r.extractInput(o,c,a)}),n}_findStopBefore(e){let s;for(let a=0;a<this._stops.length;++a){const n=this._stops[a];if(n<=e)s=n;else break}return s}_appendPlaceholder(e){const s=new q;if(this.lazy&&e==null)return s;const a=this._mapPosToBlock(this.displayValue.length);if(!a)return s;const n=a.index,r=e??this._blocks.length;return this._blocks.slice(n,r).forEach(i=>{if(!i.lazy||e!=null){var o;s.aggregate(i._appendPlaceholder((o=i._blocks)==null?void 0:o.length))}}),s}_mapPosToBlock(e){let s="";for(let a=0;a<this._blocks.length;++a){const n=this._blocks[a],r=s.length;if(s+=n.displayValue,e<=s.length)return{index:a,offset:e-r}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((s,a)=>s+=a.displayValue.length,0)}_forEachBlocksInRange(e,s,a){s===void 0&&(s=this.displayValue.length);const n=this._mapPosToBlock(e);if(n){const r=this._mapPosToBlock(s),i=r&&n.index===r.index,o=n.offset,c=r&&i?r.offset:this._blocks[n.index].displayValue.length;if(a(this._blocks[n.index],n.index,o,c),r&&!i){for(let d=n.index+1;d<r.index;++d)a(this._blocks[d],d,0,this._blocks[d].displayValue.length);a(this._blocks[r.index],r.index,0,r.offset)}}}remove(e,s){e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length);const a=super.remove(e,s);return this._forEachBlocksInRange(e,s,(n,r,i,o)=>{a.aggregate(n.remove(i,o))}),a}nearestInputPos(e,s){if(s===void 0&&(s=F.NONE),!this._blocks.length)return 0;const a=new an(this,e);if(s===F.NONE)return a.pushRightBeforeInput()||(a.popState(),a.pushLeftBeforeInput())?a.pos:this.displayValue.length;if(s===F.LEFT||s===F.FORCE_LEFT){if(s===F.LEFT){if(a.pushRightBeforeFilled(),a.ok&&a.pos===e)return e;a.popState()}if(a.pushLeftBeforeInput(),a.pushLeftBeforeRequired(),a.pushLeftBeforeFilled(),s===F.LEFT){if(a.pushRightBeforeInput(),a.pushRightBeforeRequired(),a.ok&&a.pos<=e||(a.popState(),a.ok&&a.pos<=e))return a.pos;a.popState()}return a.ok?a.pos:s===F.FORCE_LEFT?0:(a.popState(),a.ok||(a.popState(),a.ok)?a.pos:0)}return s===F.RIGHT||s===F.FORCE_RIGHT?(a.pushRightBeforeInput(),a.pushRightBeforeRequired(),a.pushRightBeforeFilled()?a.pos:s===F.FORCE_RIGHT?this.displayValue.length:(a.popState(),a.ok||(a.popState(),a.ok)?a.pos:this.nearestInputPos(e,F.LEFT))):e}totalInputPositions(e,s){e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length);let a=0;return this._forEachBlocksInRange(e,s,(n,r,i,o)=>{a+=n.totalInputPositions(i,o)}),a}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const s=this._maskedBlocks[e];return s?s.map(a=>this._blocks[a]):[]}pad(e){const s=new q;return this._forEachBlocksInRange(0,this.displayValue.length,a=>s.aggregate(a.pad(e))),s}}re.DEFAULTS={...ne.DEFAULTS,lazy:!0,placeholderChar:"_"},re.STOP_CHAR="`",re.ESCAPE_CHAR="\\",re.InputDefinition=pt,re.FixedDefinition=fa,B.MaskedPattern=re;class ht extends re{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:s=this.to||0,from:a=this.from||0,maxLength:n=this.maxLength||0,autofix:r=this.autofix,...i}=e;this.to=s,this.from=a,this.maxLength=Math.max(String(s).length,n),this.autofix=r;const o=String(this.from).padStart(this.maxLength,"0"),c=String(this.to).padStart(this.maxLength,"0");let d=0;for(;d<c.length&&c[d]===o[d];)++d;i.mask=c.slice(0,d).replace(/0/g,"\\0")+"0".repeat(this.maxLength-d),super._update(i)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let s="",a="";const[,n,r]=e.match(/^(\D*)(\d*)(\D*)/)||[];return r&&(s="0".repeat(n.length)+r,a="9".repeat(n.length)+r),s=s.padEnd(this.maxLength,"0"),a=a.padEnd(this.maxLength,"9"),[s,a]}doPrepareChar(e,s){s===void 0&&(s={});let a;return[e,a]=super.doPrepareChar(e.replace(/\D/g,""),s),e||(a.skip=!this.isComplete),[e,a]}_appendCharRaw(e,s){if(s===void 0&&(s={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,s);const a=String(this.from).padStart(this.maxLength,"0"),n=String(this.to).padStart(this.maxLength,"0"),[r,i]=this.boundaries(this.value+e);return Number(i)<this.from?super._appendCharRaw(a[this.value.length],s):Number(r)>this.to?!s.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(a[this.value.length],s).aggregate(this._appendCharRaw(e,s)):super._appendCharRaw(n[this.value.length],s):super._appendCharRaw(e,s)}doValidate(e){const s=this.value;if(s.search(/[^0]/)===-1&&s.length<=this._matchFrom)return!0;const[n,r]=this.boundaries(s);return this.from<=Number(r)&&Number(n)<=this.to&&super.doValidate(e)}pad(e){const s=new q;if(this.value.length===this.maxLength)return s;const a=this.value,n=this.maxLength-this.value.length;if(n){this.reset();for(let r=0;r<n;++r)s.aggregate(super._appendCharRaw("0",e));a.split("").forEach(r=>this._appendCharRaw(r))}return s}}B.MaskedRange=ht;const rn="d{.}`m{.}`Y";class Be extends re{static extractPatternOptions(e){const{mask:s,pattern:a,...n}=e;return{...n,mask:Ve(s)?s:a}}constructor(e){super(Be.extractPatternOptions({...Be.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:s,pattern:a,blocks:n,...r}={...Be.DEFAULTS,...e},i=Object.assign({},Be.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({...r,mask:Ve(s)?s:a,blocks:i})}doValidate(e){const s=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&s!=null&&(this.min==null||this.min<=s)&&(this.max==null||s<=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(Be.extractPatternOptions(e))}}Be.GET_DEFAULT_BLOCKS=()=>({d:{mask:ht,from:1,to:31,maxLength:2},m:{mask:ht,from:1,to:12,maxLength:2},Y:{mask:ht,from:1900,to:9999}}),Be.DEFAULTS={...re.DEFAULTS,mask:Date,pattern:rn,format:(t,e)=>{if(!t)return"";const s=String(t.getDate()).padStart(2,"0"),a=String(t.getMonth()+1).padStart(2,"0"),n=t.getFullYear();return[s,a,n].join(".")},parse:(t,e)=>{const[s,a,n]=t.split(".").map(Number);return new Date(n,a-1,s)}},B.MaskedDate=Be;class ft extends ne{constructor(e){super({...ft.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(s=>{const{expose:a,...n}=tt(s),r=xe({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...n});return a&&(this.exposeMask=r),r}):[])}_appendCharRaw(e,s){s===void 0&&(s={});const a=this._applyDispatch(e,s);return this.currentMask&&a.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(s))),a}_applyDispatch(e,s,a){e===void 0&&(e=""),s===void 0&&(s={}),a===void 0&&(a="");const n=s.tail&&s._beforeTailState!=null?s._beforeTailState._value:this.value,r=this.rawInputValue,i=s.tail&&s._beforeTailState!=null?s._beforeTailState._rawInputValue:r,o=r.slice(i.length),c=this.currentMask,d=new q,f=c==null?void 0:c.state;return this.currentMask=this.doDispatch(e,{...s},a),this.currentMask&&(this.currentMask!==c?(this.currentMask.reset(),i&&(this.currentMask.append(i,{raw:!0}),d.tailShift=this.currentMask.value.length-n.length),o&&(d.tailShift+=this.currentMask.append(o,{raw:!0,tail:!0}).tailShift)):f&&(this.currentMask.state=f)),d}_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 s=new q;return e&&s.aggregate(this._applyDispatch("",{},e)),s.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var s,a;return{...e,_beforeTailState:((s=e._beforeTailState)==null?void 0:s.currentMaskRef)===this.currentMask&&((a=e._beforeTailState)==null?void 0:a.currentMask)||e._beforeTailState}}doDispatch(e,s,a){return s===void 0&&(s={}),a===void 0&&(a=""),this.dispatch(e,this,s,a)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,s){s===void 0&&(s={});let[a,n]=super.doPrepare(e,s);if(this.currentMask){let r;[a,r]=super.doPrepare(a,this.currentMaskFlags(s)),n=n.aggregate(r)}return[a,n]}doPrepareChar(e,s){s===void 0&&(s={});let[a,n]=super.doPrepareChar(e,s);if(this.currentMask){let r;[a,r]=super.doPrepareChar(a,this.currentMaskFlags(s)),n=n.aggregate(r)}return[a,n]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(s=>s.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 s=String(e);this.currentMask&&(this.currentMask.typedValue=e,s=this.currentMask.unmaskedValue),this.unmaskedValue=s}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,s){const a=new q;return this.currentMask&&a.aggregate(this.currentMask.remove(e,s)).aggregate(this._applyDispatch()),a}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(s=>s.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:s,currentMaskRef:a,currentMask:n,...r}=e;s&&this.compiledMasks.forEach((i,o)=>i.state=s[o]),a!=null&&(this.currentMask=a,this.currentMask.state=n),super.state=r}extractInput(e,s,a){return this.currentMask?this.currentMask.extractInput(e,s,a):""}extractTail(e,s){return this.currentMask?this.currentMask.extractTail(e,s):super.extractTail(e,s)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,s){return this.currentMask?this.currentMask.nearestInputPos(e,s):super.nearestInputPos(e,s)}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((s,a)=>{if(!e[a])return;const{mask:n,...r}=e[a];return ut(s,r)&&s.maskEquals(n)}):super.maskEquals(e)}typedValueEquals(e){var s;return!!((s=this.currentMask)!=null&&s.typedValueEquals(e))}}ft.DEFAULTS={...ne.DEFAULTS,dispatch:(t,e,s,a)=>{if(!e.compiledMasks.length)return;const n=e.rawInputValue,r=e.compiledMasks.map((i,o)=>{const c=e.currentMask===i,d=c?i.displayValue.length:i.nearestInputPos(i.displayValue.length,F.FORCE_LEFT);return i.rawInputValue!==n?(i.reset(),i.append(n,{raw:!0})):c||i.remove(d),i.append(t,e.currentMaskFlags(s)),i.appendTail(a),{index:o,weight:i.rawInputValue.length,totalInputPositions:i.totalInputPositions(0,Math.max(d,i.nearestInputPos(i.displayValue.length,F.FORCE_LEFT)))}});return r.sort((i,o)=>o.weight-i.weight||o.totalInputPositions-i.totalInputPositions),e.compiledMasks[r[0].index]}},B.MaskedDynamic=ft;class gt extends re{constructor(e){super({...gt.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:s,...a}=e;if(s){const n=s.map(o=>o.length),r=Math.min(...n),i=Math.max(...n)-r;a.mask="*".repeat(r),i&&(a.mask+="["+"*".repeat(i)+"]"),this.enum=s}super._update(a)}_appendCharRaw(e,s){s===void 0&&(s={});const a=Math.min(this.nearestInputPos(0,F.FORCE_RIGHT),this.value.length),n=this.enum.filter(r=>this.matchValue(r,this.unmaskedValue+e,a));if(n.length){n.length===1&&this._forEachBlocksInRange(0,this.value.length,(i,o)=>{const c=n[0][o];o>=this.value.length||c===i.value||(i.reset(),i._appendChar(c,s))});const r=super._appendCharRaw(n[0][this.value.length],s);return n.length===1&&n[0].slice(this.unmaskedValue.length).split("").forEach(i=>r.aggregate(super._appendCharRaw(i))),r}return new q({skip:!this.isComplete})}extractTail(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),new Fe("",e)}remove(e,s){if(e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),e===s)return new q;const a=Math.min(super.nearestInputPos(0,F.FORCE_RIGHT),this.value.length);let n;for(n=e;n>=0&&!(this.enum.filter(o=>this.matchValue(o,this.value.slice(a,n),a)).length>1);--n);const r=super.remove(n,s);return r.tailShift+=n-e,r}get isComplete(){return this.enum.indexOf(this.value)>=0}}gt.DEFAULTS={...re.DEFAULTS,matchValue:(t,e,s)=>t.indexOf(e,s)===s},B.MaskedEnum=gt;class ln extends ne{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}B.MaskedFunction=ln;var ga;class fe extends ne{constructor(e){super({...fe.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),s="\\d*",a=(this.scale?"("+Jt(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+s+a),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(Jt).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(Jt(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const s=e.split(this.radix);return s[0]=s[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),s.join(this.radix)}doPrepareChar(e,s){s===void 0&&(s={});const[a,n]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(s.input&&s.raw||!s.input&&!s.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),s);return e&&!a&&(n.skip=!0),a&&!this.allowPositive&&!this.value&&a!=="-"&&n.aggregate(this._appendChar("-")),[a,n]}_separatorsCount(e,s){s===void 0&&(s=!1);let a=0;for(let n=0;n<e;++n)this._value.indexOf(this.thousandsSeparator,n)===n&&(++a,s&&(e+=this.thousandsSeparator.length));return a}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,s,a){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),[e,s]=this._adjustRangeWithSeparators(e,s),this._removeThousandsSeparators(super.extractInput(e,s,a))}_appendCharRaw(e,s){s===void 0&&(s={});const a=s.tail&&s._beforeTailState?s._beforeTailState._value:this._value,n=this._separatorsCountFromSlice(a);this._value=this._removeThousandsSeparators(this.value);const r=this._value;this._value+=e;const i=this.number;let o=!isNaN(i),c=!1;if(o){let k;this.min!=null&&this.min<0&&this.number<this.min&&(k=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(k=this.max),k!=null&&(this.autofix?(this._value=this.format(k,this).replace(fe.UNMASKED_RADIX,this.radix),c||(c=r===this._value&&!s.tail)):o=!1),o&&(o=!!this._value.match(this._numberRegExp))}let d;o?d=new q({inserted:this._value.slice(r.length),rawInserted:c?"":e,skip:c}):(this._value=r,d=new q),this._value=this._insertThousandsSeparators(this._value);const f=s.tail&&s._beforeTailState?s._beforeTailState._value:this._value,g=this._separatorsCountFromSlice(f);return d.tailShift+=(g-n)*this.thousandsSeparator.length,d}_findSeparatorAround(e){if(this.thousandsSeparator){const s=e-this.thousandsSeparator.length+1,a=this.value.indexOf(this.thousandsSeparator,s);if(a<=e)return a}return-1}_adjustRangeWithSeparators(e,s){const a=this._findSeparatorAround(e);a>=0&&(e=a);const n=this._findSeparatorAround(s);return n>=0&&(s=n+this.thousandsSeparator.length),[e,s]}remove(e,s){e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),[e,s]=this._adjustRangeWithSeparators(e,s);const a=this.value.slice(0,e),n=this.value.slice(s),r=this._separatorsCount(a.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(a+n));const i=this._separatorsCountFromSlice(a);return new q({tailShift:(i-r)*this.thousandsSeparator.length})}nearestInputPos(e,s){if(!this.thousandsSeparator)return e;switch(s){case F.NONE:case F.LEFT:case F.FORCE_LEFT:{const a=this._findSeparatorAround(e-1);if(a>=0){const n=a+this.thousandsSeparator.length;if(e<n||this.value.length<=n||s===F.FORCE_LEFT)return a}break}case F.RIGHT:case F.FORCE_RIGHT:{const a=this._findSeparatorAround(e);if(a>=0)return a+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let s=e;this.min!=null&&(s=Math.max(s,this.min)),this.max!=null&&(s=Math.min(s,this.max)),s!==e&&(this.unmaskedValue=this.format(s,this));let a=this.value;this.normalizeZeros&&(a=this._normalizeZeros(a)),this.padFractionalZeros&&this.scale>0&&(a=this._padFractionalZeros(a)),this._value=a}super.doCommit()}_normalizeZeros(e){const s=this._removeThousandsSeparators(e).split(this.radix);return s[0]=s[0].replace(/^(\D*)(0*)(\d*)/,(a,n,r,i)=>n+i),e.length&&!/\d$/.test(s[0])&&(s[0]=s[0]+"0"),s.length>1&&(s[1]=s[1].replace(/0*$/,""),s[1].length||(s.length=1)),this._insertThousandsSeparators(s.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const s=e.split(this.radix);return s.length<2&&s.push(""),s[1]=s[1].padEnd(this.scale,"0"),s.join(this.radix)}doSkipInvalid(e,s,a){s===void 0&&(s={});const n=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===fe.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,s,a)&&!n}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,fe.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(fe.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)||fe.EMPTY_VALUES.includes(e)&&fe.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}ga=fe,fe.UNMASKED_RADIX=".",fe.EMPTY_VALUES=[...ne.EMPTY_VALUES,0],fe.DEFAULTS={...ne.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[ga.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})},B.MaskedNumber=fe;const ts={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function ma(t,e,s){e===void 0&&(e=ts.MASKED),s===void 0&&(s=ts.MASKED);const a=xe(t);return n=>a.runIsolated(r=>(r[e]=n,r[s]))}function on(t,e,s,a){return ma(e,s,a)(t)}B.PIPE_TYPE=ts,B.createPipe=ma,B.pipe=on;class un extends re{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 s,a,n;const{repeat:r,...i}=tt(e);this._blockOpts=Object.assign({},this._blockOpts,i);const o=xe(this._blockOpts);this.repeat=(s=(a=r??o.repeat)!=null?a:this.repeat)!=null?s: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(xe(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(e,s){s===void 0&&(s={});const a=new q;for(let c=(n=(r=this._mapPosToBlock(this.displayValue.length))==null?void 0:r.index)!=null?n:Math.max(this._blocks.length-1,0),d,f;d=(i=this._blocks[c])!=null?i:f=!f&&this._allocateBlock(c);++c){var n,r,i,o;const g=d._appendChar(e,{...s,_beforeTailState:(o=s._beforeTailState)==null||(o=o._blocks)==null?void 0:o[c]});if(g.skip&&f){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(a.aggregate(g),g.consumed)break}return a}_trimEmptyTail(e,s){var a,n;e===void 0&&(e=0);const r=Math.max(((a=this._mapPosToBlock(e))==null?void 0:a.index)||0,this.repeatFrom,0);let i;s!=null&&(i=(n=this._mapPosToBlock(s))==null?void 0:n.index),i==null&&(i=this._blocks.length-1);let o=0;for(let c=i;r<=c&&!this._blocks[c].unmaskedValue;--c,++o);o&&(this._blocks.splice(i-o+1,o),this.mask=this.mask.slice(o))}reset(){super.reset(),this._trimEmptyTail()}remove(e,s){e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length);const a=super.remove(e,s);return this._trimEmptyTail(e,s),a}totalInputPositions(e,s){return e===void 0&&(e=0),s==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,s)}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}}B.RepeatBlock=un;try{globalThis.IMask=B}catch{}const va={mask:l.oneOfType([l.array,l.func,l.string,l.instanceOf(RegExp),l.oneOf([Date,Number,B.Masked]),l.instanceOf(B.Masked)]),value:l.any,unmask:l.oneOfType([l.bool,l.oneOf(["typed"])]),prepare:l.func,prepareChar:l.func,validate:l.func,commit:l.func,overwrite:l.oneOfType([l.bool,l.oneOf(["shift"])]),eager:l.oneOfType([l.bool,l.oneOf(["append","remove"])]),skipInvalid:l.bool,onAccept:l.func,onComplete:l.func,placeholderChar:l.string,displayChar:l.string,lazy:l.bool,definitions:l.object,blocks:l.object,enum:l.arrayOf(l.string),maxLength:l.number,from:l.number,to:l.number,pattern:l.string,format:l.func,parse:l.func,autofix:l.oneOfType([l.bool,l.oneOf(["pad"])]),radix:l.string,thousandsSeparator:l.string,mapToRadix:l.arrayOf(l.string),scale:l.number,normalizeZeros:l.bool,padFractionalZeros:l.bool,min:l.oneOfType([l.number,l.instanceOf(Date)]),max:l.oneOfType([l.number,l.instanceOf(Date)]),dispatch:l.func,inputRef:l.oneOfType([l.func,l.shape({current:l.object})])},ya=Object.keys(va).filter(t=>t!=="value"),cn=["value","unmask","onAccept","onComplete","inputRef"],dn=ya.filter(t=>cn.indexOf(t)<0);function pn(t){var e;const s=(e=class extends v.Component{constructor(r){super(r),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const r=this.props,i=this._extractMaskOptionsFromProps(r);if(i.mask)this.maskRef?(this.maskRef.updateOptions(i),"value"in r&&r.value!==void 0&&(this.maskValue=r.value)):this.initMask(i);else if(this.destroyMask(),"value"in r&&r.value!==void 0){var o;(o=this.element)!=null&&o.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=r.value:this.element.value=r.value}}componentWillUnmount(){this.destroyMask()}_inputRef(r){this.element=r,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=r:this.props.inputRef(r))}initMask(r){r===void 0&&(r=this._extractMaskOptionsFromProps(this.props)),this.maskRef=B(this.element,r).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(r){const{...i}=r;return Object.keys(i).filter(o=>dn.indexOf(o)<0).forEach(o=>{delete i[o]}),i}_extractNonMaskProps(r){const{...i}=r;return ya.forEach(o=>{o!=="maxLength"&&delete i[o]}),"defaultValue"in i||(i.defaultValue=r.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(r){this.maskRef&&(r=r==null&&this.props.unmask!=="typed"?"":r,this.props.unmask==="typed"?this.maskRef.typedValue=r:this.props.unmask?this.maskRef.unmaskedValue=r:this.maskRef.value=r)}_onAccept(r){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,r)}_onComplete(r){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,r)}render(){return v.createElement(t,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}},e.displayName=void 0,e.propTypes=void 0,e),a=t.displayName||t.name||"Component";return s.displayName="IMask("+a+")",s.propTypes=va,v.forwardRef((n,r)=>v.createElement(s,{...n,ref:r}))}const hn=pn(t=>{let{inputRef:e,...s}=t;return v.createElement("input",{...s,ref:e})}),fn=(t,e)=>v.createElement(hn,{...t,ref:e});v.forwardRef(fn);function gn(t,e){let{onAccept:s,onComplete:a,ref:n=v.useRef(null),defaultValue:r,defaultUnmaskedValue:i,defaultTypedValue:o}=e===void 0?{}:e;const c=v.useRef(null),[d,f]=v.useState({}),[g,k]=v.useState(""),[E,C]=v.useState(""),[_,m]=v.useState(),w=v.useCallback(()=>{var h;(h=c.current)==null||h.destroy(),c.current=null},[]),N=v.useCallback(()=>{const h=c.current;h&&(f({value:h.value,unmaskedValue:h.unmaskedValue,typedValue:h.typedValue}),m(h.typedValue),C(h.unmaskedValue),k(h.value))},[]),T=v.useCallback(h=>{const I=c.current;I&&(N(),s==null||s(I.value,I,h))},[s]),D=v.useCallback(h=>c.current&&(a==null?void 0:a(c.current.value,c.current,h)),[a]);return v.useEffect(()=>{const{value:h,...I}=d,M=c.current;!M||g===void 0||(h!==g&&(M.value=g,M.value!==g&&T()),f(I))},[g]),v.useEffect(()=>{const{unmaskedValue:h,...I}=d,M=c.current;!M||E===void 0||(h!==E&&(M.unmaskedValue=E,M.unmaskedValue!==E&&T()),f(I))},[E]),v.useEffect(()=>{const{typedValue:h,...I}=d,M=c.current;!M||_===void 0||(h!==_&&(M.typedValue=_,M.masked.typedValueEquals(_)||T()),f(I))},[_]),v.useEffect(()=>{const h=n.current;if(!h||!(t!=null&&t.mask))return w();const I=c.current;I?I==null||I.updateOptions(t):h&&t!=null&&t.mask&&(c.current=B(h,t),N(),r!==void 0&&k(r),i!==void 0&&C(i),o!==void 0&&m(o))},[t,w,T]),v.useEffect(()=>{if(!c.current)return;const h=c.current;return h.on("accept",T),h.on("complete",D),()=>{h.off("accept",T),h.off("complete",D)}},[T,D]),v.useEffect(()=>w,[w]),{ref:n,maskRef:c,value:g,setValue:k,unmaskedValue:E,setUnmaskedValue:C,typedValue:_,setTypedValue:m}}var ss=(t=>(t.Text="text",t.Password="password",t.Email="email",t.Date="date",t.Number="number",t))(ss||{}),as=(t=>(t.Small="small",t.Medium="medium",t.Large="large",t))(as||{}),ns=(t=>(t.Default="",t.Error="error",t.Success="success",t))(ns||{}),rs=(t=>(t.Center="center",t.End="end",t.Initial="initial",t))(rs||{}),is=(t=>(t.Top="top",t.Right="right",t.Bottom="bottom",t.Left="left",t))(is||{});const G={name:"Input",class:"ds-input",props:{name:{type:String,required:!0},testId:{type:String,default:"ds-input-test"},type:{type:String,default:"text",options:Object.values(ss)},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},size:{type:String,default:"medium",options:Object.values(as)},label:{type:String,default:""},placeholder:{type:String,default:" "},value:{type:String,default:""},min:{type:String,default:""},max:{type:String,default:""},status:{type:String,default:"",options:Object.values(ns)},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:"center",options:Object.values(rs)},tooltipPosition:{type:String,default:"top",options:Object.values(is)},mask:{type:String,default:""},onChangeHandler:{type:Function,default:()=>({})}}},_a={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:"AA.AAA.AAA/AAAA-AA",definitions:{A:/[0-9A-Z]/},prepareChar:t=>t.toUpperCase(),startsWith:/[A-Z0-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]}};var ls=(t=>(t.Top="top",t.Right="right",t.Bottom="bottom",t.Left="left",t))(ls||{}),os=(t=>(t.Center="center",t.End="end",t.Initial="initial",t))(os||{});const Ae={name:"Tooltip",class:"ds-tooltip",props:{position:{type:String,default:"top",options:Object.values(ls)},placement:{type:String,default:"center",options:Object.values(os)},text:{type:String,default:""},testId:{type:String,default:"ds-tooltip"}}},qe=({children:t,position:e=Ae.props.position.default,placement:s=Ae.props.placement.default,text:a=Ae.props.text.default,testId:n=Ae.props.testId.default,className:r})=>{const i=v.useRef(null),[o,c]=v.useState(0),[d,f]=v.useState(0),[g,k]=v.useState(!1),E=e&&Ae.props.position.options.find(w=>w===e)&&`${Ae.class}--${e}`,C=s&&Ae.props.placement.options.find(w=>w===s)&&`${Ae.class}--${s}`;let _;v.useLayoutEffect(()=>{var w,N;i.current&&(c((w=i==null?void 0:i.current)==null?void 0:w.offsetHeight),f((N=i==null?void 0:i.current)==null?void 0:N.offsetWidth))},[]);const m=9;switch(e){case"top":s==="initial"?_={bottom:o+m,left:-m}:s==="end"?_={bottom:o+m,right:-m}:_={bottom:o+m,left:"50%",transform:"translateX(-50%)"};break;case"bottom":s==="initial"?_={top:o+m,left:-m}:s==="end"?_={top:o+m,right:-m}:_={top:o+m,left:"50%",transform:"translateX(-50%)"};break;case"left":s==="initial"?_={right:d+m,top:-m}:s==="end"?_={right:d+m,bottom:-m}:_={right:d+m,top:"50%",transform:"translateY(-50%)"};break;case"right":s==="initial"?_={left:d+m,top:-m}:s==="end"?_={left:d+m,bottom:-m}:_={left:d+m,top:"50%",transform:"translateY(-50%)"};break}return u.jsxs("div",{className:[Ae.class,r].join(" "),"data-testid":n,onMouseEnter:()=>k(!0),onMouseLeave:()=>k(!1),ref:i,role:"tooltip",children:[t,g&&u.jsx("div",{className:[E,C].filter(w=>w).join(" "),children:u.jsx("span",{className:`${Ae.class}__wrapper`,"data-testid":"ds-tooltip-wrapper",style:_,children:a})})]})};qe.propTypes={position:l.string,placement:l.string,text:l.oneOfType([l.string,l.node]),testId:l.string},qe.displayName="DsTooltip";const Ye=v.forwardRef(({name:t,testId:e=G.props.testId.default,type:s=G.props.type.default,animated:a=G.props.animated.default,size:n=G.props.size.default,label:r,placeholder:i,value:o,min:c,max:d,tooltip:f=G.props.tooltip.default,tooltipPosition:g=G.props.tooltipPosition.default,tooltipPlacement:k=G.props.tooltipPlacement.default,icon:E=G.props.icon.default,status:C=G.props.status.default,feedback:_,hasFeedback:m=G.props.hasFeedback.default,noMargin:w=G.props.noMargin.default,disabled:N=G.props.disabled.default,className:T,mask:D,onChangeHandler:h=G.props.onChangeHandler.default,onBlurHandler:I,onKeyDownHandler:M,onFocusHandler:W},z)=>{const[se,ue]=v.useState(!1),[ce,De]=v.useState(!1),ye=!!h&&!!D,_e=(S,x,Z)=>{if(ye&&Z){const b={...Z,target:{...Z.target,name:t,maskedValue:S,value:x.unmaskedValue,type:"text"}};h(b)}},le=v.useMemo(()=>typeof D=="object"?{lazy:!0,...D}:_a[D]?{..._a[D],min:c,max:d,lazy:!0}:{mask:D??"",min:c,max:d,lazy:!0},[D]),{ref:ke,setUnmaskedValue:Ce}=gn(le,{onAccept:_e}),be=S=>{h&&!ye&&h(S)},y=S=>{M&&M(S)},A=S=>{ue(!1),I&&I(S)},j=S=>{ue(!0),W&&W(S)},V=()=>{De(S=>!S)},$=v.useMemo(()=>ce&&s==="password"?"text":s,[ce,s]),O=()=>{const S=[`${G.class}`];return n&&S.push(`${G.class}--${n}`),a&&S.push(`${G.class}--animated`),w&&S.push(`${G.class}--no-margin`),E&&S.push(`${G.class}--with-icon`),C&&S.push(`${G.class}--${C}`),T&&S.push(T),S.join(" ")},L=v.useMemo(()=>{const S=[`${G.class}__label`];return(se||o)&&S.push(`${G.class}__label--active`),S.join(" ")},[o,se]),P=()=>!a&&i?i:"",U=()=>C&&C==="error"?"info":"check_circle";return v.useEffect(()=>{D&&Ce(o??"")},[o,D,Ce]),u.jsxs("div",{className:O(),ref:z,children:[m&&u.jsx("div",{className:"ds-input__feedback",children:_&&u.jsxs(u.Fragment,{children:[u.jsx(R,{image:U()}),_]})}),u.jsx("input",{className:"ds-input__input","data-testid":e,disabled:N,id:t,max:d,min:c,name:t,onBlur:A,onChange:be,onFocus:j,onInput:be,onKeyDown:y,placeholder:P(),ref:ke,type:$,...!D&&{value:o??""}}),u.jsxs("label",{className:L,htmlFor:t,children:[r,f&&u.jsx(qe,{className:"ds-input__tooltip",placement:k,position:g,text:f,children:u.jsx(R,{className:"ds-input__icon",image:"info"})})]}),E&&u.jsx(R,{className:"ds-input__icon",image:E}),s==="password"&&u.jsx(R,{className:"ds-input__password-icon",image:ce?"visibility_off":"visibility",onClick:V,size:"xl"})]})});Ye.propTypes={name:l.string,testId:l.string,type:l.oneOf(G.props.type.options),animated:l.bool,size:l.oneOf(G.props.size.options),label:l.string,placeholder:l.string,value:l.oneOfType([l.string]),min:l.string,max:l.string,tooltip:l.string,tooltipPosition:l.string,tooltipPlacement:l.string,icon:l.string,status:l.oneOf(G.props.status.options),feedback:l.string,hasFeedback:l.bool,noMargin:l.bool,disabled:l.bool,mask:l.oneOfType([l.string,l.object]),onChangeHandler:l.func,onFocusHandler:l.func},Ye.displayName="DsInput";var us=(t=>(t.Small="small",t.Medium="medium",t.Large="large",t))(us||{}),cs=(t=>(t.None="",t.Neutral20="neutral-20",t.Neutral10="neutral-10",t.Neutral05="neutral-05",t.Neutral00="neutral-00",t))(cs||{});const he={name:"Loading",class:"ds-loading",props:{size:{type:String,default:"medium",options:Object.values(us)},opacity:{type:Boolean,default:!0},fullscreen:{type:Boolean,default:!0},backgroundColor:{type:String,default:"neutral-10",options:Object.values(cs)},id:{type:String,default:""},testId:{type:String,default:"ds-loading"}}},mt=({id:t,testId:e=he.props.testId.default,className:s,size:a=he.props.size.default,opacity:n=he.props.opacity.default,fullscreen:r=he.props.fullscreen.default,backgroundColor:i=he.props.backgroundColor.default})=>{const o=!r&&`${he.class}--absolute`,c=a&&`${he.class}__dots--${a}`,d=i&&he.props.backgroundColor.options.find(g=>g===i)&&`${he.class}__background--${i}`,f=n&&`${he.class}__background--opacity`;return u.jsxs("div",{className:[he.class,s,o].filter(g=>g).join(" "),"data-testid":e,id:t,children:[u.jsx("div",{className:[`${he.class}__background`,d,f].filter(g=>g).join(" ")}),u.jsx("div",{className:["ds-loading__dots",c].filter(g=>g).join(" "),role:"status"})]})};mt.propTypes={id:l.string,testId:l.string,size:l.oneOf(he.props.size.options),opacity:l.bool,fullscreen:l.bool,backgroundColor:l.string},mt.displayName="DsLoading";const Oe={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:()=>({})}}},ds=({id:t,label:e,detail:s,name:a,testId:n=a??"ds-option-test",disabled:r=Oe.props.disabled.default,value:i,checked:o=Oe.props.checked.default,onChangeHandler:c=Oe.props.onChangeHandler.default})=>{const[d]=v.useState(crypto.randomUUID()),f=()=>{const g=[Oe.class];return r&&g.push(`${Oe.class}--disabled`),g.join(" ")};return u.jsxs("div",{className:f(),children:[u.jsx("input",{checked:o,"data-testid":n,disabled:r,id:t??String(d),name:a,onChange:c,type:"radio",value:i}),u.jsx(R,{className:`${Oe.class}__icon`,image:o?"radio_button_checked":"radio_button_unchecked",size:"xxl"}),u.jsxs("div",{className:`${Oe.class}__text-container`,children:[e&&u.jsx("label",{className:`${Oe.class}__label`,htmlFor:t??String(d),children:e}),s&&u.jsx("label",{className:`${Oe.class}__detail`,htmlFor:t??String(d),children:s})]})]})};ds.propTypes={id:l.string,name:l.string,testId:l.string,label:l.oneOfType([l.string,l.node]),value:l.oneOfType([l.string,l.number]),detail:l.string,disabled:l.bool,checked:l.bool,onChangeHandler:l.func},ds.displayName="DsOption";var ps=(t=>(t.Default="",t.Large="large",t.Small="small",t))(ps||{});const st={name:"Paragraph",class:"ds-paragraph",props:{type:{type:String,default:"",options:Object.values(ps)}}},Ie=({children:t,className:e,testId:s="ds-paragraph-test",type:a=st.props.type.default})=>{const n=a&&`${st.class}--${a}`;return u.jsx("p",{className:[st.class,n,e].filter(r=>r).join(" "),"data-testid":s,children:t})};Ie.propTypes={className:l.string,testId:l.string,type:l.oneOf(st.props.type.options)},Ie.displayName="DsParagraph";var hs=(t=>(t.PrimaryDarker="primary-darker",t.PrimaryDark="primary-dark",t.Primary="primary",t.PrimaryLight="primary-light",t.PrimaryLighter="primary-lighter",t.PrimaryLightest="primary-lightest",t.SecondaryDarker="secondary-darker",t.SecondaryDark="secondary-dark",t.Secondary="secondary",t.SecondaryLight="secondary-light",t.SecondaryLighter="secondary-lighter",t.SecondaryLightest="secondary-lightest",t.Neutral90="neutral-90",t.Neutral80="neutral-80",t.Neutral60="neutral-60",t.Neutral40="neutral-40",t.Neutral20="neutral-20",t.Neutral10="neutral-10",t.Neutral05="neutral-05",t.Neutral00="neutral-00",t.SuccessDark="success-dark",t.Success="success",t.SuccessLight="success-light",t.SuccessLighter="success-lighter",t.WarningDark="warning-dark",t.Warning="warning",t.WarningLight="warning-light",t.WarningLighter="warning-lighter",t.DangerDark="danger-dark",t.Danger="danger",t.DangerLight="danger-light",t.DangerLighter="danger-lighter",t.InfoDark="info-dark",t.Info="info",t.InfoLight="info-light",t.InfoLighter="info-lighter",t))(hs||{});const vt={name:"Progress",class:"ds-progress",props:{label:{type:String,default:""},progress:{type:Number,default:0},color:{type:String,default:"success",options:Object.values(hs)}}};var fs=(t=>(t.Stretch="stretch",t.FlexStart="flex-start",t.FlexEnd="flex-end",t.Center="center",t.SpaceAround="space-around",t.SpaceBetween="space-between",t))(fs||{}),gs=(t=>(t.Stretch="stretch",t.FlexStart="flex-start",t.FlexEnd="flex-end",t.Center="center",t))(gs||{}),ms=(t=>(t.Row="row",t.Column="column",t.RowReverse="row-reverse",t.ColumnReverse="column-reverse",t))(ms||{}),vs=(t=>(t.NoWrap="nowrap",t.Wrap="wrap",t.WrapReverse="wrap-reverse",t))(vs||{}),ys=(t=>(t.Quark="quark",t.Nano="nano",t.XXXS="xxxs",t.XXS="xxs",t.XS="xs",t.SM="sm",t.MD="md",t.LG="lg",t.XL="xl",t.XXL="xxl",t.XXXL="xxxl",t))(ys||{});const Le={name:"Flex-Layout",class:"ds-flex-layout",props:{justifyContent:{type:String,default:"stretch",required:!0,options:Object.values(fs)},alignItems:{type:String,default:"stretch",required:!0,options:Object.values(gs)},flexDirection:{type:String,default:"row",required:!0,options:Object.values(ms)},flexWrap:{type:String,default:"wrap",required:!1,options:Object.values(vs)},className:{type:String,default:""},width:{type:String,default:"100%"},height:{type:String,default:""},gap:{type:String,default:"",options:Object.values(ys)}}},$e=({children:t,className:e,justifyContent:s=Le.props.justifyContent.default,alignItems:a=Le.props.alignItems.default,flexDirection:n=Le.props.flexDirection.default,flexWrap:r=Le.props.flexWrap.default,width:i=Le.props.width.default,height:o,gap:c})=>{const d=()=>{const g=[Le.class,e];return c&&g.push(`${Le.class}--gap-${c}`),g.join(" ")},f=()=>({display:"flex",justifyContent:s,alignItems:a,flexDirection:n,flexWrap:r,width:i,height:o,gap:c});return u.jsx("div",{className:d(),style:f(),children:t})};$e.propTypes={className:l.string,justifyContent:l.string,alignItems:l.string,flexDirection:l.string,flexWrap:l.string,width:l.string,height:l.string,gap:l.string},$e.displayName="DsFlexLayout";const yt={name:"Flex-Element",class:"ds-flex-element",props:{flex:{type:String,default:"0 1 auto",required:!1},className:{type:String,default:"",required:!1}}},te=({children:t,flex:e=yt.props.flex.default,className:s=yt.props.className.default})=>{const a=()=>[yt.class,s].join(" "),n=()=>({flex:e});return u.jsx("div",{className:a(),style:n(),children:t})};te.propTypes={className:l.string,flex:l.string},te.displayName="DsFlexElement";var _t=(t=>(t.None="none",t.Quark="quark",t.Nano="nano",t.XXXS="xxxs",t.XXS="xxs",t.XS="xs",t.SM="sm",t))(_t||{});const Ke={name:"Spacer",class:"ds-spacer",props:{vertical:{type:String,default:"none",options:Object.values(_t)},horizontal:{type:String,default:"none",options:Object.values(_t)}}},ge=({vertical:t=Ke.props.vertical.default,horizontal:e=Ke.props.horizontal.default})=>{const s=t&&`ds-spacer__vertical--${t}`,a=e&&`ds-spacer__horizontal--${e}`;return u.jsx("div",{className:[Ke.class,s,a].filter(n=>n).join(" "),"data-testid":"ds-spacer"})};ge.propTypes={vertical:l.oneOf(Ke.props.vertical.options),horizontal:l.oneOf(Ke.props.horizontal.options)},ge.displayName="DsSpacer";const _s=({label:t,progress:e=vt.props.progress.default,color:s=vt.props.color.default})=>{const a=v.useMemo(()=>e>100?100:e<0?0:e,[e]),n=v.useMemo(()=>Qe[s]??s,[s]),r=v.useMemo(()=>`bg-color__${n}`,[n]),i=v.useMemo(()=>`color__${n}`,[n]);return u.jsx("div",{className:"ds-progress",children:u.jsxs($e,{flexDirection:"column",children:[u.jsx(te,{children:u.jsx("div",{"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":a,className:"ds-progress__container",role:"progressbar",children:u.jsx("div",{className:`ds-progress__progress ${r}`,"data-testid":"ds-progress-bar",style:{width:`${a}%`}})})}),u.jsx(te,{children:u.jsxs($e,{alignItems:"flex-end",flexDirection:"column",justifyContent:"center",children:[u.jsx(ge,{vertical:"quark"}),u.jsx(u.Fragment,{children:t&&u.jsx(Ie,{className:i,children:t})})]})})]})})};_s.propTypes={label:l.string,progress:l.number,color:l.oneOf(vt.props.color.options)};var ks=(t=>(t.Default="default",t.Card="card",t))(ks||{});const me={name:"DsRadio",class:"ds-radio",props:{variant:{type:String,default:"default",options:Object.values(ks)},fullWidth:{type:Boolean,default:!1}}},ka=v.forwardRef(({variant:t=me.props.variant.default,fullWidth:e=me.props.fullWidth.default,label:s,description:a,className:n,id:r,testId:i="ds-radio",disabled:o,...c},d)=>{const f=v.useId(),g=r??`${me.class}-${f.replace(/:/g,"")}`,k=[me.class,`${me.class}--${t}`,e&&`${me.class}--full-width`,o&&`${me.class}--disabled`,n].filter(Boolean).join(" ");return u.jsxs("label",{className:k,"data-testid":`${i}-root`,htmlFor:g,children:[u.jsx("input",{...c,className:`${me.class}__input`,"data-testid":i,disabled:o,id:g,ref:d,type:"radio"}),u.jsx("span",{"aria-hidden":"true",className:`${me.class}__control`}),(s||a)&&u.jsxs("span",{className:`${me.class}__text`,children:[s&&u.jsx("span",{className:`${me.class}__label`,children:s}),a&&u.jsx("span",{className:`${me.class}__description`,children:a})]})]})});ka.displayName="DsRadio";var bs=(t=>(t.Small="sm",t.Medium="md",t.Large="lg",t))(bs||{}),Ss=(t=>(t.Default="",t.Error="error",t.Success="success",t))(Ss||{}),Es=(t=>(t.Center="center",t.End="end",t.Initial="initial",t))(Es||{}),Cs=(t=>(t.Top="top",t.Right="right",t.Bottom="bottom",t.Left="left",t))(Cs||{});const Q={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(bs),default:"md"},status:{type:String,default:"",options:Object.values(Ss)},tooltip:{type:String,default:""},tooltipPlacement:{type:String,default:"initial",options:Object.values(Es)},tooltipPosition:{type:String,default:"top",options:Object.values(Cs)},feedback:{type:String,default:""},options:[]}},As=v.forwardRef(({label:t,className:e,disabled:s=Q.props.disabled.default,animated:a=Q.props.animated.default,multiple:n=Q.props.multiple.default,testId:r=Q.props.testId.default,name:i,options:o,value:c,placeholder:d,onChange:f,onChangeHandler:g,size:k=Q.props.size.default,status:E=Q.props.status.default,tooltip:C,tooltipPosition:_=Q.props.tooltipPosition.default,tooltipPlacement:m=Q.props.tooltipPlacement.default,feedback:w,...N},T)=>{const[D,h]=v.useState(!1),I=z=>{h(!1),f&&f(z,z.target.value),g&&g(z,z.target.value)},M=()=>{const z=[Q.class,"select-placeholder"];return z.push(`${Q.class}--${k}`),E&&z.push(`${Q.class}--${E}`),D&&z.push(`${Q.class}--active`),s&&z.push(`${Q.class}--disabled`),e&&z.push(e),z.join(" ")},W=v.useMemo(()=>{const z=[`${Q.class}__label`];return!a&&z.push(`${Q.class}__label--not-animated`),c&&z.push(`${Q.class}__label--has-value`),a&&!c&&!C&&z.push(`${Q.class}__label--hidden`),z.join(" ")},[c]);return u.jsxs("div",{className:M(),"data-testid":"ds-select-component",children:[t&&u.jsxs("label",{className:W,"data-testid":"ds-label-id",htmlFor:i,children:[t,C&&u.jsx(qe,{className:`${Q.class}__tooltip`,placement:m,position:_,text:C,children:u.jsx(R,{className:`${Q.class}__icon`,image:"info"})})]}),u.jsxs("select",{"data-testid":r,disabled:s,id:i,multiple:n,name:i,onBlur:()=>h(!1),onChange:z=>I(z),onFocus:()=>h(!0),ref:T,value:c??"",...N,children:[(d||a)&&u.jsx("option",{disabled:!0,value:"",children:d??t}),o==null?void 0:o.map((z,se)=>{var ue;return"options"in z?u.jsx("optgroup",{label:z.label,children:(ue=z.options)==null?void 0:ue.map((ce,De)=>u.jsx("option",{className:`${Q.class}__option-select`,value:ce.value,children:ce.label??ce.value},De))},se):u.jsx("option",{className:`${Q.class}__option-select`,value:z.value,children:z.label??z.value},se)})]}),w&&u.jsxs("div",{className:"ds-select__feedback-container",children:[u.jsx(R,{className:"ds-select__icon",image:E==="success"?"check_circle":"info"}),u.jsx("span",{className:"ds-select__feedback",children:w})]})]})});As.propTypes={label:l.string.isRequired,className:l.string,disabled:l.bool,animated:l.bool,multiple:l.bool,name:l.string,testId:l.string,options:l.array.isRequired,placeholder:l.string,onChange:l.func,onChangeHandler:l.func,value:l.oneOfType([l.string,l.number]),size:l.oneOf(Q.props.size.options),status:l.oneOf(Q.props.status.options),tooltip:l.string,tooltipPosition:l.string,tooltipPlacement:l.string,feedback:l.string},As.displayName="DsSelect";var ws=(t=>(t.Large="large",t.Small="small",t))(ws||{});const kt={name:"Subtitle",class:"ds-subtitle",props:{type:{type:String,default:"large",options:Object.values(ws)}}},ba=({children:t,className:e,testId:s="ds-subtitle-test",type:a})=>{const n=kt.props.type.options.find(r=>r===a)&&`${kt.class}--${a}`;return u.jsx("p",{className:[kt.class,n,e].filter(r=>r).join(" "),"data-testid":s,children:t})};ba.displayName="DsSubtitle";var Ds=(t=>(t.Small="small",t.Medium="medium",t.Large="large",t))(Ds||{}),Ts=(t=>(t.Text="text",t))(Ts||{}),Fs=(t=>(t.None="",t.Error="error",t.Success="success",t))(Fs||{}),Os=(t=>(t.None="none",t.Both="both",t.Horizontal="horizontal",t.Vertical="vertical",t.Block="block",t.Inline="inline",t))(Os||{});const ee={name:"TextArea",class:"ds-textarea",props:{name:{type:String,required:!0},testId:{type:String,default:"ds-textarea-test"},type:{type:String,default:"text",options:Object.values(Ts)},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},size:{type:String,default:"medium",options:Object.values(Ds)},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:"",options:Object.values(Fs)},feedback:{type:String,default:""},description:{type:String,default:""},icon:{type:String,default:""},tooltip:{type:String,default:""},resize:{type:String,default:"none",options:Object.values(Os)},onChangeHandler:{type:Function,default:()=>{}}}},Is=v.forwardRef(({name:t,testId:e=ee.props.testId.default,animated:s=ee.props.animated.default,size:a=ee.props.size.default,label:n,placeholder:r,value:i,minLength:o,maxLength:c,tooltip:d,icon:f,status:g=ee.props.status.default,feedback:k,disabled:E=ee.props.disabled.default,required:C,className:_,resize:m=ee.props.resize.default,onChangeHandler:w,onBlurHandler:N,onKeyDownHandler:T,onFocusHandler:D,rows:h=ee.props.rows.default,cols:I,description:M,style:W},z)=>{const[se,ue]=v.useState(!1),[ce,De]=v.useState(0),[ye,_e]=v.useState(crypto.randomUUID());v.useEffect(()=>{i==null&&_e(crypto.randomUUID())},[i]);const le=O=>{De(O.target.value.length),w&&w(O)},ke=O=>{T&&T(O)},Ce=O=>{ue(!1),N&&N(O)},be=O=>{ue(!0),D&&D(O)},y=()=>{const O=[`${ee.class}`];return a&&O.push(`${ee.class}--${a}`),s&&O.push(`${ee.class}--animated`),d&&O.push(`${ee.class}--with-icon`),g&&O.push(`${ee.class}--${g}`),_&&O.push(_),O.join(" ")},A=v.useMemo(()=>{const O=[`${ee.class}__label`];return(se||i)&&O.push(`${ee.class}__label--active`),O.join(" ")},[i,se]),j=()=>!s&&r?r:"",V=()=>g&&g==="error"?"info":"check_circle",$={resize:m,...W??{}};return u.jsxs("div",{className:y(),children:[M&&u.jsx("span",{className:"ds-textarea__description",children:M}),k&&u.jsxs("div",{className:"ds-textarea__feedback",children:[u.jsx(R,{image:V()}),k]}),u.jsx("textarea",{className:"ds-textarea__textarea",cols:I,"data-testid":e,defaultValue:i??"",disabled:E,id:t,maxLength:c,minLength:o,name:t,onBlur:Ce,onChange:le,onFocus:be,onKeyDown:ke,placeholder:j(),ref:z,required:C,rows:h,style:$}),u.jsx("label",{className:A,htmlFor:t,children:n}),c&&u.jsxs("span",{className:"ds-textarea__count",children:[ce,"/",c]}),d&&u.jsx(qe,{className:"ds-textarea__tooltip",placement:"end",text:d,children:u.jsx(R,{className:"ds-textarea__icon",image:f})})]},ye)});Is.propTypes={name:l.string,testId:l.string,animated:l.bool,size:l.oneOf(ee.props.size.options),label:l.string,placeholder:l.string,value:l.oneOfType([l.string]),tooltip:l.string,icon:l.string,status:l.oneOf(ee.props.status.options),feedback:l.string,minLength:l.number,maxLength:l.number,rows:l.number,cols:l.number,disabled:l.bool,required:l.bool,onChangeHandler:l.func,onBlur:l.func,onKeyDown:l.func,onFocus:l.func,resize:l.oneOf(ee.props.resize.options).isRequired,description:l.string,style:l.object},Is.displayName="DsTextArea";const at={name:"Container",class:"ds-container",props:{fluid:{type:Boolean,default:!1},testId:{type:String,default:"ds-container-test"}}},bt=({children:t,fluid:e=at.props.fluid.default,className:s,style:a,testId:n=at.props.testId.default})=>{const r=e?`${at.class}--fluid`:at.class;return u.jsx("div",{className:[r,s].filter(i=>i).join(" "),"data-testid":n,style:a,children:t})};bt.propTypes={children:l.node,fluid:l.bool,className:l.string,style:l.object,testId:l.string},bt.displayName="DsContainer";var Ns=(t=>(t.Quark="quark",t.Nano="nano",t.ExtraSmall="xs",t.Small="sm",t.Medium="md",t.Large="lg",t))(Ns||{}),St=(t=>(t.Start="start",t.End="end",t.Center="center",t.Stretch="stretch",t.SpaceAround="space-around",t.SpaceBetween="space-between",t.SpaceEvenly="space-evenly",t))(St||{});const J={name:"Grid-Layout",class:"ds-grid-layout",props:{rows:{type:String,default:"auto",required:!0},gap:{type:String,default:"sm",options:Object.values(Ns)},vGap:{type:Boolean,default:!0},hGap:{type:Boolean,default:!0},width:{type:String,default:""},height:{type:String,default:""},horizontalAlign:{type:String,default:"start",options:Object.values(St)},verticalAlign:{type:String,default:"start",options:Object.values(St)}}};function Sa(){const{innerWidth:t,innerHeight:e}=window;return{width:t,height:e}}function mn(){const[t,e]=v.useState(Sa());return v.useEffect(()=>{function s(){e(Sa())}return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),t}const xs=({children:t,rows:e=J.props.rows.default,gap:s=J.props.gap.default,vGap:a=J.props.vGap.default,hGap:n=J.props.hGap.default,horizontalAlign:r=J.props.horizontalAlign.default,verticalAlign:i=J.props.verticalAlign.default,width:o=J.props.width.default,height:c=J.props.height.default})=>{const d=a&&`${J.class}__v-gap--${s}`,f=n&&`${J.class}__h-gap--${s}`,g=r&&J.props.horizontalAlign.options.find(T=>T===r)?`${J.class}--h-${r}`:null,k=i&&J.props.verticalAlign.options.find(T=>T===i)?`${J.class}--v-${i}`:null,{width:E}=mn(),[C,_]=v.useState("auto");v.useEffect(()=>{E<=768?_("6"):_("12")},[E]);const m=T=>/^[+-]?\d+$/.test(T),w=()=>e.split(",").map(D=>(D=D.trim(),D==="0"||D==="*"||D==="auto"?"auto":m(D)?D+"fr":D)).join(" "),N=()=>`repeat(${C}, minmax(0, 1fr))`;return u.jsx("div",{className:[J.class,g,k,d,f].filter(T=>T).join(" "),style:{width:o,height:c,gridTemplateColumns:N(),gridTemplateRows:w()},children:t})};xs.propTypes={children:l.oneOfType([l.arrayOf(l.node),l.node,l.func]),rows:l.string,gap:l.oneOf(J.props.gap.options),vGap:l.bool,hGap:l.bool,width:l.string,height:l.string,horizontalAlign:l.oneOf(J.props.horizontalAlign.options),verticalAlign:l.oneOf(J.props.verticalAlign.options)},xs.displayName="DsGridLayout";const Ea=()=>typeof window<"u"&&window.innerWidth?window.innerWidth:0,Ca=({children:t,grid:e})=>{const{row:s,col:a,mobileRow:n,mobileCol:r}=e,[i,o]=v.useState(Ea());v.useEffect(()=>{const d=()=>{o(Ea())};if(typeof window<"u")return window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[]);const c=v.useMemo(()=>i<=768?{gridRow:n??s,gridColumn:r??a}:{gridRow:s,gridColumn:a},[i,s,a,n,r]);return u.jsx("div",{style:c,children:t})};Ca.displayName="DsGridElement";const vn={name:"Grid-Element",class:"ds-grid-element",props:{grid:{type:Object,default:{row:"auto",col:"auto"}}}};var ze=(t=>(t.None="none",t.Quark="quark",t.Nano="nano",t.ExtraSmall="xs",t.Small="sm",t.Medium="md",t.Large="lg",t))(ze||{});const Se={name:"Wrapper",class:"ds-wrapper",props:{space:{type:String,default:"xs",options:Object.values(ze)},top:{type:String,default:"none",options:Object.values(ze)},right:{type:String,default:"none",options:Object.values(ze)},bottom:{type:String,default:"none",options:Object.values(ze)},left:{type:String,default:"none",options:Object.values(ze)}}},Xe=({children:t,space:e=Se.props.space.default,top:s=Se.props.top.default,right:a=Se.props.right.default,bottom:n=Se.props.bottom.default,left:r=Se.props.left.default})=>{const i=s&&`${Se.class}__top--${s}`,o=a&&`${Se.class}__right--${a}`,c=n&&`${Se.class}__bottom--${n}`,d=r&&`${Se.class}__left--${r}`,f=e&&`${Se.class}--${e}`;return u.jsx("div",{className:[Se.class,i,o,c,d,f].filter(g=>g).join(" "),children:t})};Xe.displayName="DsWrapper";const Et={name:"Accordion",class:"ds-accordion",props:{openItemListIndex:{type:Boolean,default:!1},items:{type:Array,default:[]},activeItem:{type:Number,default:0}}},Ue={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}}},Ct=({title:t,content:e,onToggle:s,active:a=Ue.props.active.default,disabled:n=Ue.props.disabled.default})=>{const r=a&&`${Ue.class}--active`;return u.jsxs("li",{className:[Ue.class,r].filter(i=>i).join(" "),children:[u.jsxs("button",{className:`${Ue.class}__button`,disabled:n,onClick:s,children:[t,u.jsx(R,{className:`${Ue.class}__icon`,color:"neutral-90",image:"expand_more",size:"xl"})]}),a&&u.jsx("div",{className:"ds-accordion-item__content",children:e})]})};Ct.propTypes={active:l.bool,title:l.oneOfType([l.element,l.string]),content:l.oneOfType([l.element,l.string]),disabled:l.bool},Ct.displayName="DsAccordionItem";const Bs=({items:t=Et.props.items.default,activeItem:e=Et.props.activeItem.default,onClick:s})=>{const[a,n]=v.useState(-1);v.useEffect(()=>{t.map((i,o)=>{i.active&&n(o)})},[t]),v.useEffect(()=>{e!=null&&n(e)},[e]);const r=i=>{if(a===i)return s&&s(-1),n(-1);n(i),s&&s(i)};return u.jsx("ul",{className:Et.class,children:t.map((i,o)=>u.jsx(Ct,{active:a===o,content:i.content,disabled:i.disabled,onToggle:()=>{r(o)},title:i.title},o))})};Bs.propTypes={items:l.array,activeItem:l.number},Bs.displayName="DsAccordion";const Aa=({title:t,activeTags:e,handleTagClose:s})=>u.jsx("div",{className:"active-tags",children:e.length>0&&u.jsxs(u.Fragment,{children:[u.jsx(Ie,{className:"active-tags__title",children:t}),u.jsx("div",{className:"active-tags__list","data-testid":"ds-list",children:e.map((a,n)=>u.jsx(qe,{text:`Filtro ${a.text} aplicado`,children:u.jsxs("div",{className:`active-tags__item ${a.hiddenClose&&"active-tags__item--no-close"}`,"data-testid":`ds-active-tag-${n}`,children:[u.jsxs($e,{alignItems:"center",gap:"nano",children:[u.jsx(te,{children:u.jsx(R,{className:"active-tags__icon",color:a.hiddenClose?"neutral-00":"neutral-90",fill:!0,image:a.icon,testId:`icon-${n}`})}),u.jsx(te,{children:u.jsx(Ie,{type:"small",children:a.text})})]}),!a.hiddenClose&&u.jsx(R,{image:"close",onClick:()=>s(n),testId:`icon-close-${n}`})]},n)},`ds-tooltip-key-${a.id}-${a.text}`))})]})});Aa.displayName="DsActiveTags";const yn={name:"ActiveTags",class:"ds-active-tags",props:{title:{type:String,default:""},activeTags:{type:Array,default:[]},handleTagClose:{type:Function,default:()=>{}}}},Re={name:"Carousel",class:"ds-carousel",props:{}},wa=({slides:t,interval:e=3e3,imageHeight:s=100,imageWidth:a=100,imageMaxHeight:n,imageMaxWidth:r})=>{const[i,o]=v.useState(0),[c,d]=v.useState(!1),f=v.useRef(null);v.useEffect(()=>(c||(f.current=setInterval(()=>{o(E=>E===t.length-1?0:E+1)},e)),()=>{f.current&&clearInterval(f.current)}),[c,e,t.length]);const g=()=>d(!0),k=()=>d(!1);return u.jsxs("div",{className:`${Re.class}`,"data-testid":"ds-carousel",onMouseEnter:g,onMouseLeave:k,children:[u.jsx("div",{className:`${Re.class}__image-wrapper`,style:{height:s,width:a,maxHeight:n,maxWidth:r},children:t.map((E,C)=>u.jsx("img",{alt:E.title,className:`${Re.class}__image ${C===i?"active":"inactive"}`,height:s,src:E.image,style:{maxHeight:n,maxWidth:r},width:a},C))}),u.jsx(ge,{vertical:"xxs"}),u.jsx("div",{children:u.jsx(ot,{className:"color__primary",type:"heading-4",children:t[i].title})}),u.jsx("div",{children:u.jsx(Ie,{type:"large",children:t[i].description})}),u.jsx(ge,{vertical:"xxs"}),u.jsx("div",{className:`${Re.class}__dots`,children:u.jsx("div",{className:`${Re.class}__dots-wrapper`,children:t.map((E,C)=>u.jsx("button",{"aria-label":`Go to slide ${C+1}`,className:`dot ${i===C?"dot--active":""}`,onClick:()=>o(C)},C))})})]})};wa.propTypes={slides:l.arrayOf(l.shape({title:l.string.isRequired,image:l.string.isRequired,description:l.string.isRequired})).isRequired,interval:l.number,imageHeight:l.oneOfType([l.number,l.string]),imageWidth:l.oneOfType([l.number,l.string]),imageMaxHeight:l.oneOfType([l.number,l.string]),imageMaxWidth:l.oneOfType([l.number,l.string])};var $s=(t=>(t.Small="small",t.Medium="medium",t.Large="large",t))($s||{});const H={name:"EditableSelect",class:"ds-editable-select",props:{label:{type:String,default:""},testId:{type:String,default:"ds-editable-select"},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:"medium",options:Object.values($s)},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:()=>{}},onClearHandler:{type:Function,default:()=>{}}}},_n=(t,e)=>{if(!e)return t;const s=e.toLowerCase();return t.filter(a=>a.label.toLowerCase().includes(s))},Da=t=>t,Ta=({label:t=H.props.label.default,name:e=H.props.name.default,testId:s=H.props.testId.default,value:a=H.props.value.default,options:n=H.props.options.default,size:r=H.props.size.default,onChangeHandler:i=H.props.onChangeHandler.default,onSelectHandler:o=H.props.onSelectHandler.default,onClearHandler:c=H.props.onClearHandler.default,icon:d=H.props.icon.default,noOptionsMessage:f=H.props.noOptionsMessage.default,disabled:g=H.props.disabled.default,status:k=H.props.status.default,onBlurHandler:E=H.props.onBlurHandler.default,onFocusHandler:C=H.props.onFocusHandler.default,animated:_=H.props.animated.default,placeholder:m=H.props.placeholder.default,loading:w,showOptionsOnFocus:N=!1,inputType:T,inputMin:D,inputMax:h,inputTooltip:I,inputTooltipPosition:M,inputTooltipPlacement:W,inputFeedback:z,inputHasFeedback:se,inputNoMargin:ue,inputMask:ce,inputOnKeyDownHandler:De})=>{const[ye,_e]=v.useState(!1),[le,ke]=v.useState(a),[Ce,be]=v.useState(!0),y=v.useRef(null),A=S=>{if(N){const b=a.trim().toLowerCase(),de=S.currentTarget.value.trim().toLowerCase(),He=n.map(Cn=>Cn.label.trim().toLowerCase()),Dt=!!b&&He.includes(b),En=!!de&&He.includes(de);Dt&&!En&&c()}i(S),be(!1);const x=S.currentTarget.value.length;(N||w==null&&x>0||!w&&x>2)&&_e(!0)},j=()=>{C(),be(!0),N&&_e(!0)},V=()=>{var Z,b;const S=(Z=y.current)==null?void 0:Z.querySelector("input");if(!S)return;const x=(b=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:b.set;x==null||x.call(S,""),S.dispatchEvent(new Event("input",{bubbles:!0}))},$=()=>{if(N){const S=a.trim(),x=S?n.find(Z=>Z.label.trim().toLowerCase()===S.toLowerCase()):void 0;S&&(x?o(x):(V(),c()))}E(),be(!0)},O=S=>{o(S),E(),N||ke(crypto.randomUUID().toString()),be(!0),_e(!1)},L=S=>{g||O(S)};v.useEffect(()=>{!N&&a.length===0&&_e(!1)},[a,N]),v.useEffect(()=>{if(!N)return;const S=x=>{y.current&&!y.current.contains(x.target)&&_e(!1)};return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[N]);const P=v.useMemo(()=>N?Ce?Da(n):_n(n,a):Da(n),[n,a,N,Ce]),U=()=>P.length>0?P.map((S,x)=>{const b=S.label===a?` ${H.class}__option--selected`:"";return u.jsx("button",{className:`${H.class}__option ${H.class}__option--${r}${b}`,"data-testid":`ds-option-${S.id??S.label}`,onClick:()=>L(S),onMouseDown:de=>de.preventDefault(),type:"button",children:S.label},x)}):u.jsx("div",{className:`${H.class}__option ${H.class}__option--not-found--${r}`,children:f},"no_option");return u.jsxs("div",{className:`${H.class}__container`,ref:y,children:[u.jsx(Ye,{animated:_,className:`${H.class}__input`,disabled:g,feedback:z,hasFeedback:se,label:t,mask:ce,max:h,min:D,name:e,noMargin:ue,onBlurHandler:$,onChangeHandler:A,onFocusHandler:j,onKeyDownHandler:De,placeholder:m,size:r,status:k,testId:s,tooltip:I,tooltipPlacement:W,tooltipPosition:M,type:T,value:a},le),(d||w)&&(w?u.jsx("div",{className:`${H.class}__loading ${H.class}__loading--${r}`,style:{width:"18px"},children:u.jsx(mt,{fullscreen:!1})}):d&&u.jsx(R,{className:`${H.class}__icon ${H.class}__icon--${r}`,image:d})),ye&&u.jsx("div",{className:`${H.class}__list ${H.class}__list--${r}`,"data-testid":"ds-list",children:U()})]})};Ta.displayName="DsEditableSelect";const Ge={name:"DsIndicator",class:"ds-indicator",props:{current:{type:Number,default:0},length:{type:Number,required:!0}}},kn=({length:t,current:e=Ge.props.current.default})=>{const[s,a]=v.useState(e),n=i=>i<s?`${Ge.class}__step--older`:i===s?`${Ge.class}__step--active`:"";v.useEffect(()=>{a(e)},[e]);const r=[];for(let i=0;i<t;i++)r.push(u.jsx("div",{className:`${Ge.class}__step ${n(i)}`,"data-testid":`ds-indicator-step-${i}`},i));return u.jsx("div",{className:Ge.class,children:r})},Fa={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:()=>{}}}},Ms=({name:t,value:e,prefix:s,sufix:a,min:n,max:r,onChangeHandler:i})=>{const o=v.useRef(null),[c,d]=v.useState(!1),[f,g]=v.useState("");v.useEffect(()=>{g(e??"")},[e]);const k=m=>{m.key==="Enter"&&E(m)};function E(m){d(!1),i&&(n&&parseInt(n)>=parseInt(f===""?n:f)?(m.currentTarget.value=n,g(n)):r&&parseInt(r)<parseInt(f)?(m.currentTarget.value=r,g(r)):m.currentTarget.value=f,i(m))}const C=m=>{g(m.currentTarget.value)},_=async()=>{var m;await d(!0),(m=o.current)==null||m.focus()};return u.jsx("div",{className:Fa.class,children:c?u.jsx("input",{className:"ds-input__input","data-testid":"ds-input",max:r,min:n,name:t,onBlur:E,onChange:C,onKeyDown:k,ref:o,type:"number",value:f}):u.jsx("div",{"data-testid":"ds-inline-editible-div-click",onClick:_,children:u.jsxs($e,{alignItems:"center",gap:"nano",children:[u.jsx(te,{children:u.jsx(Ie,{children:u.jsxs("b",{children:[s,e,a]})})}),u.jsx(te,{children:u.jsx(R,{image:"edit_square"})})]})})})};Ms.propTypes={value:l.string},Ms.displayName="DsInlineEditable";var Oa=(t=>(t[t.Elevation1=1]="Elevation1",t[t.Elevation2=2]="Elevation2",t[t.Elevation3=3]="Elevation3",t[t.Elevation4=4]="Elevation4",t))(Oa||{}),Vs=(t=>(t.Squared="squared",t.Rounded="rounded",t))(Vs||{});const ve={name:"Modal",class:"ds-modal",props:{elevation:{type:Number,options:[1,2,3,4]},variant:{type:String,default:"rounded",options:Object.values(Vs)},cancelBtnText:{type:String,default:"Cancelar"},confirmBtnText:{type:String,default:"Confirmar"},isModalOpen:{type:Boolean,default:!1}}},Ls=({className:t,title:e,content:s,cancelBtnText:a=ve.props.cancelBtnText.default,confirmBtnText:n=ve.props.confirmBtnText.default,variant:r=ve.props.variant.default,elevation:i,isModalOpen:o=ve.props.isModalOpen.default,onClose:c,onCancel:d,onConfirm:f,...g})=>{const k=r&&ve.props.variant.options.find(m=>m===r)?`${ve.class}--${r}`:`${ve.class}--${ve.props.variant.default}`,E=i&&`${ve.class}--elevation-${i}`,C=f||d,_=v.useCallback(m=>{m.keyCode===27&&c()},[c]);return v.useEffect(()=>(o&&window&&!C&&window.addEventListener("keyup",_),()=>{window.removeEventListener("keyup",_)}),[C,_]),o?u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"ds-modal-overlay","data-testid":"ds-modal-overlay",...g,onClick:()=>C?()=>{}:c()}),u.jsxs("div",{className:[ve.class,k,E,t].filter(m=>m).join(" "),"data-testid":"ds-modal",children:[!C&&u.jsx("button",{className:"ds-modal__closeBtn","data-testid":"ds-modal-close-button",onClick:c,children:u.jsx(R,{image:"close",size:"lg"})}),u.jsxs("div",{className:"ds-modal__content",children:[u.jsx("div",{className:"ds-modal__content__title",children:e}),e&&u.jsx(ge,{vertical:"xxxs"}),u.jsx("div",{className:"ds-modal__content__content",children:s})]}),C&&u.jsx(ge,{vertical:"sm"}),!C&&u.jsx(ge,{vertical:"xxs"}),u.jsxs("div",{className:"ds-modal__cta",children:[d&&u.jsx(Je,{onClick:()=>{c(),d()},children:a}),f&&u.jsx(Je,{onClick:()=>{c(),f()},children:n})]})]})]}):null};Ls.propTypes={firstButtonText:l.string,confirmBtnText:l.string,cancelBtnText:l.string,variant:l.oneOf(ve.props.variant.options),elevation:l.oneOf(ve.props.elevation.options),isModalOpen:l.bool,title:l.node,content:l.node},Ls.displayName="DsModal";var js=(t=>(t.Success="success",t.Danger="danger",t.Warning="warning",t.Info="info",t))(js||{}),Ps=(t=>(t.Rounded="rounded",t.Squared="squared",t))(Ps||{});const oe={name:"DsNotification",class:"ds-notification",props:{type:{type:String,default:"info",options:Object.values(js)},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:"rounded",options:Object.values(Ps)},progressBar:{type:Boolean,default:!0},testId:{type:String,default:"ds-notification"}}};var Ia=(t=>(t.success="check",t.danger="error",t.warning="warning",t.info="info",t))(Ia||{});const qs=({className:t,type:e=oe.props.type.default,variant:s=oe.props.variant.default,id:a,children:n,message:r,autoClose:i=oe.props.autoClose.default,autoCloseTimer:o=oe.props.autoCloseTimer.default,dismissible:c=oe.props.dismissible.default,elevation:d,progressBar:f=oe.props.progressBar.default,handleClose:g,testId:k=oe.props.testId.default})=>{const[E,C]=v.useState(o),[_,m]=v.useState(!1),[w,N]=v.useState(!0),T=[oe.class,e&&`${oe.class}--${e}`,s&&`${oe.class}--${s}`,d&&`${oe.class}--elevation-${d}`,t].join(" "),D=()=>C(W=>(W===0&&N(!1),W-100));v.useEffect(()=>{!i&&!c&&N(!0);let W;return!_&&i&&(W=setInterval(D,100)),()=>{clearInterval(W)}},[_,i,o,w,c]);const h=()=>{m(!0)},I=()=>{m(!1)},M=W=>{N(!1),g&&g(W)};return w?u.jsxs("div",{className:T,"data-testid":k,id:a,onMouseEnter:h,onMouseLeave:I,children:[u.jsx(Xe,{bottom:"nano",top:"nano",children:u.jsxs($e,{alignItems:"center",flexWrap:"nowrap",gap:"xxxs",children:[u.jsx(te,{children:u.jsx(R,{color:e,fill:!0,image:Ia[e]})}),u.jsx(te,{flex:"1",children:u.jsx(Xe,{left:"none",right:"none",space:"nano",children:n??r})}),u.jsx(te,{children:c?u.jsx("div",{className:`${oe.class}__button`,"data-testid":`${k}-close`,onClick:W=>M(W),children:u.jsx(Xe,{children:u.jsx(R,{image:"close"})})}):u.jsx(ge,{horizontal:"quark"})})]})}),f&&i&&u.jsx("div",{className:`${oe.class}__progress-bar ${oe.class}__progress-bar--${e}`,"data-testid":`${k}-progress-bar`,style:{width:`${E/o*100}%`}})]}):null};qs.displayName="DsNotification";const At={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:"},testId:{type:String,default:"ds-password-confirmation"}}},wt={strong:"Forte",good:"Boa",medium:"Médio",weak:"Fraco"},zs=({onChange:t,validationList:e=At.props.validationList.default,instructionLabel:s=At.props.instructionLabel.default,testId:a=At.props.testId.default})=>{const[n,r]=v.useState(""),[i,o]=v.useState(""),[c,d]=v.useState([]),[f,g]=v.useState({score:0,color:"danger",label:"Fraco"}),[k,E]=v.useState(!1),C=v.useCallback(h=>{const I=e.map(M=>M==null?void 0:M.rule(h));return d(I),I},[e]),_=v.useCallback(h=>{r(h.currentTarget.value);const I=C(h.currentTarget.value),M=T(I);t({password:h.currentTarget.value,confirmationPassword:i,isEqual:i===h.currentTarget.value,feedback:M})},[i,t,C]),m=v.useCallback(h=>{o(h.currentTarget.value);const I=C(n),M=T(I);t({password:n,confirmationPassword:h.currentTarget.value,isEqual:n===h.currentTarget.value,feedback:M})},[n,t,C]),w=v.useMemo(()=>n!==i&&k?{status:"error",feedback:"As senhas são diferentes"}:{status:"",feedback:""},[n,i,k]),N=v.useCallback(h=>{const I={score:h,color:"danger",label:wt.weak};return h>30&&h<75?(I.color="warning",I.label=wt.medium):h>=75&&h<100?(I.color="success",I.label=wt.good):h===100&&(I.color="success-dark",I.label=wt.strong),I},[]),T=v.useCallback(h=>{const I=h.reduce((W,z)=>{let se=W;return z?(se++,se):W},0),M=N(I*100/h.length);return g(M),M},[N]),D=()=>u.jsx("ul",{children:e.map((h,I)=>{const M=c[I]?"ds-password-confirmation__list":"ds-password-confirmation__list--disc";return u.jsxs("li",{className:M,children:[c[I]?u.jsx(R,{color:"success-dark",image:"check",testId:"ds-check-icon"}):null,u.jsx(ge,{horizontal:"quark"}),u.jsx(Ie,{children:h.title})]},I+h.title)})});return u.jsxs($e,{className:"ds-password-confirmation",flexDirection:"column",children:[u.jsx(te,{children:u.jsx(Ye,{label:"Senha",name:"password",onChangeHandler:_,testId:`${a}-main-input`,type:"password",value:n})}),u.jsx(te,{children:u.jsx(_s,{color:f==null?void 0:f.color,label:f==null?void 0:f.label,progress:f==null?void 0:f.score})}),u.jsx(te,{children:u.jsx(Ie,{children:s})}),u.jsx(te,{children:D()}),u.jsx(ge,{vertical:"xxs"}),u.jsx(te,{children:u.jsx(Ye,{feedback:w.feedback,label:"Confirme a senha",name:"confirmPassword",onBlurHandler:()=>E(!0),onChangeHandler:m,onFocusHandler:()=>E(!0),status:w.status,testId:`${a}-confirm-input`,type:"password",value:i})})]})};zs.propTypes={onChange:l.func,validationList:l.array,instructionLabel:l.string,testId:l.string},zs.displayName="DsPasswordConfirmation";const Ee={name:"DsStepper",class:"ds-stepper",props:{steps:{type:Array,required:!0},selectedStep:{type:Number,default:0}}},Na=({steps:t,selectedStep:e=Ee.props.selectedStep.default,onChange:s})=>{const[a,n]=v.useState(e),r=(i,o)=>{const c=[`${Ee.class}__button`];return o!==i&&c.push(`${Ee.class}__button--round`),t[i]&&t[i].disabled&&c.push(`${Ee.class}__button--disabled`),c.join(" ")};return v.useEffect(()=>{n(e)},[e]),v.useEffect(()=>{s(a)},[a]),u.jsxs("div",{className:Ee.class,children:[u.jsxs("span",{className:`${Ee.class}__step-counter`,children:["Etapa ",a+1," de ",t==null?void 0:t.length]}),u.jsx("div",{className:`${Ee.class}__step`,children:t.map((i,o)=>u.jsx("div",{className:`${Ee.class}__content`,children:u.jsx("button",{className:r(o,a),"data-testid":`ds-button-${o}`,disabled:i.disabled,onClick:()=>n(o),children:u.jsxs("span",{className:`${Ee.class}__text`,children:[a===o?u.jsx(Xe,{bottom:"none",left:"nano",right:"nano",top:"none",children:u.jsx(R,{className:`${Ee.class}__icon`,fill:!0,image:i.icon,testId:`ds-icon-${o}`})}):u.jsx(R,{className:`${Ee.class}__icon`,fill:!0,image:i.icon,testId:`ds-icon-${o}`}),a===o&&i.label]})})},`${i.name}-${i.label}`))})]})};Na.displayName="DsStepper";const we={name:"Table",class:"ds-table",props:{header:{type:Array,default:[]},items:{type:Array,default:[]},columns:{type:Array,default:[]}}},xa=({item:t,columns:e})=>u.jsx("tr",{className:`${we.class}__row`,children:e.map((s,a)=>{const n=s.align&&`${we.class}__cell--align-${s.align}`;return u.jsx("td",{children:u.jsx("div",{className:[`${we.class}__cell`,n,s.className].filter(r=>r).join(" "),children:t&&t[`${s.name}`]})},a)})});xa.displayName="DsTableRow";const Ba=({columns:t,data:e,className:s})=>u.jsx("div",{className:`${we.class}__wrapper`,children:u.jsxs("table",{className:[`${we.class}`,s].filter(a=>a).join(" "),children:[u.jsx("thead",{className:`${we.class}__head`,children:u.jsx("tr",{className:`${we.class}__row`,children:t==null?void 0:t.map((a,n)=>u.jsx("th",{style:{width:a.size},children:u.jsx("div",{className:[`${we.class}__cell`,a.align&&`${we.class}__cell--align-${a.align}`].filter(r=>r).join(" "),children:a.label})},n))})}),u.jsx("tbody",{className:`${we.class}__body`,children:e&&e.map((a,n)=>u.jsx(xa,{columns:t,item:a},n))})]})});Ba.displayName="DsTable";var Us=(t=>(t.None="",t.Primary="primary",t.Secondary="secondary",t.Neutral="neutral",t.Success="success",t.Warning="warning",t.Danger="danger",t.Info="info",t))(Us||{}),Ze=(t=>(t.Segmented="segmented",t.Navigation="navigation",t))(Ze||{});const ie={name:"DsTabs",class:"ds-tabs",props:{tabs:{type:Array,required:!0},selectedTab:{type:Number,default:0},color:{type:String,default:"primary",options:Object.values(Us)},variant:{type:String,default:"segmented",options:Object.values(Ze)},className:{type:String,default:""},onChange:{type:Function,default:()=>{}}}},bn=({active:t,className:e,color:s,disabled:a,index:n,name:r,title:i,onClick:o,variant:c,tabDomId:d,panelDomId:f,hasPanel:g,tabDataTestId:k})=>{const E=[`${ie.class}__tab`,s&&`${ie.class}__tab-color--${s}`,t&&`${ie.class}__tab--active`,a&&`${ie.class}__tab--disabled`,e].filter(Boolean).join(" "),C=()=>{a||o==null||o(n)},_=m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),C())};return c===Ze.Navigation?u.jsx("button",{"aria-controls":g?f:void 0,"aria-selected":t,className:E,"data-testid":k??`ds-tab-${n}`,disabled:a,id:d,onClick:C,role:"tab",type:"button",children:i}):u.jsx("div",{"aria-disabled":a,"aria-selected":t,className:E,"data-testid":k??`ds-tab-${n}`,id:r,onClick:C,onKeyDown:_,role:"tab",tabIndex:a?-1:0,children:i})};function Hs(t,e){if(t.length===0)return 0;const s=t[e];if(s&&!s.hidden)return e;const a=t.findIndex(n=>!n.hidden);return a>=0?a:0}const Sn=({tabs:t,color:e,selectedTab:s=ie.props.selectedTab.default,className:a,variant:n=ie.props.variant.default,onChange:r,"aria-label":i,"aria-labelledby":o,rootDataTestId:c})=>{const[d,f]=v.useState(()=>Hs(t,s));v.useEffect(()=>{f(Hs(t,s))},[s,t]),v.useEffect(()=>{if(t.length===0)return;const m=t[d];(!m||m.hidden)&&f(Hs(t,d))},[t,d]);const g=v.useMemo(()=>t.map((m,w)=>({tab:m,index:w})).filter(({tab:m})=>!m.hidden),[t]),k=m=>{f(m),r==null||r(m)},E=[ie.class,n===Ze.Navigation&&`${ie.class}--navigation`,a].filter(Boolean).join(" "),C=n===Ze.Navigation,_=t[d];return u.jsxs("div",{"aria-label":i,"aria-labelledby":o,className:E,"data-testid":c??"ds-tabs",children:[u.jsx("div",{className:`${ie.class}__header`,role:C?"tablist":void 0,children:g.map(({tab:m,index:w})=>{const N=`${ie.class}-tab-${m.name??w}`,T=`${ie.class}-panel-${m.name??w}`,D=m.content!==void 0;return u.jsx(bn,{...m,active:d===w,color:e,hasPanel:D,index:w,onClick:()=>k(w),panelDomId:D?T:void 0,tabDomId:N,variant:n},N)})}),C?g.map(({tab:m,index:w})=>{if(m.content===void 0)return null;const N=`${ie.class}-panel-${m.name??w}`,T=`${ie.class}-tab-${m.name??w}`,D=d===w;return u.jsx("div",{"aria-labelledby":T,className:`${ie.class}__panel`,"data-testid":m.panelDataTestId??`ds-tabs-panel-${m.name??w}`,hidden:!D,id:N,role:"tabpanel",tabIndex:D?0:-1,children:m.content},N)}):u.jsx("div",{className:`${ie.class}__content`,children:_?_.content:null})]})};function $a({library:t,children:e,theme:s}){return u.jsx("div",{"data-library":t,"data-theme":s,children:u.jsx("div",{className:"ds-theme",children:e})})}$a.propTypes={library:l.string,children:l.node.isRequired,theme:l.string};var Ws=(t=>(t.TopLeft="top-left",t.TopCenter="top-center",t.TopRight="top-right",t.BottomLeft="bottom-left",t.BottomCenter="bottom-center",t.BottomRight="bottom-right",t))(Ws||{});const je={name:"DsNotificationList",class:"ds-notification-list",props:{position:{type:String,default:"top-right",options:Object.values(Ws)},fluid:{type:Boolean,default:!1},className:{type:String,default:""}}},Ys=({className:t=je.props.className.default,position:e=je.props.position.default,fluid:s=je.props.fluid.default,notifications:a,removeNotification:n})=>{const r=[je.class,`${je.class}--${e}`,s&&`${je.class}--fluid`,t].join(" "),i=o=>{n&&n(o)};return u.jsx("div",{className:r,"data-testid":"ds-notification-list",children:a.map(o=>{const c=o.autoClose??!0,d=o.autoCloseTimer??4e3,f=o.dismissible??!0,g=o.elevation??2,k=o.progressBar??!0;return u.jsx(qs,{autoClose:c,autoCloseTimer:d,dismissible:f,elevation:g,handleClose:()=>i(o.id),id:o.id,message:o.message,progressBar:k,type:o.type},o.id)})})};Ys.propTypes={position:l.oneOf(je.props.position.options),fluid:l.bool,notifications:l.array,removeNotification:l.func},Ys.displayName="DsNotificationList";const nt={class:"ds-split-layout"},Ma=({leftContent:t,rightContent:e,leftBackgroundColor:s,rightBackgroundColor:a,reverseOnMobile:n=!1})=>{const r=s?`bg-color__${s}`:"",i=a?`bg-color__${a}`:"",o=n?`${nt.class}__content--mobile-order-2`:"",c=n?`${nt.class}__content--mobile-order-1`:"",d=`${nt.class}__content ${r} ${o}`,f=`${nt.class}__content ${i} ${c}`;return u.jsxs("div",{className:nt.class,children:[u.jsx("div",{className:d,children:t}),u.jsx("div",{className:f,children:e})]})};Ma.displayName="DsSplitLayout";const rt={name:"TwoColumns",class:"ds-two-columns",props:{}},Ks=({header:t,main:e,sidebar:s,breadcrumb:a})=>u.jsxs(bt,{children:[u.jsxs("div",{className:"ds-grid",children:[u.jsx("div",{className:"ds-grid__row",children:u.jsx("div",{className:"ds-grid__col ds-grid__col-12",children:a})}),u.jsxs("div",{className:`${rt.class}__content ds-grid__row`,children:[u.jsxs("div",{className:"ds-grid__col ds-grid__col--lg-8 ds-grid__col--sm-12 ds-grid__col-12",children:[u.jsx("div",{className:`${rt.class}__header`,children:t}),u.jsx("div",{className:`${rt.class}__main`,children:e})]}),u.jsx("div",{className:`${rt.class}__sidebar ds-grid__col ds-grid__col--lg-4 ds-grid__col--sm-12 ds-grid__col-12`,children:s})]})]}),u.jsx(ge,{vertical:"sm"})]});Ks.propTypes={breadcrumb:l.node,header:l.node,main:l.node,sidebar:l.node},Ks.displayName="DsTwoColumns",p.ButtonColor=Mt,p.ButtonElevation=ra,p.ButtonIconPosition=jt,p.ButtonSize=Lt,p.ButtonVariant=Vt,p.CardColor=lt,p.CardElevation=la,p.ChipColor=Kt,p.ChipIconPosition=et,p.ChipVariant=Xt,p.DsAccordion=Bs,p.DsAccordionItem=Ct,p.DsActiveTags=Aa,p.DsButton=Je,p.DsCaption=Ht,p.DsCard=Wt,p.DsCarousel=wa,p.DsCheckbox=Yt,p.DsChip=Za,p.DsContainer=bt,p.DsEditableSelect=Ta,p.DsFlexElement=te,p.DsFlexLayout=$e,p.DsGridElement=Ca,p.DsGridLayout=xs,p.DsHR=Qt,p.DsHeading=ot,p.DsIcon=R,p.DsIndicator=kn,p.DsInlineEditable=Ms,p.DsInput=Ye,p.DsLoading=mt,p.DsModal=Ls,p.DsNotification=qs,p.DsNotificationList=Ys,p.DsOption=ds,p.DsParagraph=Ie,p.DsPasswordConfirmation=zs,p.DsProgress=_s,p.DsRadio=ka,p.DsSelect=As,p.DsSpacer=ge,p.DsSplitLayout=Ma,p.DsStepper=Na,p.DsSubtitle=ba,p.DsTable=Ba,p.DsTabs=Sn,p.DsTextArea=Is,p.DsTooltip=qe,p.DsTwoColumns=Ks,p.DsWrapper=Xe,p.EditableSelectSize=$s,p.FlexLayoutAlignItems=gs,p.FlexLayoutDirection=ms,p.FlexLayoutGap=ys,p.FlexLayoutJustifyContent=fs,p.FlexLayoutWrap=vs,p.GridLayoutAlign=St,p.GridLayoutGap=Ns,p.HRBorderStyle=Gt,p.HRSize=Zt,p.HeadingType=Rt,p.IconColor=Pt,p.IconSize=zt,p.IconVariation=qt,p.IconWeight=Ut,p.InputSize=as,p.InputStatus=ns,p.InputTooltipPlacement=rs,p.InputTooltipPosition=is,p.InputType=ss,p.LoadingBackgroundColor=cs,p.LoadingSize=us,p.ModalElevation=Oa,p.ModalVariant=Vs,p.NotificationListPosition=Ws,p.NotificationType=js,p.NotificationVariant=Ps,p.ParagraphType=ps,p.ProgressColor=hs,p.RadioVariant=ks,p.SelectSize=bs,p.SelectStatus=Ss,p.SelectTooltipPlacement=Es,p.SelectTooltipPosition=Cs,p.SpacerSize=_t,p.SubtitleType=ws,p.TabsColor=Us,p.TabsVariant=Ze,p.TextAreaResize=Os,p.TextAreaSize=Ds,p.TextAreaStatus=Fs,p.TextAreaType=Ts,p.ThemeProvider=$a,p.TooltipPlacement=os,p.TooltipPosition=ls,p.WrapperSpace=ze,p.accordionConfig=Et,p.accordionItemConfig=Ue,p.activeTagsConfig=yn,p.buttonConfig=X,p.captionConfig=ia,p.cardConfig=Ne,p.carouselConfig=Re,p.checkboxConfig=ae,p.chipConfig=Te,p.containerConfig=at,p.editableSelectConfig=H,p.flexElementConfig=yt,p.flexLayoutConfig=Le,p.gridElementConfig=vn,p.gridLayoutConfig=J,p.headingConfig=We,p.horizontalRuleConfig=Me,p.iconConfig=pe,p.indicatorConfig=Ge,p.inlineEditableConfig=Fa,p.inputConfig=G,p.loadingConfig=he,p.modalConfig=ve,p.notificationConfig=oe,p.notificationListConfig=je,p.optionConfig=Oe,p.paragraphConfig=st,p.passwordConfirmationConfig=At,p.progressConfig=vt,p.radioConfig=me,p.selectConfig=Q,p.spacerConfig=Ke,p.stepperConfig=Ee,p.subtitleConfig=kt,p.tableConfig=we,p.tabsConfig=ie,p.textAreaConfig=ee,p.tooltipConfig=Ae,p.twoColumnsConfig=rt,p.wrapperConfig=Se,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
|