@akad/strapi-blocks 0.0.1-beta.10 → 0.0.1-beta.11
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/package.json +1 -1
- package/styles.css +1 -1
- package/ts-lib.js +7 -10
- package/ts-lib.umd.cjs +2 -2
package/ts-lib.umd.cjs
CHANGED
|
@@ -17,7 +17,7 @@ object-assign
|
|
|
17
17
|
(c) Sindre Sorhus
|
|
18
18
|
@license MIT
|
|
19
19
|
*/var Ls,Ca;function cc(){if(Ca)return Ls;Ca=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function s(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function n(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var i={},l=0;l<10;l++)i["_"+String.fromCharCode(l)]=l;var d=Object.getOwnPropertyNames(i).map(function(u){return i[u]});if(d.join("")!=="0123456789")return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(u){o[u]=u}),Object.keys(Object.assign({},o)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ls=n()?Object.assign:function(a,i){for(var l,d=s(a),o,u=1;u<arguments.length;u++){l=Object(arguments[u]);for(var f in l)e.call(l,f)&&(d[f]=l[f]);if(t){o=t(l);for(var m=0;m<o.length;m++)r.call(l,o[m])&&(d[o[m]]=l[o[m]])}}return d},Ls}var Vs,Ta;function zs(){if(Ta)return Vs;Ta=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Vs=t,Vs}var Oa,Pa;function Na(){return Pa||(Pa=1,Oa=Function.call.bind(Object.prototype.hasOwnProperty)),Oa}var Hs,Ia;function dc(){if(Ia)return Hs;Ia=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=zs(),r={},s=Na();t=function(a){var i="Warning: "+a;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function n(a,i,l,d,o){if(process.env.NODE_ENV!=="production"){for(var u in a)if(s(a,u)){var f;try{if(typeof a[u]!="function"){var m=Error((d||"React class")+": "+l+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}f=a[u](i,u,d,l,null,e)}catch(g){f=g}if(f&&!(f instanceof Error)&&t((d||"React class")+": type specification of "+l+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in r)){r[f.message]=!0;var _=o?o():"";t("Failed "+l+" type: "+f.message+(_??""))}}}}return n.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Hs=n,Hs}var Us,Da;function hc(){if(Da)return Us;Da=1;var t=Aa(),e=cc(),r=zs(),s=Na(),n=dc(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(l){var d="Warning: "+l;typeof console<"u"&&console.error(d);try{throw new Error(d)}catch{}});function i(){return null}return Us=function(l,d){var o=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(P){var k=P&&(o&&P[o]||P[u]);if(typeof k=="function")return k}var m="<<anonymous>>",_={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:h(),arrayOf:b,element:w(),elementType:S(),instanceOf:O,node:D(),objectOf:j,oneOf:I,oneOfType:V,shape:B,exact:R};function g(P,k){return P===k?P!==0||1/P===1/k:P!==P&&k!==k}function v(P,k){this.message=P,this.data=k&&typeof k=="object"?k:{},this.stack=""}v.prototype=Error.prototype;function p(P){if(process.env.NODE_ENV!=="production")var k={},x=0;function E($,C,L,F,z,G,J){if(F=F||m,G=G||L,J!==r){if(d){var U=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 U.name="Invariant Violation",U}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var fe=F+":"+L;!k[fe]&&x<3&&(a("You are manually calling a React.PropTypes validation function for the `"+G+"` prop on `"+F+"`. 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."),k[fe]=!0,x++)}}return C[L]==null?$?C[L]===null?new v("The "+z+" `"+G+"` is marked as required "+("in `"+F+"`, but its value is `null`.")):new v("The "+z+" `"+G+"` is marked as required in "+("`"+F+"`, but its value is `undefined`.")):null:P(C,L,F,z,G)}var c=E.bind(null,!1);return c.isRequired=E.bind(null,!0),c}function y(P){function k(x,E,c,$,C,L){var F=x[E],z=q(F);if(z!==P){var G=se(F);return new v("Invalid "+$+" `"+C+"` of type "+("`"+G+"` supplied to `"+c+"`, expected ")+("`"+P+"`."),{expectedType:P})}return null}return p(k)}function h(){return p(i)}function b(P){function k(x,E,c,$,C){if(typeof P!="function")return new v("Property `"+C+"` of component `"+c+"` has invalid PropType notation inside arrayOf.");var L=x[E];if(!Array.isArray(L)){var F=q(L);return new v("Invalid "+$+" `"+C+"` of type "+("`"+F+"` supplied to `"+c+"`, expected an array."))}for(var z=0;z<L.length;z++){var G=P(L,z,c,$,C+"["+z+"]",r);if(G instanceof Error)return G}return null}return p(k)}function w(){function P(k,x,E,c,$){var C=k[x];if(!l(C)){var L=q(C);return new v("Invalid "+c+" `"+$+"` of type "+("`"+L+"` supplied to `"+E+"`, expected a single ReactElement."))}return null}return p(P)}function S(){function P(k,x,E,c,$){var C=k[x];if(!t.isValidElementType(C)){var L=q(C);return new v("Invalid "+c+" `"+$+"` of type "+("`"+L+"` supplied to `"+E+"`, expected a single ReactElement type."))}return null}return p(P)}function O(P){function k(x,E,c,$,C){if(!(x[E]instanceof P)){var L=P.name||m,F=ne(x[E]);return new v("Invalid "+$+" `"+C+"` of type "+("`"+F+"` supplied to `"+c+"`, expected ")+("instance of `"+L+"`."))}return null}return p(k)}function I(P){if(!Array.isArray(P))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),i;function k(x,E,c,$,C){for(var L=x[E],F=0;F<P.length;F++)if(g(L,P[F]))return null;var z=JSON.stringify(P,function(G,J){var U=se(J);return U==="symbol"?String(J):J});return new v("Invalid "+$+" `"+C+"` of value `"+String(L)+"` "+("supplied to `"+c+"`, expected one of "+z+"."))}return p(k)}function j(P){function k(x,E,c,$,C){if(typeof P!="function")return new v("Property `"+C+"` of component `"+c+"` has invalid PropType notation inside objectOf.");var L=x[E],F=q(L);if(F!=="object")return new v("Invalid "+$+" `"+C+"` of type "+("`"+F+"` supplied to `"+c+"`, expected an object."));for(var z in L)if(s(L,z)){var G=P(L,z,c,$,C+"."+z,r);if(G instanceof Error)return G}return null}return p(k)}function V(P){if(!Array.isArray(P))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var k=0;k<P.length;k++){var x=P[k];if(typeof x!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Z(x)+" at index "+k+"."),i}function E(c,$,C,L,F){for(var z=[],G=0;G<P.length;G++){var J=P[G],U=J(c,$,C,L,F,r);if(U==null)return null;U.data&&s(U.data,"expectedType")&&z.push(U.data.expectedType)}var fe=z.length>0?", expected one of type ["+z.join(", ")+"]":"";return new v("Invalid "+L+" `"+F+"` supplied to "+("`"+C+"`"+fe+"."))}return p(E)}function D(){function P(k,x,E,c,$){return H(k[x])?null:new v("Invalid "+c+" `"+$+"` supplied to "+("`"+E+"`, expected a ReactNode."))}return p(P)}function T(P,k,x,E,c){return new v((P||"React class")+": "+k+" type `"+x+"."+E+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+c+"`.")}function B(P){function k(x,E,c,$,C){var L=x[E],F=q(L);if(F!=="object")return new v("Invalid "+$+" `"+C+"` of type `"+F+"` "+("supplied to `"+c+"`, expected `object`."));for(var z in P){var G=P[z];if(typeof G!="function")return T(c,$,C,z,se(G));var J=G(L,z,c,$,C+"."+z,r);if(J)return J}return null}return p(k)}function R(P){function k(x,E,c,$,C){var L=x[E],F=q(L);if(F!=="object")return new v("Invalid "+$+" `"+C+"` of type `"+F+"` "+("supplied to `"+c+"`, expected `object`."));var z=e({},x[E],P);for(var G in z){var J=P[G];if(s(P,G)&&typeof J!="function")return T(c,$,C,G,se(J));if(!J)return new v("Invalid "+$+" `"+C+"` key `"+G+"` supplied to `"+c+"`.\nBad object: "+JSON.stringify(x[E],null," ")+`
|
|
20
|
-
Valid keys: `+JSON.stringify(Object.keys(P),null," "));var U=J(L,G,c,$,C+"."+G,r);if(U)return U}return null}return p(k)}function H(P){switch(typeof P){case"number":case"string":case"undefined":return!0;case"boolean":return!P;case"object":if(Array.isArray(P))return P.every(H);if(P===null||l(P))return!0;var k=f(P);if(k){var x=k.call(P),E;if(k!==P.entries){for(;!(E=x.next()).done;)if(!H(E.value))return!1}else for(;!(E=x.next()).done;){var c=E.value;if(c&&!H(c[1]))return!1}}else return!1;return!0;default:return!1}}function K(P,k){return P==="symbol"?!0:k?k["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&k instanceof Symbol:!1}function q(P){var k=typeof P;return Array.isArray(P)?"array":P instanceof RegExp?"object":K(k,P)?"symbol":k}function se(P){if(typeof P>"u"||P===null)return""+P;var k=q(P);if(k==="object"){if(P instanceof Date)return"date";if(P instanceof RegExp)return"regexp"}return k}function Z(P){var k=se(P);switch(k){case"array":case"object":return"an "+k;case"boolean":case"date":case"regexp":return"a "+k;default:return k}}function ne(P){return!P.constructor||!P.constructor.name?m:P.constructor.name}return _.checkPropTypes=n,_.resetWarningCache=n.resetWarningCache,_.PropTypes=_,_},Us}var Gs,Ma;function pc(){if(Ma)return Gs;Ma=1;var t=zs();function e(){}function r(){}return r.resetWarningCache=e,Gs=function(){function s(i,l,d,o,u,f){if(f!==t){var m=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 m.name="Invariant Violation",m}}s.isRequired=s;function n(){return s}var a={array:s,bigint:s,bool:s,func:s,number:s,object:s,string:s,symbol:s,any:s,arrayOf:n,element:s,elementType:s,instanceOf:n,node:s,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:r,resetWarningCache:e};return a.PropTypes=a,a},Gs}if(process.env.NODE_ENV!=="production"){var fc=Aa(),mc=!0;js.exports=hc()(fc.isElement,mc)}else js.exports=pc()();var gc=js.exports;const A=ic(gc);var Fa=(t=>(t.Primary="primary",t.Secondary="secondary",t.Info="info",t.Success="success",t.Danger="danger",t.Warning="warning",t.Neutral="neutral",t))(Fa||{}),Ba=(t=>(t.Solid="solid",t.Outline="outline",t.Text="text",t))(Ba||{}),ja=(t=>(t.Large="lg",t.Medium="md",t.Small="sm",t))(ja||{}),Ra=(t=>(t.Right="right",t.Left="left",t))(Ra||{});const rs={props:{color:{options:Object.values(Fa)},variant:{options:Object.values(Ba)},size:{options:Object.values(ja)},iconPosition:{options:Object.values(Ra)}}};var La=(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))(La||{}),Va=(t=>(t.Outlined="outlined",t.Rounded="rounded",t.Sharp="sharp",t))(Va||{}),za=(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))(za||{}),Ha=(t=>(t.Bold="bold",t.Semibold="semibold",t.Medium="medium",t.Regular="regular",t.Light="light",t.Extralight="extralight",t))(Ha||{});const rt={class:"ds-icon",props:{color:{default:"neutral-90",options:Object.values(La)},image:{default:"settings"},variation:{options:Object.values(Va)},size:{default:"md",options:Object.values(za)},fill:{default:!1},testId:{default:"ds-icon-test"},weight:{default:"semibold",options:Object.values(Ha)},onClick:{default:()=>({})}}};var ss=(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))(ss||{});const yc={bold:700,semibold:600,medium:500,regular:400,light:300,extralight:200},Ae=({image:t=rt.props.image.default,color:e=rt.props.color.default,className:r,size:s=rt.props.size.default,fill:n=rt.props.fill.default,weight:a=rt.props.weight.default,testId:i=rt.props.testId.default,onClick:l=rt.props.onClick.default})=>{const d="material-symbols-rounded",o=e&&rt.props.color.options.find(f=>f===e)&&`color__${ss[e]??e}`,u=X.useMemo(()=>({fontVariationSettings:`'FILL' ${n?1:0}, 'GRAD' 0,'wght' ${yc[a]}, 'opsz' 48`}),[a,n]);return M.jsx("i",{className:[`${rt.class}--${s}`,rt.class,d,o,r].filter(f=>f).join(" "),"data-testid":i,onClick:l,style:u,translate:"no",children:t})};Ae.propTypes={color:A.oneOf(rt.props.color.options),image:A.string,fontVariationSettings:A.object,size:A.oneOf(rt.props.size.options),fill:A.bool,weight:A.oneOf(rt.props.weight.options),onClick:A.func},Ae.displayName="DsIcon",A.oneOf(rs.props.color.options),A.oneOf(rs.props.variant.options),A.oneOf(rs.props.size.options),A.bool,A.string,A.bool,A.oneOf(rs.props.iconPosition.options),A.string,A.string,A.bool,A.string,A.string,A.node.isRequired,A.string,A.string;var Ws=(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))(Ws||{});const Tt={class:"ds-card",props:{backgroundColor:{default:"",options:Object.values(Ws)},borderColor:{default:"",options:Object.values(Ws)},elevation:{default:0,options:[0,1,2,3,4]},testId:{default:"ds-card"},trackId:{default:"track-click"}}},hr=({id:t,testId:e=Tt.props.testId.default,children:r,className:s,elevation:n=Tt.props.elevation.default,backgroundColor:a=Tt.props.backgroundColor.default,borderColor:i=Tt.props.borderColor.default,trackId:l=Tt.props.trackId.default,trackLabel:d})=>{const o=n&&`elevation-${n}`,u=i&&`border-color__${ss[i]??i}`,f=a&&`bg-color__${ss[a]??a}`;return M.jsx("div",{className:[Tt.class,s,o,u,f].filter(m=>m).join(" "),"data-testid":e,"data-trackid":l,...d&&{"data-tracklabel":d},id:t,children:r})};hr.propTypes={id:A.string,testId:A.string,backgroundColor:A.oneOf(Tt.props.backgroundColor.options),borderColor:A.oneOf(Tt.props.borderColor.options),elevation:A.oneOf(Tt.props.elevation.options),trackId:A.string,trackLabel:A.string},hr.displayName="DsCard";const We={class:"ds-checkbox",props:{testId:{default:"ds-checkbox-test"},label:{default:""},description:{default:""},checked:{default:!1},disabled:{default:!1},changeByChecked:{default:!1}}},Ua=X.forwardRef(({id:t,className:e,name:r,testId:s=We.props.testId.default,label:n=We.props.label.default,description:a=We.props.description.default,checked:i=We.props.checked.default,disabled:l=We.props.disabled.default,changeByChecked:d=We.props.changeByChecked.default,onChangeHandler:o},u)=>{const f=d??!1,m=i??!1,[_,g]=X.useState(m),v={image:_?"check_box":"check_box_outline_blank",class:_?`${We.class}__icon--checked`:`${We.class}__icon--unchecked`},p=l&&`${We.class}--disabled`,y=h=>{l||(g(b=>!b),o&&o(h))};return X.useEffect(()=>{f&&g(i)},[i,f]),M.jsxs("label",{className:[We.class,p,e].join(" "),htmlFor:t||r,children:[M.jsx("input",{checked:_,className:`${We.class}__input`,"data-testid":s,disabled:l,id:t||r,name:r,onChange:y,ref:u,type:"checkbox"}),M.jsx(Ae,{className:`${We.class}__icon ${v.class}`,fill:!0,image:v.image,size:"xxl",testId:`${s}-icon`}),(a||n)&&M.jsxs("div",{className:`${We.class}__label`,children:[n&&M.jsx("label",{className:`${We.class}__label-title`,htmlFor:t||r,children:n}),a&&M.jsx("label",{className:`${We.class}__label-description`,htmlFor:t||r,children:a})]})]})});Ua.propTypes={label:A.oneOfType([A.string,A.element]),name:A.string,className:A.string,testId:A.string,description:A.oneOfType([A.string,A.element]),checked:A.bool,disabled:A.bool},Ua.displayName="DsCheckbox";var Ga=(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))(Ga||{});const Or={class:"ds-heading",props:{type:{default:"heading-1",options:Object.values(Ga)}}},bt=({children:t,testId:e="ds-heading-test",type:r=Or.props.type.default,className:s})=>{const n={"heading-1":"h1","heading-2":"h2","heading-3":"h3","heading-4":"h4","heading-5":"h5","heading-6":"h6"},a=r.replace("heading-",""),i=Or.props.type.options.find(d=>d===r)&&`${Or.class}--${a}`,l=n[r];return M.jsx(l,{className:[Or.class,i,s].filter(d=>d).join(" "),"data-testid":e,children:t})};bt.propTypes={className:A.string,testId:A.string,type:A.oneOf(Or.props.type.options)},bt.displayName="DsHeading";var Wa=(t=>(t.None="",t.Dashed="dashed",t.Dotted="dotted",t))(Wa||{}),Ka=(t=>(t.None="",t.Small="small",t.Large="large",t))(Ka||{});const Yt={class:"ds-hr",props:{borderStyle:{type:String,default:"",options:Object.values(Wa)},size:{type:String,default:"",options:Object.values(Ka)}}};function qa(t,e,r){const s=r.props[t];return s.options&&s.options.some(n=>n===e)?`${r.class}--${e}`:""}const Ks=({size:t=Yt.props.size.default,borderStyle:e=Yt.props.borderStyle.default})=>{const r=qa("size",t,Yt),s=qa("borderStyle",e,Yt);return M.jsx("hr",{className:`${Yt.class} ${r} ${s}`.trim()})};Ks.propTypes={size:A.oneOf(Yt.props.size.options),borderStyle:A.oneOf(Yt.props.borderStyle.options)},Ks.displayName="DsHR";function Rt(t){return typeof t=="string"||t instanceof String}function Xa(t){var e;return typeof t=="object"&&t!=null&&(t==null||(e=t.constructor)==null?void 0:e.name)==="Object"}function Ya(t,e){return Array.isArray(e)?Ya(t,(r,s)=>e.includes(s)):Object.entries(t).reduce((r,s)=>{let[n,a]=s;return e(a,n)&&(r[n]=a),r},{})}const te={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function vc(t){switch(t){case te.LEFT:return te.FORCE_LEFT;case te.RIGHT:return te.FORCE_RIGHT;default:return t}}function qs(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function ns(t,e){if(e===t)return!0;const r=Array.isArray(e),s=Array.isArray(t);let n;if(r&&s){if(e.length!=t.length)return!1;for(n=0;n<e.length;n++)if(!ns(e[n],t[n]))return!1;return!0}if(r!=s)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){const a=e instanceof Date,i=t instanceof Date;if(a&&i)return e.getTime()==t.getTime();if(a!=i)return!1;const l=e instanceof RegExp,d=t instanceof RegExp;if(l&&d)return e.toString()==t.toString();if(l!=d)return!1;const o=Object.keys(e);for(n=0;n<o.length;n++)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;for(n=0;n<o.length;n++)if(!ns(t[o[n]],e[o[n]]))return!1;return!0}else if(e&&t&&typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();return!1}class _c{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?te.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?te.RIGHT:te.LEFT}}function ae(t,e){return new ae.InputMask(t,e)}function Za(t){if(t==null)throw new Error("mask property should be defined");return t instanceof RegExp?ae.MaskedRegExp:Rt(t)?ae.MaskedPattern:t===Date?ae.MaskedDate:t===Number?ae.MaskedNumber:Array.isArray(t)||t===Array?ae.MaskedDynamic:ae.Masked&&t.prototype instanceof ae.Masked?t:ae.Masked&&t instanceof ae.Masked?t.constructor:t instanceof Function?ae.MaskedFunction:(console.warn("Mask not found for mask",t),ae.Masked)}function Pr(t){if(!t)throw new Error("Options in not defined");if(ae.Masked){if(t.prototype instanceof ae.Masked)return{mask:t};const{mask:e=void 0,...r}=t instanceof ae.Masked?{mask:t}:Xa(t)&&t.mask instanceof ae.Masked?t:{};if(e){const s=e.mask;return{...Ya(e,(n,a)=>!a.startsWith("_")),mask:e.constructor,_mask:s,...r}}}return Xa(t)?{...t}:{mask:t}}function Ot(t){if(ae.Masked&&t instanceof ae.Masked)return t;const e=Pr(t),r=Za(e.mask);if(!r)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===r&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new r(e)}ae.createMask=Ot;let Xs=class{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,r){if(!(e==null||r==null||e===this.selectionStart&&r===this.selectionEnd))try{this._unsafeSelect(e,r)}catch{}}get isActive(){return!1}};ae.MaskElement=Xs;const Ja=90,bc=89;let as=class extends Xs{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,r,s;return(e=(r=(s=this.input).getRootNode)==null?void 0:r.call(s))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){if(this._handlers.redo&&(e.keyCode===Ja&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===bc&&e.ctrlKey))return e.preventDefault(),this._handlers.redo(e);if(this._handlers.undo&&e.keyCode===Ja&&(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={}}};ae.HTMLMaskElement=as;let kc=class extends as{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,r){this.input.setSelectionRange(e,r)}get value(){return this.input.value}set value(e){this.input.value=e}};ae.HTMLMaskElement=as;let Qa=class extends as{get _unsafeSelectionStart(){const e=this.rootElement,r=e.getSelection&&e.getSelection(),s=r&&r.anchorOffset,n=r&&r.focusOffset;return n==null||s==null||s<n?s:n}get _unsafeSelectionEnd(){const e=this.rootElement,r=e.getSelection&&e.getSelection(),s=r&&r.anchorOffset,n=r&&r.focusOffset;return n==null||s==null||s>n?s:n}_unsafeSelect(e,r){if(!this.rootElement.createRange)return;const s=this.rootElement.createRange();s.setStart(this.input.firstChild||this.input,e),s.setEnd(this.input.lastChild||this.input,r);const n=this.rootElement,a=n.getSelection&&n.getSelection();a&&(a.removeAllRanges(),a.addRange(s))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}};ae.HTMLContenteditableMaskElement=Qa;let eo=class ac{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>ac.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}};eo.MAX_LENGTH=100;class wc{constructor(e,r){this.el=e instanceof Xs?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new Qa(e):new kc(e),this.masked=Ot(r),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new eo,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 r;return e==null||((r=this.masked)==null?void 0:r.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof ae.Masked)&&this.masked.constructor===Za(e)){this.masked.updateOptions({mask:e});return}const r=e instanceof ae.Masked?e:Ot({mask:e});r.unmaskedValue=this.masked.unmaskedValue,this.masked=r}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,r){const s=this._listeners[e];s&&s.forEach(n=>n(r))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const r=this.masked.unmaskedValue,s=this.masked.value,n=this.masked.rawInputValue,a=this.displayValue,i=this.unmaskedValue!==r||this.value!==s||this._rawInputValue!==n;this._unmaskedValue=r,this._value=s,this._rawInputValue=n,this.el.value!==a&&(this.el.value=a),e==="auto"?this.alignCursor():e!=null&&(this.cursorPos=e),i&&this._fireChangeEvents(),!this._historyChanging&&(i||this.history.isEmpty)&&this.history.push({unmaskedValue:r,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:r,...s}=e,n=!this.maskEquals(r),a=this.masked.optionsIsChanged(s);n&&(this.mask=r),a&&this.masked.updateOptions(s),(n||a)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,te.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,r){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(r),this}off(e,r){if(!this._listeners[e])return this;if(!r)return delete this._listeners[e],this;const s=this._listeners[e].indexOf(r);return s>=0&&this._listeners[e].splice(s,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const r=new _c({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),s=this.masked.rawInputValue,n=this.masked.splice(r.startChangePos,r.removed.length,r.inserted,r.removeDirection,{input:!0,raw:!0}).offset,a=s===this.masked.rawInputValue?r.removeDirection:te.NONE;let i=this.masked.nearestInputPos(r.startChangePos+n,a);a!==te.NONE&&(i=this.masked.nearestInputPos(i,te.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}}ae.InputMask=wc;class ue{static normalize(e){return Array.isArray(e)?e:[e,new ue]}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}}ae.ChangeDetails=ue;class kt{constructor(e,r,s){e===void 0&&(e=""),r===void 0&&(r=0),this.value=e,this.from=r,this.stop=s}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const r=this.value[0];return this.value=this.value.slice(1),r}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}let ot=class Bs{constructor(e){this._value="",this._update({...Bs.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,r){r===void 0&&(r={input:!0}),this.reset(),this.append(e,r,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,r){return e}totalInputPositions(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),Math.min(this.displayValue.length,r-e)}extractInput(e,r,s){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),this.displayValue.slice(e,r)}extractTail(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),new kt(this.extractInput(e,r),e)}appendTail(e){return Rt(e)&&(e=new kt(String(e))),e.appendTo(this)}_appendCharRaw(e,r){return e?(this._value+=e,new ue({inserted:e,rawInserted:e})):new ue}_appendChar(e,r,s){r===void 0&&(r={});const n=this.state;let a;if([e,a]=this.doPrepareChar(e,r),e&&(a=a.aggregate(this._appendCharRaw(e,r)),!a.rawInserted&&this.autofix==="pad")){const i=this.state;this.state=n;let l=this.pad(r);const d=this._appendCharRaw(e,r);l=l.aggregate(d),d.rawInserted||l.equals(a)?a=l:this.state=i}if(a.inserted){let i,l=this.doValidate(r)!==!1;if(l&&s!=null){const d=this.state;if(this.overwrite===!0){i=s.state;for(let u=0;u<a.rawInserted.length;++u)s.unshift(this.displayValue.length-a.tailShift)}let o=this.appendTail(s);if(l=o.rawInserted.length===s.toString().length,!(l&&o.inserted)&&this.overwrite==="shift"){this.state=d,i=s.state;for(let u=0;u<a.rawInserted.length;++u)s.shift();o=this.appendTail(s),l=o.rawInserted.length===s.toString().length}l&&o.inserted&&(this.state=d)}l||(a=new ue,this.state=n,s&&i&&(s.state=i))}return a}_appendPlaceholder(){return new ue}_appendEager(){return new ue}append(e,r,s){if(!Rt(e))throw new Error("value should be string");const n=Rt(s)?new kt(String(s)):s;r!=null&&r.tail&&(r._beforeTailState=this.state);let a;[e,a]=this.doPrepare(e,r);for(let i=0;i<e.length;++i){const l=this._appendChar(e[i],r,n);if(!l.rawInserted&&!this.doSkipInvalid(e[i],r,n))break;a.aggregate(l)}return(this.eager===!0||this.eager==="append")&&r!=null&&r.input&&e&&a.aggregate(this._appendEager()),n!=null&&(a.tailShift+=this.appendTail(n).tailShift),a}remove(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(r),new ue}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const r=this.rawInputValue,s=this.value,n=e();return this.rawInputValue=r,this.value&&this.value!==s&&s.indexOf(this.value)===0&&(this.append(s.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,n}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const r=this.state,s=e(this);return this.state=r,delete this._isolated,s}doSkipInvalid(e,r,s){return!!this.skipInvalid}doPrepare(e,r){return r===void 0&&(r={}),ue.normalize(this.prepare?this.prepare(e,this,r):e)}doPrepareChar(e,r){return r===void 0&&(r={}),ue.normalize(this.prepareChar?this.prepareChar(e,this,r):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,r,s,n,a){s===void 0&&(s=""),n===void 0&&(n=te.NONE),a===void 0&&(a={input:!0});const i=e+r,l=this.extractTail(i),d=this.eager===!0||this.eager==="remove";let o;d&&(n=vc(n),o=this.extractInput(0,i,{raw:!0}));let u=e;const f=new ue;if(n!==te.NONE&&(u=this.nearestInputPos(e,r>1&&e!==0&&!d?te.NONE:n),f.tailShift=u-e),f.aggregate(this.remove(u)),d&&n!==te.NONE&&o===this.rawInputValue)if(n===te.FORCE_LEFT){let m;for(;o===this.rawInputValue&&(m=this.displayValue.length);)f.aggregate(new ue({tailShift:-1})).aggregate(this.remove(m-1))}else n===te.FORCE_RIGHT&&l.unshift();return f.aggregate(this.append(s,a,l))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!ns(this,e)}typedValueEquals(e){const r=this.typedValue;return e===r||Bs.EMPTY_VALUES.includes(e)&&Bs.EMPTY_VALUES.includes(r)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new ue}};ot.DEFAULTS={skipInvalid:!0},ot.EMPTY_VALUES=[void 0,null,""],ae.Masked=ot;class Zt{constructor(e,r){e===void 0&&(e=[]),r===void 0&&(r=0),this.chunks=e,this.from=r}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=Rt(e)?new kt(String(e)):e;const r=this.chunks[this.chunks.length-1],s=r&&(r.stop===e.stop||e.stop==null)&&e.from===r.from+r.toString().length;if(e instanceof kt)s?r.extend(e.toString()):this.chunks.push(e);else if(e instanceof Zt){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 ae.MaskedPattern))return new kt(this.toString()).appendTo(e);const r=new ue;for(let s=0;s<this.chunks.length;++s){const n=this.chunks[s],a=e._mapPosToBlock(e.displayValue.length),i=n.stop;let l;if(i!=null&&(!a||a.index<=i)&&((n instanceof Zt||e._stops.indexOf(i)>=0)&&r.aggregate(e._appendPlaceholder(i)),l=n instanceof Zt&&e._blocks[i]),l){const d=l.appendTail(n);r.aggregate(d);const o=n.toString().slice(d.rawInserted.length);o&&r.aggregate(e.append(o,{tail:!0}))}else r.aggregate(e.append(n.toString(),{tail:!0}))}return r}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:r,...s}=e;Object.assign(this,s),this.chunks=r.map(n=>{const a="chunks"in n?new Zt:new kt;return a.state=n,a})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const r=e!=null?e-this.from:e;let s=0;for(;s<this.chunks.length;){const n=this.chunks[s],a=n.unshift(r);if(n.toString()){if(!a)break;++s}else this.chunks.splice(s,1);if(a)return a}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const r=this.chunks[e],s=r.shift();if(r.toString()){if(!s)break;--e}else this.chunks.splice(e,1);if(s)return s}return""}}let $c=class{constructor(e,r){this.masked=e,this._log=[];const{offset:s,index:n}=e._mapPosToBlock(r)||(r<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=s,this.index=n,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((r=this.block)==null?void 0:r.displayValue.length)||0){var r;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,te.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,te.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,te.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,te.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,te.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,te.NONE),!0})}},to=class{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,r){return e===void 0&&(e=0),r===void 0&&(r=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(r),this._value||(this._isRawInput=!1),new ue}nearestInputPos(e,r){r===void 0&&(r=te.NONE);const s=0,n=this._value.length;switch(r){case te.LEFT:case te.FORCE_LEFT:return s;case te.NONE:case te.RIGHT:case te.FORCE_RIGHT:default:return n}}totalInputPositions(e,r){return e===void 0&&(e=0),r===void 0&&(r=this._value.length),this._isRawInput?r-e:0}extractInput(e,r,s){return e===void 0&&(e=0),r===void 0&&(r=this._value.length),s===void 0&&(s={}),s.raw&&this._isRawInput&&this._value.slice(e,r)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,r){if(r===void 0&&(r={}),this.isFilled)return new ue;const s=this.eager===!0||this.eager==="append",n=this.char===e&&(this.isUnmasking||r.input||r.raw)&&(!r.raw||!s)&&!r.tail,a=new ue({inserted:this.char,rawInserted:n?this.char:""});return this._value=this.char,this._isRawInput=n&&(r.raw||r.input),a}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new ue;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new kt("")}appendTail(e){return Rt(e)&&(e=new kt(String(e))),e.appendTo(this)}append(e,r,s){const n=this._appendChar(e[0],r);return s!=null&&(n.tailShift+=this.appendTail(s).tailShift),n}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}pad(e){return this._appendPlaceholder()}},os=class{constructor(e){const{parent:r,isOptional:s,placeholderChar:n,displayChar:a,lazy:i,eager:l,...d}=e;this.masked=Ot(d),Object.assign(this,{parent:r,isOptional:s,placeholderChar:n,displayChar:a,lazy:i,eager:l})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.value.length),e===0&&r>=1?(this.isFilled=!1,this.masked.remove(e,r)):new ue}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,r){if(r===void 0&&(r={}),this.isFilled)return new ue;const s=this.masked.state;let n=this.masked._appendChar(e,this.currentMaskFlags(r));return n.inserted&&this.doValidate(r)===!1&&(n=new ue,this.masked.state=s),!n.inserted&&!this.isOptional&&!this.lazy&&!r.input&&(n.inserted=this.placeholderChar),n.skip=!n.inserted&&!this.isOptional,this.isFilled=!!n.inserted,n}append(e,r,s){return this.masked.append(e,this.currentMaskFlags(r),s)}_appendPlaceholder(){return this.isFilled||this.isOptional?new ue:(this.isFilled=!0,new ue({inserted:this.placeholderChar}))}_appendEager(){return new ue}extractTail(e,r){return this.masked.extractTail(e,r)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,r,s){return e===void 0&&(e=0),r===void 0&&(r=this.value.length),this.masked.extractInput(e,r,s)}nearestInputPos(e,r){r===void 0&&(r=te.NONE);const s=0,n=this.value.length,a=Math.min(Math.max(e,s),n);switch(r){case te.LEFT:case te.FORCE_LEFT:return this.isComplete?a:s;case te.RIGHT:case te.FORCE_RIGHT:return this.isComplete?a:n;case te.NONE:default:return a}}totalInputPositions(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.value.length),this.value.slice(e,r).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var r;return{...e,_beforeTailState:(e==null||(r=e._beforeTailState)==null?void 0:r.masked)||(e==null?void 0:e._beforeTailState)}}pad(e){return new ue}};os.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]/,"*":/./};let Ec=class extends ot{updateOptions(e){super.updateOptions(e)}_update(e){const r=e.mask;r&&(e.validate=s=>s.search(r)>=0),super._update(e)}};ae.MaskedRegExp=Ec;class Re extends ot{constructor(e){super({...Re.DEFAULTS,...e,definitions:Object.assign({},os.DEFAULT_DEFINITIONS,e==null?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const r=this.mask;if(!r||!e)return;let s=!1,n=!1;for(let a=0;a<r.length;++a){if(this.blocks){const o=r.slice(a),u=Object.keys(this.blocks).filter(m=>o.indexOf(m)===0);u.sort((m,_)=>_.length-m.length);const f=u[0];if(f){const{expose:m,repeat:_,...g}=Pr(this.blocks[f]),v={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...g,repeat:_,parent:this},p=_!=null?new ae.RepeatBlock(v):Ot(v);p&&(this._blocks.push(p),m&&(this.exposeBlock=p),this._maskedBlocks[f]||(this._maskedBlocks[f]=[]),this._maskedBlocks[f].push(this._blocks.length-1)),a+=f.length-1;continue}}let i=r[a],l=i in e;if(i===Re.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(i==="{"||i==="}"){s=!s;continue}if(i==="["||i==="]"){n=!n;continue}if(i===Re.ESCAPE_CHAR){if(++a,i=r[a],!i)break;l=!1}const d=l?new os({isOptional:n,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...Pr(e[i]),parent:this}):new to({char:i,eager:this.eager,isUnmasking:s});this._blocks.push(d)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e){this.reset();return}const{_blocks:r,...s}=e;this._blocks.forEach((n,a)=>n.state=r[a]),super.state=s}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,r)=>e+=r.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(r),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,r)=>e+=r.value,"")}set value(e){if(this.exposeBlock){const r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(r),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(r),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,r)=>e+=r.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const r=new ue;let s=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(s==null)return r;this._blocks[s].isFilled&&++s;for(let n=s;n<this._blocks.length;++n){const a=this._blocks[n]._appendEager();if(!a.inserted)break;r.aggregate(a)}return r}_appendCharRaw(e,r){r===void 0&&(r={});const s=this._mapPosToBlock(this.displayValue.length),n=new ue;if(!s)return n;for(let i=s.index,l;l=this._blocks[i];++i){var a;const d=l._appendChar(e,{...r,_beforeTailState:(a=r._beforeTailState)==null||(a=a._blocks)==null?void 0:a[i]});if(n.aggregate(d),d.consumed)break}return n}extractTail(e,r){e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length);const s=new Zt;return e===r||this._forEachBlocksInRange(e,r,(n,a,i,l)=>{const d=n.extractTail(i,l);d.stop=this._findStopBefore(a),d.from=this._blockStartPos(a),d instanceof Zt&&(d.blockIndex=a),s.extend(d)}),s}extractInput(e,r,s){if(e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),s===void 0&&(s={}),e===r)return"";let n="";return this._forEachBlocksInRange(e,r,(a,i,l,d)=>{n+=a.extractInput(l,d,s)}),n}_findStopBefore(e){let r;for(let s=0;s<this._stops.length;++s){const n=this._stops[s];if(n<=e)r=n;else break}return r}_appendPlaceholder(e){const r=new ue;if(this.lazy&&e==null)return r;const s=this._mapPosToBlock(this.displayValue.length);if(!s)return r;const n=s.index,a=e??this._blocks.length;return this._blocks.slice(n,a).forEach(i=>{if(!i.lazy||e!=null){var l;r.aggregate(i._appendPlaceholder((l=i._blocks)==null?void 0:l.length))}}),r}_mapPosToBlock(e){let r="";for(let s=0;s<this._blocks.length;++s){const n=this._blocks[s],a=r.length;if(r+=n.displayValue,e<=r.length)return{index:s,offset:e-a}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((r,s)=>r+=s.displayValue.length,0)}_forEachBlocksInRange(e,r,s){r===void 0&&(r=this.displayValue.length);const n=this._mapPosToBlock(e);if(n){const a=this._mapPosToBlock(r),i=a&&n.index===a.index,l=n.offset,d=a&&i?a.offset:this._blocks[n.index].displayValue.length;if(s(this._blocks[n.index],n.index,l,d),a&&!i){for(let o=n.index+1;o<a.index;++o)s(this._blocks[o],o,0,this._blocks[o].displayValue.length);s(this._blocks[a.index],a.index,0,a.offset)}}}remove(e,r){e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length);const s=super.remove(e,r);return this._forEachBlocksInRange(e,r,(n,a,i,l)=>{s.aggregate(n.remove(i,l))}),s}nearestInputPos(e,r){if(r===void 0&&(r=te.NONE),!this._blocks.length)return 0;const s=new $c(this,e);if(r===te.NONE)return s.pushRightBeforeInput()||(s.popState(),s.pushLeftBeforeInput())?s.pos:this.displayValue.length;if(r===te.LEFT||r===te.FORCE_LEFT){if(r===te.LEFT){if(s.pushRightBeforeFilled(),s.ok&&s.pos===e)return e;s.popState()}if(s.pushLeftBeforeInput(),s.pushLeftBeforeRequired(),s.pushLeftBeforeFilled(),r===te.LEFT){if(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.ok&&s.pos<=e||(s.popState(),s.ok&&s.pos<=e))return s.pos;s.popState()}return s.ok?s.pos:r===te.FORCE_LEFT?0:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:0)}return r===te.RIGHT||r===te.FORCE_RIGHT?(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.pushRightBeforeFilled()?s.pos:r===te.FORCE_RIGHT?this.displayValue.length:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:this.nearestInputPos(e,te.LEFT))):e}totalInputPositions(e,r){e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length);let s=0;return this._forEachBlocksInRange(e,r,(n,a,i,l)=>{s+=n.totalInputPositions(i,l)}),s}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const r=this._maskedBlocks[e];return r?r.map(s=>this._blocks[s]):[]}pad(e){const r=new ue;return this._forEachBlocksInRange(0,this.displayValue.length,s=>r.aggregate(s.pad(e))),r}}Re.DEFAULTS={...ot.DEFAULTS,lazy:!0,placeholderChar:"_"},Re.STOP_CHAR="`",Re.ESCAPE_CHAR="\\",Re.InputDefinition=os,Re.FixedDefinition=to,ae.MaskedPattern=Re;let is=class extends Re{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:r=this.to||0,from:s=this.from||0,maxLength:n=this.maxLength||0,autofix:a=this.autofix,...i}=e;this.to=r,this.from=s,this.maxLength=Math.max(String(r).length,n),this.autofix=a;const l=String(this.from).padStart(this.maxLength,"0"),d=String(this.to).padStart(this.maxLength,"0");let o=0;for(;o<d.length&&d[o]===l[o];)++o;i.mask=d.slice(0,o).replace(/0/g,"\\0")+"0".repeat(this.maxLength-o),super._update(i)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let r="",s="";const[,n,a]=e.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(r="0".repeat(n.length)+a,s="9".repeat(n.length)+a),r=r.padEnd(this.maxLength,"0"),s=s.padEnd(this.maxLength,"9"),[r,s]}doPrepareChar(e,r){r===void 0&&(r={});let s;return[e,s]=super.doPrepareChar(e.replace(/\D/g,""),r),e||(s.skip=!this.isComplete),[e,s]}_appendCharRaw(e,r){if(r===void 0&&(r={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,r);const s=String(this.from).padStart(this.maxLength,"0"),n=String(this.to).padStart(this.maxLength,"0"),[a,i]=this.boundaries(this.value+e);return Number(i)<this.from?super._appendCharRaw(s[this.value.length],r):Number(a)>this.to?!r.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(s[this.value.length],r).aggregate(this._appendCharRaw(e,r)):super._appendCharRaw(n[this.value.length],r):super._appendCharRaw(e,r)}doValidate(e){const r=this.value;if(r.search(/[^0]/)===-1&&r.length<=this._matchFrom)return!0;const[s,n]=this.boundaries(r);return this.from<=Number(n)&&Number(s)<=this.to&&super.doValidate(e)}pad(e){const r=new ue;if(this.value.length===this.maxLength)return r;const s=this.value,n=this.maxLength-this.value.length;if(n){this.reset();for(let a=0;a<n;++a)r.aggregate(super._appendCharRaw("0",e));s.split("").forEach(a=>this._appendCharRaw(a))}return r}};ae.MaskedRange=is;const Sc="d{.}`m{.}`Y";class Pt extends Re{static extractPatternOptions(e){const{mask:r,pattern:s,...n}=e;return{...n,mask:Rt(r)?r:s}}constructor(e){super(Pt.extractPatternOptions({...Pt.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:r,pattern:s,blocks:n,...a}={...Pt.DEFAULTS,...e},i=Object.assign({},Pt.GET_DEFAULT_BLOCKS());e.min&&(i.Y.from=e.min.getFullYear()),e.max&&(i.Y.to=e.max.getFullYear()),e.min&&e.max&&i.Y.from===i.Y.to&&(i.m.from=e.min.getMonth()+1,i.m.to=e.max.getMonth()+1,i.m.from===i.m.to&&(i.d.from=e.min.getDate(),i.d.to=e.max.getDate())),Object.assign(i,this.blocks,n),super._update({...a,mask:Rt(r)?r:s,blocks:i})}doValidate(e){const r=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&r!=null&&(this.min==null||this.min<=r)&&(this.max==null||r<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(Pt.extractPatternOptions(e))}}Pt.GET_DEFAULT_BLOCKS=()=>({d:{mask:is,from:1,to:31,maxLength:2},m:{mask:is,from:1,to:12,maxLength:2},Y:{mask:is,from:1900,to:9999}}),Pt.DEFAULTS={...Re.DEFAULTS,mask:Date,pattern:Sc,format:(t,e)=>{if(!t)return"";const r=String(t.getDate()).padStart(2,"0"),s=String(t.getMonth()+1).padStart(2,"0"),n=t.getFullYear();return[r,s,n].join(".")},parse:(t,e)=>{const[r,s,n]=t.split(".").map(Number);return new Date(n,s-1,r)}},ae.MaskedDate=Pt;class ls extends ot{constructor(e){super({...ls.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(r=>{const{expose:s,...n}=Pr(r),a=Ot({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...n});return s&&(this.exposeMask=a),a}):[])}_appendCharRaw(e,r){r===void 0&&(r={});const s=this._applyDispatch(e,r);return this.currentMask&&s.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(r))),s}_applyDispatch(e,r,s){e===void 0&&(e=""),r===void 0&&(r={}),s===void 0&&(s="");const n=r.tail&&r._beforeTailState!=null?r._beforeTailState._value:this.value,a=this.rawInputValue,i=r.tail&&r._beforeTailState!=null?r._beforeTailState._rawInputValue:a,l=a.slice(i.length),d=this.currentMask,o=new ue,u=d==null?void 0:d.state;return this.currentMask=this.doDispatch(e,{...r},s),this.currentMask&&(this.currentMask!==d?(this.currentMask.reset(),i&&(this.currentMask.append(i,{raw:!0}),o.tailShift=this.currentMask.value.length-n.length),l&&(o.tailShift+=this.currentMask.append(l,{raw:!0,tail:!0}).tailShift)):u&&(this.currentMask.state=u)),o}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const r=new ue;return e&&r.aggregate(this._applyDispatch("",{},e)),r.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var r,s;return{...e,_beforeTailState:((r=e._beforeTailState)==null?void 0:r.currentMaskRef)===this.currentMask&&((s=e._beforeTailState)==null?void 0:s.currentMask)||e._beforeTailState}}doDispatch(e,r,s){return r===void 0&&(r={}),s===void 0&&(s=""),this.dispatch(e,this,r,s)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,r){r===void 0&&(r={});let[s,n]=super.doPrepare(e,r);if(this.currentMask){let a;[s,a]=super.doPrepare(s,this.currentMaskFlags(r)),n=n.aggregate(a)}return[s,n]}doPrepareChar(e,r){r===void 0&&(r={});let[s,n]=super.doPrepareChar(e,r);if(this.currentMask){let a;[s,a]=super.doPrepareChar(s,this.currentMaskFlags(r)),n=n.aggregate(a)}return[s,n]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(r=>r.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let r=String(e);this.currentMask&&(this.currentMask.typedValue=e,r=this.currentMask.unmaskedValue),this.unmaskedValue=r}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,r){const s=new ue;return this.currentMask&&s.aggregate(this.currentMask.remove(e,r)).aggregate(this._applyDispatch()),s}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(r=>r.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:r,currentMaskRef:s,currentMask:n,...a}=e;r&&this.compiledMasks.forEach((i,l)=>i.state=r[l]),s!=null&&(this.currentMask=s,this.currentMask.state=n),super.state=a}extractInput(e,r,s){return this.currentMask?this.currentMask.extractInput(e,r,s):""}extractTail(e,r){return this.currentMask?this.currentMask.extractTail(e,r):super.extractTail(e,r)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,r){return this.currentMask?this.currentMask.nearestInputPos(e,r):super.nearestInputPos(e,r)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((r,s)=>{if(!e[s])return;const{mask:n,...a}=e[s];return ns(r,a)&&r.maskEquals(n)}):super.maskEquals(e)}typedValueEquals(e){var r;return!!((r=this.currentMask)!=null&&r.typedValueEquals(e))}}ls.DEFAULTS={...ot.DEFAULTS,dispatch:(t,e,r,s)=>{if(!e.compiledMasks.length)return;const n=e.rawInputValue,a=e.compiledMasks.map((i,l)=>{const d=e.currentMask===i,o=d?i.displayValue.length:i.nearestInputPos(i.displayValue.length,te.FORCE_LEFT);return i.rawInputValue!==n?(i.reset(),i.append(n,{raw:!0})):d||i.remove(o),i.append(t,e.currentMaskFlags(r)),i.appendTail(s),{index:l,weight:i.rawInputValue.length,totalInputPositions:i.totalInputPositions(0,Math.max(o,i.nearestInputPos(i.displayValue.length,te.FORCE_LEFT)))}});return a.sort((i,l)=>l.weight-i.weight||l.totalInputPositions-i.totalInputPositions),e.compiledMasks[a[0].index]}},ae.MaskedDynamic=ls;let ro=class oc extends Re{constructor(e){super({...oc.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:r,...s}=e;if(r){const n=r.map(l=>l.length),a=Math.min(...n),i=Math.max(...n)-a;s.mask="*".repeat(a),i&&(s.mask+="["+"*".repeat(i)+"]"),this.enum=r}super._update(s)}_appendCharRaw(e,r){r===void 0&&(r={});const s=Math.min(this.nearestInputPos(0,te.FORCE_RIGHT),this.value.length),n=this.enum.filter(a=>this.matchValue(a,this.unmaskedValue+e,s));if(n.length){n.length===1&&this._forEachBlocksInRange(0,this.value.length,(i,l)=>{const d=n[0][l];l>=this.value.length||d===i.value||(i.reset(),i._appendChar(d,r))});const a=super._appendCharRaw(n[0][this.value.length],r);return n.length===1&&n[0].slice(this.unmaskedValue.length).split("").forEach(i=>a.aggregate(super._appendCharRaw(i))),a}return new ue({skip:!this.isComplete})}extractTail(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),new kt("",e)}remove(e,r){if(e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),e===r)return new ue;const s=Math.min(super.nearestInputPos(0,te.FORCE_RIGHT),this.value.length);let n;for(n=e;n>=0&&!(this.enum.filter(i=>this.matchValue(i,this.value.slice(s,n),s)).length>1);--n);const a=super.remove(n,r);return a.tailShift+=n-e,a}get isComplete(){return this.enum.indexOf(this.value)>=0}};ro.DEFAULTS={...Re.DEFAULTS,matchValue:(t,e,r)=>t.indexOf(e,r)===r},ae.MaskedEnum=ro;class xc extends ot{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}ae.MaskedFunction=xc;var so;let Nr=class Xt extends ot{constructor(e){super({...Xt.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),r="\\d*",s=(this.scale?"("+qs(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+r+s),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(qs).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(qs(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const r=e.split(this.radix);return r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),r.join(this.radix)}doPrepareChar(e,r){r===void 0&&(r={});const[s,n]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(r.input&&r.raw||!r.input&&!r.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),r);return e&&!s&&(n.skip=!0),s&&!this.allowPositive&&!this.value&&s!=="-"&&n.aggregate(this._appendChar("-")),[s,n]}_separatorsCount(e,r){r===void 0&&(r=!1);let s=0;for(let n=0;n<e;++n)this._value.indexOf(this.thousandsSeparator,n)===n&&(++s,r&&(e+=this.thousandsSeparator.length));return s}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,r,s){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),[e,r]=this._adjustRangeWithSeparators(e,r),this._removeThousandsSeparators(super.extractInput(e,r,s))}_appendCharRaw(e,r){r===void 0&&(r={});const s=r.tail&&r._beforeTailState?r._beforeTailState._value:this._value,n=this._separatorsCountFromSlice(s);this._value=this._removeThousandsSeparators(this.value);const a=this._value;this._value+=e;const i=this.number;let l=!isNaN(i),d=!1;if(l){let m;this.min!=null&&this.min<0&&this.number<this.min&&(m=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(m=this.max),m!=null&&(this.autofix?(this._value=this.format(m,this).replace(Xt.UNMASKED_RADIX,this.radix),d||(d=a===this._value&&!r.tail)):l=!1),l&&(l=!!this._value.match(this._numberRegExp))}let o;l?o=new ue({inserted:this._value.slice(a.length),rawInserted:d?"":e,skip:d}):(this._value=a,o=new ue),this._value=this._insertThousandsSeparators(this._value);const u=r.tail&&r._beforeTailState?r._beforeTailState._value:this._value,f=this._separatorsCountFromSlice(u);return o.tailShift+=(f-n)*this.thousandsSeparator.length,o}_findSeparatorAround(e){if(this.thousandsSeparator){const r=e-this.thousandsSeparator.length+1,s=this.value.indexOf(this.thousandsSeparator,r);if(s<=e)return s}return-1}_adjustRangeWithSeparators(e,r){const s=this._findSeparatorAround(e);s>=0&&(e=s);const n=this._findSeparatorAround(r);return n>=0&&(r=n+this.thousandsSeparator.length),[e,r]}remove(e,r){e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),[e,r]=this._adjustRangeWithSeparators(e,r);const s=this.value.slice(0,e),n=this.value.slice(r),a=this._separatorsCount(s.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(s+n));const i=this._separatorsCountFromSlice(s);return new ue({tailShift:(i-a)*this.thousandsSeparator.length})}nearestInputPos(e,r){if(!this.thousandsSeparator)return e;switch(r){case te.NONE:case te.LEFT:case te.FORCE_LEFT:{const s=this._findSeparatorAround(e-1);if(s>=0){const n=s+this.thousandsSeparator.length;if(e<n||this.value.length<=n||r===te.FORCE_LEFT)return s}break}case te.RIGHT:case te.FORCE_RIGHT:{const s=this._findSeparatorAround(e);if(s>=0)return s+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let r=e;this.min!=null&&(r=Math.max(r,this.min)),this.max!=null&&(r=Math.min(r,this.max)),r!==e&&(this.unmaskedValue=this.format(r,this));let s=this.value;this.normalizeZeros&&(s=this._normalizeZeros(s)),this.padFractionalZeros&&this.scale>0&&(s=this._padFractionalZeros(s)),this._value=s}super.doCommit()}_normalizeZeros(e){const r=this._removeThousandsSeparators(e).split(this.radix);return r[0]=r[0].replace(/^(\D*)(0*)(\d*)/,(s,n,a,i)=>n+i),e.length&&!/\d$/.test(r[0])&&(r[0]=r[0]+"0"),r.length>1&&(r[1]=r[1].replace(/0*$/,""),r[1].length||(r.length=1)),this._insertThousandsSeparators(r.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const r=e.split(this.radix);return r.length<2&&r.push(""),r[1]=r[1].padEnd(this.scale,"0"),r.join(this.radix)}doSkipInvalid(e,r,s){r===void 0&&(r={});const n=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===Xt.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,r,s)&&!n}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Xt.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(Xt.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)||Xt.EMPTY_VALUES.includes(e)&&Xt.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}};so=Nr,Nr.UNMASKED_RADIX=".",Nr.EMPTY_VALUES=[...ot.EMPTY_VALUES,0],Nr.DEFAULTS={...ot.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[so.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})},ae.MaskedNumber=Nr;const Ys={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function no(t,e,r){e===void 0&&(e=Ys.MASKED),r===void 0&&(r=Ys.MASKED);const s=Ot(t);return n=>s.runIsolated(a=>(a[e]=n,a[r]))}function Ac(t,e,r,s){return no(e,r,s)(t)}ae.PIPE_TYPE=Ys,ae.createPipe=no,ae.pipe=Ac;let Cc=class 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 r,s,n;const{repeat:a,...i}=Pr(e);this._blockOpts=Object.assign({},this._blockOpts,i);const l=Ot(this._blockOpts);this.repeat=(r=(s=a??l.repeat)!=null?s:this.repeat)!=null?r:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((n=this._blocks)==null?void 0:n.length)||0,this.repeatFrom)),blocks:{m:l},eager:l.eager,overwrite:l.overwrite,skipInvalid:l.skipInvalid,lazy:l.lazy,placeholderChar:l.placeholderChar,displayChar:l.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(Ot(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(e,r){r===void 0&&(r={});const s=new ue;for(let d=(n=(a=this._mapPosToBlock(this.displayValue.length))==null?void 0:a.index)!=null?n:Math.max(this._blocks.length-1,0),o,u;o=(i=this._blocks[d])!=null?i:u=!u&&this._allocateBlock(d);++d){var n,a,i,l;const f=o._appendChar(e,{...r,_beforeTailState:(l=r._beforeTailState)==null||(l=l._blocks)==null?void 0:l[d]});if(f.skip&&u){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(s.aggregate(f),f.consumed)break}return s}_trimEmptyTail(e,r){var s,n;e===void 0&&(e=0);const a=Math.max(((s=this._mapPosToBlock(e))==null?void 0:s.index)||0,this.repeatFrom,0);let i;r!=null&&(i=(n=this._mapPosToBlock(r))==null?void 0:n.index),i==null&&(i=this._blocks.length-1);let l=0;for(let d=i;a<=d&&!this._blocks[d].unmaskedValue;--d,++l);l&&(this._blocks.splice(i-l+1,l),this.mask=this.mask.slice(l))}reset(){super.reset(),this._trimEmptyTail()}remove(e,r){e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length);const s=super.remove(e,r);return this._trimEmptyTail(e,r),s}totalInputPositions(e,r){return e===void 0&&(e=0),r==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,r)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}};ae.RepeatBlock=Cc;try{globalThis.IMask=ae}catch{}const ao={mask:A.oneOfType([A.array,A.func,A.string,A.instanceOf(RegExp),A.oneOf([Date,Number,ae.Masked]),A.instanceOf(ae.Masked)]),value:A.any,unmask:A.oneOfType([A.bool,A.oneOf(["typed"])]),prepare:A.func,prepareChar:A.func,validate:A.func,commit:A.func,overwrite:A.oneOfType([A.bool,A.oneOf(["shift"])]),eager:A.oneOfType([A.bool,A.oneOf(["append","remove"])]),skipInvalid:A.bool,onAccept:A.func,onComplete:A.func,placeholderChar:A.string,displayChar:A.string,lazy:A.bool,definitions:A.object,blocks:A.object,enum:A.arrayOf(A.string),maxLength:A.number,from:A.number,to:A.number,pattern:A.string,format:A.func,parse:A.func,autofix:A.oneOfType([A.bool,A.oneOf(["pad"])]),radix:A.string,thousandsSeparator:A.string,mapToRadix:A.arrayOf(A.string),scale:A.number,normalizeZeros:A.bool,padFractionalZeros:A.bool,min:A.oneOfType([A.number,A.instanceOf(Date)]),max:A.oneOfType([A.number,A.instanceOf(Date)]),dispatch:A.func,inputRef:A.oneOfType([A.func,A.shape({current:A.object})])},oo=Object.keys(ao).filter(t=>t!=="value"),Tc=["value","unmask","onAccept","onComplete","inputRef"],Oc=oo.filter(t=>Tc.indexOf(t)<0);function Pc(t){var e;const r=(e=class extends X.Component{constructor(n){super(n),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const n=this.props,a=this._extractMaskOptionsFromProps(n);if(a.mask)this.maskRef?(this.maskRef.updateOptions(a),"value"in n&&n.value!==void 0&&(this.maskValue=n.value)):this.initMask(a);else if(this.destroyMask(),"value"in n&&n.value!==void 0){var i;(i=this.element)!=null&&i.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=n.value:this.element.value=n.value}}componentWillUnmount(){this.destroyMask()}_inputRef(n){this.element=n,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=n:this.props.inputRef(n))}initMask(n){n===void 0&&(n=this._extractMaskOptionsFromProps(this.props)),this.maskRef=ae(this.element,n).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(n){const{...a}=n;return Object.keys(a).filter(i=>Oc.indexOf(i)<0).forEach(i=>{delete a[i]}),a}_extractNonMaskProps(n){const{...a}=n;return oo.forEach(i=>{i!=="maxLength"&&delete a[i]}),"defaultValue"in a||(a.defaultValue=n.mask?"":a.value),delete a.value,a}get maskValue(){return this.maskRef?this.props.unmask==="typed"?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(n){this.maskRef&&(n=n==null&&this.props.unmask!=="typed"?"":n,this.props.unmask==="typed"?this.maskRef.typedValue=n:this.props.unmask?this.maskRef.unmaskedValue=n:this.maskRef.value=n)}_onAccept(n){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,n)}_onComplete(n){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,n)}render(){return X.createElement(t,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}},e.displayName=void 0,e.propTypes=void 0,e),s=t.displayName||t.name||"Component";return r.displayName="IMask("+s+")",r.propTypes=ao,X.forwardRef((n,a)=>X.createElement(r,{...n,ref:a}))}const Nc=Pc(t=>{let{inputRef:e,...r}=t;return X.createElement("input",{...r,ref:e})}),Ic=(t,e)=>X.createElement(Nc,{...t,ref:e});X.forwardRef(Ic);function Dc(t,e){let{onAccept:r,onComplete:s,ref:n=X.useRef(null),defaultValue:a,defaultUnmaskedValue:i,defaultTypedValue:l}=e===void 0?{}:e;const d=X.useRef(null),[o,u]=X.useState({}),[f,m]=X.useState(""),[_,g]=X.useState(""),[v,p]=X.useState(),y=X.useCallback(()=>{var S;(S=d.current)==null||S.destroy(),d.current=null},[]),h=X.useCallback(()=>{const S=d.current;S&&(u({value:S.value,unmaskedValue:S.unmaskedValue,typedValue:S.typedValue}),p(S.typedValue),g(S.unmaskedValue),m(S.value))},[]),b=X.useCallback(S=>{const O=d.current;O&&(h(),r==null||r(O.value,O,S))},[r]),w=X.useCallback(S=>d.current&&(s==null?void 0:s(d.current.value,d.current,S)),[s]);return X.useEffect(()=>{const{value:S,...O}=o,I=d.current;!I||f===void 0||(S!==f&&(I.value=f,I.value!==f&&b()),u(O))},[f]),X.useEffect(()=>{const{unmaskedValue:S,...O}=o,I=d.current;!I||_===void 0||(S!==_&&(I.unmaskedValue=_,I.unmaskedValue!==_&&b()),u(O))},[_]),X.useEffect(()=>{const{typedValue:S,...O}=o,I=d.current;!I||v===void 0||(S!==v&&(I.typedValue=v,I.masked.typedValueEquals(v)||b()),u(O))},[v]),X.useEffect(()=>{const S=n.current;if(!S||!(t!=null&&t.mask))return y();const O=d.current;O?O==null||O.updateOptions(t):S&&t!=null&&t.mask&&(d.current=ae(S,t),h(),a!==void 0&&m(a),i!==void 0&&g(i),l!==void 0&&p(l))},[t,y,b]),X.useEffect(()=>{if(!d.current)return;const S=d.current;return S.on("accept",b),S.on("complete",w),()=>{S.off("accept",b),S.off("complete",w)}},[b,w]),X.useEffect(()=>y,[y]),{ref:n,maskRef:d,value:f,setValue:m,unmaskedValue:_,setUnmaskedValue:g,typedValue:v,setTypedValue:p}}var io=(t=>(t.Text="text",t.Password="password",t.Email="email",t.Date="date",t.Number="number",t))(io||{}),lo=(t=>(t.Small="small",t.Medium="medium",t.Large="large",t))(lo||{}),uo=(t=>(t.Default="",t.Error="error",t.Success="success",t))(uo||{}),co=(t=>(t.Center="center",t.End="end",t.Initial="initial",t))(co||{}),ho=(t=>(t.Top="top",t.Right="right",t.Bottom="bottom",t.Left="left",t))(ho||{});const ke={class:"ds-input",props:{testId:{default:"ds-input-test"},type:{default:"text",options:Object.values(io)},animated:{default:!0},disabled:{default:!1},size:{default:"medium",options:Object.values(lo)},status:{default:"",options:Object.values(uo)},hasFeedback:{default:!0},noMargin:{default:!1},icon:{default:""},tooltip:{default:""},tooltipPlacement:{default:"center",options:Object.values(co)},tooltipPosition:{default:"top",options:Object.values(ho)},onChangeHandler:{default:()=>({})}}},po={currency:{mask:"currency",blocks:{currency:{mask:"R$ num",lazy:!1,blocks:{num:{mask:Number,scale:2,thousandsSeparator:".",padFractionalZeros:!0,normalizeZeros:!1,radix:",",mapToRadix:[",","."]}}}}},document:{mask:[{mask:"000.000.000-00",startsWith:/[0-9]/,maxLength:14},{mask:"00.000.000/0000-00",startsWith:/[0-9]/,maxLength:18}]},"phone-br":{mask:[{mask:"(00) 0000-0000"},{mask:"(00) 00000-0000"}],dispatch:(t,e)=>(e.value+t).replace(/\D/g,"").length<=10?e.compiledMasks[0]:e.compiledMasks[1]}};var fo=(t=>(t.Top="top",t.Right="right",t.Bottom="bottom",t.Left="left",t))(fo||{}),mo=(t=>(t.Center="center",t.End="end",t.Initial="initial",t))(mo||{});const wt={class:"ds-tooltip",props:{position:{default:"top",options:Object.values(fo)},placement:{default:"center",options:Object.values(mo)},text:{default:""},testId:{default:"ds-tooltip"}}},Ir=({children:t,position:e=wt.props.position.default,placement:r=wt.props.placement.default,text:s=wt.props.text.default,testId:n=wt.props.testId.default,className:a})=>{const i=X.useRef(null),[l,d]=X.useState(0),[o,u]=X.useState(0),[f,m]=X.useState(!1),_=e&&wt.props.position.options.find(y=>y===e)&&`${wt.class}--${e}`,g=r&&wt.props.placement.options.find(y=>y===r)&&`${wt.class}--${r}`;let v;X.useLayoutEffect(()=>{var y,h;i.current&&(d((y=i==null?void 0:i.current)==null?void 0:y.offsetHeight),u((h=i==null?void 0:i.current)==null?void 0:h.offsetWidth))},[]);const p=9;switch(e){case"top":r==="initial"?v={bottom:l+p,left:-p}:r==="end"?v={bottom:l+p,right:-p}:v={bottom:l+p,left:"50%",transform:"translateX(-50%)"};break;case"bottom":r==="initial"?v={top:l+p,left:-p}:r==="end"?v={top:l+p,right:-p}:v={top:l+p,left:"50%",transform:"translateX(-50%)"};break;case"left":r==="initial"?v={right:o+p,top:-p}:r==="end"?v={right:o+p,bottom:-p}:v={right:o+p,top:"50%",transform:"translateY(-50%)"};break;case"right":r==="initial"?v={left:o+p,top:-p}:r==="end"?v={left:o+p,bottom:-p}:v={left:o+p,top:"50%",transform:"translateY(-50%)"};break}return M.jsxs("div",{className:[wt.class,a].join(" "),"data-testid":n,onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),ref:i,role:"tooltip",children:[t,f&&M.jsx("div",{className:[_,g].filter(y=>y).join(" "),children:M.jsx("span",{className:`${wt.class}__wrapper`,"data-testid":"ds-tooltip-wrapper",style:v,children:s})})]})};Ir.propTypes={position:A.string,placement:A.string,text:A.oneOfType([A.string,A.node]),testId:A.string},Ir.displayName="DsTooltip";const go=X.forwardRef(({name:t,testId:e=ke.props.testId.default,type:r=ke.props.type.default,animated:s=ke.props.animated.default,size:n=ke.props.size.default,label:a,placeholder:i,value:l,min:d,max:o,tooltip:u=ke.props.tooltip.default,tooltipPosition:f=ke.props.tooltipPosition.default,tooltipPlacement:m=ke.props.tooltipPlacement.default,icon:_=ke.props.icon.default,status:g=ke.props.status.default,feedback:v,hasFeedback:p=ke.props.hasFeedback.default,noMargin:y=ke.props.noMargin.default,disabled:h=ke.props.disabled.default,className:b,mask:w,onChangeHandler:S=ke.props.onChangeHandler.default,onBlurHandler:O,onKeyDownHandler:I,onFocusHandler:j},V)=>{const[D,T]=X.useState(!1),[B,R]=X.useState(!1),H=!!S&&!!w,K=(z,G,J)=>{if(H&&J){const U={...J,target:{...J.target,name:t,maskedValue:z,value:G.unmaskedValue,type:"text"}};S(U)}},q=X.useMemo(()=>typeof w=="object"?{lazy:!0,...w}:po[w]?{...po[w],min:d,max:o,lazy:!0}:{mask:w??"",min:d,max:o,lazy:!0},[w]),{ref:se,setUnmaskedValue:Z}=Dc(q,{onAccept:K}),ne=z=>{S&&!H&&S(z)},P=z=>{I&&I(z)},k=z=>{T(!1),O&&O(z)},x=z=>{T(!0),j&&j(z)},E=()=>{R(z=>!z)},c=X.useMemo(()=>B&&r==="password"?"text":r,[B,r]),$=()=>{const z=[`${ke.class}`];return n&&z.push(`${ke.class}--${n}`),s&&z.push(`${ke.class}--animated`),y&&z.push(`${ke.class}--no-margin`),_&&z.push(`${ke.class}--with-icon`),g&&z.push(`${ke.class}--${g}`),b&&z.push(b),z.join(" ")},C=X.useMemo(()=>{const z=[`${ke.class}__label`];return(D||l)&&z.push(`${ke.class}__label--active`),z.join(" ")},[l,D]),L=()=>!s&&i?i:"",F=()=>g&&g==="error"?"info":"check_circle";return X.useEffect(()=>{w&&Z(l??"")},[l,w,Z]),M.jsxs("div",{className:$(),ref:V,children:[p&&M.jsx("div",{className:"ds-input__feedback",children:v&&M.jsxs(M.Fragment,{children:[M.jsx(Ae,{image:F()}),v]})}),M.jsx("input",{className:"ds-input__input","data-testid":e,disabled:h,id:t,max:o,min:d,name:t,onBlur:k,onChange:ne,onFocus:x,onInput:ne,onKeyDown:P,placeholder:L(),ref:se,type:c,...!w&&{value:l??""}}),M.jsxs("label",{className:C,htmlFor:t,children:[a,u&&M.jsx(Ir,{className:"ds-input__tooltip",placement:m,position:f,text:u,children:M.jsx(Ae,{className:"ds-input__icon",image:"info"})})]}),_&&M.jsx(Ae,{className:"ds-input__icon",image:_}),r==="password"&&M.jsx(Ae,{className:"ds-input__password-icon",image:B?"visibility_off":"visibility",onClick:E,size:"xl"})]})});go.propTypes={name:A.string,testId:A.string,type:A.oneOf(ke.props.type.options),animated:A.bool,size:A.oneOf(ke.props.size.options),label:A.string,placeholder:A.string,value:A.oneOfType([A.string]),min:A.string,max:A.string,tooltip:A.string,tooltipPosition:A.string,tooltipPlacement:A.string,icon:A.string,status:A.oneOf(ke.props.status.options),feedback:A.string,hasFeedback:A.bool,noMargin:A.bool,disabled:A.bool,mask:A.oneOfType([A.string,A.object]),onChangeHandler:A.func,onFocusHandler:A.func},go.displayName="DsInput";var yo=(t=>(t.Small="small",t.Medium="medium",t.Large="large",t))(yo||{}),vo=(t=>(t.None="",t.Neutral20="neutral-20",t.Neutral10="neutral-10",t.Neutral05="neutral-05",t.Neutral00="neutral-00",t))(vo||{});const Mc={props:{size:{options:Object.values(yo)},backgroundColor:{options:Object.values(vo)}}};A.string,A.string,A.oneOf(Mc.props.size.options),A.bool,A.bool,A.string,A.string,A.string,A.string,A.oneOfType([A.string,A.node]),A.oneOfType([A.string,A.number]),A.string,A.bool,A.bool,A.func;var _o=(t=>(t.Default="",t.Large="large",t.Small="small",t))(_o||{});const us={class:"ds-paragraph",props:{type:{default:"",options:Object.values(_o)}}},$t=({children:t,className:e,testId:r="ds-paragraph-test",type:s=us.props.type.default})=>{const n=s&&`${us.class}--${s}`;return M.jsx("p",{className:[us.class,n,e].filter(a=>a).join(" "),"data-testid":r,children:t})};$t.propTypes={className:A.string,testId:A.string,type:A.oneOf(us.props.type.options)},$t.displayName="DsParagraph";var bo=(t=>(t.Success="success",t.SuccessDark="success-dark",t.Warning="warning",t.Danger="danger",t))(bo||{});Object.values(bo);var ko=(t=>(t.Stretch="stretch",t.FlexStart="flex-start",t.FlexEnd="flex-end",t.Center="center",t.SpaceAround="space-around",t.SpaceBetween="space-between",t))(ko||{}),wo=(t=>(t.Stretch="stretch",t.FlexStart="flex-start",t.FlexEnd="flex-end",t.Center="center",t))(wo||{}),$o=(t=>(t.Row="row",t.Column="column",t.RowReverse="row-reverse",t.ColumnReverse="column-reverse",t))($o||{}),Eo=(t=>(t.NoWrap="nowrap",t.Wrap="wrap",t.WrapReverse="wrap-reverse",t))(Eo||{}),So=(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))(So||{});const Jt={class:"ds-flex-layout",props:{justifyContent:{default:"stretch",options:Object.values(ko)},alignItems:{default:"stretch",options:Object.values(wo)},flexDirection:{default:"row",options:Object.values($o)},flexWrap:{default:"wrap",options:Object.values(Eo)},width:{default:"100%"},gap:{options:Object.values(So)}}},Le=({children:t,className:e,justifyContent:r=Jt.props.justifyContent.default,alignItems:s=Jt.props.alignItems.default,flexDirection:n=Jt.props.flexDirection.default,flexWrap:a=Jt.props.flexWrap.default,width:i=Jt.props.width.default,height:l,gap:d})=>{const o=()=>{const f=[Jt.class,e];return d&&f.push(`${Jt.class}--gap-${d}`),f.join(" ")},u=()=>({display:"flex",justifyContent:r,alignItems:s,flexDirection:n,flexWrap:a,width:i,height:l,gap:d});return M.jsx("div",{className:o(),style:u(),children:t})};Le.propTypes={className:A.string,justifyContent:A.string,alignItems:A.string,flexDirection:A.string,flexWrap:A.string,width:A.string,height:A.string,gap:A.string},Le.displayName="DsFlexLayout";const Zs={class:"ds-flex-element",props:{flex:{default:"0 1 auto"},className:{default:""}}},ye=({children:t,flex:e=Zs.props.flex.default,className:r=Zs.props.className.default})=>{const s=()=>[Zs.class,r].join(" "),n=()=>({flex:e});return M.jsx("div",{className:s(),style:n(),children:t})};ye.propTypes={className:A.string,flex:A.string},ye.displayName="DsFlexElement";var Js=(t=>(t.None="none",t.Quark="quark",t.Nano="nano",t.XXXS="xxxs",t.XXS="xxs",t.XS="xs",t.SM="sm",t))(Js||{});const Dr={class:"ds-spacer",props:{vertical:{default:"none",options:Object.values(Js)},horizontal:{default:"none",options:Object.values(Js)}}},Ne=({vertical:t=Dr.props.vertical.default,horizontal:e=Dr.props.horizontal.default})=>{const r=t&&`ds-spacer__vertical--${t}`,s=e&&`ds-spacer__horizontal--${e}`;return M.jsx("div",{className:[Dr.class,r,s].filter(n=>n).join(" "),"data-testid":"ds-spacer"})};Ne.propTypes={vertical:A.oneOf(Dr.props.vertical.options),horizontal:A.oneOf(Dr.props.horizontal.options)},Ne.displayName="DsSpacer",A.string,A.number,A.string;var xo=(t=>(t.Small="sm",t.Medium="md",t.Large="lg",t))(xo||{}),Ao=(t=>(t.Default="",t.Error="error",t.Success="success",t))(Ao||{}),Co=(t=>(t.Center="center",t.End="end",t.Initial="initial",t))(Co||{}),To=(t=>(t.Top="top",t.Right="right",t.Bottom="bottom",t.Left="left",t))(To||{});const $e={class:"ds-select",props:{animated:{default:!0},disabled:{default:!1},multiple:{default:!1},testId:{default:"ds-select-test"},size:{options:Object.values(xo),default:"md"},status:{default:"",options:Object.values(Ao)},tooltipPlacement:{default:"initial",options:Object.values(Co)},tooltipPosition:{default:"top",options:Object.values(To)}}},Oo=X.forwardRef(({label:t,className:e,disabled:r=$e.props.disabled.default,animated:s=$e.props.animated.default,multiple:n=$e.props.multiple.default,testId:a=$e.props.testId.default,name:i,options:l,value:d,placeholder:o,onChange:u,onChangeHandler:f,size:m=$e.props.size.default,status:_=$e.props.status.default,tooltip:g,tooltipPosition:v=$e.props.tooltipPosition.default,tooltipPlacement:p=$e.props.tooltipPlacement.default,feedback:y,...h},b)=>{const[w,S]=X.useState(!1),O=V=>{S(!1),u&&u(V,V.target.value),f&&f(V,V.target.value)},I=()=>{const V=[$e.class,"select-placeholder"];return V.push(`${$e.class}--${m}`),_&&V.push(`${$e.class}--${_}`),w&&V.push(`${$e.class}--active`),r&&V.push(`${$e.class}--disabled`),e&&V.push(e),V.join(" ")},j=X.useMemo(()=>{const V=[`${$e.class}__label`];return!s&&V.push(`${$e.class}__label--not-animated`),d&&V.push(`${$e.class}__label--has-value`),s&&!d&&!g&&V.push(`${$e.class}__label--hidden`),V.join(" ")},[d]);return M.jsxs("div",{className:I(),"data-testid":"ds-select-component",children:[t&&M.jsxs("label",{className:j,"data-testid":"ds-label-id",htmlFor:i,children:[t,g&&M.jsx(Ir,{className:`${$e.class}__tooltip`,placement:p,position:v,text:g,children:M.jsx(Ae,{className:`${$e.class}__icon`,image:"info"})})]}),M.jsxs("select",{"data-testid":a,disabled:r,id:i,multiple:n,name:i,onBlur:()=>S(!1),onChange:V=>O(V),onFocus:()=>S(!0),ref:b,value:d??"",...h,children:[(o||s)&&M.jsx("option",{disabled:!0,value:"",children:o??t}),l==null?void 0:l.map((V,D)=>{var T;return"options"in V?M.jsx("optgroup",{label:V.label,children:(T=V.options)==null?void 0:T.map((B,R)=>M.jsx("option",{className:`${$e.class}__option-select`,value:B.value,children:B.label??B.value},R))},D):M.jsx("option",{className:`${$e.class}__option-select`,value:V.value,children:V.label??V.value},D)})]}),y&&M.jsxs("div",{className:"ds-select__feedback-container",children:[M.jsx(Ae,{className:"ds-select__icon",image:_==="success"?"check_circle":"info"}),M.jsx("span",{className:"ds-select__feedback",children:y})]})]})});Oo.propTypes={label:A.string.isRequired,className:A.string,disabled:A.bool,animated:A.bool,multiple:A.bool,name:A.string,testId:A.string,options:A.array.isRequired,placeholder:A.string,onChange:A.func,onChangeHandler:A.func,value:A.oneOfType([A.string,A.number]),size:A.oneOf($e.props.size.options),status:A.oneOf($e.props.status.options),tooltip:A.string,tooltipPosition:A.string,tooltipPlacement:A.string,feedback:A.string},Oo.displayName="DsSelect";var Po=(t=>(t.Large="large",t.Small="small",t))(Po||{});Object.values(Po);var No=(t=>(t.Small="small",t.Medium="medium",t.Large="large",t))(No||{}),Io=(t=>(t.Text="text",t))(Io||{}),Do=(t=>(t.None="",t.Error="error",t.Success="success",t))(Do||{}),Mo=(t=>(t.None="none",t.Both="both",t.Horizontal="horizontal",t.Vertical="vertical",t.Block="block",t.Inline="inline",t))(Mo||{});const Me={class:"ds-textarea",props:{testId:{default:"ds-textarea-test"},type:{options:Object.values(Io)},animated:{default:!0},disabled:{default:!1},size:{default:"medium",options:Object.values(No)},rows:{default:1},status:{default:"",options:Object.values(Do)},resize:{default:"none",options:Object.values(Mo)}}},Fo=X.forwardRef(({name:t,testId:e=Me.props.testId.default,animated:r=Me.props.animated.default,size:s=Me.props.size.default,label:n,placeholder:a,value:i,minLength:l,maxLength:d,tooltip:o,icon:u,status:f=Me.props.status.default,feedback:m,disabled:_=Me.props.disabled.default,required:g,className:v,resize:p=Me.props.resize.default,onChangeHandler:y,onBlurHandler:h,onKeyDownHandler:b,onFocusHandler:w,rows:S=Me.props.rows.default,cols:O,description:I,style:j},V)=>{const[D,T]=X.useState(!1),[B,R]=X.useState(0),[H,K]=X.useState(crypto.randomUUID());X.useEffect(()=>{i==null&&K(crypto.randomUUID())},[i]);const q=$=>{R($.target.value.length),y&&y($)},se=$=>{b&&b($)},Z=$=>{T(!1),h&&h($)},ne=$=>{T(!0),w&&w($)},P=()=>{const $=[`${Me.class}`];return s&&$.push(`${Me.class}--${s}`),r&&$.push(`${Me.class}--animated`),o&&$.push(`${Me.class}--with-icon`),f&&$.push(`${Me.class}--${f}`),v&&$.push(v),$.join(" ")},k=X.useMemo(()=>{const $=[`${Me.class}__label`];return(D||i)&&$.push(`${Me.class}__label--active`),$.join(" ")},[i,D]),x=()=>!r&&a?a:"",E=()=>f&&f==="error"?"info":"check_circle",c={resize:p,...j??{}};return M.jsxs("div",{className:P(),children:[I&&M.jsx("span",{className:"ds-textarea__description",children:I}),m&&M.jsxs("div",{className:"ds-textarea__feedback",children:[M.jsx(Ae,{image:E()}),m]}),M.jsx("textarea",{className:"ds-textarea__textarea",cols:O,"data-testid":e,defaultValue:i??"",disabled:_,id:t,maxLength:d,minLength:l,name:t,onBlur:Z,onChange:q,onFocus:ne,onKeyDown:se,placeholder:x(),ref:V,required:g,rows:S,style:c}),M.jsx("label",{className:k,htmlFor:t,children:n}),d&&M.jsxs("span",{className:"ds-textarea__count",children:[B,"/",d]}),o&&M.jsx(Ir,{className:"ds-textarea__tooltip",placement:"end",text:o,children:M.jsx(Ae,{className:"ds-textarea__icon",image:u})})]},H)});Fo.propTypes={name:A.string,testId:A.string,animated:A.bool,size:A.oneOf(Me.props.size.options),label:A.string,placeholder:A.string,value:A.oneOfType([A.string]),tooltip:A.string,icon:A.string,status:A.oneOf(Me.props.status.options),feedback:A.string,minLength:A.number,maxLength:A.number,rows:A.number,cols:A.number,disabled:A.bool,required:A.bool,onChangeHandler:A.func,onBlur:A.func,onKeyDown:A.func,onFocus:A.func,resize:A.oneOf(Me.props.resize.options).isRequired,description:A.string,style:A.object},Fo.displayName="DsTextArea",A.node,A.bool,A.string,A.object,A.string;var Bo=(t=>(t.Quark="quark",t.Nano="nano",t.ExtraSmall="xs",t.Small="sm",t.Medium="md",t.Large="lg",t))(Bo||{}),Qs=(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))(Qs||{});const en={props:{gap:{options:Object.values(Bo)},horizontalAlign:{options:Object.values(Qs)},verticalAlign:{options:Object.values(Qs)}}};A.oneOfType([A.arrayOf(A.node),A.node,A.func]),A.string,A.oneOf(en.props.gap.options),A.bool,A.bool,A.string,A.string,A.oneOf(en.props.horizontalAlign.options),A.oneOf(en.props.verticalAlign.options);var pr=(t=>(t.None="none",t.Quark="quark",t.Nano="nano",t.ExtraSmall="xs",t.Small="sm",t.Medium="md",t.Large="lg",t))(pr||{});Object.values(pr),Object.values(pr),Object.values(pr),Object.values(pr),Object.values(pr),A.bool,A.oneOfType([A.element,A.string]),A.oneOfType([A.element,A.string]),A.bool,A.array,A.number,A.arrayOf(A.shape({title:A.string.isRequired,image:A.string.isRequired,description:A.string.isRequired})).isRequired,A.number,A.oneOfType([A.number,A.string]),A.oneOfType([A.number,A.string]),A.oneOfType([A.number,A.string]),A.oneOfType([A.number,A.string]);var jo=(t=>(t.Small="small",t.Medium="medium",t.Large="large",t))(jo||{});Object.values(jo),A.string;var Ro=(t=>(t.Squared="squared",t.Rounded="rounded",t))(Ro||{});const Lo={props:{elevation:{options:[1,2,3,4]},variant:{options:Object.values(Ro)}}};A.string,A.string,A.string,A.oneOf(Lo.props.variant.options),A.oneOf(Lo.props.elevation.options),A.bool,A.node,A.node;var Vo=(t=>(t.Success="success",t.Danger="danger",t.Warning="warning",t.Info="info",t))(Vo||{}),zo=(t=>(t.Rounded="rounded",t.Squared="squared",t))(zo||{});Object.values(Vo),Object.values(zo),A.func,A.array,A.string,A.string;var Ho=(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))(Ho||{});Object.values(Ho),A.string,A.node.isRequired,A.string;var Uo=(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))(Uo||{});const Fc={props:{position:{options:Object.values(Uo)}}};A.oneOf(Fc.props.position.options),A.bool,A.array,A.func,A.node,A.node,A.node,A.node;const Bc=({categories:t=[],onClick:e,title:r="Categorias"})=>{const s=i=>{e(i)},[n,a]=X.useState(null);return M.jsxs("div",{className:"category-cards","data-testid":"category-cards",children:[M.jsx(Ne,{vertical:"xxs"}),M.jsx(bt,{type:"heading-5",className:"color__neutral--90",children:r}),M.jsx(Ne,{vertical:"xxxs"}),M.jsx("div",{className:"category-cards__grid",children:M.jsx(Le,{gap:"xxxs",children:t.map(i=>M.jsx(ye,{flex:"0 0 32%",children:M.jsx("div",{className:`category-cards__card ${n===i.id?"category-cards__card--hovered":""}`,"data-testid":`category-card-${i.id}`,onClick:()=>s(i.id),onMouseEnter:()=>a(i.id),onMouseLeave:()=>a(null),role:"button",tabIndex:0,children:M.jsxs(hr,{className:"category-card",testId:`category-card-item-${i.id}`,elevation:n===i.id?0:2,backgroundColor:n===i.id?"secondary-lightest":"neutral-00",children:[M.jsx(Ne,{vertical:"nano"}),M.jsxs(Le,{alignItems:"center",flexDirection:"column",gap:"nano",children:[M.jsx(ye,{children:M.jsx(Ae,{color:"secondary-dark","data-testid":`category-card-icon-${i.id}`,image:i.attributes.icon,size:"xxxl"})}),M.jsx(ye,{children:M.jsx(bt,{className:"color__neutral--80","data-testid":`category-card-title-${i.id}`,type:"heading-6",children:i.attributes.name})})]}),M.jsx(Ne,{vertical:"nano"})]})})},i.id))})})]})};var ce=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function jc(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function s(){return this instanceof s?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(s){var n=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(r,s,n.get?n:{enumerable:!0,get:function(){return t[s]}})}),r}var tn={exports:{}},Go={},it={},fr={},mr={},ie={},gr={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(h){if(super(),!t.IDENTIFIER.test(h))throw new Error("CodeGen: name must be a valid identifier");this.str=h}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class s extends e{constructor(h){super(),this._items=typeof h=="string"?[h]:h}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const h=this._items[0];return h===""||h==='""'}get str(){var h;return(h=this._str)!==null&&h!==void 0?h:this._str=this._items.reduce((b,w)=>`${b}${w}`,"")}get names(){var h;return(h=this._names)!==null&&h!==void 0?h:this._names=this._items.reduce((b,w)=>(w instanceof r&&(b[w.str]=(b[w.str]||0)+1),b),{})}}t._Code=s,t.nil=new s("");function n(y,...h){const b=[y[0]];let w=0;for(;w<h.length;)l(b,h[w]),b.push(y[++w]);return new s(b)}t._=n;const a=new s("+");function i(y,...h){const b=[_(y[0])];let w=0;for(;w<h.length;)b.push(a),l(b,h[w]),b.push(a,_(y[++w]));return d(b),new s(b)}t.str=i;function l(y,h){h instanceof s?y.push(...h._items):h instanceof r?y.push(h):y.push(f(h))}t.addCodeArg=l;function d(y){let h=1;for(;h<y.length-1;){if(y[h]===a){const b=o(y[h-1],y[h+1]);if(b!==void 0){y.splice(h-1,3,b);continue}y[h++]="+"}h++}}function o(y,h){if(h==='""')return y;if(y==='""')return h;if(typeof y=="string")return h instanceof r||y[y.length-1]!=='"'?void 0:typeof h!="string"?`${y.slice(0,-1)}${h}"`:h[0]==='"'?y.slice(0,-1)+h.slice(1):void 0;if(typeof h=="string"&&h[0]==='"'&&!(y instanceof r))return`"${y}${h.slice(1)}`}function u(y,h){return h.emptyStr()?y:y.emptyStr()?h:i`${y}${h}`}t.strConcat=u;function f(y){return typeof y=="number"||typeof y=="boolean"||y===null?y:_(Array.isArray(y)?y.join(","):y)}function m(y){return new s(_(y))}t.stringify=m;function _(y){return JSON.stringify(y).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=_;function g(y){return typeof y=="string"&&t.IDENTIFIER.test(y)?new s(`.${y}`):n`[${y}]`}t.getProperty=g;function v(y){if(typeof y=="string"&&t.IDENTIFIER.test(y))return new s(`${y}`);throw new Error(`CodeGen: invalid export name: ${y}, use explicit $id name mapping`)}t.getEsmExportName=v;function p(y){return new s(y.toString())}t.regexpCode=p})(gr);var rn={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=gr;class r extends Error{constructor(o){super(`CodeGen: "code" for ${o} not defined`),this.value=o.value}}var s;(function(d){d[d.Started=0]="Started",d[d.Completed=1]="Completed"})(s||(t.UsedValueState=s={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class n{constructor({prefixes:o,parent:u}={}){this._names={},this._prefixes=o,this._parent=u}toName(o){return o instanceof e.Name?o:this.name(o)}name(o){return new e.Name(this._newName(o))}_newName(o){const u=this._names[o]||this._nameGroup(o);return`${o}${u.index++}`}_nameGroup(o){var u,f;if(!((f=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||f===void 0)&&f.has(o)||this._prefixes&&!this._prefixes.has(o))throw new Error(`CodeGen: prefix "${o}" is not allowed in this scope`);return this._names[o]={prefix:o,index:0}}}t.Scope=n;class a extends e.Name{constructor(o,u){super(u),this.prefix=o}setValue(o,{property:u,itemIndex:f}){this.value=o,this.scopePath=(0,e._)`.${new e.Name(u)}[${f}]`}}t.ValueScopeName=a;const i=(0,e._)`\n`;class l extends n{constructor(o){super(o),this._values={},this._scope=o.scope,this.opts={...o,_n:o.lines?i:e.nil}}get(){return this._scope}name(o){return new a(o,this._newName(o))}value(o,u){var f;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const m=this.toName(o),{prefix:_}=m,g=(f=u.key)!==null&&f!==void 0?f:u.ref;let v=this._values[_];if(v){const h=v.get(g);if(h)return h}else v=this._values[_]=new Map;v.set(g,m);const p=this._scope[_]||(this._scope[_]=[]),y=p.length;return p[y]=u.ref,m.setValue(u,{property:_,itemIndex:y}),m}getValue(o,u){const f=this._values[o];if(f)return f.get(u)}scopeRefs(o,u=this._values){return this._reduceValues(u,f=>{if(f.scopePath===void 0)throw new Error(`CodeGen: name "${f}" has no value`);return(0,e._)`${o}${f.scopePath}`})}scopeCode(o=this._values,u,f){return this._reduceValues(o,m=>{if(m.value===void 0)throw new Error(`CodeGen: name "${m}" has no value`);return m.value.code},u,f)}_reduceValues(o,u,f={},m){let _=e.nil;for(const g in o){const v=o[g];if(!v)continue;const p=f[g]=f[g]||new Map;v.forEach(y=>{if(p.has(y))return;p.set(y,s.Started);let h=u(y);if(h){const b=this.opts.es5?t.varKinds.var:t.varKinds.const;_=(0,e._)`${_}${b} ${y} = ${h};${this.opts._n}`}else if(h=m==null?void 0:m(y))_=(0,e._)`${_}${h}${this.opts._n}`;else throw new r(y);p.set(y,s.Completed)})}return _}}t.ValueScope=l})(rn),function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const e=gr,r=rn;var s=gr;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return s.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return s.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return s.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return s.Name}});var n=rn;Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return n.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return n.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return n.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return n.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class a{optimizeNodes(){return this}optimizeNames(c,$){return this}}class i extends a{constructor(c,$,C){super(),this.varKind=c,this.name=$,this.rhs=C}render({es5:c,_n:$}){const C=c?r.varKinds.var:this.varKind,L=this.rhs===void 0?"":` = ${this.rhs}`;return`${C} ${this.name}${L};`+$}optimizeNames(c,$){if(c[this.name.str])return this.rhs&&(this.rhs=H(this.rhs,c,$)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class l extends a{constructor(c,$,C){super(),this.lhs=c,this.rhs=$,this.sideEffects=C}render({_n:c}){return`${this.lhs} = ${this.rhs};`+c}optimizeNames(c,$){if(!(this.lhs instanceof e.Name&&!c[this.lhs.str]&&!this.sideEffects))return this.rhs=H(this.rhs,c,$),this}get names(){const c=this.lhs instanceof e.Name?{}:{...this.lhs.names};return R(c,this.rhs)}}class d extends l{constructor(c,$,C,L){super(c,C,L),this.op=$}render({_n:c}){return`${this.lhs} ${this.op}= ${this.rhs};`+c}}class o extends a{constructor(c){super(),this.label=c,this.names={}}render({_n:c}){return`${this.label}:`+c}}class u extends a{constructor(c){super(),this.label=c,this.names={}}render({_n:c}){return`break${this.label?` ${this.label}`:""};`+c}}class f extends a{constructor(c){super(),this.error=c}render({_n:c}){return`throw ${this.error};`+c}get names(){return this.error.names}}class m extends a{constructor(c){super(),this.code=c}render({_n:c}){return`${this.code};`+c}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(c,$){return this.code=H(this.code,c,$),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class _ extends a{constructor(c=[]){super(),this.nodes=c}render(c){return this.nodes.reduce(($,C)=>$+C.render(c),"")}optimizeNodes(){const{nodes:c}=this;let $=c.length;for(;$--;){const C=c[$].optimizeNodes();Array.isArray(C)?c.splice($,1,...C):C?c[$]=C:c.splice($,1)}return c.length>0?this:void 0}optimizeNames(c,$){const{nodes:C}=this;let L=C.length;for(;L--;){const F=C[L];F.optimizeNames(c,$)||(K(c,F.names),C.splice(L,1))}return C.length>0?this:void 0}get names(){return this.nodes.reduce((c,$)=>B(c,$.names),{})}}class g extends _{render(c){return"{"+c._n+super.render(c)+"}"+c._n}}class v extends _{}class p extends g{}p.kind="else";class y extends g{constructor(c,$){super($),this.condition=c}render(c){let $=`if(${this.condition})`+super.render(c);return this.else&&($+="else "+this.else.render(c)),$}optimizeNodes(){super.optimizeNodes();const c=this.condition;if(c===!0)return this.nodes;let $=this.else;if($){const C=$.optimizeNodes();$=this.else=Array.isArray(C)?new p(C):C}if($)return c===!1?$ instanceof y?$:$.nodes:this.nodes.length?this:new y(q(c),$ instanceof y?[$]:$.nodes);if(!(c===!1||!this.nodes.length))return this}optimizeNames(c,$){var C;if(this.else=(C=this.else)===null||C===void 0?void 0:C.optimizeNames(c,$),!!(super.optimizeNames(c,$)||this.else))return this.condition=H(this.condition,c,$),this}get names(){const c=super.names;return R(c,this.condition),this.else&&B(c,this.else.names),c}}y.kind="if";class h extends g{}h.kind="for";class b extends h{constructor(c){super(),this.iteration=c}render(c){return`for(${this.iteration})`+super.render(c)}optimizeNames(c,$){if(super.optimizeNames(c,$))return this.iteration=H(this.iteration,c,$),this}get names(){return B(super.names,this.iteration.names)}}class w extends h{constructor(c,$,C,L){super(),this.varKind=c,this.name=$,this.from=C,this.to=L}render(c){const $=c.es5?r.varKinds.var:this.varKind,{name:C,from:L,to:F}=this;return`for(${$} ${C}=${L}; ${C}<${F}; ${C}++)`+super.render(c)}get names(){const c=R(super.names,this.from);return R(c,this.to)}}class S extends h{constructor(c,$,C,L){super(),this.loop=c,this.varKind=$,this.name=C,this.iterable=L}render(c){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(c)}optimizeNames(c,$){if(super.optimizeNames(c,$))return this.iterable=H(this.iterable,c,$),this}get names(){return B(super.names,this.iterable.names)}}class O extends g{constructor(c,$,C){super(),this.name=c,this.args=$,this.async=C}render(c){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(c)}}O.kind="func";class I extends _{render(c){return"return "+super.render(c)}}I.kind="return";class j extends g{render(c){let $="try"+super.render(c);return this.catch&&($+=this.catch.render(c)),this.finally&&($+=this.finally.render(c)),$}optimizeNodes(){var c,$;return super.optimizeNodes(),(c=this.catch)===null||c===void 0||c.optimizeNodes(),($=this.finally)===null||$===void 0||$.optimizeNodes(),this}optimizeNames(c,$){var C,L;return super.optimizeNames(c,$),(C=this.catch)===null||C===void 0||C.optimizeNames(c,$),(L=this.finally)===null||L===void 0||L.optimizeNames(c,$),this}get names(){const c=super.names;return this.catch&&B(c,this.catch.names),this.finally&&B(c,this.finally.names),c}}class V extends g{constructor(c){super(),this.error=c}render(c){return`catch(${this.error})`+super.render(c)}}V.kind="catch";class D extends g{render(c){return"finally"+super.render(c)}}D.kind="finally";class T{constructor(c,$={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...$,_n:$.lines?`
|
|
20
|
+
Valid keys: `+JSON.stringify(Object.keys(P),null," "));var U=J(L,G,c,$,C+"."+G,r);if(U)return U}return null}return p(k)}function H(P){switch(typeof P){case"number":case"string":case"undefined":return!0;case"boolean":return!P;case"object":if(Array.isArray(P))return P.every(H);if(P===null||l(P))return!0;var k=f(P);if(k){var x=k.call(P),E;if(k!==P.entries){for(;!(E=x.next()).done;)if(!H(E.value))return!1}else for(;!(E=x.next()).done;){var c=E.value;if(c&&!H(c[1]))return!1}}else return!1;return!0;default:return!1}}function K(P,k){return P==="symbol"?!0:k?k["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&k instanceof Symbol:!1}function q(P){var k=typeof P;return Array.isArray(P)?"array":P instanceof RegExp?"object":K(k,P)?"symbol":k}function se(P){if(typeof P>"u"||P===null)return""+P;var k=q(P);if(k==="object"){if(P instanceof Date)return"date";if(P instanceof RegExp)return"regexp"}return k}function Z(P){var k=se(P);switch(k){case"array":case"object":return"an "+k;case"boolean":case"date":case"regexp":return"a "+k;default:return k}}function ne(P){return!P.constructor||!P.constructor.name?m:P.constructor.name}return _.checkPropTypes=n,_.resetWarningCache=n.resetWarningCache,_.PropTypes=_,_},Us}var Gs,Ma;function pc(){if(Ma)return Gs;Ma=1;var t=zs();function e(){}function r(){}return r.resetWarningCache=e,Gs=function(){function s(i,l,d,o,u,f){if(f!==t){var m=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 m.name="Invariant Violation",m}}s.isRequired=s;function n(){return s}var a={array:s,bigint:s,bool:s,func:s,number:s,object:s,string:s,symbol:s,any:s,arrayOf:n,element:s,elementType:s,instanceOf:n,node:s,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:r,resetWarningCache:e};return a.PropTypes=a,a},Gs}if(process.env.NODE_ENV!=="production"){var fc=Aa(),mc=!0;js.exports=hc()(fc.isElement,mc)}else js.exports=pc()();var gc=js.exports;const A=ic(gc);var Fa=(t=>(t.Primary="primary",t.Secondary="secondary",t.Info="info",t.Success="success",t.Danger="danger",t.Warning="warning",t.Neutral="neutral",t))(Fa||{}),Ba=(t=>(t.Solid="solid",t.Outline="outline",t.Text="text",t))(Ba||{}),ja=(t=>(t.Large="lg",t.Medium="md",t.Small="sm",t))(ja||{}),Ra=(t=>(t.Right="right",t.Left="left",t))(Ra||{});const rs={props:{color:{options:Object.values(Fa)},variant:{options:Object.values(Ba)},size:{options:Object.values(ja)},iconPosition:{options:Object.values(Ra)}}};var La=(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))(La||{}),Va=(t=>(t.Outlined="outlined",t.Rounded="rounded",t.Sharp="sharp",t))(Va||{}),za=(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))(za||{}),Ha=(t=>(t.Bold="bold",t.Semibold="semibold",t.Medium="medium",t.Regular="regular",t.Light="light",t.Extralight="extralight",t))(Ha||{});const rt={class:"ds-icon",props:{color:{default:"neutral-90",options:Object.values(La)},image:{default:"settings"},variation:{options:Object.values(Va)},size:{default:"md",options:Object.values(za)},fill:{default:!1},testId:{default:"ds-icon-test"},weight:{default:"semibold",options:Object.values(Ha)},onClick:{default:()=>({})}}};var ss=(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))(ss||{});const yc={bold:700,semibold:600,medium:500,regular:400,light:300,extralight:200},Ae=({image:t=rt.props.image.default,color:e=rt.props.color.default,className:r,size:s=rt.props.size.default,fill:n=rt.props.fill.default,weight:a=rt.props.weight.default,testId:i=rt.props.testId.default,onClick:l=rt.props.onClick.default})=>{const d="material-symbols-rounded",o=e&&rt.props.color.options.find(f=>f===e)&&`color__${ss[e]??e}`,u=X.useMemo(()=>({fontVariationSettings:`'FILL' ${n?1:0}, 'GRAD' 0,'wght' ${yc[a]}, 'opsz' 48`}),[a,n]);return M.jsx("i",{className:[`${rt.class}--${s}`,rt.class,d,o,r].filter(f=>f).join(" "),"data-testid":i,onClick:l,style:u,translate:"no",children:t})};Ae.propTypes={color:A.oneOf(rt.props.color.options),image:A.string,fontVariationSettings:A.object,size:A.oneOf(rt.props.size.options),fill:A.bool,weight:A.oneOf(rt.props.weight.options),onClick:A.func},Ae.displayName="DsIcon",A.oneOf(rs.props.color.options),A.oneOf(rs.props.variant.options),A.oneOf(rs.props.size.options),A.bool,A.string,A.bool,A.oneOf(rs.props.iconPosition.options),A.string,A.string,A.bool,A.string,A.string,A.node.isRequired,A.string,A.string;var Ws=(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))(Ws||{});const Tt={class:"ds-card",props:{backgroundColor:{default:"",options:Object.values(Ws)},borderColor:{default:"",options:Object.values(Ws)},elevation:{default:0,options:[0,1,2,3,4]},testId:{default:"ds-card"},trackId:{default:"track-click"}}},hr=({id:t,testId:e=Tt.props.testId.default,children:r,className:s,elevation:n=Tt.props.elevation.default,backgroundColor:a=Tt.props.backgroundColor.default,borderColor:i=Tt.props.borderColor.default,trackId:l=Tt.props.trackId.default,trackLabel:d})=>{const o=n&&`elevation-${n}`,u=i&&`border-color__${ss[i]??i}`,f=a&&`bg-color__${ss[a]??a}`;return M.jsx("div",{className:[Tt.class,s,o,u,f].filter(m=>m).join(" "),"data-testid":e,"data-trackid":l,...d&&{"data-tracklabel":d},id:t,children:r})};hr.propTypes={id:A.string,testId:A.string,backgroundColor:A.oneOf(Tt.props.backgroundColor.options),borderColor:A.oneOf(Tt.props.borderColor.options),elevation:A.oneOf(Tt.props.elevation.options),trackId:A.string,trackLabel:A.string},hr.displayName="DsCard";const We={class:"ds-checkbox",props:{testId:{default:"ds-checkbox-test"},label:{default:""},description:{default:""},checked:{default:!1},disabled:{default:!1},changeByChecked:{default:!1}}},Ua=X.forwardRef(({id:t,className:e,name:r,testId:s=We.props.testId.default,label:n=We.props.label.default,description:a=We.props.description.default,checked:i=We.props.checked.default,disabled:l=We.props.disabled.default,changeByChecked:d=We.props.changeByChecked.default,onChangeHandler:o},u)=>{const f=d??!1,m=i??!1,[_,g]=X.useState(m),v={image:_?"check_box":"check_box_outline_blank",class:_?`${We.class}__icon--checked`:`${We.class}__icon--unchecked`},p=l&&`${We.class}--disabled`,y=h=>{l||(g(b=>!b),o&&o(h))};return X.useEffect(()=>{f&&g(i)},[i,f]),M.jsxs("label",{className:[We.class,p,e].join(" "),htmlFor:t||r,children:[M.jsx("input",{checked:_,className:`${We.class}__input`,"data-testid":s,disabled:l,id:t||r,name:r,onChange:y,ref:u,type:"checkbox"}),M.jsx(Ae,{className:`${We.class}__icon ${v.class}`,fill:!0,image:v.image,size:"xxl",testId:`${s}-icon`}),(a||n)&&M.jsxs("div",{className:`${We.class}__label`,children:[n&&M.jsx("label",{className:`${We.class}__label-title`,htmlFor:t||r,children:n}),a&&M.jsx("label",{className:`${We.class}__label-description`,htmlFor:t||r,children:a})]})]})});Ua.propTypes={label:A.oneOfType([A.string,A.element]),name:A.string,className:A.string,testId:A.string,description:A.oneOfType([A.string,A.element]),checked:A.bool,disabled:A.bool},Ua.displayName="DsCheckbox";var Ga=(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))(Ga||{});const Or={class:"ds-heading",props:{type:{default:"heading-1",options:Object.values(Ga)}}},bt=({children:t,testId:e="ds-heading-test",type:r=Or.props.type.default,className:s})=>{const n={"heading-1":"h1","heading-2":"h2","heading-3":"h3","heading-4":"h4","heading-5":"h5","heading-6":"h6"},a=r.replace("heading-",""),i=Or.props.type.options.find(d=>d===r)&&`${Or.class}--${a}`,l=n[r];return M.jsx(l,{className:[Or.class,i,s].filter(d=>d).join(" "),"data-testid":e,children:t})};bt.propTypes={className:A.string,testId:A.string,type:A.oneOf(Or.props.type.options)},bt.displayName="DsHeading";var Wa=(t=>(t.None="",t.Dashed="dashed",t.Dotted="dotted",t))(Wa||{}),Ka=(t=>(t.None="",t.Small="small",t.Large="large",t))(Ka||{});const Yt={class:"ds-hr",props:{borderStyle:{type:String,default:"",options:Object.values(Wa)},size:{type:String,default:"",options:Object.values(Ka)}}};function qa(t,e,r){const s=r.props[t];return s.options&&s.options.some(n=>n===e)?`${r.class}--${e}`:""}const Ks=({size:t=Yt.props.size.default,borderStyle:e=Yt.props.borderStyle.default})=>{const r=qa("size",t,Yt),s=qa("borderStyle",e,Yt);return M.jsx("hr",{className:`${Yt.class} ${r} ${s}`.trim()})};Ks.propTypes={size:A.oneOf(Yt.props.size.options),borderStyle:A.oneOf(Yt.props.borderStyle.options)},Ks.displayName="DsHR";function Rt(t){return typeof t=="string"||t instanceof String}function Xa(t){var e;return typeof t=="object"&&t!=null&&(t==null||(e=t.constructor)==null?void 0:e.name)==="Object"}function Ya(t,e){return Array.isArray(e)?Ya(t,(r,s)=>e.includes(s)):Object.entries(t).reduce((r,s)=>{let[n,a]=s;return e(a,n)&&(r[n]=a),r},{})}const te={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function vc(t){switch(t){case te.LEFT:return te.FORCE_LEFT;case te.RIGHT:return te.FORCE_RIGHT;default:return t}}function qs(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function ns(t,e){if(e===t)return!0;const r=Array.isArray(e),s=Array.isArray(t);let n;if(r&&s){if(e.length!=t.length)return!1;for(n=0;n<e.length;n++)if(!ns(e[n],t[n]))return!1;return!0}if(r!=s)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){const a=e instanceof Date,i=t instanceof Date;if(a&&i)return e.getTime()==t.getTime();if(a!=i)return!1;const l=e instanceof RegExp,d=t instanceof RegExp;if(l&&d)return e.toString()==t.toString();if(l!=d)return!1;const o=Object.keys(e);for(n=0;n<o.length;n++)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;for(n=0;n<o.length;n++)if(!ns(t[o[n]],e[o[n]]))return!1;return!0}else if(e&&t&&typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();return!1}class _c{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?te.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?te.RIGHT:te.LEFT}}function ae(t,e){return new ae.InputMask(t,e)}function Za(t){if(t==null)throw new Error("mask property should be defined");return t instanceof RegExp?ae.MaskedRegExp:Rt(t)?ae.MaskedPattern:t===Date?ae.MaskedDate:t===Number?ae.MaskedNumber:Array.isArray(t)||t===Array?ae.MaskedDynamic:ae.Masked&&t.prototype instanceof ae.Masked?t:ae.Masked&&t instanceof ae.Masked?t.constructor:t instanceof Function?ae.MaskedFunction:(console.warn("Mask not found for mask",t),ae.Masked)}function Pr(t){if(!t)throw new Error("Options in not defined");if(ae.Masked){if(t.prototype instanceof ae.Masked)return{mask:t};const{mask:e=void 0,...r}=t instanceof ae.Masked?{mask:t}:Xa(t)&&t.mask instanceof ae.Masked?t:{};if(e){const s=e.mask;return{...Ya(e,(n,a)=>!a.startsWith("_")),mask:e.constructor,_mask:s,...r}}}return Xa(t)?{...t}:{mask:t}}function Ot(t){if(ae.Masked&&t instanceof ae.Masked)return t;const e=Pr(t),r=Za(e.mask);if(!r)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===r&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new r(e)}ae.createMask=Ot;let Xs=class{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,r){if(!(e==null||r==null||e===this.selectionStart&&r===this.selectionEnd))try{this._unsafeSelect(e,r)}catch{}}get isActive(){return!1}};ae.MaskElement=Xs;const Ja=90,bc=89;let as=class extends Xs{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,r,s;return(e=(r=(s=this.input).getRootNode)==null?void 0:r.call(s))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){if(this._handlers.redo&&(e.keyCode===Ja&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===bc&&e.ctrlKey))return e.preventDefault(),this._handlers.redo(e);if(this._handlers.undo&&e.keyCode===Ja&&(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={}}};ae.HTMLMaskElement=as;let kc=class extends as{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,r){this.input.setSelectionRange(e,r)}get value(){return this.input.value}set value(e){this.input.value=e}};ae.HTMLMaskElement=as;let Qa=class extends as{get _unsafeSelectionStart(){const e=this.rootElement,r=e.getSelection&&e.getSelection(),s=r&&r.anchorOffset,n=r&&r.focusOffset;return n==null||s==null||s<n?s:n}get _unsafeSelectionEnd(){const e=this.rootElement,r=e.getSelection&&e.getSelection(),s=r&&r.anchorOffset,n=r&&r.focusOffset;return n==null||s==null||s>n?s:n}_unsafeSelect(e,r){if(!this.rootElement.createRange)return;const s=this.rootElement.createRange();s.setStart(this.input.firstChild||this.input,e),s.setEnd(this.input.lastChild||this.input,r);const n=this.rootElement,a=n.getSelection&&n.getSelection();a&&(a.removeAllRanges(),a.addRange(s))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}};ae.HTMLContenteditableMaskElement=Qa;let eo=class ac{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>ac.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}};eo.MAX_LENGTH=100;class wc{constructor(e,r){this.el=e instanceof Xs?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new Qa(e):new kc(e),this.masked=Ot(r),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new eo,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 r;return e==null||((r=this.masked)==null?void 0:r.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof ae.Masked)&&this.masked.constructor===Za(e)){this.masked.updateOptions({mask:e});return}const r=e instanceof ae.Masked?e:Ot({mask:e});r.unmaskedValue=this.masked.unmaskedValue,this.masked=r}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,r){const s=this._listeners[e];s&&s.forEach(n=>n(r))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const r=this.masked.unmaskedValue,s=this.masked.value,n=this.masked.rawInputValue,a=this.displayValue,i=this.unmaskedValue!==r||this.value!==s||this._rawInputValue!==n;this._unmaskedValue=r,this._value=s,this._rawInputValue=n,this.el.value!==a&&(this.el.value=a),e==="auto"?this.alignCursor():e!=null&&(this.cursorPos=e),i&&this._fireChangeEvents(),!this._historyChanging&&(i||this.history.isEmpty)&&this.history.push({unmaskedValue:r,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:r,...s}=e,n=!this.maskEquals(r),a=this.masked.optionsIsChanged(s);n&&(this.mask=r),a&&this.masked.updateOptions(s),(n||a)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,te.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,r){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(r),this}off(e,r){if(!this._listeners[e])return this;if(!r)return delete this._listeners[e],this;const s=this._listeners[e].indexOf(r);return s>=0&&this._listeners[e].splice(s,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const r=new _c({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),s=this.masked.rawInputValue,n=this.masked.splice(r.startChangePos,r.removed.length,r.inserted,r.removeDirection,{input:!0,raw:!0}).offset,a=s===this.masked.rawInputValue?r.removeDirection:te.NONE;let i=this.masked.nearestInputPos(r.startChangePos+n,a);a!==te.NONE&&(i=this.masked.nearestInputPos(i,te.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}}ae.InputMask=wc;class ue{static normalize(e){return Array.isArray(e)?e:[e,new ue]}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}}ae.ChangeDetails=ue;class kt{constructor(e,r,s){e===void 0&&(e=""),r===void 0&&(r=0),this.value=e,this.from=r,this.stop=s}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const r=this.value[0];return this.value=this.value.slice(1),r}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}let ot=class Bs{constructor(e){this._value="",this._update({...Bs.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,r){r===void 0&&(r={input:!0}),this.reset(),this.append(e,r,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,r){return e}totalInputPositions(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),Math.min(this.displayValue.length,r-e)}extractInput(e,r,s){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),this.displayValue.slice(e,r)}extractTail(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),new kt(this.extractInput(e,r),e)}appendTail(e){return Rt(e)&&(e=new kt(String(e))),e.appendTo(this)}_appendCharRaw(e,r){return e?(this._value+=e,new ue({inserted:e,rawInserted:e})):new ue}_appendChar(e,r,s){r===void 0&&(r={});const n=this.state;let a;if([e,a]=this.doPrepareChar(e,r),e&&(a=a.aggregate(this._appendCharRaw(e,r)),!a.rawInserted&&this.autofix==="pad")){const i=this.state;this.state=n;let l=this.pad(r);const d=this._appendCharRaw(e,r);l=l.aggregate(d),d.rawInserted||l.equals(a)?a=l:this.state=i}if(a.inserted){let i,l=this.doValidate(r)!==!1;if(l&&s!=null){const d=this.state;if(this.overwrite===!0){i=s.state;for(let u=0;u<a.rawInserted.length;++u)s.unshift(this.displayValue.length-a.tailShift)}let o=this.appendTail(s);if(l=o.rawInserted.length===s.toString().length,!(l&&o.inserted)&&this.overwrite==="shift"){this.state=d,i=s.state;for(let u=0;u<a.rawInserted.length;++u)s.shift();o=this.appendTail(s),l=o.rawInserted.length===s.toString().length}l&&o.inserted&&(this.state=d)}l||(a=new ue,this.state=n,s&&i&&(s.state=i))}return a}_appendPlaceholder(){return new ue}_appendEager(){return new ue}append(e,r,s){if(!Rt(e))throw new Error("value should be string");const n=Rt(s)?new kt(String(s)):s;r!=null&&r.tail&&(r._beforeTailState=this.state);let a;[e,a]=this.doPrepare(e,r);for(let i=0;i<e.length;++i){const l=this._appendChar(e[i],r,n);if(!l.rawInserted&&!this.doSkipInvalid(e[i],r,n))break;a.aggregate(l)}return(this.eager===!0||this.eager==="append")&&r!=null&&r.input&&e&&a.aggregate(this._appendEager()),n!=null&&(a.tailShift+=this.appendTail(n).tailShift),a}remove(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(r),new ue}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const r=this.rawInputValue,s=this.value,n=e();return this.rawInputValue=r,this.value&&this.value!==s&&s.indexOf(this.value)===0&&(this.append(s.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,n}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const r=this.state,s=e(this);return this.state=r,delete this._isolated,s}doSkipInvalid(e,r,s){return!!this.skipInvalid}doPrepare(e,r){return r===void 0&&(r={}),ue.normalize(this.prepare?this.prepare(e,this,r):e)}doPrepareChar(e,r){return r===void 0&&(r={}),ue.normalize(this.prepareChar?this.prepareChar(e,this,r):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,r,s,n,a){s===void 0&&(s=""),n===void 0&&(n=te.NONE),a===void 0&&(a={input:!0});const i=e+r,l=this.extractTail(i),d=this.eager===!0||this.eager==="remove";let o;d&&(n=vc(n),o=this.extractInput(0,i,{raw:!0}));let u=e;const f=new ue;if(n!==te.NONE&&(u=this.nearestInputPos(e,r>1&&e!==0&&!d?te.NONE:n),f.tailShift=u-e),f.aggregate(this.remove(u)),d&&n!==te.NONE&&o===this.rawInputValue)if(n===te.FORCE_LEFT){let m;for(;o===this.rawInputValue&&(m=this.displayValue.length);)f.aggregate(new ue({tailShift:-1})).aggregate(this.remove(m-1))}else n===te.FORCE_RIGHT&&l.unshift();return f.aggregate(this.append(s,a,l))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!ns(this,e)}typedValueEquals(e){const r=this.typedValue;return e===r||Bs.EMPTY_VALUES.includes(e)&&Bs.EMPTY_VALUES.includes(r)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new ue}};ot.DEFAULTS={skipInvalid:!0},ot.EMPTY_VALUES=[void 0,null,""],ae.Masked=ot;class Zt{constructor(e,r){e===void 0&&(e=[]),r===void 0&&(r=0),this.chunks=e,this.from=r}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=Rt(e)?new kt(String(e)):e;const r=this.chunks[this.chunks.length-1],s=r&&(r.stop===e.stop||e.stop==null)&&e.from===r.from+r.toString().length;if(e instanceof kt)s?r.extend(e.toString()):this.chunks.push(e);else if(e instanceof Zt){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 ae.MaskedPattern))return new kt(this.toString()).appendTo(e);const r=new ue;for(let s=0;s<this.chunks.length;++s){const n=this.chunks[s],a=e._mapPosToBlock(e.displayValue.length),i=n.stop;let l;if(i!=null&&(!a||a.index<=i)&&((n instanceof Zt||e._stops.indexOf(i)>=0)&&r.aggregate(e._appendPlaceholder(i)),l=n instanceof Zt&&e._blocks[i]),l){const d=l.appendTail(n);r.aggregate(d);const o=n.toString().slice(d.rawInserted.length);o&&r.aggregate(e.append(o,{tail:!0}))}else r.aggregate(e.append(n.toString(),{tail:!0}))}return r}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:r,...s}=e;Object.assign(this,s),this.chunks=r.map(n=>{const a="chunks"in n?new Zt:new kt;return a.state=n,a})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const r=e!=null?e-this.from:e;let s=0;for(;s<this.chunks.length;){const n=this.chunks[s],a=n.unshift(r);if(n.toString()){if(!a)break;++s}else this.chunks.splice(s,1);if(a)return a}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const r=this.chunks[e],s=r.shift();if(r.toString()){if(!s)break;--e}else this.chunks.splice(e,1);if(s)return s}return""}}let $c=class{constructor(e,r){this.masked=e,this._log=[];const{offset:s,index:n}=e._mapPosToBlock(r)||(r<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=s,this.index=n,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((r=this.block)==null?void 0:r.displayValue.length)||0){var r;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,te.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,te.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,te.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,te.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,te.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,te.NONE),!0})}},to=class{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,r){return e===void 0&&(e=0),r===void 0&&(r=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(r),this._value||(this._isRawInput=!1),new ue}nearestInputPos(e,r){r===void 0&&(r=te.NONE);const s=0,n=this._value.length;switch(r){case te.LEFT:case te.FORCE_LEFT:return s;case te.NONE:case te.RIGHT:case te.FORCE_RIGHT:default:return n}}totalInputPositions(e,r){return e===void 0&&(e=0),r===void 0&&(r=this._value.length),this._isRawInput?r-e:0}extractInput(e,r,s){return e===void 0&&(e=0),r===void 0&&(r=this._value.length),s===void 0&&(s={}),s.raw&&this._isRawInput&&this._value.slice(e,r)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,r){if(r===void 0&&(r={}),this.isFilled)return new ue;const s=this.eager===!0||this.eager==="append",n=this.char===e&&(this.isUnmasking||r.input||r.raw)&&(!r.raw||!s)&&!r.tail,a=new ue({inserted:this.char,rawInserted:n?this.char:""});return this._value=this.char,this._isRawInput=n&&(r.raw||r.input),a}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new ue;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new kt("")}appendTail(e){return Rt(e)&&(e=new kt(String(e))),e.appendTo(this)}append(e,r,s){const n=this._appendChar(e[0],r);return s!=null&&(n.tailShift+=this.appendTail(s).tailShift),n}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}pad(e){return this._appendPlaceholder()}},os=class{constructor(e){const{parent:r,isOptional:s,placeholderChar:n,displayChar:a,lazy:i,eager:l,...d}=e;this.masked=Ot(d),Object.assign(this,{parent:r,isOptional:s,placeholderChar:n,displayChar:a,lazy:i,eager:l})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.value.length),e===0&&r>=1?(this.isFilled=!1,this.masked.remove(e,r)):new ue}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,r){if(r===void 0&&(r={}),this.isFilled)return new ue;const s=this.masked.state;let n=this.masked._appendChar(e,this.currentMaskFlags(r));return n.inserted&&this.doValidate(r)===!1&&(n=new ue,this.masked.state=s),!n.inserted&&!this.isOptional&&!this.lazy&&!r.input&&(n.inserted=this.placeholderChar),n.skip=!n.inserted&&!this.isOptional,this.isFilled=!!n.inserted,n}append(e,r,s){return this.masked.append(e,this.currentMaskFlags(r),s)}_appendPlaceholder(){return this.isFilled||this.isOptional?new ue:(this.isFilled=!0,new ue({inserted:this.placeholderChar}))}_appendEager(){return new ue}extractTail(e,r){return this.masked.extractTail(e,r)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,r,s){return e===void 0&&(e=0),r===void 0&&(r=this.value.length),this.masked.extractInput(e,r,s)}nearestInputPos(e,r){r===void 0&&(r=te.NONE);const s=0,n=this.value.length,a=Math.min(Math.max(e,s),n);switch(r){case te.LEFT:case te.FORCE_LEFT:return this.isComplete?a:s;case te.RIGHT:case te.FORCE_RIGHT:return this.isComplete?a:n;case te.NONE:default:return a}}totalInputPositions(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.value.length),this.value.slice(e,r).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var r;return{...e,_beforeTailState:(e==null||(r=e._beforeTailState)==null?void 0:r.masked)||(e==null?void 0:e._beforeTailState)}}pad(e){return new ue}};os.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]/,"*":/./};let Ec=class extends ot{updateOptions(e){super.updateOptions(e)}_update(e){const r=e.mask;r&&(e.validate=s=>s.search(r)>=0),super._update(e)}};ae.MaskedRegExp=Ec;class Re extends ot{constructor(e){super({...Re.DEFAULTS,...e,definitions:Object.assign({},os.DEFAULT_DEFINITIONS,e==null?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const r=this.mask;if(!r||!e)return;let s=!1,n=!1;for(let a=0;a<r.length;++a){if(this.blocks){const o=r.slice(a),u=Object.keys(this.blocks).filter(m=>o.indexOf(m)===0);u.sort((m,_)=>_.length-m.length);const f=u[0];if(f){const{expose:m,repeat:_,...g}=Pr(this.blocks[f]),v={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...g,repeat:_,parent:this},p=_!=null?new ae.RepeatBlock(v):Ot(v);p&&(this._blocks.push(p),m&&(this.exposeBlock=p),this._maskedBlocks[f]||(this._maskedBlocks[f]=[]),this._maskedBlocks[f].push(this._blocks.length-1)),a+=f.length-1;continue}}let i=r[a],l=i in e;if(i===Re.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(i==="{"||i==="}"){s=!s;continue}if(i==="["||i==="]"){n=!n;continue}if(i===Re.ESCAPE_CHAR){if(++a,i=r[a],!i)break;l=!1}const d=l?new os({isOptional:n,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...Pr(e[i]),parent:this}):new to({char:i,eager:this.eager,isUnmasking:s});this._blocks.push(d)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e){this.reset();return}const{_blocks:r,...s}=e;this._blocks.forEach((n,a)=>n.state=r[a]),super.state=s}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,r)=>e+=r.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(r),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,r)=>e+=r.value,"")}set value(e){if(this.exposeBlock){const r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(r),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(r),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,r)=>e+=r.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const r=new ue;let s=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(s==null)return r;this._blocks[s].isFilled&&++s;for(let n=s;n<this._blocks.length;++n){const a=this._blocks[n]._appendEager();if(!a.inserted)break;r.aggregate(a)}return r}_appendCharRaw(e,r){r===void 0&&(r={});const s=this._mapPosToBlock(this.displayValue.length),n=new ue;if(!s)return n;for(let i=s.index,l;l=this._blocks[i];++i){var a;const d=l._appendChar(e,{...r,_beforeTailState:(a=r._beforeTailState)==null||(a=a._blocks)==null?void 0:a[i]});if(n.aggregate(d),d.consumed)break}return n}extractTail(e,r){e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length);const s=new Zt;return e===r||this._forEachBlocksInRange(e,r,(n,a,i,l)=>{const d=n.extractTail(i,l);d.stop=this._findStopBefore(a),d.from=this._blockStartPos(a),d instanceof Zt&&(d.blockIndex=a),s.extend(d)}),s}extractInput(e,r,s){if(e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),s===void 0&&(s={}),e===r)return"";let n="";return this._forEachBlocksInRange(e,r,(a,i,l,d)=>{n+=a.extractInput(l,d,s)}),n}_findStopBefore(e){let r;for(let s=0;s<this._stops.length;++s){const n=this._stops[s];if(n<=e)r=n;else break}return r}_appendPlaceholder(e){const r=new ue;if(this.lazy&&e==null)return r;const s=this._mapPosToBlock(this.displayValue.length);if(!s)return r;const n=s.index,a=e??this._blocks.length;return this._blocks.slice(n,a).forEach(i=>{if(!i.lazy||e!=null){var l;r.aggregate(i._appendPlaceholder((l=i._blocks)==null?void 0:l.length))}}),r}_mapPosToBlock(e){let r="";for(let s=0;s<this._blocks.length;++s){const n=this._blocks[s],a=r.length;if(r+=n.displayValue,e<=r.length)return{index:s,offset:e-a}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((r,s)=>r+=s.displayValue.length,0)}_forEachBlocksInRange(e,r,s){r===void 0&&(r=this.displayValue.length);const n=this._mapPosToBlock(e);if(n){const a=this._mapPosToBlock(r),i=a&&n.index===a.index,l=n.offset,d=a&&i?a.offset:this._blocks[n.index].displayValue.length;if(s(this._blocks[n.index],n.index,l,d),a&&!i){for(let o=n.index+1;o<a.index;++o)s(this._blocks[o],o,0,this._blocks[o].displayValue.length);s(this._blocks[a.index],a.index,0,a.offset)}}}remove(e,r){e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length);const s=super.remove(e,r);return this._forEachBlocksInRange(e,r,(n,a,i,l)=>{s.aggregate(n.remove(i,l))}),s}nearestInputPos(e,r){if(r===void 0&&(r=te.NONE),!this._blocks.length)return 0;const s=new $c(this,e);if(r===te.NONE)return s.pushRightBeforeInput()||(s.popState(),s.pushLeftBeforeInput())?s.pos:this.displayValue.length;if(r===te.LEFT||r===te.FORCE_LEFT){if(r===te.LEFT){if(s.pushRightBeforeFilled(),s.ok&&s.pos===e)return e;s.popState()}if(s.pushLeftBeforeInput(),s.pushLeftBeforeRequired(),s.pushLeftBeforeFilled(),r===te.LEFT){if(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.ok&&s.pos<=e||(s.popState(),s.ok&&s.pos<=e))return s.pos;s.popState()}return s.ok?s.pos:r===te.FORCE_LEFT?0:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:0)}return r===te.RIGHT||r===te.FORCE_RIGHT?(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.pushRightBeforeFilled()?s.pos:r===te.FORCE_RIGHT?this.displayValue.length:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:this.nearestInputPos(e,te.LEFT))):e}totalInputPositions(e,r){e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length);let s=0;return this._forEachBlocksInRange(e,r,(n,a,i,l)=>{s+=n.totalInputPositions(i,l)}),s}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const r=this._maskedBlocks[e];return r?r.map(s=>this._blocks[s]):[]}pad(e){const r=new ue;return this._forEachBlocksInRange(0,this.displayValue.length,s=>r.aggregate(s.pad(e))),r}}Re.DEFAULTS={...ot.DEFAULTS,lazy:!0,placeholderChar:"_"},Re.STOP_CHAR="`",Re.ESCAPE_CHAR="\\",Re.InputDefinition=os,Re.FixedDefinition=to,ae.MaskedPattern=Re;let is=class extends Re{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:r=this.to||0,from:s=this.from||0,maxLength:n=this.maxLength||0,autofix:a=this.autofix,...i}=e;this.to=r,this.from=s,this.maxLength=Math.max(String(r).length,n),this.autofix=a;const l=String(this.from).padStart(this.maxLength,"0"),d=String(this.to).padStart(this.maxLength,"0");let o=0;for(;o<d.length&&d[o]===l[o];)++o;i.mask=d.slice(0,o).replace(/0/g,"\\0")+"0".repeat(this.maxLength-o),super._update(i)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let r="",s="";const[,n,a]=e.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(r="0".repeat(n.length)+a,s="9".repeat(n.length)+a),r=r.padEnd(this.maxLength,"0"),s=s.padEnd(this.maxLength,"9"),[r,s]}doPrepareChar(e,r){r===void 0&&(r={});let s;return[e,s]=super.doPrepareChar(e.replace(/\D/g,""),r),e||(s.skip=!this.isComplete),[e,s]}_appendCharRaw(e,r){if(r===void 0&&(r={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,r);const s=String(this.from).padStart(this.maxLength,"0"),n=String(this.to).padStart(this.maxLength,"0"),[a,i]=this.boundaries(this.value+e);return Number(i)<this.from?super._appendCharRaw(s[this.value.length],r):Number(a)>this.to?!r.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(s[this.value.length],r).aggregate(this._appendCharRaw(e,r)):super._appendCharRaw(n[this.value.length],r):super._appendCharRaw(e,r)}doValidate(e){const r=this.value;if(r.search(/[^0]/)===-1&&r.length<=this._matchFrom)return!0;const[s,n]=this.boundaries(r);return this.from<=Number(n)&&Number(s)<=this.to&&super.doValidate(e)}pad(e){const r=new ue;if(this.value.length===this.maxLength)return r;const s=this.value,n=this.maxLength-this.value.length;if(n){this.reset();for(let a=0;a<n;++a)r.aggregate(super._appendCharRaw("0",e));s.split("").forEach(a=>this._appendCharRaw(a))}return r}};ae.MaskedRange=is;const Sc="d{.}`m{.}`Y";class Pt extends Re{static extractPatternOptions(e){const{mask:r,pattern:s,...n}=e;return{...n,mask:Rt(r)?r:s}}constructor(e){super(Pt.extractPatternOptions({...Pt.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:r,pattern:s,blocks:n,...a}={...Pt.DEFAULTS,...e},i=Object.assign({},Pt.GET_DEFAULT_BLOCKS());e.min&&(i.Y.from=e.min.getFullYear()),e.max&&(i.Y.to=e.max.getFullYear()),e.min&&e.max&&i.Y.from===i.Y.to&&(i.m.from=e.min.getMonth()+1,i.m.to=e.max.getMonth()+1,i.m.from===i.m.to&&(i.d.from=e.min.getDate(),i.d.to=e.max.getDate())),Object.assign(i,this.blocks,n),super._update({...a,mask:Rt(r)?r:s,blocks:i})}doValidate(e){const r=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&r!=null&&(this.min==null||this.min<=r)&&(this.max==null||r<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(Pt.extractPatternOptions(e))}}Pt.GET_DEFAULT_BLOCKS=()=>({d:{mask:is,from:1,to:31,maxLength:2},m:{mask:is,from:1,to:12,maxLength:2},Y:{mask:is,from:1900,to:9999}}),Pt.DEFAULTS={...Re.DEFAULTS,mask:Date,pattern:Sc,format:(t,e)=>{if(!t)return"";const r=String(t.getDate()).padStart(2,"0"),s=String(t.getMonth()+1).padStart(2,"0"),n=t.getFullYear();return[r,s,n].join(".")},parse:(t,e)=>{const[r,s,n]=t.split(".").map(Number);return new Date(n,s-1,r)}},ae.MaskedDate=Pt;class ls extends ot{constructor(e){super({...ls.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(r=>{const{expose:s,...n}=Pr(r),a=Ot({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...n});return s&&(this.exposeMask=a),a}):[])}_appendCharRaw(e,r){r===void 0&&(r={});const s=this._applyDispatch(e,r);return this.currentMask&&s.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(r))),s}_applyDispatch(e,r,s){e===void 0&&(e=""),r===void 0&&(r={}),s===void 0&&(s="");const n=r.tail&&r._beforeTailState!=null?r._beforeTailState._value:this.value,a=this.rawInputValue,i=r.tail&&r._beforeTailState!=null?r._beforeTailState._rawInputValue:a,l=a.slice(i.length),d=this.currentMask,o=new ue,u=d==null?void 0:d.state;return this.currentMask=this.doDispatch(e,{...r},s),this.currentMask&&(this.currentMask!==d?(this.currentMask.reset(),i&&(this.currentMask.append(i,{raw:!0}),o.tailShift=this.currentMask.value.length-n.length),l&&(o.tailShift+=this.currentMask.append(l,{raw:!0,tail:!0}).tailShift)):u&&(this.currentMask.state=u)),o}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const r=new ue;return e&&r.aggregate(this._applyDispatch("",{},e)),r.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var r,s;return{...e,_beforeTailState:((r=e._beforeTailState)==null?void 0:r.currentMaskRef)===this.currentMask&&((s=e._beforeTailState)==null?void 0:s.currentMask)||e._beforeTailState}}doDispatch(e,r,s){return r===void 0&&(r={}),s===void 0&&(s=""),this.dispatch(e,this,r,s)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,r){r===void 0&&(r={});let[s,n]=super.doPrepare(e,r);if(this.currentMask){let a;[s,a]=super.doPrepare(s,this.currentMaskFlags(r)),n=n.aggregate(a)}return[s,n]}doPrepareChar(e,r){r===void 0&&(r={});let[s,n]=super.doPrepareChar(e,r);if(this.currentMask){let a;[s,a]=super.doPrepareChar(s,this.currentMaskFlags(r)),n=n.aggregate(a)}return[s,n]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(r=>r.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let r=String(e);this.currentMask&&(this.currentMask.typedValue=e,r=this.currentMask.unmaskedValue),this.unmaskedValue=r}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,r){const s=new ue;return this.currentMask&&s.aggregate(this.currentMask.remove(e,r)).aggregate(this._applyDispatch()),s}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(r=>r.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:r,currentMaskRef:s,currentMask:n,...a}=e;r&&this.compiledMasks.forEach((i,l)=>i.state=r[l]),s!=null&&(this.currentMask=s,this.currentMask.state=n),super.state=a}extractInput(e,r,s){return this.currentMask?this.currentMask.extractInput(e,r,s):""}extractTail(e,r){return this.currentMask?this.currentMask.extractTail(e,r):super.extractTail(e,r)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,r){return this.currentMask?this.currentMask.nearestInputPos(e,r):super.nearestInputPos(e,r)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((r,s)=>{if(!e[s])return;const{mask:n,...a}=e[s];return ns(r,a)&&r.maskEquals(n)}):super.maskEquals(e)}typedValueEquals(e){var r;return!!((r=this.currentMask)!=null&&r.typedValueEquals(e))}}ls.DEFAULTS={...ot.DEFAULTS,dispatch:(t,e,r,s)=>{if(!e.compiledMasks.length)return;const n=e.rawInputValue,a=e.compiledMasks.map((i,l)=>{const d=e.currentMask===i,o=d?i.displayValue.length:i.nearestInputPos(i.displayValue.length,te.FORCE_LEFT);return i.rawInputValue!==n?(i.reset(),i.append(n,{raw:!0})):d||i.remove(o),i.append(t,e.currentMaskFlags(r)),i.appendTail(s),{index:l,weight:i.rawInputValue.length,totalInputPositions:i.totalInputPositions(0,Math.max(o,i.nearestInputPos(i.displayValue.length,te.FORCE_LEFT)))}});return a.sort((i,l)=>l.weight-i.weight||l.totalInputPositions-i.totalInputPositions),e.compiledMasks[a[0].index]}},ae.MaskedDynamic=ls;let ro=class oc extends Re{constructor(e){super({...oc.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:r,...s}=e;if(r){const n=r.map(l=>l.length),a=Math.min(...n),i=Math.max(...n)-a;s.mask="*".repeat(a),i&&(s.mask+="["+"*".repeat(i)+"]"),this.enum=r}super._update(s)}_appendCharRaw(e,r){r===void 0&&(r={});const s=Math.min(this.nearestInputPos(0,te.FORCE_RIGHT),this.value.length),n=this.enum.filter(a=>this.matchValue(a,this.unmaskedValue+e,s));if(n.length){n.length===1&&this._forEachBlocksInRange(0,this.value.length,(i,l)=>{const d=n[0][l];l>=this.value.length||d===i.value||(i.reset(),i._appendChar(d,r))});const a=super._appendCharRaw(n[0][this.value.length],r);return n.length===1&&n[0].slice(this.unmaskedValue.length).split("").forEach(i=>a.aggregate(super._appendCharRaw(i))),a}return new ue({skip:!this.isComplete})}extractTail(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),new kt("",e)}remove(e,r){if(e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),e===r)return new ue;const s=Math.min(super.nearestInputPos(0,te.FORCE_RIGHT),this.value.length);let n;for(n=e;n>=0&&!(this.enum.filter(i=>this.matchValue(i,this.value.slice(s,n),s)).length>1);--n);const a=super.remove(n,r);return a.tailShift+=n-e,a}get isComplete(){return this.enum.indexOf(this.value)>=0}};ro.DEFAULTS={...Re.DEFAULTS,matchValue:(t,e,r)=>t.indexOf(e,r)===r},ae.MaskedEnum=ro;class xc extends ot{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}ae.MaskedFunction=xc;var so;let Nr=class Xt extends ot{constructor(e){super({...Xt.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),r="\\d*",s=(this.scale?"("+qs(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+r+s),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(qs).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(qs(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const r=e.split(this.radix);return r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),r.join(this.radix)}doPrepareChar(e,r){r===void 0&&(r={});const[s,n]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(r.input&&r.raw||!r.input&&!r.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),r);return e&&!s&&(n.skip=!0),s&&!this.allowPositive&&!this.value&&s!=="-"&&n.aggregate(this._appendChar("-")),[s,n]}_separatorsCount(e,r){r===void 0&&(r=!1);let s=0;for(let n=0;n<e;++n)this._value.indexOf(this.thousandsSeparator,n)===n&&(++s,r&&(e+=this.thousandsSeparator.length));return s}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,r,s){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),[e,r]=this._adjustRangeWithSeparators(e,r),this._removeThousandsSeparators(super.extractInput(e,r,s))}_appendCharRaw(e,r){r===void 0&&(r={});const s=r.tail&&r._beforeTailState?r._beforeTailState._value:this._value,n=this._separatorsCountFromSlice(s);this._value=this._removeThousandsSeparators(this.value);const a=this._value;this._value+=e;const i=this.number;let l=!isNaN(i),d=!1;if(l){let m;this.min!=null&&this.min<0&&this.number<this.min&&(m=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(m=this.max),m!=null&&(this.autofix?(this._value=this.format(m,this).replace(Xt.UNMASKED_RADIX,this.radix),d||(d=a===this._value&&!r.tail)):l=!1),l&&(l=!!this._value.match(this._numberRegExp))}let o;l?o=new ue({inserted:this._value.slice(a.length),rawInserted:d?"":e,skip:d}):(this._value=a,o=new ue),this._value=this._insertThousandsSeparators(this._value);const u=r.tail&&r._beforeTailState?r._beforeTailState._value:this._value,f=this._separatorsCountFromSlice(u);return o.tailShift+=(f-n)*this.thousandsSeparator.length,o}_findSeparatorAround(e){if(this.thousandsSeparator){const r=e-this.thousandsSeparator.length+1,s=this.value.indexOf(this.thousandsSeparator,r);if(s<=e)return s}return-1}_adjustRangeWithSeparators(e,r){const s=this._findSeparatorAround(e);s>=0&&(e=s);const n=this._findSeparatorAround(r);return n>=0&&(r=n+this.thousandsSeparator.length),[e,r]}remove(e,r){e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),[e,r]=this._adjustRangeWithSeparators(e,r);const s=this.value.slice(0,e),n=this.value.slice(r),a=this._separatorsCount(s.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(s+n));const i=this._separatorsCountFromSlice(s);return new ue({tailShift:(i-a)*this.thousandsSeparator.length})}nearestInputPos(e,r){if(!this.thousandsSeparator)return e;switch(r){case te.NONE:case te.LEFT:case te.FORCE_LEFT:{const s=this._findSeparatorAround(e-1);if(s>=0){const n=s+this.thousandsSeparator.length;if(e<n||this.value.length<=n||r===te.FORCE_LEFT)return s}break}case te.RIGHT:case te.FORCE_RIGHT:{const s=this._findSeparatorAround(e);if(s>=0)return s+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let r=e;this.min!=null&&(r=Math.max(r,this.min)),this.max!=null&&(r=Math.min(r,this.max)),r!==e&&(this.unmaskedValue=this.format(r,this));let s=this.value;this.normalizeZeros&&(s=this._normalizeZeros(s)),this.padFractionalZeros&&this.scale>0&&(s=this._padFractionalZeros(s)),this._value=s}super.doCommit()}_normalizeZeros(e){const r=this._removeThousandsSeparators(e).split(this.radix);return r[0]=r[0].replace(/^(\D*)(0*)(\d*)/,(s,n,a,i)=>n+i),e.length&&!/\d$/.test(r[0])&&(r[0]=r[0]+"0"),r.length>1&&(r[1]=r[1].replace(/0*$/,""),r[1].length||(r.length=1)),this._insertThousandsSeparators(r.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const r=e.split(this.radix);return r.length<2&&r.push(""),r[1]=r[1].padEnd(this.scale,"0"),r.join(this.radix)}doSkipInvalid(e,r,s){r===void 0&&(r={});const n=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===Xt.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,r,s)&&!n}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Xt.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(Xt.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)||Xt.EMPTY_VALUES.includes(e)&&Xt.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}};so=Nr,Nr.UNMASKED_RADIX=".",Nr.EMPTY_VALUES=[...ot.EMPTY_VALUES,0],Nr.DEFAULTS={...ot.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[so.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})},ae.MaskedNumber=Nr;const Ys={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function no(t,e,r){e===void 0&&(e=Ys.MASKED),r===void 0&&(r=Ys.MASKED);const s=Ot(t);return n=>s.runIsolated(a=>(a[e]=n,a[r]))}function Ac(t,e,r,s){return no(e,r,s)(t)}ae.PIPE_TYPE=Ys,ae.createPipe=no,ae.pipe=Ac;let Cc=class 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 r,s,n;const{repeat:a,...i}=Pr(e);this._blockOpts=Object.assign({},this._blockOpts,i);const l=Ot(this._blockOpts);this.repeat=(r=(s=a??l.repeat)!=null?s:this.repeat)!=null?r:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((n=this._blocks)==null?void 0:n.length)||0,this.repeatFrom)),blocks:{m:l},eager:l.eager,overwrite:l.overwrite,skipInvalid:l.skipInvalid,lazy:l.lazy,placeholderChar:l.placeholderChar,displayChar:l.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(Ot(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(e,r){r===void 0&&(r={});const s=new ue;for(let d=(n=(a=this._mapPosToBlock(this.displayValue.length))==null?void 0:a.index)!=null?n:Math.max(this._blocks.length-1,0),o,u;o=(i=this._blocks[d])!=null?i:u=!u&&this._allocateBlock(d);++d){var n,a,i,l;const f=o._appendChar(e,{...r,_beforeTailState:(l=r._beforeTailState)==null||(l=l._blocks)==null?void 0:l[d]});if(f.skip&&u){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(s.aggregate(f),f.consumed)break}return s}_trimEmptyTail(e,r){var s,n;e===void 0&&(e=0);const a=Math.max(((s=this._mapPosToBlock(e))==null?void 0:s.index)||0,this.repeatFrom,0);let i;r!=null&&(i=(n=this._mapPosToBlock(r))==null?void 0:n.index),i==null&&(i=this._blocks.length-1);let l=0;for(let d=i;a<=d&&!this._blocks[d].unmaskedValue;--d,++l);l&&(this._blocks.splice(i-l+1,l),this.mask=this.mask.slice(l))}reset(){super.reset(),this._trimEmptyTail()}remove(e,r){e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length);const s=super.remove(e,r);return this._trimEmptyTail(e,r),s}totalInputPositions(e,r){return e===void 0&&(e=0),r==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,r)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}};ae.RepeatBlock=Cc;try{globalThis.IMask=ae}catch{}const ao={mask:A.oneOfType([A.array,A.func,A.string,A.instanceOf(RegExp),A.oneOf([Date,Number,ae.Masked]),A.instanceOf(ae.Masked)]),value:A.any,unmask:A.oneOfType([A.bool,A.oneOf(["typed"])]),prepare:A.func,prepareChar:A.func,validate:A.func,commit:A.func,overwrite:A.oneOfType([A.bool,A.oneOf(["shift"])]),eager:A.oneOfType([A.bool,A.oneOf(["append","remove"])]),skipInvalid:A.bool,onAccept:A.func,onComplete:A.func,placeholderChar:A.string,displayChar:A.string,lazy:A.bool,definitions:A.object,blocks:A.object,enum:A.arrayOf(A.string),maxLength:A.number,from:A.number,to:A.number,pattern:A.string,format:A.func,parse:A.func,autofix:A.oneOfType([A.bool,A.oneOf(["pad"])]),radix:A.string,thousandsSeparator:A.string,mapToRadix:A.arrayOf(A.string),scale:A.number,normalizeZeros:A.bool,padFractionalZeros:A.bool,min:A.oneOfType([A.number,A.instanceOf(Date)]),max:A.oneOfType([A.number,A.instanceOf(Date)]),dispatch:A.func,inputRef:A.oneOfType([A.func,A.shape({current:A.object})])},oo=Object.keys(ao).filter(t=>t!=="value"),Tc=["value","unmask","onAccept","onComplete","inputRef"],Oc=oo.filter(t=>Tc.indexOf(t)<0);function Pc(t){var e;const r=(e=class extends X.Component{constructor(n){super(n),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const n=this.props,a=this._extractMaskOptionsFromProps(n);if(a.mask)this.maskRef?(this.maskRef.updateOptions(a),"value"in n&&n.value!==void 0&&(this.maskValue=n.value)):this.initMask(a);else if(this.destroyMask(),"value"in n&&n.value!==void 0){var i;(i=this.element)!=null&&i.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=n.value:this.element.value=n.value}}componentWillUnmount(){this.destroyMask()}_inputRef(n){this.element=n,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=n:this.props.inputRef(n))}initMask(n){n===void 0&&(n=this._extractMaskOptionsFromProps(this.props)),this.maskRef=ae(this.element,n).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(n){const{...a}=n;return Object.keys(a).filter(i=>Oc.indexOf(i)<0).forEach(i=>{delete a[i]}),a}_extractNonMaskProps(n){const{...a}=n;return oo.forEach(i=>{i!=="maxLength"&&delete a[i]}),"defaultValue"in a||(a.defaultValue=n.mask?"":a.value),delete a.value,a}get maskValue(){return this.maskRef?this.props.unmask==="typed"?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(n){this.maskRef&&(n=n==null&&this.props.unmask!=="typed"?"":n,this.props.unmask==="typed"?this.maskRef.typedValue=n:this.props.unmask?this.maskRef.unmaskedValue=n:this.maskRef.value=n)}_onAccept(n){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,n)}_onComplete(n){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,n)}render(){return X.createElement(t,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}},e.displayName=void 0,e.propTypes=void 0,e),s=t.displayName||t.name||"Component";return r.displayName="IMask("+s+")",r.propTypes=ao,X.forwardRef((n,a)=>X.createElement(r,{...n,ref:a}))}const Nc=Pc(t=>{let{inputRef:e,...r}=t;return X.createElement("input",{...r,ref:e})}),Ic=(t,e)=>X.createElement(Nc,{...t,ref:e});X.forwardRef(Ic);function Dc(t,e){let{onAccept:r,onComplete:s,ref:n=X.useRef(null),defaultValue:a,defaultUnmaskedValue:i,defaultTypedValue:l}=e===void 0?{}:e;const d=X.useRef(null),[o,u]=X.useState({}),[f,m]=X.useState(""),[_,g]=X.useState(""),[v,p]=X.useState(),y=X.useCallback(()=>{var S;(S=d.current)==null||S.destroy(),d.current=null},[]),h=X.useCallback(()=>{const S=d.current;S&&(u({value:S.value,unmaskedValue:S.unmaskedValue,typedValue:S.typedValue}),p(S.typedValue),g(S.unmaskedValue),m(S.value))},[]),b=X.useCallback(S=>{const O=d.current;O&&(h(),r==null||r(O.value,O,S))},[r]),w=X.useCallback(S=>d.current&&(s==null?void 0:s(d.current.value,d.current,S)),[s]);return X.useEffect(()=>{const{value:S,...O}=o,I=d.current;!I||f===void 0||(S!==f&&(I.value=f,I.value!==f&&b()),u(O))},[f]),X.useEffect(()=>{const{unmaskedValue:S,...O}=o,I=d.current;!I||_===void 0||(S!==_&&(I.unmaskedValue=_,I.unmaskedValue!==_&&b()),u(O))},[_]),X.useEffect(()=>{const{typedValue:S,...O}=o,I=d.current;!I||v===void 0||(S!==v&&(I.typedValue=v,I.masked.typedValueEquals(v)||b()),u(O))},[v]),X.useEffect(()=>{const S=n.current;if(!S||!(t!=null&&t.mask))return y();const O=d.current;O?O==null||O.updateOptions(t):S&&t!=null&&t.mask&&(d.current=ae(S,t),h(),a!==void 0&&m(a),i!==void 0&&g(i),l!==void 0&&p(l))},[t,y,b]),X.useEffect(()=>{if(!d.current)return;const S=d.current;return S.on("accept",b),S.on("complete",w),()=>{S.off("accept",b),S.off("complete",w)}},[b,w]),X.useEffect(()=>y,[y]),{ref:n,maskRef:d,value:f,setValue:m,unmaskedValue:_,setUnmaskedValue:g,typedValue:v,setTypedValue:p}}var io=(t=>(t.Text="text",t.Password="password",t.Email="email",t.Date="date",t.Number="number",t))(io||{}),lo=(t=>(t.Small="small",t.Medium="medium",t.Large="large",t))(lo||{}),uo=(t=>(t.Default="",t.Error="error",t.Success="success",t))(uo||{}),co=(t=>(t.Center="center",t.End="end",t.Initial="initial",t))(co||{}),ho=(t=>(t.Top="top",t.Right="right",t.Bottom="bottom",t.Left="left",t))(ho||{});const ke={class:"ds-input",props:{testId:{default:"ds-input-test"},type:{default:"text",options:Object.values(io)},animated:{default:!0},disabled:{default:!1},size:{default:"medium",options:Object.values(lo)},status:{default:"",options:Object.values(uo)},hasFeedback:{default:!0},noMargin:{default:!1},icon:{default:""},tooltip:{default:""},tooltipPlacement:{default:"center",options:Object.values(co)},tooltipPosition:{default:"top",options:Object.values(ho)},onChangeHandler:{default:()=>({})}}},po={currency:{mask:"currency",blocks:{currency:{mask:"R$ num",lazy:!1,blocks:{num:{mask:Number,scale:2,thousandsSeparator:".",padFractionalZeros:!0,normalizeZeros:!1,radix:",",mapToRadix:[",","."]}}}}},document:{mask:[{mask:"000.000.000-00",startsWith:/[0-9]/,maxLength:14},{mask:"00.000.000/0000-00",startsWith:/[0-9]/,maxLength:18}]},"phone-br":{mask:[{mask:"(00) 0000-0000"},{mask:"(00) 00000-0000"}],dispatch:(t,e)=>(e.value+t).replace(/\D/g,"").length<=10?e.compiledMasks[0]:e.compiledMasks[1]}};var fo=(t=>(t.Top="top",t.Right="right",t.Bottom="bottom",t.Left="left",t))(fo||{}),mo=(t=>(t.Center="center",t.End="end",t.Initial="initial",t))(mo||{});const wt={class:"ds-tooltip",props:{position:{default:"top",options:Object.values(fo)},placement:{default:"center",options:Object.values(mo)},text:{default:""},testId:{default:"ds-tooltip"}}},Ir=({children:t,position:e=wt.props.position.default,placement:r=wt.props.placement.default,text:s=wt.props.text.default,testId:n=wt.props.testId.default,className:a})=>{const i=X.useRef(null),[l,d]=X.useState(0),[o,u]=X.useState(0),[f,m]=X.useState(!1),_=e&&wt.props.position.options.find(y=>y===e)&&`${wt.class}--${e}`,g=r&&wt.props.placement.options.find(y=>y===r)&&`${wt.class}--${r}`;let v;X.useLayoutEffect(()=>{var y,h;i.current&&(d((y=i==null?void 0:i.current)==null?void 0:y.offsetHeight),u((h=i==null?void 0:i.current)==null?void 0:h.offsetWidth))},[]);const p=9;switch(e){case"top":r==="initial"?v={bottom:l+p,left:-p}:r==="end"?v={bottom:l+p,right:-p}:v={bottom:l+p,left:"50%",transform:"translateX(-50%)"};break;case"bottom":r==="initial"?v={top:l+p,left:-p}:r==="end"?v={top:l+p,right:-p}:v={top:l+p,left:"50%",transform:"translateX(-50%)"};break;case"left":r==="initial"?v={right:o+p,top:-p}:r==="end"?v={right:o+p,bottom:-p}:v={right:o+p,top:"50%",transform:"translateY(-50%)"};break;case"right":r==="initial"?v={left:o+p,top:-p}:r==="end"?v={left:o+p,bottom:-p}:v={left:o+p,top:"50%",transform:"translateY(-50%)"};break}return M.jsxs("div",{className:[wt.class,a].join(" "),"data-testid":n,onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),ref:i,role:"tooltip",children:[t,f&&M.jsx("div",{className:[_,g].filter(y=>y).join(" "),children:M.jsx("span",{className:`${wt.class}__wrapper`,"data-testid":"ds-tooltip-wrapper",style:v,children:s})})]})};Ir.propTypes={position:A.string,placement:A.string,text:A.oneOfType([A.string,A.node]),testId:A.string},Ir.displayName="DsTooltip";const go=X.forwardRef(({name:t,testId:e=ke.props.testId.default,type:r=ke.props.type.default,animated:s=ke.props.animated.default,size:n=ke.props.size.default,label:a,placeholder:i,value:l,min:d,max:o,tooltip:u=ke.props.tooltip.default,tooltipPosition:f=ke.props.tooltipPosition.default,tooltipPlacement:m=ke.props.tooltipPlacement.default,icon:_=ke.props.icon.default,status:g=ke.props.status.default,feedback:v,hasFeedback:p=ke.props.hasFeedback.default,noMargin:y=ke.props.noMargin.default,disabled:h=ke.props.disabled.default,className:b,mask:w,onChangeHandler:S=ke.props.onChangeHandler.default,onBlurHandler:O,onKeyDownHandler:I,onFocusHandler:j},V)=>{const[D,T]=X.useState(!1),[B,R]=X.useState(!1),H=!!S&&!!w,K=(z,G,J)=>{if(H&&J){const U={...J,target:{...J.target,name:t,maskedValue:z,value:G.unmaskedValue,type:"text"}};S(U)}},q=X.useMemo(()=>typeof w=="object"?{lazy:!0,...w}:po[w]?{...po[w],min:d,max:o,lazy:!0}:{mask:w??"",min:d,max:o,lazy:!0},[w]),{ref:se,setUnmaskedValue:Z}=Dc(q,{onAccept:K}),ne=z=>{S&&!H&&S(z)},P=z=>{I&&I(z)},k=z=>{T(!1),O&&O(z)},x=z=>{T(!0),j&&j(z)},E=()=>{R(z=>!z)},c=X.useMemo(()=>B&&r==="password"?"text":r,[B,r]),$=()=>{const z=[`${ke.class}`];return n&&z.push(`${ke.class}--${n}`),s&&z.push(`${ke.class}--animated`),y&&z.push(`${ke.class}--no-margin`),_&&z.push(`${ke.class}--with-icon`),g&&z.push(`${ke.class}--${g}`),b&&z.push(b),z.join(" ")},C=X.useMemo(()=>{const z=[`${ke.class}__label`];return(D||l)&&z.push(`${ke.class}__label--active`),z.join(" ")},[l,D]),L=()=>!s&&i?i:"",F=()=>g&&g==="error"?"info":"check_circle";return X.useEffect(()=>{w&&Z(l??"")},[l,w,Z]),M.jsxs("div",{className:$(),ref:V,children:[p&&M.jsx("div",{className:"ds-input__feedback",children:v&&M.jsxs(M.Fragment,{children:[M.jsx(Ae,{image:F()}),v]})}),M.jsx("input",{className:"ds-input__input","data-testid":e,disabled:h,id:t,max:o,min:d,name:t,onBlur:k,onChange:ne,onFocus:x,onInput:ne,onKeyDown:P,placeholder:L(),ref:se,type:c,...!w&&{value:l??""}}),M.jsxs("label",{className:C,htmlFor:t,children:[a,u&&M.jsx(Ir,{className:"ds-input__tooltip",placement:m,position:f,text:u,children:M.jsx(Ae,{className:"ds-input__icon",image:"info"})})]}),_&&M.jsx(Ae,{className:"ds-input__icon",image:_}),r==="password"&&M.jsx(Ae,{className:"ds-input__password-icon",image:B?"visibility_off":"visibility",onClick:E,size:"xl"})]})});go.propTypes={name:A.string,testId:A.string,type:A.oneOf(ke.props.type.options),animated:A.bool,size:A.oneOf(ke.props.size.options),label:A.string,placeholder:A.string,value:A.oneOfType([A.string]),min:A.string,max:A.string,tooltip:A.string,tooltipPosition:A.string,tooltipPlacement:A.string,icon:A.string,status:A.oneOf(ke.props.status.options),feedback:A.string,hasFeedback:A.bool,noMargin:A.bool,disabled:A.bool,mask:A.oneOfType([A.string,A.object]),onChangeHandler:A.func,onFocusHandler:A.func},go.displayName="DsInput";var yo=(t=>(t.Small="small",t.Medium="medium",t.Large="large",t))(yo||{}),vo=(t=>(t.None="",t.Neutral20="neutral-20",t.Neutral10="neutral-10",t.Neutral05="neutral-05",t.Neutral00="neutral-00",t))(vo||{});const Mc={props:{size:{options:Object.values(yo)},backgroundColor:{options:Object.values(vo)}}};A.string,A.string,A.oneOf(Mc.props.size.options),A.bool,A.bool,A.string,A.string,A.string,A.string,A.oneOfType([A.string,A.node]),A.oneOfType([A.string,A.number]),A.string,A.bool,A.bool,A.func;var _o=(t=>(t.Default="",t.Large="large",t.Small="small",t))(_o||{});const us={class:"ds-paragraph",props:{type:{default:"",options:Object.values(_o)}}},$t=({children:t,className:e,testId:r="ds-paragraph-test",type:s=us.props.type.default})=>{const n=s&&`${us.class}--${s}`;return M.jsx("p",{className:[us.class,n,e].filter(a=>a).join(" "),"data-testid":r,children:t})};$t.propTypes={className:A.string,testId:A.string,type:A.oneOf(us.props.type.options)},$t.displayName="DsParagraph";var bo=(t=>(t.Success="success",t.SuccessDark="success-dark",t.Warning="warning",t.Danger="danger",t))(bo||{});Object.values(bo);var ko=(t=>(t.Stretch="stretch",t.FlexStart="flex-start",t.FlexEnd="flex-end",t.Center="center",t.SpaceAround="space-around",t.SpaceBetween="space-between",t))(ko||{}),wo=(t=>(t.Stretch="stretch",t.FlexStart="flex-start",t.FlexEnd="flex-end",t.Center="center",t))(wo||{}),$o=(t=>(t.Row="row",t.Column="column",t.RowReverse="row-reverse",t.ColumnReverse="column-reverse",t))($o||{}),Eo=(t=>(t.NoWrap="nowrap",t.Wrap="wrap",t.WrapReverse="wrap-reverse",t))(Eo||{}),So=(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))(So||{});const Jt={class:"ds-flex-layout",props:{justifyContent:{default:"stretch",options:Object.values(ko)},alignItems:{default:"stretch",options:Object.values(wo)},flexDirection:{default:"row",options:Object.values($o)},flexWrap:{default:"wrap",options:Object.values(Eo)},width:{default:"100%"},gap:{options:Object.values(So)}}},Le=({children:t,className:e,justifyContent:r=Jt.props.justifyContent.default,alignItems:s=Jt.props.alignItems.default,flexDirection:n=Jt.props.flexDirection.default,flexWrap:a=Jt.props.flexWrap.default,width:i=Jt.props.width.default,height:l,gap:d})=>{const o=()=>{const f=[Jt.class,e];return d&&f.push(`${Jt.class}--gap-${d}`),f.join(" ")},u=()=>({display:"flex",justifyContent:r,alignItems:s,flexDirection:n,flexWrap:a,width:i,height:l,gap:d});return M.jsx("div",{className:o(),style:u(),children:t})};Le.propTypes={className:A.string,justifyContent:A.string,alignItems:A.string,flexDirection:A.string,flexWrap:A.string,width:A.string,height:A.string,gap:A.string},Le.displayName="DsFlexLayout";const Zs={class:"ds-flex-element",props:{flex:{default:"0 1 auto"},className:{default:""}}},ye=({children:t,flex:e=Zs.props.flex.default,className:r=Zs.props.className.default})=>{const s=()=>[Zs.class,r].join(" "),n=()=>({flex:e});return M.jsx("div",{className:s(),style:n(),children:t})};ye.propTypes={className:A.string,flex:A.string},ye.displayName="DsFlexElement";var Js=(t=>(t.None="none",t.Quark="quark",t.Nano="nano",t.XXXS="xxxs",t.XXS="xxs",t.XS="xs",t.SM="sm",t))(Js||{});const Dr={class:"ds-spacer",props:{vertical:{default:"none",options:Object.values(Js)},horizontal:{default:"none",options:Object.values(Js)}}},Ne=({vertical:t=Dr.props.vertical.default,horizontal:e=Dr.props.horizontal.default})=>{const r=t&&`ds-spacer__vertical--${t}`,s=e&&`ds-spacer__horizontal--${e}`;return M.jsx("div",{className:[Dr.class,r,s].filter(n=>n).join(" "),"data-testid":"ds-spacer"})};Ne.propTypes={vertical:A.oneOf(Dr.props.vertical.options),horizontal:A.oneOf(Dr.props.horizontal.options)},Ne.displayName="DsSpacer",A.string,A.number,A.string;var xo=(t=>(t.Small="sm",t.Medium="md",t.Large="lg",t))(xo||{}),Ao=(t=>(t.Default="",t.Error="error",t.Success="success",t))(Ao||{}),Co=(t=>(t.Center="center",t.End="end",t.Initial="initial",t))(Co||{}),To=(t=>(t.Top="top",t.Right="right",t.Bottom="bottom",t.Left="left",t))(To||{});const $e={class:"ds-select",props:{animated:{default:!0},disabled:{default:!1},multiple:{default:!1},testId:{default:"ds-select-test"},size:{options:Object.values(xo),default:"md"},status:{default:"",options:Object.values(Ao)},tooltipPlacement:{default:"initial",options:Object.values(Co)},tooltipPosition:{default:"top",options:Object.values(To)}}},Oo=X.forwardRef(({label:t,className:e,disabled:r=$e.props.disabled.default,animated:s=$e.props.animated.default,multiple:n=$e.props.multiple.default,testId:a=$e.props.testId.default,name:i,options:l,value:d,placeholder:o,onChange:u,onChangeHandler:f,size:m=$e.props.size.default,status:_=$e.props.status.default,tooltip:g,tooltipPosition:v=$e.props.tooltipPosition.default,tooltipPlacement:p=$e.props.tooltipPlacement.default,feedback:y,...h},b)=>{const[w,S]=X.useState(!1),O=V=>{S(!1),u&&u(V,V.target.value),f&&f(V,V.target.value)},I=()=>{const V=[$e.class,"select-placeholder"];return V.push(`${$e.class}--${m}`),_&&V.push(`${$e.class}--${_}`),w&&V.push(`${$e.class}--active`),r&&V.push(`${$e.class}--disabled`),e&&V.push(e),V.join(" ")},j=X.useMemo(()=>{const V=[`${$e.class}__label`];return!s&&V.push(`${$e.class}__label--not-animated`),d&&V.push(`${$e.class}__label--has-value`),s&&!d&&!g&&V.push(`${$e.class}__label--hidden`),V.join(" ")},[d]);return M.jsxs("div",{className:I(),"data-testid":"ds-select-component",children:[t&&M.jsxs("label",{className:j,"data-testid":"ds-label-id",htmlFor:i,children:[t,g&&M.jsx(Ir,{className:`${$e.class}__tooltip`,placement:p,position:v,text:g,children:M.jsx(Ae,{className:`${$e.class}__icon`,image:"info"})})]}),M.jsxs("select",{"data-testid":a,disabled:r,id:i,multiple:n,name:i,onBlur:()=>S(!1),onChange:V=>O(V),onFocus:()=>S(!0),ref:b,value:d??"",...h,children:[(o||s)&&M.jsx("option",{disabled:!0,value:"",children:o??t}),l==null?void 0:l.map((V,D)=>{var T;return"options"in V?M.jsx("optgroup",{label:V.label,children:(T=V.options)==null?void 0:T.map((B,R)=>M.jsx("option",{className:`${$e.class}__option-select`,value:B.value,children:B.label??B.value},R))},D):M.jsx("option",{className:`${$e.class}__option-select`,value:V.value,children:V.label??V.value},D)})]}),y&&M.jsxs("div",{className:"ds-select__feedback-container",children:[M.jsx(Ae,{className:"ds-select__icon",image:_==="success"?"check_circle":"info"}),M.jsx("span",{className:"ds-select__feedback",children:y})]})]})});Oo.propTypes={label:A.string.isRequired,className:A.string,disabled:A.bool,animated:A.bool,multiple:A.bool,name:A.string,testId:A.string,options:A.array.isRequired,placeholder:A.string,onChange:A.func,onChangeHandler:A.func,value:A.oneOfType([A.string,A.number]),size:A.oneOf($e.props.size.options),status:A.oneOf($e.props.status.options),tooltip:A.string,tooltipPosition:A.string,tooltipPlacement:A.string,feedback:A.string},Oo.displayName="DsSelect";var Po=(t=>(t.Large="large",t.Small="small",t))(Po||{});Object.values(Po);var No=(t=>(t.Small="small",t.Medium="medium",t.Large="large",t))(No||{}),Io=(t=>(t.Text="text",t))(Io||{}),Do=(t=>(t.None="",t.Error="error",t.Success="success",t))(Do||{}),Mo=(t=>(t.None="none",t.Both="both",t.Horizontal="horizontal",t.Vertical="vertical",t.Block="block",t.Inline="inline",t))(Mo||{});const Me={class:"ds-textarea",props:{testId:{default:"ds-textarea-test"},type:{options:Object.values(Io)},animated:{default:!0},disabled:{default:!1},size:{default:"medium",options:Object.values(No)},rows:{default:1},status:{default:"",options:Object.values(Do)},resize:{default:"none",options:Object.values(Mo)}}},Fo=X.forwardRef(({name:t,testId:e=Me.props.testId.default,animated:r=Me.props.animated.default,size:s=Me.props.size.default,label:n,placeholder:a,value:i,minLength:l,maxLength:d,tooltip:o,icon:u,status:f=Me.props.status.default,feedback:m,disabled:_=Me.props.disabled.default,required:g,className:v,resize:p=Me.props.resize.default,onChangeHandler:y,onBlurHandler:h,onKeyDownHandler:b,onFocusHandler:w,rows:S=Me.props.rows.default,cols:O,description:I,style:j},V)=>{const[D,T]=X.useState(!1),[B,R]=X.useState(0),[H,K]=X.useState(crypto.randomUUID());X.useEffect(()=>{i==null&&K(crypto.randomUUID())},[i]);const q=$=>{R($.target.value.length),y&&y($)},se=$=>{b&&b($)},Z=$=>{T(!1),h&&h($)},ne=$=>{T(!0),w&&w($)},P=()=>{const $=[`${Me.class}`];return s&&$.push(`${Me.class}--${s}`),r&&$.push(`${Me.class}--animated`),o&&$.push(`${Me.class}--with-icon`),f&&$.push(`${Me.class}--${f}`),v&&$.push(v),$.join(" ")},k=X.useMemo(()=>{const $=[`${Me.class}__label`];return(D||i)&&$.push(`${Me.class}__label--active`),$.join(" ")},[i,D]),x=()=>!r&&a?a:"",E=()=>f&&f==="error"?"info":"check_circle",c={resize:p,...j??{}};return M.jsxs("div",{className:P(),children:[I&&M.jsx("span",{className:"ds-textarea__description",children:I}),m&&M.jsxs("div",{className:"ds-textarea__feedback",children:[M.jsx(Ae,{image:E()}),m]}),M.jsx("textarea",{className:"ds-textarea__textarea",cols:O,"data-testid":e,defaultValue:i??"",disabled:_,id:t,maxLength:d,minLength:l,name:t,onBlur:Z,onChange:q,onFocus:ne,onKeyDown:se,placeholder:x(),ref:V,required:g,rows:S,style:c}),M.jsx("label",{className:k,htmlFor:t,children:n}),d&&M.jsxs("span",{className:"ds-textarea__count",children:[B,"/",d]}),o&&M.jsx(Ir,{className:"ds-textarea__tooltip",placement:"end",text:o,children:M.jsx(Ae,{className:"ds-textarea__icon",image:u})})]},H)});Fo.propTypes={name:A.string,testId:A.string,animated:A.bool,size:A.oneOf(Me.props.size.options),label:A.string,placeholder:A.string,value:A.oneOfType([A.string]),tooltip:A.string,icon:A.string,status:A.oneOf(Me.props.status.options),feedback:A.string,minLength:A.number,maxLength:A.number,rows:A.number,cols:A.number,disabled:A.bool,required:A.bool,onChangeHandler:A.func,onBlur:A.func,onKeyDown:A.func,onFocus:A.func,resize:A.oneOf(Me.props.resize.options).isRequired,description:A.string,style:A.object},Fo.displayName="DsTextArea",A.node,A.bool,A.string,A.object,A.string;var Bo=(t=>(t.Quark="quark",t.Nano="nano",t.ExtraSmall="xs",t.Small="sm",t.Medium="md",t.Large="lg",t))(Bo||{}),Qs=(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))(Qs||{});const en={props:{gap:{options:Object.values(Bo)},horizontalAlign:{options:Object.values(Qs)},verticalAlign:{options:Object.values(Qs)}}};A.oneOfType([A.arrayOf(A.node),A.node,A.func]),A.string,A.oneOf(en.props.gap.options),A.bool,A.bool,A.string,A.string,A.oneOf(en.props.horizontalAlign.options),A.oneOf(en.props.verticalAlign.options);var pr=(t=>(t.None="none",t.Quark="quark",t.Nano="nano",t.ExtraSmall="xs",t.Small="sm",t.Medium="md",t.Large="lg",t))(pr||{});Object.values(pr),Object.values(pr),Object.values(pr),Object.values(pr),Object.values(pr),A.bool,A.oneOfType([A.element,A.string]),A.oneOfType([A.element,A.string]),A.bool,A.array,A.number,A.arrayOf(A.shape({title:A.string.isRequired,image:A.string.isRequired,description:A.string.isRequired})).isRequired,A.number,A.oneOfType([A.number,A.string]),A.oneOfType([A.number,A.string]),A.oneOfType([A.number,A.string]),A.oneOfType([A.number,A.string]);var jo=(t=>(t.Small="small",t.Medium="medium",t.Large="large",t))(jo||{});Object.values(jo),A.string;var Ro=(t=>(t.Squared="squared",t.Rounded="rounded",t))(Ro||{});const Lo={props:{elevation:{options:[1,2,3,4]},variant:{options:Object.values(Ro)}}};A.string,A.string,A.string,A.oneOf(Lo.props.variant.options),A.oneOf(Lo.props.elevation.options),A.bool,A.node,A.node;var Vo=(t=>(t.Success="success",t.Danger="danger",t.Warning="warning",t.Info="info",t))(Vo||{}),zo=(t=>(t.Rounded="rounded",t.Squared="squared",t))(zo||{});Object.values(Vo),Object.values(zo),A.func,A.array,A.string,A.string;var Ho=(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))(Ho||{});Object.values(Ho),A.string,A.node.isRequired,A.string;var Uo=(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))(Uo||{});const Fc={props:{position:{options:Object.values(Uo)}}};A.oneOf(Fc.props.position.options),A.bool,A.array,A.func,A.node,A.node,A.node,A.node;const Bc=({categories:t=[],onClick:e,title:r="Categorias"})=>{const s=i=>{e(i)},[n,a]=X.useState(null);return M.jsxs("div",{className:"category-cards","data-testid":"category-cards",children:[M.jsx(Ne,{vertical:"xxs"}),M.jsx(bt,{type:"heading-5",className:"color__neutral--90",children:r}),M.jsx(Ne,{vertical:"xxxs"}),M.jsx("div",{className:"category-cards__grid",children:M.jsx(Le,{gap:"xxxs",children:t.map(i=>M.jsx(ye,{flex:"0 0 32%",children:M.jsx("button",{className:`category-cards__card ${n===i.id?"category-cards__card--hovered":""}`,"data-testid":`category-card-${i.id}`,onClick:()=>s(i.id),onMouseEnter:()=>a(i.id),onMouseLeave:()=>a(null),type:"button",children:M.jsxs(hr,{className:"category-card",testId:`category-card-item-${i.id}`,elevation:n===i.id?0:2,backgroundColor:n===i.id?"secondary-lightest":"neutral-00",children:[M.jsx(Ne,{vertical:"nano"}),M.jsxs(Le,{alignItems:"center",flexDirection:"column",gap:"nano",children:[M.jsx(ye,{children:M.jsx(Ae,{color:"secondary-dark","data-testid":`category-card-icon-${i.id}`,image:i.attributes.icon,size:"xxxl"})}),M.jsx(ye,{children:M.jsx(bt,{className:"color__neutral--80","data-testid":`category-card-title-${i.id}`,type:"heading-6",children:i.attributes.name})})]}),M.jsx(Ne,{vertical:"nano"})]})})},i.id))})})]})};var ce=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function jc(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function s(){return this instanceof s?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(s){var n=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(r,s,n.get?n:{enumerable:!0,get:function(){return t[s]}})}),r}var tn={exports:{}},Go={},it={},fr={},mr={},ie={},gr={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(h){if(super(),!t.IDENTIFIER.test(h))throw new Error("CodeGen: name must be a valid identifier");this.str=h}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class s extends e{constructor(h){super(),this._items=typeof h=="string"?[h]:h}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const h=this._items[0];return h===""||h==='""'}get str(){var h;return(h=this._str)!==null&&h!==void 0?h:this._str=this._items.reduce((b,w)=>`${b}${w}`,"")}get names(){var h;return(h=this._names)!==null&&h!==void 0?h:this._names=this._items.reduce((b,w)=>(w instanceof r&&(b[w.str]=(b[w.str]||0)+1),b),{})}}t._Code=s,t.nil=new s("");function n(y,...h){const b=[y[0]];let w=0;for(;w<h.length;)l(b,h[w]),b.push(y[++w]);return new s(b)}t._=n;const a=new s("+");function i(y,...h){const b=[_(y[0])];let w=0;for(;w<h.length;)b.push(a),l(b,h[w]),b.push(a,_(y[++w]));return d(b),new s(b)}t.str=i;function l(y,h){h instanceof s?y.push(...h._items):h instanceof r?y.push(h):y.push(f(h))}t.addCodeArg=l;function d(y){let h=1;for(;h<y.length-1;){if(y[h]===a){const b=o(y[h-1],y[h+1]);if(b!==void 0){y.splice(h-1,3,b);continue}y[h++]="+"}h++}}function o(y,h){if(h==='""')return y;if(y==='""')return h;if(typeof y=="string")return h instanceof r||y[y.length-1]!=='"'?void 0:typeof h!="string"?`${y.slice(0,-1)}${h}"`:h[0]==='"'?y.slice(0,-1)+h.slice(1):void 0;if(typeof h=="string"&&h[0]==='"'&&!(y instanceof r))return`"${y}${h.slice(1)}`}function u(y,h){return h.emptyStr()?y:y.emptyStr()?h:i`${y}${h}`}t.strConcat=u;function f(y){return typeof y=="number"||typeof y=="boolean"||y===null?y:_(Array.isArray(y)?y.join(","):y)}function m(y){return new s(_(y))}t.stringify=m;function _(y){return JSON.stringify(y).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=_;function g(y){return typeof y=="string"&&t.IDENTIFIER.test(y)?new s(`.${y}`):n`[${y}]`}t.getProperty=g;function v(y){if(typeof y=="string"&&t.IDENTIFIER.test(y))return new s(`${y}`);throw new Error(`CodeGen: invalid export name: ${y}, use explicit $id name mapping`)}t.getEsmExportName=v;function p(y){return new s(y.toString())}t.regexpCode=p})(gr);var rn={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=gr;class r extends Error{constructor(o){super(`CodeGen: "code" for ${o} not defined`),this.value=o.value}}var s;(function(d){d[d.Started=0]="Started",d[d.Completed=1]="Completed"})(s||(t.UsedValueState=s={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class n{constructor({prefixes:o,parent:u}={}){this._names={},this._prefixes=o,this._parent=u}toName(o){return o instanceof e.Name?o:this.name(o)}name(o){return new e.Name(this._newName(o))}_newName(o){const u=this._names[o]||this._nameGroup(o);return`${o}${u.index++}`}_nameGroup(o){var u,f;if(!((f=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||f===void 0)&&f.has(o)||this._prefixes&&!this._prefixes.has(o))throw new Error(`CodeGen: prefix "${o}" is not allowed in this scope`);return this._names[o]={prefix:o,index:0}}}t.Scope=n;class a extends e.Name{constructor(o,u){super(u),this.prefix=o}setValue(o,{property:u,itemIndex:f}){this.value=o,this.scopePath=(0,e._)`.${new e.Name(u)}[${f}]`}}t.ValueScopeName=a;const i=(0,e._)`\n`;class l extends n{constructor(o){super(o),this._values={},this._scope=o.scope,this.opts={...o,_n:o.lines?i:e.nil}}get(){return this._scope}name(o){return new a(o,this._newName(o))}value(o,u){var f;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const m=this.toName(o),{prefix:_}=m,g=(f=u.key)!==null&&f!==void 0?f:u.ref;let v=this._values[_];if(v){const h=v.get(g);if(h)return h}else v=this._values[_]=new Map;v.set(g,m);const p=this._scope[_]||(this._scope[_]=[]),y=p.length;return p[y]=u.ref,m.setValue(u,{property:_,itemIndex:y}),m}getValue(o,u){const f=this._values[o];if(f)return f.get(u)}scopeRefs(o,u=this._values){return this._reduceValues(u,f=>{if(f.scopePath===void 0)throw new Error(`CodeGen: name "${f}" has no value`);return(0,e._)`${o}${f.scopePath}`})}scopeCode(o=this._values,u,f){return this._reduceValues(o,m=>{if(m.value===void 0)throw new Error(`CodeGen: name "${m}" has no value`);return m.value.code},u,f)}_reduceValues(o,u,f={},m){let _=e.nil;for(const g in o){const v=o[g];if(!v)continue;const p=f[g]=f[g]||new Map;v.forEach(y=>{if(p.has(y))return;p.set(y,s.Started);let h=u(y);if(h){const b=this.opts.es5?t.varKinds.var:t.varKinds.const;_=(0,e._)`${_}${b} ${y} = ${h};${this.opts._n}`}else if(h=m==null?void 0:m(y))_=(0,e._)`${_}${h}${this.opts._n}`;else throw new r(y);p.set(y,s.Completed)})}return _}}t.ValueScope=l})(rn),function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const e=gr,r=rn;var s=gr;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return s.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return s.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return s.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return s.Name}});var n=rn;Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return n.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return n.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return n.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return n.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class a{optimizeNodes(){return this}optimizeNames(c,$){return this}}class i extends a{constructor(c,$,C){super(),this.varKind=c,this.name=$,this.rhs=C}render({es5:c,_n:$}){const C=c?r.varKinds.var:this.varKind,L=this.rhs===void 0?"":` = ${this.rhs}`;return`${C} ${this.name}${L};`+$}optimizeNames(c,$){if(c[this.name.str])return this.rhs&&(this.rhs=H(this.rhs,c,$)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class l extends a{constructor(c,$,C){super(),this.lhs=c,this.rhs=$,this.sideEffects=C}render({_n:c}){return`${this.lhs} = ${this.rhs};`+c}optimizeNames(c,$){if(!(this.lhs instanceof e.Name&&!c[this.lhs.str]&&!this.sideEffects))return this.rhs=H(this.rhs,c,$),this}get names(){const c=this.lhs instanceof e.Name?{}:{...this.lhs.names};return R(c,this.rhs)}}class d extends l{constructor(c,$,C,L){super(c,C,L),this.op=$}render({_n:c}){return`${this.lhs} ${this.op}= ${this.rhs};`+c}}class o extends a{constructor(c){super(),this.label=c,this.names={}}render({_n:c}){return`${this.label}:`+c}}class u extends a{constructor(c){super(),this.label=c,this.names={}}render({_n:c}){return`break${this.label?` ${this.label}`:""};`+c}}class f extends a{constructor(c){super(),this.error=c}render({_n:c}){return`throw ${this.error};`+c}get names(){return this.error.names}}class m extends a{constructor(c){super(),this.code=c}render({_n:c}){return`${this.code};`+c}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(c,$){return this.code=H(this.code,c,$),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class _ extends a{constructor(c=[]){super(),this.nodes=c}render(c){return this.nodes.reduce(($,C)=>$+C.render(c),"")}optimizeNodes(){const{nodes:c}=this;let $=c.length;for(;$--;){const C=c[$].optimizeNodes();Array.isArray(C)?c.splice($,1,...C):C?c[$]=C:c.splice($,1)}return c.length>0?this:void 0}optimizeNames(c,$){const{nodes:C}=this;let L=C.length;for(;L--;){const F=C[L];F.optimizeNames(c,$)||(K(c,F.names),C.splice(L,1))}return C.length>0?this:void 0}get names(){return this.nodes.reduce((c,$)=>B(c,$.names),{})}}class g extends _{render(c){return"{"+c._n+super.render(c)+"}"+c._n}}class v extends _{}class p extends g{}p.kind="else";class y extends g{constructor(c,$){super($),this.condition=c}render(c){let $=`if(${this.condition})`+super.render(c);return this.else&&($+="else "+this.else.render(c)),$}optimizeNodes(){super.optimizeNodes();const c=this.condition;if(c===!0)return this.nodes;let $=this.else;if($){const C=$.optimizeNodes();$=this.else=Array.isArray(C)?new p(C):C}if($)return c===!1?$ instanceof y?$:$.nodes:this.nodes.length?this:new y(q(c),$ instanceof y?[$]:$.nodes);if(!(c===!1||!this.nodes.length))return this}optimizeNames(c,$){var C;if(this.else=(C=this.else)===null||C===void 0?void 0:C.optimizeNames(c,$),!!(super.optimizeNames(c,$)||this.else))return this.condition=H(this.condition,c,$),this}get names(){const c=super.names;return R(c,this.condition),this.else&&B(c,this.else.names),c}}y.kind="if";class h extends g{}h.kind="for";class b extends h{constructor(c){super(),this.iteration=c}render(c){return`for(${this.iteration})`+super.render(c)}optimizeNames(c,$){if(super.optimizeNames(c,$))return this.iteration=H(this.iteration,c,$),this}get names(){return B(super.names,this.iteration.names)}}class w extends h{constructor(c,$,C,L){super(),this.varKind=c,this.name=$,this.from=C,this.to=L}render(c){const $=c.es5?r.varKinds.var:this.varKind,{name:C,from:L,to:F}=this;return`for(${$} ${C}=${L}; ${C}<${F}; ${C}++)`+super.render(c)}get names(){const c=R(super.names,this.from);return R(c,this.to)}}class S extends h{constructor(c,$,C,L){super(),this.loop=c,this.varKind=$,this.name=C,this.iterable=L}render(c){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(c)}optimizeNames(c,$){if(super.optimizeNames(c,$))return this.iterable=H(this.iterable,c,$),this}get names(){return B(super.names,this.iterable.names)}}class O extends g{constructor(c,$,C){super(),this.name=c,this.args=$,this.async=C}render(c){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(c)}}O.kind="func";class I extends _{render(c){return"return "+super.render(c)}}I.kind="return";class j extends g{render(c){let $="try"+super.render(c);return this.catch&&($+=this.catch.render(c)),this.finally&&($+=this.finally.render(c)),$}optimizeNodes(){var c,$;return super.optimizeNodes(),(c=this.catch)===null||c===void 0||c.optimizeNodes(),($=this.finally)===null||$===void 0||$.optimizeNodes(),this}optimizeNames(c,$){var C,L;return super.optimizeNames(c,$),(C=this.catch)===null||C===void 0||C.optimizeNames(c,$),(L=this.finally)===null||L===void 0||L.optimizeNames(c,$),this}get names(){const c=super.names;return this.catch&&B(c,this.catch.names),this.finally&&B(c,this.finally.names),c}}class V extends g{constructor(c){super(),this.error=c}render(c){return`catch(${this.error})`+super.render(c)}}V.kind="catch";class D extends g{render(c){return"finally"+super.render(c)}}D.kind="finally";class T{constructor(c,$={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...$,_n:$.lines?`
|
|
21
21
|
`:""},this._extScope=c,this._scope=new r.Scope({parent:c}),this._nodes=[new v]}toString(){return this._root.render(this.opts)}name(c){return this._scope.name(c)}scopeName(c){return this._extScope.name(c)}scopeValue(c,$){const C=this._extScope.value(c,$);return(this._values[C.prefix]||(this._values[C.prefix]=new Set)).add(C),C}getScopeValue(c,$){return this._extScope.getValue(c,$)}scopeRefs(c){return this._extScope.scopeRefs(c,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(c,$,C,L){const F=this._scope.toName($);return C!==void 0&&L&&(this._constants[F.str]=C),this._leafNode(new i(c,F,C)),F}const(c,$,C){return this._def(r.varKinds.const,c,$,C)}let(c,$,C){return this._def(r.varKinds.let,c,$,C)}var(c,$,C){return this._def(r.varKinds.var,c,$,C)}assign(c,$,C){return this._leafNode(new l(c,$,C))}add(c,$){return this._leafNode(new d(c,t.operators.ADD,$))}code(c){return typeof c=="function"?c():c!==e.nil&&this._leafNode(new m(c)),this}object(...c){const $=["{"];for(const[C,L]of c)$.length>1&&$.push(","),$.push(C),(C!==L||this.opts.es5)&&($.push(":"),(0,e.addCodeArg)($,L));return $.push("}"),new e._Code($)}if(c,$,C){if(this._blockNode(new y(c)),$&&C)this.code($).else().code(C).endIf();else if($)this.code($).endIf();else if(C)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(c){return this._elseNode(new y(c))}else(){return this._elseNode(new p)}endIf(){return this._endBlockNode(y,p)}_for(c,$){return this._blockNode(c),$&&this.code($).endFor(),this}for(c,$){return this._for(new b(c),$)}forRange(c,$,C,L,F=this.opts.es5?r.varKinds.var:r.varKinds.let){const z=this._scope.toName(c);return this._for(new w(F,z,$,C),()=>L(z))}forOf(c,$,C,L=r.varKinds.const){const F=this._scope.toName(c);if(this.opts.es5){const z=$ instanceof e.Name?$:this.var("_arr",$);return this.forRange("_i",0,(0,e._)`${z}.length`,G=>{this.var(F,(0,e._)`${z}[${G}]`),C(F)})}return this._for(new S("of",L,F,$),()=>C(F))}forIn(c,$,C,L=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(c,(0,e._)`Object.keys(${$})`,C);const F=this._scope.toName(c);return this._for(new S("in",L,F,$),()=>C(F))}endFor(){return this._endBlockNode(h)}label(c){return this._leafNode(new o(c))}break(c){return this._leafNode(new u(c))}return(c){const $=new I;if(this._blockNode($),this.code(c),$.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(I)}try(c,$,C){if(!$&&!C)throw new Error('CodeGen: "try" without "catch" and "finally"');const L=new j;if(this._blockNode(L),this.code(c),$){const F=this.name("e");this._currNode=L.catch=new V(F),$(F)}return C&&(this._currNode=L.finally=new D,this.code(C)),this._endBlockNode(V,D)}throw(c){return this._leafNode(new f(c))}block(c,$){return this._blockStarts.push(this._nodes.length),c&&this.code(c).endBlock($),this}endBlock(c){const $=this._blockStarts.pop();if($===void 0)throw new Error("CodeGen: not in self-balancing block");const C=this._nodes.length-$;if(C<0||c!==void 0&&C!==c)throw new Error(`CodeGen: wrong number of nodes: ${C} vs ${c} expected`);return this._nodes.length=$,this}func(c,$=e.nil,C,L){return this._blockNode(new O(c,$,C)),L&&this.code(L).endFunc(),this}endFunc(){return this._endBlockNode(O)}optimize(c=1){for(;c-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(c){return this._currNode.nodes.push(c),this}_blockNode(c){this._currNode.nodes.push(c),this._nodes.push(c)}_endBlockNode(c,$){const C=this._currNode;if(C instanceof c||$&&C instanceof $)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${$?`${c.kind}/${$.kind}`:c.kind}"`)}_elseNode(c){const $=this._currNode;if(!($ instanceof y))throw new Error('CodeGen: "else" without "if"');return this._currNode=$.else=c,this}get _root(){return this._nodes[0]}get _currNode(){const c=this._nodes;return c[c.length-1]}set _currNode(c){const $=this._nodes;$[$.length-1]=c}}t.CodeGen=T;function B(E,c){for(const $ in c)E[$]=(E[$]||0)+(c[$]||0);return E}function R(E,c){return c instanceof e._CodeOrName?B(E,c.names):E}function H(E,c,$){if(E instanceof e.Name)return C(E);if(!L(E))return E;return new e._Code(E._items.reduce((F,z)=>(z instanceof e.Name&&(z=C(z)),z instanceof e._Code?F.push(...z._items):F.push(z),F),[]));function C(F){const z=$[F.str];return z===void 0||c[F.str]!==1?F:(delete c[F.str],z)}function L(F){return F instanceof e._Code&&F._items.some(z=>z instanceof e.Name&&c[z.str]===1&&$[z.str]!==void 0)}}function K(E,c){for(const $ in c)E[$]=(E[$]||0)-(c[$]||0)}function q(E){return typeof E=="boolean"||typeof E=="number"||E===null?!E:(0,e._)`!${x(E)}`}t.not=q;const se=k(t.operators.AND);function Z(...E){return E.reduce(se)}t.and=Z;const ne=k(t.operators.OR);function P(...E){return E.reduce(ne)}t.or=P;function k(E){return(c,$)=>c===e.nil?$:$===e.nil?c:(0,e._)`${x(c)} ${E} ${x($)}`}function x(E){return E instanceof e.Name?E:(0,e._)`(${E})`}}(ie);var Y={};Object.defineProperty(Y,"__esModule",{value:!0}),Y.checkStrictMode=Y.getErrorPath=Y.Type=Y.useFunc=Y.setEvaluated=Y.evaluatedPropsToName=Y.mergeEvaluated=Y.eachItem=Y.unescapeJsonPointer=Y.escapeJsonPointer=Y.escapeFragment=Y.unescapeFragment=Y.schemaRefOrVal=Y.schemaHasRulesButRef=Y.schemaHasRules=Y.checkUnknownRules=Y.alwaysValidSchema=Y.toHash=void 0;const ve=ie,Rc=gr;function Lc(t){const e={};for(const r of t)e[r]=!0;return e}Y.toHash=Lc;function Vc(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Wo(t,e),!Ko(e,t.self.RULES.all))}Y.alwaysValidSchema=Vc;function Wo(t,e=t.schema){const{opts:r,self:s}=t;if(!r.strictSchema||typeof e=="boolean")return;const n=s.RULES.keywords;for(const a in e)n[a]||Jo(t,`unknown keyword: "${a}"`)}Y.checkUnknownRules=Wo;function Ko(t,e){if(typeof t=="boolean")return!t;for(const r in t)if(e[r])return!0;return!1}Y.schemaHasRules=Ko;function zc(t,e){if(typeof t=="boolean")return!t;for(const r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}Y.schemaHasRulesButRef=zc;function Hc({topSchemaRef:t,schemaPath:e},r,s,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,ve._)`${r}`}return(0,ve._)`${t}${e}${(0,ve.getProperty)(s)}`}Y.schemaRefOrVal=Hc;function Uc(t){return qo(decodeURIComponent(t))}Y.unescapeFragment=Uc;function Gc(t){return encodeURIComponent(sn(t))}Y.escapeFragment=Gc;function sn(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}Y.escapeJsonPointer=sn;function qo(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}Y.unescapeJsonPointer=qo;function Wc(t,e){if(Array.isArray(t))for(const r of t)e(r);else e(t)}Y.eachItem=Wc;function Xo({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:s}){return(n,a,i,l)=>{const d=i===void 0?a:i instanceof ve.Name?(a instanceof ve.Name?t(n,a,i):e(n,a,i),i):a instanceof ve.Name?(e(n,i,a),a):r(a,i);return l===ve.Name&&!(d instanceof ve.Name)?s(n,d):d}}Y.mergeEvaluated={props:Xo({mergeNames:(t,e,r)=>t.if((0,ve._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,ve._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,ve._)`${r} || {}`).code((0,ve._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,ve._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,ve._)`${r} || {}`),nn(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:Yo}),items:Xo({mergeNames:(t,e,r)=>t.if((0,ve._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,ve._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,ve._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,ve._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function Yo(t,e){if(e===!0)return t.var("props",!0);const r=t.var("props",(0,ve._)`{}`);return e!==void 0&&nn(t,r,e),r}Y.evaluatedPropsToName=Yo;function nn(t,e,r){Object.keys(r).forEach(s=>t.assign((0,ve._)`${e}${(0,ve.getProperty)(s)}`,!0))}Y.setEvaluated=nn;const Zo={};function Kc(t,e){return t.scopeValue("func",{ref:e,code:Zo[e.code]||(Zo[e.code]=new Rc._Code(e.code))})}Y.useFunc=Kc;var an;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(an||(Y.Type=an={}));function qc(t,e,r){if(t instanceof ve.Name){const s=e===an.Num;return r?s?(0,ve._)`"[" + ${t} + "]"`:(0,ve._)`"['" + ${t} + "']"`:s?(0,ve._)`"/" + ${t}`:(0,ve._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,ve.getProperty)(t).toString():"/"+sn(t)}Y.getErrorPath=qc;function Jo(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}Y.checkStrictMode=Jo;var mt={};Object.defineProperty(mt,"__esModule",{value:!0});const Ve=ie,Xc={data:new Ve.Name("data"),valCxt:new Ve.Name("valCxt"),instancePath:new Ve.Name("instancePath"),parentData:new Ve.Name("parentData"),parentDataProperty:new Ve.Name("parentDataProperty"),rootData:new Ve.Name("rootData"),dynamicAnchors:new Ve.Name("dynamicAnchors"),vErrors:new Ve.Name("vErrors"),errors:new Ve.Name("errors"),this:new Ve.Name("this"),self:new Ve.Name("self"),scope:new Ve.Name("scope"),json:new Ve.Name("json"),jsonPos:new Ve.Name("jsonPos"),jsonLen:new Ve.Name("jsonLen"),jsonPart:new Ve.Name("jsonPart")};mt.default=Xc,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const e=ie,r=Y,s=mt;t.keywordError={message:({keyword:p})=>(0,e.str)`must pass "${p}" keyword validation`},t.keyword$DataError={message:({keyword:p,schemaType:y})=>y?(0,e.str)`"${p}" keyword must be ${y} ($data)`:(0,e.str)`"${p}" keyword is invalid ($data)`};function n(p,y=t.keywordError,h,b){const{it:w}=p,{gen:S,compositeRule:O,allErrors:I}=w,j=f(p,y,h);b??(O||I)?d(S,j):o(w,(0,e._)`[${j}]`)}t.reportError=n;function a(p,y=t.keywordError,h){const{it:b}=p,{gen:w,compositeRule:S,allErrors:O}=b,I=f(p,y,h);d(w,I),S||O||o(b,s.default.vErrors)}t.reportExtraError=a;function i(p,y){p.assign(s.default.errors,y),p.if((0,e._)`${s.default.vErrors} !== null`,()=>p.if(y,()=>p.assign((0,e._)`${s.default.vErrors}.length`,y),()=>p.assign(s.default.vErrors,null)))}t.resetErrorsCount=i;function l({gen:p,keyword:y,schemaValue:h,data:b,errsCount:w,it:S}){if(w===void 0)throw new Error("ajv implementation error");const O=p.name("err");p.forRange("i",w,s.default.errors,I=>{p.const(O,(0,e._)`${s.default.vErrors}[${I}]`),p.if((0,e._)`${O}.instancePath === undefined`,()=>p.assign((0,e._)`${O}.instancePath`,(0,e.strConcat)(s.default.instancePath,S.errorPath))),p.assign((0,e._)`${O}.schemaPath`,(0,e.str)`${S.errSchemaPath}/${y}`),S.opts.verbose&&(p.assign((0,e._)`${O}.schema`,h),p.assign((0,e._)`${O}.data`,b))})}t.extendErrors=l;function d(p,y){const h=p.const("err",y);p.if((0,e._)`${s.default.vErrors} === null`,()=>p.assign(s.default.vErrors,(0,e._)`[${h}]`),(0,e._)`${s.default.vErrors}.push(${h})`),p.code((0,e._)`${s.default.errors}++`)}function o(p,y){const{gen:h,validateName:b,schemaEnv:w}=p;w.$async?h.throw((0,e._)`new ${p.ValidationError}(${y})`):(h.assign((0,e._)`${b}.errors`,y),h.return(!1))}const u={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function f(p,y,h){const{createErrors:b}=p.it;return b===!1?(0,e._)`{}`:m(p,y,h)}function m(p,y,h={}){const{gen:b,it:w}=p,S=[_(w,h),g(p,h)];return v(p,y,S),b.object(...S)}function _({errorPath:p},{instancePath:y}){const h=y?(0,e.str)`${p}${(0,r.getErrorPath)(y,r.Type.Str)}`:p;return[s.default.instancePath,(0,e.strConcat)(s.default.instancePath,h)]}function g({keyword:p,it:{errSchemaPath:y}},{schemaPath:h,parentSchema:b}){let w=b?y:(0,e.str)`${y}/${p}`;return h&&(w=(0,e.str)`${w}${(0,r.getErrorPath)(h,r.Type.Str)}`),[u.schemaPath,w]}function v(p,{params:y,message:h},b){const{keyword:w,data:S,schemaValue:O,it:I}=p,{opts:j,propertyName:V,topSchemaRef:D,schemaPath:T}=I;b.push([u.keyword,w],[u.params,typeof y=="function"?y(p):y||(0,e._)`{}`]),j.messages&&b.push([u.message,typeof h=="function"?h(p):h]),j.verbose&&b.push([u.schema,O],[u.parentSchema,(0,e._)`${D}${T}`],[s.default.data,S]),V&&b.push([u.propertyName,V])}}(mr),Object.defineProperty(fr,"__esModule",{value:!0}),fr.boolOrEmptySchema=fr.topBoolOrEmptySchema=void 0;const Yc=mr,Zc=ie,Jc=mt,Qc={message:"boolean schema is false"};function ed(t){const{gen:e,schema:r,validateName:s}=t;r===!1?Qo(t,!1):typeof r=="object"&&r.$async===!0?e.return(Jc.default.data):(e.assign((0,Zc._)`${s}.errors`,null),e.return(!0))}fr.topBoolOrEmptySchema=ed;function td(t,e){const{gen:r,schema:s}=t;s===!1?(r.var(e,!1),Qo(t)):r.var(e,!0)}fr.boolOrEmptySchema=td;function Qo(t,e){const{gen:r,data:s}=t,n={gen:r,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,Yc.reportError)(n,Qc,void 0,e)}var Ce={},Qt={};Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.getRules=Qt.isJSONType=void 0;const rd=["string","number","integer","boolean","null","object","array"],sd=new Set(rd);function nd(t){return typeof t=="string"&&sd.has(t)}Qt.isJSONType=nd;function ad(){const t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}Qt.getRules=ad;var Nt={};Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.shouldUseRule=Nt.shouldUseGroup=Nt.schemaHasRulesForType=void 0;function od({schema:t,self:e},r){const s=e.RULES.types[r];return s&&s!==!0&&ei(t,s)}Nt.schemaHasRulesForType=od;function ei(t,e){return e.rules.some(r=>ti(t,r))}Nt.shouldUseGroup=ei;function ti(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(s=>t[s]!==void 0))}Nt.shouldUseRule=ti,Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.reportTypeError=Ce.checkDataTypes=Ce.checkDataType=Ce.coerceAndCheckDataType=Ce.getJSONTypes=Ce.getSchemaTypes=Ce.DataType=void 0;const id=Qt,ld=Nt,ud=mr,le=ie,ri=Y;var yr;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(yr||(Ce.DataType=yr={}));function cd(t){const e=si(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}Ce.getSchemaTypes=cd;function si(t){const e=Array.isArray(t)?t:t?[t]:[];if(e.every(id.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Ce.getJSONTypes=si;function dd(t,e){const{gen:r,data:s,opts:n}=t,a=hd(e,n.coerceTypes),i=e.length>0&&!(a.length===0&&e.length===1&&(0,ld.schemaHasRulesForType)(t,e[0]));if(i){const l=ln(e,s,n.strictNumbers,yr.Wrong);r.if(l,()=>{a.length?pd(t,e,a):un(t)})}return i}Ce.coerceAndCheckDataType=dd;const ni=new Set(["string","number","integer","boolean","null"]);function hd(t,e){return e?t.filter(r=>ni.has(r)||e==="array"&&r==="array"):[]}function pd(t,e,r){const{gen:s,data:n,opts:a}=t,i=s.let("dataType",(0,le._)`typeof ${n}`),l=s.let("coerced",(0,le._)`undefined`);a.coerceTypes==="array"&&s.if((0,le._)`${i} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>s.assign(n,(0,le._)`${n}[0]`).assign(i,(0,le._)`typeof ${n}`).if(ln(e,n,a.strictNumbers),()=>s.assign(l,n))),s.if((0,le._)`${l} !== undefined`);for(const o of r)(ni.has(o)||o==="array"&&a.coerceTypes==="array")&&d(o);s.else(),un(t),s.endIf(),s.if((0,le._)`${l} !== undefined`,()=>{s.assign(n,l),fd(t,l)});function d(o){switch(o){case"string":s.elseIf((0,le._)`${i} == "number" || ${i} == "boolean"`).assign(l,(0,le._)`"" + ${n}`).elseIf((0,le._)`${n} === null`).assign(l,(0,le._)`""`);return;case"number":s.elseIf((0,le._)`${i} == "boolean" || ${n} === null
|
|
22
22
|
|| (${i} == "string" && ${n} && ${n} == +${n})`).assign(l,(0,le._)`+${n}`);return;case"integer":s.elseIf((0,le._)`${i} === "boolean" || ${n} === null
|
|
23
23
|
|| (${i} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(l,(0,le._)`+${n}`);return;case"boolean":s.elseIf((0,le._)`${n} === "false" || ${n} === 0 || ${n} === null`).assign(l,!1).elseIf((0,le._)`${n} === "true" || ${n} === 1`).assign(l,!0);return;case"null":s.elseIf((0,le._)`${n} === "" || ${n} === 0 || ${n} === false`),s.assign(l,null);return;case"array":s.elseIf((0,le._)`${i} === "string" || ${i} === "number"
|
|
@@ -38,4 +38,4 @@ Valid keys: `+JSON.stringify(Object.keys(P),null," "));var U=J(L,G,c,$,C+"."+G,
|
|
|
38
38
|
* derived from CryptoJS.mode.CTR
|
|
39
39
|
* Jan Hruby jhruby.web@gmail.com
|
|
40
40
|
*/return r.mode.CTRGladman=function(){var s=r.lib.BlockCipherMode.extend();function n(l){if((l>>24&255)===255){var d=l>>16&255,o=l>>8&255,u=l&255;d===255?(d=0,o===255?(o=0,u===255?u=0:++u):++o):++d,l=0,l+=d<<16,l+=o<<8,l+=u}else l+=1<<24;return l}function a(l){return(l[0]=n(l[0]))===0&&(l[1]=n(l[1])),l}var i=s.Encryptor=s.extend({processBlock:function(l,d){var o=this._cipher,u=o.blockSize,f=this._iv,m=this._counter;f&&(m=this._counter=f.slice(0),this._iv=void 0),a(m);var _=m.slice(0);o.encryptBlock(_,0);for(var g=0;g<u;g++)l[d+g]^=_[g]}});return s.Decryptor=i,s}(),r.mode.CTRGladman})}(iu)),iu.exports}var uu={exports:{}},cu;function G0(){return cu||(cu=1,function(t,e){(function(r,s,n){t.exports=s(pe(),Ie())})(ce,function(r){return r.mode.OFB=function(){var s=r.lib.BlockCipherMode.extend(),n=s.Encryptor=s.extend({processBlock:function(a,i){var l=this._cipher,d=l.blockSize,o=this._iv,u=this._keystream;o&&(u=this._keystream=o.slice(0),this._iv=void 0),l.encryptBlock(u,0);for(var f=0;f<d;f++)a[i+f]^=u[f]}});return s.Decryptor=n,s}(),r.mode.OFB})}(uu)),uu.exports}var du={exports:{}},hu;function W0(){return hu||(hu=1,function(t,e){(function(r,s,n){t.exports=s(pe(),Ie())})(ce,function(r){return r.mode.ECB=function(){var s=r.lib.BlockCipherMode.extend();return s.Encryptor=s.extend({processBlock:function(n,a){this._cipher.encryptBlock(n,a)}}),s.Decryptor=s.extend({processBlock:function(n,a){this._cipher.decryptBlock(n,a)}}),s}(),r.mode.ECB})}(du)),du.exports}var pu={exports:{}},fu;function K0(){return fu||(fu=1,function(t,e){(function(r,s,n){t.exports=s(pe(),Ie())})(ce,function(r){return r.pad.AnsiX923={pad:function(s,n){var a=s.sigBytes,i=n*4,l=i-a%i,d=a+l-1;s.clamp(),s.words[d>>>2]|=l<<24-d%4*8,s.sigBytes+=l},unpad:function(s){var n=s.words[s.sigBytes-1>>>2]&255;s.sigBytes-=n}},r.pad.Ansix923})}(pu)),pu.exports}var mu={exports:{}},gu;function q0(){return gu||(gu=1,function(t,e){(function(r,s,n){t.exports=s(pe(),Ie())})(ce,function(r){return r.pad.Iso10126={pad:function(s,n){var a=n*4,i=a-s.sigBytes%a;s.concat(r.lib.WordArray.random(i-1)).concat(r.lib.WordArray.create([i<<24],1))},unpad:function(s){var n=s.words[s.sigBytes-1>>>2]&255;s.sigBytes-=n}},r.pad.Iso10126})}(mu)),mu.exports}var yu={exports:{}},vu;function X0(){return vu||(vu=1,function(t,e){(function(r,s,n){t.exports=s(pe(),Ie())})(ce,function(r){return r.pad.Iso97971={pad:function(s,n){s.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(s,n)},unpad:function(s){r.pad.ZeroPadding.unpad(s),s.sigBytes--}},r.pad.Iso97971})}(yu)),yu.exports}var _u={exports:{}},bu;function Y0(){return bu||(bu=1,function(t,e){(function(r,s,n){t.exports=s(pe(),Ie())})(ce,function(r){return r.pad.ZeroPadding={pad:function(s,n){var a=n*4;s.clamp(),s.sigBytes+=a-(s.sigBytes%a||a)},unpad:function(s){for(var n=s.words,a=s.sigBytes-1,a=s.sigBytes-1;a>=0;a--)if(n[a>>>2]>>>24-a%4*8&255){s.sigBytes=a+1;break}}},r.pad.ZeroPadding})}(_u)),_u.exports}var ku={exports:{}},wu;function Z0(){return wu||(wu=1,function(t,e){(function(r,s,n){t.exports=s(pe(),Ie())})(ce,function(r){return r.pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding})}(ku)),ku.exports}var $u={exports:{}},Eu;function J0(){return Eu||(Eu=1,function(t,e){(function(r,s,n){t.exports=s(pe(),Ie())})(ce,function(r){return function(s){var n=r,a=n.lib,i=a.CipherParams,l=n.enc,d=l.Hex,o=n.format;o.Hex={stringify:function(u){return u.ciphertext.toString(d)},parse:function(u){var f=d.parse(u);return i.create({ciphertext:f})}}}(),r.format.Hex})}($u)),$u.exports}var Su={exports:{}},xu;function Q0(){return xu||(xu=1,function(t,e){(function(r,s,n){t.exports=s(pe(),ar(),or(),Ut(),Ie())})(ce,function(r){return function(){var s=r,n=s.lib,a=n.BlockCipher,i=s.algo,l=[],d=[],o=[],u=[],f=[],m=[],_=[],g=[],v=[],p=[];(function(){for(var b=[],w=0;w<256;w++)w<128?b[w]=w<<1:b[w]=w<<1^283;for(var S=0,O=0,w=0;w<256;w++){var I=O^O<<1^O<<2^O<<3^O<<4;I=I>>>8^I&255^99,l[S]=I,d[I]=S;var j=b[S],V=b[j],D=b[V],T=b[I]*257^I*16843008;o[S]=T<<24|T>>>8,u[S]=T<<16|T>>>16,f[S]=T<<8|T>>>24,m[S]=T;var T=D*16843009^V*65537^j*257^S*16843008;_[I]=T<<24|T>>>8,g[I]=T<<16|T>>>16,v[I]=T<<8|T>>>24,p[I]=T,S?(S=j^b[b[b[D^j]]],O^=b[b[O]]):S=O=1}})();var y=[0,1,2,4,8,16,32,64,128,27,54],h=i.AES=a.extend({_doReset:function(){var b;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var w=this._keyPriorReset=this._key,S=w.words,O=w.sigBytes/4,I=this._nRounds=O+6,j=(I+1)*4,V=this._keySchedule=[],D=0;D<j;D++)D<O?V[D]=S[D]:(b=V[D-1],D%O?O>6&&D%O==4&&(b=l[b>>>24]<<24|l[b>>>16&255]<<16|l[b>>>8&255]<<8|l[b&255]):(b=b<<8|b>>>24,b=l[b>>>24]<<24|l[b>>>16&255]<<16|l[b>>>8&255]<<8|l[b&255],b^=y[D/O|0]<<24),V[D]=V[D-O]^b);for(var T=this._invKeySchedule=[],B=0;B<j;B++){var D=j-B;if(B%4)var b=V[D];else var b=V[D-4];B<4||D<=4?T[B]=b:T[B]=_[l[b>>>24]]^g[l[b>>>16&255]]^v[l[b>>>8&255]]^p[l[b&255]]}}},encryptBlock:function(b,w){this._doCryptBlock(b,w,this._keySchedule,o,u,f,m,l)},decryptBlock:function(b,w){var S=b[w+1];b[w+1]=b[w+3],b[w+3]=S,this._doCryptBlock(b,w,this._invKeySchedule,_,g,v,p,d);var S=b[w+1];b[w+1]=b[w+3],b[w+3]=S},_doCryptBlock:function(b,w,S,O,I,j,V,D){for(var T=this._nRounds,B=b[w]^S[0],R=b[w+1]^S[1],H=b[w+2]^S[2],K=b[w+3]^S[3],q=4,se=1;se<T;se++){var Z=O[B>>>24]^I[R>>>16&255]^j[H>>>8&255]^V[K&255]^S[q++],ne=O[R>>>24]^I[H>>>16&255]^j[K>>>8&255]^V[B&255]^S[q++],P=O[H>>>24]^I[K>>>16&255]^j[B>>>8&255]^V[R&255]^S[q++],k=O[K>>>24]^I[B>>>16&255]^j[R>>>8&255]^V[H&255]^S[q++];B=Z,R=ne,H=P,K=k}var Z=(D[B>>>24]<<24|D[R>>>16&255]<<16|D[H>>>8&255]<<8|D[K&255])^S[q++],ne=(D[R>>>24]<<24|D[H>>>16&255]<<16|D[K>>>8&255]<<8|D[B&255])^S[q++],P=(D[H>>>24]<<24|D[K>>>16&255]<<16|D[B>>>8&255]<<8|D[R&255])^S[q++],k=(D[K>>>24]<<24|D[B>>>16&255]<<16|D[R>>>8&255]<<8|D[H&255])^S[q++];b[w]=Z,b[w+1]=ne,b[w+2]=P,b[w+3]=k},keySize:256/32});s.AES=a._createHelper(h)}(),r.AES})}(Su)),Su.exports}var Au={exports:{}},Cu;function e1(){return Cu||(Cu=1,function(t,e){(function(r,s,n){t.exports=s(pe(),ar(),or(),Ut(),Ie())})(ce,function(r){return function(){var s=r,n=s.lib,a=n.WordArray,i=n.BlockCipher,l=s.algo,d=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],o=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],f=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],m=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],_=l.DES=i.extend({_doReset:function(){for(var y=this._key,h=y.words,b=[],w=0;w<56;w++){var S=d[w]-1;b[w]=h[S>>>5]>>>31-S%32&1}for(var O=this._subKeys=[],I=0;I<16;I++){for(var j=O[I]=[],V=u[I],w=0;w<24;w++)j[w/6|0]|=b[(o[w]-1+V)%28]<<31-w%6,j[4+(w/6|0)]|=b[28+(o[w+24]-1+V)%28]<<31-w%6;j[0]=j[0]<<1|j[0]>>>31;for(var w=1;w<7;w++)j[w]=j[w]>>>(w-1)*4+3;j[7]=j[7]<<5|j[7]>>>27}for(var D=this._invSubKeys=[],w=0;w<16;w++)D[w]=O[15-w]},encryptBlock:function(y,h){this._doCryptBlock(y,h,this._subKeys)},decryptBlock:function(y,h){this._doCryptBlock(y,h,this._invSubKeys)},_doCryptBlock:function(y,h,b){this._lBlock=y[h],this._rBlock=y[h+1],g.call(this,4,252645135),g.call(this,16,65535),v.call(this,2,858993459),v.call(this,8,16711935),g.call(this,1,1431655765);for(var w=0;w<16;w++){for(var S=b[w],O=this._lBlock,I=this._rBlock,j=0,V=0;V<8;V++)j|=f[V][((I^S[V])&m[V])>>>0];this._lBlock=I,this._rBlock=O^j}var D=this._lBlock;this._lBlock=this._rBlock,this._rBlock=D,g.call(this,1,1431655765),v.call(this,8,16711935),v.call(this,2,858993459),g.call(this,16,65535),g.call(this,4,252645135),y[h]=this._lBlock,y[h+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function g(y,h){var b=(this._lBlock>>>y^this._rBlock)&h;this._rBlock^=b,this._lBlock^=b<<y}function v(y,h){var b=(this._rBlock>>>y^this._lBlock)&h;this._lBlock^=b,this._rBlock^=b<<y}s.DES=i._createHelper(_);var p=l.TripleDES=i.extend({_doReset:function(){var y=this._key,h=y.words;if(h.length!==2&&h.length!==4&&h.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var b=h.slice(0,2),w=h.length<4?h.slice(0,2):h.slice(2,4),S=h.length<6?h.slice(0,2):h.slice(4,6);this._des1=_.createEncryptor(a.create(b)),this._des2=_.createEncryptor(a.create(w)),this._des3=_.createEncryptor(a.create(S))},encryptBlock:function(y,h){this._des1.encryptBlock(y,h),this._des2.decryptBlock(y,h),this._des3.encryptBlock(y,h)},decryptBlock:function(y,h){this._des3.decryptBlock(y,h),this._des2.encryptBlock(y,h),this._des1.decryptBlock(y,h)},keySize:192/32,ivSize:64/32,blockSize:64/32});s.TripleDES=i._createHelper(p)}(),r.TripleDES})}(Au)),Au.exports}var Tu={exports:{}},Ou;function t1(){return Ou||(Ou=1,function(t,e){(function(r,s,n){t.exports=s(pe(),ar(),or(),Ut(),Ie())})(ce,function(r){return function(){var s=r,n=s.lib,a=n.StreamCipher,i=s.algo,l=i.RC4=a.extend({_doReset:function(){for(var u=this._key,f=u.words,m=u.sigBytes,_=this._S=[],g=0;g<256;g++)_[g]=g;for(var g=0,v=0;g<256;g++){var p=g%m,y=f[p>>>2]>>>24-p%4*8&255;v=(v+_[g]+y)%256;var h=_[g];_[g]=_[v],_[v]=h}this._i=this._j=0},_doProcessBlock:function(u,f){u[f]^=d.call(this)},keySize:256/32,ivSize:0});function d(){for(var u=this._S,f=this._i,m=this._j,_=0,g=0;g<4;g++){f=(f+1)%256,m=(m+u[f])%256;var v=u[f];u[f]=u[m],u[m]=v,_|=u[(u[f]+u[m])%256]<<24-g*8}return this._i=f,this._j=m,_}s.RC4=a._createHelper(l);var o=i.RC4Drop=l.extend({cfg:l.cfg.extend({drop:192}),_doReset:function(){l._doReset.call(this);for(var u=this.cfg.drop;u>0;u--)d.call(this)}});s.RC4Drop=a._createHelper(o)}(),r.RC4})}(Tu)),Tu.exports}var Pu={exports:{}},Nu;function r1(){return Nu||(Nu=1,function(t,e){(function(r,s,n){t.exports=s(pe(),ar(),or(),Ut(),Ie())})(ce,function(r){return function(){var s=r,n=s.lib,a=n.StreamCipher,i=s.algo,l=[],d=[],o=[],u=i.Rabbit=a.extend({_doReset:function(){for(var m=this._key.words,_=this.cfg.iv,g=0;g<4;g++)m[g]=(m[g]<<8|m[g]>>>24)&16711935|(m[g]<<24|m[g]>>>8)&4278255360;var v=this._X=[m[0],m[3]<<16|m[2]>>>16,m[1],m[0]<<16|m[3]>>>16,m[2],m[1]<<16|m[0]>>>16,m[3],m[2]<<16|m[1]>>>16],p=this._C=[m[2]<<16|m[2]>>>16,m[0]&4294901760|m[1]&65535,m[3]<<16|m[3]>>>16,m[1]&4294901760|m[2]&65535,m[0]<<16|m[0]>>>16,m[2]&4294901760|m[3]&65535,m[1]<<16|m[1]>>>16,m[3]&4294901760|m[0]&65535];this._b=0;for(var g=0;g<4;g++)f.call(this);for(var g=0;g<8;g++)p[g]^=v[g+4&7];if(_){var y=_.words,h=y[0],b=y[1],w=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360,S=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,O=w>>>16|S&4294901760,I=S<<16|w&65535;p[0]^=w,p[1]^=O,p[2]^=S,p[3]^=I,p[4]^=w,p[5]^=O,p[6]^=S,p[7]^=I;for(var g=0;g<4;g++)f.call(this)}},_doProcessBlock:function(m,_){var g=this._X;f.call(this),l[0]=g[0]^g[5]>>>16^g[3]<<16,l[1]=g[2]^g[7]>>>16^g[5]<<16,l[2]=g[4]^g[1]>>>16^g[7]<<16,l[3]=g[6]^g[3]>>>16^g[1]<<16;for(var v=0;v<4;v++)l[v]=(l[v]<<8|l[v]>>>24)&16711935|(l[v]<<24|l[v]>>>8)&4278255360,m[_+v]^=l[v]},blockSize:128/32,ivSize:64/32});function f(){for(var m=this._X,_=this._C,g=0;g<8;g++)d[g]=_[g];_[0]=_[0]+1295307597+this._b|0,_[1]=_[1]+3545052371+(_[0]>>>0<d[0]>>>0?1:0)|0,_[2]=_[2]+886263092+(_[1]>>>0<d[1]>>>0?1:0)|0,_[3]=_[3]+1295307597+(_[2]>>>0<d[2]>>>0?1:0)|0,_[4]=_[4]+3545052371+(_[3]>>>0<d[3]>>>0?1:0)|0,_[5]=_[5]+886263092+(_[4]>>>0<d[4]>>>0?1:0)|0,_[6]=_[6]+1295307597+(_[5]>>>0<d[5]>>>0?1:0)|0,_[7]=_[7]+3545052371+(_[6]>>>0<d[6]>>>0?1:0)|0,this._b=_[7]>>>0<d[7]>>>0?1:0;for(var g=0;g<8;g++){var v=m[g]+_[g],p=v&65535,y=v>>>16,h=((p*p>>>17)+p*y>>>15)+y*y,b=((v&4294901760)*v|0)+((v&65535)*v|0);o[g]=h^b}m[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,m[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,m[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,m[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,m[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,m[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,m[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,m[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}s.Rabbit=a._createHelper(u)}(),r.Rabbit})}(Pu)),Pu.exports}var Iu={exports:{}},Du;function s1(){return Du||(Du=1,function(t,e){(function(r,s,n){t.exports=s(pe(),ar(),or(),Ut(),Ie())})(ce,function(r){return function(){var s=r,n=s.lib,a=n.StreamCipher,i=s.algo,l=[],d=[],o=[],u=i.RabbitLegacy=a.extend({_doReset:function(){var m=this._key.words,_=this.cfg.iv,g=this._X=[m[0],m[3]<<16|m[2]>>>16,m[1],m[0]<<16|m[3]>>>16,m[2],m[1]<<16|m[0]>>>16,m[3],m[2]<<16|m[1]>>>16],v=this._C=[m[2]<<16|m[2]>>>16,m[0]&4294901760|m[1]&65535,m[3]<<16|m[3]>>>16,m[1]&4294901760|m[2]&65535,m[0]<<16|m[0]>>>16,m[2]&4294901760|m[3]&65535,m[1]<<16|m[1]>>>16,m[3]&4294901760|m[0]&65535];this._b=0;for(var p=0;p<4;p++)f.call(this);for(var p=0;p<8;p++)v[p]^=g[p+4&7];if(_){var y=_.words,h=y[0],b=y[1],w=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360,S=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,O=w>>>16|S&4294901760,I=S<<16|w&65535;v[0]^=w,v[1]^=O,v[2]^=S,v[3]^=I,v[4]^=w,v[5]^=O,v[6]^=S,v[7]^=I;for(var p=0;p<4;p++)f.call(this)}},_doProcessBlock:function(m,_){var g=this._X;f.call(this),l[0]=g[0]^g[5]>>>16^g[3]<<16,l[1]=g[2]^g[7]>>>16^g[5]<<16,l[2]=g[4]^g[1]>>>16^g[7]<<16,l[3]=g[6]^g[3]>>>16^g[1]<<16;for(var v=0;v<4;v++)l[v]=(l[v]<<8|l[v]>>>24)&16711935|(l[v]<<24|l[v]>>>8)&4278255360,m[_+v]^=l[v]},blockSize:128/32,ivSize:64/32});function f(){for(var m=this._X,_=this._C,g=0;g<8;g++)d[g]=_[g];_[0]=_[0]+1295307597+this._b|0,_[1]=_[1]+3545052371+(_[0]>>>0<d[0]>>>0?1:0)|0,_[2]=_[2]+886263092+(_[1]>>>0<d[1]>>>0?1:0)|0,_[3]=_[3]+1295307597+(_[2]>>>0<d[2]>>>0?1:0)|0,_[4]=_[4]+3545052371+(_[3]>>>0<d[3]>>>0?1:0)|0,_[5]=_[5]+886263092+(_[4]>>>0<d[4]>>>0?1:0)|0,_[6]=_[6]+1295307597+(_[5]>>>0<d[5]>>>0?1:0)|0,_[7]=_[7]+3545052371+(_[6]>>>0<d[6]>>>0?1:0)|0,this._b=_[7]>>>0<d[7]>>>0?1:0;for(var g=0;g<8;g++){var v=m[g]+_[g],p=v&65535,y=v>>>16,h=((p*p>>>17)+p*y>>>15)+y*y,b=((v&4294901760)*v|0)+((v&65535)*v|0);o[g]=h^b}m[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,m[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,m[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,m[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,m[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,m[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,m[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,m[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}s.RabbitLegacy=a._createHelper(u)}(),r.RabbitLegacy})}(Iu)),Iu.exports}var Mu={exports:{}},Fu;function n1(){return Fu||(Fu=1,function(t,e){(function(r,s,n){t.exports=s(pe(),ar(),or(),Ut(),Ie())})(ce,function(r){return function(){var s=r,n=s.lib,a=n.BlockCipher,i=s.algo;const l=16,d=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],o=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var u={pbox:[],sbox:[]};function f(p,y){let h=y>>24&255,b=y>>16&255,w=y>>8&255,S=y&255,O=p.sbox[0][h]+p.sbox[1][b];return O=O^p.sbox[2][w],O=O+p.sbox[3][S],O}function m(p,y,h){let b=y,w=h,S;for(let O=0;O<l;++O)b=b^p.pbox[O],w=f(p,b)^w,S=b,b=w,w=S;return S=b,b=w,w=S,w=w^p.pbox[l],b=b^p.pbox[l+1],{left:b,right:w}}function _(p,y,h){let b=y,w=h,S;for(let O=l+1;O>1;--O)b=b^p.pbox[O],w=f(p,b)^w,S=b,b=w,w=S;return S=b,b=w,w=S,w=w^p.pbox[1],b=b^p.pbox[0],{left:b,right:w}}function g(p,y,h){for(let I=0;I<4;I++){p.sbox[I]=[];for(let j=0;j<256;j++)p.sbox[I][j]=o[I][j]}let b=0;for(let I=0;I<l+2;I++)p.pbox[I]=d[I]^y[b],b++,b>=h&&(b=0);let w=0,S=0,O=0;for(let I=0;I<l+2;I+=2)O=m(p,w,S),w=O.left,S=O.right,p.pbox[I]=w,p.pbox[I+1]=S;for(let I=0;I<4;I++)for(let j=0;j<256;j+=2)O=m(p,w,S),w=O.left,S=O.right,p.sbox[I][j]=w,p.sbox[I][j+1]=S;return!0}var v=i.Blowfish=a.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var p=this._keyPriorReset=this._key,y=p.words,h=p.sigBytes/4;g(u,y,h)}},encryptBlock:function(p,y){var h=m(u,p[y],p[y+1]);p[y]=h.left,p[y+1]=h.right},decryptBlock:function(p,y){var h=_(u,p[y],p[y+1]);p[y]=h.left,p[y+1]=h.right},blockSize:64/32,keySize:128/32,ivSize:64/32});s.Blowfish=a._createHelper(v)}(),r.Blowfish})}(Mu)),Mu.exports}(function(t,e){(function(r,s,n){t.exports=s(pe(),Ns(),D0(),M0(),ar(),F0(),or(),Ml(),oa(),B0(),zl(),j0(),R0(),L0(),ia(),V0(),Ut(),Ie(),z0(),H0(),U0(),G0(),W0(),K0(),q0(),X0(),Y0(),Z0(),J0(),Q0(),e1(),t1(),r1(),s1(),n1())})(ce,function(r){return r})})(P0);/*! @license DOMPurify 3.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.0/LICENSE */const{entries:Bu,setPrototypeOf:ju,isFrozen:a1,getPrototypeOf:o1,getOwnPropertyDescriptor:i1}=Object;let{freeze:qe,seal:ut,create:la}=Object,{apply:ua,construct:ca}=typeof Reflect<"u"&&Reflect;qe||(qe=function(e){return e}),ut||(ut=function(e){return e}),ua||(ua=function(e,r){for(var s=arguments.length,n=new Array(s>2?s-2:0),a=2;a<s;a++)n[a-2]=arguments[a];return e.apply(r,n)}),ca||(ca=function(e){for(var r=arguments.length,s=new Array(r>1?r-1:0),n=1;n<r;n++)s[n-1]=arguments[n];return new e(...s)});const Is=Ye(Array.prototype.forEach),l1=Ye(Array.prototype.lastIndexOf),Ru=Ye(Array.prototype.pop),Wr=Ye(Array.prototype.push),u1=Ye(Array.prototype.splice),Ds=Ye(String.prototype.toLowerCase),da=Ye(String.prototype.toString),ha=Ye(String.prototype.match),Kr=Ye(String.prototype.replace),c1=Ye(String.prototype.indexOf),d1=Ye(String.prototype.trim),_t=Ye(Object.prototype.hasOwnProperty),Xe=Ye(RegExp.prototype.test),qr=h1(TypeError);function Ye(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var r=arguments.length,s=new Array(r>1?r-1:0),n=1;n<r;n++)s[n-1]=arguments[n];return ua(t,e,s)}}function h1(t){return function(){for(var e=arguments.length,r=new Array(e),s=0;s<e;s++)r[s]=arguments[s];return ca(t,r)}}function he(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ds;ju&&ju(t,null);let s=e.length;for(;s--;){let n=e[s];if(typeof n=="string"){const a=r(n);a!==n&&(a1(e)||(e[s]=a),n=a)}t[n]=!0}return t}function p1(t){for(let e=0;e<t.length;e++)_t(t,e)||(t[e]=null);return t}function Mt(t){const e=la(null);for(const[r,s]of Bu(t))_t(t,r)&&(Array.isArray(s)?e[r]=p1(s):s&&typeof s=="object"&&s.constructor===Object?e[r]=Mt(s):e[r]=s);return e}function Xr(t,e){for(;t!==null;){const s=i1(t,e);if(s){if(s.get)return Ye(s.get);if(typeof s.value=="function")return Ye(s.value)}t=o1(t)}function r(){return null}return r}const Lu=qe(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),pa=qe(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),fa=qe(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),f1=qe(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ma=qe(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),m1=qe(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Vu=qe(["#text"]),zu=qe(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),ga=qe(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Hu=qe(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ms=qe(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),g1=ut(/\{\{[\w\W]*|[\w\W]*\}\}/gm),y1=ut(/<%[\w\W]*|[\w\W]*%>/gm),v1=ut(/\$\{[\w\W]*/gm),_1=ut(/^data-[\-\w.\u00B7-\uFFFF]+$/),b1=ut(/^aria-[\-\w]+$/),Uu=ut(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),k1=ut(/^(?:\w+script|data):/i),w1=ut(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Gu=ut(/^html$/i),$1=ut(/^[a-z][.\w]*(-[.\w]+)+$/i);var Wu=Object.freeze({__proto__:null,ARIA_ATTR:b1,ATTR_WHITESPACE:w1,CUSTOM_ELEMENT:$1,DATA_ATTR:_1,DOCTYPE_NAME:Gu,ERB_EXPR:y1,IS_ALLOWED_URI:Uu,IS_SCRIPT_OR_DATA:k1,MUSTACHE_EXPR:g1,TMPLIT_EXPR:v1});const Yr={element:1,text:3,progressingInstruction:7,comment:8,document:9},E1=function(){return typeof window>"u"?null:window},S1=function(e,r){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let s=null;const n="data-tt-policy-suffix";r&&r.hasAttribute(n)&&(s=r.getAttribute(n));const a="dompurify"+(s?"#"+s:"");try{return e.createPolicy(a,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},Ku=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function qu(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:E1();const e=re=>qu(re);if(e.version="3.3.0",e.removed=[],!t||!t.document||t.document.nodeType!==Yr.document||!t.Element)return e.isSupported=!1,e;let{document:r}=t;const s=r,n=s.currentScript,{DocumentFragment:a,HTMLTemplateElement:i,Node:l,Element:d,NodeFilter:o,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:f,DOMParser:m,trustedTypes:_}=t,g=d.prototype,v=Xr(g,"cloneNode"),p=Xr(g,"remove"),y=Xr(g,"nextSibling"),h=Xr(g,"childNodes"),b=Xr(g,"parentNode");if(typeof i=="function"){const re=r.createElement("template");re.content&&re.content.ownerDocument&&(r=re.content.ownerDocument)}let w,S="";const{implementation:O,createNodeIterator:I,createDocumentFragment:j,getElementsByTagName:V}=r,{importNode:D}=s;let T=Ku();e.isSupported=typeof Bu=="function"&&typeof b=="function"&&O&&O.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:B,ERB_EXPR:R,TMPLIT_EXPR:H,DATA_ATTR:K,ARIA_ATTR:q,IS_SCRIPT_OR_DATA:se,ATTR_WHITESPACE:Z,CUSTOM_ELEMENT:ne}=Wu;let{IS_ALLOWED_URI:P}=Wu,k=null;const x=he({},[...Lu,...pa,...fa,...ma,...Vu]);let E=null;const c=he({},[...zu,...ga,...Hu,...Ms]);let $=Object.seal(la(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),C=null,L=null;const F=Object.seal(la(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let z=!0,G=!0,J=!1,U=!0,fe=!1,_e=!0,Te=!1,st=!1,ct=!1,ze=!1,dt=!1,Qe=!1,De=!0,Oe=!1;const et="user-content-";let ht=!0,pt=!1,Pe={},He=null;const ir=he({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Gt=null;const lr=he({},["audio","video","img","source","image","track"]);let At=null;const Wt=he({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),xr="http://www.w3.org/1998/Math/MathML",ur="http://www.w3.org/2000/svg",ft="http://www.w3.org/1999/xhtml";let Kt=ft,Jr=!1,Ar=null;const va=he({},[xr,ur,ft],da);let cr=he({},["mi","mo","mn","ms","mtext"]),Cr=he({},["annotation-xml"]);const Fs=he({},["title","style","font","a","script"]);let dr=null;const _a=["application/xhtml+xml","text/html"],ba="text/html";let Se=null,qt=null;const ka=r.createElement("form"),Qr=function(N){return N instanceof RegExp||N instanceof Function},es=function(){let N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(qt&&qt===N)){if((!N||typeof N!="object")&&(N={}),N=Mt(N),dr=_a.indexOf(N.PARSER_MEDIA_TYPE)===-1?ba:N.PARSER_MEDIA_TYPE,Se=dr==="application/xhtml+xml"?da:Ds,k=_t(N,"ALLOWED_TAGS")?he({},N.ALLOWED_TAGS,Se):x,E=_t(N,"ALLOWED_ATTR")?he({},N.ALLOWED_ATTR,Se):c,Ar=_t(N,"ALLOWED_NAMESPACES")?he({},N.ALLOWED_NAMESPACES,da):va,At=_t(N,"ADD_URI_SAFE_ATTR")?he(Mt(Wt),N.ADD_URI_SAFE_ATTR,Se):Wt,Gt=_t(N,"ADD_DATA_URI_TAGS")?he(Mt(lr),N.ADD_DATA_URI_TAGS,Se):lr,He=_t(N,"FORBID_CONTENTS")?he({},N.FORBID_CONTENTS,Se):ir,C=_t(N,"FORBID_TAGS")?he({},N.FORBID_TAGS,Se):Mt({}),L=_t(N,"FORBID_ATTR")?he({},N.FORBID_ATTR,Se):Mt({}),Pe=_t(N,"USE_PROFILES")?N.USE_PROFILES:!1,z=N.ALLOW_ARIA_ATTR!==!1,G=N.ALLOW_DATA_ATTR!==!1,J=N.ALLOW_UNKNOWN_PROTOCOLS||!1,U=N.ALLOW_SELF_CLOSE_IN_ATTR!==!1,fe=N.SAFE_FOR_TEMPLATES||!1,_e=N.SAFE_FOR_XML!==!1,Te=N.WHOLE_DOCUMENT||!1,ze=N.RETURN_DOM||!1,dt=N.RETURN_DOM_FRAGMENT||!1,Qe=N.RETURN_TRUSTED_TYPE||!1,ct=N.FORCE_BODY||!1,De=N.SANITIZE_DOM!==!1,Oe=N.SANITIZE_NAMED_PROPS||!1,ht=N.KEEP_CONTENT!==!1,pt=N.IN_PLACE||!1,P=N.ALLOWED_URI_REGEXP||Uu,Kt=N.NAMESPACE||ft,cr=N.MATHML_TEXT_INTEGRATION_POINTS||cr,Cr=N.HTML_INTEGRATION_POINTS||Cr,$=N.CUSTOM_ELEMENT_HANDLING||{},N.CUSTOM_ELEMENT_HANDLING&&Qr(N.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=N.CUSTOM_ELEMENT_HANDLING.tagNameCheck),N.CUSTOM_ELEMENT_HANDLING&&Qr(N.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=N.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),N.CUSTOM_ELEMENT_HANDLING&&typeof N.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&($.allowCustomizedBuiltInElements=N.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),fe&&(G=!1),dt&&(ze=!0),Pe&&(k=he({},Vu),E=[],Pe.html===!0&&(he(k,Lu),he(E,zu)),Pe.svg===!0&&(he(k,pa),he(E,ga),he(E,Ms)),Pe.svgFilters===!0&&(he(k,fa),he(E,ga),he(E,Ms)),Pe.mathMl===!0&&(he(k,ma),he(E,Hu),he(E,Ms))),N.ADD_TAGS&&(typeof N.ADD_TAGS=="function"?F.tagCheck=N.ADD_TAGS:(k===x&&(k=Mt(k)),he(k,N.ADD_TAGS,Se))),N.ADD_ATTR&&(typeof N.ADD_ATTR=="function"?F.attributeCheck=N.ADD_ATTR:(E===c&&(E=Mt(E)),he(E,N.ADD_ATTR,Se))),N.ADD_URI_SAFE_ATTR&&he(At,N.ADD_URI_SAFE_ATTR,Se),N.FORBID_CONTENTS&&(He===ir&&(He=Mt(He)),he(He,N.FORBID_CONTENTS,Se)),ht&&(k["#text"]=!0),Te&&he(k,["html","head","body"]),k.table&&(he(k,["tbody"]),delete C.tbody),N.TRUSTED_TYPES_POLICY){if(typeof N.TRUSTED_TYPES_POLICY.createHTML!="function")throw qr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof N.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw qr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=N.TRUSTED_TYPES_POLICY,S=w.createHTML("")}else w===void 0&&(w=S1(_,n)),w!==null&&typeof S=="string"&&(S=w.createHTML(""));qe&&qe(N),qt=N}},ts=he({},[...pa,...fa,...f1]),Ue=he({},[...ma,...m1]),Ct=function(N){let W=b(N);(!W||!W.tagName)&&(W={namespaceURI:Kt,tagName:"template"});const Q=Ds(N.tagName),we=Ds(W.tagName);return Ar[N.namespaceURI]?N.namespaceURI===ur?W.namespaceURI===ft?Q==="svg":W.namespaceURI===xr?Q==="svg"&&(we==="annotation-xml"||cr[we]):!!ts[Q]:N.namespaceURI===xr?W.namespaceURI===ft?Q==="math":W.namespaceURI===ur?Q==="math"&&Cr[we]:!!Ue[Q]:N.namespaceURI===ft?W.namespaceURI===ur&&!Cr[we]||W.namespaceURI===xr&&!cr[we]?!1:!Ue[Q]&&(Fs[Q]||!ts[Q]):!!(dr==="application/xhtml+xml"&&Ar[N.namespaceURI]):!1},nt=function(N){Wr(e.removed,{element:N});try{b(N).removeChild(N)}catch{p(N)}},Ft=function(N,W){try{Wr(e.removed,{attribute:W.getAttributeNode(N),from:W})}catch{Wr(e.removed,{attribute:null,from:W})}if(W.removeAttribute(N),N==="is")if(ze||dt)try{nt(W)}catch{}else try{W.setAttribute(N,"")}catch{}},Yu=function(N){let W=null,Q=null;if(ct)N="<remove></remove>"+N;else{const xe=ha(N,/^[\r\n\t ]+/);Q=xe&&xe[0]}dr==="application/xhtml+xml"&&Kt===ft&&(N='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+N+"</body></html>");const we=w?w.createHTML(N):N;if(Kt===ft)try{W=new m().parseFromString(we,dr)}catch{}if(!W||!W.documentElement){W=O.createDocument(Kt,"template",null);try{W.documentElement.innerHTML=Jr?S:we}catch{}}const Ge=W.body||W.documentElement;return N&&Q&&Ge.insertBefore(r.createTextNode(Q),Ge.childNodes[0]||null),Kt===ft?V.call(W,Te?"html":"body")[0]:Te?W.documentElement:Ge},Zu=function(N){return I.call(N.ownerDocument||N,N,o.SHOW_ELEMENT|o.SHOW_COMMENT|o.SHOW_TEXT|o.SHOW_PROCESSING_INSTRUCTION|o.SHOW_CDATA_SECTION,null)},wa=function(N){return N instanceof f&&(typeof N.nodeName!="string"||typeof N.textContent!="string"||typeof N.removeChild!="function"||!(N.attributes instanceof u)||typeof N.removeAttribute!="function"||typeof N.setAttribute!="function"||typeof N.namespaceURI!="string"||typeof N.insertBefore!="function"||typeof N.hasChildNodes!="function")},Ju=function(N){return typeof l=="function"&&N instanceof l};function Bt(re,N,W){Is(re,Q=>{Q.call(e,N,W,qt)})}const Qu=function(N){let W=null;if(Bt(T.beforeSanitizeElements,N,null),wa(N))return nt(N),!0;const Q=Se(N.nodeName);if(Bt(T.uponSanitizeElement,N,{tagName:Q,allowedTags:k}),_e&&N.hasChildNodes()&&!Ju(N.firstElementChild)&&Xe(/<[/\w!]/g,N.innerHTML)&&Xe(/<[/\w!]/g,N.textContent)||N.nodeType===Yr.progressingInstruction||_e&&N.nodeType===Yr.comment&&Xe(/<[/\w]/g,N.data))return nt(N),!0;if(!(F.tagCheck instanceof Function&&F.tagCheck(Q))&&(!k[Q]||C[Q])){if(!C[Q]&&tc(Q)&&($.tagNameCheck instanceof RegExp&&Xe($.tagNameCheck,Q)||$.tagNameCheck instanceof Function&&$.tagNameCheck(Q)))return!1;if(ht&&!He[Q]){const we=b(N)||N.parentNode,Ge=h(N)||N.childNodes;if(Ge&&we){const xe=Ge.length;for(let tt=xe-1;tt>=0;--tt){const jt=v(Ge[tt],!0);jt.__removalCount=(N.__removalCount||0)+1,we.insertBefore(jt,y(N))}}}return nt(N),!0}return N instanceof d&&!Ct(N)||(Q==="noscript"||Q==="noembed"||Q==="noframes")&&Xe(/<\/no(script|embed|frames)/i,N.innerHTML)?(nt(N),!0):(fe&&N.nodeType===Yr.text&&(W=N.textContent,Is([B,R,H],we=>{W=Kr(W,we," ")}),N.textContent!==W&&(Wr(e.removed,{element:N.cloneNode()}),N.textContent=W)),Bt(T.afterSanitizeElements,N,null),!1)},ec=function(N,W,Q){if(De&&(W==="id"||W==="name")&&(Q in r||Q in ka))return!1;if(!(G&&!L[W]&&Xe(K,W))){if(!(z&&Xe(q,W))){if(!(F.attributeCheck instanceof Function&&F.attributeCheck(W,N))){if(!E[W]||L[W]){if(!(tc(N)&&($.tagNameCheck instanceof RegExp&&Xe($.tagNameCheck,N)||$.tagNameCheck instanceof Function&&$.tagNameCheck(N))&&($.attributeNameCheck instanceof RegExp&&Xe($.attributeNameCheck,W)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(W,N))||W==="is"&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&Xe($.tagNameCheck,Q)||$.tagNameCheck instanceof Function&&$.tagNameCheck(Q))))return!1}else if(!At[W]){if(!Xe(P,Kr(Q,Z,""))){if(!((W==="src"||W==="xlink:href"||W==="href")&&N!=="script"&&c1(Q,"data:")===0&&Gt[N])){if(!(J&&!Xe(se,Kr(Q,Z,"")))){if(Q)return!1}}}}}}}return!0},tc=function(N){return N!=="annotation-xml"&&ha(N,ne)},rc=function(N){Bt(T.beforeSanitizeAttributes,N,null);const{attributes:W}=N;if(!W||wa(N))return;const Q={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:E,forceKeepAttr:void 0};let we=W.length;for(;we--;){const Ge=W[we],{name:xe,namespaceURI:tt,value:jt}=Ge,Tr=Se(xe),$a=jt;let je=xe==="value"?$a:d1($a);if(Q.attrName=Tr,Q.attrValue=je,Q.keepAttr=!0,Q.forceKeepAttr=void 0,Bt(T.uponSanitizeAttribute,N,Q),je=Q.attrValue,Oe&&(Tr==="id"||Tr==="name")&&(Ft(xe,N),je=et+je),_e&&Xe(/((--!?|])>)|<\/(style|title|textarea)/i,je)){Ft(xe,N);continue}if(Tr==="attributename"&&ha(je,"href")){Ft(xe,N);continue}if(Q.forceKeepAttr)continue;if(!Q.keepAttr){Ft(xe,N);continue}if(!U&&Xe(/\/>/i,je)){Ft(xe,N);continue}fe&&Is([B,R,H],nc=>{je=Kr(je,nc," ")});const sc=Se(N.nodeName);if(!ec(sc,Tr,je)){Ft(xe,N);continue}if(w&&typeof _=="object"&&typeof _.getAttributeType=="function"&&!tt)switch(_.getAttributeType(sc,Tr)){case"TrustedHTML":{je=w.createHTML(je);break}case"TrustedScriptURL":{je=w.createScriptURL(je);break}}if(je!==$a)try{tt?N.setAttributeNS(tt,xe,je):N.setAttribute(xe,je),wa(N)?nt(N):Ru(e.removed)}catch{Ft(xe,N)}}Bt(T.afterSanitizeAttributes,N,null)},D1=function re(N){let W=null;const Q=Zu(N);for(Bt(T.beforeSanitizeShadowDOM,N,null);W=Q.nextNode();)Bt(T.uponSanitizeShadowNode,W,null),Qu(W),rc(W),W.content instanceof a&&re(W.content);Bt(T.afterSanitizeShadowDOM,N,null)};return e.sanitize=function(re){let N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},W=null,Q=null,we=null,Ge=null;if(Jr=!re,Jr&&(re="<!-->"),typeof re!="string"&&!Ju(re))if(typeof re.toString=="function"){if(re=re.toString(),typeof re!="string")throw qr("dirty is not a string, aborting")}else throw qr("toString is not a function");if(!e.isSupported)return re;if(st||es(N),e.removed=[],typeof re=="string"&&(pt=!1),pt){if(re.nodeName){const jt=Se(re.nodeName);if(!k[jt]||C[jt])throw qr("root node is forbidden and cannot be sanitized in-place")}}else if(re instanceof l)W=Yu("<!---->"),Q=W.ownerDocument.importNode(re,!0),Q.nodeType===Yr.element&&Q.nodeName==="BODY"||Q.nodeName==="HTML"?W=Q:W.appendChild(Q);else{if(!ze&&!fe&&!Te&&re.indexOf("<")===-1)return w&&Qe?w.createHTML(re):re;if(W=Yu(re),!W)return ze?null:Qe?S:""}W&&ct&&nt(W.firstChild);const xe=Zu(pt?re:W);for(;we=xe.nextNode();)Qu(we),rc(we),we.content instanceof a&&D1(we.content);if(pt)return re;if(ze){if(dt)for(Ge=j.call(W.ownerDocument);W.firstChild;)Ge.appendChild(W.firstChild);else Ge=W;return(E.shadowroot||E.shadowrootmode)&&(Ge=D.call(s,Ge,!0)),Ge}let tt=Te?W.outerHTML:W.innerHTML;return Te&&k["!doctype"]&&W.ownerDocument&&W.ownerDocument.doctype&&W.ownerDocument.doctype.name&&Xe(Gu,W.ownerDocument.doctype.name)&&(tt="<!DOCTYPE "+W.ownerDocument.doctype.name+`>
|
|
41
|
-
`+tt),fe&&Is([B,R,H],jt=>{tt=Kr(tt,jt," ")}),w&&Qe?w.createHTML(tt):tt},e.setConfig=function(){let re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};es(re),st=!0},e.clearConfig=function(){qt=null,st=!1},e.isValidAttribute=function(re,N,W){qt||es({});const Q=Se(re),we=Se(N);return ec(Q,we,W)},e.addHook=function(re,N){typeof N=="function"&&Wr(T[re],N)},e.removeHook=function(re,N){if(N!==void 0){const W=l1(T[re],N);return W===-1?void 0:u1(T[re],W,1)[0]}return Ru(T[re])},e.removeHooks=function(re){T[re]=[]},e.removeAllHooks=function(){T=Ku()},e}var ya=qu();const x1=["strong","b","i","em","u","p","br","ul","ol","li","img","figure","a","span"],A1=["style","src","alt","href","target"],C1=(t,e={})=>{var r,s,n;if(!t)return"";const a=e.allowedTags||x1,i=e.allowedAttributes||A1,l={ALLOWED_TAGS:a,ALLOWED_ATTR:i,ADD_ATTR:["target","rel"]};(r=ya)==null||r.addHook("afterSanitizeAttributes",o=>{o.tagName==="A"&&!o.hasAttribute("target")&&(o.setAttribute("target","_blank"),o.setAttribute("rel","noopener noreferrer"))});const d=(s=ya)==null?void 0:s.sanitize(t,l);return(n=ya)==null||n.removeHook("afterSanitizeAttributes"),d},Zr={props:{userReaction:"",likesCount:0,dislikesCount:0,showTitle:!1,onClick:()=>{}}},Xu=({userReaction:t=Zr.props.userReaction,likesCount:e=Zr.props.likesCount,dislikesCount:r=Zr.props.dislikesCount,showTitle:s=Zr.props.showTitle,onClick:n=Zr.props.onClick})=>{const a=i=>{n==null||n(i)};return M.jsxs(Le,{gap:"quark",children:[M.jsx(ye,{children:M.jsx(Ae,{className:"reaction-button__like",color:t==="like"?"success-dark":"neutral-80",fill:t==="like",image:"thumb_up",onClick:()=>a("like"),size:"lg",testId:"like-button"})}),s?M.jsx(ye,{children:M.jsx($t,{children:"Útil"})}):M.jsx(M.Fragment,{}),M.jsx(ye,{children:M.jsxs($t,{children:["(",e,")"]})}),M.jsx(Ne,{horizontal:"quark"}),M.jsx(ye,{children:M.jsx(Ae,{className:"reaction-button__deslike",color:t==="dislike"?"danger-dark":"neutral-80",fill:t==="dislike",image:"thumb_down",onClick:()=>a("dislike"),size:"lg",testId:"dislike-button"})}),s?M.jsx(ye,{children:M.jsx($t,{children:"Não útil"})}):M.jsx(M.Fragment,{}),M.jsx(ye,{children:M.jsxs($t,{children:["(",r,")"]})})]})},T1=["strong","b","i","em","u","p","br","ul","ol","li","img","figure","a","span","blockquote"],O1=({question:t,onReactionClick:e})=>{const r=C1(t.attributes.faqQuestion.answer,{allowedTags:T1});return M.jsx("div",{className:"faq-question-detail",children:M.jsx(hr,{className:"faq-detail",elevation:2,children:M.jsxs(Le,{flexDirection:"column",children:[M.jsx(bt,{type:"heading-5",className:"color__neutral--90",children:t.attributes.title}),M.jsx(Ne,{vertical:"quark"}),M.jsxs($t,{className:"color__neutral--70",children:["Última atualização:"," ",vl(new Date(`${t.attributes.faqQuestion.lastUpdate}T00:00:00`),{format:"localized"})]}),M.jsx(Ne,{vertical:"xxxs"}),M.jsx("div",{className:"faq-detail__answer",dangerouslySetInnerHTML:{__html:r}}),M.jsx(Ne,{vertical:"xxxs"}),M.jsx(Ks,{}),M.jsx(Ne,{vertical:"xxs"}),M.jsxs(Le,{alignItems:"flex-end",flexDirection:"row",gap:"xs",justifyContent:"space-between",children:[M.jsx(ye,{children:M.jsx(bt,{type:"heading-6",children:"Esse texto foi útil?"})}),M.jsx(ye,{children:M.jsx(Xu,{dislikesCount:t.attributes.dislikesCount,likesCount:t.attributes.likesCount,onClick:s=>e==null?void 0:e(t.id,s),showTitle:!0,userReaction:t.attributes.userReaction})})]})]})})})},P1=({title:t="",questions:e=[],showReactions:r=!1,collapse:s=!1,onClick:n=()=>{},onReactionClick:a=()=>{}})=>M.jsxs("div",{className:"faq-questions",children:[t&&M.jsx(bt,{type:"heading-5",className:"color__neutral--90",children:t}),M.jsx(Ne,{vertical:"xxxs"}),M.jsx("div",{className:"faq-questions-list",children:M.jsx(Le,{flexDirection:"column",gap:"nano",children:e==null?void 0:e.map(i=>M.jsx(ye,{children:M.jsx("div",{className:`faq-card__container ${s?"faq-card__container--collapsed":""}`,onClick:s?()=>n(i):void 0,role:"button",tabIndex:s?0:void 0,children:M.jsx(hr,{className:"faq-card",elevation:2,children:M.jsxs(Le,{alignItems:"center",justifyContent:"space-between",children:[M.jsxs(ye,{flex:"1 1 0",children:[M.jsx(bt,{type:"heading-6",className:"faq-card__title color__neutral--90",children:i.attributes.title}),s?M.jsx(M.Fragment,{}):M.jsxs(M.Fragment,{children:[M.jsx(Ne,{vertical:"xxxs"}),M.jsx("div",{className:"ds-grid",children:M.jsxs("div",{className:"ds-grid__row align-items--center",children:[M.jsx("div",{className:"ds-grid__col ds-grid__col--lg-4 ds-grid__col--sm-12 ds-grid__col-12",children:M.jsxs($t,{children:["Última atualização:"," ",vl(new Date(`${i.attributes.faqQuestion.lastUpdate}T00:00:00`),{format:"localized"})]})}),M.jsx("div",{className:"ds-grid__col ds-grid__col--lg-4 ds-grid__col--sm-12 ds-grid__col-12",children:r?M.jsx(Xu,{dislikesCount:i.attributes.dislikesCount,likesCount:i.attributes.likesCount,onClick:l=>a(i.id,l),userReaction:i.attributes.userReaction}):null}),M.jsx("div",{className:"ds-grid__col ds-grid__col--lg-4 ds-grid__col--sm-12 ds-grid__col-12",children:M.jsxs(Le,{alignItems:"
|
|
41
|
+
`+tt),fe&&Is([B,R,H],jt=>{tt=Kr(tt,jt," ")}),w&&Qe?w.createHTML(tt):tt},e.setConfig=function(){let re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};es(re),st=!0},e.clearConfig=function(){qt=null,st=!1},e.isValidAttribute=function(re,N,W){qt||es({});const Q=Se(re),we=Se(N);return ec(Q,we,W)},e.addHook=function(re,N){typeof N=="function"&&Wr(T[re],N)},e.removeHook=function(re,N){if(N!==void 0){const W=l1(T[re],N);return W===-1?void 0:u1(T[re],W,1)[0]}return Ru(T[re])},e.removeHooks=function(re){T[re]=[]},e.removeAllHooks=function(){T=Ku()},e}var ya=qu();const x1=["strong","b","i","em","u","p","br","ul","ol","li","img","figure","a","span"],A1=["style","src","alt","href","target"],C1=(t,e={})=>{var r,s,n;if(!t)return"";const a=e.allowedTags||x1,i=e.allowedAttributes||A1,l={ALLOWED_TAGS:a,ALLOWED_ATTR:i,ADD_ATTR:["target","rel"]};(r=ya)==null||r.addHook("afterSanitizeAttributes",o=>{o.tagName==="A"&&!o.hasAttribute("target")&&(o.setAttribute("target","_blank"),o.setAttribute("rel","noopener noreferrer"))});const d=(s=ya)==null?void 0:s.sanitize(t,l);return(n=ya)==null||n.removeHook("afterSanitizeAttributes"),d},Zr={props:{userReaction:"",likesCount:0,dislikesCount:0,showTitle:!1,onClick:()=>{}}},Xu=({userReaction:t=Zr.props.userReaction,likesCount:e=Zr.props.likesCount,dislikesCount:r=Zr.props.dislikesCount,showTitle:s=Zr.props.showTitle,onClick:n=Zr.props.onClick})=>{const a=i=>{n==null||n(i)};return M.jsxs(Le,{gap:"quark",children:[M.jsx(ye,{children:M.jsx(Ae,{className:"reaction-button__like",color:t==="like"?"success-dark":"neutral-80",fill:t==="like",image:"thumb_up",onClick:()=>a("like"),size:"lg",testId:"like-button"})}),s?M.jsx(ye,{children:M.jsx($t,{children:"Útil"})}):M.jsx(M.Fragment,{}),M.jsx(ye,{children:M.jsxs($t,{children:["(",e,")"]})}),M.jsx(Ne,{horizontal:"quark"}),M.jsx(ye,{children:M.jsx(Ae,{className:"reaction-button__deslike",color:t==="dislike"?"danger-dark":"neutral-80",fill:t==="dislike",image:"thumb_down",onClick:()=>a("dislike"),size:"lg",testId:"dislike-button"})}),s?M.jsx(ye,{children:M.jsx($t,{children:"Não útil"})}):M.jsx(M.Fragment,{}),M.jsx(ye,{children:M.jsxs($t,{children:["(",r,")"]})})]})},T1=["strong","b","i","em","u","p","br","ul","ol","li","img","figure","a","span","blockquote"],O1=({question:t,onReactionClick:e})=>{const r=C1(t.attributes.faqQuestion.answer,{allowedTags:T1});return M.jsx("div",{className:"faq-question-detail",children:M.jsx(hr,{className:"faq-detail",elevation:2,children:M.jsxs(Le,{flexDirection:"column",children:[M.jsx(bt,{type:"heading-5",className:"color__neutral--90",children:t.attributes.title}),M.jsx(Ne,{vertical:"quark"}),M.jsxs($t,{className:"color__neutral--70",children:["Última atualização:"," ",vl(new Date(`${t.attributes.faqQuestion.lastUpdate}T00:00:00`),{format:"localized"})]}),M.jsx(Ne,{vertical:"xxxs"}),M.jsx("div",{className:"faq-detail__answer",dangerouslySetInnerHTML:{__html:r}}),M.jsx(Ne,{vertical:"xxxs"}),M.jsx(Ks,{}),M.jsx(Ne,{vertical:"xxs"}),M.jsxs(Le,{alignItems:"flex-end",flexDirection:"row",gap:"xs",justifyContent:"space-between",children:[M.jsx(ye,{children:M.jsx(bt,{type:"heading-6",children:"Esse texto foi útil?"})}),M.jsx(ye,{children:M.jsx(Xu,{dislikesCount:t.attributes.dislikesCount,likesCount:t.attributes.likesCount,onClick:s=>e==null?void 0:e(t.id,s),showTitle:!0,userReaction:t.attributes.userReaction})})]})]})})})},P1=({title:t="",questions:e=[],showReactions:r=!1,collapse:s=!1,onClick:n=()=>{},onReactionClick:a=()=>{}})=>M.jsxs("div",{className:"faq-questions",children:[t&&M.jsx(bt,{type:"heading-5",className:"color__neutral--90",children:t}),M.jsx(Ne,{vertical:"xxxs"}),M.jsx("div",{className:"faq-questions-list",children:M.jsx(Le,{flexDirection:"column",gap:"nano",children:e==null?void 0:e.map(i=>M.jsx(ye,{children:M.jsx("div",{className:`faq-card__container ${s?"faq-card__container--collapsed":""}`,onClick:s?()=>n(i):void 0,role:"button",tabIndex:s?0:void 0,children:M.jsx(hr,{className:"faq-card",elevation:2,children:M.jsxs(Le,{alignItems:"center",justifyContent:"space-between",children:[M.jsxs(ye,{flex:"1 1 0",children:[M.jsx(bt,{type:"heading-6",className:"faq-card__title color__neutral--90",children:i.attributes.title}),s?M.jsx(M.Fragment,{}):M.jsxs(M.Fragment,{children:[M.jsx(Ne,{vertical:"xxxs"}),M.jsx("div",{className:"ds-grid",children:M.jsxs("div",{className:"ds-grid__row align-items--center",children:[M.jsx("div",{className:"ds-grid__col ds-grid__col--lg-4 ds-grid__col--sm-12 ds-grid__col-12",children:M.jsxs($t,{children:["Última atualização:"," ",vl(new Date(`${i.attributes.faqQuestion.lastUpdate}T00:00:00`),{format:"localized"})]})}),M.jsx("div",{className:"ds-grid__col ds-grid__col--lg-4 ds-grid__col--sm-12 ds-grid__col-12",children:r?M.jsx(Xu,{dislikesCount:i.attributes.dislikesCount,likesCount:i.attributes.likesCount,onClick:l=>a(i.id,l),userReaction:i.attributes.userReaction}):null}),M.jsx("div",{className:"ds-grid__col ds-grid__col--lg-4 ds-grid__col--sm-12 ds-grid__col-12",children:M.jsxs(Le,{alignItems:"flex-start",gap:"quark",justifyContent:"flex-end",children:[M.jsx(ye,{children:M.jsx("button",{className:"faq-card__link",onClick:()=>n(i),type:"button",children:"Ler mais"})}),M.jsx(ye,{children:M.jsx(Ae,{color:"primary",image:"chevron_right",size:"lg"})})]})})]})})]})]}),s?M.jsx(ye,{children:M.jsx(Ae,{image:"chevron_right",size:"lg"})}):M.jsx(M.Fragment,{})]})})})},i.id))})})]}),N1=({content:t})=>{var d;const e=X.useRef(null),r=C0({autoRotate:!0,autoRotateInterval:8e3,animationDuration:0,items:t,infinite:!0,startIndex:0,swipeEnabled:!0,swipeThreshold:20,swipePercentage:.3,containerRef:e}),s=r.getContainerTransform(),n=[{type:"event",icon:"campaign"},{type:"news",icon:"star_border"},{type:"campaign",icon:"electric_bolt"},{type:"product",icon:"group_add"}],a=o=>{const u=n.find(f=>f.type===o);return(u==null?void 0:u.icon)??"star_border"},i=o=>{const u=new Date(o+"T00:00:00"),f=u.getDate(),m=u.toLocaleDateString("pt-BR",{month:"long"});return`${f} de ${m.charAt(0).toUpperCase()+m.slice(1)}`},l=o=>{var u,f;return M.jsxs(M.Fragment,{children:[M.jsx("div",{children:M.jsxs(Le,{alignItems:"center",flexWrap:"nowrap",gap:"xxxs",justifyContent:"flex-start",children:[M.jsx(ye,{children:M.jsx("div",{className:"news__icon","data-testid":"news-icon-container",children:M.jsx(Ae,{color:"neutral-00",fill:!0,image:a(o.type),size:"xxl",testId:"news-icon"})})}),M.jsx(ye,{children:M.jsx(bt,{className:"news__title",type:"heading-6",children:o.title})})]})}),M.jsxs("div",{children:[M.jsx(Ne,{vertical:"nano"}),M.jsx($t,{className:"news__content",children:o.content}),M.jsx(Ne,{vertical:"nano"}),(u=o.link)!=null&&u.url&&((f=o.link)!=null&&f.label)?M.jsx("a",{className:"news__link",href:o.link.url,rel:"noopener noreferrer",target:"_blank",children:o.link.label}):M.jsx(M.Fragment,{}),M.jsx(Ne,{vertical:"nano"}),M.jsx("div",{className:"news__line-breaker"})]})]})};return M.jsx("div",{className:"news",children:M.jsxs(hr,{backgroundColor:"neutral-20",className:"news__card",elevation:1,children:[M.jsx("div",{className:"news__ellipse"}),M.jsxs(Le,{alignItems:"flex-start",flexDirection:"column",gap:"nano",justifyContent:"space-between",children:[M.jsx(ye,{className:"carousel",children:M.jsx("div",{ref:e,...r.handlers,className:"carousel__wrapper",children:M.jsx("div",{className:"carousel__container","data-testid":"carousel",style:{transform:s},children:r.items.map((o,u)=>M.jsx("div",{className:"carousel__item","data-testid":`carousel-item-${u}`,children:l(o)},`carousel__item-${u}-${r.currentLogicalIndex}`))})})}),M.jsxs(ye,{className:"news__footer",children:[M.jsx(Ne,{vertical:"nano"}),M.jsxs(Le,{alignItems:"center",justifyContent:"space-between",children:[M.jsx(ye,{children:M.jsxs(Le,{alignItems:"center",gap:"nano",justifyContent:"flex-start",children:[M.jsxs(ye,{children:[M.jsx(Ae,{color:"neutral-60",fill:!0,image:"calendar_today"}),M.jsx(Ne,{horizontal:"nano"})]}),M.jsx(ye,{children:M.jsx($t,{className:"news__date",type:"small",children:((d=t[r.currentLogicalIndex])==null?void 0:d.date)&&i(t[r.currentLogicalIndex].date)})})]})}),M.jsx(ye,{children:M.jsx(Le,{className:"news__dots",gap:"nano",children:t.map((o,u)=>M.jsx(ye,{children:M.jsx("button",{"aria-label":`Go to item ${u+1}`,className:`news__dot ${u===r.currentLogicalIndex?"news__dot--active":""}`,"data-testid":`dot-${u}`,onClick:()=>r.goToIndex(u)})},`dot-${r.currentLogicalIndex}-${u}`))})})]})]})]})]})})},I1=({items:t=[],onClick:e,activeItem:r})=>M.jsx("div",{className:"sidebar-menu","data-testid":"sidebar-menu",children:M.jsx("div",{className:"sidebar-menu__list",children:t.map(s=>M.jsx("button",{className:`sidebar-menu__item ${r===s.id?"sidebar-menu__item--active":""}`,"data-testid":`sidebar-item-${s.id}`,onClick:()=>e(s.id),type:"button",children:M.jsxs(Le,{alignItems:"center",gap:"xs",children:[M.jsx(ye,{flex:"1",children:M.jsx(bt,{type:"heading-6",testId:`sidebar-item-title-${s.id}`,children:s.attributes.name})}),M.jsx(ye,{children:M.jsx(Ae,{color:r===s.id?"primary":"neutral-40","data-testid":`sidebar-icon-${s.id}`,image:"chevron_right",size:"md"})})]})},s.id))})});at.CategoryCards=Bc,at.News=N1,at.QuestionDetail=O1,at.Questions=P1,at.SidebarMenuList=I1,Object.defineProperty(at,Symbol.toStringTag,{value:"Module"})});
|